I am trying to test a simple example program on Raspberry PI, to start test OpenCV function on Raspberry PI.
After successful compilation, I get an empty window.
The code is an example code when could be found on the OpenCV website, however the only part I change is name of the picture.
IplImage* img = cvLoadImage("pic1.jpg", 3);
All I get in an empty window. The pic.jpg
is saved in the home directory (home/pi)
.
Anyone came across this before?
Regards
Make sure object file and jpg that you're trying to load is in the same directory. (home)
Or just use complete path like this.
IplImage* img = cvLoadImage("/home/pi/pic1.jpg", 3);
Hope it helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.