1 | initial version |
The answer is yes! I found similar code on SO to this which did the job just fine:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *directory = [paths objectAtIndex:0];
NSString *filePath = [directory stringByAppendingPathComponent:[NSString stringWithFormat:@"hand%f.jpg", CFAbsoluteTimeGetCurrent()]];
const char* filePathC = [filePath cStringUsingEncoding:NSMacOSRomanStringEncoding];
const cv::String thisPath = (const cv::String)filePathC;
//Save image
imwrite(thisPath, capturedFrame);