separate contours of text for segmentation [closed]
I’ve been working with text recognition in a dataset of images, I want segment the characters of the image using components and finding contours of a threshold image. However, many of the characters are united with each other and others components in the image. Some idea for separate ? Thanks for the help!!!! here some examples, and part of my code:
Mat placa_contornos = processContourns(img_placa_adaptativeTreshold_mean);
vector<vector<Point>> contours_placa;
findContours(placa_contornos,
contours_placa, // a vector of contours
CV_RETR_EXTERNAL, // retrieve the external contours (REcupera contornos externos)
CV_CHAIN_APPROX_NONE); // all pixels of each contours
vector<vector<Point> >::iterator itc = contours_placa.begin();
while (itc != contours_placa.end()) {
//Create bounding rect of object
Rect mr = boundingRect(Mat(*itc));
rectangle(imagem_placa_cor, mr, Scalar(0, 255, 0));
++itc;
}
imshow("placa con rectangles", imagem_placa_cor);