0% found this document useful (0 votes)
9 views7 pages

Chanleangchhung Midterm

Uploaded by

leangchhung43
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views7 pages

Chanleangchhung Midterm

Uploaded by

leangchhung43
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Name : Chan leangchhung

ID : B20190184

Group : Co4E1

Midterm Exam
Answer

I.

II. Y=imresize(X,0.5,’nearest’);
Z=imresize(Y,2.0,’nearest’);
No, X and Z will not necessarily be identical. Because the code resizes the gray-
level image X to half its original size using nearest-neighbor interpolation and
stores the result in Y. Then, Y is resized back to its original size using nearest-
neighbor interpolation and stored in Z.
Therefore, the result of the resizing operation on Y may introduce or remove
some details that were present in the original image X. When Y is resized back to
its original size, these changes may be amplified, resulting in a final image Z that
is not identical to X.
III. Imcomplement (IM) computes the complement of the image IM. IM can be a
binary, intensity, or RGB image. IM2 has the same class and size as IM. In the
complement of a binary image, zeros become ones and ones become zeros;
black and white are reversed.
• imadjust(I) maps the intensity values in grayscale image I to new values
in J. By default, imadjust saturates the bottom 1% and the top 1% of all
pixel values. This operation increases the contrast of the output image J.

• imtransform(A,tform) transforms image A according to the 2-D spatial


transformation defined by tform, and returns the transformed
image, B.If A is a color image, then imtransform applies the same 2-D
transformation to each color channel. Likewise, if A is a volume or image
sequence with three or more dimensions, then imtransform applies the
same 2-D transformation to all 2-D planes along the higher dimensions.
• T = maketform('affine',A) creates a spatial transformation structure T for
an N-dimensional affine transformation specified as matrix A.

• The imhist function creates a histogram plot by defining n equally spaced


bins, each representing a range of data values, and then calculating the
number of pixels within each range. You can use the information in a
histogram to choose an appropriate enhancement operation.
• histeq (I) transforms the grayscale image I so that the histogram of the
output grayscale image J has 64 bins and is approximately flat.

• Adapthisteq (I) enhances the contrast of the grayscale image I by


transforming the values using contrast-limited adaptive histogram
equalization (CLAHE) .
• stretchlim(I) computes the lower and upper limits that can be used for
contrast stretching grayscale or RGB image I. The limits are returned
in lowhigh. By default, the limits specify the bottom 1% and the top 1% of
all pixel values.

IV. M-file script that rotates an image by 60 degrees counterclockwise using the imrotate
function, and then applies the imadjust function to adjust the contrast of the rotated
image.
V.

You might also like