Segmenting using X-Y co-ordinate axis

3 次查看(过去 30 天)
Hey guys !
I want to know how to segment an image using the X-Y co-ordinate axis. I am trying to make an Optical Braille Recognition software and I want to use X-Y frame to segment individual Braille characters. I know the exact dimensions of a standard Braille character on the co-ordinate frame. How do I go about it ?

采纳的回答

Walter Roberson
Walter Roberson 2011-3-5
If you know the exact dimensions on a coordinate frame, then you would not do "segmentation", just object location: once you know the object location, you would just snip out the relevant portion of the array (or label that portion of the array all with the same label.)
How regular is the placement of the braille characters? For example, if you know the coordinates of one character then by knowing the standard dimensions would you then be able to trivially calculate the location of the next character on the row? Are the columns also regularly spaced?
This also raises to me the possibility that even if the grid of braille characters is exactly predictable, that the image might be titled with respect to the grid. Is that an aspect that you need to be concerned about? If so then you would probably need to start with some code to determine the image angle and then rotate the image back in to alignment using imrotate.
  5 个评论
Walter Roberson
Walter Roberson 2011-3-14
Perhaps the position is close enough to being the same with laser printers, but with dot matrix printers the feed mechanisms were seldom reliable, so the position you determined on one A4 page would only be a close approximation but not exact. Best to take a couple of steps to re-register the first cell.
Siddharth Mallya
Siddharth Mallya 2011-3-15
Wow .. I hadn't thought of that. Thanks for the heads up !

请先登录,再进行评论。

更多回答(1 个)

Brett Shoelson
Brett Shoelson 2011-2-23
XY coordinates are non-standard (in MATLAB) for displaying images. But non-standard doesn't mean "not doable." Using the AXIS XY command will set the coordinate system origin to be in the lower left corner. The x-axis will be horizontal with values increasing from left to right, and the y-axis will be vertical with values increasing from bottom to top. However, this will also flip your image, so you may have to account for that:
img = imread('cameraman.tif');
img = flipud(img);
imshow(img)
axis xy
impixelinfo
Cheers,
Brett
  2 个评论
Siddharth Mallya
Siddharth Mallya 2011-2-24
@Brett,
Thank you for your quick reply. If this method is "non-standard", what is considered as the standard for my kind of problem statement ? I am a complete newbie to MATLAB and would love all the help I could get.
Sid
Brett Shoelson
Brett Shoelson 2011-3-5
Welcome to MATLAB, Sid! Take a look at the different options for AXIS in our doc. Then display an image and see what happens when you apply those options.
Cheers,
Brett

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by