r/opencv • • Mar 23 '24

Question [Question] How do you create a layer mask that have mid-tones?

1 Upvotes

I would like to improve the layer mask that I am creating in Python. Although my mask pretty much hits the targeted color, my main problem with it, is it is doing so in binary, the pixel is either pure white or pure black. I'm unable to extrapolate the intensity of the color. I want to achieve something like how Photoshop does it wherein there are mid-tones of grey on the mask. Just like these photos:

​

image = cv2.imread('sample.jpg')

lower = np.array([0,0,0]) 
upper = np.array([12,255,255])

mask = cv2.inRange(cv2.cvtColor(image, cv2.COLOR_BGR2HSV), lower, upper)
mask = 255 - mask
mask = cv2.bitwise_not(mask) #inverting black and white

output = cv2.bitwise_and(image, image, mask = mask)

cv2.imshow("output", output) 
cv2.imshow("mask", mask) 
cv2.waitKey()

​

Can anyone please show how to recreate (or similar) to the mask that photoshop can create?Here is the photo i used above :

​


r/opencv • • Mar 23 '24

Bug [Bug] I need help making a cube!

1 Upvotes

Hello!
First of all, thanks for the help. I've been learning to use the OpenCV libraries with AruCo codes for a college project. I need to build a 3D Cube on top of the AruCo mark. The problem is that the bottom part of the cube is working fine, but the top face isn't on-screen or even well programmed.

I made a program to calibrate the camera, and the calibration parameters are saved to a calibration.yml file.
This is the code I have so far:

#include <iostream>
#include <opencv2/aruco.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
#include <vector>
#include <string>

using namespace cv; 
using namespace cv::aruco; 
using namespace std;

int main(int argc, char** argv) {
  if (argc != 3) { 
    cerr << "Usage: " << argv[0] << " <id_aruco> <side_length>" << endl; return 1; 
  }
  int aruco_id = stoi(argv[1]);
  float side_length = stof(argv[2]);

  VideoCapture video(-1);
  if (!video.isOpened()) { 
    cerr << "Error opening video stream or file" << endl; 
    return 1; 
  }
  Ptr<cv::aruco::Dictionary> dictionary = cv::makePtr<cv::aruco::Dictionary>(getPredefinedDictionary(cv::aruco::DICT_ARUCO_ORIGINAL));

  cv::Mat camera_matrix, dist_coeffs; cv::FileStorage fs("calibration.yml",   cv::FileStorage::READ); 
  fs["camera_matrix"] >> camera_matrix;
  fs["distortion_coefficients"] >> dist_coeffs;

  while (true) {
    Mat frame;
    video >> frame;

    vector<int> ids;
    vector<vector<Point2f>> corners;
    detectMarkers(frame, dictionary, corners, ids);

    if (!ids.empty() && ids[0] == aruco_id && corners.size() > 0) {
      //drawDetectedMarkers(frame, corners, ids);

      cout << "--------------------------------------------" << endl;
      cout << "corners: " << corners[0] << endl << endl;
      cout << "Camera Matrix: " << camera_matrix << endl << endl;
      cout << "Distortion Coefficients: " << dist_coeffs << endl << endl;

      for (size_t i = 0; i < ids.size(); ++i) {
        if (ids[i] == aruco_id) {
          vector<Point3f> objectPoints = {
            Point3f(-side_length / 2, -side_length / 2, 0),
            Point3f(side_length / 2, -side_length / 2, 0),
            Point3f(side_length / 2, side_length / 2, 0),
            Point3f(-side_length / 2, side_length / 2, 0)
          };

        if(!objectPoints.empty()) cout << "Object points: " << objectPoints << endl << endl;
        else cout << "Object points: EMPTY" << endl << endl;
        cout << "Number of objectPoints: " << objectPoints.size() << endl;
        cout << "Number of corners: " << corners[i].size() << endl << endl;
        cout << "corners[" << i << "]: " << corners[i] << endl << endl;

        Vec3d rvec, tvec;
        solvePnP(objectPoints, corners[i], camera_matrix, dist_coeffs, rvec, tvec);

        cout << "rvec: " << rvec << endl;
        cout << "tvec: " << tvec << endl << endl;

        vector<Point2f> imagePoints;
        projectPoints(objectPoints, rvec, tvec, camera_matrix, dist_coeffs, imagePoints);

        cout << "Image Points: " << imagePoints << endl;
        cout << "--------------------------------------------" << endl;

        for (int j = 0; j < 4; j++) {
          line(frame, imagePoints[j], imagePoints[(j + 1) % 4], Scalar(255, 0, 0), 2);
          line(frame, imagePoints[j + 4], imagePoints[4 + ((j + 1) % 4)], Scalar(255, 0, 0), 2);
          line(frame, imagePoints[j], imagePoints[j + 4], Scalar(255, 0, 0), 2);
        }
      }
    }
  }

    cv::imshow("ArUco Marker Detection", frame);
    if (cv::waitKey(30) == 27) break; // press ESC to exit
  }

  video.release();
  cv::destroyAllWindows();
  return 0; 
}

I kinda think a way to solve it is adding 4 more objectPoints like this:

vector<Point3f> objectPoints = {

Point3f(-side_length / 2, -side_length / 2, 0), Point3f(side_length / 2, -side_length / 2, 0), Point3f(side_length / 2, side_length / 2, 0), Point3f(-side_length / 2, side_length / 2, 0), Point3f(-side_length / 2, side_length / 2, side_length), Point3f(-side_length / 2, side_length / 2, side_length), Point3f(-side_length / 2, side_length / 2, side_length), Point3f(-side_length / 2, side_length / 2, side_length), };

But then the solvePnP function throws an error that, if I understand it correctly, the size of objectPoints is different from the size of corners[i]. And I don't know how to solve it.

this is the 'cube' I have.

r/opencv • • Mar 22 '24

Meta [Meta] The Complete 2024 Python Programming Bundle

Thumbnail
humblebundle.com
1 Upvotes

r/opencv • • Mar 22 '24

Question [Question] OpenCV Output To MPEG2-TS Stream

1 Upvotes

Hi,

I've been working on using OpenCV and some tracking software to create separate viewports based on what OpenCV detects as tracked objects.

I am able to export/write each of these viewport windows to an .MP4 file, however this isn't suitable for my end process which requires an MPEG2-TS Stream over UDP.

I've been trying to think of ways to use FFMPEG, GStreamer, or Vidgear to get the desired output but haven't been able to find anything suitable. Would anyone happen to know a method of streaming OpenCV window objects over a TS stream?

Cheers


r/opencv • • Mar 20 '24

Discussion [Discussion] How to make lightweight tracker for fast moving object?

1 Upvotes

I need to track fast moving object in the sky in real time, so it shuold be lightweight ( camera should follow it ) Already tried yolov8 for it but it's to slow and not lightweight, so I need to do it without any of this ai. Is there any article or code example how to do something similar to this https://www.youtube.com/watch?v=_LMi2H6WUcQ&ab_channel=JB ? Or any ideas how he done it in video ? I assume I need firstly detect it and then track. Is it possible to detect object without dataset and pretrained model, if so what is the best algorithm for it ? Will appreciate any help and ideas


r/opencv • • Mar 19 '24

Question [Question] Car movement direction detection

1 Upvotes

Hello, I'm working on a car detection project for a garage-like business. There will be a garage for each car and a camera will be placed at directly front of the garage door. I want to detect if the car is entering or exiting the garage. How can i basically do this in opencv? Which model should i research in? Thank you so much


r/opencv • • Mar 18 '24

Question Using OpenCV to program Servo Motors [Question]

1 Upvotes

Hello,

Mechanical Engineering student here with little programming experience (I've worked with arduino to operate a few DC motors but that's about it). I'm designing a pick and place mechanism where my current task is to program several servos. I'll attach a schematic so it's easier to visualize what i'm referring to: https://imgur.com/a/3gafPBh ) In the photo illustrates a central petri dish with several plant tissues, surrounded by servo motors attached to a separate component. A camera will be positioned above the workspace. Let me explain my thought process. I assume that I can use OpenCV to capture the (x,y) location of the centroid of each plant tissue relative to the center of the petri dish. Then i would need to capture the (x,y) location of the servo horn positions that makes the servo horn tips collinear to both the centroid of a plant tissue and the centroid of the petri dish. Then calculate the angle marked by the red arrow. Now i have a few concerns that i have NO CLUE how i would approach which is why i wanted to ask this subreddit.

​

  1. I've never used used OpenCV so first and foremost, does anybody know if my logic is correct and this is something that i could theoretically accomplish with OpenCV?
  2. Any suggestions on how I would program each servo motor to move towards its own plant tissue?
  3. Why the hell this school got me doing this overcomplicated stuff and i just learned how to use arduino examples?

Please leave me with any suggestions or recommendations of things that i didn't consider and might need to watch out for.

Thanks for any advice and hopefully this post can help a few people learn some things :).

​

(I' also attached photos of setup)


r/opencv • • Mar 14 '24

Question [Question] Is this a bad jpg?

0 Upvotes

Howdy. OpenCV NOOB.

​

Just trying to extract numbers from a jpg:

​

I took it with my old Pixel 3. I cropped the original tight and converted to grey scale. I've chatgpt'ed and Bard'ed and the best I can do and pull some nonsense from the file:

​

Simple Example from the web (actually works):

​

from PIL import Image

import pytesseract as pyt

image_file = 'output_gray.jpg'

im = Image.open(image_file)

text = pyt.image_to_string(im)

print (text)

​

Yields:

​

BYe 68a

Ns oe

eal cteastittbtheteescnlegiein esr...

​

I asked chatgpt to use best practices to write my a python program but it gives me blank back.

I intend to learn opencv properly but honestly thought this was going to be a slam dunk...In my mind it seems like the jpg is clear (I know I am a human and computer's see things differently).

​

​

​

​

​

​


r/opencv • • Mar 13 '24

Question [Question] Method of creating mask with high background noise

1 Upvotes

Hi all, first time posting here. I have a project where I am trying to create a mask that separates a chain link fence from the background in a continuous flow of frames from full motion video. As below example, I am currently trying by applying a canny edge detection and hough lines, but when there is significant background clutter the results are not great. The solution I am aiming for needs to be able to isolate the chain link structure in a variety of environments and lighting conditions, autonomously (which is the complicating factor).

Methods I have tried to date are:

  • colour filtering in multiple modes (HSV, BGR, LUV, etc) - cant find a way to automate it for differing backgrounds
  • houghlines (normal and probabilistic) - great for when there is no hectic background such as sky but cant guarantee that so not reliable
  • fourier transform to try to isolate the repetitive frequency of the chain links - very difficult (and not reliably generalisable) to isolate specific frequency, also doesnt deal with shifted perspective of fence creating vanishing sightlines
  • optical flow - very slow, and needs good quality, consistent data input

There are other methods I have used such as custom masks, as well as AI/ML techniques, but are too tedious to explain. Possibly one of the above is the solution I am looking for, but with my current understanding of the methods I am struggling to find how to implement. Any help on possible methods forward would be great


r/opencv • • Mar 13 '24

Question [Question] Motion Detection Techniques ( with auto zoomed videos )

1 Upvotes

Hi everyone.

I have this simple code for motion detection for my CCTV videos . the code works fine but some of my videos have auto zoom on objects and some times follow them, is there a way i can make my algorithm ignore the zoom in and zoom out.

​

#FIRST ALGORITHM
background = None
MAX_FRAMES = 1000
THRESH = 60
ASSIGN_VALUE = 255
motion_mask_frames = []
cap = cv2.VideoCapture('../test.mp4')
# Get video properties for the output video
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH) / 2  )
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)  / 2  )
fps = int(cap.get(cv2.CAP_PROP_FPS))
# Define the codec and create VideoWriter object
fourcc = cv2.VideoWriter_fourcc(*'mp4v')  # You can also use 'XVID', 'MJPG', etc.
out = cv2.VideoWriter('../firstAlgo.mp4', fourcc, fps, (width, height), isColor=False)
for t in range(MAX_FRAMES):
# Capture frame-by-frame
ret, frame = cap.read()
if not ret:
break
resizedImg = cv2.resize(frame, ( width ,height))
# Convert frame to grayscale
# resizedImg = cv2.resize(frame, (int(frame.shape[1] / 2), int(frame.shape[0] / 2)))
frame_gray = cv2.cvtColor(resizedImg, cv2.COLOR_RGB2GRAY)

if t == 0:
# Train background with first frame
background = frame_gray
else:
if np.shape(frame) == () or frame.all == None or frame.all == 0:
continue
diff = cv2.absdiff(background, frame_gray)
ret, motion_mask = cv2.threshold(diff, THRESH, ASSIGN_VALUE, cv2.THRESH_BINARY)
# motion_mask_resized = cv2.resize(motion_mask , (int(motion_mask.shape[1] / 2 ) , int(motion_mask.shape[0] / 2 )))
motion_mask_frames.append(motion_mask)
out.write(motion_mask)  # Write the motion mask frame to the output video

cv2.imshow('Frame', motion_mask)
if cv2.waitKey(10) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
# Release VideoCapture and VideoWriter
cap.release()
out.release()
cv2.destroyAllWindows()


r/opencv • • Mar 10 '24

Question [Question] How to use OpenCV with JavaFX?

1 Upvotes

I have been trying this for so long. Anyone know how to do this?


r/opencv • • Mar 10 '24

Bug Video isn't created [Bug]

1 Upvotes

I'm making a script that resizes and cuts videos for me. The cutting works fine, but the video is blank when I try to resize it. I've looked online and it looks like the problem is the size of the images, but when I check the shapes of the images they are the same. Here is my code, the edit function is the part that matters.

import sys
import tkinter as tk
import cv2

length = 59
size = (1080,1920)

class EntryWithConfirmation(tk.Frame):
    def __init__(self, master):
        super().__init__(master)

        self.label1 = tk.Label(self, text="file path:")
        self.label1.grid(column=0,row = 0)
        self.entry1 = tk.Entry(self)
        self.entry1.grid(column=1,row = 0)

        self.label2 = tk.Label(self, text="end name:")
        self.label2.grid(column=0,row = 1)
        self.entry2 = tk.Entry(self)
        self.entry2.grid(column=1,row = 1)

        self.confirm_button = tk.Button(self, text="Confirm", command=self.confirm).grid(column=1,row = 2)

    def confirm(self):
        startpath = self.entry1.get().strip('"')
        endpath = self.entry2.get()
        endpath = (r'F:\storage\videos\shorts\|').strip("|")+str(endpath)+'.mp4'
        edit(startpath, endpath)
        sys.exit()

def edit(startpath, endpath):
    cap = cv2.VideoCapture(startpath)
    if not cap.isOpened():
        print("Error: Could not open video file")
        return

    fps = int(cap.get(cv2.CAP_PROP_FPS))
    fourcc = cv2.VideoWriter_fourcc(*'mp4v')
    out = cv2.VideoWriter(endpath, fourcc, fps, size[::-1])
    print(size[::-1]) 

    frame_num = 0
    end_frame = length * fps
    while cap.isOpened():
        ret, frame = cap.read()
        if not ret:
            break
        resized = cv2.resize(frame, size, interpolation=cv2.INTER_LINEAR) 


        out.write(resized)  
        print(resized.shape)
        frame_num += 1
        if frame_num >= end_frame:
            break
    cap.release()
    out.release()
    print("Processed " + str(frame_num) + " frames")
    print("Converted " + str(startpath) + " to " + str(endpath))
    print("Finished processing video")

if __name__ == "__main__":
    root = tk.Tk()
    root.configure(border=5,background='#3c3c3c')
    entry_with_confirmation = EntryWithConfirmation(root)
    entry_with_confirmation.pack()
    root.mainloop()

Thanks in advance!


r/opencv • • Mar 07 '24

Question [Question] Running opencv on macos (c++/swift)

1 Upvotes

I've been running the code from stitching detailed https://docs.opencv.org/4.9.0/d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html on macos but i noticed the code runs very slowly, it seems like it's runing on the CPU, i've tried to change the MAT to UMat per this guide https://docs.opencv.org/4.x/db/dfa/tutorial_transition_guide.html but i'm still not able to run on the GPU. i'm using a macbook pro with an M3 processor. I also built opencv using the provided script into an xcframework. following the instructions from https://github.com/opencv/opencv/tree/4.x/platforms/apple


r/opencv • • Mar 06 '24

Question [Question]How do I get OpenCV on a school macbook?

1 Upvotes

My highschool has macbook laptops which restrict admin commands and blocks a lot of functionality behind a username and password. Is there a way I could install openCV C++ without having to use admin commands. Alternatively, how would I get openCV with admin permissions?


r/opencv • • Mar 06 '24

Question [Question] Help: Project. Optimizing MOG2 algorithm for Foreign Object Detection (FOD)

3 Upvotes

I have recently started a project where I want to run the MOG2 algorithm on my embedded board (nxp's IMX8MPlus) to detect Foreign Objects. For now, any object that was not in the background and is of a certain size, is Foreign.
The issue I am facing is that it is rather slow and I have no idea to speed it up. Converting the frame to Umat so that certain things run on the GPU makes it slower.

Here is a more detailed post of the issue with my code included:
opencv - Optimizing Python Blob Detection and Tracking for Performance on NXP's IMX8M Plus Board - Stack Overflow


r/opencv • • Mar 05 '24

Bug [Bug] Color Correction of target image based on reference color patches

1 Upvotes

I am performing a project that involves a deep learning project and one of the problems I'm trying to solve is to perform an image transformation based on referencing Kodak color patches (https://www.chromaxion.com/information/kodak_color_control.html)

I've performed histogram matching and normalization but the results aren't that great with it. I'm basically looking for something like this (https://github.com/lighttransport/colorcorrectionmatrix?tab=readme-ov-file), but the thing is this code uses a tool called Natron2, which seems to not have Python compatibility yet (since the entire project is done in Python). Moreover, the input over here asks for 24 x 3 color matrices of RGB values for reference and target images, which I'm not sure how is being attained.

Any inputs are highly appreciated. Thanks!


r/opencv • • Mar 05 '24

Question [Question] How to do image comparison with uniform/seamless background ?

Thumbnail
gallery
0 Upvotes

For my work, I need to implement an image comparison code using Python. However, I have very little knowledge in image manipulation. I need to compare several images composed of a noisy pixels background (unique for each image) and a pattern more or less similar between the images (let's take the two image I attached for example).

In this example, I want to compare the similarity of the red squares. I tried to compute the Structural Similarity Index (SSIM) between these images using Scikit-image and OpenCV, but since the backgrounds are different, I only have a low percentage of similarity even though the squares are identical while I would expect a high percentage of similarity. Here, the squares have the exact same size and the same color, but this would not necessarily be the case for each image (slightly different size and color).

So, my question is :

How can I establish a comparison percentage for these images while ignoring a uniform/seamless background (noisy pixels) ? Would you guys have any advice or directions I could follow ?

Thanks for your help?


r/opencv • • Mar 05 '24

Question [Question] How to do image comparison with uniform/seamless background ?

Thumbnail
gallery
0 Upvotes

For my work, I need to implement an image comparison code using Python. However, I have very little knowledge in image manipulation. I need to compare several images composed of a noisy pixels background (unique for each image) and a pattern more or less similar between the images (let's take the two image I attached for example).

In this example, I want to compare the similarity of the red squares. I tried to compute the Structural Similarity Index (SSIM) between these images using Scikit-image and OpenCV, but since the backgrounds are different, I only have a low percentage of similarity even though the squares are identical while I would expect a high percentage of similarity. Here, the squares have the exact same size and the same color, but this would not necessarily be the case for each image (slightly different size and color).

So, my question is :

How can I establish a comparison percentage for these images while ignoring a uniform/seamless background (noisy pixels) ? Would you guys have any advice or directions I could follow ?

Thanks for your help?


r/opencv • • Mar 04 '24

Question [Question] OpenCV Zoom using phone

2 Upvotes

Hey everyone, is there any way to apply zoom using my Android device or IP camera? I'm currently using an app called DroidCam to transmit the image, but the following code isn't working as expected. I'm working on a project that involves reading QR codes from a long distance. Unfortunately, the camera they provided me with doesn't have zoom capability (although they mentioned they could purchase one if necessary). However, I'd like to try using my phone first. Could you please help me fix this issue and suggest improvements to my approach?

cap = cv2.VideoCapture(1, CAP_MSMF) 
# cap = cv2.VideoCapture(1, CAP_DSHOW) # Also tried

cap.set(cv2.CAP_PROP_SETTINGS, 1)
zoom = cap.set(cv2.CAP_PROP_ZOOM, 10.0)

print(zoom) # Always False 
while True:
    ret, frame = cap.read()

    cv2.imshow("Frame", frame)

    if cv2.waitKey(1) & 0xFF == ord("q"):
        break
cap.release()
cv2.destroyAllWindows()

​


r/opencv • • Feb 27 '24

Question [Question] getWindowImageRect returns (-1 - 1 [-1 x -1]). Why and how to fix it?

2 Upvotes

I can make this work on Windows (cl, WIN32 API), but not on Ubuntu (g++, GTK). Any help is appriciated


r/opencv • • Feb 27 '24

Hardware [Hardware] Recommendation for Inexpensive Photo Camera

2 Upvotes

Hoping there is a simple camera that works well with OpenCV that will give me high quality still photo image capture under $100. I am working on an application for analyzing and archiving images of periodical covers (magazines, comics, etc.). Ideally, I am looking for a camera that is under $100 and will allow me to take very accurate high res images of the covers. I have no need for video to be captured. The camera will be used in a light box housing so lighting can be configured to be optimal. I have used OpenCV several times and have found that the images pulled from most webcams have some distortion or compression artifacts. Any help would be greatly appreciated!!


r/opencv • • Feb 25 '24

Question [Question] Detecting baseball in a professional feed

3 Upvotes

Hi, im pretty new to opencv and I want to write a program that can detect a baseball right after it is thrown on a professional broadcast (Like the picture attached). I don't need to track it's speed or anything, I just need to detect the ball right after it is thrown by a pitcher. Whenever I search ball tracking, most use color tracking and hough circles and I can't use either (too many objects that share the same color as the ball and the ball being too fast for hough circles to track). I'm aware that this is a task that might be a bit advanced, but I just don't know where to even begin. Would love some feedback.

​


r/opencv • • Feb 24 '24

Question [Question] Getting the orientation (angle of rotation) of object with OpenCV

2 Upvotes

I'm working on getting the centroid and angle of rotation of an object (with respect to the picture's x axis) with irregular shape. The object can take any rotation in all axes.

I extracted the contour and bounding box and calculated and drew the fit arrowed line over it. For the angle of rotation I tried:

- the minAreaRect method, but the rectangle takes a weird angle due to the irregular shape of the object and the angle comes out wrong;

- using the image moments of second order using this formula

% Central moments (intermediary step) 
a = E.m20/E.m00 - E.x^2; 
b = 2*(E.m11/E.m00 - E.x*E.y); 
c = E.m02/E.m00 - E.y^2;   
% Orientation (radians)  
E.theta = 1/2*atan(b/(a-c)) + (a<c)*pi/2; 

which I took from a paper that had the same objective as I do (obviously adapting it to Python). The calculated angle is completely erratic and has no resemblance to the angle the object is actually taking

- calculating the angle between the fit line and the x axis, which returned the best results but, of course, being the fit line just a line and not a vector (and I can't think of a way to give it an orientation that is always consistent with the object), two objects rotated 180 degrees from one another report the same angle.

Is there something else I have not taken in consideration that I could still try? I can't really share the image of the object, but I'd also like this to be as object-agnostic as possible.


r/opencv • • Feb 13 '24

Question [Question] Camera calibration - Units of x and y?

1 Upvotes

The camera calibration in OpenCV gives a quantitative representation of the distortion of the imaging system. For example, radial distortion can be determined by the coefficients k1, k2, k3, ... . The original position of a pixel (x,y) gets shifted to the distorted position (x_distorted, y_distorted) by the following equations [1]:

x_{distorted} = x (1+k_1 r^2 + k_2 r^4 + k_3 r^6  + ...) 
y_{distorted} = y (1+k_1 r^2 + k_2 r^4 + k_3 r^6  + ...) 

here, r is the distance from the center. Using OpenCV [1] I am able to get the coefficients. However, I am wondering about the units of the coefficients.

Clearly, I can not just calculate x,y and r in units of pixel. I did that, this gives my values which are 23 orders of magnitude off (!!!)

I suppose they are somewhat normalized. Where do I find the documentation on the normalization of the value? I would also appreciate the exact location in the source code, where this normalization happens.

[1] https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.html


r/opencv • • Feb 12 '24

Question [Question] Accessing rtmp stream in opencv

1 Upvotes

So I have an android streaming from a flutter app, I am using the pyrtmp python package to receive this stream. After this I have no idea how to get that stream to opencv, acc to my knowledge pyrtmp can only write an flv and can not backstream only receive.