I have to deal with the problem of segmentation of the following license plate images, whereas with threshold images after the images, the characters are split into more than 1 character. Therefore, I get the wrong recognition result. I applied the morphological operation of closing after the image threshold, even after that I could not separate the characters correctly.




The code used to segment the above images is below
#include <iostream> #include<cv.h> #include<highgui.h> using namespace std; using namespace cv; int main(int argc, char *argv[]) { IplImage *img1 = cvLoadImage(argv[1] , 0); IplImage *img2 = cvCloneImage(img1); cvNamedWindow("Orig"); cvShowImage("Orig",img1); cvWaitKey(0); int wind = img1->height; if (wind % 2 == 0) wind += 1; cvAdaptiveThreshold(img1, img1, 255, CV_ADAPTIVE_THRESH_GAUSSIAN_C, CV_THRESH_BINARY_INV, wind); IplImage* temp = cvCloneImage(img1); cvNamedWindow("Thre"); cvShowImage("Thre",img1); cvWaitKey(0); IplConvKernel* kernal = cvCreateStructuringElementEx(3, 3, 1, 1, CV_SHAPE_RECT,NULL); cvMorphologyEx(img1, img1, temp, kernal, CV_MOP_CLOSE, 1); cvNamedWindow("close"); cvShowImage("close",img1); cvWaitKey(0); }
The output images below.



Can someone provide a good method for segmenting characters from these images ... ??
source share