Available in the LEADTOOLS Imaging toolkit. |
LineProfile example for C++ 5.0 and later
long maxR = 0, maxG = 0, maxB = 0;
int i;
m_Lead1.LineProfile(10, 10, 220, 120);
for(i=0; i<m_Lead1.GetLineProfileSize(); ++i)
{
if(m_Lead1.GetLineProfileRed(i) > maxR) maxR = m_Lead1.GetLineProfileRed(i);
if(m_Lead1.GetLineProfileGreen(i) > maxG) maxG = m_Lead1.GetLineProfileGreen(i);
if(m_Lead1.GetLineProfileBlue(i) > maxB) maxB = m_Lead1.GetLineProfileBlue(i);
}
CString msg;
msg.Format("maxR=%ld, maxG=%ld, maxB=%ld", maxR, maxG, maxB);
AfxMessageBox(msg);