Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Support OpenCV Mat as a capture format #36

Open
MohiuddinM opened this issue Sep 12, 2020 · 2 comments
Open

Support OpenCV Mat as a capture format #36

MohiuddinM opened this issue Sep 12, 2020 · 2 comments

Comments

@MohiuddinM
Copy link

No description provided.

@Pro100rus32
Copy link

Code:

import d3dshot
import cv2
d = d3dshot.create(capture_output="numpy")
d.display = d.displays[0]
img = d.capture_output.backend
d.capture()
while True:
    cv2.imshow("Vision", img)
    if cv2.waitKey(1) & 0 == 1:
        break

output:

cv2.imshow("Vision", img)
TypeError: Expected Ptr<cv::UMat> for argument 'mat'

@crackwitz
Copy link

crackwitz commented Aug 18, 2021

OpenCV, in python, uses numpy arrays.

I don't quite know what you're doing there but d.capture_output.backend is not a numpy array, yet you pass it to an opencv function as if it were. this looks like the error is yours.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants