开发者

Object detection for specific flat objects

I'm new to computer vision, and I want to detect specific and flat objects in an image (or video frame).

What do I mean with specific and flat?

Flat

Well, flat objects are like objects, but, you know, flat... What it means to me:

  • Objects will always be viewed from approximately the same "frontal" angle, that is, the axis of the camera corresponds (more or less) with their surface normal. (But they may be rotated around that axis).
  • Objects for which the angle of illumination doesn't change anything (i.e. it doesn't have bumps and creases that cast shadows).

Specific

  • Ojects of which I know the exact appearance and shape. They are all exactly the same, there are no variations.
  • I have a (precise) photograph (or representation) of them.

Examples of such objects

I believe the problem is easy enough that I should be able to find a function of a computer vision library that basically works like that:

> findObjects("object.png", "image.png")
[object at x1, y1, rotated z1 degrees, size height1*width1,
 object at x2, y2, rotated z2 degrees, size height2*width2,
 ...]

In fact I don't even really care about the sizes and locations of the objects, I just need a count.

But I can't find anything like this. All I can find are countless examples of face recognition with something called a Haar-classifier, which doesn't seem appropriate for my problem at all, because:

  • Faces are not flat, and thus that classifier must cope with problems like different illuminations, shadows...
  • It must recognize faces, that is, objects that are similar, but not exactly identical.
  • It must recognize faces that it hasn't been trained with just because they "look like" faces.
  • Proof that this is not suited: it must be trained with hundreds or thousands of positive and negative samples. In my problem, all the information needed is contained in a single sample. So that can't be right.

So, does something like this exists?

I'd prefer to use OpenCV since this seems to be the standard computer-vision library, but I am open to any solution.


One way to do that would be to use a keypoint matcher. Opencv has a demo doing kind-of what you want (find http://imgur.com/a/Bbc6C#gxXGh in http://imgur.com/a/Bbc6C#UfTkn as a premade demo (in the opencv 2.2 distribution: samples/c/find_obj.cpp). The output is visualized in http://imgur.com/ZF1bh - you should be able to start from that to adapt it so it finds multiple instances of the image and counts them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜