sub2ind out of range subscript error
1 view (last 30 days)
Show older comments
Hi,
I am trying to detect the text in an image using code provided for Automatically Detect and Recognize Text in Natural Images on http://www.mathworks.in/help/vision/examples/automatically-detect-and-recognize-text-in-natural-images.html#zmw57dd0e728.
Getting an error on
ind = sub2ind(size(mserMask), mserRegionsPixels(:,2), mserRegionsPixels(:,1));
Error message is
Attempted to access mserRegionsPixels(:,2); index out of bounds because
size(mserRegionsPixels)=[0,0].
I am using the same image handicapsign.jpg to test this code.
Your prompt response will be highly appreciated.
Thanks
0 Comments
Answers (1)
Image Analyst
on 6 Apr 2014
I don't have that toolbox, but backtrack to find out why mserRegionsPixels does not have any coordinates in it. Chances are you replaced the demo image with your image, or you changed a threshold, or something like that.
6 Comments
Walter Roberson
on 8 Apr 2014
R2013a is not the current version; R2014a is the current version. The demo might not be usable for you as it might rely on facilities found only in versions later than what you have.
See Also
Categories
Find more on Computer Vision Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!