title: How can I recognize Japanese Characters using OpenCV, C++?
body: <p>I have a program that extracts Japanese Characters from Manga pages and I want to know what characters they are using character recognition.</p>
  
  <p>I have been playing with Template Matching and trying to implement a KNearest from scratch </p>
  
  <p>How can I recognize the extracted characters? </p>
  
  <p>I can't find any good example on C++ about KNearest. I also would want to avoid Tesseract if possible.</p>
  
  <p>I have tried template matching on the character detection image and it detected properly but I need it to detect the extracted character. It can't detect it accurately while playing with the code from <a href="http://docs.opencv.org/doc/tutorials/imgproc/histograms/template_matching/template_matching.html" rel="nofollow noreferrer">http://docs.opencv.org/doc/tutorials/imgproc/histograms/template_matching/template_matching.html</a></p>
  
  <p>Example of Character Detection:</p>
  
  <p><img src="https://i.stack.imgur.com/t3Fhd.jpg" alt="Example of Character Detection"></p>
  
  <p>Example of Extracted Characters:</p>
  
  <p><img src="https://i.stack.imgur.com/X8nd0.jpg" alt="Example of Extracted Character"><img src="https://i.stack.imgur.com/G2Wrl.jpg" alt="enter image description here"></p>
  
  <p>Example of a template or a training data:</p>
  
  <p><img src="https://i.stack.imgur.com/usLAk.jpg" alt="enter image description here"><img src="https://i.stack.imgur.com/qgz8T.jpg" alt="enter image description here"></p>