Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please provide the MATLAB code for each part. Image on imgur: https://imgur.com/

ID: 2085895 • Letter: P

Question

Please provide the MATLAB code for each part. Image on imgur: https://imgur.com/a/jTll2

You are given a JPEG image guardians.jpg, and will perform some basic image operations on it (Helpful functions: imread, imshow, figure, title, subplot, double, uint8, size). (a) Read the guardians.jpg image (the Matlab functions that reads JPEG images will decode them first), and separate its three color-components i.e., R (red). G (green), and B (blue). Show the original image and the three color-components in a 2 times 2 grid with labels. (b) Gencrate two images from the original image: one with the R and B components exchanged, and the other with the B and G components exchanged. Show them side-by-side. (c) Generate four images by dividing the original image into four equal images (quarters). Show the four images in a 2 times 2 grid with labels. Only make use of the helpful functions specified above. (d) YUV color space defines brightness in terms of wavelength sensitivity. Convert the original image to YUV format, i.e. generate three images of Y, U and V components separately by using the converting equation from Module-1. Show them side-by-side. The Y component image is actually the luminance image of the original one. Generate another Y component image by linearly inverting the pixel value (i.e., 0 to 255 and 255 to 0) of the original Y component image. Show both the original and inverted Y component images side-by-side with labels (e) Rotate the original color image in a clockwise direction 90 degree, 180 degree, and 270 degree. Do not use the built-in function imrotate. Show the original image and the rotated images in a 2 times 2 grid with labels. Flip the original color image horizontally (i.e., reflect the image along the central vertical axis) and vertically. Do not use the built-in functions fliplr or flipud. Show the original and flipped images in a 1 times 3 grid with labels

Explanation / Answer

X-imread('Hello.jpg');
R = X(:,:,1);
image(R), colormap([[0:1/255:1]', zeros(256,1), zeros(256,1)]), colorbar;
%Green Component
G = X(:,:,2);
figure;
image(G), colormap([zeros(256,1),[0:1/255:1]', zeros(256,1)]), colorbar;
%Blue component
B = X(:,:,3);
figure;
image(B), colormap([zeros(256,1), zeros(256,1), [0:1/255:1]']), colorbar;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote