Message ID | 20211202180410.518232-1-jeanmichel.hautbois@ideasonboard.com |
---|---|
Headers | show |
Series |
|
Related | show |
Hi Jean-Michel, On Thu, 02 Dec 2021, Jean-Michel Hautbois wrote: > Hello, > > This series introduces several algorithms or tuning parameters for the > RkISP1 IPA. > > First, the imx219 is a non linear CMOS sensor and its channels are > compressed. In order to have a better exposed output frame, we need to > apply a deGamma curve on the raw pixels, which is done by a simple > look-up table on the ISP side. The values are taken from the imx219.json > tuning file in the RPi IPA. > > The next algorithm is the black level correction. The output is washed > out if no black correction is applied. Again, use the tuning values from > the imx219 data file in RPi. > > Now, we can estimate the AWB gains to apply on the red and blue > channels. The RkISP1 could theoretically give us the red, green and blue > mean values for the current frame, but the kernel seems to lack support > for this. Use the YCrCb estimation instead, and convert the values to > RGB before estimating the gains. We don't have a grid of average values, > only a global mean for each channel. > > Next, the color correction matric needs to be a bit modified as the > default one is a simple identity matrix. A very simple estimation uses > the red and blue gains calculated but a real tuning file would be > better, based on color temperature as the imx219 data file. > > Last patch introduces the histogram IQ mean estimation as for the IPU3 > and uses the maximum of the relative luminance gain and the iqMean gain > to determine the shutter speed and analogue gain to apply. > > I wanted to post captured images for each of those algorithm to see the > evolution but I accidentaly broke my sd card connector... and I am now > stuck until I can repair it... :-( I tested this series on my RockPi4b with Sony IMX219, and the image quality looks much better :) I didn't take captured images after each algorithm, but I did do some captures before this series was applied, and after. The captures can be found here: https://people.linaro.org/~peter.griffin/rkisp1captures/ I have been using ffplay to view them with the following command ffplay -loglevel warning -v info -f rawvideo -pixel_format nv12 -video_size "3280x2464" cam0-stream0-000009 FWIW for the series: Tested-by: Peter Griffin <peter.griffin@linaro.org> regards, Peter.
Hi Peter ! On 24/01/2022 17:50, Peter Griffin wrote: > Hi Jean-Michel, > > On Thu, 02 Dec 2021, Jean-Michel Hautbois wrote: > >> Hello, >> >> This series introduces several algorithms or tuning parameters for the >> RkISP1 IPA. >> >> First, the imx219 is a non linear CMOS sensor and its channels are >> compressed. In order to have a better exposed output frame, we need to >> apply a deGamma curve on the raw pixels, which is done by a simple >> look-up table on the ISP side. The values are taken from the imx219.json >> tuning file in the RPi IPA. >> >> The next algorithm is the black level correction. The output is washed >> out if no black correction is applied. Again, use the tuning values from >> the imx219 data file in RPi. >> >> Now, we can estimate the AWB gains to apply on the red and blue >> channels. The RkISP1 could theoretically give us the red, green and blue >> mean values for the current frame, but the kernel seems to lack support >> for this. Use the YCrCb estimation instead, and convert the values to >> RGB before estimating the gains. We don't have a grid of average values, >> only a global mean for each channel. >> >> Next, the color correction matric needs to be a bit modified as the >> default one is a simple identity matrix. A very simple estimation uses >> the red and blue gains calculated but a real tuning file would be >> better, based on color temperature as the imx219 data file. >> >> Last patch introduces the histogram IQ mean estimation as for the IPU3 >> and uses the maximum of the relative luminance gain and the iqMean gain >> to determine the shutter speed and analogue gain to apply. >> >> I wanted to post captured images for each of those algorithm to see the >> evolution but I accidentaly broke my sd card connector... and I am now >> stuck until I can repair it... :-( > > I tested this series on my RockPi4b with Sony IMX219, and the image quality looks > much better :) > > I didn't take captured images after each algorithm, but I did do some captures > before this series was applied, and after. The captures can be found here: > > https://people.linaro.org/~peter.griffin/rkisp1captures/ > > I have been using ffplay to view them with the following command > > ffplay -loglevel warning -v info -f rawvideo -pixel_format nv12 -video_size > "3280x2464" cam0-stream0-000009 > > FWIW for the series: > > Tested-by: Peter Griffin <peter.griffin@linaro.org> Thanks for testing ! In order to ease the viewing here are the 9th frame without 3A: https://pasteboard.co/RVvX1N5XBHeY.png And with 3A: https://pasteboard.co/Eav971LRIN3I.png JM > > regards, > > Peter.