software engineering project fruit recognition zheng liu

7
Software Engineering Project Fruit Recognition Zheng Liu

Upload: asher-lindsey

Post on 24-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Engineering Project Fruit Recognition Zheng Liu

Software Engineering ProjectFruit Recognition

Zheng Liu

Page 2: Software Engineering Project Fruit Recognition Zheng Liu

Block Diagram

Page 3: Software Engineering Project Fruit Recognition Zheng Liu

Preprocess

• Change to gray image.– cvCvtColor(srcImg,grayImg,CV_BGR2GRAY);

• Remove background:– cvAbsDiff(grayImg,bgdImg,difImg);

• Resize to a 64*64 matrix.

Background image

Page 4: Software Engineering Project Fruit Recognition Zheng Liu

Character extraction

• Gabor filter– – I: image; : Gabor core function.

• PCA dimensionality reduction.

, ,( ) ( )* ( )G z I z z

, ( )z

1

( )( )M

T Ti i

i

C X X AA

1 2[ , ,... ]MA X X X

Page 5: Software Engineering Project Fruit Recognition Zheng Liu

Sort

• K-nearest neighbor algorithm:– Calculate distance between the vector of

recognizing image and database vector.– Compare the distance.– Assign to a kind of fruits.

Page 6: Software Engineering Project Fruit Recognition Zheng Liu

SIS Test bed

• Input: a 3*3 matrix.• Imitate the process of the character extraction

SIS test bed output result

Page 7: Software Engineering Project Fruit Recognition Zheng Liu

Bug• A pure white background is needed.– Shade and other noise may be recognized as

eggplant, because of deep color.• Fruit has to be in a particular pose.