问题
I download the opencv3.4.5 from github https://github.com/opencv/opencv/archive/3.4.5.zip. And the libjpeg-turbo is located at 3rdparty dir.
And build it with -D WITH_JPEG=ON
and -D BUILD_JPEG=ON
added. I can check this in CMakeCache.txt. But i cannot find any thing related with libjpeg-turbo
at install/include or install/lib. How to test and verify the libjpeg-turbo is built into opencv? Instead of system libjpeg.
回答1:
There should be a binary (executable) in your package called opencv_version
, which you can run like this:
opencv_version -v | grep -i jpeg
Sample Output
JPEG: build-libjpeg-turbo (ver 1.5.3-62)
JPEG 2000: build (ver 1.900.1)
Equally, within Python, you can do:
import cv2
print(cv2.getBuildInformation())
Or, maybe more succinctly:
import cv2
import re
re.findall('.*jpeg.*',cv2.getBuildInformation())
Sample Output:
[' JPEG: build-libjpeg-turbo (ver 1.5.3-62)']
来源:https://stackoverflow.com/questions/59280235/how-to-check-the-libjpeg-turbo-is-built-into-opencv