Category "opencv"

How to read grayscale img from a video with OpenCV?

I read all pictures from my pic directory and then convert them each to gray-scale with canny edge detections before writing it all to a video. But, when I use

How fix "unresolved external symbol" during OpenCV building with "WITH_QT" flag on in Visual Studio 2019?

I want to build an OpenCV library with Qt support from the source with CMake and Visual Studio 2019. Here are steps I did: Downloaded both opencv-4.5.5 and open

normalize image with opencv in c++?

I have a TfLite model that takes a standardized float32 image as an input, the pixel range should convert from the [0~255] to [-1~1] I wrote a demo function but

What can cause an LNK2019 Error when building a project?

I built my program with wxWidgets Library and OpenCV. I set up my project by first including wxWidgets property file as follows: Property manager where property

Is there a way to guarantee a certain number of lines detected with cv2.HoughLines()?

This question is an extension to my previous question asking about how to detect a pool table's corners. I have found the outline of a pool table, and I have ma

Show the center coordinate of the object tracking bounding box

I would like to know how I can print the tracking coordinate rectangle onto the video. I want the coordinate of the center point of the rectangle and, of course

Count Unique Faces from Image dataset

I'm using OpenCV's haar cascade(haar-classifier) to detect faces in the image and storing those faces(cropped from the image) in one folder. I've around 10000+

find object canny edge detection and remove noise background

Hello i am trying to get this canny edge detection in this but what I achieve is how to remove noise from the background like the example one and only show th

How to record depth stream from realsense L515

I have a depth camera (Intel Realsense L515) and I do like to record a video of the depth. I have seen this answer which is using FFMPEG, but I didn't know how

convert cv::mat to IplImage

Mat m = Mat(4, 4, CV_8UC3); IplImage * iplImage = cvIplImage(m); error: cannot convert ‘_IplImage’ to ‘IplImage*’ {aka ‘_IplImage

How can I go about averaging different sized images?

I have a collection of images from tissue sections which contain a specific area of interest. Given this is biology, each image is slightly different (position

Why is there an extra row of zeros in the histogram of images in a folder?

I have a folder comprising 20 images (.jpg format). I am trying to obtain the histogram of each of the images and store it as a Pandas data frame. My code is sh

Build OpenCV for Android with CMake's ExternalProject_Add

I am creating an Android library that uses OpenCV via NDK. It doesn't require any Java parts of OpenCV, native parts only, so I decided not to use OpenCV for An

How to detect checkboxes by removing noise using Python OpenCV?

I am trying to identify the checkboxes in the image The top 4 are identified but the bottom 2 are not. At the same time I would like to be able to get rid of th

cv2.VideoCapture inconsistent behavior between cap.set and loop read

I was trying to read the 600th frame of a video using cv2.VideoCapture. However, I found that the following two methods both successfully read an image but the

Saving files with cv2.imwrite() making the output white completely after FFT conversion

I am trying to denoise images using Fast Fourier Transformation (FFT) in python using the reference from this site. Unfortunately my output image is becoming c

OpenCV - Correcting Image for Mis Alignment

I discovered the other day that my camera lens or perhaps tilted sensor is causing an object centered in front of the camera to appear off center in the capture

cv2.error: OpenCV (4.5.3) occurs in raspberry pi

I tried to test Picam with the code below with Raspberry Pie. import cv2 def main(): camera = cv2.VideoCapture(-1) camera.set(3,640) camera.set(4,4

Python cv2.VideoCapture() has wrong resolution and read cropped images

I'm trying to read images from an IDS GV-5240CP camera plugged to my laptop via ethernet using Python and OpenCV. This is what I am supposed to get : A 1280x102

Having trouble importing cv2, outputting an importerror

Input Trying to import these libraries and cv2 is throwing an error: import argparse import cv2 from datetime import datetime import keyboard as key import imut