Login  Register

Object annotation in images (bounding box)

Posted by reisman on Dec 05, 2017; 8:43pm
URL: https://forum.jogamp.org/Object-annotation-in-images-bounding-box-tp4038382.html

Hello,
i work since a month with jogl, currently my task is to create an image and mark all objects in that picture.  In these pictures you can see a street environment with different objects (car, lines). In a later step all objects should be marked but for debugging purposes the only marked object is a blue car (2D later 3D with texture).

In the following picture you can see that the creation of picture does already work but the marking of objects have its problems.
bigBox

In this case i think a proper bounding box can be calculated, but in the next image, in which i moved the camera only some steps forward it is much worse .
bigWorseBox

To obtain the bounding box of that car, i have an object called hitbox, which holds the corner points of that object. These 3D corner Points will through the gluProject function in 2D image points mapped. For the first image i got this 4 mapped points {x1: 849 y1:314 x2: 7310 y2:4637x3: 1874 y3:3849 x4: 676 y4:313} . For the second image i got this 4 points, which explains why the bonding box is wrong { x1: 861 y1:322 ; x2: -12840 y2:-8833 ; x3: -4760 y3:-15638 ; x4: 679 y4:321}

The Points 2 and 3 from the first image are very high  which is expected because they are left below out of the image. But for the second Image these outer points make something like an overflow which leads to this bad bounding box.

I hope my problem is clear an someone can help me.

best wishes
reisman


ps: please forgive me my bad english