Search similitary of a picture in folder of thousand others

Everything else that doesn't fall into one of the other PB categories.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Search similitary of a picture in folder of thousand oth

Post by wilbert »

IdeasVacuum wrote:What I'm trying to do is find greyscale images that are similar to a colour 'master image'.
Try this module
http://www.purebasic.fr/english/viewtop ... 35#p436035

Compute the YIQhash from both images using the ImageHash or FileHash procedure.
To compare, use the HammingDistance(Hash1.q, Hash2.q) procedure and from both hashes, pass only the Y channel YIQhash\Y .
That should give the result you want (a low hamming distance value for similar images).
Windows (x64)
Raspberry Pi OS (Arm64)
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Search similitary of a picture in folder of thousand oth

Post by IdeasVacuum »

Sounds interesting wilbert - inspired by streaky bacon? :mrgreen:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Search similitary of a picture in folder of thousand oth

Post by IdeasVacuum »

Works well - a side benefit is that it also gets tif image similarity correct.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply