User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
isp:sample_awb_implementation_in_c [2018/06/16 03:41] – [AWB::_correctGains()] Igor Yefmovisp: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::_isRedOE() const bool AWB::_isRedOE() const
 { {
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;
     }     }
 }</code> }</code>
Line 213: Line 215:
  
     const auto limit = m_ov.getLimit(Val::gain_g); // assume the same limit for all 3 channels     const auto limit = m_ov.getLimit(Val::gain_g); // assume the same limit for all 3 channels
-    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:Aria]] utility for the POC. This code has minimal comments but should be fairly easy to comprehend nonetheless:+This is a copy-paste of the code used in [[manual:Aria]] utility for the POC. This code has minimal comments but should be fairly easy to follow:
  
 <code c++>void ImgAnalyzerDlg::_awbInfo() <code c++>void ImgAnalyzerDlg::_awbInfo()
Line 288: Line 290:
 } }
 </code> </code>
 +
 +
 +====== Initial values ======
 +
 +Following are the initial defaults for the variables that affect the process of automatic white balance adjustment:
 +^ Name (as seen in ''%%ImgAnalyzerDlg%%::_awbInfo()'' above) ^ Value ^
 +| ''currTolerance'' | ''15/100'', adjusted automagically based on last frame's stats |
 +

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information