Complete the code to convert an RGB image to grayscale using built-in function.
grayImage = rgb2[1](rgbImage);The function rgb2gray converts an RGB image to grayscale.
Complete the code to convert an RGB image to HSV color space.
hsvImage = rgb2[1](rgbImage);The function rgb2hsv converts an RGB image to HSV color space.
Fix the error in the code to convert an RGB image to LAB color space.
labImage = rgb2[1](rgbImage);The correct function to convert RGB to LAB is rgb2lab.
Fill both blanks to convert an RGB image to XYZ color space and then back to RGB.
xyzImage = rgb2[1](rgbImage); rgbImage2 = [2]2rgb(xyzImage);
Use rgb2xyz to convert RGB to XYZ, and xyz2rgb to convert back.
Fill all three blanks to create a dictionary mapping color spaces to their conversion functions from RGB.
colorConversions = struct([1], @rgb2[2], [3], @rgb2hsv);
The struct keys are strings like 'gray' and 'hsv'. The function names are rgb2gray and rgb2hsv.
