您的位置:首页 > 其它

Find person you are mostly like based on HMM image recognition -- only for fun

2011-09-18 22:59 513 查看
At last, my experiment program for fun can run without crash. 

These days, I am thinking to use HMM base image recognition to develop a tool which is used to seek a candidate's photo which best matches one selected target image, i.e. to see who matches the selected cartoon or celebrity's photo.  Below is a snapshot
of this program so far.  It is based on Open Cv 2.0.

 



 

In order to find amongst e.g. 20 input candidates' photos which matches the selected target one, at the begining, I thought using each candidate's photo to appy to this selected person's photo's HMM model calculating possibilities, but it seemed the images
with less contrastness always had higher possibilities. An extreme example is, a pure black or pure white image usually has the highest calculated possibility value, no matter which target photo it is matching against.

 

So, I changed the way of seeking later. First for each candidate's photo its most matched target is found, meaning that each candicate belonged to at most one target group.  Program will only select the highest value amongst those which belongs to this target
group.

 

It is possible that there is no candidate found for one selected target since the selected target is not mostly matched by any candidate photo.

 

 

The following content is extracted from readme of this program:

 

============================== 

This program is for experiencing HMM based image recognition,

based on OpenCv 2.0 library.

It is only for fun, to find which photo mostly matches the

target image, e.g. to find which person's photo is mostly like

the selected cartoon figure or a celebrity's photo.

Following are steps how this program works:

1) Go to menu "File" -> "Open", open a *.jpg or *.bmp picture which

is then shown in the right window. Then use the left button of

your mouse to select the area on this picture. Next, go to menu

"File" -> "Add Object", type in the name of this photo, then its

selected part appears in the left window. You can then repeat

this step 1) to add more photos for the same target person and

add photos for other persons.

2) After adding several cartoon or celebritie's images, go to menu "File"

-> "Train" to train these photos, namely, to generate HMM parameters

for each person in the left window. The HMM parameters for each person are

generated according to their own photos and are used later for measuring

which image matches them best.

3) Now, select a person in the left window, then click menu

"Seek The Lucky" to start finding a image which most matches

the selected one in the left window.  In popped up dialog select

the candidates which are to be matched against the selected target

and amongst them the best one will be finally found and its name

is shown in a popped up dialog.

 

Note: All information could be saved into disk automatically. When you

open this program next time, go to meanu "File" -> "Open", select

"Celebrities File(*.txt)" and open the file named "untitled_base.txt"

which should be located at the same directory as your first input

image.

Due to time limitation, file name always be "untitled_base.txt", and

there is no other choice about which directory it can be saved at.

Last, it is claimed to only for fun, study and experiencing HMM image

recognition.

 

 

==========================
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐