[libcamera-devel,3/4] ipa: rkisp1: Add OV4689 tuning file
diff mbox series

Message ID 20230119155905.464995-4-mike.rudenko@gmail.com
State Accepted
Headers show
Series
  • Add Omnivision OV4689 support
Related show

Commit Message

Mikhail Rudenko Jan. 19, 2023, 3:59 p.m. UTC
Add a minimal tuning file for Omnivision OV4689, specifying black
level subtraction level.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
 src/ipa/rkisp1/data/meson.build |  1 +
 src/ipa/rkisp1/data/ov4689.yaml | 13 +++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 src/ipa/rkisp1/data/ov4689.yaml

Comments

Jacopo Mondi Jan. 19, 2023, 5:12 p.m. UTC | #1
Hi Mikhail

On Thu, Jan 19, 2023 at 06:59:04PM +0300, Mikhail Rudenko via libcamera-devel wrote:
> Add a minimal tuning file for Omnivision OV4689, specifying black
> level subtraction level.
>
> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
> ---
>  src/ipa/rkisp1/data/meson.build |  1 +
>  src/ipa/rkisp1/data/ov4689.yaml | 13 +++++++++++++
>  2 files changed, 14 insertions(+)
>  create mode 100644 src/ipa/rkisp1/data/ov4689.yaml
>
> diff --git a/src/ipa/rkisp1/data/meson.build b/src/ipa/rkisp1/data/meson.build
> index c3b4e388..f5e9fa75 100644
> --- a/src/ipa/rkisp1/data/meson.build
> +++ b/src/ipa/rkisp1/data/meson.build
> @@ -2,6 +2,7 @@
>
>  conf_files = files([
>      'imx219.yaml',
> +    'ov4689.yaml',
>      'ov5640.yaml',
>      'uncalibrated.yaml',
>  ])
> diff --git a/src/ipa/rkisp1/data/ov4689.yaml b/src/ipa/rkisp1/data/ov4689.yaml
> new file mode 100644
> index 00000000..750b369e
> --- /dev/null
> +++ b/src/ipa/rkisp1/data/ov4689.yaml
> @@ -0,0 +1,13 @@
> +# SPDX-License-Identifier: CC0-1.0
> +%YAML 1.1
> +---
> +version: 1
> +algorithms:
> +  - Agc:
> +  - Awb:
> +  - BlackLevelCorrection:
> +      R:  64
> +      Gr: 64
> +      Gb: 64
> +      B:  64

Are these values measured ?

In such case
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

> +...
> --
> 2.39.0
>
Mikhail Rudenko Jan. 19, 2023, 5:47 p.m. UTC | #2
On 2023-01-19 at 18:12 +01, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:

> Hi Mikhail
>
> On Thu, Jan 19, 2023 at 06:59:04PM +0300, Mikhail Rudenko via libcamera-devel wrote:
>> Add a minimal tuning file for Omnivision OV4689, specifying black
>> level subtraction level.
>>
>> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
>> ---
>>  src/ipa/rkisp1/data/meson.build |  1 +
>>  src/ipa/rkisp1/data/ov4689.yaml | 13 +++++++++++++
>>  2 files changed, 14 insertions(+)
>>  create mode 100644 src/ipa/rkisp1/data/ov4689.yaml
>>
>> diff --git a/src/ipa/rkisp1/data/meson.build b/src/ipa/rkisp1/data/meson.build
>> index c3b4e388..f5e9fa75 100644
>> --- a/src/ipa/rkisp1/data/meson.build
>> +++ b/src/ipa/rkisp1/data/meson.build
>> @@ -2,6 +2,7 @@
>>
>>  conf_files = files([
>>      'imx219.yaml',
>> +    'ov4689.yaml',
>>      'ov5640.yaml',
>>      'uncalibrated.yaml',
>>  ])
>> diff --git a/src/ipa/rkisp1/data/ov4689.yaml b/src/ipa/rkisp1/data/ov4689.yaml
>> new file mode 100644
>> index 00000000..750b369e
>> --- /dev/null
>> +++ b/src/ipa/rkisp1/data/ov4689.yaml
>> @@ -0,0 +1,13 @@
>> +# SPDX-License-Identifier: CC0-1.0
>> +%YAML 1.1
>> +---
>> +version: 1
>> +algorithms:
>> +  - Agc:
>> +  - Awb:
>> +  - BlackLevelCorrection:
>> +      R:  64
>> +      Gr: 64
>> +      Gb: 64
>> +      B:  64
>
> Are these values measured ?
>
> In such case
> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

These values were taken from Rockchip's camera engine xml
configs. Should I measure them instead?

> Thanks
>   j
>
>> +...
>> --
>> 2.39.0
>>


--
Best regards,
Mikhail Rudenko
Jacopo Mondi Jan. 20, 2023, 8:36 a.m. UTC | #3
Hi Mikhail

On Thu, Jan 19, 2023 at 08:47:37PM +0300, Mikhail Rudenko via libcamera-devel wrote:
>
> On 2023-01-19 at 18:12 +01, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:
>
> > Hi Mikhail
> >
> > On Thu, Jan 19, 2023 at 06:59:04PM +0300, Mikhail Rudenko via libcamera-devel wrote:
> >> Add a minimal tuning file for Omnivision OV4689, specifying black
> >> level subtraction level.
> >>
> >> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
> >> ---
> >>  src/ipa/rkisp1/data/meson.build |  1 +
> >>  src/ipa/rkisp1/data/ov4689.yaml | 13 +++++++++++++
> >>  2 files changed, 14 insertions(+)
> >>  create mode 100644 src/ipa/rkisp1/data/ov4689.yaml
> >>
> >> diff --git a/src/ipa/rkisp1/data/meson.build b/src/ipa/rkisp1/data/meson.build
> >> index c3b4e388..f5e9fa75 100644
> >> --- a/src/ipa/rkisp1/data/meson.build
> >> +++ b/src/ipa/rkisp1/data/meson.build
> >> @@ -2,6 +2,7 @@
> >>
> >>  conf_files = files([
> >>      'imx219.yaml',
> >> +    'ov4689.yaml',
> >>      'ov5640.yaml',
> >>      'uncalibrated.yaml',
> >>  ])
> >> diff --git a/src/ipa/rkisp1/data/ov4689.yaml b/src/ipa/rkisp1/data/ov4689.yaml
> >> new file mode 100644
> >> index 00000000..750b369e
> >> --- /dev/null
> >> +++ b/src/ipa/rkisp1/data/ov4689.yaml
> >> @@ -0,0 +1,13 @@
> >> +# SPDX-License-Identifier: CC0-1.0
> >> +%YAML 1.1
> >> +---
> >> +version: 1
> >> +algorithms:
> >> +  - Agc:
> >> +  - Awb:
> >> +  - BlackLevelCorrection:
> >> +      R:  64
> >> +      Gr: 64
> >> +      Gb: 64
> >> +      B:  64
> >
> > Are these values measured ?
> >
> > In such case
> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
>
> These values were taken from Rockchip's camera engine xml
> configs. Should I measure them instead?
>

It would be best, but it's not a huge deal. All it takes would be to
optically cover the sensor, dump a raw frame and compute each color
channel average value (you should probably also set gains to their
minimum and disable aegc and awb algorithms by deleting them from this
tuning file).

If you don't want to do that, just please record with a comment

        /* Values extracted from Rockchip's camera engine tuning file. */

Or something similar


> > Thanks
> >   j
> >
> >> +...
> >> --
> >> 2.39.0
> >>
>
>
> --
> Best regards,
> Mikhail Rudenko
Mikhail Rudenko Jan. 20, 2023, 2:22 p.m. UTC | #4
Hi Jacopo,

On 2023-01-20 at 09:36 +01, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:

> Hi Mikhail
>
> On Thu, Jan 19, 2023 at 08:47:37PM +0300, Mikhail Rudenko via libcamera-devel wrote:
>>
>> On 2023-01-19 at 18:12 +01, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:
>>
>> > Hi Mikhail
>> >
>> > On Thu, Jan 19, 2023 at 06:59:04PM +0300, Mikhail Rudenko via libcamera-devel wrote:
>> >> Add a minimal tuning file for Omnivision OV4689, specifying black
>> >> level subtraction level.
>> >>
>> >> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
>> >> ---
>> >>  src/ipa/rkisp1/data/meson.build |  1 +
>> >>  src/ipa/rkisp1/data/ov4689.yaml | 13 +++++++++++++
>> >>  2 files changed, 14 insertions(+)
>> >>  create mode 100644 src/ipa/rkisp1/data/ov4689.yaml
>> >>
>> >> diff --git a/src/ipa/rkisp1/data/meson.build b/src/ipa/rkisp1/data/meson.build
>> >> index c3b4e388..f5e9fa75 100644
>> >> --- a/src/ipa/rkisp1/data/meson.build
>> >> +++ b/src/ipa/rkisp1/data/meson.build
>> >> @@ -2,6 +2,7 @@
>> >>
>> >>  conf_files = files([
>> >>      'imx219.yaml',
>> >> +    'ov4689.yaml',
>> >>      'ov5640.yaml',
>> >>      'uncalibrated.yaml',
>> >>  ])
>> >> diff --git a/src/ipa/rkisp1/data/ov4689.yaml b/src/ipa/rkisp1/data/ov4689.yaml
>> >> new file mode 100644
>> >> index 00000000..750b369e
>> >> --- /dev/null
>> >> +++ b/src/ipa/rkisp1/data/ov4689.yaml
>> >> @@ -0,0 +1,13 @@
>> >> +# SPDX-License-Identifier: CC0-1.0
>> >> +%YAML 1.1
>> >> +---
>> >> +version: 1
>> >> +algorithms:
>> >> +  - Agc:
>> >> +  - Awb:
>> >> +  - BlackLevelCorrection:
>> >> +      R:  64
>> >> +      Gr: 64
>> >> +      Gb: 64
>> >> +      B:  64
>> >
>> > Are these values measured ?
>> >
>> > In such case
>> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
>>
>> These values were taken from Rockchip's camera engine xml
>> configs. Should I measure them instead?
>>
>
> It would be best, but it's not a huge deal. All it takes would be to
> optically cover the sensor, dump a raw frame and compute each color
> channel average value (you should probably also set gains to their
> minimum and disable aegc and awb algorithms by deleting them from this
> tuning file).

I'll try to do this over the weekend (for educational purposes at least), and
post the results as v2 of this patch.

Best regards,
Mikhail

> If you don't want to do that, just please record with a comment
>
>         /* Values extracted from Rockchip's camera engine tuning file. */
>
> Or something similar
>
>
>> > Thanks
>> >   j
>> >
>> >> +...
>> >> --
>> >> 2.39.0
>> >>
>>
>>
>> --
>> Best regards,
>> Mikhail Rudenko

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/data/meson.build b/src/ipa/rkisp1/data/meson.build
index c3b4e388..f5e9fa75 100644
--- a/src/ipa/rkisp1/data/meson.build
+++ b/src/ipa/rkisp1/data/meson.build
@@ -2,6 +2,7 @@ 
 
 conf_files = files([
     'imx219.yaml',
+    'ov4689.yaml',
     'ov5640.yaml',
     'uncalibrated.yaml',
 ])
diff --git a/src/ipa/rkisp1/data/ov4689.yaml b/src/ipa/rkisp1/data/ov4689.yaml
new file mode 100644
index 00000000..750b369e
--- /dev/null
+++ b/src/ipa/rkisp1/data/ov4689.yaml
@@ -0,0 +1,13 @@ 
+# SPDX-License-Identifier: CC0-1.0
+%YAML 1.1
+---
+version: 1
+algorithms:
+  - Agc:
+  - Awb:
+  - BlackLevelCorrection:
+      R:  64
+      Gr: 64
+      Gb: 64
+      B:  64
+...