DenisTome / Lifting-from-the-Deep-release

Implementation of "Lifting from the Deep: Convolutional 3D Pose Estimation from a Single Image"
https://denistome.github.io/papers/lifting-from-the-deep
GNU General Public License v3.0
450 stars 132 forks source link

error in drawing.cpp for some images #34

Closed edrdos101 closed 5 years ago

edrdos101 commented 5 years ago

For some images (haven't figured out the correlation) when using draw_limbs, terminal throws this error:

_COLORS[lid], LIMB_DRAW_SIZE*_NORMALISATION_FACTOR , 16)
cv2.error: OpenCV(4.0.1) /tmp/opencv-20190105-31032-o160to/opencv-4.0.1/modules/imgproc/src/drawing.cpp:1811: error: (-215:Assertion failed) 0 < thickness && thickness <= MAX_THICKNESS in function 'line'

There seems to be no logical explanation why plotting works fine for some images while not for others...

edrdos101 commented 5 years ago

FYI

I just changed the thickness value to a hard coded one in the draw.py file and it's ok now. ie

cv2.line(image, (x0, y0), (x1, y1),
                     _COLORS[lid], 5 , 16)
DenisTome commented 5 years ago

Alright thanks, it's quite weird anyway.