Skip to content

aruco-python: There is no interface for custom board(3d) creation #695

@ShT3ch

Description

@ShT3ch

There only 2 methods:
CharucoBoard_create and GridBoard_create
Both of them create planar boards.

According to tutorials(http://docs.opencv.org/3.1.0/d9/d6d/tutorial_table_of_content_aruco.html#gsc.tab=0) it should be possible just pass my own objPoints(n x 4 x 3 matrices), ids(n-length integer vector) and markers dictionary. But reassigning fields of Board class from python isn't working. Also, there is no Board_create method.

I've tried to write Board::create by analogy from GridBoard::create.
There's my try:
To aruco.hpp I added to public of Board
CV_WRAP static Ptr<Board> create(InputArrayOfArrays objPoints, Ptr<Dictionary> &dictionary, InputArray ids);
And manually parsed InputArrayOfArrays and InputArray to vectors of vectors structures.
Here's the code. Looks ugly, but works from python.

I have no expirience in openCV module developing and even c++.
Is it written properly? Is it works? Should I add tests for it?

Should I create pull request with this implementation or somebody will write it in less ugly style?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions