i used brew to create a compiled library from phash i have imported the CImg.h file and everything compiles but it doesn t work.
i 想要从形象中 has,但总是获得同样的产出。
NSBundle *bundle = [NSBundle mainBundle];
NSString *path = [bundle pathForImageResource:@"branch.png"];
const char *image = [path cStringUsingEncoding:NSASCIIStringEncoding];
ulong64 hash = 0;
int valid = ph_dct_imagehash(image,hash);
NSLog(@"%i",valid);
NSLog(@"%llu",hash);
产出
sh: convert: command not found
sh: gm: command not found
sh: convert: command not found
sh: gm: command not found
sh: convert: command not found
sh: gm: command not found
2011-10-03 20:10:22.571 pHashi386[2155:60b] -1
2011-10-03 20:10:22.572 pHashi386[2155:60b] 0
显而易见,有些事情是错误的,但是,如果sh子的指挥没有找到,而且如果一米没有走上正确的轨道,那就没有了。