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

441 questions
61
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,174
  • 3
  • 10
  • 22
48
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
  • 581
  • 1
  • 4
  • 5
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,181
  • 2
  • 11
  • 19
22
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,451
  • 3
  • 13
  • 17
22
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,827
  • 3
  • 20
  • 33
19
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,313
  • 8
  • 18
18
votes
3 answers

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
  • 495
  • 1
  • 3
  • 12
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
  • 22,602
  • 44
  • 128
  • 244
13
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
  • 3,998
  • 9
  • 45
  • 81
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,661
  • 9
  • 25
  • 39
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,676
  • 5
  • 26
  • 43
9
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
  • 4,282
  • 7
  • 41
  • 82
9
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
  • 681
  • 7
  • 16
  • 31
8
votes
2 answers

Shifting of trace boundaries in Matlab code?

I am trying to trace boundaries of objects using a manual ROI selection and to plot there outlines back on the original image in grayscale. I noticed that I have a shift of the outline compered to the original object location. Why? did I missed…
jane
  • 567
  • 2
  • 12
8
votes
4 answers

RotatedRect ROI in OpenCV

I have a RotatedRect, I want to do some image processing in the rotated region (say extract the color histogram). How can I get the ROI? I mean get the region(pixels) so that I can do processing. I find this, but it changes the region by using…
vancexu
  • 1,548
  • 3
  • 19
  • 30
1
2 3
29 30