MATLAB: Rotate image will remove any other image effects in MATLAB

image processingImage Processing Toolbox

I made a simple image processing project by using MATLAB with GUI, i have a button for uploading an image, another button for making the image black and white and another button to rotate the image. When i press the black and white effect button it works great, but when i press the rotate button the black and white effect will be removed after rotating. How can i fix that ?

Best Answer

Sounds like you are operating on the original image rather than on the gray scale version. How are you getting the image into your callback function for the rotate button? Are you using getimage() to pull it out of the axes? Are you using one of the ways on the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F ????