2,007 questions
-4
votes
0
answers
65
views
How to implement real-time vehicle recognition with file selection, camera/RTSP URL, YouTube URL input, and zone detection using OpenCV? [closed]
I am building a real-time vehicle recognition system using Python.
The system should support these input methods:
Local video file upload
Live camera feed using a webcam
camera URL
YouTube video ...
0
votes
0
answers
371
views
Locally installed OpenCV to virtual env in Raspberry Pi
I spent two whole days to install OpenCV, virtualenv, Tensorflow.
My last goal is to link locally installed OpenCV to my virtualenv.
I reallized that I do not have to install OpenCV to my virtualenv ...
0
votes
0
answers
219
views
How to analyze the returned result of cv::calibrateCamera?
According to the sample code given by opencv, the rms returned by calibrateCamera is the reprojection error, and the return of computeReprojectionErrors is also the reprojection error. I did an ...
0
votes
1
answer
3k
views
OpenCV video only show a single frame instead of continuous frame
When I try to export the following video, it only shows a single frame for 12 seconds, I want to show the original video but it only shows one single frame
Below are the code attached:
ret, frame = ...
1
vote
0
answers
694
views
How to take Screen shot in real-time(like video capture) on mac os?
I use opencv for automating games therefore i need to take screen shots of what is going on screen in real time. I use pywin32 for it while I am on windows.
Is there a way to get similar effect on ...
2
votes
0
answers
208
views
How to convert Mat object to tensorflow Tensor in RUST Language?
this is my opencv code, how to convert padded_f32 mat object to tensorflow Tensor ?
let image = imgcodecs::imread("image_2021_08_02T09_11_01_447Z.png", imgcodecs::IMREAD_GRAYSCALE).unwrap();
...
0
votes
0
answers
316
views
Stereo calibration between normal camera and telecentric camera
I have 2 cameras, one follows pin hole model and the other has telecentric lens. I want to determine R,t between these two cameras. Is calibration through OpenCV's stereocalibration still applicable?
0
votes
1
answer
876
views
Why doesn't cv.waitKey(0) pause execution until key is pressed?
I had thought cv.waitKey would pause execution until a key was pressed, but it doesn't seem to be doing so. When I run the following code:
import cv2 as cv
print("Start")
k = cv.waitKey(0)
...
2
votes
1
answer
2k
views
Send OpenCV image and decode using base64: why not compatible?
I need to encode image into binary, send it to server and decode it back to image again.
The decoding method is:
def decode_from_bin(bin_data):
bin_data = base64.b64decode(bin_data)
image = np....
3
votes
0
answers
175
views
How do I solve an error when running dense optical flow on an image pyramid in OpenCV?
When I create an image pyramid from each of the two images and try to perform an optical flow using the calcOpticalFlowFarneback method, I get the following error.
OpenCV(3.4.3) Error: Assertion ...
4
votes
1
answer
2k
views
How to convert a video to a numpy array? [closed]
How can I convert a video to a multiple of numpy arrays or a single one to use it for machine learning . I only found ways to do it on images.
6
votes
1
answer
2k
views
Why is cv2.resize transposing the requested dimensions?
s1 = image.shape # Image is an opencv2 image (ndarray)
w,h,d = s1
image_ = cv2.resize(image, (w*2, h*2), interpolation = cv2.INTER_CUBIC)
s2 = image_.shape
In the ...
0
votes
1
answer
29
views
Update Change Password Page For Default And Other Groups
I am using opencart V 3.0.3.0
I want to check if customer group id = default, then show him change password form and allow to change password. Else show table with links to other platforms on my ...
1
vote
1
answer
544
views
OpenCV VideoWriter issue crashing on iOS - info.backendFactory.empty() in function 'open'
I'm using cv::VideoWriter from OpenCV 3.5.2 class to read a file and write it into another file, with a lower FPS rate. However, when calling
cv::VideoWriter videoWriter = cv::VideoWriter();
...
1
vote
2
answers
755
views
why does opencv threshold returns absurd output on a very simple image?
I am trying to count seeds in an image using cv2 thresholding. The test image is below:
When I run the below code to create a mask:
import cv2
import numpy as np
import matplotlib.pyplot as plt
img =...
1
vote
0
answers
166
views
How to or can we use Hu moment to change the shape and width of the object using opencv in python
I am using face_landmark_dtection model to find the different landmarks of the face. i successfully find the all landmarks and exact location of the landmarks.
Now i want to change the lips position ...
0
votes
1
answer
900
views
How to set HoughCircles parameters automatically to detect different sizes of circles in opencv python?
I want to set HoughCircles parameters automatically to detect all size of circles in an image. And also should detect group of same size circles.
I am trying group of same size circles in one image. ...
-3
votes
1
answer
290
views
I can't split my HSV image into channels (H,S,V)
Here is the code under Microsoft Visual 2010 C++. It illustrates splitting an HSV image into three channels Hue, Saturation and Value. When executing this program I get:
program.exe stopped working
#...
2
votes
1
answer
2k
views
Python CV2 choose alpha of mask to make it transparent
I want to make the mask which I append to an image transparent in some way. I have the following:
img_background[mask]=[0,5,255]
I want to have the mask region ([0,5,255]) transparent.
1
vote
1
answer
3k
views
Merging two images in CV2
I am trying to merge 2 images in python using CV2 without using libraries to do it.
So I cannot use any in-built functions from opencv and numpy (E.g: np.mean).
In general, I can use function from ...
0
votes
1
answer
781
views
MediaPipe AAR File Generation
I am new to MediaPipe Framework. I went through their documentation setup and installation guide for opencv@3, bazel, homebrew. I did everything and I'm also able compile and execute their Hello World ...
2
votes
1
answer
2k
views
How to draw vertical histogram projection on x axis?
Here is the example of image histogram horizontal projection from Article
for row in range(height):
cv2.line(blankImage, (0,row), (int(horizontal_projection[row]*width/height),row), (255,255,255), ...
0
votes
1
answer
156
views
Can a hyperspectral image be stored in cv::mat?
I know cv::mat container can store 3 channel images, but the data pointer of the container also could store multidimensional matrices. I was wondering if the different bands can be stored in the ...
0
votes
1
answer
359
views
Python: How can I fix messy areas in my image with openCV? [duplicate]
I have a code for finding the contours in image with OpenCV. But my code doesn't work when it's based on a messy image.
My image:
My image is a scanned paper, there is a lot of noise and messy areas. ...
0
votes
3
answers
167
views
Python: How can I improve the repetitive code? [closed]
I have a code with python.
My code works perfectly, but I want to improve it because there is a repetitive code.
This is my code:
x = int(x)
y = int(y)
w = int(w)
h = int(h)
How can I improve the ...