Hello,
In another one of my bizarre hobby programs I'm trying to match sections of a 24-bit colour image to one of a number of 1-bit patterns.
Currently the steps I'm taking are:-
- Reduce image colour depth to 8-bit greyscale
- Increase pattern depth to 8-bit (essentially 0 and 255)
- Compare the sums of the Euclidean distances between source and pattern pixels.
The thing is, I don't think that's right. I shouldn't be blindly checking colours against colours, because the colours are irrelevant. What I should be checking are that the edges of the colours roughly match up and maybe introduce a heuristic so that close matches with a few pixels out are still acceptable. Does that sound correct?
Also, three of the patterns involved are essentially all the same bit (0 or 1) so I should classify them and hold off testing against them unless everything else is a bad match, yeah?