how can i use opencv to compare charaters in a picture and characters in a database [closed]
My project aims to extract letters from a picture taken with the mobile camera and compare them with letters in the database(pictures of letters ) and it should know each letter .For example if i tell the program to color the letter N with red it should know all the letters N present in the picture and color them (In french we call that "système d'apprentissage"
"système d'apprentissage" == "machine learning" ;)
Is there examples that i can try to understand how to use machine learning in my case ?
here is one in c++
(we'll have to adapt that somehow to your android situation, and probably, you should use an SVM instead KNearest)
I use opencv 3.1.0 for android
I create a database that contains for each letter its equivalents in latin language
I seperate my characters in my image by puting each letter in a rectangle (I use theses instructions:
Rect rect = Imgproc.boundingRect(points);
Imgproc.rectangle(gray, new Point(rect.x,rect.y), new Point(rect.x+rect.width,rect.y+rect.height), new Scalar(255,0,0),2);
}
My project aims to capture an image (contains latin text) with the android camera ,treat the image (extract letters) and then compare this letters with letters in database to translate the text from latin to english
oh, i found the knearest sample in java
how can i implement this example .i just copied the code into my activity (error in this instruction " Mat num = digits.submat(new Rect(c20,r20,20,20));" submat isn't known ).What are the steps that i should follow to try this example
it does not find submat ?
yes ,i use opencv 3.1.0 !!
i am sorry i resolve it because i import android.graphics.Rect; instead of org.opencv.core.Rect;