Giter Club home page Giter Club logo

lirs_ros_video_streaming's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m Ramil Safin (ใƒฉใƒŸใƒซใ€€ใ‚ตใƒ•ใ‚ฃใƒณ)!
  • ๐Ÿ‘€ Iโ€™m interested in mobile robotics and computer vision.
  • ๐ŸŒฑ Iโ€™m currently learning ML and Japanese (ๆ—ฅๆœฌ่ชž).
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on online robotics and computer vision courses.
  • ๐Ÿ“ซ Feel free to reach me on Telegram: @safin_ramil.

lirs_ros_video_streaming's People

Contributors

ramsafin avatar

Stargazers

 avatar

Watchers

 avatar

lirs_ros_video_streaming's Issues

Video capture controls API

V4L2 controls API is needed to be able to change such properties as gain, exposure, etc.
See controls v4l2 docs for more info.

How it may work:

...
lirs::V4L2Capture capture("/dev/video0", ...);  // standard controls are utilized

capture.Set(ControlEnumWhatever, value);  // change control

Some controls require the streaming to be restarted (including new v4l2 buffers allocation).

Rename v4l2 utils structure into v4l2

V4L2Utils structure is in lirs::utils namespace and should be renamed to the V4L2 structure inside this namespace. The reason is that the name is too long and inconvenient to use.

Support for changing capturing and streaming parameters in ROS

This issue is closely related to #5 and #6 where parameters of video capture can be changed in runtime. Those parameters include v4l2 controls (e.g. gain, saturation, whitebalance, etc.), frame resolution and frame rate (streaming process needs to be reloaded), and others.

Parameters could be changed either via service calls or dynamic reconfigure.

Publish frames using native timestamp

Captured frames are published with the generated timestamp (ROS Time). However, for better synchornization, for example, when using two cameras for disparity map construction it is better if timestamps reflect real frames captured time.
[This question on stackoverflow] (https://stackoverflow.com/questions/10266451/where-does-v4l2-buffer-timestamp-value-starts-counting) demonstates that v4l2 drivers do not use realtime clock, so it should be converted somehow.

Resample captured images

Most of the v4l2 cameras allow to choose different frame size, however some of the devices lack of this functionality. That is why, in case of large frame size and image format conversion load on CPU may become huge. So, in order to avoid issues related to large frame size, image downsampling functionality would be helpful.

Handle exceptions

Exception occurred during the process of initializing/capturing from v4l device are needed to be properly processed.

Changing capture parameters in runtime

Let's consider the code:

...
lirs::V4L2VideoCapture capture("/dev/video0", ...);
if (capture.IsOpened()) {
    capture.StartStreaming();
    // formats, frame, etc. rate are negotiated, buffers are allocated
    capture.Set(lirs::CaptureParams::FPS, 60);   // change the frame
}

In the code above frame rate is being changed during streaming process.
Currently, this change will be ignored. However, it is expected to change streaming frame rate in runtime. See v4l2 Buffer docs for more info on how it should be handled.

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.