translating ROI code in c#

Posted by sayyad on Stack Overflow See other posts from Stack Overflow or by sayyad
Published on 2011-01-09T22:50:30Z Indexed on 2011/01/09 22:53 UTC
Read the original article Hit count: 284

Filed under:

Hi, I am trying to translate this code in c# using emgucv.

I have some questions.Could yome body help me line by line.

cvSetImageROI(img1, cvRect(10, 15, 150, 250)); I have four points (PoinstF). Should I calculate rectangle or there is some way with four points.

CvInvoke.cvSetImageROI(img1, ------------(how can I declare cvReCt(10, 15, 150, 250)); //c#

IplImage *img2 = cvCreateImage(cvGetSize(img1), img1->depth, img1->nChannels); //c# Image img2; // i supose i needn't to allocate memory.//c#

cvCopy(img1, img2, NULL); CvInvoke.cvCopy(img1, img2, IntPtr.Zero);//c#

cvResetImageROI(img1); shoul i ResetImageROI.//c#

thanx and best regards,

© Stack Overflow or respective owner

Related posts about c#