Oleg, Winston,

JPEG is 4:0:0 YCbCr, JP4 is just raw Bayer data, there is no color conversion.

Andrey

---- On Fri, 04 May 2018 15:00:07 -0700 Oleg 
<support-list@support.elphel.com> wrote ---- 

 
What is different of the format yuv and yours jp4? How can I get yuv-data? If I 
want to get high quality image not to be compressed, whether I choose the yuv 
data or jp4 data? Thank you! 
See https://wiki.elphel.com/wiki/JP4



JP4 is 4:0:0 YCbCr encoded. After reordering back blocks of pixels you get the 
pixel values of the Bayer pattern. Try this python script for deblocking. After 
deblocking you can:
* unapply gammas to get to linear scale
* unapply gains to work with unamplified data


I want to get camera image raw data(.jp4) buffer, but I cannot get it through 
gstreamer. I should do a demo app with C/C++, how can I get the camera image 
raw data, and keep the two camera sync?





The sensors are always in sync (if exposure time is less than 1/fps).


Your problem is to download matching jp4 images from different ports buffers, 
correct?


If yes then here's what you can do in your program - example for port 0 and 
port 1:


I. Without stopping compressor/sensors


step 1 Read current image pointers in port 0 and port 1 buffers:


port0: http://192.168.0.9:2323/pointers 
port1: http://192.168.0.9:2324/pointers 

(responses are xml, extract <this>...</this> value)

port0: 
... <this>55801952</this>...port1:
... <this>xxxxxxx1</this>... 
And so:
$THISPOINTER0 = 55801952
$THISPOINTER1 = xxxxxxx1




step 2 Read meta data



http://192.168.0.9:2323/$THISPOINTER0/meta
http://192.168.0.9:2324/$THISPOINTER1/meta

Responses are xml - extract and compare timestamps (from 
<timestamp>...</timestamp>)


step 2a If timestamps don't match and 'port 0 timestamp' < 'port 1 
timestamp' - you will need check one frame back for port 1.


Note: there a short help how to navigate the buffers: http://192.168.0.9:2323 


port1: http://192.168.0.9:2324/$THISPOINTER1/prev/pointers
... <this>xxxxxxx2</this>...

$NEWPOINTER1 = xxxxxxx2



next read timestamp from http://192.168.0.9:2324/$NEWPOINTER1/meta and compare. 
If 'port 0 timestamp' still < 'port 1 timestamp' then
$THISPOINTER1 = $NEWPOINTER1, repeat this step



step 3 When timestamps are finally matching, download image(s):

http://192.168.0.9:2323/$THISPOINTER0/img

http://192.168.0.9:2324/$THISPOINTER1/img



Here, we are assuming all requests are performed quickly enough


II. With stopping triggering



step 1 
Set TRIG_PERIOD=0


... next steps are the same as in I. but most likely the latest timestamps will 
match and you won't have to navigate through buffers:
meta: http://192.168.0.9:2323/meta
meta: http://192.168.0.9:2324/meta
image: http://192.168.0.9:2323/img

image: http://192.168.0.9:2324/img



step X
Restore TRIG_PERIOD



I could probably make a script to do those things and put on the camera.


https://wiki.elphel.com/wiki/Using_gstreamer please look at the red rectangle 
area, what is this mean? This is outdated information. It should work as 
described here.
So, after you start the streamers: 
elphel393~# /usr/bin/strTo watch a stream with gstreamer from PC, example:
port0: gst-launch-1.0 rtspsrc location=rtsp://192.168.0.9:554 ! rtpjpegdepay ! 
jpegdec ! videoscale ! video/x-raw,width=640,height=480 ! xvimagesink sync=false
port1: gst-launch-1.0 rtspsrc location=rtsp://192.168.0.9:554 ! rtpjpegdepay ! 
jpegdec ! videoscale ! video/x-raw,width=640,height=480 ! xvimagesink sync=false


 And this web paper introduce an stream of yuv-format(“gst-launch -v rtspsrc 
location=rtsp://192.168.0.9:554 ! queue ! rtpjpegdepay ! queue ! jpegdec ! 
queue ! \videorate ! capsfilter caps="video/x-raw-yuv, format=(fourcc)I420, 
width=(int)1024, height=(int)768, framerate (fraction)25/1" ! \ queue ! avimux 
! filesink location=/tmp/test.avi”), but in you setting web of image, I cannot 
find the value point to the yuv 


Value point? This is an old example - I cannot make it work.



Best regards,
Oleg Dzhimiev
Electronics Engineer
phone: +1 801 783 5555 x124
Elphel, Inc.
 

 _______________________________________________ 
Support-list mailing list 
Support-list@support.elphel.com 
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com 





_______________________________________________
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com

Reply via email to