OpenCV 2.4.5 read and display image crash -
good morning all,
i encountering problem when attempting run simple program open , display image, program compile , run , create "my image" window, window solid gray, , program crashes no error other standard windows "test.exe has stopped working" shortly after opening window.
i using opencv 2.4.5 , code::blocks 12.11. of importance cannot add .dll's system variable "path" , result have pasted of .dll's project folder. appreciated, code giving me problems can seen below.
#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> int main() { // read image cv::mat image= cv::imread("jellyfish.jpg"); // create image window named "my image" cv::namedwindow("my image"); // show image on window cv::imshow("my image", image); // wait key 5000 ms cv::waitkey(5000); return 1; }
maky sure have read image:
... // read image cv::mat image= cv::imread("jellyfish.jpg"); if (image.data == null) { cerr << "image wasn't loaded! check path." << endl; return 1; } ...
update: after 2 minutes of googling found answer - bug , it's fixed now.
Comments
Post a Comment