I would like to find a similarity measure between two images showing characters taking into account their histograms. An image example may contain just an individual letter or it could contain several characters and look like this:
.
Can anyone please guide me through how to use calcHist
function in order to feed its output to compareHist
function and find a similarity measure between such images. The important point is that the characters may not look the same and may be a little bit distorted while they still remain similar.
If this approach is not correct, do you know any other approaches? I played with matchShapes
but because it is rotation invariant, it sometimes does not provide satisfactory results and letter p is then similar to letter d.