2019-02-07 12:33:18 -0600 | received badge | ● Famous Question (source) |
2016-09-02 13:19:51 -0600 | received badge | ● Notable Question (source) |
2015-12-02 09:08:13 -0600 | received badge | ● Popular Question (source) |
2014-03-03 10:54:42 -0600 | commented question | Error in function imread() - cannot read image when i attempted to use the function getBuildInformation() it said that the function is not a part of the library :-/ Any ideas? |
2014-02-24 23:00:05 -0600 | commented answer | Error in function imread() - cannot read image Sorry about the code typos, my code is correct in comparing the two, I had just transcribed it wrong. It compiles without any errors. I am working on a the beagleboard xm microprocessor and didn't port over the code to my laptop to paste the code. Which probably doesn't help in getting my problem resolved. Again sorry for the confusion. |
2014-02-24 15:15:34 -0600 | asked a question | Error in function imread() - cannot read image I am just starting to work in the OpenCV library coding in C++. I am using CMake v2.8.3(which I have never used before) to build and compile my project on an ubuntu 11.04 distribution. I have the source code LearnImgProcess1.cpp and the CMakeLists.txt in "/home/ubuntu/ImgProcessing/Example1" CMakeLists.txt cmake_minimum_required(VERSION 2.8) LearnImgProcess.cpp #include < iostream > using namespace std;
int main(int argc, char** argv) if(img.empty()) namedWindow("Picture Displayer", WINDOW_AUTOSIZE); return 0; } I compile in the terminal, in the same directory as before, by entering "cmake ."
followed by "make" I then recieve my "image not found or read!" error. The image is located in the same directory as the source code : I have tried running with " ./Example1 "/home/ubuntu/ImgProcessing/Example1/sample.jpg" " I have tried different file formats. I have placed copy images in "/home/ubuntu/ImgProcessing/Example1/CMakeFiles/Example1.dir/sample.jpg" thinking that maybe it was trying to get an image from that directory. I have been looking on forums for the past couple of days trying to figure it out, but have had no luck. Any help would be appreciated. It is entirely possible that this might be a CMake issue, as I don't fully understand how to use it. I have also tried approaching the problem from that end. However if that is the case, if anyone knows how to fix it from that end and wouldn't mind giving some insight, that would also be appreciated. |