MATLAB: How to merge two segmented parts of same Image??

Image Processing Toolboximage segmentationroi

I segmented ROI part of an image and applied some operation on ROI and Non-ROI separately. Now, after that, I want to merge these parts back to show the reconstructed image. How can I do this? Please provide a Matlab function to solve this problem. Thanks in advance…

Best Answer

Just OR them together:
finalBinaryImage = binaryImage1 | binaryImage2;