Documente Academic
Documente Profesional
Documente Cultură
RGB images
1. use imread to read in the image 'coloredChips.png' and store it in a variable called
coloredChipsImage.
rgb = imread('coloredChips.png');
'04-May-2012 15:35:42'
5. Use figure, imshow to display the image, with the title 'coloredChips.png'
Figure, imshow(rgb)
6. Use File->Copy to copy the image and paste it into the space below
Red Slice
7. Use array indexing to obtain the red slice (image (:,:,1)) of the RGB image store it in a variable called
coloredChipsRedSlice
8. Use figure, imshow to display the image with the title 'coloredChips.png Red Slice'
9. Use File->Copy to copy the image and paste it into the space below
10. Provide a description of the image in comparison to the original image: coloredChipsImage.
Green Slice
11. Use array indexing to obtain the Green slice (image (:,:,2)) of the RGB image store it in a variable
called coloredChipsGreenSlice
12. Use figure, imshow to display the image with the title 'coloredChips.png Green Slice'
13. Use File->Copy to copy the image and paste it into the space below
14. Provide a description of the image in comparison to the original image: coloredChipsImage.
Blue Slice
15. Use array indexing to obtain the Blue slice (image (:,:,3)) of the RGB image store it in a variable
called coloredChipsBlueSlice
16. Use figure, imshow to display the image with the title 'coloredChips.png Blue Slice'
17. Use File->Copy to copy the image and paste it into the space below
18. Provide a description of the image in comparison to the original image: coloredChipsImage.
Gray Slice
19. Use rgb2gray function to obtain a gray-scale (black and white) version of the RGB image store it in a
variable called coloredChipsGrayScale
20. Use figure, imshow to display the image with the title 'coloredChips.png Gray Scale'
21. Use File->Copy to copy the image and paste it into the space below
22. Provide a description of the image in comparison to the original image: coloredChipsImage.