Skip to content

Commit

Permalink
moved var from controller to ac.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
lostjared committed Mar 8, 2018
1 parent 77fac6a commit 7de19e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Binary file not shown.
9 changes: 1 addition & 8 deletions Acid.Cam.v2.OSX/AC_Controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
void *library = NULL;
std::ostringstream ftext;
std::ostringstream stream;
cv::Mat blend_image;
bool blend_set = false;
//cv::Mat blend_image;
int camera_mode = 0;
bool disableFilter;
cv::VideoCapture *capture;
Expand Down Expand Up @@ -778,7 +777,6 @@ - (void) cvProc: (id) sender {
else ac::isNegative = true;
ac::color_order = (int) [corder indexOfSelectedItem];
}

NSInteger after = [apply_after integerValue];
if(after == NSOffState)
ac::ApplyColorMap(frame);
Expand All @@ -797,9 +795,7 @@ - (void) cvProc: (id) sender {
cv::cvtColor(frame, change, cv::COLOR_BGR2GRAY);
cv::cvtColor(change, frame, cv::COLOR_GRAY2BGR);
}

ac::ApplyColorMap(frame);

NSInteger mask = [[NSApp mainWindow] styleMask];
NSString *main_window = [[NSApp mainWindow] title];
NSWindow *main_w = [NSApp mainWindow];
Expand Down Expand Up @@ -939,12 +935,10 @@ - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColu
if( [str isEqualTo:@"Filter"] ) {
int value = (int)[number integerValue];
NSString *s = [NSString stringWithFormat:@"%s", ac::draw_strings[value].c_str()];
// [number release];
return s;
}
else {
NSString *s = [NSString stringWithFormat: @"%d", (int)[number integerValue]];
// [number release];
return s;
}
}
Expand All @@ -958,7 +952,6 @@ - (IBAction) addCustomItem: (id) sender {
NSInteger cate = [categories_custom indexOfSelectedItem];
NSMenuItem *item = [menu_items_custom[cate] itemAtIndex: index];
NSString *title = [item title];

if(index >= 0 && cate >= 0) {
int filter_value = ac::filter_map[[title UTF8String]];
[custom_array addObject: [NSNumber numberWithInt: filter_value]];
Expand Down
4 changes: 4 additions & 0 deletions Acid.Cam.v2.OSX/ac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ namespace ac {
bool color_map_set = false;
}

// globals
cv::Mat blend_image;
bool blend_set = false;

void ac::fill_filter_map() {
for(int i = 0; i < ac::draw_max; ++i) {
filter_map[draw_strings[i]] = i;
Expand Down

0 comments on commit 7de19e8

Please sign in to comment.