Code Monkey home page Code Monkey logo

intel / libxcam Goto Github PK

View Code? Open in Web Editor NEW
578.0 85.0 228.0 50.77 MB

libXCam is a project for extended camera(not limited in camera) features and focus on image quality improvement and video analysis. There are lots features supported in image pre-processing, image post-processing and smart analysis. This library makes GPU/CPU/ISP working together to improve image quality. OpenCL is used to improve performance in different platforms.

License: Other

C 8.90% Shell 0.11% C++ 83.72% Makefile 1.17% M4 0.61% Slash 3.05% Jupyter Notebook 0.07% Python 2.35%

libxcam's Introduction

libXCam

Copyright (C) 2014-2023 Intel Corporation

libxcam core source code under the terms of Apache License, Version 2.0

Description:

libXCam is a project for extended camera features and focus on image quality improvement and video analysis. There are lots features supported in image pre-processing, image post-processing and smart analysis. This library makes GPU/CPU/ISP working together to improve image quality. OpenCL is used to improve performance in different platforms.

Features:

  • Image processing features
    • Advanced features
      • 360-degree video stitching
        • support ultra-high resolution (8K) video stitching.
        • support processing NV12 & YUV420 pixel format.
        • support 2/3/4 fish-eye cameras (FoV >180 degree) video stitching.
        • stitching image adopts equirectangular projection (ERP).
        • algorithms are optimized by AVX512 instruction, GLES and Vulkan.
        • stitching quality tuning supports OpenCV fisheye camera calibration parameters.
      • Automotive surround view (360-degree) stitching (OpenCL/CPU/GLES)
        • Support bowl view 3D model stitching by 4 input videos.
        • Enable geometry remap for WFoV camera calibration(intrinsic and extrinsic data).
        • Quality and performance improved (OpenCL/CPU/GLES).
        • CPU version upstreamed into AOSP for automotive surround view.
        • Enable Vulkan to improve performance.
      • DNN inference framework
        • Support pedestrian and vehicle detection.
      • Digital Video Stabilization
        • OpenCV feature-matched based video stabilization.
        • gyroscope 3-DoF (orientation) based video stabilization.
      • Blender: multi-band blender (OpenCL/CPU/GLES)
      • Noise reduction (OpenCL)
        • adaptive NR based on wavelet-haar and Bayersian shrinkage.
        • 3D-NR with inter-block and intra-block reference.
        • wavelet-hat NR (obsolete).
      • Wide dynamic range (WDR) (OpenCL)
        • histogram adjustment tone-mapping.
        • gaussian-based tone-mapping (obsolete).
      • Fog removal: retinex and dark channel prior algorithm (OpenCL)
        • dark channel prior algorithm based defog.
        • multi-scale retinex based defog (obsolete).
    • Basic pipeline from bayer to YUV/RGB format (OpenCL / AtomISP)
      • Gamma correction, MACC, color space, demosaicing, simple bilateral noise reduction, edge enhancement and temporal noise reduction.
    • 3A features
      • Auto whitebalance, auto exposure, auto focus, black level correction, color correction, 3a-statistics calculation.
  • Support 3rd party 3A lib which can be loaded dynamically
    • hybrid 3a plugin.
  • Support 3a analysis tuning framework for different features
  • Support smart analysis framework
    • Face detection interface/plugin.
  • Enable gstreamer plugin
    • xcamsrc, capture from usb/isp camera, process 3a/basic/advanced features.
    • xcamfilter, improve image quality by advanced features and smart analysis.

Prerequisite:

  • install gcc/g++, automake, autoconf, libtool, gawk, pkg-config
  • Linux kernel > 3.10
  • install ocl-icd-dev, ocl-icd-opencl-dev
  • If --enable-gst, need install libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev
  • If --enable-aiq, need get ia_imaging lib which we don't support
  • If --enable-libcl, need compile or install OpenCL driver
  • If --enable-opencv, suggest OpenCV versions [3.0.0 - 4.0.0) (or: OpenCV Wiki)
  • If --enable-render, need compile OpenSceneGraph library with configure option "-DOSG_WINDOWING_SYSTEM=X11"
  • If --enable-gles, need to install Mesa3D library
  • If --enable-vulkan, need to install Mesa3D library
  • If --enable-avx512, need to install GCC version > 4.9 ( CPUs With AVX-512 required)
  • If --enable-dnn, need to compile OpenVino
  • If --enable-json, need to install json.hpp

Building and installing:

  • Environment variable settings
    For different --prefix options, the environment variables may be different. Please set the environment variable according to the actual situation.
    --prefix=/usr/local:

    export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
    export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0:$GST_PLUGIN_PATH
    source OPENVINO_INSTALLDIR/setupvars.sh
    

    --prefix=/usr:

    export LD_LIBRARY_PATH=/usr/lib/:$LD_LIBRARY_PATH
    export GST_PLUGIN_PATH=/usr/lib/gstreamer-1.0:$GST_PLUGIN_PATH
    source OPENVINO_INSTALLDIR/setupvars.sh
    
  • $ ./autogen.sh [options]

    --prefix=PREFIX         install architecture-independent files in PREFIX [default=/usr/local]
    --enable-debug          enable debug, [default=no]
    --enable-profiling      enable profiling, [default=no]
    --enable-drm            enable drm buffer, [default=no]
    --enable-aiq            enable Aiq 3A algorithm build, [default=no]
    --enable-gst            enable gstreamer plugin build, [default=no]
    --enable-libcl          enable libcl image processor, [default=yes]
    --enable-opencv         enable opencv library, [default=no]
    --enable-capi           enable libxcam-capi library, [default=no]
    --enable-docs           build Doxygen documentation [default=no]
    --enable-3alib          enable 3A lib build, [default=no]
    --enable-smartlib       enable smart analysis lib build, [default=no]
    --enable-gles           enable gles, [default=no]
    --enable-vulkan         enable vulkan, [default=no]
    --enable-avx512         enable AVX-512 instruction, [default=no]
    --enable-render         enable 3D texture render, [default=no]
    --enable-dnn            enable dnn inference, [default=no]
    --enable-json           enable json parser, [default=no]
    

    For example:

    $ ./autogen.sh --prefix=/usr --enable-gst --enable-libcl --enable-opencv \
      --enable-smartlib --enable-profiling --enable-gles --enable-render --enable-dnn
    
  • $ make

  • $ sudo make install

Testing:

  • For detailed test cases, please go to tests page

Reporting Bugs:

  • Bugs or suggestions can be reported on the github issues page
  • Security issues, please send email to [email protected] directly

Mailing list

  • To post a message to all the list members, please send email to [email protected]
  • To register libxcam public maillist, please go to registration page

Maintainer:

Contributors: (orders by first name)

libxcam's People

Contributors

alimt1992 avatar andrey1994 avatar anujm1 avatar dspmeng avatar fanlinxx avatar hhb avatar inteltiger avatar liuyinhangx avatar ruiling-song avatar saininav avatar shincytu avatar shubhamlmp avatar skibey avatar stefanbruens avatar uartie avatar unishift avatar windyuan avatar wujunkai166 avatar wzw-intel avatar yaowang1 avatar zihengchang avatar zongwave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libxcam's Issues

stabilizer.cpp fails to compile with opencv < 3.2

In file included from stabilizer.cpp:21:0:
stabilizer.h:31:21: error: ‘videostab’ is not a namespace-name
 using namespace cv::videostab;
                     ^~~~~~~~~

cv::videostab namespace is defined in <opencv2/videostab.hpp>. In opencv version 3.2+, this header is automatically included from <opencv2/opencv.hpp>. However, prior to version 3.2, files must explicitly include <opencv2/videostab.hpp>

[xcam][master][ISP] Compile failed if disable aiq

Title:
[xcam][0.2.1/master/0.3][ISP] Compile failed if disable aiq

Contents:
BSP: Yocto-Linux or 64-bit linux
Version: Libxcam 0.2.1
HW: rubypark
Regression: new issue

Reproduce steps:

  1. $ ./configure --disable-aiq
  2. $ make

Expect and current result:
The compile should succeed.

Bug description:
error info:
../xcore/.libs/libxcam_core.so: undefined reference to XCam::X3aAnalyzerAiq::X3aAnalyzerAiq(atomisp_sensor_mode_data&, char const*)' ../xcore/.libs/libxcam_core.so: undefined reference toXCam::HybridAnalyzer::HybridAnalyzer(XCam3ADescription, XCam::SmartPtrXCam::AnalyzerLoader&, XCam::SmartPtrXCam::IspController&, char const_)'
collect2: error: ld returned 1 exit status

Provide dependency and compile instructions

It is not clear what dependencies are required to compile libxcam or where to get them. Please provide these details in the README. Although most of this can be extrapolated from configure.ac, it does not always lead to success. For example, see #397.

compile error with osg enabled

On Ubuntu Xenial, Bionic and Cosmic with libopenscenegraph-dev installed, libxcam fails to compile with --enable-osg:

render_osg_model.cpp: In constructor 'XCam::RenderOsgModel::RenderOsgModel(const char*, bool)':
render_osg_model.cpp:70:17: error: 'class osg::Geode' has no member named 'addChild'
         _geode->addChild (node);
                 ^~~~~~~~
mv -f .deps/libxcam_render_la-render_osg_camera_manipulator.Tpo .deps/libxcam_render_la-render_osg_camera_manipulator.Plo
make[3]: *** [Makefile:547: libxcam_render_la-render_osg_model.lo] Error 1

OSG versions on Ubuntu are:

Cosmic: 3.2.3
Bionic: 3.2.3
Xenial: 3.2.1

libxcam compiles fine on Fedora 28 and Fedora 29 with OSG enabled. On Fedora OSG version is >= 3.4.1.

If libxcam requires a minimum OSG version, then this should be checked at configure time and fail if not met instead of allowing compile time to fail. Also, please consider supporting distro OSG packaged version for Ubuntu LTS releases if technically possible.

libxcam compile fails since opencv commit 9097ccf515b8

libxcam fails to compile with recent upstream opencv commit:

commit 9097ccf515b8a92ad39808d01d9ee55f5a4985d3
Author: Alexander Alekhin <[email protected]>
Date:   Sun Sep 9 21:46:46 2018 +0000

    drop legacy headers

compile output:

<snip>
In file included from cv_capi_feature_match.cpp:23:0:
cv_capi_feature_match.h:33:10: fatal error: cv.hpp: No such file or directory
 #include <cv.hpp>
          ^~~~~~~~
compilation terminated.
make[3]: *** [Makefile:610: libxcam_soft_la-cv_capi_feature_match.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from soft_stitcher.cpp:34:0:
cv_capi_feature_match.h:33:10: fatal error: cv.hpp: No such file or directory
 #include <cv.hpp>
          ^~~~~~~~
compilation terminated.
make[3]: *** [Makefile:603: libxcam_soft_la-soft_stitcher.lo] Error 1
<snip>

file handle leaks increase fast

when running xcamsrc, there are lots file handle leaks, and number is increasing very fast every second.
libxcam commit e965dff
Steps:

  1. run
    $ gst-launch-1.0 xcamsrc io-mode=4 imageprocessor=1 analyzer=2 pipe-profile=0 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=25/1 ! queue ! vaapiencode_h264 rate-control=cbr ! fakesink
  2. get process_id and check file handles
    $ ps | grep gst-launch # to get PID
    $ ls -l /proc/PID/fd | wc -l

Expect result:
file handle(fd) keep the same number in running time.

Actual result:
number of fd increasing fast

关于libxcam编译的问题

您好,打扰了。
看到你在维护持续维护libxcam,想向你请教一个关于libxcam编译的问题。
我使用 ./configure --enable-aiq --enable-libcl该命令,想启用aiq和cl功能,但是编译后生成的libxcam_core.a的静态库中并没有aiq和cl函数符号,也就是说 --enable-aiq 和--enable-libcl并没有使得对应的功能生效,不太清楚是否缺少了什么配置
希望得到您的指点,谢谢~~

xcamsrc hang when ctl-c quit with raw-file-input

ENV:
Linux
libxcam: commit 72d03bc

Reproduce steps:

  1. capture a raw video file
    e.g ./test-device-manager -f BA10 -m mmap -d still -s -n 10 # save a video stream on every 10th frame
  2. simulate raw-file-input with xcamsrc plugin.
    gst-launch-1.0 xcamsrc io-mode=4 imageprocessor=1 analyzer=2 pipe-profile=2 fake-input="capture_buffer.raw" ! video/x-raw, format=NV12, width=1920, height=1080, framerate=25/1 ! queue ! vaapiencode_h264 rate-control=cbr ! fake
  3. CTRL+C to break gst pipeline

Expect Result:
program quit soon.

Actual Result:
sometimes, program hang there with dead-locks. looks like FakePollThread hang there waiting for
buffer release.

GDB stacks.
Thread 1.
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i586/../i486/pthread_cond_wait.S:188

188 in ../nptl/sysdeps/unix/sysv/linux/i386/i586/../i486/pthread_cond_wait.S
(gdb) bt
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i586/../i486/pthread_cond_wait.S:188
#1 0xb72eddf5 in XCam::Cond::wait (this=0x87dfc58, mutex=...) at ../../xcore/xcam_mutex.h:79
#2 0xb723506b in XCam::Thread::stop (this=0x87dfc30) at xcam_thread.cpp:116
#3 0xb721fcb5 in XCam::PollThread::stop (this=0x89e8790) at poll_thread.cpp:161
#4 0xb7213b71 in XCam::DeviceManager::stop (this=0x874c750) at device_manager.cpp:274
#5 0xb72e67db in gst_xcam_src_stop (src=0x874e0e8) at gstxcamsrc.cpp:858
#6 0xb6fcaa4d in gst_base_src_stop (basesrc=basesrc@entry=0x874e0e8) at gstbasesrc.c:3418
#7 0xb6fd2b64 in gst_base_src_activate_push (pad=0x8750008, active=0, parent=0x874e0e8) at gstbasesrc.c:3571

....

Thread 3
#3 0xb72102f0 in XCam::BufferPool::get_buffer (this=0xb29008e0, self=...) at buffer_pool.cpp:198
#4 0xb721966a in XCam::FakePollThread::poll_buffer_loop (this=0x89e8790) at fake_poll_thread.cpp:83
#5 0xb722062c in XCam::CapturePollThread::loop (this=0x87dfc30) at poll_thread.cpp:69
#6 0xb7234e5b in XCam::Thread::thread_func (user_data=0x87dfc30) at xcam_thread.cpp:67

[xcam][master][CL] Convent RGBA to LAB failed

Title:
[xcam][0.3/master/0.4][CL] Convent RGBA to LAB failed

Contents:
BSP: Yocto-Linux or 64-bit linux
Version: Libxcam 0.3
HW: rubypark
Regression: new issue

Reproduce steps:
$ test-cl-image -t csc -f RGBA -i input.rgba -o output.lab -c rgbatolab

Expect and current result:
The conversion should be successful.
Bug description:
Error info:
test-cl-image: video_buffer.cpp:203: bool XCam::VideoBufferInfo::init(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t): Assertion `size >= image_size' failed.

[xcam][master][CL] Preview failure when Open HDR and TNR-lab at the same time

Title:
[xcam][0.2.1/master/0.3][CL] Preview failure when Open HDR and TNR-lab at the same time

Contents:
BSP: Yocto-Linux
Version: Libxcam 0.2.1
HW: rubypark
Regression: yes, in 0717's image, it's ok.

Reproduce steps:

  1. deploy the image to rubypark device
  2. open HDR and TNR-lab in config files
  3. run command:
    test-device-manager -m dma -c -f BA10 -d still -p -a dynamic

Expect and current result:
Open HDR and TNR-lab at the same time, the preview should be normal.

Bug description:
The preview will be stuck when Open HDR and TNR-lab at the same time.

compile failure on ubuntu trusty 14.04 LTS

On Ubuntu Trusty 14.04 LTS, the following compilation failure occurs:

make[2]: Entering directory `/opt/media/build/libxcam/tests'
/bin/bash ../libtool  --tag=CXX   --mode=link g++ -fPIC -DSTDC99 -W -Wall -D_REENTRANT -Wformat -Wformat-security -fstack-protector -g -DDEBUG -std=c++0x -I/usr/include/libdrm   -ldrm   -I../ext/atomisp -I../xcore -I../modules  -g3  -L/opt/media/install/lib -o test-device-manager test_device_manager-test-device-manager.o ../xcore/libxcam_core.la  ../modules/ocl/libxcam_ocl.la 
libtool: link: g++ -fPIC -DSTDC99 -W -Wall -D_REENTRANT -Wformat -Wformat-security -fstack-protector -g -DDEBUG -std=c++0x -I/usr/include/libdrm -I../ext/atomisp -I../xcore -I../modules -g3 -o .libs/test-device-manager test_device_manager-test-device-manager.o  -ldrm -L/opt/media/install/lib ../xcore/.libs/libxcam_core.so ../modules/ocl/.libs/libxcam_ocl.so -pthread -Wl,-rpath -Wl,/opt/media/install/lib
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to `clCreateCommandQueueWithProperties'
collect2: error: ld returned 1 exit status
make[2]: *** [test-device-manager] Error 1
make[2]: Leaving directory `/opt/media/build/libxcam/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/media/build/libxcam'
make: *** [all] Error 2

I have installed apt packages ocl-icd-dev, ocl-icd-opencl-dev and compiled/installed beignet from source.

Configure should check minimum OpenCV version

Configure allows any opencv version. However, libxcam will not compile with opencv < 3.0 when opencl enabled:

In file included from ../../modules/ocl/cv_base_class.h:32:0,
                 from ../../modules/ocl/cv_feature_match.h:31,
                 from cl_image_360_stitch.h:30,
                 from cl_post_image_processor.cpp:35:
../../modules/ocl/cv_context.h:39:32: fatal error: opencv2/core/ocl.hpp: No such file or directory
 #include <opencv2/core/ocl.hpp>

opencv2/core/ocl.hpp is not available until opencv 3.0.

Configure should require opencv at least version 3.0

Race condition in Thread::thread_func

Hello!

I've found a possible race condition in xcam/xcore/xcam_thread.cpp.

    while (true) {
      {
        SmartLock locker(thread->_mutex);
        if (!thread->_started || ret == false) {
          thread->_started = false;
          thread->_thread_id = 0;
          thread->_exit_cond.signal();
          ret = false;
          break;
        }
      }
      
      ret = thread->loop ();
    }    
    thread->stopped ();

When we stop the thread we wait on a condition variable:

bool Thread::stop ()
{
    SmartLock locker(_mutex);
    if (_started) {
        _started = false;
        _exit_cond.wait(_mutex);
    }
    return true;
}

The matter is, that thread->stopped() is not protected with the thread mutex, so there is a possibility for a Thread object to be deleted before thread->stopped() is called, which would lead to a segfault.

The state of the program depends on which thread finishes it's work first( the one deleting the Thread object(and that would lead to a segfault in thread->stopped()) or the one running thread_func() itself).

Tutorial

Hello,
I could not locate any tutorial in neither libXCam installation folder nor anywhere on the web. Is there such a facility or is libXCam is mostly about OpenCL so there is not any such specific tutorial?

binary file included with source

The binary file cl_bin/kernel_demo.cl.bin is included with source.

Looks like it was intended to be cleaned in clx_bin/Makefile.am

Some distributors (inlcuding Debian where I am involved) do not allow such binary code as part of source, and your current release 0.8.0 (and HEAD of git as well) therefore in suitable, causing extra work for such (re)distributors in repackaging the source.

Please consider cleaning up the source to not include built binary code.

build failures when enabling gstreamer

this is happening with the following configure:

--disable-static --enable-gst --disable-aiq --disable-libcl --disable-capi

error:

v -f .deps/libgstxcamsrc_la-gstxcambuffermeta.Tpo .deps/libgstxcamsrc_la-gstxcambuffermeta.Plo
gstxcamsrc.cpp: In function 'void gst_xcam_src_class_init(GstXCamSrcClass*)':
gstxcamsrc.cpp:488:63: error: 'DEFAULT_PROP_IMAGE_PROCESSOR' was not declared in this scope
GST_TYPE_XCAM_SRC_IMAGE_PROCESSOR, DEFAULT_PROP_IMAGE_PROCESSOR,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
gstxcamsrc.cpp:488:63: note: suggested alternative: 'PROP_IMAGE_PROCESSOR'
GST_TYPE_XCAM_SRC_IMAGE_PROCESSOR, DEFAULT_PROP_IMAGE_PROCESSOR,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
PROP_IMAGE_PROCESSOR
gstxcamsrc.cpp: In function 'void gst_xcam_src_init(GstXCamSrc*)':
gstxcamsrc.cpp:634:37: error: 'DEFAULT_PROP_IMAGE_PROCESSOR' was not declared in this scope
xcamsrc->image_processor_type = DEFAULT_PROP_IMAGE_PROCESSOR;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
gstxcamsrc.cpp:634:37: note: suggested alternative: 'PROP_IMAGE_PROCESSOR'
xcamsrc->image_processor_type = DEFAULT_PROP_IMAGE_PROCESSOR;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
PROP_IMAGE_PROCESSOR
make[4]: *** [Makefile:695: libgstxcamsrc_la-gstxcamsrc.lo] Error 1
make[4]: *** Waiting for unfinished jobs....

test surround view falied

Here is my command:

test-surround-view --module soft --input0 1.yuv --input1 2.yuv --input2 3.yuv --input3 4.yuv --output output.mp4 --in-w 640 --in-h 540 --out-w 1920 --out-h 640 --topview-w 1280 --topview-h 720 --scale-mode dualconst --frame-mode multi --save true --save-topview true --loop 1

I ran it on ubuntu 16.04, opencv 3.3.1

It turned out that :

input0 file: 1.yuv
input1 file: 2.yuv
input2 file: 3.yuv
input3 file: 4.yuv
output file: output.mp4
input width: 640
input height: 540
output width: 1920
output height: 640
topview width: 1280
topview height: 720
scaling mode: dualconst
frame mode: multiframe
save output: true
save topview: true
loop count: 1
OpenCV: FFMPEG: tag 0x34363258/'X264' is not supported with codec id 28 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x00000021/'!???'
XCAM INFO test-surround-view.cpp:620: calibration config path:./calib_params/
XCAM WARNING calibration_parser.cpp:201: open intrinsic file(./calib_params//intrinsic_camera_front.txt) failed.
XCAM ERROR test-surround-view.cpp:152: parse intrinsic params (./calib_params//intrinsic_camera_front.txt)failed.
XCAM ERROR test-surround-view.cpp:625: parse fisheye dewarp info(idx:0) failed.

What‘s wrong? Sorry, I am a newbee.

Communication Channels

Please provide information in README and Wiki about Mailing List and IRC/Slack channels used for project communications.

[xcam][master][CL] stats info Y/RGB histogram calculation error

Almost half of all pixels were filled into histgram bin 0 in all light conditions.

debug trace of histogram y:
3960 0 0 16 43 82 100 166 164 198 194 144 193 217 295 324
351 224 183 142 114 80 65 30 34 25 25 27 26 21 29 24
16 15 7 5 7 6 5 7 10 11 8 10 8 9 5 11
6 9 14 1 2 10 4 8 6 5 6 2 2 3 3 4
3 6 5 1 1 6 7 4 5 6 5 8 4 3 5 6
8 8 6 6 8 2 1 2 1 0 1 0 0 1 0 0
1 1 4 0 0 1 2 0 0 1 1 0 0 0 1 0
0 0 0 0 0 0 0 0 2 0 0 0 1 0 1 0
0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0
0 0 0 0 0 0 1 0 1 1 0 2 0 0 0 1
0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0
1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1
1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0
0 0 1 0 3 0 0 1 0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 1 1 0 2 2
0 0 0 0 2 0 0 0 0 0 0 0 0 1 3 143

[xcam][master][CL] Preview failure when open SNR

Title:
[xcam][0.2.1/master/0.3][CL] Preview failure when open SNR

Contents:
BSP: Yocto-Linux
Version: Libxcam 0.2.1
HW: rubypark
Regression: new issue

Reproduce steps:

  1. deploy the image to rubypark device
  2. open SNR in config files
  3. run command:
    test-device-manager -m dma -c -f BA10 -d still -p -a dynamic --enable-snr

Expect and current result:
Open SNR, the preview should be normal.

Bug description:
The preview will be stuck when open SNR, and the preview has only one frame.

[xcam][master][bug file example]This is one example to file an xcam bug in github

Title:
[xcam][0.2/master/0.2.1][gst-xcamsrc]
[xcam][0.2/master/0.2.1][ISP]
[xcam][0.2/master/0.2.1][CL]
[xcam][0.2/master/0.2.1][API]
[xcam][0.2/master/0.2.1][framework]
[xcam][0.2/master/0.2.1][smart]

Contents:
BSP: xxxx
Version: xxxx
HW: rubypark
Regression: no
Reproduce steps:

  1. build
  2. run xxxx

Expect and current result:
xxxx

Bug description:
xxxx

Fail in test-cl-image

Try to compile beignet and libxcam on Ubuntu 16.04 / CUDA 8.0.
Finally, when trying:
./test-cl-image -t retinex -f RGBA -i ./input.png -o ./output.png
the errors below occur:
/libxcam/tests/.libs/lt-test-cl-image: /usr/local/cuda-8.0/lib64/libOpenCL.so.1: no version information available (required by /libxcam/modules/ocl/.libs/libxcam_ocl.so.1)
X server found. dri2 connection failed!
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
cl_get_gt_device(): error, unknown device: 0
XCAM WARNING cl_device.cpp:113: get cl device ID failed
XCAM WARNING cl_device.cpp:52: CL device init failed
XCAM DEBUG cl_device.cpp:54: CL device constructed
lt-test-cl-image: cl_kernel.cpp:39: XCam::CLKernel::CLKernel(const XCam::SmartPtrXCam::CLContext&, const char*): Assertion `context.ptr ()' failed.
Aborted (core dumped)

Actually, the errors below have occurred during Make:
make all-recursive
make[1]: Entering directory '/libxcam'
Making all in xcore
make[2]: Entering directory '/libxcam/xcore'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/libxcam/xcore'
Making all in clx_kernel
make[2]: Entering directory '/libxcam/clx_kernel'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/libxcam/clx_kernel'
Making all in modules
make[2]: Entering directory '/libxcam/modules'
Making all in ocl
make[3]: Entering directory '/libxcam/modules/ocl'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/libxcam/modules/ocl'
make[3]: Entering directory '/libxcam/modules'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/libxcam/modules'
make[2]: Leaving directory '/libxcam/modules'
Making all in plugins
make[2]: Entering directory '/libxcam/plugins'
make[3]: Entering directory '/libxcam/plugins'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/libxcam/plugins'
make[2]: Leaving directory '/libxcam/plugins'
Making all in wrapper
make[2]: Entering directory '/libxcam/wrapper'
make[3]: Entering directory '/libxcam/wrapper'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/libxcam/wrapper'
make[2]: Leaving directory '/libxcam/wrapper'
Making all in capi
make[2]: Entering directory '/libxcam/capi'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/libxcam/capi'
Making all in tests
make[2]: Entering directory '/libxcam/tests'
/bin/bash ../libtool --tag=CXX --mode=link g++ -fPIC -DSTDC99 -W -Wall -D_REENTRANT -Wformat -Wformat-security -fstack-protector -g -DDEBUG -std=c++0x -I/usr/include/libdrm -ldrm -I../ext/atomisp -I../xcore -I../modules -g -O2 -o test-device-manager test_device_manager-test-device-manager.o ../xcore/libxcam_core.la ../modules/ocl/libxcam_ocl.la
libtool: link: g++ -fPIC -DSTDC99 -W -Wall -D_REENTRANT -Wformat -Wformat-security -fstack-protector -g -DDEBUG -std=c++0x -I/usr/include/libdrm -I../ext/atomisp -I../xcore -I../modules -g -O2 -o .libs/test-device-manager test_device_manager-test-device-manager.o -ldrm ../xcore/.libs/libxcam_core.so ../modules/ocl/.libs/libxcam_ocl.so -pthread -Wl,-rpath -Wl,/usr/local/lib/beignet/lib
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clCreateCommandQueueWithProperties@OPENCL_2.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetDeviceIDs@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clReleaseCommandQueue@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clBuildProgram@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetExtensionFunctionAddressForPlatform@OPENCL_1.2' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clCreateKernel@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetPlatformIDs@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clSetKernelArg@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clCreateProgramWithBinary@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetPlatformInfo@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetProgramInfo@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clCreateBuffer@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clReleaseProgram@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clSetEventCallback@OPENCL_1.1'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clReleaseEvent@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clEnqueueReadBuffer@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clCreateContext@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clCreateImage@OPENCL_1.2'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clWaitForEvents@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clEnqueueMapImage@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clEnqueueWriteBuffer@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clFinish@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetProgramBuildInfo@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetEventInfo@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clReleaseContext@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clEnqueueUnmapMemObject@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetDeviceInfo@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clEnqueueNDRangeKernel@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clCreateProgramWithSource@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetImageInfo@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clReleaseKernel@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clReleaseMemObject@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clFlush@OPENCL_1.0' ../modules/ocl/.libs/libxcam_ocl.so: undefined reference to clGetMemObjectInfo@OPENCL_1.0'
../modules/ocl/.libs/libxcam_ocl.so: undefined reference to `clEnqueueMapBuffer@OPENCL_1.0'
collect2: error: ld returned 1 exit status
Makefile:541: recipe for target 'test-device-manager' failed
make[2]: *** [test-device-manager] Error 1
make[2]: Leaving directory '/libxcam/tests'
Makefile:436: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/libxcam'
Makefile:368: recipe for target 'all' failed
make: *** [all] Error 2

the problems about build

when i build the libxcam , there is some errors "
cl_context.h:108:37: error: 'cl_import_buffer_info_intel' does not name a type
cl_mem import_dma_buffer (const cl_import_buffer_info_intel &import_info);"

where i cant find the type define about 'cl_import_buffer_info_intel' ???

fedora 23 libcl not found

fedora 23

./configure --enable-libcl --enable-opencv --enable-debug

 libxcam configuration summary
 version                    : 0.8.0
 enable debug               : yes
 enable profiling           : no
 build GStreamer plugin     : no
 build aiq analyzer         : no
 use local aiq              : no
 use local atomisp          : yes
 have opencl lib            : no
 have opencv lib            : yes
 enable 3a lib              : no
 enable smart analysis lib  : no

any help what packages are needed?

compile error when --disable-opencl

In file included from ../modules/ocl/cl_kernel.h:26,
from ../modules/ocl/cl_image_handler.h:27,
from context_priv.h:26,
from context_priv.cpp:21:
../modules/ocl/cl_event.h:26:10: fatal error: CL/cl.h: No such file or directory
#include <CL/cl.h>

About gamma table setting?

According src of libxcam, there are three gamma tables which are r_gamma,g_gamma and b_gamma. However I can only generate one gamma table with Intel IQ Tool. So, I don't know how I use this table from Intel IQ Tool to set the gamma paramter into libxcam. Are there any points for my problem? Thank you~~

broken output of test-image-stitching sample

test-image-stitching sample produces broken output on Ubuntu 16.04 (i7-6770HQ) with Beignet.
Compiled with OpenCL & OpenCV support & "OCL_TILING=0" symbol exported.
Input & output images enclosed.

input
stitch

does these bunch of opencl accelerated image algorithm support rgb color space ?

hi,I want to port the opencl accelerated 3dnr to mobile device, for the performance consideration, I create cl_mem from a opengles texture, in this case the texture internal format only suppoer RGBA on my device (texture with rgba format is must for opencl interop with opengl on my device),so are there any way that can applying the opencl implemented algorithm on rgba color space image? thanks.

bogus copyright year

Copyright header of xcore/base/xcam_smart_result.h covers the (quite likely) bogus year "206".

You probably meant to say "2016" :-)

‘XCAM_VERSION’ was not declared in this scope

Hello,
I am trying to compile "test-image-deblurring.cpp" in tests folder of libxcam. However, compiler asserts these error lines:

In file included from /usr/include/xcam/ocl/cl_image_handler.h:33:0,
from /usr/include/xcam/ocl/cl_blender.h:27,
from test-image-deblurring.cpp:28:
/usr/local/include/xcam/x3a_result.h: In constructor ‘XCam::X3aStandardResultT::X3aStandardResultT(uint32_t, XCamImageProcessType, uint32_t)’:
/usr/local/include/xcam/x3a_result.h:117:33: error: ‘XCAM_VERSION’ was not declared in this scope
_result->head.version = XCAM_VERSION;
^
I searched XCAM_VERSION by typing grep -nr 'XCAM_VERSION' under libxcam folder and the result is

x3a_result.h:117: _result->head.version = XCAM_VERSION;

So, I think this macro is never defined. Is this so and how can I solve this problem?

XCAM WARNING v4l2_buffer_proxy.cpp:134: unknown v4l2 format(MJPG) to video info

libxcam cannot capture the MJPG stream
XCAM INFO v4l2_device.cpp:280: device(/dev/video0) set framerate(48/1)
XCAM INFO v4l2_device.cpp:299: device(/dev/video0) set format(w:2304, h:1536, pixelformat:MJPG, bytesperline:0,image_size:7077888)

it would be perfect if libxcam can use libyami for decode the JPG data with the Intel vaapi Api
and/or use a OpenCL like
https://github.com/neveraway/oclJPEGDecoder
amd uses ocl
http://developer.amd.com/resources/articles-whitepapers/jpeg-decoding-with-run-length-encoding-a-cpu-and-gpu-approach/

here some benchmark from the OpenKinec project for JPG decode
https://github.com/OpenKinect/libfreenect2/wiki/Performance

Media SDK for Windows - DirectX9 surfaces

Hello,
We're looking into methods for accelerated fish eye de-warping to panorama of IP camera feeds, encoded as H264. Our platform is Windows. We use the Intel Media SDK for accelerated decode of h264 to NV12 surfaces. These surfaces are DirectX9. Have you any pointers on how to integrate LibXCam into the Media SDK environment on a Windows platform?

We see an OpenCL plugin loader and DirectX surface sharing example as part of the 2018 Media SDK (sample_plugin_opencl).
Do we therefore need a libxcam.cl file?

Thank you in advance.

libxcam build failure with ToT opencv

The build is failing with ToT https://github.com/opencv/opencv/commits/master branch on Fedora and Ubuntu.
Error snippet:
14:11:20,466 INFO - In file included from soft_stitcher.cpp:34:0:
14:11:20,466 INFO - cv_capi_feature_match.h:59:29: error: 'CvArr' has not been declared
14:11:20,466 INFO - void add_detected_data (CvArr* image, std::vector &corners);
14:11:20,466 INFO - ^~~~~
14:11:20,466 INFO - cv_capi_feature_match.h:59:55: error: 'CvPoint2D32f' was not declared in this scope
14:11:20,466 INFO - void add_detected_data (CvArr* image, std::vector

Full log attached.
libxcam_fail.txt

Error is caused by OpenCV dropping support for DISABLE_OPENCV_24_COMPATIBILITY
opencv/opencv@2b2fa58

[xcam][master][CL] When export OCL_TILING=2, video has ghost with encoder

Title:
[xcam][0.2/master/0.2.1][CL]

Contents:
BSP: Yocto-linux
Version: Libxcam 0.2.1
HW: rubypark
Regression: no

Reproduce steps:

  1. deploy the image to rubypark device
  2. run mediapipe
  3. run VLC to access IPCamera

Expect and current result:
The preview should be normal, but video has ghost with encoder.

Bug description:
When export OCL_TILING=2 in terminal, video has ghost with encoder.

gbe_bin_generater offline compiler occurs assert error

root@kzsmartipc:/tmp# ./gbe_bin_generater kernel_csc_nv12torgba.cl -o kernel_csc_nv12torgba.cl.bin -t 0x0f31
ASSERTION FAILED: sel.hasDoubleType()
at file /home/guoqiang/code/git_code/master/IPC/libOpenSource/Trunk/src/Beignet-1.2.1-Source/backend/src/backend/gen_insn_selection.cpp, function void gbe::ConvertInstructionPattern::convertBetweenFloatDouble(gbe::Selection::Opaque&, const gbe::ir::ConvertInstruction&, bool&) const, line 5110
Trace/breakpoint trap

why & thanks

Are there any test files for testing?

Thanks for your repo, It's powerful and amazing. I am trying it's stitch function. But I find there are no test videos (.nv12) can be used. And I am not sure whether a calibration board should be captured in the test video.

Thanks
Sir.

autogen.sh should run ./configure

It is common practice for ./autogen.sh to automatically run ./configure for you. See intel-vaapi-driver's autogen.sh for an example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.