Segmenting using X-Y co-ordinate axis

1 view (last 30 days)
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 ?

Accepted Answer

Walter Roberson
Walter Roberson on 5 Mar 2011
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 Comments
Walter Roberson
Walter Roberson on 14 Mar 2011
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 on 15 Mar 2011
Wow .. I hadn't thought of that. Thanks for the heads up !

Sign in to comment.

More Answers (1)

Brett Shoelson
Brett Shoelson on 23 Feb 2011
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 Comments
Siddharth Mallya
Siddharth Mallya on 24 Feb 2011
@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 on 5 Mar 2011
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

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!