How can i hold the current image or axis with it zoom level and apply other functions like imfill without resetting the axis to it default state?
Show older comments
i have a bw image which i want to zooom in and select some point with the mouse as location for the imfill function, after zooming in and running imfill on the zoomed image, the axis get reset and makes it hard to select the right point i want with the mouse
please help. thanx.y
3 Comments
Sean de Wolski
on 3 Jan 2013
I'm not clear on your order of operations here, could you provide a small snippet of code and explanation:
I = imread('coins.png');
Ibw = I>100;
imfill(Ibw)
Doesn't allow me to zoom, what am I doing wrong?
Image Analyst
on 3 Jan 2013
He has it zoomed and scrolled (probably interactively by the user) to some location the user wants to inspect closely. Then the user clicks some button to do a fill process. Then he calls imshow() to put that filled image back into the axes. Calling imshow() will reinitialize the zooming to "fit". He wants it to be zoomed and scrolled to the exact location that it was at before the fill process was begun, so he can see that how that tiny blob he was looking at got filled in.
Sean de Wolski
on 3 Jan 2013
I'm going to post this last comment as an answer too since I think it is essentially what the OP wants.
Accepted Answer
More Answers (3)
Image Analyst
on 3 Jan 2013
0 votes
Have you tried writing to the cdata property of the axes instead of calling imshow()?
1 Comment
Abdul Razak Alhassan
on 3 Jan 2013
Walter Roberson
on 3 Jan 2013
0 votes
imfill() does not operate on the image currently on the screen: imfill() displays the image you pass in the first argument and works on that.
3 Comments
Abdul Razak Alhassan
on 3 Jan 2013
Walter Roberson
on 3 Jan 2013
?? imfill does not return an image axis.
Have you considered selecting points with ginput() or the like, and then calling imfill() in non-interactive mode?
Abdul Razak Alhassan
on 4 Jan 2013
Abdul Razak Alhassan
on 4 Jan 2013
0 votes
Categories
Find more on Data Exploration 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!