Available in the LEADTOOLS Imaging toolkit. |
SetRgnColorHSVRange example for Visual C++ 4.0
//This example sets a region corresponding to all pure green (Hue = 85)
//and colors near green (+/- 10)
//where Saturation is at least 40 and Value is at least 40
void CColorReplaceDlg::OnButton5()
{
int nH0,nS0,nV0,nH1,nS1,nV1;
nH0 = 75;
nS0 = 40;
nV0 = 40;
nH1 = 95;
nS1 = 255;
nV1 = 255;
m_Lead.SetRgnColorHSVRange(nH0, nS0, nV0, nH1, nS1, nV1, L_RGN_SET);
m_Lead.SetRgnFrameType(RGNFRAME_ANIMATED);
}