|
Project Information
Featured
Downloads
Links
|
AboutThis project hosts Elphel cameras related gstreamer components, so far:
For information about JP4 and demosaicing, see WhyJP4
This project is sponsored by Ubicast. jp462bayer: JP4 to BayerAfter jpegdec, re-arranges the pixels in Bayer format. Features:
bayer2rgb2 debayerIt offers the same features as the legacy bayer2rgb, but by wrapping Libdc1394's debayering algorithms you can choose the interpoloation algorithm between : simple, bilinear, hqlinear, downsample, edgesense, vng, ahd, nearest. TODOs
UsageInstallingTo compile, see HowToInstall Pre-compiled binaries (for 32 bits, 0.10.28 Gstreamer) are also available in the downloads section:
Put them into the ~/.gstreamer-0.10/plugins directory (create it if it does not exist yet). Jp462bayer optionsthreads : Number of threads used by the plugin (0 for automatic). Currently, fast downsampling is disabled if the number of threads > 1; when using fast downsampling, use threads=1 Debayering optionsgst-inspect bayer2rgb2: method: Demosaicing interpolation algorithmEnum "GstMethodeRGB" Default: 0, Current: 0, Note: since bayer2rgb2-0.6, Bilinear (0) is now the default, and the algorithm used has switched from libdc1394's implentation to David Schleef's accelerated implementation using ORC, which is blazing fast. bpp: bits per pixel in raw sensor dataFALSE = 8 bpp, TRUE = 16 bpp. flags: accès en lecture, accès en écriture Boolean. Default: false Current: false pixel order is defined by using bayer caps, e.g. "video/x-raw-bayer, width=(int)960, height=(int)544, framerate=(fraction)24/1, format=(string)grbg" Example pipelinesAssuming that elphel is in your /etc/hosts file, pointing to the correct IP address:
gst-launch-0.10 rtspsrc location=rtsp://elphel:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! jpegdec ! queue ! jp462bayer ! "video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg" ! queue ! bayer2rgb2 method=1 ! ffmpegcolorspace ! queue ! xvimagesink For fast image resizing, use caps after jp462bayer; note that for image reduction to work, target caps need to be the original resolution divided by 4 or 16 and threads=1.
gst-launch-0.10 rtspsrc location=rtsp://elphel:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! jpegdec ! queue ! jp462bayer ! "video/x-raw-bayer, width=(int)480, height=(int)272, format=(string)grbg" ! queue ! bayer2rgb2 method=1 ! ffmpegcolorspace ! queue ! xvimagesink
gst-launch-0.10 rtspsrc location=rtsp://elphel:554 protocols=0x00000001 latency=100 ! rtpjpegdepay ! tee name=raw_tee ! queue ! jpegdec ! queue ! jp462bayer ! "video/x-raw-bayer, width=(int)480, height=(int)272, format=(string)grbg" ! queue ! bayer2rgb2 method=1 ! ffmpegcolorspace ! queue ! xvimagesink raw_tee. ! queue ! videorate ! "image/jpeg, width=(int)1920, height=(int)1088, framerate=(fraction)25/1" ! matroskamux ! filesink location=jp46test.mkv -e
gst-launch-0.10 filesrc location=fruits.jp4 ! jpegdec ! queue ! jp462bayer threads=2 ! queue ! bayer2rgb2 ! queue ! ffmpegcolorspace ! freeze ! xvimagesink
gst-launch-0.10 filesrc location=jp46test.mkv ! decodebin ! ffmpegcolorspace ! queue ! jp462bayer ! "video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg" ! queue ! bayer2rgb2 method=1 ! queue ! ffmpegcolorspace ! xvimagesink
gst-launch filesrc location=jp46test.mkv ! decodebin ! ffmpegcolorspace ! queue ! jp462bayer ! "video/x-raw-bayer, width=(int)1920, height=(int)1088, format=(string)grbg" ! queue ! bayer2rgb2 method=5 ! queue ! ffmpegcolorspace ! "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)1920, height=(int)1088, framerate=(fraction)25/1" ! jpegenc ! matroskamux ! filesink location=test.mkv |