Visual Intelligence Summit: Oct 22 in San Francisco Get your ticket

Show Images with cv2 imshow

You can use the OpenCV imshow function to visualize an image. This is useful for displaying raw images, or images that you have annotated with OpenCV (i.e. images annotated with bounding boxes).

To use the imshow function, first load an image using the cv2.imread function and apply any transformations with OpenCV. Then, you can display the image using the following code:

Python
cv2.imshow("image", image)
cv2.waitKey(0)

This function will display an image in interactive mode. You should not use this function if you are on a device without a connected screen.

Next steps

OpenCV can be used with the open source supervision Python package.

supervision provides an extensive range of functionalities for working with computer vision models. With supervision, you can:

1. Process and filter detections and segmentation masks from a range of popular models (YOLOv5, Ultralytics YOLOv8, MMDetection, and more).
2. Process and filter classifications.
3. Compute confusion matrices.

And more! To learn about the full range of functionality in supervision, check out the supervision documentation.

Start where you are

Speak with an AI expert

Our team will help you start solving business problems on the first call.

  • Solution architecting
  • Live demonstration
  • Pricing and specifications
  • Feasibility assessment

Over 16,000 organizations build with Roboflow.

Rivian
Pella
Chobani
USG Corporation
BNSF Railway
American Woodmark
Outcomes
Patrick Industries
Peer Robotics