Ignore:
Timestamp:
07/23/2009 01:04:04 PM (10 years ago)
Author:
dave
Message:

added face classifier application, not working yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • foam/trunk/vision/src/Image.cpp

    r93 r94  
    171171        cvReleaseImage(&m_Image); 
    172172        m_Image=newimage; 
     173} 
     174 
     175Image Image::SubImage(int x, int y, int w, int h) 
     176{ 
     177        CvRect roi; 
     178        roi.x=x; 
     179        roi.y=y; 
     180        roi.width=w; 
     181        roi.height=h; 
     182        IplImage *newimage; 
     183        cvSetImageROI(m_Image,roi); 
     184        newimage = cvCreateImage( cvSize(roi.width, roi.height), m_Image->depth, m_Image->nChannels ); 
     185        cvCopy(m_Image,newimage); 
     186        cvReleaseImage(&m_Image); 
     187        return newimage; 
    173188} 
    174189 
Note: See TracChangeset for help on using the changeset viewer.