13

How to compile pHash for iOS?

I read the documentation but there's no mention of iOS/arm and Google doesn't help.

So if anyone was able to compile pHash for iOS please share your experience.

Mehul Mistri
  • 15,037
  • 14
  • 70
  • 94
tagyro
  • 1,638
  • 2
  • 21
  • 36
  • @CodaFi I managed to compile for Mac with Homebrew and applying a patch from [Wulfshade](https://github.com/mxcl/homebrew/pull/9343) – tagyro Jul 10 '12 at 07:01
  • 1
    Can be somewhat tedious, see my post here: http://stackoverflow.com/questions/11452712/how-to-build-phash-on-macosx-lion-using-latest-ffmpeg-devel – Anri Digholm Jul 12 '12 at 16:40
  • @AnriDigholm +1 for that, but I managed to compile for Mac with Homebrew - the problem is iOS – tagyro Jul 13 '12 at 09:06
  • 2
    pHash and any GPL-ed component cannot be used of iOS because the App Store terms are incompatible with GPL. So, you better put your efforts into finding an alternative... – sergio Jul 15 '12 at 18:49
  • GPL is not a problem - pHASH also has a commercial license available. – tagyro Jul 16 '12 at 10:09
  • @AndreiStoleru did you succeeded ? – Pierre May 13 '14 at 10:20
  • @Pierre actually no. In the end I "re-wrote" pHash in Objective-C (with support for Accelerate framework) – tagyro May 14 '14 at 11:18
  • @AndreiStoleru did you open sourced it ? :D – Pierre May 14 '14 at 15:44
  • @Pierre no, it was for a client. I'll ask my client if he's ok with open sourcing the code – tagyro May 17 '14 at 08:47
  • @AndreiStoleru ok cool :) I think that's not hard to convert it. I just need the audio part so I can ignore CImg things. – Pierre May 17 '14 at 09:16
  • @Pierre My library will not be of much use in this case. I wrote it with perceptual hashing of images in mind and all the calculations are based on this :( – tagyro May 17 '14 at 20:42
  • @AndreiStoleru of no problem :) I'll write it for audio hash myself. Thx ! – Pierre May 18 '14 at 12:10

1 Answers1

1

If you need pHash for imageHash purposes, You might consider looking into the imageMagick framework for iOS : http://www.imagemagick.org/download/iOS/

Also, you should remember that pHash is licensed under GPLv3, which means that derived work can only be distributed under the same license terms.

Nils Munch
  • 8,805
  • 11
  • 51
  • 103
  • 1
    pHash also has a commercial license so GPL is not a problem. I had a look at imagemagick but it seems it has the same problems when it comes to iOS. – tagyro Jan 15 '13 at 15:30
  • imageMagick does image hash for exact identical pixels, while pHash is a project that could compare the hash of resized, distorsion, cropping images. – est May 09 '13 at 02:36