Questions tagged [roi]

Region Of Interest, a region of an image on which algorithms are executed on.

Region Of Interest (ROI) is a selected subset of a data set identified for a particular purpose and is commonly used in many application areas. The data set could be any of the following:

  • 1D data set: a time or frequency interval on a waveform
  • 2D data set: the boundaries of an object on an image
  • 3D data set: the contours or surfaces outlining an object (a.k.a. the Volume of Interest (VOI)) in a volume
  • 4D data set: the outline of an object at or during a particular time interval in a time-volume

Tag Usage:

An ROI on an image can be defined in different formats, like a , a or a set of . The tag is commonly used in question related to or . An ROI can be defined to:

  • Restrict the region of the data set that an algorithm is applied to and avoid unnecessary calculations. (e.g., in an )
  • Identify/Annotate a part of data set. (e.g., locate moving objects in )
  • Extract additional information from the data set. (e.g., measure size of a tumor on a medical image)

An Example:

ROI locates the boundaries of a registration plate (it's Persian), this area will be used for ANPR:

enter image description here

Additional Reading:

Region of Interest on Wikipedia

402 questions
59
votes
3 answers

Copy an cv::Mat inside a ROI of another one

I need to copy a cv::Mat image (source) to an ROI of another (Destination) cv::Mat image. I found this reference, but it seems that it does not work for my case. Do you have any pointers how could I do this using the OpenCV C++ interface?
theosem
  • 1,144
  • 3
  • 10
  • 21
37
votes
3 answers

How to copy a image region using opencv in python?

I am trying to implement a license plate recognition software using the ideas from http://iamabhik.wordpress.com/category/opencv/. I implemented the plate location using opencv in python, using "import cv2". It works okay and now I need to copy the…
curumim
  • 471
  • 1
  • 4
  • 4
26
votes
9 answers

What’s the ROI of Continuous Integration?

Currently, our organization does not practice Continuous Integration. In order for us to get an CI server up and running, I will need to produce a document demonstrating the return on the investment. Aside from cost savings by finding and fixing…
Liggy
  • 1,171
  • 2
  • 11
  • 19
19
votes
2 answers

OpenCV C++, getting Region Of Interest (ROI) using cv::Mat

I'm very new to OpenCV (started using it two days ago), I'm trying to cut a hand image from a depth image got from Kinect, I need the hand image for gesture recognition. I have the image as a cv::Mat type. My questions are: Is there a way to…
vprasad
  • 1,411
  • 3
  • 13
  • 17
18
votes
7 answers

How do you estimate a ROI for clearing technical debt?

I'm currently working with a fairly old product that's been saddled with a lot of technical debt from poor programmers and poor development practices in the past. We are starting to get better and the creation of technical debt has slowed…
StevenWilkins
  • 1,245
  • 8
  • 18
18
votes
3 answers

Region of Interest opencv python

I am trying to get a region of an image (ROI) using opencv python. The version of opencv used is 2.4.3. However when I try to call the API cv2.SetImageROI it returns this error AttributeError: 'module' object has no attribute 'SetImageROI' Also on…
Ajay Nair
  • 1,697
  • 3
  • 17
  • 30
16
votes
2 answers

How can one easily detect whether 2 ROIs intersects in OpenCv?

I am trying to detect whether 2 Regions of Interest (CvRects) are intersecting one another in OpenCV. I can obviously manually type several (or rather a lot of) conditions to be checked but that wouldn't really be a good way to do it (imo). Can…
Patryk
  • 18,244
  • 37
  • 110
  • 212
13
votes
1 answer

OpenCV & Python: Cover a colored mask over a image

I want to cover a image with a transparent solid color overlay in the shape of a black-white mask Currently I'm using the following java code to implement this. redImg = new Mat(image.size(), image.type(), new Scalar(255, 0,…
Will Li
  • 365
  • 1
  • 2
  • 11
12
votes
3 answers

OpenCV displaying 2 images adjacently in the same window

I am trying to display 2 images horizontally adjacent to each other in the same window using OpenCV. I have tried using adjustROI function for this.Image 1 has 1088 pixels width and 2208 pixels height while Image 2 has 1280 pixels width and 2208…
code4fun
  • 2,367
  • 8
  • 21
  • 36
11
votes
1 answer

copying non-rectangular roi opencv

I want to copy a part of an image which is not rectangle with C++ opencv. The corner points of the part is known in the image. I want to paste it in a another image in exact location. Can anybody please help me? The source image and the destination…
MMH
  • 1,549
  • 4
  • 21
  • 40
10
votes
3 answers

OpenCV ROI Out-of-bounds: Fill with black?

I'm using OpenCV to get a small rectangular ROI from a large image and save the ROI to a file. Sometimes, the ROI goes out of bounds of the image. I need a way to make the resulting Mat show the portion of the large image that is within bounds, and…
Jordan
  • 1,905
  • 8
  • 33
  • 58
8
votes
3 answers

OpenCV: howto use mask parameter for feature point detection (SURF)

I want to limit a SurfFeatureDetector to a set of regions (mask). For a test I define only a single mask: Mat srcImage; //RGB source image Mat mask = Mat::zeros(srcImage.size(), srcImage.type()); Mat roi(mask, cv::Rect(10,10,100,100)); roi =…
Hyndrix
  • 3,750
  • 7
  • 32
  • 67
8
votes
2 answers

crop and Save ROI as new image in OpenCV 2.4.2 using cv::Mat

Working on Face Detection and Recognition, and after successfully detecting a face, I just want to crop the face and save it somewhere in the drive to give it for the recognition code. I am having hard time doing the saving the Region of Interest as…
Sisay
  • 639
  • 7
  • 15
  • 30
7
votes
1 answer

Using ROI in OpenCV?

ROI can only be implemented with an rectangle. I however have a contour that I want to set as an ROI. Does anyone have an idea of how I would go about using a contour as an ROI rather than a rectangle? Otherwise if not possible, how could I focus my…
user1017485
  • 629
  • 1
  • 8
  • 16
7
votes
2 answers

openCV AdaptiveThreshold versus Otsu Threshold. ROI

I'm tried to use both of the methods but it seems like Adaptive threshold seems to be giving a better result. I used cvSmooth( temp, dst,CV_GAUSSIAN,9,9, 0); on the original image then only i used the threshold. Is there anything I can tweak…
user3396218
  • 245
  • 2
  • 8
  • 20
1
2 3
26 27