Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No camera image when using python code #4

Open
philippwulff opened this issue Jul 15, 2022 · 0 comments
Open

No camera image when using python code #4

philippwulff opened this issue Jul 15, 2022 · 0 comments

Comments

@philippwulff
Copy link

philippwulff commented Jul 15, 2022

I also needed to install these libraries besides the libraries in the instructions:

sudo apt-get install libjpeg-dev
sudo apt-get install libpng-dev
sudo apt install libfreetype6-dev

When attaching a camera and running python_bindings/test.py it opens a black window (no camera image). This is the terminal output:

rollbody@rollbody-desktop:~/picam360-capture/python_binding$ python3 test.py 
recv thread started : 9200

Just for others to compare, this is the output I got from building the code:

picam360-capture.bin generating Makefile
TEGRA
picam360-common generating Makefile
TEGRA
-- Checking for module 'libjpeg'
--   Found libjpeg, version 
-- Checking for module 'libpng'
--   Found libpng, version 1.6.34
USE_GLES
UNIX or LINUX
USE_GLES
-- Checking for module 'freetype2'
--   Found freetype2, version 21.0.15
UNIX or LINUX
plugins generating Makefile
JETSON
v4l2_capture generating Makefile
fisheye_params generating Makefile
rtp_streamer generating Makefile
image_recorder generating Makefile
view_point_multiplexor generating Makefile
ffmpeg_capture generating Makefile
process_streamer generating Makefile
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rollbody/picam360-capture
Scanning dependencies of target picam360-common
[  2%] Building C object libs/picam360-common/CMakeFiles/picam360-common.dir/src/reference.c.o
[  5%] Building C object libs/picam360-common/CMakeFiles/picam360-common.dir/src/picam360_image.c.o
[  8%] Building CXX object libs/picam360-common/CMakeFiles/picam360-common.dir/src/rtp.cc.o
[ 11%] Building C object libs/picam360-common/CMakeFiles/picam360-common.dir/src/mrevent.c.o
[ 14%] Building C object libs/picam360-common/CMakeFiles/picam360-common.dir/src/quaternion.c.o
[ 17%] Building CXX object libs/picam360-common/CMakeFiles/picam360-common.dir/src/gl_program.cc.o
[ 20%] Building C object libs/picam360-common/CMakeFiles/picam360-common.dir/src/jpeg_loader.c.o
[ 22%] Building C object libs/picam360-common/CMakeFiles/picam360-common.dir/src/png_loader.c.o
[ 25%] Building C object libs/picam360-common/CMakeFiles/picam360-common.dir/src/tools.c.o
[ 28%] Linking CXX static library libpicam360-common.a
[ 28%] Built target picam360-common
Scanning dependencies of target freetypeGlesRpi_make
 CC src/texture-atlas.c
 CC src/texture-font.c
 CC src/vector.c
 Linking...a
[ 28%] Built target freetypeGlesRpi_make
[ 31%] prepare glsl include files
[ 34%] prepare img include files
Scanning dependencies of target picam360-capture.bin
[ 37%] Building C object CMakeFiles/picam360-capture.bin.dir/src/picam360_capture.c.o
[ 40%] Building C object CMakeFiles/picam360-capture.bin.dir/src/status_handler.c.o
[ 42%] Building C object CMakeFiles/picam360-capture.bin.dir/src/menu_handler.c.o
[ 45%] Building C object CMakeFiles/picam360-capture.bin.dir/src/stream_mixer.c.o
[ 48%] Building C object CMakeFiles/picam360-capture.bin.dir/src/manual_mpu.c.o
[ 51%] Building C object CMakeFiles/picam360-capture.bin.dir/src/menu.c.o
[ 54%] Building C object CMakeFiles/picam360-capture.bin.dir/src/egl_handler.c.o
[ 57%] Linking CXX executable picam360-capture.bin
[ 57%] Built target picam360-capture.bin
Scanning dependencies of target Linux_UVC_TestAP_make
H264_UVC_TestAP.c:42:0: warning: "V4L2_PIX_FMT_H264" redefined
 #define V4L2_PIX_FMT_H264 v4l2_fourcc('H','2','6','4') /* H264 */
 
In file included from H264_UVC_TestAP.c:23:0:
/usr/include/linux/videodev2.h:630:0: note: this is the location of the previous definition
 #define V4L2_PIX_FMT_H264     v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
 
H264_UVC_TestAP.c: In function ‘thread_capture’:
H264_UVC_TestAP.c:1022:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^~~~~~
H264_UVC_TestAP.c:983:7: note: declared here
 void *thread_capture(void *par)
       ^~~~~~~~~~~~~~
H264_UVC_TestAP.c:1076:4: warning: ‘return’ with no value, in function returning non-void
    return;
    ^~~~~~
H264_UVC_TestAP.c:983:7: note: declared here
 void *thread_capture(void *par)
       ^~~~~~~~~~~~~~
H264_UVC_TestAP.c:1034:25: warning: ‘[   HD]frame-’ directive writing 13 bytes into a region of size 1 [-Wformat-overflow=]
     sprintf(filename, "[   HD]frame-%06u.jpg", i);
                        ~^~~~~~~~~~~~
H264_UVC_TestAP.c:1034:23: note: using the range [0, 4294967295] for directive argument
     sprintf(filename, "[   HD]frame-%06u.jpg", i);
                       ^~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1034:5: note: ‘sprintf’ output between 24 and 28 bytes into a destination of size 1
     sprintf(filename, "[   HD]frame-%06u.jpg", i);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1036:25: warning: ‘[  VGA]frame-’ directive writing 13 bytes into a region of size 1 [-Wformat-overflow=]
     sprintf(filename, "[  VGA]frame-%06u.jpg", i);
                        ~^~~~~~~~~~~~
H264_UVC_TestAP.c:1036:23: note: using the range [0, 4294967295] for directive argument
     sprintf(filename, "[  VGA]frame-%06u.jpg", i);
                       ^~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1036:5: note: ‘sprintf’ output between 24 and 28 bytes into a destination of size 1
     sprintf(filename, "[  VGA]frame-%06u.jpg", i);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1038:25: warning: ‘[ QVGA]frame-’ directive writing 13 bytes into a region of size 1 [-Wformat-overflow=]
     sprintf(filename, "[ QVGA]frame-%06u.jpg", i);
                        ~^~~~~~~~~~~~
H264_UVC_TestAP.c:1038:23: note: using the range [0, 4294967295] for directive argument
     sprintf(filename, "[ QVGA]frame-%06u.jpg", i);
                       ^~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1038:5: note: ‘sprintf’ output between 24 and 28 bytes into a destination of size 1
     sprintf(filename, "[ QVGA]frame-%06u.jpg", i);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1040:25: warning: ‘[QQVGA]frame-’ directive writing 13 bytes into a region of size 1 [-Wformat-overflow=]
     sprintf(filename, "[QQVGA]frame-%06u.jpg", i);
                        ~^~~~~~~~~~~~
H264_UVC_TestAP.c:1040:23: note: using the range [0, 4294967295] for directive argument
     sprintf(filename, "[QQVGA]frame-%06u.jpg", i);
                       ^~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1040:5: note: ‘sprintf’ output between 24 and 28 bytes into a destination of size 1
     sprintf(filename, "[QQVGA]frame-%06u.jpg", i);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1042:25: warning: ‘[360P]frame-’ directive writing 12 bytes into a region of size 1 [-Wformat-overflow=]
     sprintf(filename, "[360P]frame-%06u.jpg", i);
                        ~^~~~~~~~~~~
H264_UVC_TestAP.c:1042:23: note: using the range [0, 4294967295] for directive argument
     sprintf(filename, "[360P]frame-%06u.jpg", i);
                       ^~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1042:5: note: ‘sprintf’ output between 23 and 27 bytes into a destination of size 1
     sprintf(filename, "[360P]frame-%06u.jpg", i);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1044:25: warning: ‘[180P]frame-’ directive writing 12 bytes into a region of size 1 [-Wformat-overflow=]
     sprintf(filename, "[180P]frame-%06u.jpg", i);
                        ~^~~~~~~~~~~
H264_UVC_TestAP.c:1044:23: note: using the range [0, 4294967295] for directive argument
     sprintf(filename, "[180P]frame-%06u.jpg", i);
                       ^~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1044:5: note: ‘sprintf’ output between 23 and 27 bytes into a destination of size 1
     sprintf(filename, "[180P]frame-%06u.jpg", i);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1054:24: warning: ‘frame-’ directive writing 6 bytes into a region of size 1 [-Wformat-overflow=]
    sprintf(filename, "frame-%06u.jpg", i);  
                       ~^~~~~
H264_UVC_TestAP.c:1054:22: note: using the range [0, 4294967295] for directive argument
    sprintf(filename, "frame-%06u.jpg", i);  
                      ^~~~~~~~~~~~~~~~
H264_UVC_TestAP.c:1054:4: note: ‘sprintf’ output between 17 and 21 bytes into a destination of size 1
    sprintf(filename, "frame-%06u.jpg", i);  
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 57%] Built target Linux_UVC_TestAP_make
Scanning dependencies of target v4l2_capture
[ 60%] Building CXX object plugins/v4l2_capture/CMakeFiles/v4l2_capture.dir/v4l2_capture.cpp.o
[ 62%] Building CXX object plugins/v4l2_capture/CMakeFiles/v4l2_capture.dir/v4l2_handler.cpp.o
[ 65%] Linking CXX shared module v4l2_capture.so
[ 65%] Built target v4l2_capture
Scanning dependencies of target fisheye_params
[ 68%] Building CXX object plugins/fisheye_params/CMakeFiles/fisheye_params.dir/fisheye_params.cpp.o
[ 71%] Linking CXX shared module fisheye_params.so
[ 71%] Built target fisheye_params
Scanning dependencies of target rtp_streamer
[ 74%] Building C object plugins/rtp_streamer/CMakeFiles/rtp_streamer.dir/rtp_streamer.c.o
[ 77%] Linking C shared module rtp_streamer.so
[ 77%] Built target rtp_streamer
Scanning dependencies of target image_recorder
[ 80%] Building C object plugins/image_recorder/CMakeFiles/image_recorder.dir/image_recorder.c.o
[ 82%] Linking C shared module image_recorder.so
[ 82%] Built target image_recorder
Scanning dependencies of target view_point_multiplexor
[ 85%] Building C object plugins/view_point_multiplexor/CMakeFiles/view_point_multiplexor.dir/view_point_multiplexor.c.o
[ 88%] Linking C shared module view_point_multiplexor.so
[ 88%] Built target view_point_multiplexor
Scanning dependencies of target ffmpeg_capture
[ 91%] Building CXX object plugins/ffmpeg_capture/CMakeFiles/ffmpeg_capture.dir/ffmpeg_capture.cpp.o
[ 94%] Linking CXX shared module ffmpeg_capture.so
[ 94%] Built target ffmpeg_capture
Scanning dependencies of target process_streamer
[ 97%] Building CXX object plugins/process_streamer/CMakeFiles/process_streamer.dir/process_streamer.cpp.o
[100%] Linking CXX shared module process_streamer.so
[100%] Built target process_streamer
[ 28%] Built target picam360-common
[ 28%] Built target freetypeGlesRpi_make
[ 57%] Built target picam360-capture.bin
[ 57%] Built target Linux_UVC_TestAP_make
[ 65%] Built target v4l2_capture
[ 71%] Built target fisheye_params
[ 77%] Built target rtp_streamer
[ 82%] Built target image_recorder
[ 88%] Built target view_point_multiplexor
[ 94%] Built target ffmpeg_capture
[100%] Built target process_streamer
Install the project...
-- Install configuration: ""
+ systemctl stop picam360-capture.service
Failed to stop picam360-capture.service: Unit picam360-capture.service not loaded.
+ '[' '!' -d /usr/local/lib/picam360-capture/ ']'
+ mkdir /usr/local/lib/picam360-capture/
+ cp libs/picam360-common/libpicam360-common.a /usr/local/lib/picam360-capture/
+ cp picam360-capture.bin /usr/local/lib/picam360-capture/
+ chmod +x setup/picam360-capture
+ cp setup/picam360-capture /usr/local/bin
+ cp setup/picam360-capture.service /etc/systemd/system/
+ '[' '!' -f /usr/local/etc/picam360-capture.conf ']'
+ cp config.json.tmp /usr/local/etc/picam360-capture.conf
+ '[' '!' -d /usr/local/include/picam360-capture/ ']'
+ mkdir /usr/local/include/picam360-capture/
+ cp include/picam360_capture_plugin.h /usr/local/include/picam360-capture/
+ cp -r libs/picam360-common/include/gl_program.h libs/picam360-common/include/jpeg_loader.h libs/picam360-common/include/list.h libs/picam360-common/include/mat4 libs/picam360-common/include/mrevent.h libs/picam360-common/include/picam360_image.h libs/picam360-common/include/png_loader.h libs/picam360-common/include/quaternion.h libs/picam360-common/include/reference.h libs/picam360-common/include/rtp.h libs/picam360-common/include/tools.h /usr/local/include/picam360-capture/
+ '[' '!' -d /usr/local/lib/picam360-capture/plugins/ ']'
+ mkdir /usr/local/lib/picam360-capture/plugins/
+ cp plugins/ffmpeg_capture.so plugins/fisheye_params.so plugins/image_recorder.so plugins/process_streamer.so plugins/rtp_streamer.so plugins/v4l2_capture.so plugins/view_point_multiplexor.so /usr/local/lib/picam360-capture/plugins/
+ '[' '!' -d /usr/local/lib/picam360-capture/framemeta/ ']'
+ mkdir /usr/local/lib/picam360-capture/framemeta/
+ cp framemeta/equirectangular.meta /usr/local/lib/picam360-capture/framemeta/
+ systemctl daemon-reload
+ systemctl start picam360-capture.service
+ systemctl enable picam360-capture.service
Created symlink /etc/systemd/system/multi-user.target.wants/picam360-capture.service → /etc/systemd/system/picam360-capture.service.
@philippwulff philippwulff changed the title Needed additional dependencies No camera image when using python code Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant