Imaging solutions with Free Software & Open Hardware

Who's online

There are currently 0 users online.

Subscribe to Wiki Recent Changes feed
Track the most recent changes to the wiki in this feed. MediaWiki 1.28.0
Updated: 8 min 9 sec ago

Eyesis4Pi samples

Mon, 01/09/2017 - 19:47

Eyesis4Pi samples

Mon, 01/09/2017 - 18:47

← Older revision Revision as of 01:47, 10 January 2017 (One intermediate revision not shown)Line 1: Line 1: ==Notes== ==Notes== -* The posted below images are equirectangular projections made for the WebGL Viewer / Editor. More information about WebGL panorama viewer / editor is available on [http://blog.elphel.com/2011/06/eyesis-outdoor-panorama-sets-and-the-viewereditor/ Elphel blog]+* Source files - equirectangular projection (14268x7135).  +* Demos:  +{| class='wikitable'  +! Name  +! Source  +! Description  +|-  +| Elphel's WebGL Panorama Viewer/Editor  +| style='text-align:center' | [https://sourceforge.net/p/elphel/webgl_panorama_editor/ci/master/tree/ sf.net/elphel]  +| WebGL, Open Street Map, [http://blog.elphel.com/2011/06/eyesis-outdoor-panorama-sets-and-the-viewereditor/ '''More information''']  +|-  +| three.js  +| style='text-align:center' | [https://threejs.org/examples/?q=panoram#webgl_panorama_equirectangular three.js]  +| WebGL  +|-  +| aframe.js  +| style='text-align:center' | [https://aframe.io/examples/showcase/sky/ aframe.js]  +| WebVR, Mobile, based on three.js  +|} * WebGL Panorama Viewer requires a browser supporting WebGL like Firefox4 or Chrome and high-performance video card. * WebGL Panorama Viewer requires a browser supporting WebGL like Firefox4 or Chrome and high-performance video card. Line 30: Line 48: |<font size="3">[http://community.elphel.com/files/eyesis/pano-db-3/webgl_panorama_editor.html?kml=20120801_ro.kml&proto=20120801_ro.kml&ntxt=2&as_camera=95&start=result_1342928255_838636.jpeg&range=95&labels=false&keepzoom=false&closest2d=false&seethrough=0.4&transition=5&mask=&azimuth=59.9&elevation=-4.7&zoom=0.276&follow=false&mv3d=false&fovy=45 Open in WebGL Viewer]</font> |<font size="3">[http://community.elphel.com/files/eyesis/pano-db-3/webgl_panorama_editor.html?kml=20120801_ro.kml&proto=20120801_ro.kml&ntxt=2&as_camera=95&start=result_1342928255_838636.jpeg&range=95&labels=false&keepzoom=false&closest2d=false&seethrough=0.4&transition=5&mask=&azimuth=59.9&elevation=-4.7&zoom=0.276&follow=false&mv3d=false&fovy=45 Open in WebGL Viewer]</font> |} |}  +<!-- <br> <br> {| {| Line 39: Line 58: |<font size="3">[http://community.elphel.com/files/eyesis/pano-db-3/webgl_panorama_editor.html?kml=20120801_ro.kml&proto=20120801_ro.kml&ntxt=2&as_camera=95&start=result_1342928119_838636.jpeg&range=95&labels=false&keepzoom=false&closest2d=false&seethrough=0.4&transition=5&mask=&azimuth=353.2&elevation=0.1&zoom=0.284&follow=false&mv3d=false&fovy=45 Open in WebGL Viewer]</font> |<font size="3">[http://community.elphel.com/files/eyesis/pano-db-3/webgl_panorama_editor.html?kml=20120801_ro.kml&proto=20120801_ro.kml&ntxt=2&as_camera=95&start=result_1342928119_838636.jpeg&range=95&labels=false&keepzoom=false&closest2d=false&seethrough=0.4&transition=5&mask=&azimuth=353.2&elevation=0.1&zoom=0.284&follow=false&mv3d=false&fovy=45 Open in WebGL Viewer]</font> |} |}  +--> <br> <br> {| {| Oleg

Tmp manual

Fri, 01/06/2017 - 13:44

browser:

← Older revision Revision as of 20:44, 6 January 2017 Line 150: Line 150: * http://192.168.0.9/camogmgui.php * http://192.168.0.9/camogmgui.php </font> </font>  +Follow [[Camogmgui|this link]] for GUI description. ====command line==== ====command line==== Mikhail

Camogmgui

Fri, 01/06/2017 - 13:40

← Older revision Revision as of 20:40, 6 January 2017 Line 1: Line 1: -==Webbased '''G'''raphical '''U'''ser '''I'''nterface for camogm called '''camogmgui'''==+==Web-based Graphical User Interface for camogm== -This interface enables to directly record video to internal/external camera HDD or CF card using just the browser.+The web interface for ''camogm'' is intended for recording of video or images to internal or external storage just from your browser. Elphel393 series cameras support recording in two modes: normal recording to a file system and fast recording to a raw disk or disk partition without any file system on it. ==Prerequisites== ==Prerequisites== -To record video to a brand new HDD it has to be partitioned and formatted first.+Disk should be prepared before it can be used in either of the two modes of recording. Normal recording assumes there is at least one partition with a file system. Follow [[HDD_Format | this guide]] from step 1 to step 4 to prepare a partition for normal recording if your disk is not partitioned yet. Fast recording mode requires at least one partition without file system. Follow [[HDD_Format | this guide]] from step 1 to step 3 to prepare such partition. As alternative, the whole disk can be used as a fast recording buffer and no actions with disk required in this case given that the disk in not partitioned. -To do so follow [[HDD_Format | this guide]] from Steps 1 - 4.+==Interface==  +===Main window===  +Open the following link in your browser to start ''camogmgui''  + http://192.168.0.9/camogmgui.php  +[[File:Camogmgui main.png|center|alt=Main window]]  +The main window of the program consists of several areas (marked in red on the image) and two of them, preview (1) and buffers usage (2), are folded by default. The third area displays a list of files recorded in normal mode to some directory on the mounted disk. This list is empty right after start and you need to press ''Reload'' button to refresh the list. ''Create folder'' button makes new subdirectory in the current directory and ''Set Target Folder'' sets selected directory as a location for recorded files. The group of tabs on the right side contains status information and controls for recording. The first tab of the group, ''Status'', shows status of all ports and some recording statistics. Some fields on this tab are empty right after start but they will be updated as soon as recording has started. By default, the update period during recording is one second. -Camogmgui will takes care of the remaining step 5 and 6 (mounting the HDD) itself.+===Preview===  +[[File:Camogmgui preview.png|center|alt=Preview panel]]  +The ''Live-Preview'' link opens a thumbnail of a captured image and some controls for preview capturing. Preview image can be updated manually each time the ''Update'' button is pressed or automatically within a predefined period of time if ''Auto Update'' check box is checked. The ''Size'' buttons allows you to adjust the image size. Preview is displayed for a single channel selected by ''Port'' radio buttons.  +   +===Buffers usage===  +[[File:Camogmgui buffers.png|center|alt=Buffers usage]]  +The ''Show Buffers'' link opens several bars indicating the usage of in-camera memory buffers. Each bar corresponds to a single sensor port and shows free space left in buffer and the space occupied by images which have not been recorded yet. The status of these bars is updated along with the content of the ''Status'' tab. Click on any bar to fold these indicators back to link. The ''HELP'' link below bars leads to this page.  +   +===File names tab===  +[[File:Camogmgui filenames.png|right|alt=File names tab]]  +The ''Filenames'' tab controls file naming scheme for recorded files. There are three schemes available:  +* Unix time stamps. The name of a file is created from image time stamp and channel number extracted from Exif. The example of such naming scheme is shown on the screenshot of main window. This is a default scheme.  +* Prompt user for file name after recording  +* Advanced naming scheme. This scheme assembles file names using several predefined fields.  +The settings on this tab are ineffective in fast recording mode.  +<br style="clear:both" />  +   +===Format tab===  +[[File:Camogmgui format norm.png|right|alt=Normal recording mode]]  +[[File:Camogmgui format fast.png|right|alt=Fast recording mode]]  +The ''Format'' tab controls recording mode and path for resulting files. The group of radio buttons named ''Format'' selects resulting file format. ''Use fast recording'' check box switches ''camogm'' to fast recording mode and disables ''Format'' and ''Directory'' settings because they are ineffective in this mode. The ''Directory'' text field sets full path to a directory where files are saved. Note, that this is a path in camera system, not on your PC. The ''Devices'' panel shows a list of disks or partitions available for recording. The contents of this panel depends on the mode of operation: in normal recording mode, the list of mountable partitions is shown, and in fast recording mode the list of partitions or disks without file system is presented. The group of controls below devices list allows you to enable or disable ''camogm'' debug output, save this output to a file and adjust its level of verbosity. Do not forget to press ''OK'' button before recording to apply the settings.  +<br style="clear:both" />  +   +===Advanced tab===  +[[File:Camogmgui advanced.png|right|alt=Advanced tab]]  +The ''Advanced'' tab controls how video files are recorded. The settings on this tab allows you to limit the size and duration of single video file. When either limit is reached, ''camogm'' starts recording to a new file. The settings on this tab are ineffective in fast recording mode.  +<br style="clear:both" /> ==Plans for Future Releases== ==Plans for Future Releases== Mikhail

File:Camogmgui advanced.png

Fri, 01/06/2017 - 13:11

uploaded "[[File:Camogmgui advanced.png]]"

Mikhail

File:Camogmgui format fast.png

Fri, 01/06/2017 - 12:08

uploaded "[[File:Camogmgui format fast.png]]"

Mikhail

File:Camogmgui filenames.png

Fri, 01/06/2017 - 11:48

uploaded "[[File:Camogmgui filenames.png]]"

Mikhail

Using camogm with Elphel393 camera

Fri, 01/06/2017 - 10:40

← Older revision Revision as of 17:40, 6 January 2017 (One intermediate revision not shown)Line 1: Line 1: -Elphel 393 series cameras can be equipped with m.2 SSD drive used for images and video recording. The camera equipped with a drive should be configured in a way that the drive can be accessible from Linux operating system. This is normally done with a configuration script which is executed during system boot. The script is usually located in the root directory on microSD card or in the /etc directory and called ''init_elphel393.sh''. These is a set of parameters in the beginning of the script and one of them is responsible for SATA controller configuration and driver loading:+===Introduction===  +Elphel 393 series cameras can be equipped with m.2 SSD drive used for images and video recording. The camera equipped with a drive should be configured in a way that the drive can be accessible from Linux operating system. This is normally done with a configuration script which is executed during system boot. The script is located in the /etc/elphel393 directory and called ''init_elphel393.py''. There is a set of parameters which this script receives from init script /etc/ini.d/init_elphel393 and one of them is responsible for SATA controller configuration and driver loading: -  SATA_EN=1+  \"sata\"            :1, Make sure this parameter is set to 1 if your camera is equipped with SSD drive. You should see the following messages in system log after successful initialization and auto-mounting: Make sure this parameter is set to 1 if your camera is equipped with SSD drive. You should see the following messages in system log after successful initialization and auto-mounting: Line 17: Line 18:   [  30.646115] sd 0:0:0:0: [sda] Attached SCSI disk   [  30.646115] sd 0:0:0:0: [sda] Attached SCSI disk -The disk model and the number of partitions(sda1 and sda2) in the example above correspond to a test platform and they may not be the same in your camera. <code>/dev/sda2</code> in this example is not partitioned and not mounted:+The disk model and the number of partitions (sda1 and sda2) in the example above correspond to a test platform and they may not be the same in your camera. <code>/dev/sda2</code> in this example is not partitioned and not mounted:   ~# mount   ~# mount Line 31: Line 32:   /dev/sda1 on /mnt/sda1 type ext2 (rw,relatime,errors=continue)   /dev/sda1 on /mnt/sda1 type ext2 (rw,relatime,errors=continue) -The program for video/images recording is called ''camogm''. Its full description for previous series of Elphel cameras is available on [[Camogm]] wiki page. Current version of the program supports four sensor channels and has the same command set as the previous version, but commands can be sent to each channel separately. The program can be started the same way as described in [[Camogm#Starting_camogm|Starting camogm]] section, but now it will create four command pipes instead of one and each pipe will have channel number appended to the name provided on command line:+The program for video/images recording is called ''camogm''. Its full description for previous series of Elphel cameras is available on [[Camogm]] wiki page. Current version of the program supports four sensor channels and has the same command set as the previous version. The program can be started the same way as described in [[Camogm#Starting_camogm|Starting camogm]] section and it will create command pipe called ''camogm_cmd'' in the following directory:   root@elphel393:~# ls -l /var/volatile/state/   root@elphel393:~# ls -l /var/volatile/state/ Line 42: Line 43: Note, that ''camogm'' is under development and not all features of the previous version have been ported to new camera. As for now, geo tagging and exif specific commands are not implemented. Watch for updates on our [https://github.com/Elphel github page]. Note, that ''camogm'' is under development and not all features of the previous version have been ported to new camera. As for now, geo tagging and exif specific commands are not implemented. Watch for updates on our [https://github.com/Elphel github page].  +You can start ''camogm'' as a standalone command-line application or use web GUI interface in a browser to control the program. The examples of using ''camogm'' in both ways are shown below. ===Example=== ===Example=== ====1. WebGUI==== ====1. WebGUI==== * http://192.168.0.9/camogmgui.php * http://192.168.0.9/camogmgui.php -* In the '''Format''' tab checkthe settings then press OK button+* In the '''Format''' tab check the settings then press OK button {| {| | valign='top'|[[File:Camogmgui format tab.png|thumb|400px|Fig.1 Camogmgui - change recording formats]] | valign='top'|[[File:Camogmgui format tab.png|thumb|400px|Fig.1 Camogmgui - change recording formats]] Line 51: Line 53: |} |} =====Fast recording===== =====Fast recording=====  +''camogm'' can write data to disk or partition in a special fast recording mode. This mode supports higher sequential write speeds than those that can be achieved during regular file recording to a file system but additional step to extract data from disk is needed. Use [https://github.com/Elphel/elphel-tools-x393 these scripts] to extract raw data from disk and split it into separate images. * Keep '''Use fast recording''' checkbox selected - press OK then RECORD * Keep '''Use fast recording''' checkbox selected - press OK then RECORD ** An image sequence will be written to a raw partition. ** An image sequence will be written to a raw partition. Line 56: Line 59: =====Normal recording===== =====Normal recording=====  +In this mode ''camogm'' saves data to regular files on a file system. * Deselect '''Use fast recording''' * Deselect '''Use fast recording''' * Choose '''Format''' (Ogg Media Stream is not tested) * Choose '''Format''' (Ogg Media Stream is not tested) Mikhail

File:Camogmgui main.png

Fri, 01/06/2017 - 09:47

uploaded "[[File:Camogmgui main.png]]"

Mikhail

Tmp manual

Fri, 01/06/2017 - 06:44

Serial console access:

← Older revision Revision as of 13:44, 6 January 2017 Line 82: Line 82: Most likely the device will be <b>/dev/ttyUSB0</b>. Settings: Most likely the device will be <b>/dev/ttyUSB0</b>. Settings: * <b>115200 8N1, no</b> for hardware/software flow control * <b>115200 8N1, no</b> for hardware/software flow control - +Refer to the following article for more details on using '''minicom''': [http://wiki.elphel.com/index.php?title=Using_minicom_to_connect_to_Elphel393_camera Using minicom to connect to Elphel393 camera] - + ==<font color="blue">Web user interface (camvc)</font>== ==<font color="blue">Web user interface (camvc)</font>== Mikhail

Boot options 393

Fri, 01/06/2017 - 06:18

← Older revision Revision as of 13:18, 6 January 2017 (One intermediate revision not shown)Line 17: Line 17: ==<font color="blue">Boot instructions</font>== ==<font color="blue">Boot instructions</font>== ===Internal NAND flash (default)=== ===Internal NAND flash (default)=== -* Make sure the recovery card is not inserted (recovery card can stay in)+* Make sure the recovery card is not inserted (regular card can stay in) * Power on * Power on Line 79: Line 79: * '''To build a custom device tree''', see [http://wiki.elphel.com/index.php?title=Poky_2.0_manual SDK manual]''' * '''To build a custom device tree''', see [http://wiki.elphel.com/index.php?title=Poky_2.0_manual SDK manual]'''  +The cp210x_gpio.py script controls GPIO pins for CP210X USB to UART Bridges and it comes with the patch for the cp210x driver. ==<font color="blue">cp210x_gpio.py -h</font>== ==<font color="blue">cp210x_gpio.py -h</font>==   $./cp210x_gpio.py -h   $./cp210x_gpio.py -h Mikhail

Using camogm with Elphel393 camera

Thu, 01/05/2017 - 20:25

← Older revision Revision as of 03:25, 6 January 2017 Line 1: Line 1: -Elphel 393 series cameras can be equipped with m.2 SSD drive used for images and video recording. The camera equipped with a drive should be configured in a way that the drive can be accessible from Linux operating system. This is normally done with a configuration script which is executed during system boot. The script is usually located in the root directory on microSD card or in the /etc directory and called ''init_elphel393.sh''. These is a set of parameters in the beginning of the script and one of them is responsible for SATA controller configuration and driver loading:+===Introduction===  +Elphel 393 series cameras can be equipped with m.2 SSD drive used for images and video recording. The camera equipped with a drive should be configured in a way that the drive can be accessible from Linux operating system. This is normally done with a configuration script which is executed during system boot. The script is located in the /etc/elphel393 directory and called ''init_elphel393.py''. There is a set of parameters which this script receives from init script /etc/ini.d/init_elphel393 and one of them is responsible for SATA controller configuration and driver loading: -  SATA_EN=1+  \"sata\"            :1, Make sure this parameter is set to 1 if your camera is equipped with SSD drive. You should see the following messages in system log after successful initialization and auto-mounting: Make sure this parameter is set to 1 if your camera is equipped with SSD drive. You should see the following messages in system log after successful initialization and auto-mounting: Line 17: Line 18:   [  30.646115] sd 0:0:0:0: [sda] Attached SCSI disk   [  30.646115] sd 0:0:0:0: [sda] Attached SCSI disk -The disk model and the number of partitions(sda1 and sda2) in the example above correspond to a test platform and they may not be the same in your camera. <code>/dev/sda2</code> in this example is not partitioned and not mounted:+The disk model and the number of partitions (sda1 and sda2) in the example above correspond to a test platform and they may not be the same in your camera. <code>/dev/sda2</code> in this example is not partitioned and not mounted:   ~# mount   ~# mount Line 31: Line 32:   /dev/sda1 on /mnt/sda1 type ext2 (rw,relatime,errors=continue)   /dev/sda1 on /mnt/sda1 type ext2 (rw,relatime,errors=continue) -The program for video/images recording is called ''camogm''. Its full description for previous series of Elphel cameras is available on [[Camogm]] wiki page. Current version of the program supports four sensor channels and has the same command set as the previous version, but commands can be sent to each channel separately. The program can be started the same way as described in [[Camogm#Starting_camogm|Starting camogm]] section, but now it will create four command pipes instead of one and each pipe will have channel number appended to the name provided on command line:+The program for video/images recording is called ''camogm''. Its full description for previous series of Elphel cameras is available on [[Camogm]] wiki page. Current version of the program supports four sensor channels and has the same command set as the previous version. The program can be started the same way as described in [[Camogm#Starting_camogm|Starting camogm]] section and it will create command pipe called ''camogm_cmd'' in the following directory:   root@elphel393:~# ls -l /var/volatile/state/   root@elphel393:~# ls -l /var/volatile/state/ Line 42: Line 43: Note, that ''camogm'' is under development and not all features of the previous version have been ported to new camera. As for now, geo tagging and exif specific commands are not implemented. Watch for updates on our [https://github.com/Elphel github page]. Note, that ''camogm'' is under development and not all features of the previous version have been ported to new camera. As for now, geo tagging and exif specific commands are not implemented. Watch for updates on our [https://github.com/Elphel github page].  +You can start ''camogm'' as a stand-along command-line application or use web GUI interface in a browser to control the program. The examples of using ''camogm'' in both ways are shown below. ===Example=== ===Example=== ====1. WebGUI==== ====1. WebGUI==== * http://192.168.0.9/camogmgui.php * http://192.168.0.9/camogmgui.php -* In the '''Format''' tab checkthe settings then press OK button+* In the '''Format''' tab check the settings then press OK button {| {| | valign='top'|[[File:Camogmgui format tab.png|thumb|400px|Fig.1 Camogmgui - change recording formats]] | valign='top'|[[File:Camogmgui format tab.png|thumb|400px|Fig.1 Camogmgui - change recording formats]] Line 51: Line 53: |} |} =====Fast recording===== =====Fast recording=====  +''camogm'' can write data to disk or partition in a special fast recording mode. This mode supports higher sequential write speeds than those that can be achieved during regular file recording to a file system but additional step to extract data from disk is needed. Use [https://github.com/Elphel/elphel-tools-x393 these scripts] to extract raw data from disk and split it into separate images. * Keep '''Use fast recording''' checkbox selected - press OK then RECORD * Keep '''Use fast recording''' checkbox selected - press OK then RECORD ** An image sequence will be written to a raw partition. ** An image sequence will be written to a raw partition. Line 56: Line 59: =====Normal recording===== =====Normal recording=====  +In this mode ''camogm'' saves data to regular files on a file system. * Deselect '''Use fast recording''' * Deselect '''Use fast recording''' * Choose '''Format''' (Ogg Media Stream is not tested) * Choose '''Format''' (Ogg Media Stream is not tested) Mikhail

10393

Thu, 01/05/2017 - 20:14

Mechanical properties:

← Older revision Revision as of 03:14, 6 January 2017 (3 intermediate revisions not shown)Line 21: Line 21: ====Interfaces==== ====Interfaces==== -[[File:Nc393 4sensors.jpeg|thumb|220px|10393 + 4 sensors]]+[[File:Nc393-dev-sm.jpeg|thumb|220px|10393 + 4 sensors]] * Gigabit ethernet * Gigabit ethernet * micro USB - system console (serial port), reboot, select boot device * micro USB - system console (serial port), reboot, select boot device Line 42: Line 42: ====Power==== ====Power==== * 3.3VDC * 3.3VDC -====Mechanical properties====+====Physical properties==== * Dimensions: 96x38x20.5 mm (with all connectors installed). Height can be reduced by removing the network connector. * Dimensions: 96x38x20.5 mm (with all connectors installed). Height can be reduced by removing the network connector. * Weight: 31 g * Weight: 31 g Line 58: Line 58: * Sources: * Sources: ** [https://github.com/Elphel GitHub/Elphel] ** [https://github.com/Elphel GitHub/Elphel]  +* SDK installation docs  +** [[Poky_2.0_manual|Set up development environment]]  +  +====User Manual====  +* [[Tmp_manual|User guide]] ====License==== ====License==== Oleg

10393

Thu, 01/05/2017 - 17:46

SDK:

← Older revision Revision as of 00:46, 6 January 2017 (One intermediate revision not shown)Line 58: Line 58: * Sources: * Sources: ** [https://github.com/Elphel GitHub/Elphel] ** [https://github.com/Elphel GitHub/Elphel]  +* SDK installation docs  +** [[Poky_2.0_manual|Set up development environment]]  +  +====User Manual====  +* [[Tmp_manual|User guide]] ====License==== ====License==== Oleg

Tmp manual

Thu, 01/05/2017 - 14:09

Tools for calibrated systems:

← Older revision Revision as of 21:09, 5 January 2017 Line 267: Line 267: ** distortion correction (pixel mapping) ** distortion correction (pixel mapping) ** rectification and projection ** rectification and projection  +** '''JP46 Reader camera''' - decode JP4/JP46  +** '''Eyesis correction''' - post-process JP4s using calibration data ====switch between ERS and GRR modes in MT9P006==== ====switch between ERS and GRR modes in MT9P006==== Oleg

JP4

Thu, 01/05/2017 - 13:46

python:

← Older revision Revision as of 20:46, 5 January 2017 (9 intermediate revisions not shown)Line 84: Line 84: ==<font color="blue">JP4</font>== ==<font color="blue">JP4</font>==  +{|  +|[[File:Jp4 example rotated asjpeg.jpeg|200px|thumb|JP4 opened as JPEG, rotated 90&deg;]]  +|[[File:Jp4 example rotated processed.jpeg|200px|thumb|JP4 processed, rotated 90&deg;]]  +|}  +* If opened as a normal image the macro blocks will be displayed as 8x32.  +===PC===  +====ImageJ plugin====  +* [[Elphel_Software_Kit_for_Ubuntu#ImageJ_and_Elphel_plugins_for_imageJ|Install ImageJ plugins]]  +* run: Plugins > JP46 reader camera  +** can display JP4/JP46 as monochrome w/o demosaicing  +** can split color channels  +====html canvas + javascript====  +* [https://github.com/Elphel/elphel-web-393/blob/master/src/jp4-canvas/elphel.js reorderJP4Blocks()]  +====python====  +* very slow  + import numpy as np  + from PIL import Image  + import scipy.misc  + ...  + # in JP4 format the 16x16 block is 8x32 (GRBG)  + # the 1st line of 8x32 blocks is the left half of the image  + # the 2nd line of 8x32 blocks is the right half  +       + # vertical step = 16px  + for y in range(0,self.h,16):  +  for x in range(0,self.w,16):  +                   +    bx = x if x<self.w/2 else x-self.w/2  +    by = y if x<self.w/2 else y+8  +                   +    block8x8_gr = self.px[by:by+8,2*bx+0 :2*bx+ 8]  +    block8x8_r  = self.px[by:by+8,2*bx+8 :2*bx+16]  +    block8x8_b  = self.px[by:by+8,2*bx+16:2*bx+24]  +    block8x8_gb = self.px[by:by+8,2*bx+24:2*bx+32]  +                 +    for dy in range(8):  +      for dx in range(8):  +        #OpenCV uses BGR format  +        output[y+2*dy+0,x+2*dx+0]=[0,block8x8_gr[dy,dx][0],0]  +        output[y+2*dy+0,x+2*dx+1]=[0,0,block8x8_r[dy,dx][0]]  +        output[y+2*dy+1,x+2*dx+0]=[block8x8_b[dy,dx][0],0,0]  +        output[y+2*dy+1,x+2*dx+1]=[0,block8x8_gb[dy,dx][0],0]  + ... ==<font color="blue">JP46</font>== ==<font color="blue">JP46</font>== Line 92: Line 135: |} |} ===PC=== ===PC===  +====ImageJ plugin====  +* same as for [[JP4#ImageJ_plugin|JP4]] ====Decoding in MATLAB==== ====Decoding in MATLAB==== JP46 format can be easy manipulated in [http://www.mathworks.com/matlabcentral/fileexchange/22144 MATLAB] JP46 format can be easy manipulated in [http://www.mathworks.com/matlabcentral/fileexchange/22144 MATLAB] Oleg

JP4

Thu, 01/05/2017 - 10:16

Format variations:

Show changes Oleg

JP4

Thu, 01/05/2017 - 09:22

JP46 processing on the host:

← Older revision Revision as of 16:22, 5 January 2017 (6 intermediate revisions not shown)Line 1: Line 1: -== JP4 Format ==+==JP4 Format== -JP4 format is based on JPEG compression, it was originally developed at Elphel for accurate representation of the scanned book pages and later used in other applications that involve post-processing. This format is supported in both [[353|NC353 series]] and current [[10393|NC393 series]] cameras. The standard JPEG was developed to compress images so they visually are almost the same as uncompressed but are significantly smaller in size. The goal of JP4 is camera-centric, not human-centric. It tries to preserve as much as possible of the information from the camera sensor (ideally "raw") while providing reasonable compression. The most damaging part of the color JPEG compression is the de-mosaic part of it. "Lossy" part of the compression (quantization after DCT) can be eliminated with setting compression quality to 100% that effectively disables quantization. Dynamic range compression ("gamma conversion") is usually designed to be lower than the sensor shot noise - significant for most modern small-pixel (and so low full-well capacity) sensors. That leaves the demosaic ("guessing" the missing colors in Bayer mosaic sensor outputs) a single most damaging operation. In the camera this is usually done by processing data in 3x3 or 5x5 pixel blocks and it is difficult to distinguish between variations (especially sharp) in intensity and the color tone. There are much more advanced algorithms that can be used during post-processing that will provide much better results, but they require "raw" sensor data. Or - the data saved in JP4 format.+The goal of the JP4 format is to preserve as much as possible of the information from the image sensor (ideally "raw") while providing reasonable compression. Based on JPEG compression, the format was originally developed at Elphel for accurate representation of the scanned book pages and later used in other applications that involve post-processing.  +   +The standard JPEG was developed to compress images so they visually look almost the same as uncompressed but are significantly smaller in size. The most damaging part of the color JPEG compression is the demosaic part of it. "Lossy" part of the compression (quantization after DCT) can be eliminated with setting compression quality to 100% that effectively disables quantization. Dynamic range compression ("gamma conversion") is usually designed to be lower than the sensor shot noise - significant for most modern small-pixel (and so low full-well capacity) sensors. That leaves the demosaic ("guessing" the missing colors in Bayer mosaic sensor outputs) a single most damaging operation. In the camera this is usually done by processing data in 3x3 or 5x5 pixel blocks and it is difficult to distinguish between variations (especially sharp) in intensity and the color tone. There are much more advanced algorithms that can be used during post-processing that will provide much better results, but they require "raw" sensor data. Or - the data saved in JP4 format. Here is a [http://community.elphel.com/jp4/jp4demo.php JP4 Demo] that illustrates this algorithm and how it is related to standard JPEG. Here is a [http://community.elphel.com/jp4/jp4demo.php JP4 Demo] that illustrates this algorithm and how it is related to standard JPEG. -JP4 mode bypasses the demosaic/color converiosn in the FPGA and provides an image with pixels in each 16x16 macroblock that are rearranged to separate Bayer colors in individual 8x8 blocks, then encoded as monochrome. [[Demosaic_on_client_side|Demosaic]] will be applied during post-processing on the host PC. This section describe different algorithms and implementations used to provide this functionality.+JP4 mode bypasses the demosaic/color conversion in the FPGA and provides an image with pixels in each 16x16 macroblock that are rearranged to separate Bayer colors in individual 8x8 blocks, then encoded as monochrome. [[Demosaic_on_client_side|Demosaic]] will be applied during post-processing on the host PC. This section describe different algorithms and implementations used to provide this functionality. -Main goals:+==Features== -* compression speed improvement+Compared to JPEG: -* possibility to obtain more high quality image (near to RAW)+* Higher compression speed -* drasticaly lowering data size+* Better image quality (close to RAW) -== Different JP4 Modes in 8.X Software ==+* Pixel data is not modified by demosaicing algorithm -only modes 0-2 can be processed with standard libjpeg:                +* Smaller file size -*0 - mono6, monochrome (color YCbCr 4:2:0 with zeroed out color componets)                + -*1 - color, YCbCr 4:2:0, 3x3 pixels                + -*2 - jp46 - original JP4 (from 7.X software), encoded as 4:2:0 with zeroed color components                + -*3 - jp46dc, modified jp46 so each color component uses individual DC diffenential encoding                + -*4 - reserved for color with 5x5 conversion (not yet implemented)+ -*5 - jp4 with ommitted color components (4:0:0)+ -*6 - jp4dc, similar to jp46dc encoded as 4:0:0+ -*7 - jp4diff, differential where (R-G), G, (G2-G) and (B-G) components are encoded as 4:0:0+ -*8 - jp4hdr, (R-G), G, G2,(B-G) are encoded so G2 can be used with high gain                + -*9 - jp4fiff2, (R-G)/2, G,(G2-G)/2, (B-G)/2 to avoid possible overflow in compressed values                + -*10 - jp4hdr2, (R-G)/2, G,G2,(B-G)/2                + -*14 - mono,  monochrome with ommitted color components (4:0:0)+  +== Format variations==  +{| class="wikitable"  +|-  +! Name  +! Description  +|-  +| align='center' | '''jp46'''  +| original JP4 (from 7.X software in 10353s), encoded as 4:2:0 with zeroed color components  +|-  +| align='center' | '''jp4dc'''  +| modified jp46 so each color component uses individual DC differential encoding  +|-  +| align='center' | -  +| reserved for color with 5x5 conversion (not yet implemented)  +|-  +| align='center' | '''jp4'''  +| 4:0:0, omitted color components  +|-  +| align='center' | '''jp4dc'''  +| similar to jp46dc encoded as 4:0:0  +|-  +| align='center' | '''jp4diff'''  +| differential where (R-G), G, (G2-G) and (B-G) components are encoded as 4:0:0  +|-  +| align='center' | '''jp4hdr'''  +| (R-G), G, G2,(B-G) are encoded so G2 can be used with high gain  +|-  +| align='center' | '''jp4fiff2'''  +| (R-G)/2, G,(G2-G)/2, (B-G)/2 to avoid possible overflow in compressed values  +|-  +| align='center' | '''jp4hdr2'''  +| (R-G)/2, G,G2,(B-G)/2  +|}  +====other formats====  +{| class="wikitable"  +|-  +! Name  +! Description  +|-  +| align='center' | '''color'''  +| YCbCr 4:2:0, 3x3 pixels  +|-  +| align='center' | '''mono6'''  +| monochrome - color YCbCr 4:2:0 with zeroed out color components  +|-  +| align='center' | '''mono'''  +| monochrome - color YCbCr 4:0:0 with omitted color components  +|} -=== [[JP4 HDR]] ===+==== [[JP4 HDR]] ==== -Bayer pattern look like this+Bayer pattern looks like this {| class="wikitable"   {| class="wikitable"     |-   |- Line 81: Line 119:   |}   |} -The remark: all kinds of bayer patterns can be received from initial RGGB by flipping on X and/or Y.+'''Note:''' all kinds of Bayer patterns can be derived from initial RGGB by flipping on X and/or Y. -Some sensors have possibility to set independed scale to G1 and G2.+Some sensors have possibility to set independent scales to G1 and G2. -Considering that the accessible optics does not give the full permission of a sensor resolution, it [[JP4_HDR|can be]] used for increase in a dynamic range of a image sensor.+Considering that the accessible optics does not give the full permission of a sensor resolution, it [[JP4_HDR|can be]] used to increase the dynamic range of a image sensor. == JP46 processing on the host == == JP46 processing on the host == === JP46 image decoding in MATLAB === === JP46 image decoding in MATLAB === -JP4 format can be easy manipulated by [http://www.mathworks.com/matlabcentral/fileexchange/22144 MATLAB] [[Image:Fruits_jp4.jpg|thumb|JP4 image]]+JP4 format can be easy manipulated by [http://www.mathworks.com/matlabcentral/fileexchange/22144 MATLAB] [[Image:Fruits_jp4.jpg|thumb|JP46 image]] 1. Read image 1. Read image Oleg

Tmp manual

Thu, 01/05/2017 - 08:59

Image formats:

← Older revision Revision as of 15:59, 5 January 2017 (2 intermediate revisions not shown)Line 221: Line 221: ==<font color="blue">Image formats</font>== ==<font color="blue">Image formats</font>== ====jpeg==== ====jpeg==== -* supported but is not the best for processing since a lot of information is lost at demosaicing+* '''color''': YCbCr 4:2:0, 3x3 pixels  +* '''mono6''': monochrome - color YCbCr 4:2:0 with zeroed out color components  +* '''mono''' : monochrome - color YCbCr 4:0:0 with omitted color components  +   +'''Note:''' Is not the best for processing since a lot of information is lost at demosaicing ====jp4 raw==== ====jp4 raw==== * [[JP4|'''More information''']] * [[JP4|'''More information''']] Line 257: Line 261: ==<font color="blue">Other info</font>== ==<font color="blue">Other info</font>==  +====Tools for calibrated systems====  +* [[Elphel_Software_Kit_for_Ubuntu#ImageJ_and_Elphel_plugins_for_imageJ|Install ImageJ plugins]]  +** decode jp4 raw format  +** aberrations correction  +** distortion correction (pixel mapping)  +** rectification and projection  + ====switch between ERS and GRR modes in MT9P006==== ====switch between ERS and GRR modes in MT9P006==== * [[Electronic_Rolling_Shutter#ERS_and_GRR_in_MT9P001_on_10393|Read article]] * [[Electronic_Rolling_Shutter#ERS_and_GRR_in_MT9P001_on_10393|Read article]] Oleg

Pages