As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [opencv]

OpenCV (Open Source Computer Vision) is a cross-platform library of programming functions for real time computer vision.

41 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
432 views

Simple AR Tag classifier

I have been working on creating a simple AR Tag classifier, for detecting a simple AR Tag glyph. Spitting out an image that looks like this: With the red circle indicating the corner closest to the ...
Mark Omo's user avatar
  • 449
5 votes
0 answers
633 views

Selecting child contours in OpenCV

I'm really new to OpenCV. :) I have been working on this for almost an entire day. After hours of sleepless work I would like to know if I can further improve my code. I have written some code to ...
Avishka Dambawinna's user avatar
5 votes
0 answers
78 views

Interfaces and OOP Design for Image Editor software

I'm new to C++ programming, and I'm building an Image Editor software like Lightroom/CameraRaw from scratch. Apart from procedural code (actually seems that all the functions works correctly) my goal ...
Alessandro Cerro's user avatar
5 votes
0 answers
39k views

Python video streaming server and client

Worked with same IP cameras for some time, and noticed that camera use much processing power because of multiple connections. Writing streaming server looked as nice solution so I decided to write my ...
Aleksandar's user avatar
4 votes
0 answers
67 views

Merging two, three or four images

This code is about merging two or more images. Minimum images are two while maximum images loaded are four. So I will check how many images the user wants to merge. If the user chooses 2 and selects ...
luffy's user avatar
  • 41
4 votes
0 answers
89 views

Improving SVM fitting accuracy

I have this attempt on classifying CIFAR10 images. I'm curently training my SVM only on 1 of 5 sets, and decided on using polynomial kernel(degree=3,C=0.1 [changes have no effect],gamma=2 [changes ...
CIsForCookies's user avatar
4 votes
0 answers
3k views

Capture, display, and save webcam video with openCV using C++

The basics were taken from one of the more basic OpenCV examples. Any comments are welcome regarding style and conventions, etc., as well as tips on using the OpenCV library, which I'm new to. Also, ...
user avatar
4 votes
0 answers
444 views

Plant/Residue Detection project, How to structure it?

Introduction I have wanted to develop this project for more than two years. I just started writing it a couple days ago. I use it to detect plant or residue pixels in crop row images but it provides ...
Sarin Suriyakoon's user avatar
4 votes
0 answers
836 views

Matlab-like reshape in OpenCV

I am translating Matlab code to OpenCV. The code involves lots of reshaping of large matrices. As the Matlab reshape differs from OpenCV you can't just use OpenCV reshape. Here is why: Let's suppose ...
Saeid's user avatar
  • 141
3 votes
0 answers
66 views

Segment characters from license plate image according to regions with same height

I have (for example) the following license plate image: And I want to segment the characters. The code I have so far consists of me using cv2.MSER to detect ...
Michael Kročka's user avatar
3 votes
0 answers
606 views

Python - Get Unique frames of video containing object

I am analyzing videos from the popular social media platform, TikTok, and extracting the songs into a Spotify playlist. Here is a gif of one of these videos: https://i.imgur.com/I0dVoac.mp4. Full ...
Peter Stenger's user avatar
3 votes
0 answers
2k views

OpenCv webcam streaming class for WPF

My goal is to make a class that wraps the complexity of OpenCvSharp implementation to show a webcam streaming into a WPF Image. ...
user avatar
3 votes
0 answers
416 views

PPE object detection with tensorflow and opencv with rtsp streams

I am working on an object detection API implemented in Tensorflow 1.14 and OpenCV 4.1, where my task is to recognize personal protection equipment (PPE) worn by workers at various construction site ...
Demeter Márton's user avatar
3 votes
0 answers
362 views

Print numbers from video frames to console using pytesseract

This is my first ever Python program. It checks every frame of a video file with Tesseract then uses OCR to recognise numbers in that frame and prints it to the console. ...
Dev's user avatar
  • 31
3 votes
0 answers
100 views

Find product defects in a photograph

I have been trying to find defects (brown/copper parts) on this sample using PyQt, OpenCV and Python: And I can find defects, too. My problem is, I have nobody to ask, get feedback etc. I need some ...
Mustafa's user avatar
  • 31
3 votes
0 answers
93 views

Data set generation with Python and Matplotlib

I want to use Python and Matplotlib to create a data set of images. I want to do this by transforming the plot to a numpy matrix. At the moment it takes about 0.1 second to generate 100 images of size ...
Gilfoyle's user avatar
  • 1,115
3 votes
0 answers
1k views

Send Opencv::Mat image from Qt application to HTML client, using websocket

I wrote an application in C++ using Qt 5.7, basically is a websocket server, using qwebsocket for this, capable to send an image elaborated with OpenCV to an HTML client. In order to do this I encode ...
rok's user avatar
  • 141
3 votes
0 answers
4k views

Optimizing OpenCV's undistortPoints

I am working on improving the runtime of code that undistorts every pixel point in an image. Currently each point is undistorted via a call to cv::undistortPoints()...
major mishap's user avatar
3 votes
0 answers
698 views

Grayscale bilinear patch extraction - SSE optimization

My program makes an intensive use of small sub-images extracted using bilinear interpolation from larger grayscale images (some call this problem subpixel translation). I am using the following C++ ...
BConic's user avatar
  • 131
3 votes
1 answer
3k views

fftshift implementation for OpenCV

I'm trying to implement fftshift from matlab for OpenCV. Can you please review the correctness of my algorithm? Have I missed something? Also, is there a better and faster way to do it? ...
Gilad's user avatar
  • 5,311
2 votes
0 answers
55 views

Control your laptop using hand gestures

This program uses webcam to track hand movements / gestures and sends corresponding mouse / keyboard events to the computer. I use it to switch spaces, move active window between desktops, scroll ...
TheCommentWriter's user avatar
2 votes
0 answers
82 views

ORB Image detection and OpenCV

Working code for my image detection script. This is functional code. I'm loading a number of images into an array, and using two classes to generate the two main components I need for my detection; <...
mak47's user avatar
  • 121
2 votes
0 answers
42 views

Variable speed video playback using OpenCV according to frequency of mouse clicking

Here's my code - I've a lot to learn so any advice, tips etc would be welcome! A few notes: I'm using OpenCV and numpy for other features in this code, not just for this snippet. The main readon for ...
user1714819's user avatar
2 votes
0 answers
48 views

Can I better architect this image detection bot?

I'm trying to learn python by building an image detection bot for a 2d game. The bot checks to see if it can find any one of a number of images within a cropped section of the game window. If it finds ...
L23P's user avatar
  • 123
2 votes
0 answers
40 views

Create mosaic task #2

This post is a continuation of post here: Create mosaic task. I improved code readability, hopefully it'll be reviewable now. Once again, I'm asking for tips to write better code. Task: The point ...
Plajerity's user avatar
2 votes
0 answers
257 views

Plant pest detection using CNN

I am doing a project in plant pest detection using CNN. There are four classes each having about 1400 images. While training the model using Convolution Neural Network, there is a smooth curve for ...
Milan's user avatar
  • 121
2 votes
0 answers
1k views

Real time object Detection and tracking

I am using OpenCV 3.3 to implement a project. My project allows to detect pedestrian and car using background subtraction from video sequence which get from camera. First, I detect the object region ...
Pawan Khatri's user avatar
2 votes
0 answers
783 views

Optimize GPU usage for real-time object detection from camera with TensorFlow GPU and OpenCV

Trying to recognize objects real time using TensorFlow Object Detection API OpenCV using ssd_mobilenet_v1_coco_11_06_2017 model in GPU. ...
Rashik's user avatar
  • 21
1 vote
0 answers
32 views

PyOpencv code that displays color, b/w and canny images input from single live webcam camera

I have e single live webcam camera. I have displayed one color image, black and white image and canny edge image. Do you think I should put a scrollbar for the canny edge detection amount to make it a ...
mvr950's user avatar
  • 297
1 vote
0 answers
167 views

Image capture client - multi-threading + sharing data between services

I'm working on a small side project at the moment - like a homemade CCTV system. This part is my Python Capture Client - it uses OpenCV to capture frames from a connected webcam and sends the frames ...
TomSelleck's user avatar
1 vote
0 answers
717 views

OpenCV multi-colored object tracking

These two classes are part of a larger program that I am developing. The user is supposed to interact with the program using handheld red, blue, green or yellow discs and moving them in front of a ...
ArmenHeat's user avatar
1 vote
0 answers
2k views

Opencv forEach with lambda expression for parallel processing

I'm using forEach function to access pixels in parallel like so: ...
Ja_cpp's user avatar
  • 351
1 vote
0 answers
207 views

Performing FFTW double[2] on images of type cv::Mat

I've two different types of variables: cv::Mat and array of type double[2] so I do quite lot of copying between the two types. I ...
Ja_cpp's user avatar
  • 351
1 vote
0 answers
2k views

Utilizing Moviepy's fl_image function efficiently to modify an incoming video

This is a followup question from this question of mine. I used the suggested function provided by an answer in my current code. 'model' is a dictionary loaded from the pickle file. 'loadpickle' and ...
GKS's user avatar
  • 159
1 vote
0 answers
107 views

Sensor-Stream-Recorder Project

I'm a student working on a project to record sensor data from magnetic sensors. As part of the project, I created a 'Recorder-Tool' using opencv to acquire the recordings I need. The purpose of this ...
Hassan's user avatar
  • 11
1 vote
0 answers
5k views

OpenCV-based wrapper for Windows screen capture

I have written a ScreenVideoCapture class that implements an interface for capturing frames from a specified monitor connected to the PC. It uses OpenCV structures (...
Wasabi Fan's user avatar
1 vote
0 answers
606 views

Asking for optimizing part of a hog-based object detection using C++

Since Matlab implementation of HOG+SVM object detection algorithm was too slow, I decided to make use of the speed of C++ and re-implemented the algorithm in it. However, I'm more or less unfamiliar ...
Federico's user avatar
  • 111
0 votes
0 answers
208 views

Converting ffmpeg AVFrame Yuv420P to OpenCV RGB cv::Mat

Thanks to Rotem and his help with this issue, I can offer an implementation that allows to use cvtColor to convert an AVFrame YUV420P into a BGR ...
Antonio's user avatar
  • 133
0 votes
0 answers
28 views

program which select's the ROI from un-stabilized video and Extract the ROI in diff window as stabilized ROI, wants to increase its computation speed

The problem is, program is really lengthy and computationally expensive. So is there any way to make this program faster or any other way to write this code? (I am beginner in python and would love ...
Shubham Mahadik's user avatar
0 votes
0 answers
67 views

Auto Fishing in Terraria via open cv colour detection

The code works perfectly. It looks for a certain parts of the screen where the terraria fishing particles would be appear, after which it if the threshold is met it fishes. I was wondering if it was ...
SpedEdRokay's user avatar
0 votes
0 answers
81 views

Python 3 OpenCV script that scans a giant picture to make a video

This is a Python script that I wrote completely by myself. Basically it scans a giant picture to make a video. They say one picture is worth more than a thousand words. Since a video contains ...
Ξένη Γήινος's user avatar