How can I solve this problem?
Show older comments
Here I attached the warning problem of error. How can I solve this? My source code has been attached here.

2 Comments
dpb
on 13 Jul 2019
Use the debugger to step through and see where your logic error is in trying to access too many elements.
One possibility you may not have coded for is that your selection algorithm returned nothing owing to the input image not being able to be processed successfully with whatever algorithm you're using so that even if "Nlargest" is 1 it still fails.
A test for isempty() before you make the attempt would catch that problem.
Syed Zenith Rhyhan
on 14 Jul 2019
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing and Computer Vision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!