Repository navigation
Conversation
…710 boards
On this platform the streamer opens /etc/sensors/iq/default.ini and nothing
else: no sensor name is tried, and no key in its configuration selects an IQ
file (curl /api/v1/config.json lists every key the binary has). The package
links that name to ar0130.ini for every board, whatever sensor is fitted. Of
the file only [3dnr] reaches the ISP - the loader reports the other twelve
sections as "carried for PQTools and have no effect here" - so the noise of
every cv200 camera is decided by one ladder written for a 1.3 MP Aptina part.
ar0130_quiet.ini is ar0130.ini with 46 lines changed, all of them inside
[3dnr], on all twelve ISO steps: YSFStr 50 -> 170, YTFStr 48 -> 104,
CSFStr 0 -> 48, CTFstr 0 -> 24. The other sections are byte-identical.
Measured on an OV2710 (Hi3518EV200, MIPI 1080p30, exposure pinned at the
sensor maximum with gain 1x, one lamp-lit room at night): the median 8x8 luma
sigma over mean luma falls from 0.368 to 0.076, the mean absolute gradient at
1:1 from 17.9 to 10.7. The temporal filter is the cheap half of the trade:
YTFStr 96 with the same luma strength already takes 0.119 to 0.086.
It is shipped as a second file rather than as a change to the default,
because what I measured is one room at night and a different picture is not
what the other cv200 sensors should get without being asked. To use it:
ln -sf ar0130_quiet.ini /etc/sensors/iq/default.ini
/etc/init.d/S95majestic restart
The existing *.ini glob in the package installs it, so no other change is
needed.
PR Summary by QodoAdd opt-in quiet 3DNR profile for Hi3516CV200 cameras
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. OV2710 boards still default to the AR0130 IQ profile
|
|
On the gap Qodo raises: yes, every cv200 board still gets What makes a profile sensor-specific here is narrower than it sounds. The loader If OV2710 boards should get it by default, that needs a selection mechanism in |
openipc-ai
left a comment
There was a problem hiding this comment.
The measurements are good and the bisected ranges are useful in their own right. The problem is where the file lands, and it starts with one premise in the description that doesn't hold.
There is a key that selects the IQ profile: isp.iqProfile (see majestic-config.md in OpenIPC/wiki). config.json doesn't show it because it lists keys that are set, and this one is empty by default. The web UI's hint for it states the order: empty uses the profile named after the sensor, or default.ini when there is none. Builder devices already use it, for example cli -s .isp.iqProfile /etc/sensors/iq/sc2235.ini in hi3516ev200_lite_imou-cue2-c22en. On your board the sensor name is ov2710_mipi, there is no ov2710_mipi.ini, and so it falls through to default.ini. That's why it looked fixed.
Why that blocks this PR as it stands:
- Nothing in this tree selects
ar0130_quiet.ini. Every cv200 image would carry 911 lines that no camera opens unless someone hand-edits a symlink. The tree's rule is that nothing ships that nothing runs. - The tuning is measured on one board, in one room at night, with exposure pinned. That's real evidence for that camera, not for the family. Your own "why a second file" section says the same.
Where it fits: OpenIPC/builder#254, the C23S device you've just opened. Ship the file in the device overlay, for example as general/overlay/etc/sensors/iq/c23s.ini, and select it from that device's customizer.sh with cli -s .isp.iqProfile /etc/sensors/iq/c23s.ini. Builder already does this for other boards (hi3516ev300_ultimate_xm-85h50ai and hi3518cv100_lite_xm-n51813l carry their own IQ files). Every C23S then gets it from first boot, and no other cv200 board changes.
If a family-wide [3dnr] change ever makes sense, it needs measurements from more than one sensor and in daylight. I'd close this one in favour of builder#254.
|
You are right and my premise was wrong: That settles it: the file belongs in the device, not in the shared package. It Closing this in favour of #254, as you suggested. The bisected ranges and the |
Problem
On hi3516cv200 the streamer opens
/etc/sensors/iq/default.iniand nothingelse. No file named after the sensor is tried, and no key in its configuration
selects an IQ profile:
curl /api/v1/config.jsonenumerates every setting thebinary has, and none of them names an IQ file. The package links that single
name, statically, for every board:
A cv200 board carrying an OV2710 therefore runs the tuning of an Aptina AR0130,
and the
iq/ov2710.inishipped two lines above is never read.What is read of the chosen file is narrower still. On this build the loader
says so itself:
So
[ccm],[sharpen],[gamma]and[DRC]cannot be used from a textprofile, and
iq/ov2710.iniwould gain nothing by being selected: the sectionthat sets it apart from
ar0130.iniis a[ccm]block, which is in that list.The consequence is that the noise of every cv200 camera - the complaint in
OpenIPC/openhisilicon#304 - is decided by one
[3dnr]ladder, written for asensor most of these boards do not carry.
What this adds
files/sensor/iq/ar0130_quiet.ini, a copy ofar0130.iniin which 46 lineschange, all of them inside
[3dnr], on all twelve ISO steps:Every other section is byte-identical, and the existing
*.iniglob installsthe file, so the package needs no other change. Selecting it is a symlink:
Measurements
VStarcam C23S, Hi3518EV200, OV2710, MIPI 1080p30, one lamp-lit room at night,
camera untouched between runs. Exposure is pinned - see the note below - so
the figure is comparable across restarts; it reproduces to +-0.002 over
reboots.
sigmais the median standard deviation of the 8x8 luma blocks,detailthemean absolute gradient at 1:1 on a box-filtered copy. One image and one row
per test are kept, 81 tests in all.
Two things the table shows that are not obvious from the defaults:
YTFStrbuywhat fifteen points of
YSFStrbuy, for half the detail lost. It is at 48 inthe shipped profile; 128 is still applied, 160 makes the ISP refuse the whole
block and fall back to its own defaults.
CSFStr 48/CTFstr 24cut the chroma blotches (median 8x8 Cb sigma 11.0 -> 2.1 at YSF 150) without moving the
luma figures at all, which matters more than the sigma on a night image
because the coloured speckle is what makes it look broken.
Ranges found by bisection, because an out-of-range value makes the ISP drop the
whole block and fall back to its own defaults - visible as
sigma/Yjumpingback to 0.36, which is a free validity oracle:
Why it is a second file and not a change to the default
It changes the picture for every cv200 board, and what I measured is one room
at night with the exposure pinned. A board used outdoors in daylight would get
the same aggressive smoothing. Shipping it beside the default, reachable by one
symlink, lets the person who wants it take it.
Note on the exposure
The numbers above are only comparable because the exposure does not move on
this build:
isp.aeMode: auto, with or withoutaeStrategy: fast|slowandaeSpeed, leaves the exposure register at0x20(two lines) for fortyseconds, sampled every four seconds. Setting
aeMode: manualwith a maximumexposuredoes work, and writes 1101 lines of 1104. I am not claiming that isa defect of the platform - only that it is why the measurements are pinned.
What this does not fix
The colour of the brightest parts of the frame. On this board a white ceiling
and a daylight window come out magenta, and the cause is measurable: the
automatic white balance this build applies gives R x1.47 and B x1.58 in
daylight, so red and blue clip at 255 before green does, and in those areas the
green channel sits at 43 against 185 red and 178 blue.
Proof that it is the light level rather than the sensor: holding an ND filter in
front of the lens - a pair of sunglasses, so not colour neutral - drops mean
luma from 155 to 135 and the magenta pixels of the frame from 12.0 % to 3.3 %,
the green channel in the same area going from 43 to 131. With the AWB gains or
a DRC curve reachable, those surfaces would not clip; this build exposes
neither, which is a separate report. A denoise profile cannot help there, and
this one does not pretend to.
Hardware tested on