pupil-labs / libuvc

a cross-platform library for USB video devices
https://int80k.com/libuvc/
Other
52 stars 30 forks source link

How to Link JPEG library into this UVC library #41

Open toBeGeekNo1 opened 4 years ago

toBeGeekNo1 commented 4 years ago

Hi,my project need to use the JPEG relative API, but I use the steps described in the INSTALL_WINDOWS.md, It doesn't seem to provide a path to the JPEG library,Please give me a hand,thanks

PeterPeterPan commented 4 years ago

@toBeGeekNo1 I't my way: First

Download libjpeg, and follow the step in install.txt. For me, I follow the "Microsoft Windows, Visual Studio 2019 (v16):..."

Second

link the libjpeg for Visual Studio. reference: https://stackoverflow.com/questions/4445418/how-to-add-additional-libraries-to-visual-studio-project

Final

Using the function "uvc_mjpeg2rgb( )" in libuvc/src/frame-mjpeg.c instead of uvc_any2bgr( ). frame-mjpeg.c wasn't linked by CMakeLists, so you can create a C file and just copy the code from frame-mjpeg.c.

Note: you may need to install opencv, too.