Re: Comparing images [WAS: Re: Comparing pictures]
Eduardo Gutierrez de O <[email protected]> Mon, 19 Mar 2018 17:18:22 +0100
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
Understood. I wasn't sure what you meant by "comparing". If they need to be identical it's not a problem but I thought it might mean finding the closest similarity. For the latter I've used perceptual hashes (p-hashes) in the past with good results. They're also acceptably fast (I do ther comparison in images of several megapixels originally). They allow you to get a "score" of similarity and a confidence value, which helps taking decisions. The hash is text, so it's not memory intensive either. Eduo > On 19 Mar 2018, at 10:39, Jean-Luc Arnaud <jean-luc-E/[email protected]> wrote: > >> you mean actually comparing the images themselves? > Yes, indeed. But they are only icons, 32x32 or 16x16 pixels, so comparing pixel to pixel should be fast. > > Jean-Luc Arnaud > > Le 17/03/2018 à 12:39, Eduardo Gutierrez de O a écrit : >> Hi, Jean-Luc >> >> This is not what you're asking, but I'm intrigued. >> >> When you say you're comparing pictures you mean actually comparing the images themselves? If so, are you using some sort of p-hash or the images are identical? >> >> Eduo >> >>> On 16 Mar 2018, at 17:42, Jean-Luc Arnaud <jean-luc-E/[email protected]> wrote: >>> >>> Hi all, >>> >>> I'm used to drawing icons in Listbox cells. >>> >>> I need to compare these icons with pictures, in order to determine what action should fire when clicked. >>> >>> I know coordinates of each icon in the cell. >>> >>> 1) Is the RGBSurface and Pixel comparison a good way? >>> >>> 2) How to get an RGBSurface of a cell area in the CellClick event? I can't figure out how to get a Graphics object of the area and then a RGBSurface. >>> >>> All suggestion welcome, including MBS plugins use. >>> >>> TIA for your help. >>> >>> -- >>> Jean-Luc Arnaud >>> >