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
1 answer
126 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. ...
0 votes
1 answer
426 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.
0 votes
0 answers
20 views

Extracting values from a map image (jpg)

Not sure if this is the right platform but I'm in a bit of a fix here. I'm trying to convert this image(jpg) to a raster wherein, the colormap attached shows the values. I'm aware I need to use openCV ...
0 votes
1 answer
27 views

How to run our python scripts utilizing our device's GPU?

My laptop has NVIDIA GeForce GTX1650 GPU. I want to utilize this GPU to run my Python script. Any help in the form of code would be really helpful. I mean tried researching this so much but I couldn't ...
0 votes
1 answer
188 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'...
0 votes
1 answer
147 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 ...
1 vote
3 answers
2k views

Detect blur image using ssdmobilenet and tensorflowlite

I have clear images of cards vs blurry images of card. My task is to capture photo when the image is not blurry, as you can see from the description I need this code to run in real time on android ...
0 votes
0 answers
15 views

How to rotate a rectangle which has been formed by cv2.rectangle function

Exactly as the question says. Constraints: You cannot do anything to the image itself. Any and all operations has to be on the rectangle formed.
1 vote
1 answer
111 views

White circles extraction from a little darker background

I'm trying to extract three white circles on the top left corner from the image below: I've tried to use: ...
0 votes
0 answers
5 views

Techniques for training a CV model based on PDF markup

Given a PDF of a home blueprint (e.g. https://www.roomsketcher.com/content/uploads/2023/04/blueprint-maker.jpg), what are techniques and approaches for training a CV model to lean how a user would ...
0 votes
1 answer
421 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 ...
1 vote
2 answers
336 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 ...
0 votes
1 answer
424 views

OpenCV isn't processing all the images in a directory

I'm really trying to apply CLAHE to a directory of about 700 images. However, once I manage to get it running, for some reason the code stops before all the images are processed. When I run it on ...
0 votes
0 answers
7 views

YOLOV4 model training

I can't start my model tutorial. I ran it correctly, I tried it before, but now it doesn't even start. why could it be? Did the update come?
0 votes
1 answer
62 views

Use computer vision to detect door blockage

I want to detect door blockage on a camera. Basically if the exit door is blocked by an object, it detects it as an anomaly. How can we do it? Is it possible to do it using OpenCV? Remember, it doesn’...
1 vote
0 answers
49 views

Highlight specific paragraphs from documents

I have a bunch of documents in which I want to highlight certain paragraphs/keyphrases. I have a list of the most frequently appearing sentences and I want to search for these paragraphs/keyphrases in ...
6 votes
2 answers
1k views

How to remove the hotspots from given image by using Python and opencv?

In the picture below there are some regions which are very bright (i.e. more white). Some bright regions are wide and some are narrow or thin. The red box covers one such wide bright spot, and blue ...
6 votes
2 answers
868 views

How can I detect partially occluded objects using Python?

I'm building a computer vision application using Python (OpenCV, keras-retinanet, tensorflow) which requires detecting an object and then counting how many objects are behind that front object. So, ...
0 votes
1 answer
255 views

Difference in .copy() vs = for copy image into new variable

First, my 3 separate scenarios and my input image Scenario 1: Copying input image onto new variable by " = " ...
10 votes
2 answers
2k 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 ...
0 votes
1 answer
51 views

Special criteria for histogram equalization measure

let us consider following code -which reads image, applies histogram equalization procedure and display both result : ...
0 votes
0 answers
157 views

Rotation invariant template matching using CNN or openCV??

I have 4000 unique images of sample data from intersections and the start and end point from all lanes (approach and exit lanes) on it. I want to train a neural network on these images to find the ...
0 votes
1 answer
237 views

OpenCV add/subtract functions produce different results from numpy array add/subtract

Im trying to brighten and dim an image using OpenCV with two approaches. Approach 1: Used OpenCV's add and subtract functions to ...
0 votes
0 answers
259 views

Large Numpy array causes error when trying to load

I'm making an ai using image recognition, so I recorded each frames of me playing into a numpy array. It worked just fine when the first time I exported all the images and got the 6 thousand of them. ...
0 votes
1 answer
33 views

Get multiple predictions from a knn model

I want to my code to return multiple(5) predictions from my trained knn model. I've tried using predict_proba() but it just returns the probabilities and not the names Here is my code: ...
0 votes
0 answers
25 views

Why there is different versions of openCV packages on Anaconda website? Which one should I install?

I am trying to install openCV. Why there are several versions of openCV packages available on Anaconda official website. Which one should I use?
0 votes
0 answers
179 views

Tensorflow Text Segmentation or Open CV Text Segmenation

I want to extract text data from the image, however not sure what approach I should take. Steps successfully performed Dataset collection Image Preprocessing done Image Augmentation done Final Image ...
0 votes
0 answers
130 views

Orange widget with OpenCV setMouseCallback

I am designing an Orange Widget for facial recognition. I would like to draw a rectangle around faces captured in video by setting mouse events with ...
4 votes
1 answer
3k 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 ...
0 votes
0 answers
108 views

Rotating and cropping scanned images with OpenCV2

I wrote a script to take scanned images and crop out the background from them as well as rotate them to the proper orthogonal orientation (my set of images were not initially scanned properly and many ...
0 votes
1 answer
70 views

Converting images in a directory into a vector to calculate cosine distances?

I'm currently going through issues in terms of acquiring multiple images at once to convert them to a vector for calculating the cosine distance to get similarity between say an image from the ...
0 votes
0 answers
40 views

How to mathematically calculate individual pixel values after each image rotation?

If I have an image that is being rotated using OpenCV in python, about its centre, How do I mathematically calculate the pixel values after each rotation? A python code for this operation would be ...
2 votes
0 answers
31 views

orientation detection - images of govt. issued documents

Trying to figure out a macro approach to detecting the orientation of documents that works across document types (maybe a pipe dream). We successfully used SIFT to detect orientation in documents ...
2 votes
2 answers
49 views

shapes recognition for shapes formed by dotted points

In the image, below right corner there is circle shape and triangle shape made with set of co-ordninates.I have searched extensively in the net for algorithm or approach to classify shape correctly ....
0 votes
0 answers
2k 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 ...
0 votes
1 answer
749 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 ...
0 votes
0 answers
39 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 ...
-1 votes
1 answer
3k 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 ...
0 votes
1 answer
536 views

Bounding box coordinates prediction

How to pass multiple bounding boxes coordinates to CNN model?My goal is to predict the coordinates of texts in an image.
2 votes
1 answer
105 views

Detecting unique icon on video in real time

For a project I am working on I'd like to be able to detect unique icons/barcodes in video footage. Suppose you have 10 people in the frame where each person is wearing a t-shirt with a similar but ...
0 votes
0 answers
2k 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: ...
3 votes
1 answer
113 views

Train ML algorithm to find edges

I have input RGB images as follows: I have a dataset of manually annotated images highlighting the outline(edges) from the input images I am attaching an example. My aim is to train a ML algorithm ...
1 vote
1 answer
1k 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 ...
1 vote
0 answers
25 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, ...
0 votes
0 answers
85 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 ...
0 votes
0 answers
20 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 ...
0 votes
1 answer
25 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 ...
1 vote
0 answers
42 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?
0 votes
2 answers
50 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?
1 vote
0 answers
712 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 ...