Tensorflow with gpu
Tensorflow with gpu
Tensorflow with gpu
Tensorflow with gpu
Tensorflow with gpu
Tensorflow with gpu
Created page with "==Pre== * check device ~$ lspci | grep NVIDIA 81:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 610] (rev a1) 81:00.1 Audio device: NVIDIA Corporation..."
New page
==Pre==* check device
~$ lspci | grep NVIDIA
81:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 610] (rev a1)
81:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)
* check driver version
~$ modinfo nv[TAB]
* install cuda 9.0 with patches
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal
* then
sudo apt-get install cuda-9-0
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions
*
~$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
~$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} Oleg
04/25/18 [meta-elphel393][master-next] by Oleg Dzhimiev: added cron
added cron
04/24/18 [linux-elphel][rocko] by Oleg Dzhimiev: read rtc even if OF flag is set, report
read rtc even if OF flag is set, report
04/24/18 [elphel-web-393][] by Oleg Dzhimiev: auto exposure on/off
auto exposure on/off
04/21/18 [imagej-elphel][master] by AndreyFilippov: Debugging LMA for correlation maximums
Debugging LMA for correlation maximums
04/21/18 [imagej-elphel][master] by AndreyFilippov: fitting correlation maximum with LMA
fitting correlation maximum with LMA
Implementing a linux driver for an image sensor for NC393
Fig.1 MT9F002
MT9F002This post briefly covers implementation of a driver for On Semi’s MT9F002 14MPx image sensor for 10393 system boards – the steps are more or less general. The driver is included in the latest software/firmware image (20180416). The implemented features are programmable:
- window size
- horizontal & vertical mirror
- color gains
- exposure
- fps and trigger-synced ports
- frame-based commands sequence allowing to change settings of any image up to 16 frames ahead (didn’t need to be implemented as it’s the common part of the driver for all sensors)
- auto cable phase adjustment during init for cables of various lengths
- Get the register reference document for MT9F002
- Setup the Eclipse IDE for linux kernel development – see instructions
Capturing images without the driver
There is a set of scripts used for verification in software (on PC) and hardware (on the target board). Among other things they can be used to establish initial communication with a sensor, run registers initialization and acquire the first images. The process for MT9F002 is described on our wiki.
In general the driver can be split into 2 parts:
- common for all sensors – sets up working with fpga frame-based command sequencers (see NC393 development progress and the future plans).
- sensor specific – commands that do actual communication with a sensor. This is the part needs to be implemented.
For a sensor there are a few tables and a few functions, the most important ones are:
tables:
- mt9f002_pages – a ‘page’ is the upper byte of a 16-bit register address of the sensor (for 8-bit reg addresses the page number is 0x00), the table should list all available pages in the sensor – or at least the most important ones – they are used to program fpga’s 256-max records per port tables used to write commands and at least one record is used to read from port – so in general for a setup w/o a MUX board the limit of allowed pages per sensor is 256-1 = 255 (with a MUX + 3x sensors on a single port it is 256-2(mux write & read)-4(3x sensor read + 1x broadcast read))/4 = 62)
- mt9f002_par2addr – used convert 256 8-bit parameters available as P_SENSOR_REGSxxx to 16-bit register address
- mt9f002_ahead_tab – sequencer commands latencies – leave default, they are needed on the final stages of development
functions (they are registered on top of the common ones):
- mt9f002_pgm_detectsensor – remove reset read sensor id
- mt9f002_pgm_initsensor – init registers that select interface, sensor’s PLL multipliers/dividers and other required settings
- mt9f002_pgm_exposure – program exposure
- mt9f002_pgm_window – program image width and height
- mt9f002_pgm_limitfps – limit fps based on compressor capabilities and trigger period settings
- mt9f002_pgm_gains – program color gains
- mt9f002_pgm_triggermode – set sensor in triggered mode
- mt9f002_pgm_sensorregs – write sensor registers directly
See this article for more details.
Tmp manual
Changelog
← Older revision Revision as of 23:55, 19 April 2018 Line 287: Line 287: ===Changelog=== ===Changelog=== <font size='1'>'''==20180416==''' <font size='1'>'''==20180416==''' + * 20180419 - mt9f002: fixed changing window size * mt9f002: added triggered mode * mt9f002: added triggered mode * mt9f002: added vertical and horizontal flips (mirror) * mt9f002: added vertical and horizontal flips (mirror) Oleg04/19/18 [linux-elphel][rocko] by Oleg Dzhimiev: fixed bad frames for mt9f002 when changing window size
fixed bad frames for mt9f002 when changing window size
04/18/18 [imagej-elphel][master] by AndreyFilippov: Rewriting correlation processing to handle diagonal and multi-baseline pairs
Rewriting correlation processing to handle diagonal and multi-baseline pairs
04/17/18 [linux-elphel][rocko] by Oleg Dzhimiev: typo-error
typo-error
04/17/18 [linux-elphel][rocko] by Oleg Dzhimiev: clean up
clean up
04/17/18 [linux-elphel][rocko] by Oleg Dzhimiev: typos
typos
04/17/18 [elphel-web-camvc][master] by Oleg Dzhimiev: fixed magnifier and preview window frame lagging
fixed magnifier and preview window frame lagging
10398
MT9F002 Application Notes
← Older revision Revision as of 01:32, 17 April 2018 Line 26: Line 26: |[[File:Mt9f002 slave mode.jpeg|700px|thumb|Fig.3 Slave mode]] |[[File:Mt9f002 slave mode.jpeg|700px|thumb|Fig.3 Slave mode]] |} |} + +====I2C commands via sysfs==== + root@elphel393:~# cd /sys/devices/soc0/elphel393-sensor-i2c\@0/ +* read (port 0): + echo "mt9f002 0x0 0x3000" > i2c0 + cat i2c0 +* write: + echo "mt9f002 0x0 0x301a 0x011c" > i2c0 ====Measure frame timing==== ====Measure frame timing==== OlegPages
