Question: Write a MATLAB program to complete the following tasks: Read an image into the workspace ( e . g . , using MATLAB function imread
Write a MATLAB program to complete the following tasks:
Read an image into the workspace eg using MATLAB function imread and display
the image eg using MATLAB function imshow The image file name should be
image.png and there is no need to submit the image. points
Display each channel of this image in a separate figure window points
Convert the color image into HSV color space eg using rgbhsv and display each
channel in a separate figure. Note the channels are the HSV channels. points
Enlarge the image two times eg using the function imresize and crop the enlarged
image to its original size eg using the function imcrop points
Convert the color image into grayscale eg using function rgbgray points
Generate the histogram of the grayscale image and display it on screen points
Write a function to achieve histogram matching hint: use MATLAB builtin function
histeq as the starting point points
The function takes two input images either color or grayscale images and uses the
histogram of one image as the reference to modify the histogram of the other image
so that the histograms of both after histogram matching are similar statistically
Hint: check the dimensionality of the input image and include a call to the color
conversion function if the image has three channels at the start of the histogram
matching function so that the function deals with color and grayscale images.
Save the resulting image after the histogram matching into an image file eg using the
function imwrite points
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
