Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This works. By using "pathForResource" of NSBundle.

NSString * const TFCascadeFilename = @"haarcascade_TF";//Strings of haar file names

NSString *TF_cascade_name = [[NSBundle mainBundle] pathForResource:TFCascadeFilename ofType:@"xml"];

 //Load haar file, return error message if fail
 if (!TF_cascade.load( [TF_cascade_name UTF8String] )) {
     NSLog(@"Could not load TF cascade!");
 }