Hi there! I'm facing a problem when saving the output image that I need. I've successfully saved the image into the file with my desired location. However, the image saved is not the same as shown while running in the MATLAB. The following is my coding.
"imshow(blackMaskedOriImage,[])", when showing the image in MATLAB, I need to include '[]' to show the image that I've needed. If '[]' is not included, there's the only binary image that I'll get.
Therefore, I supposed to have this kind of image saved as shown in A. Instead I get the image as shown in B that saved in my folder.
Very much appreciate if there's a solution for this. Thank you.
A
B
% MAsk the original image and display it.
blackMaskedOriImage =bw.*double(Ia);figureimshow(blackMaskedOriImage,[]);%',[]'to display the crop area with dark background
blackMaskedOriImage(~mask) = NaN;axis on;title('Masked Outside Region');path=strcat('C:\Users\Chuah\Desktop\FYP\Aperio_ImageScope\histopathologicalimage\B1_score2\mask+ori(MATLAB)\',srcFile(j).name);imwrite(bw.*double(I),path);
Best Answer