View
217
Download
0
Category
Preview:
Citation preview
8/8/2019 A02_Mywork
http://slidepdf.com/reader/full/a02mywork 1/5
A02: Point Operations, Filtering, and Frequency Domain
September 18, 2010
Assignment Brief
Student name and no.
Course EN4551: Fundamentals of Machine Vision & Image Processing
Assessment A02: Point Operations, Filtering, and Frequency Domain
Weight This amounts to 10% of the module grade. Late penalty is 33% per week.Outcome The student must experiment with simple image processing algorithms
related to point operations, filtering and frequency domain.
Date handed out September 21, 2010 Date due October 19, 2010
Submission date
Student’s Declaration
I confirm that the work submitted for this assignment is my own.
Student’s signature Date
Student’s comments
Feedback
Grade Lecturer’s signature Date
University of Moratuwa, Sri Lanka Page 1 of 2 Ranga Rodrigo
T.N.Chandrapala 070059B
26-10-2010
Ref: http://www.mathworks.com/matlabcentral/
fileexchange/27023-log-polar-image-sampling
26-10-2010
8/8/2019 A02_Mywork
http://slidepdf.com/reader/full/a02mywork 2/5
A02.1
The object of interest was separated from the
image and its histogram was calculated. As a
similar sized object was to be located in a given
picture, the total image was scanned panningfrom one end to the other selecting similar
sized pixel blocks. Histograms of these image
blocks were calculated, and correlation
between the histogram of the original object
and these subsequent histograms were
calculated. The highest point of correlation was
taken as the point of detection.
Figure 1: Object identification using histogram
The program is able to draw a border aroundthe detected region if the correlation is high
enough to be an actual match.
A02.2
Spatial filtering was carried out as a convolution
of the image and the filter.
Gaussian Filter
The 2-D Gaussian function was used to create a
Gaussian filter. An image was added with noise
to create a noisy image, and it was convolved
with the filter.
8/8/2019 A02_Mywork
http://slidepdf.com/reader/full/a02mywork 3/5
Figure 2: Gaussian Filtering
The mean absolute difference (MAD) was
calculations are as follows.
• Original and Image with noise: 14.41
• Original and filtered image: 8.21
Average Filter
A simple 3x3 averaging kernel was convolvedwith the image with noise.
Figure 3: Mean Filtering
MAD calculations are as follows.
• Original and Image with noise: 14.41
• Original and filtered image: 8.27
Median Filter
The median filter is very effective against ‘salt
and pepper’ noise.
Figure 4: Median Filtering
The mean absolute difference (MAD) was
calculations are as follows.
• Original and Image with noise: 11.3• Original and filtered image: 8.4
Un-sharp filter
The theory behind this filter is the creation of a
sharpening mask by taking the difference
between an image that need to be sharpened
and its blurred version. Then the mask is added
to the image itself to create the sharp image.
‘img1’ has been created by convolving it with a
Gaussian kernel. It is referred as the blurred
image. Then it is recovered using the algorithm.
Figure 5: Sharpening image
8/8/2019 A02_Mywork
http://slidepdf.com/reader/full/a02mywork 4/5
Sharpening using Laplace filter
A Blurred image is sharpened using a Laplace
mask. By convolving the Laplace filter with the
blurred image the edged become highlighted.
Then this mask is added to the blurred image to
get a sharper result.
Figure 6: Sharpening using Laplasian
This method seems to create sharper images
than unsharp masking.
A02.3
The image and its translated version weretransformed into the Fourier domain. The cross
power spectrum R was calculated. And the
inverse Fourier transformation was taken. The
peak value corresponds to the translation.
Figure 7: Original and translated images by (20,20)
Results:
The peak appeared in the point corresponding
to (20,20) as expected in the phase correlation
plot.
A02.4
The methodology in the paper “An FFT-Based
Technique for Translation, Rotation, and Scale-
Invariant Image Registration” was
implemented.
Figure 8: Origanal Vs Translated, rotated and scaled image
8/8/2019 A02_Mywork
http://slidepdf.com/reader/full/a02mywork 5/5
An initial image was loaded and it was
subjected to translation, rotation and scaling.
Then the FFT of the two images was taken.
The highpass filter was designed according to
the specifications of the paper. After passing
through the highpass module, log-polar
transformation was done. This was done usinglogsample.m. The inputs to this function are the
image, the maximum and minimum of the
radius, the starting coordinates, the number of
samples in the angle and radius. The natural
logarithm has been used.
After considering the two results as translated
images themselves, a phase correlation was
done to get the translations
Figure 9: Rotation and Scaling
The translation in the X axis gives the scalingand Y axis gives the rotation. To obtain the
actual values, the two translation values were
scaled as given in the code. (Theta and sc
values).
Accuracy:
Actual Result
Rotation 20 deg 19.6 deg
Scaling 2 1.99
Rotation 30 deg 29.6 deg
Scaling 1.25 1.23After obtaining the Rotations and Scaling
factors the effects were reversed to crate same
sized images with same orientation. But the
translation remained the same.
The two images after re-scaling and reverse
rotation was converted to the Fourier domain
and a phase correlation was carried out as
before to get the translation. The results are as
follows. (The translation in the given scenario is
zero when Tx=Ty=88)
Actual Result
X=18; Y=8 X=19; Y=9X=15; Y=15 X=16; Y=16
Figure 10: Translation
Recommended