QImage unable to open jpg files
-
Did you build either for them ?
-
@SGaist
OpenCV was already built in the software pack supplied with Jetson Tk1.
The version is made in order to get the best performance from the Jetson board.
Later I built Qt and Qt Creator.
I follow the instructions I found in Qt wiki and I added the suggested library (Building from git).
But I have not so deep knowledge to understand if there was something connected with jpeg library.Regards.
-
Check with ldd where the libjpeg used by OpenCV is located. If it's the system lib then you can add
-system-libjpeg
to your configure options. -
You might also want to check with Qt 5.5.1 there was a bug in 5.5.0 see this bug report
-
@SGaist Thank you for your advices.
I am workig on them. I will inform you as soon as I have some results. -
@SGaist
I am back again.
Before to build with the new 5.5.1 I reset the Jetson TK1 with the new release of Jetson Pack (Before I had 1.1 now 1.2).
I download from Qt git the version 5.5.1 and I compiled without problem.
Then I download from git the version 3.6 of QtCreator and compiled wtihout problem (to compile correctly I had to modify something in 3rd party Botan as I found in nVidia forum).
When I run Qt Creator I have a problem in the configuration of Buil & Run.
I can configure the GCC Compiler but in the Kit the Compiler doesn't show any option.MZ
-
About QtCreator: I can use the version that I get form Ubutnu repository (3.0.1) and I can configure the Kit without problem.
About jpeg: I still have problem. Now I cannot read the image from webcam.
MZ
-
Are you sure you are building using the system libjpeg ?
-
With the version 5.5.0 the option didin't work. There was an error.
Now I try again with 5.5.1 and I have an error again.
Here the steps i did:- download source from git;
- init-repository ( I use the option --no-webkit but it looks it doesn't work because I get also webkit);
- checkout 5.5.1;
- removed manually webkits/webengine (deleted forlders);
- ./configure -qtxcb -system-libjpeg -nomake examples -nomake tests;
- make: with -system-libjpeg I have an error
../../../gui/image/qjpeghandler.cpp:64:21: fatal error: jpeglib.h: No such file or directory
MZ
-
Did you install the system libjpeg dev package ?
-
You are right, I forgot to install it.
I did and rebuild.
But still the same error:
JPEG parameter struct mismatch: library thinks size is 432, caller expect 488.In the past I looked for examples of use of Qt + OpenCV and if possible developed on Jetson TK1.
I found some example of Qt + OpenCV and one project developed on Jetson TK1 with only OpenCV.
All don't use Qt (QCamera) to grab pictures (while they use all the other features of Qt, even QThread) but directly OpenCV.
The one developed with Jetson TK1 has developed a tool based directly on V4L2, to have more flexibility in the control of the camera.
These examples work.MZ