English 中文(简体)
pHash (image-hash) in objective-c don t work
原标题:pHash (image-hash) in objective-c doesn t work

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子的指挥没有找到,而且如果一米没有走上正确的轨道,那就没有了。

最佳回答

似乎必须增加一个增减变量

i 采用/usr/ local/bin:/usr/ local/sbin:/usr/bin:/opt/ local/bin:/usr/ local/mysql/bin:/opt/ local/sbin:/bin:/usr/X11/bin

页: 1

i 如果不能在海洋观测系统平台上开展工作,那不会令人信服。

问题回答

也可以告诉 CI,在什么地方找到图像转换,例如:

cimg:imagemagick_path(“/opt/ local/bin/convert”);





相关问题
2 mysql instances in MAC

i recently switched to mac. first and foremost i installed xampp. then for django-python-mysql connectivity, i "somehow" ended up installing a seperate MySQL. now the seperate mysql installation is ...

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Controlling OSX windows

I m trying to control windows of a foreign OSX applications from my application. I d like to 1. move the windows on the screen 2. resize the windows on the screen 3. change the currently active window ...

Switching J2SE versions on Mac OS (SnowLeopard)

My current JDK on Mac OS (10.6) is set to 1.6 and I d like to switch to 1.5. A listing of /System/Library/Frameworks/JavaVM.framework/Versions/ shows: lrwxr-xr-x 1 root wheel 10 Nov 3 18:34 ...

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

export to MP3 from quicktime API

A question for Apple,QT programmers. Would like to know if it s possible to export a Movie object to MP3 using the QuickTime API. Preferably the ConvertMovieToFile function. I ve looked at ...

热门标签