c++ - OpenCV Alphabets detection and extraction on shape of alphabet after skeletonization -


i want detect , extract alphabets image , create new image contains alphabets.i have applied skeletonization on image after want suggestions.how can detect letters using contours or stroke bases.the images using dvd player pack panel e.g,

dvd panel

the code using skeletonization is

cvtcolor(input, input, cv_bgr2gray); cv::threshold(input, input, 127, 255, cv::thresh_binary); cv::mat skel(input.size(), cv_8uc1, cv::scalar(0)); cv::mat temp; cv::mat eroded;  cv::mat element = cv::getstructuringelement(cv::morph_cross, cv::size(3, 3));  bool done; {     cv::erode(input, eroded, element);     cv::dilate(eroded, temp, element); // temp = open(input)     cv::subtract(input, temp, temp);     cv::bitwise_or(skel, temp, skel);     eroded.copyto(input);      done = (cv::countnonzero(input) == 0); } while (!done); 

the output image after skeletonization,

image after skeletonization

source :http://felix.abecassis.me/2011/09/opencv-morphological-skeleton/

in opencv 3.0 there module text detection , recognition. link. text detection based on extremal regions , maximally stable extremal regions. recognition part done integrating tesseract or letter classifier trained scene text. might tune parameters of algorithm, minimum , maximum size of blob case. example code: link


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -