Help to subtract two images with gui
1 view (last 30 days)
Show older comments
Hello. I need help with gui. 1) I have 2 pictures that I want to subtract and do not know how to code. The two images are open in two axes. The subtract will appear in a third axes. 2)have to move from string to double?
thank you very much!
0 Comments
Answers (2)
Image Analyst
on 31 May 2012
String to double??? No. Just cast to floating point (so you won't get clipping at 0) and subtract:
diffImage = double(image1) - double(image2);
Of course you already have image1 and image2 or else you wouldn't have been able to display them in their axes.
0 Comments
Sophie
on 31 May 2012
1 Comment
Image Analyst
on 31 May 2012
img0 is not in scope. You need to make it in scope - make it so that your callback can see it. See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F
Please post comments/follow-up questions as comments to my Answer, not as Answers to your questions.
See Also
Categories
Find more on Interactive Control and Callbacks 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!