MATLAB: How to plotting the selected images

question

hai.
i have question on how to plotting the selected images from folder into axes when push button has been click. And how to update the selected image in axes1 into second push button(analysis operation in second push button) ?

Best Answer

imread() each selected image. image() the image, specifying the axes handle as the first parameter of the image() call to be sure that it is drawn in to the proper axes. If you want the images to show up beside each other, use the x and y parameters of the image call to specify the data coordinates of the centers of the lower-left and upper-right pixels.
I am unclear about what you are asking in your second question, but I suspect that the answer is "You can set() the selected image as a property of the second push button [e.g., UserData] and have the button's callback check that property to determine what it is working on; or you can have the second button's callback check the status of the original object to determine what is selected and then act appropriately."