开发者

how to break the input character into grid format?

开发者 https://www.devze.com 2023-02-19 09:24 出处:网络
Hey, i have been trying to create a program on neural networks using Java lan开发者_运维技巧guage,which will be used for character recognition. we want to use the bitmap image of all 26 characters sto

Hey, i have been trying to create a program on neural networks using Java lan开发者_运维技巧guage,which will be used for character recognition. we want to use the bitmap image of all 26 characters stored earlier. the problem is in breaking the input character into grid format with variable dimension so that we can overlap it on the pre-created bitmap images.

till now, i haven't been able to get any information related this problem.


You might try and render that character to an image for the overlay/grid (pixels). Getting the size of the character should be possible using FontMetrics.


I'm supposing the following hypothesis:

  • You're characters in your target images are of same scale.
  • You don't have any transformations (no slant or non linear deformations).
  • You have relatively good quality images (no clipping, vigneting, etc).

OK to summarize you have a good setup. I'm not sure if you have issues with training phase or detection phase. But to split characters I propose:

  1. Binarize your image (use auto threshold to start, using say Otsu).
  2. Use morphological filtering to split your characters. ex. Erode + Close
  3. Find your blobs and blob centroids
  4. Compute the blobs major and minor axis length. You could also find the left,right,top and bottom limits of each blob by using the blob runs.
  5. Fit a box there.

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消