MATLAB: How to extract the pixels of segmented image that has different label from the ground truth image

digital image processingImage Processing Toolboximage segmentation

I have segmented and ground truth image.
Segmented images obtained using FCM. while the ground truth image was made with manually segmentation using image processing application by people with competency in this field.
This image is a black and white images and only had 2 label (0 and 1). I want to compare both images and extracting the pixels of the segmented image that has a different label from the ground truth. How to do it?
Thanks

Best Answer

You can use xor()
differentPixels = xor(segmentedImage, groundTruthImage);
Related Question