how Can i use in one image only for this code? because it is used in two images
Show older comments
global image1,image2
im1cand2=bitand(image1,image2);
axes(handles.axes3); imshow(im1cand2);
global image1,image2
im1cxor2=bitxor(image1,image2);
axes(handles.axes3); imshow(im1cxor2);
global image1,image2
im1cor2=bitor(image1,image2);
axes(handles.axes3); imshow(im1cor2);
have button.. first select image 1 second selecte image 2 and then button for im1 cand 2 im1 cxor im2 im1 cor im2.. i dont want to make the act between 2 image but one..
7 Comments
Walter Roberson
on 12 May 2015
I had to make a guess about the formatting of your actual code. Please check to see if I formatted it correctly.
Walter Roberson
on 12 May 2015
I do not understand what you are asking about using only one image? Are you trying to plot the three results to the same axes? Are you trying to reduce image1 and image2 to a single variable instead of two?
pasxalis papakalas
on 12 May 2015
Edited: Walter Roberson
on 12 May 2015
Walter Roberson
on 12 May 2015
You want to and the image with itself? That would leave the identical image. xor an image with itself would always leave 0's. or an image with itself would always leave the identical image.
pasxalis papakalas
on 12 May 2015
Walter Roberson
on 12 May 2015
Fine.
global image1
im1cand1=bitand(image1,image1);
axes(handles.axes3); imshow(im1cand1);
global image1
im1cxor1=bitxor(image1,image1);
axes(handles.axes3); imshow(im1cxor1);
global image1
im1cor1=bitor(image1,image1);
axes(handles.axes3); imshow(im1cor1);
If you need to see the result for yourself, go ahead. But you will see that the cand and cor always leave the image unchanged and the cxor always leaves the image black.
pasxalis papakalas
on 12 May 2015
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type 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!