Difference between revisions of "Working with raw image data"
From ElphelWiki
(Created page with "==Downloading== * Available options (channels can be 0..3): # set receiving buffer size in 4kB pages (thus 4096 equals to 16MB) echo {size} > /sys/devices/soc0/elphel393-mem...") |
(→Downloading) |
||
Line 1: | Line 1: | ||
==Downloading== | ==Downloading== | ||
* Available options (channels can be 0..3): | * Available options (channels can be 0..3): | ||
− | # set receiving buffer size in 4kB pages (thus 4096 equals to 16MB) | + | <font size='2em'># set receiving buffer size in 4kB pages (thus 4096 equals to 16MB) |
− | echo {size} > /sys/devices/soc0/elphel393-mem\@0/buffer_pages_raw_chn2 | + | '''echo {size} > /sys/devices/soc0/elphel393-mem\@0/buffer_pages_raw_chn2''' |
# start from the N-th frame position in buffer. Currently, 0 or 1 | # start from the N-th frame position in buffer. Currently, 0 or 1 | ||
− | echo 1 > /sys/devices/soc0/elphel393-videomem\@0/video_frame_number | + | '''echo 1 > /sys/devices/soc0/elphel393-videomem\@0/video_frame_number''' |
# initiate transfer, wait for X-th frame (X - absolute frame number), 0 = no waiting | # initiate transfer, wait for X-th frame (X - absolute frame number), 0 = no waiting | ||
− | echo X > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2 | + | '''echo X > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2''' |
− | |||
# copy to file | # copy to file | ||
− | cat /dev/image_raw2 > /tmp/test.raw | + | '''cat /dev/image_raw2 > /tmp/test.raw''' |
# see in hex | # see in hex | ||
− | hexdump /tmp/test.raw | + | '''hexdump /tmp/test.raw''' |
− | |||
# copy to PC | # copy to PC | ||
− | scp /tmp/test.raw user@address:/path/ | + | '''scp /tmp/test.raw user@address:/path/'''</font> |
− | |||
* Minimal: | * Minimal: | ||
− | echo 4096 > /sys/devices/soc0/elphel393-mem\@0/buffer_pages_raw_chn2 | + | <font size='2em'>'''echo 4096 > /sys/devices/soc0/elphel393-mem\@0/buffer_pages_raw_chn2''' |
− | echo 0 > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2 | + | '''echo 0 > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2''' |
− | cat /dev/image_raw2 > /tmp/test.raw | + | '''cat /dev/image_raw2 > /tmp/test.raw'''</font> |
==Previewing== | ==Previewing== |
Revision as of 10:53, 12 January 2018
Downloading
- Available options (channels can be 0..3):
# set receiving buffer size in 4kB pages (thus 4096 equals to 16MB) echo {size} > /sys/devices/soc0/elphel393-mem\@0/buffer_pages_raw_chn2 # start from the N-th frame position in buffer. Currently, 0 or 1 echo 1 > /sys/devices/soc0/elphel393-videomem\@0/video_frame_number # initiate transfer, wait for X-th frame (X - absolute frame number), 0 = no waiting echo X > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2 # copy to file cat /dev/image_raw2 > /tmp/test.raw # see in hex hexdump /tmp/test.raw # copy to PC scp /tmp/test.raw user@address:/path/
- Minimal:
echo 4096 > /sys/devices/soc0/elphel393-mem\@0/buffer_pages_raw_chn2 echo 0 > /sys/devices/soc0/elphel393-videomem\@0/membridge_start2 cat /dev/image_raw2 > /tmp/test.raw