0% found this document useful (0 votes)
25 views2 pages

Industrial Vision Lab 2: Digital Image Formation

This document outlines exercises for an industrial vision lab on digital image formation. The exercises involve generating and manipulating binary, grayscale, and RGB images of various sizes in Matlab. This includes generating histograms of images without built-in functions, resizing images, and implementing a function to downsample images by taking the maximum pixel value in neighborhoods.
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)
25 views2 pages

Industrial Vision Lab 2: Digital Image Formation

This document outlines exercises for an industrial vision lab on digital image formation. The exercises involve generating and manipulating binary, grayscale, and RGB images of various sizes in Matlab. This includes generating histograms of images without built-in functions, resizing images, and implementing a function to downsample images by taking the maximum pixel value in neighborhoods.
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/ 2

22437 - Industrial Vision

Lab 2: Digital Image Formation


Emilio Garca Fidalgo, Yolanda Gonzlez Cid
Universitat de les Illes Balears

1. Generate the following binary images of size 256256 and display the results:

Note: The images must be defined using the logical data type.
2. Generate the following gray scale images of size 256256 and display the results:

Note: The images must be defined using the uint8 data type.
3. Generate the following RGB images of size 256256 and display the results:

Note: The images must be defined using the uint8 data type.
4. Write a function in Matlab to generate the histogram of a gray scale image without using Matlab functions.
The signature of the function must be:
f u n c t i o n h = h i s t o g r a m ( image )

where h is a column vector with 256 elements of type double and image is the input gray scale image. Each
component of h indicates the number of pixels of the correspondent intensity present in the image.

1
5. Using the function implemented in the previous point, compute the histogram of the images of the exercise
2, and plot the results. Are the histograms the same?
6. Resize the images generated in exercise 2 to 512512, 128128 and 6464 using the correspondent Matlab
function. Plot each resulting image and its correspondent histogram in figures. Given these histograms, how
can we say about the resizing process in Matlab?

7. Write a function in Matlab to reduce images of size 256 256 to 128 128. The intensity value in the output
image should be the maximum intensity in a neighborhood of the input image according to the following
pattern:

The signature of the function must be:


f u n c t i o n himage = h a l f s i z e ( image )

where image is the input image (256 256) and himage is the output image (128128).

8. Use the function implemented in the previous point to reduce images generated in exercise 2 and display the
results.

You might also like