Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to set region of interest ROI??

Hello expert ! I'm a newbie.. Can anyone of you help me how to set region of interest(ROI) of an opening image?? I'm still learning opencv by myself from internet wthout any guidance from my lecturer..so stress trying to learn something new without any help..But Im not give up !!!

Actually I want to set a ROI on a wounded skin. Let say I open an image, then I want to set ROI in that image.. My ROI is in wounded area. Here is what Im trying. But there is no ROI..it just open the image.Can anyone of you help me please??


image description

here example of the wounded image that i want to set ROI
image description

How to set region of interest ROI??

Hello expert ! I'm a newbie.. Can anyone of you help me how to set region of interest(ROI) of an opening image?? I'm still learning opencv by myself from internet wthout any guidance from my lecturer..so stress trying to learn something new without any help..But Im not give up !!!

Actually I want to set a ROI on a wounded skin. Let say I open an image, then I want to set ROI in that image.. My ROI is in wounded area. Here is what Im trying. But there is no ROI..it just open the image.Can anyone of you help me please??


image description

#include <opencv\cv.h>
#include <opencv\highgui.h>

using namespace cv;

int main(int argc, char** argv)
{
  int key = 0;
  IplImage* img = cvLoadImage( "C:\\Users\\acer\\Documents\\Visual Studio        
  2012\\Projects\\o1.jpg" ); 
  cvNamedWindow( "Example1", CV_WINDOW_NORMAL );
  cvShowImage("Example1", img);
  cvWaitKey(0);
  cvReleaseImage( &img );
  cvDestroyWindow( "Example1" );

  /* sets the Region of Interest*/
  cvSetImageROI(img, cvRect(150, 50, 150, 250));

  return 0;
  }

here example of the wounded image that i want to set ROI
image description