Social-Distancing-Detector | AI Tool to Help Customers Monitor Social | Machine Learning library
kandi X-RAY | Social-Distancing-Detector Summary
kandi X-RAY | Social-Distancing-Detector Summary
An AI Tool to Help Customers Monitor Social Distancing in the Workplace.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Social-Distancing-Detector
Social-Distancing-Detector Key Features
Social-Distancing-Detector Examples and Code Snippets
Community Discussions
Trending Discussions on Social-Distancing-Detector
QUESTION
I have the 3x3
intrinsics
and 4x3
extrinsics
matrices for my camera obtained via cv2.calibrateCamera()
Now I want to use these paramenters to compute the BEV (Bird Eye View)
transformation for any given coordinates in a frame obtained from the camera.
Which openCv
function can be used to compute the BEV
perspective transformation for given point coordinates and the camera extrinsics
and/or intrinsics
3x3 matrices
?
I found something very related in the following post: https://deepnote.com/article/social-distancing-detector/
based on https://www.pyimagesearch.com/2014/08/25/4-point-opencv-getperspective-transform-example/
,
they are using cv2.getPerspectiveTransform()
to get a 3X3 matrix
, but I don't know whether this matrix represents the intrinsics
, the extrinsecs
or something else. Then they are transforming the list of points using such matrix in the following way:
ANSWER
Answered 2020-Dec-11 at 14:48The answer is : it is impossible to compute a BEV of a scene if you do not have distance-related information about the pixels of your image.
Think about it : imagine you have the picture of a vertical screen : the Bird's Eye View would then be a line. Now say that this screen is displaying the image of a landscape and that the picture of this screen is indistinguishable from a picture of the landscape itself. The BEV would still be a line (a colorful one though).
Now, imagine you have the exactly the same picture, but this time it's not a picture of a screen but of the landscape. Then, the Bird's Eye View is not a line and is closer to what we usually imagine a BEV to be.
Finally, let me state that OpenCV has no way to know if your picture is describing a plane of something else (even given camera parameters), therefore, it cannot compute the BEV of your scene. The function cv2.perspectiveTransform
needs you to pass it a homography matrix (you may obtain one using cv2.findHomography()
, but you will need some distance information about your image as well).
Sorry about the negative answer, but there's no way to solve your problem given only the intrinsic and extrinsic calibration matrices of the camera.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Social-Distancing-Detector
To deploy algorithm on videos, python SDD_Video.py
To deploy algorithm on live streaming webcam, python SDD_Camera.py
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page