Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there any way to thin out the characters after Otsu thresholding?

Hi

I am trying to segment all the characters (see the image below) and there is one issue I still can't solve. THRESH_OTSU works the best with the only exception that it merges some characters.

When I tried to use adaptive thresholding, there was no problem with character merging but I was unable to control the parameters so that it could work for most images.

I know that some combinations of erosion and dilation might work in such cases. Trouble is, even though the characters get thinner as a result of erosion, the areas between the characters only increase. Probably, I am misusing/misunderstanding erosion.

Thanks in advanced for any suggestions.

image description

Is there any way to thin out the characters after Otsu thresholding?

Hi

I am trying to segment all the characters (see the image below) and there is one issue I still can't solve. THRESH_OTSU works the best with the only exception that it merges some characters.

When I tried to use adaptive thresholding, there was no problem with character merging but I was unable to control the parameters so that it could work for most images.

I know that some combinations of erosion and dilation might work in such cases. Trouble is, even though the characters get thinner as a result of erosion, the areas between the characters only increase. Probably, I am misusing/misunderstanding erosion.

Thanks in advanced for any suggestions.

image description

image description Here's the source image.

image description Unlike more classical car number plates, the font is often black on a light background. This is why I have to count the number of contours or rects returned by minAreaRect to invert the image in such cases.

Is there any way to thin out the characters after Otsu thresholding?

Hi

I am trying to segment all the characters (see the image below) and there is one issue I still can't solve. THRESH_OTSU works the best with the only exception that it merges some characters.

When I tried to use adaptive thresholding, there was no problem with character merging but I was unable to control the parameters so that it could work for most images.

I know that some combinations of erosion and dilation might work in such cases. Trouble is, even though the characters get thinner as a result of erosion, the areas between the characters only increase. Probably, I am misusing/misunderstanding erosion.

Thanks in advanced for any suggestions.

image description

image description Here's the source image.

image description Unlike the more classical case of car number plates, the font is often black on a light background. This is why I have to count the number of contours or rects returned by minAreaRect to invert the image in such cases.