Question

I am doing an Automatic Number Plate recognition application. What I am doing is locating rectangular objects on a given vehicle image in order to extract the number plate location. I am doing an opening operation on the image and the image seems to get shifted down. So when I locate the number plate on the original image I could locate only half of the number plate because the final image shifts down due to morphological processing.

Also I noticed that this happens when I use a structuring element of size 4x13

Let me attach the image here. You would see the difference at the top of the image and the image has shifted down a bit. Does anyone know a work around for this issue? I am really stuck with this thing

enter image description here

Était-ce utile?

La solution

You are not stuck with this problem, you just need to implement these morphological operations correctly or use some correct implementation. Compare your results to what I obtain, using the same structuring element, without any kind of effort (i.e., I simply apply an opening and a closing, nothing else, respectively):

enter image description here   enter image description here

You get severe artifacts, which shouldn't appear when the duality of erosion and dilation are correctly taken into account.

Autres conseils

this is possible if the structuring element you are using is not symmetric with respect to the origin. One could try using a 5x13 instead making sure you have a symmetric number of pixels on either axes of symmetry. I hope this helped!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top