Skip to content

Instantly share code, notes, and snippets.

@remoharsono
Last active November 21, 2022 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remoharsono/e8dc8d4cc148d0f32005f723812e6a29 to your computer and use it in GitHub Desktop.
Save remoharsono/e8dc8d4cc148d0f32005f723812e6a29 to your computer and use it in GitHub Desktop.
OpenCV: Select ROI
import cv2
image = cv2.imread("image.png")
x = cv2.selectROI("Select area", image, fromCenter=False)
print("Selected box: ", format(x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment