Sie sind auf Seite 1von 14

Image Processing Project

Name: Er Luo , E-mail: ofk09elo@student.hig.se; Name: Sheng Li, E-mail: tfk10hii@student.hig.se; Name: Kehui Ma, E-mail: ofk09kma@student.hig.se;

General introduction:
Project Description:
In this project, we need to store the four eyes that given in the project into the database, and then get a new image and compare this new input image with the four database images, if the eyes in these images match, then the people is allowed to come into the building/office, otherwise, he/she is not allowed to go into the building/office.

General solution:
We have chosen the first part of the project and tried our best to solve this project. In this project, we started to read in the four given eye images as the reference images and then read in the fifth input image used to determine whether the person is allowed to come into the office. We used Hough Transformation to find the circles in this picture as the eyes are circles shown in the pictures. After that, we used Gaussian Filter to remove noise in these pictures and get the positions of the maximum and minimum columns and rows of the five pictures. Finally, we compare the fifth images positions with the former four reference images, if the position difference between any of the four reference images positions is 0 then we can allow the people come in, otherwise, he/she cant come in.

Code Analysis:
This project includes three files and all these files together the following things: 1.) Read in the five images and transform them into binary images as the Hough Transformation will only accept to use binary images;

2.) Set the radius of the circles(eyes), as we discovered, the radius of the eyes are all around 50;

3.) Use Hough circle function to find the circles(eyes) in the pictures;

4.) Filter all of the five images by using Gaussian Filter, this filter code is borrowed from the lecture2;

5.) Find the largest element in the matrix and adjust the elements in the matrix by dividing the
3

largest element in the matrix;

6.) Use the region growing function to detect the edge of the five pre-processed pictures, as we want to start from the first pixel, we used (1, 1) as the seed points and then generally formed the whole edged pictures;

7.) After that, we found the white positions of the edged pictures and put them into matrix, then Get the maximum and minimum elements of the columns and rows matrix of the five images from the new formed matrix;

8.) Compare each maximum and minimum elements of the columns and rows matrix of the fifth images with all the other four maximum and minimum elements of the columns and rows matrix, if any of these elements are matched, then display Eye matches, come in please~, otherwise, display Eye does not match, do not allow to come in!

Image Analysis:
a.) This is the comparison part of the project:

Figure0: The 5 input images

Figure1: The four database eyes

Figure2: The test image

Figure3: The testing result

As we see above, for the database images, the eyes were left in the images, but for the input image, as the format of it is jpg, we cant see the eyes and the image seems to be in a mass, that might means this input image is not quite good in comparison. Whats more, for the database images, the right sides of the faces were all left, this is not so good in this project.

b.) These pictures show the part of how eye1 are edited in our project

Figure4: The original image of eye1

Figure5: The eye1 picture after the houghcircle function

10

Figure6: The eye1 after Gaussian Filter

11

Figure7: The eye1 after adjust

12

Figure8: The eye1 after regiongrowing function

As we can see, the change from Figure5 to Figure7 is not so visible. But from Figure4 to Figure5, we can see that the circles cover the eyes part and in Figure8, the hole of eye was detected. However, some other parts of the face have been detected and left, too.

Bug and Improvement:


Bug:
In this project, the running time is quite long, so there might be some codes that occupied a long
13

time; As we can see from the Figure1, the right faces of the persons are left, that is not quite good as this might disturb the comparison result of the images. And for jpg file, it can hardly find the eye in the photos;

Improvement:
For our project, the eyes matches in a very narrow space, only the exactly same pictures of the four images can be allowed to come into the office. Some improvement might need so that we can adjust the eyes into the same size and only eyes(circles) can be left in the pictures, then compare the radius of the eyes, which might improve the usefulness of this project.

Reference:
Houghcircle function: http://www.mathworks.com/matlabcentral/fileexchange/9833-hough-transform-for-circle-detect ion/content/houghcircle.m;

Regiongrowing function: http://www.mathworks.com/matlabcentral/fileexchange/19084-region-growing/content/regiong rowing.m;

14

Das könnte Ihnen auch gefallen