Category "computer-vision"

How to create a Python convolution kernel?

I'm trying to create a convolution kernel, and the middle is going to be 1.5. Unfortunately I keep running in to ideas on how to do that. I'm trying to create s

Error: (-215:Assertion failed) npoints > 0 while working with contours using OpenCV

When I run this code: import cv2 image = cv2.imread('screenshoot10.jpg') cv2.imshow('input image', image) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) edg

Python OpenCV skew correction for OCR

Currently, I am working on an OCR project where I need to read the text off of a label (see example images below). I am running into issues with the image skew

Detect and crop a box in .pdf or image as individual images

I have a multi-page .pdf (scanned images) containing handwriting I would like to crop and store as new separate images. For example, in the visual below I would

Displaying images from each class of a batched tensorflow dataset

I'm doing an assignment creating a cv model with 6 different classes. I've loaded my dataset as per this example: https://keras.io/examples/vision/image_classif

How to find extreme outer points in an image with Python OpenCV

I have this image of a statue. I'm trying to find the top, bottom, left, and right most points on the statue. Is there a way to measure the edge of each side

Can't import .so file due to permissions missing: failed to map segment from shared object

I'm trying to run a custom project that uses large parts of the SiamMask project. When the code is ran, one of the many imports is this one: from . import regi

How to convert bounding box (x1, y1, x2, y2) to YOLO Style (X, Y, W, H)

I'm training a YOLO model, I have the bounding boxes in this format:- x1, y1, x2, y2 => ex (100, 100, 200, 200) I need to convert it to YOLO format to be so

cv2.findContours function is not working in both versions

I am new to computer vision and haven't really went through any tutorials on thresholding or blurring or other filters. I am using the below two piece of codes

OpenCV version 4.1.0 drawContours error: (-215:Assertion failed) npoints > 0 in function 'drawContours'

I have the following code that worked well with OpenCV 3.4.1 and now is not working with OpenCV 4.1.0 and gives an error. I do not know how to adapt the code wi

Video Streaming from IP Camera in Python Using OpenCV cv2.VideoCapture

I am trying to get video stream in python from IP camera but i am getting an error. I am Using Pycharm IDE. import cv2 scheme = '192.168.100.23' host = schem

Using Local Binary Patterns with a Circular Mask

In order to extract texture-based features; LBPs (Local Binary Patterns) are used in many background-foreground detection algorithms. It is easy to understand w

How to get the coordinates of the bounding box in YOLO object detection?

I need to get the bounding box coordinates generated in the above image using YOLO object detection.

Clustering images using unsupervised Machine Learning

I have a database of images that contains identity cards, bills and passports. I want to classify these images into different groups (i.e identity cards, bills

How to detect this kind of artifacts/noises in my image?

I've been processing some image frames in videos and I discovered that sometimes one or two frames of the video will have artifacts or noise like the images bel

Difference between absdiff and normal subtraction in OpenCV

I am currently planning on training a binary image classification model. The images I want to train on are the difference between two original pictures. In ot

PPF 3D Models Matching OpenCV C++

I am developing an application that: Reads 7 model files and trains a PPF 3D Detector; Reads a scene file and try to match with the detector; Store the resu

Image Search using Image Similarity Measures

I am working on a project which is image searching engine. The logic behind is that there will be some images stored in a database and the user will input a new

Is there any way I can use the downloaded pre-trained models for TIMM?

For some reason, I have to use TIMM package offline. But I found that if I use create_model(), for example: self.img_encoder = timm.create_model("swin_base_patc

Draw ellipses on people using Expectation Maximization with OpenCV

I have a few doubts about how to approach my goal. I have an outside camera who is recording people and I want to draw an ellipse on every person. Right now wha