Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArucoExample.py Draw paper template Depth error #7

Open
ghost opened this issue Feb 14, 2019 · 0 comments
Open

ArucoExample.py Draw paper template Depth error #7

ghost opened this issue Feb 14, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 14, 2019

Hi, I recently experienced the following issue when trying to generate the python aruco paper examples to print out;

   cv2.imshow('Template', drawPaperTemplate())
cv2.error: OpenCV(4.0.0) c:\projects\opencv-python\opencv\modules\imgproc\src\color.hpp:261: error: (-2:Unspecified error) in function '__cdecl cv::CvtHelper<struct cv::Set<1,-1,-1>,struct cv::Set<3,4,-1>,struct cv::Set<0,2,5>,2>::CvtHelper(const class cv::_InputArray &,const class cv::_OutputArray &,int)'
> Unsupported depth of input image:
>     'VDepth::contains(depth)'
> where
>     'depth' is 6 (CV_64F)

I have fixed this by changing the following:

cv2.imshow('Template', drawPaperTemplate())

to

t = drawPaperTemplate().astype(np.uint8)
cv2.imshow('Template', t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants