A
A
Artem Filimonov2017-11-16 00:07:16
linux
Artem Filimonov, 2017-11-16 00:07:16

Why is the libCVD example not displaying the image from the webcam?

I've been fiddling with this library all day. and all the same, yes because.
but there are successes, the exception is not thrown, but it does not work correctly.

VideoBuffer<Rgb<byte> > * video_buffer = open_video_source<Rgb<byte> >("colourspace:[from=yuv422]//v4l2:[verbose]///dev/video0");
        VideoDisplay disp(video_buffer->size());
        while(1)
        {
            VideoFrame<Rgb<byte> > *frame = video_buffer->get_frame();
            glDrawPixels(*frame);
            video_buffer->put_frame(frame);
        }

the code responsible for redrawing does not redraw. The window has opened, you can move it, but the picture is static.
When building, an error is shown:

In file included from ../../Desktop/libcvd-master/cvd/videosource.h:19:0,
from ../main.cpp:1:
../../Desktop/libcvd-master/ cvd/readaheadvideobuffer.h:12:116: note: #pragma message: ReadAheadVideoBuffer will not do any read - ahead because threads are not supported in this build
#pragma message("ReadAheadVideoBuffer will not do any read - ahead because threads are not supported in this build")

With what it can be connected, I kind of compiled a lib, took into account all the dependencies.
here is configure. you can see that there are some requirements not met
spoiler
[email protected]:~/Рабочий стол//libcvd-master$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for gawk... gawk
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking how to run the C++ preprocessor... g++ -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking if compiler flag -Wall works... yes
checking if compiler flag -Wextra works... yes
checking if compiler flag -pipe works... yes
checking For C++1y support... yes
checking for main in -lpthread... yes
checking if compiler flag -ggdb works... yes
checking if -D_GLIBCXX_DEBUG can works...... yes
checking if compiler flag -fPIC works... yes
checking if compiler flag -O3 works... yes
------------------------------------
Checking processor specific features
------------------------------------
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for MMX support... yes
checking for MMXEXT support... yes
checking for SSE support... yes
checking for SSE2 support... yes
checking for SSE3 support... yes
checking size of void*... 8
checking for inline asm statement... yes
checking assembler supports .type pseudo-op... yes
-----------------------------------------------
Checking for operating system specific features
-----------------------------------------------
checking dc1394/dc1394.h usability... yes
checking dc1394/dc1394.h presence... yes
checking for dc1394/dc1394.h... yes
checking for main in -ldc1394... yes
checking for v4l2... yes
-------------------------------
Checking for optional libraries
-------------------------------
checking for X... libraries , headers
checking for glDrawPixels in -lGL... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for gluGetString in -lGLU... yes
checking for TooN... yes
checking for dgesvd_ in -lacml... no
checking if Accelerate framework is needed for LAPACK...
checking for dgesvd_... no
checking for dgesvd_ in -llapack... yes
checking libuvc/libuvc.h usability... yes
checking libuvc/libuvc.h presence... yes
checking for libuvc/libuvc.h... yes
checking for uvc_stream_get_frame in -luvc... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_init_io in -lpng... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking JPEG read buffer size... 1 (safe reading)
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for TIFFReadRGBAImage in -ltiff... yes
checking for ffmpeg headers... checking for main in -lavutil... yes
checking for avformat_open_input in -lavformat... yes
checking for av_read_frame in -lavformat... yes
checking for avcodec_open2 in -lavcodec... yes
checking for sws_getContext in -lswscale... yes
checking for avdevice_register_all in -lavdevice... yes
checking for doxygen... docs
-----------------------------------
Checking for platform compatibility
-----------------------------------
checking glob.h usability... yes
checking glob.h presence... yes
checking for glob.h... yes
checking for glob... yes
checking for GLOB_BRACE and GLOB_TILDE in glob.h... yes
checking whether feenableexcept is declared... yes
--------------------------------
Checking for extra build options
--------------------------------
Options:
inline_asm assembler dc1394v2 v4l2buffer videodisplay toon lapack libuvc png jpeg tiff ffmpeg glob
Missing options for linux-gnu:
dc1394v1
Dodgy things:
SIMD support:
mmx mmxext sse sse2 sse3
Missing SIMD support for x86_64-pc-linux-gnu:
-g -Wall -Wextra -pipe -ggdb -fPIC -mmmx -msse -msse -msse2 -msse3
-lavdevice -lswscale -lavcodec -lavformat -lavutil -ltiff -ljpeg -lpng -luvc -llapack -lGLU -lGL -ldc1394 -lpthread -lX11 -lXext
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cvd/config.h
config.status: cvd/config.h is unchanged
config.status: creating cvd_src/config_internal.h
config.status: cvd_src/config_internal.h is unchanged

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ananiev, 2017-11-16
@SaNNy32

You need to set a preprocessor definition for CVD_HAVE_PTHREAD

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question