Solved Can't access image (.jpeg) folder in main() using OpenCV
-
@JonB check post above ( the link to the libraries is now ok and works, a library name was misspelled.) The program compiles and runs but only shows an empty window.
Can I do something about it?
-
Isn't there a forum for OpenCV out there? Or what is the relation to Qt here?
-
@Christian-Ehrlicher since the program works fine using just OpenCV and it doesn't work when trying to run it in QT I thought it's more likely to be a Qt problem rather than an Opencv one. Maybe there are specific things to add in the .pro file or other settings I'm not aware of since I'm new to Qt.
-
@georgiav
Hi
But the code you have shown in the first post does nothing with MainWindow ( or even has one)
So what is the thing that doesn't work ?
What should been on the MainWindow ?
and how did you add it ? -
@mrjj Hi, I think those were the mainwindow.cpp and mainwindow.h files that were already there when I created the project but I didn't add anything in them so I just removed them and tried to run again and now I get this :
but unfortunately I don't understand where those errors come from
-
@georgiav said in Can't access image (.jpeg) folder in main() using OpenCV:
Since the program works fine using just OpenCV and it doesn't work when trying to run it in QT I thought it's more likely to be a Qt problem rather than an Opencv
Your code does not use any Qt class at all...
-
@Christian-Ehrlicher I'm trying to create a GUI for my program but first the c++ program should run fine , right?
-
Hi
I wonder if you need to link additional libs
besides opencv_core
like opencv_imgcodecs -
Hi, no, I figure it out what it was , I didn't write QApplication a(argc, argv); at the beginning in the main function. Now it works fine ! Thank you anyway for trying to help.
-
Oh so after you added that all the other errors went away ?
well good it works :)
happy coding