开发者

Feature/blob correlation and histogram analysis

开发者 https://www.devze.com 2023-02-18 10:06 出处:网络
I\'m working on a sketch search engine that correlates whatever someone\'s sketching with a picture in the database (the db is just about 40 pictures now). I\'m doing this mostly for fun so I\'m not t

I'm working on a sketch search engine that correlates whatever someone's sketching with a picture in the database (the db is just about 40 pictures now). I'm doing this mostly for fun so I'm not that well-versed in computer imaging techniques.

First of all, are there any rules of thumb on how one should create histograms (bin sizes, ranges, etc)? I'm using some histogram code found at http://www.scribd.com/doc/6194304/Histograms (but ported to JavaCV). Sometimes I get good results, sometimes I get bad results, most of the time I get "meh" results. I've been experimenting a TON with bin sizes and ranges and I'm wondering if comparing higher dimensional histograms may be the answer here.

Second of all, it seems that black makes a very strong presence in my current histogram setup (开发者_高级运维even a black dot shifts the entire result set). Should this be expected? Or did I screw something up? Example:

Feature/blob correlation and histogram analysis

And after the dot:

Feature/blob correlation and histogram analysis

Note how I'm already getting pictures of "earthrise" as "close" matches.

I'm also wondering what methods I should use for blob or feature analysis. I think that stuff like SURF may be overkill because I only want to broadly compare blobs, not accurately map templates. Is there any way I can compare the edges after being passed through a Canny filter? (Low complexity if possible):

Feature/blob correlation and histogram analysis

For example, here, I want the two smiley faces to be at the top because the needle smiley "blob" is more closely related to the smily face shape than to a bunch of passion fruit or a galaxy.

Phew long question. If you want to try out the engine for yourself, go to http://skrch.dvt.name/ (shameless plug, I know, I know -- only works in FF/Chrome/Safari). Maybe more experienced computer vision people can make suggestions based on results. Oh, I'm using the CV_COMP_BHATTACHARYYA distance when comparing histograms (it seemed that it gave the best results although chi-square isn't bad either).


Is there a background ? IS it significant ? Maybe you need to look at whether there is a user-supplied background or not. then you "just" need to have 2 histogram per db entry, one with bg, one without.

That'll stop earthrise looking like an apple with a dot.

for basic bg separation, try a canny, then taking "outside" and removing it from a copy of the original.

0

精彩评论

暂无评论...
验证码 换一张
取 消