System information (version)
- OpenCV => 4.0.0-dev
- Operating System / Platform => debian 9.4 (64 Bit)
- Compiler => gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Detailed description
I'm not sure this is a bug or not but I'm filing in case it is.
When investigating loading a custom Aruco Dictionary for Python (2.7) I noticed the bytesList looks (to me) as if it's been reshaped improperly, going from a 4 row by 5 column array in the predefined_dictionaries.hpp to a 5 row by 4 column array in Python.
For example, here is a short Python snippet:
>>> print cv2.aruco.Dictionary_get(cv2.aruco.DICT_6X6_250).bytesList
[[[ 30 61 216 42]
[ 6 227 186 70]
[ 49 9 101 65]
[187 199 8 152]
[198 37 220 7]]
...
>>> print cv2.aruco.Dictionary_get(cv2.aruco.DICT_6X6_250).bytesList.shape
(250, 5, 4)
And the relevant code snippet in predefined_dictionaries.hpp:
...
static unsigned char DICT_6X6_1000_BYTES[][4][5] =
{ { { 30, 61, 216, 42, 6 },
{ 227, 186, 70, 49, 9 },
{ 101, 65, 187, 199, 8 },
{ 152, 198, 37, 220, 7 }, },
...
Note that the data is all there, it just looks like the shape of the matrix is wrong in Python.
I would like to load a custom Aruco dictionary through Python which presumably means I would need to feed in a bytesList with the oddly shaped format in Python. Since, as far as I can tell, bytesList is part of the specification and needs to be populated for custom Aruco dictionaries, even if it's being used consistently in the OpenCV library the portion exposed seems incorrect.
Steps to reproduce
See above, but for redundancies sake (in Python):
>>> print cv2.aruco.Dictionary_get(cv2.aruco.DICT_6X6_250).bytesList
[[[ 30 61 216 42]
[ 6 227 186 70]
[ 49 9 101 65]
[187 199 8 152]
[198 37 220 7]]
...
>>> print cv2.aruco.Dictionary_get(cv2.aruco.DICT_6X6_250).bytesList.shape
(250, 5, 4)
System information (version)
Detailed description
I'm not sure this is a bug or not but I'm filing in case it is.
When investigating loading a custom Aruco Dictionary for Python (2.7) I noticed the
bytesListlooks (to me) as if it's been reshaped improperly, going from a 4 row by 5 column array in the predefined_dictionaries.hpp to a 5 row by 4 column array in Python.For example, here is a short Python snippet:
And the relevant code snippet in
predefined_dictionaries.hpp:Note that the data is all there, it just looks like the shape of the matrix is wrong in Python.
I would like to load a custom Aruco dictionary through Python which presumably means I would need to feed in a
bytesListwith the oddly shaped format in Python. Since, as far as I can tell,bytesListis part of the specification and needs to be populated for custom Aruco dictionaries, even if it's being used consistently in the OpenCV library the portion exposed seems incorrect.Steps to reproduce
See above, but for redundancies sake (in Python):