私はbrewを使用してphashからコンパイル済みライブラリを作成しました.CImg.hファイルをインポートしましたが、すべてがコンパイルされましたが、動作しません.
画像からハッシュを作成したいのですが、常に同じ出力が得られます
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コマンドが何であるか、また正しい軌道に乗っているかどうかもわかりません。