error in display and write an image file...
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Elysi Cochin
el 21 de Mzo. de 2015
Comentada: Elysi Cochin
el 31 de Mzo. de 2015
ISC(:,:,1) = ISCR(:,:) .* 255;
ISC(:,:,2) = ISCG(:,:) .* 255;
ISC(:,:,3) = ISCB(:,:) .* 255;
ISC = uint8(ISC);
figure(1),
subplot(2,2,1), imshow(ISCR,[]);
subplot(2,2,2), imshow(ISCG,[]);
subplot(2,2,3), imshow(ISCB,[]);
subplot(2,2,4), imshow(ISC);
I wanted to get a RGB image from ISCR, ISCG and ISCB… When I display the ISCR, ISCG and ISCB channels using figure, imshow(ISCR,[]); but if i give only figure, imshow(ISCR,[]); only full white figure file comes...
I wanted to display the final combined RGB image, i did the above code but I don’t view anything just white figure file… What can be the problem… Please rectify it for me…
1 comentario
Geoff Hayes
el 21 de Mzo. de 2015
Elysi - what is the minimum and maximum value for each of ISCR, ISCG, and ISCB? Which of the four subplots show the correct image, or do all of them just show a white image?
Respuesta aceptada
Image Analyst
el 25 de Mzo. de 2015
That's because ISC and ISCR are double, not uint8 . It expects doubles to be in the range 0-1. If you have values above that, like 200 or 255, it will display them as white. If you use [], then it scales the array to 0-1 and then it will display fine because it's in the expected range.
7 comentarios
Image Analyst
el 30 de Mzo. de 2015
But you still have the matrix inverse function inv() in there??? That's weird.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!