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
2
votes
2 answers

Matlab get rbbox (ROI) in pixels of the image inside the figure

I just need to get the ROI in pixels (relative to image, not figure) using rbbox, but I'm having a hard time converting from normalized figure coordinates of the rbbox to image coordinates. I already tried to multiply it by: image size, figure size,…
Pedro77
  • 5,176
  • 7
  • 61
  • 91
2
votes
1 answer

clear ROI history from kcf tracking in opencv

I am using KCF tracking in OpenCV. everything is ok and i can track an object as well, but i have a problem: i set a ROI and algorithm work fine, sometimes i need change my ROI. there for tracker should reset and track my new ROI but it won't. in…
2
votes
1 answer

How to crop multi-ROIs as images in DM by scripting?

I would like to crop these two ROIs as two images: I am thinking to crop these two ROI synchronously by scripting, I found a code about creating image from ROI by D. R. G. Mitchell. So I wrote this: image front := GetFrontImage() imagedisplay…
Joey Wei
  • 67
  • 3
2
votes
2 answers

Add padding to object in 4-channel image

I have a 4-channel image (.png, .tif) like this one: I am using OpenCV, and I would like to add padding of type BORDER_REFLECT around the flower. copyMakeBorder is not useful, since it adds padding to the edges of the image. I can add certain…
Finfa811
  • 618
  • 1
  • 8
  • 28
2
votes
1 answer

Get a row from an image

I have an image and I want to get a first row (and then the second, and so on...) I wrote this code, but it doesn't work as expected: int main(int argc, char** argv) { Mat img = imread("a.jpg"); Mat line, ROI; for (int i = 0;…
j.doe
  • 327
  • 7
  • 22
2
votes
1 answer

Detect face center in ROI

I'm trying to get a message when my face's center goes into a ROI, is it possible to detect? or it doesnt work that way? (I just started with openCV) This is my code: import cv2 import sys import numpy as np cascPath =…
lelp89
  • 21
  • 1
  • 3
2
votes
0 answers

How to get qr code image without borders in opencv?

I want to get the QR code without the white borders or without any other background image. Till now I have only been able to detect the finder pattern using canny edge detection. I have also converted the QR code image into the binary image and now…
Abhimanyu Saharan
  • 642
  • 1
  • 10
  • 26
2
votes
0 answers

Opencv ROI setting by characteristic of image not by the coordinate

I first tried to get the edge of the image by using Canny Edge Detector. Which is the yellow part of the second image, but I want to get ROI (which is the red part) automatically, but not by the coordinates of the image. I've set thresholds to get…
이도일
  • 31
  • 3
2
votes
1 answer

Get the pixels in an ROI only, how?

Trying my hand at scripting and so far I have a function that returns an ROI derived through thresholding. PA.setRoiManager(roim) paOpt = PA.CLEAR_WORKSHEET +PA.SHOW_NONE +PA.INCLUDE_HOLES +PA.EXCLUDE_EDGE_PARTICLES + PA.ADD_TO_MANAGER #…
2
votes
1 answer

Compare OpenCV Mat with scalar elementwise

I have a cv::Mat A, which has CV_32F. However it holds integer values like 1,2....100. I want to form a mask of same size as A. But the mask must contain zeros if A(x,y) not equal to 5 (say). The mask must contain ones if A(x,y) equal to 5 (say). I…
mkuse
  • 2,250
  • 4
  • 32
  • 61
2
votes
1 answer

OpenCV Stitcher with ROI vector

I am trying to stitch 5 images with ROIs with the following code. I keep getting unhandled exception of memory length_error even though vImg vector and rois are the same size. Also, why rois should be vector of vector of Rect? the inner vector is of…
ZIV
  • 21
  • 2
2
votes
1 answer

center of mass for ROI in python

I have an Nifti file of ROIs that is a 192 x 192 x 12 array and want to be able to find the center of mass of the whole thing as well as each of the 12 slices. i am using cm = join(dname, 'cardiac_roi.nii') roi_img = nib.load(cm) roi_data =…
Sidney
  • 71
  • 1
  • 2
  • 6
2
votes
1 answer

Get the Region of Interest(ROI) of an Image of a type Pix in Leptonica

I want to know what function shall I use to get the Region of Interest of an image of type Pix using Leptonica Image Processing Library. I already done this in OpenCV and I wanted a version of it in Leptonica. Thanks in Advance. OpenCV Code: Mat…
user2481398
2
votes
1 answer

Using Location (x/y) to update Region of Interest when tracking a video in Matlab

I'm trying to track a ball in a video in Matlab by using a template and this function from the Image Processing Toolbox: LOC = step(H,I,T,ROI) computes the [x,y] location of the best template match, LOC, in the specified region of interest, ROI.…
A.Sully
  • 21
  • 4
2
votes
1 answer

openCV Python camera calibration - crop and ROI

I am using OpenCV-Python to correct lense distortion on pictures. I use the script given in this tutorial. If I apply the script on the picture provided by the author of the script, its working. However, if I use my own picture, I can either get a…
Mathou
  • 31
  • 3