About 485,000 results
Open links in new tab
  1. How to Detect Rectangle in Python OpenCV - Delft Stack

    Feb 12, 2024 · Detect rectangles in images using OpenCV in Python. This article explores using findContours(), contourArea(), and HoughLinesP() functions for effective shape detection in …

  2. python - detect rectangle in image and crop - Stack Overflow

    Aug 19, 2017 · you are using cv2.RETR_LIST to find contours in the image. For your image to get better output use cv2.RETR_EXTERNAL . Before using that first remove black border line …

  3. python - How to find the rectangles in an image - Stack Overflow

    Feb 28, 2014 · You can find contiguous regions of an image using scipy.ndimage.measurements.label. By default, this finds orthogonally connected regions only; …

  4. Finding location of rectangles in an image with OpenCV

    Jan 15, 2010 · Here's a complete Python solution. The main idea is: Apply pyramid mean shift filtering to help threshold accuracy; Otsu's threshold to get a binary image; Find contours and …

  5. How to Detect Shapes in Images in Python using OpenCV?

    Jan 3, 2023 · In this article, we are going to see how to draw multiple rectangles in an image using Python and OpenCV. Function used:imread(): In the OpenCV, the cv2.imread() function …

  6. Detecting Geometrical Shapes in an image using OpenCV

    May 22, 2020 · Normally we use the cv2.findContours () function to detect objects in an image, right ? Sometimes objects are in different locations. But in some cases, some shapes are …

  7. 5 Best Ways to Detect a Rectangle and Square in an Image

    Feb 28, 2024 · By analyzing the length and angles of the approximated contour segments, one can differentiate between rectangles and squares. The function cv2.findContours() is key to …

  8. Rectangle Detection in Images: A How-To Guide - nulldog.com

    Mar 9, 2025 · Learn how to identify and locate rectangles within an image using various techniques and visual cues. This document outlines the steps to detect rectangles in an image …

  9. Detect Rectangle and Square in an Image using OpenCV Python

    Learn to detect rectangles and squares in images with OpenCV in Python. Follow our detailed guide for effective image processing.

  10. 5 Best Ways to Find the Bounding Rectangle of an Image

    Feb 28, 2024 · OpenCV Python offers several methods to accomplish this. Given a binary or edge-detected image, we want to locate contours and create bounding boxes around them to …

  11. Some results have been removed
Refresh