Matching detected objects from two cameras

asked 2016-12-02 07:18:25 -0600

Raki gravatar image

I am using OpenCV (c++) and I have two cameras which I am using for object detection purposes. They are working side by side, but they have different configurations. Like, one is only RGB the other is infrared, also the resolutions are different. Anyway, what I want to do is, to detect objects in both (which is done) and match these objects with each other, so that I do not feed the same objects to further functions again and again.

Are there algorithms which can be employed to achieve this? If yes, what are they?

Thanks in advance.

edit retag flag offensive close merge delete

Comments

This is so broad. It all depends on which 2 camera's are being matched ...

StevenPuttemans gravatar imageStevenPuttemans ( 2016-12-02 07:23:01 -0600 )edit

I am asking for a matching/assignment algorithm like Hungarian algorithm, given two instances of detected obstacle bounding boxes, how to match each with its corresponding one.

Raki gravatar imageRaki ( 2016-12-02 07:26:09 -0600 )edit

And again, if I tell you now to use normalized euclidean distance between samples for example, this would work for setup1, but fail horribly for setup 2. You cannot see this as a general problem. Sensor fusion is very situation specific.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-12-02 07:34:03 -0600 )edit

I thought of something like point comparison. I do know the points in both images (from two cameras) where the obstacles appear. If I compare each of its center point with the other obstacles in the second camera, I think that would do it, wouldn't it? Say, there would be a margin like -+ 5 points, if two centers fall under this margin, these centers corresspond to the same obstacle.

Raki gravatar imageRaki ( 2016-12-02 07:36:11 -0600 )edit
1

Well then that depends on the false positives of your detection techniques I guess. If you have no false positives and a high true positive rate, then yes that could work.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-12-02 07:42:26 -0600 )edit

If you know the relative position of one camera to another, then you should be able to transform the coordinates of one object found to the other camera referential and check if it is the same..

If the cameras are really close to each other, I suggest you check for bounding box overlap, if it is higher than a threshold, than it can be marked as being the same object.

Pedro Batista gravatar imagePedro Batista ( 2016-12-02 11:39:26 -0600 )edit
1

^ I've actually managed to achieve this exactly like following that approach. Sorry, it is a bit late now but nevertheless it IS the answer to the question, and should be accepted.

Raki gravatar imageRaki ( 2017-07-21 05:19:21 -0600 )edit

Which approach?

Pedro Batista gravatar imagePedro Batista ( 2017-07-21 07:20:51 -0600 )edit

If the cameras are really close to each other, I suggest you check for bounding box overlap, if it is higher than a threshold, than it can be marked as being the same object.

Raki gravatar imageRaki ( 2017-07-25 05:28:43 -0600 )edit