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

OpenCV Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpPerspective #2

Closed
niudong1001 opened this issue Apr 9, 2018 · 1 comment

Comments

@niudong1001
Copy link

Hello @asolis , when i run ./detection3D, i got those error:

Training 1 / 8
OpenCV Error: Assertion failed (src.cols > 0 && src.rows > 0) in warpPerspective, file /tmp/opencv@2-20180227-49972-1kzhlrg/opencv-2.4.13.6/modules/imgproc/src/imgwarp.cpp, line 3832
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv@2-20180227-49972-1kzhlrg/opencv-2.4.13.6/modules/imgproc/src/imgwarp.cpp:3832: error: (-215) src.cols > 0 && src.rows > 0 in function warpPerspective

[1]    46167 abort      ./detection3D

Hope to find a solution~

@niudong1001
Copy link
Author

I solved this problem by using absolute path images.push_back(baseUrl+"/bottle/01.jpeg"); rather than images.push_back("toy/01.jpg");

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

1 participant