Re: [Elphel-support] 答复: 答复: 答复: 答复: 答复: sync stereo with lidar

2018-03-07 Thread Elphel Support
Hello Winston,

Tomorrow Oleg will try to reproduce your settings - so far we did not have such 
problems.

BTW, you can set same parameters on multiple ports simultaneously, using 
"Broadcast Mask" (hex number 0..f)
Port 0: 1
port 1 - 2
port 2 - 4
port 3 - 8,

So broadcast mask 3 will set the same mode on ports 0 and 1.

About bits I tried to explain in the previous messages and the "How many 
bits..." in the article.

Sensor provides 12 bits, and each bit is important in the shadows. But not in 
the bright light because of the shot noise that is caused just by the fact that 
each pixel can store only integer number of electrons. And so while all bits 
are important, there are not 4096 meaningful levels for each pixel, but 
significantly less (see "How many bits..."). Gamma conversion uses non-linear 
scale to represent pixel values with steps proportional to the shot noise 
(steps are smaller). The gamma conversion parameters are saved in the Exif 
header of the JP4 file, and if you open files with ImageJ plugin, it takes care 
of the Exif data and restores linear data proportional to the pixel raw values, 
then you can save it as  32-bit Tiff file.

Andrey




 Hi, Andrey
  I met a new question. I set ‘Color’ parameter with the five(it could get 
the jp4 format image)on one camera, and this camera image format was converted. 
But when I set the other one, this camera image format was not converted. 
Please help me test for it. 
  Another question
  What is the raw jp4 format image with 100% compression bit wide? I read 
it and the result show the bit wide is uint8. But you web shows that the bit 
wide is 12bit.
  
  
  
  
  Best Regrad!
  Yicheng-Zhang
  Email: winston.zh...@blacksesame.com.cn
  Teil: 18516291005
  Addr: 707 room, 7th floor, building 4th, No.1761, Zhangdong road, Pudong 
area





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


[Elphel-support] 答复: 答复: 答复: 答复: 答复: sync stereo with lidar

2018-03-07 Thread Winston Zhang
Hi, Andrey
  I met a new question. I set ‘Color’ parameter with the five(it could get 
the jp4 format image)on one camera, and this camera image format was converted. 
But when I set the other one, this camera image format was not converted. 
Please help me test for it.
  Another question
  What is the raw jp4 format image with 100% compression bit wide? I read 
it and the result show the bit wide is uint8. But you web shows that the bit 
wide is 12bit.



Best Regrad!
Yicheng-Zhang
Email:  winston.zh...@blacksesame.com.cn
Teil:18516291005
Addr:   707 room, 7th floor, building 4th, No.1761, Zhangdong road, Pudong area

发件人: Andrey Filippov [mailto:and...@elphel.com]
发送时间: 2018年3月7日 星期三 14:20
收件人: Winston Zhang 
抄送: Elphel Support ; Elphel Sales | Olga 
Filippova ; Tao Zhang ; Qun Gu 
; Pioneer Li 
主题: Re: 答复: [Elphel-support] 答复: 答复: 答复: sync stereo with lidar

Winston,

Quad quality 5MPix  JP4 image should be 1.8-2MB size, yours is <500KB. For 
image processing I recommend using compression quality 97-98% as we do.

The sensor uses Bayer mosaic, so sensor output has 5 MPix, not 3*5MPix - the 
color appears during de-mosaic process. JP4 saves pixels as they come out from 
the sensor (raw), color interpolation should be done during processing. Here 
are images that illustrate JP4:

https://community.elphel.com/jp4/jp4demo.php

For your application I do not recommend converting to color. When using a 
simple viewer there will be not much advantage over the camera JPEG output. For 
image matching you may first use just green channel (green pixels are in a 
checkerboard pattern), add color separately. When we process such images we 
apply different lens correction for each color and only mix them after 
aberration correction. Using just green is the simplest way to process.

Andrey



 On Tue, 06 Mar 2018 21:12:18 -0800 Winston 
Zhang>
 wrote 
Hi, Andrey
  Please take a look at attachments. The rawJP4 image was captured from the 
camera, and I converted it and got the result as result.png. But when I 
magnified this image, I found some block included 16x16 grid. I did not know 
the reason. Can you explain it.(The grid image please take look at grid.png).
  Another question is that the result image is single channel but not three 
channel like as rgb-channel. But if I converted it through the jp4viewer, the 
result is color image. Why? How do you do this?


Best Regrad!
Yicheng-Zhang
Email:  
winston.zh...@blacksesame.com.cn
Teil:18516291005
Addr:   707 room, 7th floor, building 4th, No.1761, Zhangdong road, Pudong area

发件人: Andrey Filippov [mailto:and...@elphel.com]
发送时间: 2018年3月6日 星期二 15:58
收件人: Winston Zhang 
>
抄送: Elphel Support 
>; 
Elphel Sales | Olga Filippova >; Tao 
Zhang >; Qun 
Gu >; Pioneer Li 
>
主题: Re: [Elphel-support] 答复: 答复: 答复: sync stereo with lidar

Winston,

There are several ways how to set the JP4 mode:

1) set it from the camera GUI (click Camera Control Interface port #), then 
click camera icon (top left), then "More details" and select color mode to jp4.
2) set with "Parameter Editor": follow Parameter Editor from the home page, 
check bit 2 - "Image color, quality ..." -> "View/Edit Current", set "COLOR: 
line New value to 5 (it is jp4) and click "Apply" button.
3) make this mode default(after either 1) or 2) )- save current settings in 
"Parameter Editor" (previous page) - Press topmost "Save" button (you may later 
change comments for the settings). Then you may set saved settings as default 
(select it and then press "Update default"). Next time you start the camera it 
will use these settings.
Then repeat the same for the other channel.

Andrey

 On Mon, 05 Mar 2018 01:46:22 -0800 Winston 
Zhang>
 wrote 
Hello, Andrey,

I need information inside camera. How can I get jp4 format image? 
What is the image default format? If I try the command line “wget 
http://192.168.0.9:2323/img -O 
filename.jp4”, Can I get the 
jp4 format Image?

Thank you!
”



Best Regrad!
Yicheng-Zhang
Email:  
winston.zh...@blacksesame.com.cn
Teil:18516291005
Addr:   707 room, 7th floor, building 4th, 

Re: [Elphel-support] Script for changing the SADDR bit for the MT9P031 sensor

2018-03-07 Thread Oleg
Hi,

1.
I made change so it could be set int device tree (0x48) - just noticed a
bug and had to fix it:

>  ...

elphel393_sensor_i2c: elphel393-sensor-i2c@0 {
> compatible = "elphel,elphel393-sensor-i2c-1.00";
> /* Add known devices: name, slave address (7-bit), number
> of address bytes, number of data bytes, SCL frequency (kHz) */
> elphel393-sensor-i2c,i2c_devices = "mt9f0020x10 2
> 2 500",
>"mt9p006*0x48*
> 1 2 500",
>"el103590x08 1
> 2 500",
>"el10359_32 0x08 1
> 4 500",
>"pca9500_eeprom 0x50 1
> 1 100",
>"sensor_eeprom  0x50 1
> 1 100",
>"sensor_temp0x18 1
> 2 100",
>"cy223930x69 1
> 1 100";
> } ;

...


Commands to recompile devicetree:
decompile:

> $ dtc -I dtb -O dts devicetree.dtb -o devicetree.dts

compile:

> $ dtc -I dts -O dtb devicetree.dts -o devicetree.dtb



2. Are you able to build the firmware or should I upload it to somewhere?


3. Before any updating - can you read sensor's registers?

> ~$ ssh root@192.168.0.9
> root@elphel393:~# cd /usr/local/verilog/
> root@elphel393:~# test_mcntrl.py @hargs-after
> x393 --> r
> x393 --> print_sensor_i2c (without args it will print usage)
>
> *...*
> *print_sensor_i2c *
> *...*x393 --> print_sensor_i2c 0 0x3000 0xff *0x10* 0
> *   Result: 0x2e01*


 - 10393's port the sensor is connected to. Can be: 0..3
 - I tried on a sensor that has 16-bit addresses (0x3000), for
MT9P006 it can be 0x0 (ID register addr)
* *- set 0xff
* -* SADDR


4. Side note (sensor power and clock):
At boot autocampars.php calls: test_mcntrl.py @hargs

test_mcntrl.py (located at /usr/local/bin/)
hargs (located at /usr/local/verilog/)

Inside hargs file there are commands for:
- which bitstream to load
- setting sensor power: for MT9P006 it's PAR12 which translates to
{"mv":2800, "freq":24.0,"iface":"2V5_LVDS"}
- setting sensor clock frequency: for MT9P006 it's 24.0 "2V5_LVDS"

Best regards,
Oleg Dzhimiev
Electronics Engineer
phone: +1 801 783  x124
Elphel, Inc.
___
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com


[Elphel-support] Script for changing the SADDR bit for the MT9P031 sensor

2018-03-07 Thread Frederick Gamache
Hello,

Do you have news about the script for changing the SADDR bit for the sensor?

Regards,
Frederick
___
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com