Having issues with loops inside function.

1 view (last 30 days)
I want to create a function for finding the bounding box of images(rgb). The code works fine when I have it as a part of the main script. But when I implement it as a function it returns the value which I initialized with and not the values computed after the loops are executed. Which is why I have dummy variables and then assigning the return variables with their values. But this doesnt help me either.
  5 Comments
Balakrishnan Rajan
Balakrishnan Rajan on 5 Apr 2015
Sorry, the problem in this case was just that the color isnt exactly a particular value due to a diffuse component of the shade. I understood this only after I saw the image itself with imshow command. Thanks for the help anyways.
PS: I am using the find now. Thanks a lot.
Balakrishnan Rajan
Balakrishnan Rajan on 5 Apr 2015
I would like to accept your answer but I cant seem to do it. I really appreciate the help. thank you.

Sign in to comment.

Answers (0)

Categories

Find more on Loops and Conditional Statements 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!