Imaging solutions with Free Software & Open Hardware

Who's online

There are currently 0 users online.

Working with raw image data

Wiki Recent Changes - Thu, 01/18/2018 - 18:02

‎Downloading

← Older revision Revision as of 01:02, 19 January 2018 (2 intermediate revisions by the same user not shown)Line 1: Line 1: −==<font color='darkblue'>Downloading</font>==+==<font color='darkblue'>Capturing and downloading</font>==  +===Command line, demo script: raw.py ===  +* run:  + <font size='2em'>'''root@elphel393:~# raw.py'''</font>  +* description:  + <font size='2em'>1. scans all available ports, determines the trigger master  + 2. reads current frame_number to be used later  + 3. formats system memory buffers and mmaps to user memory (all available ports)  + 4. selects position in video memory (0 or 1)  + 5. triggers copying pixel data from video memory to system memory for the frame_number+1 (waiting is implemented in the videomem driver)  + 6. prints the first 16 bytes of the image  + 7. prints raw image info for each port</font>  +   +===Command line===  * Available options (channels can be 0..3): * Available options (channels can be 0..3):    <font size='2em'># 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) Line 19: Line 32:    '''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'''</font>   '''cat /dev/image_raw2 > /tmp/test.raw'''</font> −  −      ==<font color='darkblue'>Displaying</font>== ==<font color='darkblue'>Displaying</font>== Line 39: Line 50:  ===Python=== ===Python===  * Camera settings: 2592x1936 JPEG: * Camera settings: 2592x1936 JPEG:  +** a)  + <font size='2em'>#!/usr/bin/env python  + import cv2  + import numpy as np  +  + width = 2608  + height = 1940  +  + with open("test.raw", "rb") as rawimg:  +    img = np.fromfile(rawimg, np.dtype('u1'), width * height).reshape(height, width)  +    img.tofile("test2.raw")  +    colimg = cv2.cvtColor(img, cv2.COLOR_BAYER_GB2BGR)  +    cv2.imwrite("test.jpeg", colimg)  +    #cv2.imshow("color", colimg)  +    #cv2.waitKey(0)</font>  +  +** b) for PC:    <font size='2em'>''#!/usr/bin/python3''   <font size='2em'>''#!/usr/bin/python3''    from PIL import Image   from PIL import Image Oleg

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: forgot to install raw.php

Elphel GIT logs - Thu, 01/18/2018 - 17:28
Oleg Dzhimiev committed changes to the Elphel git project :
forgot to install raw.php

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: more comments

Elphel GIT logs - Thu, 01/18/2018 - 17:15
Oleg Dzhimiev committed changes to the Elphel git project :
more comments

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: +help

Elphel GIT logs - Thu, 01/18/2018 - 17:01
Oleg Dzhimiev committed changes to the Elphel git project :
+help

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: test and added help

Elphel GIT logs - Thu, 01/18/2018 - 16:59
Oleg Dzhimiev committed changes to the Elphel git project :
test and added help

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: moved raw.php to php_top

Elphel GIT logs - Thu, 01/18/2018 - 13:52
Oleg Dzhimiev committed changes to the Elphel git project :
moved raw.php to php_top

01/18/18 [meta-elphel393][master-next] by Oleg Dzhimiev: Added python3 and python3-opencv

Elphel GIT logs - Thu, 01/18/2018 - 13:48
Oleg Dzhimiev committed changes to the Elphel git project :
Added python3 and python3-opencv

01/18/18 [x393][CMV300] by Oleg Dzhimiev: minor change in shebang

Elphel GIT logs - Thu, 01/18/2018 - 13:37
Oleg Dzhimiev committed changes to the Elphel git project :
minor change in shebang

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: cleanup

Elphel GIT logs - Thu, 01/18/2018 - 11:21
Oleg Dzhimiev committed changes to the Elphel git project :
cleanup

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: minor changes

Elphel GIT logs - Thu, 01/18/2018 - 11:17
Oleg Dzhimiev committed changes to the Elphel git project :
minor changes

Working with raw image data

Wiki Recent Changes - Thu, 01/18/2018 - 11:10

‎Python

← Older revision Revision as of 18:10, 18 January 2018 (One intermediate revision by the same user not shown)Line 39: Line 39:  ===Python=== ===Python===  * Camera settings: 2592x1936 JPEG: * Camera settings: 2592x1936 JPEG:  +** a)  + <font size='2em'>#!/usr/bin/env python  + import cv2  + import numpy as np  +  + width = 2608  + height = 1940  +  + with open("test.raw", "rb") as rawimg:  +    img = np.fromfile(rawimg, np.dtype('u1'), width * height).reshape(height, width)  +    img.tofile("test2.raw")  +    colimg = cv2.cvtColor(img, cv2.COLOR_BAYER_GB2BGR)  +    cv2.imwrite("test.jpeg", colimg)  +    #cv2.imshow("color", colimg)  +    #cv2.waitKey(0)</font>  +  +** b) for PC:    <font size='2em'>''#!/usr/bin/python3''   <font size='2em'>''#!/usr/bin/python3''    from PIL import Image   from PIL import Image Oleg

01/18/18 [elphel-web-393][] by Oleg Dzhimiev: +demo scripts

Elphel GIT logs - Thu, 01/18/2018 - 10:39
Oleg Dzhimiev committed changes to the Elphel git project :
+demo scripts

01/18/18 [linux-elphel][rocko] by Oleg Dzhimiev: added fullwidth (16B burst aligned) and actual width to sysfs

Elphel GIT logs - Thu, 01/18/2018 - 10:23
Oleg Dzhimiev committed changes to the Elphel git project :
added fullwidth (16B burst aligned) and actual width to sysfs

01/17/18 [linux-elphel][rocko] by Oleg Dzhimiev: put correct width value for jp4 and jpeg settings

Elphel GIT logs - Wed, 01/17/2018 - 19:37
Oleg Dzhimiev committed changes to the Elphel git project :
put correct width value for jp4 and jpeg settings

01/17/18 [linux-elphel][rocko] by Oleg Dzhimiev: fixed frame number to raw info

Elphel GIT logs - Wed, 01/17/2018 - 13:13
Oleg Dzhimiev committed changes to the Elphel git project :
fixed frame number to raw info

01/17/18 [linux-elphel][rocko] by Oleg Dzhimiev: Added raw_frame_info to sysfs

Elphel GIT logs - Wed, 01/17/2018 - 11:22
Oleg Dzhimiev committed changes to the Elphel git project :
Added raw_frame_info to sysfs

01/16/18 [elphel-web-393][] by Oleg Dzhimiev: tested mmap

Elphel GIT logs - Tue, 01/16/2018 - 15:07
Oleg Dzhimiev committed changes to the Elphel git project :
tested mmap

Tmp manual

Wiki Recent Changes - Tue, 01/16/2018 - 13:25

‎Accessing raw pixel values

← Older revision Revision as of 20:25, 16 January 2018 (2 intermediate revisions by the same user not shown)Line 267: Line 267:     ==<font color="blue">Firmware images</font>== ==<font color="blue">Firmware images</font>== −* [https://community.elphel.com/files/393/20180109/ '''20180109''']+* [https://community.elphel.com/files/393/20180116/ '''20180116''']  +* [https://community.elphel.com/files/393/20180109/ 20180109]  * [https://community.elphel.com/files/393/20171120/ 20171120] * [https://community.elphel.com/files/393/20171120/ 20171120]  * [https://community.elphel.com/files/393/20171115/ 20171115] * [https://community.elphel.com/files/393/20171115/ 20171115] Line 318: Line 319:  ===Powering from batteries (12V or 48V)=== ===Powering from batteries (12V or 48V)===  [[10393_power#Powering_from_batteries| 12V and 48V power options]] [[10393_power#Powering_from_batteries| 12V and 48V power options]]  +===Accessing raw pixel values===  +[[Working_with_raw_image_data|Working with raw pixel data]]     ==<font color="blue">Known problems</font>== ==<font color="blue">Known problems</font>== Oleg

01/16/18 [elphel-web-393][] by Oleg Dzhimiev: test scripts to get raw files

Elphel GIT logs - Tue, 01/16/2018 - 11:21
Oleg Dzhimiev committed changes to the Elphel git project :
test scripts to get raw files

10353

Wiki Recent Changes - Sat, 01/13/2018 - 22:35

← Older revision Revision as of 05:35, 14 January 2018 Line 1: Line 1:  +{{Legacy}}  +See current products here: [[10393]]  +  [[Image:10353top_sm.jpeg|frame|[[Media:10353top.jpeg|10353 board, top view]]]] [[Image:10353top_sm.jpeg|frame|[[Media:10353top.jpeg|10353 board, top view]]]]  [[Image:10353bot_sm.jpeg|frame|[[Media:10353bot.jpeg|10353 board, bottom view]]]] [[Image:10353bot_sm.jpeg|frame|[[Media:10353bot.jpeg|10353 board, bottom view]]]] Andrey.filippov

Pages

Subscribe to www3.elphel.com aggregator