Ask Your Question
0

Could the Real Time pose estimation tutorial be used for a custom shape object ?

asked 2019-03-11 13:05:15 -0600

trttrt gravatar image

The tutorial is here: https://docs.opencv.org/3.0-beta/doc/...

and it says: "The application starts up loading the 3D textured model in YAML file format". So I could use any object shape I could given I have the data for it?

Thanks

edit retag flag offensive close merge delete

Comments

sidenote: please do not use outdated 3.0-beta docs.

start from https://docs.opencv.org/master/ and select the resp. version you're using from the select box.

berak gravatar imageberak ( 2019-03-11 13:43:29 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-03-11 13:40:07 -0600

berak gravatar image

there are 2 3d models involved here: the 1st (the "yml" one) is used to find the 3d pose of a known, textured 3d object (a simple box in this case), the 2nd model (the "ply" one) is indeed an abitrary one (your free choice !), which is shown in the pose of the detected, 1st model.

note, that the sample is slightly cheating here, using precomputed descriptors for the box. if you want to use your own, you probably have to precompute those for your "detection object".

edit flag offensive delete link more

Comments

Ok the tutorial uses 2 files. But how do I generate the "yml" file, the one that has the features? Also why is the "yml" file using 4 floats for each feature ? They say, "Finally, the 3D points and the descriptors are stored in different lists in a file with YAML format which each row is a different point." I would expect (x,y,z)..But what is the 4th value ?

trttrt gravatar imagetrttrt ( 2019-03-11 17:59:46 -0600 )edit

why is the "yml" file using 4 floats for each feature ?

it's only printed like this (4 numbers per row for float values), the 3d points list there has 5912 x 3 elements, there are also 5912 2d points, and 5912 x 32 (ORB) descriptor values (8 values per row, because it's uchar. -- see the pattern ?) confusing, but don't worry ;)

But how do I generate the "yml" file ?

there are examples here also in the calib3d tutorials.

maybe you can find a similarly shaped box so you can reuse the 3d points (it needs to be richly textured, to get a lot of keypoints !) take an image of it, and have a look at the calib3d tuts again, on how to get ORB keypoints / features from it to save. good luck ;)

berak gravatar imageberak ( 2019-03-12 02:32:37 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-11 13:05:15 -0600

Seen: 453 times

Last updated: Mar 11 '19