Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
isp:automatic_white_balance [2019/05/09 00:41] – [Calculate color properties] Igor Yefmov | isp:automatic_white_balance [2019/05/09 00:45] – [Figure out the adjustment] Igor Yefmov | ||
---|---|---|---|
Line 50: | Line 50: | ||
- Calculate the " | - Calculate the " | ||
- Use the \(Y\) from [[#Collect statistical data set|previous step]] (if it was collected) or just go with the value of \(100\) which is hopefully a good representation of a well-adjusted overall brightness | - Use the \(Y\) from [[#Collect statistical data set|previous step]] (if it was collected) or just go with the value of \(100\) which is hopefully a good representation of a well-adjusted overall brightness | ||
- | - Calculate the two ratios that represent how far off the '' | + | - Calculate the two ratios that represent how far off the '' |
==== Figure out the adjustment ==== | ==== Figure out the adjustment ==== | ||
Line 56: | Line 56: | ||
Now that we have all the information we need to make a decision let's make one! | Now that we have all the information we need to make a decision let's make one! | ||
- | - If the **absolute** value of average | + | - If the **absolute** value of average |
- Be careful not to overflow beyond the sensor gain's cap | - Be careful not to overflow beyond the sensor gain's cap | ||
- If the gain is already at 0 and needs to be increased - make sure you use addition, as multiplication won't help you((or just make sure you never adjust the color channel' | - If the gain is already at 0 and needs to be increased - make sure you use addition, as multiplication won't help you((or just make sure you never adjust the color channel' | ||
- | - Same for the '' | + | - Same for the '' |
- | The '' | + | The '' |
===== Sample implementation in C++ ===== | ===== Sample implementation in C++ ===== | ||
[[Sample AWB implementation in C++]] shows one possible implementation of the approach described above. It does use (without much explanation) some of the external structures, but those should not be hard to deduce from their usage | [[Sample AWB implementation in C++]] shows one possible implementation of the approach described above. It does use (without much explanation) some of the external structures, but those should not be hard to deduce from their usage |