Image comparison - fast algorithm

后端 未结 9 1535
谎友^
谎友^ 2020-11-21 15:02

I\'m looking to create a base table of images and then compare any new images against that to determine if the new image is an exact (or close) duplicate of the base.

<
9条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-21 15:27

    I believe that dropping the size of the image down to an almost icon size, say 48x48, then converting to greyscale, then taking the difference between pixels, or Delta, should work well. Because we're comparing the change in pixel color, rather than the actual pixel color, it won't matter if the image is slightly lighter or darker. Large changes will matter since pixels getting too light/dark will be lost. You can apply this across one row, or as many as you like to increase the accuracy. At most you'd have 47x47=2,209 subtractions to make in order to form a comparable Key.

提交回复
热议问题