开发者

Image background

开发者 https://www.devze.com 2023-03-02 20:47 出处:网络
I have a project in c# that must detect the background of an image as well as the part of the image that is being focused. Does anyone know ho开发者_开发知识库w to do this? Thanks!I\'m no expert in th

I have a project in c# that must detect the background of an image as well as the part of the image that is being focused. Does anyone know ho开发者_开发知识库w to do this? Thanks!


I'm no expert in this field, but it sounds like a very hard problem that requires some fancy heuristics. First of all, will your program receive any kind of hint about what kind of image it is processing? Is it a photo of a person, or is it a picture of a tree from inside a cave?

If you take thousands of photos, you might be able to categorize the large majority of them into buckets that share common characteristics that can be detected. Most photos of people or things, for example, will have the subject near the center. You might also be able to tell if there is a sky / ground layout by looking at hues at the top and bottom of the image, and perhaps make judgements based on how blurred parts of the image are (say, contrast variance or something like that).

If you can gather those characteristics, you might be able to run tracing algorithms to try to define a rough outline of the subject.

Other than that, sounds really, really hard.

0

精彩评论

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

关注公众号