Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why does cv.cv2.selectROI in python is not working as expected?

Hi, I'm using OpenCV 3.3.0-dev with Python 3.5
I'm trying to make use of the function with the following example:

import cv2
img = cv2.imread('starwars.jpg')

r = cv2.selectROI("Image", img, False, False)

cv2.imshow('image', r)

cv2.waitKey(0)
cv2.destroyAllWindows()

It gives me some irrelevant white space image(It doesn't let me upload a screenshot here)
The output is this thing -> (138, 165, 263, 224) when you print it on the console

Do I need the contrib modules for Python or? The cv.cv2.selectROI method is stated in the High-level GUI module.

click to hide/show revision 2
None

updated 2017-10-25 11:14:40 -0600

berak gravatar image

Why does cv.cv2.selectROI in python is not working as expected?

Hi, I'm using OpenCV 3.3.0-dev with Python 3.5
I'm trying to make use of the function with the following example:

import cv2
img = cv2.imread('starwars.jpg')

r = cv2.selectROI("Image", img, False, False)

cv2.imshow('image', r)

cv2.waitKey(0)
cv2.destroyAllWindows()

It gives me some irrelevant white space image(It doesn't let me upload a screenshot here)
The output is this thing -> (138, 165, 263, 224) when you print it on the console

Do I need the contrib modules for Python or? The cv.cv2.selectROI method is stated in the High-level GUI module.

click to hide/show revision 3
None

updated 2017-10-25 11:47:27 -0600

berak gravatar image

Why does cv.cv2.selectROI cv2.cv2.selectROI in python is not working as expected?

Hi, I'm using OpenCV 3.3.0-dev with Python 3.5
I'm trying to make use of the function with the following example:

import cv2
img = cv2.imread('starwars.jpg')

r = cv2.selectROI("Image", img, False, False)

cv2.imshow('image', r)

cv2.waitKey(0)
cv2.destroyAllWindows()

It gives me some irrelevant white space image(It doesn't let me upload a screenshot here)
The output is this thing -> (138, 165, 263, 224) when you print it on the console

Do I need the contrib modules for Python or? The cv.cv2.selectROI method is stated in the High-level GUI module.