Hello Allen,

Yes, it is possible to bypass gamma module in FPGA, but there is not much user 
software for this mode as while reducing frame rate twice (when doing in-camera 
processing) and even more if you'll try to send data over the network (you'll 
have to send 10 MB of data for each image instead of ~2MB for the almost 
lossless compression). So with GigE (~100MB/s) and even only 2 of 4 5MPix 
sensors you can even theoretically get 5 fps.

And the noise reduction will be 30% at most.

You see, image acquisition itself is _lossy_ by the laws of physics. If you 
have exactly the same scene, exactly the same illumination and acquire two 
image sets - they will be different, and the largest contributor for the modern 
high-quality sensors will be shot noise caused by the quantum nature of the 
light measurement by the sensor pixels and that there could be no 0.5 e- 
charge. So if the pixel full well capacity (number of electrons it can store) 
was 10000 (it is actually less than 8 for 5 MPix), than for the bright scenes 
(say  9900 electrons in the pixel) it will vary +/-sqrt(10000) = +/- 100 or 1% 
of the full scale. So there is just a probability, same scene can result in 
10000 or 9800 electrons (even vary more with less probability). There is not 
much sense to preserve each count, and say that pixel had exactly 9912 
electrons if the uncertainty is +/-100 e-. It is like when there is polling 
over a limited (say 3000 people) and they say result percentage and a margin of 
error.

So while it is possible to acquire data in 2-byte format bypassing the gamma, 
the gain is very small, but the loss in the bandwidth is high. Even for 
in-camera processing, because of the external memory bandwidth (and in 393 we 
use dedicated DDR memory chip for just the FPGA and utilize ~95% of the memory 
bandwidth) we still use gamma compression/decompression to increase the 
bandwidth.

Andrey




---- On Tue, 27 Mar 2018 01:34:18 -0700 Allen 
Yin<allen....@blacksesame.com.cn> wrote ---- 

    Hi Andrey,
  
 Could we bypass the “gamma” module in the FPGA?  We want the original raw data 
from sensor.
  
 Thanks,
  
 Allen Yin
  
   发件人: Elphel Support <support-list@support.elphel.com> 
 发送时间: 2018年3月22日, 星期四 23:23
 收件人: Allen Yin <allen....@blacksesame.com.cn>; Elphel List 
<support-list@support.elphel.com>
 抄送: Pioneer Li <pioneer...@blacksesame.com.cn>; Tao Zhang 
<tao.zh...@blacksesame.com.cn>; Qun Gu <qun...@blacksesame.com>; 
Winston Zhang <winston.zh...@blacksesame.com.cn>
 主题: Re: [Elphel-support] 答复: 答复: 答复: 答复: 答复: sync stereo with lidar
 
 
  
  Allen,
 ~/.imagej/Eyesis_Correction.xml is not really needed - it just hides/reveals 
some experimental buttons on the interface
 This is the contents of such file:
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
 <properties>
 <comment>last updated Thu Sep 08 14:09:47 MDT 2016</comment>
 <entry key="ADVANCED_MODE">False</entry>
 <entry key="DCT_MODE">False</entry>
 <entry key="MODE_3D">False</entry>
 </properties>
 
 
 result.jpg looks correct. It should be super-contrast as it is linear, so it 
CAN NOT be saved as JPEG - it needs either 16 bits or 32 bit TIFF as when you 
save it from imageJ (save as tiff). And it is "monochrome" - each pixel 
corresponds to the sensor pixel value. For you application I would recommend to 
use just green subchannel (checkerboard pattern, half of all pixels) - in that 
case you do not need to have aberration correction.
 
 Your plots for gamma seem correct too, to be sure I need to look into the code 
again - I wrote that part several years ago.
 
 Gamma is not changed automatically in the camera, but you may change it using 
one of the interfaces - camvc of just parsedit. In addition to the power (0.57) 
there is another parameter - dark level - the sensor adjusts its ADC to have 
output level of 160 (on 4096 scale) or 10(256) for the complete darkness, 
so-called "fat zero". 
 
 Gamma is applied inside the FPGA and parameters are saved in the Exif header, 
so for processing it is possible to "undo" gamma and restore linear scale.
 
 Andrey
 
 
   
 ---- On Thu, 22 Mar 2018 00:58:53 -0700 Allen 
Yin<allen....@blacksesame.com.cn> wrote ---- 
 
    Hi Andrey,
  
 There seems to be an another error, “2.jpg”. 
 
 I have some doubts, could you please help me?
  
 1.     Does gamma value remain unchanged when camera works ?  Who realize this 
gamma mapping, sensor or ISP?
  
 2.     When gamma0 = gamma1 = gamma2= gamma3 = 0.57, gamma_scale0 = 
gamma_scale1 = gamma_scale2 = gamma_scale3 = 1024,
  
  gamma mapping  is  Vout = a*Vin^gamma, a = 2.23  gamma = 0.57 , is it right? 
If not right, could you tell me the right? I use this gamma curve to convert 
the 12bit raw data, “result.jpg” is the result.
  
  
 
 
  
  
 
  
 
 _______________________________________________ 
Support-list mailing list 
Support-list@support.elphel.com 
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com 





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

Reply via email to