Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
isp:sample_ae_implementation_in_c [2018/06/17 21:24] – [Helpers] Igor Yefmov | isp:sample_ae_implementation_in_c [2022/04/04 23:32] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 292: | Line 292: | ||
}</ | }</ | ||
+ | ====== Sample usage ====== | ||
+ | |||
+ | This is a copy-paste of the code used in [[manual: | ||
+ | |||
+ | <code c++> | ||
+ | |||
+ | static CString _corrOp2Txt(AE:: | ||
+ | using op = AE::CorrOp; | ||
+ | switch(_op){ | ||
+ | case op:: | ||
+ | case op:: | ||
+ | case op:: | ||
+ | case op:: | ||
+ | case op:: | ||
+ | case op:: | ||
+ | case op:: | ||
+ | } | ||
+ | return {}; | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | void ImgAnalyzerDlg:: | ||
+ | { | ||
+ | if(((CButton *)(GetDlgItem(IDC_CHECK_ISA_AE)))-> | ||
+ | return; | ||
+ | } | ||
+ | const auto & stats = m_analyzer.getStats(); | ||
+ | const auto correct = ((CButton*)(GetDlgItem(IDC_CHECK_ISA_AE_CORRECT)))-> | ||
+ | const auto aeTolerance = PerPart(GetDlgItemInt(IDC_EDIT_ISA_AE_RIGHT, | ||
+ | const int aeTgtLuma = GetDlgItemInt(IDC_EDIT_ISA_AE_BRIGHTNESS, | ||
+ | const PerPart aeHysteresis{GetDlgItemInt(IDC_EDIT_ISA_AE_HYSTERESIS, | ||
+ | AE ae{m_fx3.sensor(), | ||
+ | const auto rez = ae(correct); | ||
+ | |||
+ | // display the information | ||
+ | { | ||
+ | const PerPart pxUsed{stats.ae.pixels, | ||
+ | CString msg; | ||
+ | msg.AppendFormat(L" | ||
+ | msg.AppendFormat(L" | ||
+ | msg.AppendFormat(L" | ||
+ | msg.AppendFormat(L" | ||
+ | msg.AppendFormat(L" | ||
+ | msg += _corrOp2Txt(ae.details().op); | ||
+ | SetDlgItemTextW(IDC_STATIC_ISA_AE, | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ====== Initial values ====== | ||
+ | |||
+ | Following are the initial defaults for the variables that affect the process of automatic image brightness (Black Level, Exposure, Gains) adjustment: | ||
+ | ^ Name (as seen in '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | " |