Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
isp:sample_awb_implementation_in_c [2018/06/16 03:41] – [AWB::_correctGains()] Igor Yefmov | isp:sample_awb_implementation_in_c [2022/04/04 23:32] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 173: | Line 173: | ||
// A more generic definition of this special condition is: too much red overexposure relative to | // A more generic definition of this special condition is: too much red overexposure relative to | ||
// green overexposure relative to overall brightness of the picture. The brighter the image the | // green overexposure relative to overall brightness of the picture. The brighter the image the | ||
- | // more overexposure we can tolerate | + | // more overexposure we can tolerate, but to a certain point |
bool AWB:: | bool AWB:: | ||
{ | { | ||
Line 183: | Line 183: | ||
}else if(m_vars.avgY < 60){ | }else if(m_vars.avgY < 60){ | ||
return m_vars.oeR > m_vars.oeG * m_vars.avgY * 3; | return m_vars.oeR > m_vars.oeG * m_vars.avgY * 3; | ||
+ | }else if(m_vars.avgY < 85){ | ||
+ | return m_vars.oeR > m_vars.oeG * m_vars.avgY; | ||
}else{ | }else{ | ||
- | return m_vars.oeR > m_vars.oeG * m_vars.avgY * 7; | + | return m_vars.oeR > m_vars.oeG * 8; |
} | } | ||
}</ | }</ | ||
Line 213: | Line 215: | ||
const auto limit = m_ov.getLimit(Val:: | const auto limit = m_ov.getLimit(Val:: | ||
- | const double precision = 0.1; | + | const double precision = 0.01; |
if(abs(m_vars.avgU) > precision){ | if(abs(m_vars.avgU) > precision){ | ||
Line 250: | Line 252: | ||
====== Sample usage ====== | ====== Sample usage ====== | ||
- | This is a copy-paste of the code used in [[manual: | + | This is a copy-paste of the code used in [[manual: |
<code c++>void ImgAnalyzerDlg:: | <code c++>void ImgAnalyzerDlg:: | ||
Line 288: | Line 290: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | |||
+ | ====== Initial values ====== | ||
+ | |||
+ | Following are the initial defaults for the variables that affect the process of automatic white balance adjustment: | ||
+ | ^ Name (as seen in '' | ||
+ | | '' | ||
+ |