Category "opencv"

Serving local webcam video stream to web with "multipart mixed replace" HTTP response

This article shows how to stream a local webcam to the browser with Python + Flask + OpenCV + multipart HTTP response. After launching the following self-contai

How to load video in OpenCV (Java)

I'm trying to load a video file in OpenCV Java, and have narrowed down my issue to the following code: import org.opencv.core.Core; import org.opencv.videoio.Vi

Python Remap function returns not an image

I have a problem with the code. There is no compile error, but the result does not give a corrected image. Could someone please explain me where is my error. I

Use hardware Trigger in Baumer neoAPI python SDK

I want to use Hardware Trigger in Baumer camera with neoAPI SDK. I found continuous mode in example but no documentation available for hardware trigger. import

How to pass a video return from JavaScript to python backend in Django view for OpenCV

I want to do certain tasks and the processes are as follows: 1. Access the camera of the user to get the video-frames from them. 2. Process the video frames fro

Crop colour image according to OTSU threshold

I have a colour image which I have sucessfully applied the OTSU thresholding method on its greyscale form to obtain the outline of the biscuit: Original Colour

OpenCV: My camera opens but it won't return any frames

I am working with OpenCV to record some videos. I have this very simple test code that records a 20 seconds video: import cv2 import os import time base_dir =

Scanned image noise removal and text strengthening/enhancing

I want to remove noise from scanned image pdf and enhance it. I have tried lots of technique but did not get success yet. Please help on this. Thanks in advance

How to calculate the Euclidean distance in a canny image

I have a black line and purple lines. I want to calculate the distance between each purple pixel points in the canny image and the closest black line in the mos

opencv face detection problems

Please help me resolve this **openCv **problem in faces import cv2, time first_frame = None video = cv2.VideoCapture(0) while True: check, frame=video.read(

Can someone explain the output of forward() in DNN module?

when I learn YOLO using opencv, and I use 1 class. outs = net.forward(output_layers) if I print the output is as follows: [9.31552518e-03 7.26305973e-03 2.5157

object detection with YOLO in 2 stream cameras using multithread and opencv

I want to do object detection with YOLO in 2 stream cameras. I use multithread and the result is like in the video. So when 2 camera streams are used, object de

Raspberry pi 64 bit Os showing Unable to locate package libjasper-dev. how to fix this?

I am using a raspberry pi 4. And I installed a 64-bit (not 32-bit) Raspberry Pi OS. When I tried to install libjasper-dev using the command 'sudo apt-get instal

Scene Text Image Super-Resolution for OCR

I am working on an OCR system. A challenge that I'm facing for recognizing the text within ROI is due to the shakiness or motion effect shot or text that is no

Fast and Robust Image Stitching Algorithm for many images in Python?

I have a stationary camera which takes photos rapidly of the continuosly moving product but in a fixed position just of the same angle (translation perspective)

How can I draw a circle next to each other with a text in center uisng opencv in python?

I'm trying to draw a concurrent circles of equal radius on top row of image with a text on center of circle. I'm able to draw a single circle on center of imag

Saving and loading image descriptors

I've using ORB/FLANN to compare images and want to save / load image descriptors that come out of FLANN to a file so I can read them in later to compare with an

How to solve "RuntimeError: CUDA error: invalid device ordinal"?

I'm trying to run this code. I don't know what is wrong with it, but this code is not running. and I don't know how to solve this problem. import cv2 from facia

How to calculate average pixel intensity inside a laser line in Python?

I am trying to write a code that calculates the speckle contrast of a laser line. Here is an example of an image that I would be analyzing: The image is black w

opencv_traincascade -numStages 1 How many stages do I need?

I am tracking one particular dog and nothing else. What is the maximum stage, number of positive and negative samples that makes sense? With: ./opencv_trainc