2022 Developer Survey is open! Take survey.

Questions tagged [opencv]

Open Source Computer Vision Library (OpenCV) is an open source machine learning library used primarily for computer visions applications. OpenCV contains over 2,500 optimized algorithms (including state of the art computer vision ones).

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Applying filters to custom objects in an image

I would like to create an application that adds image filters (Snapchat-style) to photos of cats or chairs (just for the sake of this question). In order to do that properly, I thought of using Active ...
user avatar
  • 101
0 votes
0 answers
26 views

How to solve this ValueError: Dimensions must be equal

I'm trying to train an autoencoder model with colored image samples but I got this error ...
user avatar
  • 1
0 votes
0 answers
6 views

OpenCV warpAffine error during image augmentation using Albumentations

I have been trying to do image augmentation using a library called Albumentations. But I got some error from OpenCV while transforming the images. I ran the code below on Kaggle's notebook. The ...
user avatar
  • 1
0 votes
1 answer
14 views

How to solve MemoryError problem

I've created and normalized my colored image dataset of 3716 sample and size 493*491 as x_train, its type is list I'm tring to convert it into numpy array as follows ...
user avatar
  • 1
0 votes
0 answers
15 views

Read all files from all the folders

I am using Windows, Jupyter Notebook, OpenCV, Mediapipe, Tensorflow. Hello. I have a video Dataset with 100 action folders and each folder has 100 videos(.avi). Frames Per Second is 25. I want to read ...
user avatar
-1 votes
1 answer
117 views

AttributeError: 'NoneType' object has no attribute 'landmark'

I am on windows, using jupyter notebook, Mediapipe:Holistic Solution, Python, tensorflow. I am using a Holistic solution and trying to get the left hand, right hand and pose landmarks. I am giving my ...
user avatar
0 votes
1 answer
22 views

Converting RGB values to contour values

I am using matplotlib to generate a filled contour plot, please consider the below example as a sample contour plot. I want to read off the contour values from such a filled contour plot using opencv'...
user avatar
0 votes
0 answers
10 views

Identify visible stones in the image - Approach in OpenCV & Deeplearning

I have samples images of stones present in the images. I need to identify the visible stones only. The approach which I tried is threshold based filtering and detecting cv2.contours. Also, I am ...
user avatar
0 votes
0 answers
9 views

When i'm training the pre-trained model on kaggle dataset, it is showing 79% accuracy. when i test on different dataset it shows 42% accuracy

This is the code i used to train the pre-trained model 'inception v3'. And can i know it is showing accuracy as 0.8717 but the val_accuracy as 0.7781. why there is a that much difference. Can anyone ...
user avatar
0 votes
0 answers
53 views

How to count no. of boxes using OpenCV?

I am trying to find no. of boxes available in the warehouse. I am using: Here is my code for the same. ...
user avatar
1 vote
1 answer
17 views

Help me to identify the doors and windows from this image

I am struggling to mark windows and doors from this type of images. Actually, each images are in different style, and the color thermal maps also varies. There is no ground truth as well. Would you ...
user avatar
0 votes
0 answers
9 views

Which model should I approach to classify people based on their face?

I am using shape_predictor_81_face_landmarks.dat in order to obtain facial landmarks. Here is the result: As you you can see this is the points are actually 2D numpy arrays: ...
user avatar
0 votes
0 answers
278 views

Normalizing images with OpenCV (divide by 255)

I'm loading images from my dataset, which are all of resolution 200x200 and in RGB format. I'm loading them using OpenCV for Python, with the following code: ...
user avatar
  • 1
0 votes
0 answers
33 views

Dataset for OCR from aerial view using YOLOv5s

The task is to detect rotated alphanumeric characters embedded on colored shapes. We will have an aerial view of the object (from a UAS: Unarmed Aerial System). Something of this sort: (One Uppercase ...
user avatar
1 vote
1 answer
276 views

error: (-215:Assertion failed) [closed]

I was testing OpenCV with their code provided within the documentation. Unfortunately, I'm facing an unexpected error. I think, it might be due to the newer version that I've. I've tried the fix of ...
user avatar
1 vote
0 answers
17 views

Object Detection, custom dataset, algorithm [closed]

I'm looking for a solution to detect objects and classify them, using a custom dataset.The overall goal is to detcet objects using my webcam. So far I've wanted to use YOLO in combination with OpenCV, ...
user avatar
  • 11
0 votes
0 answers
198 views

How to draw a line on video frames using opencv?

I have following code for object tracking and have x and y coordinates in a dataframe for a few frames of the video. I would like to draw a line using these coordinates so that my output looks like ...
user avatar
0 votes
0 answers
39 views

measure the tracking error on object detection algorithms?

I have done object detection on my video data using trackers such as CSRT, KCF and got the detection part.I have ground truth coordinates (x,y) values for few frames from the original video which ...
user avatar
0 votes
0 answers
18 views

how to make image classification model to detect object and track object in a video

i have built a disaster classification model . now i want to use this classification model to detect ex- cyclone in a video to draw bounding box around it and track the cyclone if possible.is it ...
user avatar
0 votes
1 answer
14 views

OpenCV2 resizing image: recommended size [closed]

I am working on image processing project. I see that it's recommended to resize the image in the data pre processing step. How do I decide what size to to resize it to? The tutorial I am following ...
user avatar
0 votes
1 answer
67 views

Detection of a specific shape in an image

I want to create an algorithm in order to detect the following shape (in the blue region) in videos or images: I have no dataset from the corresponding object so I thought that if I define it ...
user avatar
  • 111
0 votes
1 answer
22 views

How to convert the image into frontal?

I have to complete the project in which I have to apply some techniques or model to images . My aim is to convert the image to frontal/straight when it comes to skewed , sheared or any transformation. ...
user avatar
  • 219
0 votes
0 answers
12 views

Why do images in Open CV template matching get matched to the templates more than once?

The following code reads the set of input tiff files under tiffile and template tiff files under files and performs template matching on them. After the image gets matched, opencv contour extracts the ...
user avatar
1 vote
0 answers
17 views

Which library is better to go with for text recognition(CNN+RNN+CTC), OpenCV vs Keras vs Tensorflow?

I want to build a model to recognize text form images, for this purpose I need CNN stacked with Bidirectional LSTM and CTC. I would like to know which library would be better and how?
user avatar
0 votes
0 answers
17 views

Detection of vortex and numbering on basis of rotation

Problem Statement: I have a video of ANSYS Simulation of vortices formed due to flat plate plunging. The video contains vortices (in simpler terms blobs), which are distinguished according to their ...
user avatar
  • 101
0 votes
0 answers
18 views

Why does model CNN with high accuracy but give low prediction on handwriting input images?

I'm trying to train the CNN model with the MNIST dataset expand with my own images handwriting, so I have merged them together, ...
user avatar
0 votes
2 answers
23 views

Is it ok that my computer vision dataset just is loads of frames and images instead of video?

I am new computer vision and I am having a dataset with consecutive frames of videos. I want to ask that is it okay? How will you deal with it to output a video with some detections?
user avatar
  • 11
1 vote
0 answers
241 views

Real distance between bounding box centers

Assume that I have a camera pointing in a specific direction. I know the Euclidean distance (Real world distance) of the camera to a fixed point, X (mm). Using ...
user avatar
1 vote
0 answers
25 views

crop part of image from image, change it and put it same place in original image

I have image (think of image of small plant) with bounding box. For data augmentation I want to rotate (45 degrees) the image (plant) in bounding box, and place it at same place in original image. so ...
user avatar
1 vote
0 answers
44 views

Using machine learning to find the most similar image that contains another image

As the title states I want to use ml (maybe some kind of CNN autoencoder?) to find the most similar image (I have a list of 10k+ images) within another image. I am currently just using opencv with ...
user avatar
0 votes
0 answers
391 views

Converting pixel values to temperature OpenCV

I am converting a pixel values to temp (values of a thermal image). But after conversion output image is not except able. Here is my code: ...
user avatar
-1 votes
1 answer
2k views

ImportError: cannot import name 'cv2' from 'cv2' [closed]

I'm using anaconda and installed OpenCV using conda-forge. conda install -c conda-forge opencv In my notebook I run this line of code ...
user avatar
0 votes
1 answer
2k views

error in running exe file after changing .py to .exe

I have changed my python code to an .exe file using pyinstaller and anaconda. In my python script ("untitled.py") I import opencv which I have already installed from source using cmake. ...
user avatar
  • 1
0 votes
0 answers
29 views

Opencv installation problem

I tried to install opencv using cmake to work with gpu. After installation, I try to confirm installation. So, I open anaconda prompt and python >> then import cv2. However, I got the error of ...
user avatar
  • 1
0 votes
1 answer
170 views

Which openCv function can be used to compute BEV perspective transformation given a point coordinates and the camera extrinsics/intrinsics?

I have the 3x3 intrinsics and 4x3 extrinsics matrices ...
user avatar
  • 125
0 votes
1 answer
826 views

What is the use of applying img_to_array() after cv2.imread()

In a book, I saw the following code to load images from a directory: ...
user avatar
  • 659
0 votes
1 answer
27 views

Object detection stops predicting well according to how I collect the images

On my problem I have to use 4k resolution (3840x2160) to record images and detect qrcodes at the same time. The images I end resizing it to 1920x1080 to save it on disk. The problem is that if I train ...
user avatar
  • 123
2 votes
1 answer
875 views

Where is the rotated angle actually located in fitEllipse method?

Main task: I fit the ellipse using the fitEllipse() method and then I'd like to count the rotation angle between the horizontal axis and the major axis of the ...
user avatar
  • 21
0 votes
2 answers
640 views

Does resizing the image size, reduce the quality of the images in CNN?

I am doing a project for cancer recognition. My data set has hunderds of images but not of equal size. I wanna resize them to the size of the smallest image. But I am wondering do you think using the <...
user avatar
  • 119
7 votes
0 answers
819 views

Find missing object(s) in image with a priori knowledge about the missing object(s) (w.r.t base image)

Problem Statement: I am working on developing a method, or borrow/modify/combine existing ones, where given an golden image (reference or base with all expected objects to be present), it is able to ...
user avatar
  • 3,936
0 votes
0 answers
186 views

Difference between two images but in certain region only

I have two images, where i need to find the difference. i can easily did with the help of SSIM function. Now i want to find the difference between two images but only selected region (i want to ignore ...
user avatar
0 votes
1 answer
113 views

Cable angle measurement (rotation)

I need to detect the rotation of a cable (degree) in the x-axis with high precision [0.2 (or more) degree detection] from its original state. Detailed description: I have a cable that is set in its ...
user avatar
  • 21
0 votes
1 answer
662 views

Canny edge detection not working on Gaussian blurred images

I am trying to detect edges on this lane image. First blurred the image using Gaussian filter and applied Canny edge detection but it gives only blank image without detecting edges. I have done like ...
user avatar
  • 1
1 vote
2 answers
242 views

Facial recognition on offline images

I want to do facial recognition on wide varieties of images captured at various ages of my family members. Below are some of the questions I have. If a person uses glasses of different types, do I ...
user avatar
  • 235
1 vote
0 answers
18 views

Object identifaction with trained CV model

I am rather new to Computer Vision and Neural Networks, but I already build the following setup: I have a robot which crawls through the grass with a live video feed. I build an OpenCV filtering and ...
user avatar
  • 11
2 votes
1 answer
434 views

Distance of a people in an image [closed]

What is the best approach to find the distance of a person/people from camera, using an image?
user avatar
1 vote
0 answers
109 views

Detect the presence/absense of simple components from a circuit board using object detection

In this case I have a challenge of inspecting a recently mounted product, using computer vision, to detect the absence of any component that I have to check. For this task, I tried the concept of ...
user avatar
  • 123
0 votes
1 answer
115 views

Comparing two images and showing the difference in a new image?

I would like to compare two web pages images using computer vision techniques. Show what are non-unique portions comparing both images. Which part image1 not exist in image2 vice versa.
user avatar
1 vote
0 answers
32 views

Paragraph extraction from text

I am trying to separate scanned pages of a 3 column book into paragraphs. On the pages there can be images located in an arbitrary location, occupying part of one, two or all three of the columns. ...
user avatar
  • 11
2 votes
1 answer
167 views

What is the origin of YOLO/darknet coordinates

I am aware of that darknet/yolov3 outputs relative coordinates, would the coordinate (0,0) be at the bottom left, or at the top left? I am confused as opencv2 seems to have the ...
user avatar
  • 123