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
1
vote
0 answers

How to fill the outside region of ROI with specific color?

In the below image I want to make the region outside the rectangles as black color, so how it can be done using opencv ?image with roi
santhosh136
  • 145
  • 1
  • 1
  • 8
1
vote
1 answer

How can i move the vertices of the ROI in python and opencv?

I trying to draw the contour in the ROI. But the vertices of the ROI appear on the left side of the image. I want to move the ROI to the place indicated in the photo, but I don't know how to do it. I'm new to OpenCV and Python, so any help is much…
Stella
  • 23
  • 5
1
vote
1 answer

How to extract only circular ROI portion of the image and show Radius of the circle with a button click in Tkinter window of Python OpenCV GUI

Extract Circular ROI & Show Radius of the Circle in Tkinter Label I am requesting help from python experts in this community. I have searched about my problem all over Stackexchange as well as the Github community. But I didn't find anything…
shantmanu
  • 49
  • 2
  • 12
1
vote
2 answers

Extracting characters from words in an image

I have a extracted image as this , I want to crop and extract the individual letters from this image. I have tried the below code, but it is working only for the names which are written like this for this image I am getting expected result as…
Neo_21995
  • 67
  • 7
1
vote
1 answer

imshow ROI has different size than ROI.shape

Evening all! My questions are the following: 1.The shape of roi is only supposed to be 200,200. Here it is showing 313,313 and Im not sure why. 2.When I switch frame for roi as the argument to imshow(), the result is also not the correct size of…
noc_coder
  • 349
  • 1
  • 15
1
vote
0 answers

How can I capture a specific ROI of raspberry pi camera?

I want to capture a specific ROI (say 20x1800 region) of raspberry pi camera. First, I used the raspistill --roi. It gave me a zoomed image. The same happend with picamera crop method. So I decided to capture the whole image by raspicam and then…
1
vote
1 answer

Converting OpenCV cv.Rectangle(img, pt1, pt2) into NumPy array with Python

I know the coordinates of rectange(x1,y1,x2,y2) I want to crop the rectangle portion I have tried the same coordinates parameter as to draw rectangle for cropping. black = np.zeros((1080, 720, 3), dtype = "uint8") while(True): # Capture…
user9503597
1
vote
1 answer

How does matplotlib.path.contains_points interact with PolygonSelector?

I'm fairly new to Python and am stuck on a problem... I'm trying to draw a region of interest (ROI) on an image and calculate the average pixel value in that ROI. To start, I tried the following - first I used matplotlib.widgets.PolygonSelector to…
djeng
  • 11
  • 3
1
vote
1 answer

What algorithm would be most useful for real time detecting deformable ROI (not object) in an video frame?

I am working on a project in MATLAB (with later implementation in C++ or possibly Python, with OpenCV) where when a real time video starts, the user may draw a region of interest. It will be drawn out as polygon. However, this ROI may get out of the…
Martin V
  • 55
  • 1
  • 2
  • 6
1
vote
3 answers

I would like to define a Region of Interest in a video and only process that area

I am having problems understanding regions of interest in opencv. I have some code that does a simple background subtraction from my first_frame. I am also able to draw a rectangle with my mouse_draw_rect function. Now, I would like the background…
1
vote
1 answer

OPENCV: Find line direction/angle

I'm creating a PapperSoccer project and I have a problem with finding the direction of movement/line. I'm using HoughLinesP to detect lines and it works as well as possible. I use ROI, in which I am looking for a line, and then I move it…
1
vote
1 answer

Memory overflowing by using roi() function Opencv on Javascript

I have a camera with a double lens connected via USB to my computer and I have created an anaglyphic 3D video using OpenCV on Javascript. The problem is, I reach an error called OutOfMemory. I have checked for leak memory from my variables that are…
1
vote
1 answer

OpenCV pixel access pointr vs. at() - Different values

I encountered weird behaviour when trying to access pixels as shown below: void Dbscan::regionQuery(int i, int j, std::vector* res) const { // check rect. grid around center point const size_t row_min = std::max(0, i-eps_); const size_t…
felix
  • 33
  • 3
1
vote
1 answer

How to publish/stream roi of rectified images by using image_proc?

I am using ROS to control a drone for real-time image processing applications. I have calibrated camera by using cameracalibrator.py node in Ros. When I use image_proc node to compare raw and rectified images, I don't get what I want. Although…
Ender Ayhan
  • 308
  • 3
  • 14
1
vote
1 answer

ROI transparent background (MATLAB)

I'm trying to use imfreehand and save the coordinates of my ROI so when I overlay the image onto another, that ROI is transparent (or set to NAN). Basically is there a way to set inside the imfreehand region as 'NaN' when I overlay onto another…
DMD
  • 43
  • 8