Closed PrefectSol closed 4 months ago
I tried your CMakeLists.txt with OpenCV 4.5 (which is provided by apt in Ubuntu 22.04). There, the image loads when using your sample test app (not an empty matrix).
I suppose there is a conflict when you try to link OpenCV 4.9.0 and OFIQlib which statically contains OpenCV 4.5.5. Do you have the possibility to check if linkage with OpenCV 4.5.5 works?
It didn't help me. I built OpenCV version 4.5.5 and tried it with different versions of GCC - the result is still the same - I used ArchLinux. (empty image)
Gtk-WARNING **: 22:59:06.498: Theme parsing error: gtk.css:6691:68: Invalid name of pseudo-class
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.5) opencv-4.5.5/modules/core/src/array.cpp:2494: error: (-206:Bad flag (parameter or structure field)) Unrecognized or unsupported array type in function 'cvGetMat'
Building on a Debian VM helped, maybe there are some dependencies or something else - I don't know. Thanks for the help, and it would be nice to specify compatible versions somewhere. If you have any suggestions about what the problem is, then it would be interesting to know, but in general the problem has been solved
It didn't help me. I built OpenCV version 4.5.5 and tried it with different versions of GCC - the result is still the same - I used ArchLinux. (empty image)
Gtk-WARNING **: 22:59:06.498: Theme parsing error: gtk.css:6691:68: Invalid name of pseudo-class terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.5.5) opencv-4.5.5/modules/core/src/array.cpp:2494: error: (-206:Bad flag (parameter or structure field)) Unrecognized or unsupported array type in function 'cvGetMat'
Building on a Debian VM helped, maybe there are some dependencies or something else - I don't know. Thanks for the help, and it would be nice to specify compatible versions somewhere. If you have any suggestions about what the problem is, then it would be interesting to know, but in general the problem has been solved
The compatible version of gcc is 12.2.0
Sorry, it seems I jumped to conclusions and put together the wrong assembly. Still, OpenCV 4.5.5 does not link to OFIQ, no matter how hard I try. I also tried to build on Ubuntu 22.04, but the error remains
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.5) /home/prefect/Libraries/opencv-4.5.5/modules/core/src/array.cpp:2494: error: (-206:Bad flag (parameter or structure field)) Unrecognized or unsupported array type in function 'cvGetMat'
Aborted (core dumped)
I tried your CMakeLists.txt with OpenCV 4.5 (which is provided by apt in Ubuntu 22.04). There, the image loads when using your sample test app (not an empty matrix).
I suppose there is a conflict when you try to link OpenCV 4.9.0 and OFIQlib which statically contains OpenCV 4.5.5. Do you have the possibility to check if linkage with OpenCV 4.5.5 works?
@bbtams Can you test this code?
#include <opencv2/opencv.hpp>
#include <ofiq_lib.h>
int main()
{
auto a = OFIQ::Interface::getImplementation();
cv::Mat image = cv::imread("input/image.jpg");
cv::imshow("image", image);
cv::waitKey(0);
}
It is possible that the ofiq_lib connection is omitted during compilation because it is not used
For those who are faced with the same problem, do not use the script build.sh , and make the build yourself in advance by collecting all the libraries that stretch ofiqlib, also paying attention to version compatibility. It helped me.
I am trying to use libofiq and OpenCV in my project, but cv::imread is not working correctly. When I build just an OpenCV project, everything is okay and the image reads correctly. However, when I add libofiq to the project, imread returns an empty matrix.
OpenCV version: 4.9.0
Libofiq was installed with ./build.sh
simple test app:
Imread does not throw any errors - it just returns an empty matrix.