I just set up my specifications for object detection. This what I have built: OpenCV from source (OpenCV tutorial) Build darknet (Build Darknet) The specifications of my laptop are: Windows 10 Pro RTX 3060Ti (CUDA 11.1, CUDNN 8.6) Python 3.7.9 After compiled, I tested the darknet based on the tutorial, it detects my GPU, the picture is as below: Success,
Tag: opencv
Detect rectangles in an image with Python
I have a large collection of binary images like these ones: On each image I need to detect the white rectangle. The rectangles have different dimensions and orientations and sometimes they are interrupted by a black line (see image 2). I think the problem is easy to solve if one could remove the noisy background. Thus, I tried first using
numpy image float array, to int 0..255 value
I got 3 NumPy data arrays r,g,b represented as a 2D float64 array (720×1024) Essentially per row, each channel is a bunch of floats: What I would like to to do is making it a channel that I can use in cv2.merge((r,g,b)) So that the float64 values per row get multiplied by 255 and something that cv2.merge() accepts. I think
Avoid recursion error with cv2 and mouse callback
I have a class for opening up an image and drawing circles. The entire code can be found here: p1 and p2 store diametrically opposing points on a circle. These are capture with click and drag actions in _on_mouse_interact. It can be run with My issue is that I get Where is the recursion here? Answer Found some time… Apparently,
TIFF file has weird meta information specifically in image size
I have some tiff image files which have multiple pages in one tiff file. I tried to make separated image files by reading image meta information with libtiff and some python libraries, but the image size seems weird. Below is the description of a page by using tiffinfo. But actually, if I see this image with image viewer(for me, I
Represent a video as a 2D Array where each column represents a frame – OpenCV and Python
My goal is to transform a video into a 2D matrix X, where the column vectors represent a frame. So the matrix has the dimension: X.shape —> (# features of a frame, # total number of frames) I need this form because I want to apply different ML algorithms on X. To get X I proceed as follows: upload the
OpenCV tesserocr watermark detection
So I have about 12000 image links in my SQL table. Point is to detect which of those images contain watermarked text and which don’t. All text and borders is like this. I’ve tried with OpenCV and tesserocr But doesn’t seem it recognizes text on image at all. My second approach was to use some external open API site. It
Drawing a contour in a specific region of an image and finding the outermost contour in opencv-python
My code selects a frame from a video which is than subtracted with a background frame selected from the same video. It is then converted to grayscale, blurred, and then an image threshold is applied. Then a contour is drawn which outputs this image. However, I would only like to have the outermost contour and also not have any contours
Is there a method for connecting the detected corners in python?
I want to connect the detected corners that belong to the same object draw like a triangle around that. the following is my code it works I just want to add this functionality. Answer You can use cv2.line() method to draw a line between two points. Here is the documentation shows you how to use this method: https://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html
Drawing a simple image, displaying it, and closing it
I am trying to do some simple drawings. I wanted to use opencv (cv2) because on a second project I have to display a small animation (rectangle, size depending on a variable; updated every X seconds). However, I do not have experience with image processing libraries and opencv. I am running into a lot of problems, one of which is