-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about general use in any case #15
Comments
Hey Petros626, The script will produce a two dimensional array of values which represent the depth of each pixel in the scene, however due to the nature of this traditional method, not all pixels will have values attributed to them. Some ill-posed regions (areas where the algorithm has a hard time determining depth) will be left empty. As long as the object is within the image/frame from your stream and a value which represents the pixels of your object is within the depth map, you will be able to determine the estimated depth. I'd recommend doing some averaging of small kernels depending on what kind of object it is. Note: the resulting values will be disparity values, which you will use to calculate metric depth with |
Thank you for your detailed answer. The most algorithms I saw was with a known object size, but this wasn't which I was searching for. So if with the mentioned formula you can calculate the distance why in your code specific values are made here: Stereo-Vision/Main_Stereo_Vision_Prog.py Line 37 in 597d9e5
|
Those are likely the specific parameters provided by datasets which the author was using to test this code. They may also be customized to compensate for the averaging being done two lines above your referenced line, where the author is getting the average disparity value of a small kernel of pixels around the pixel in question: Stereo-Vision/Main_Stereo_Vision_Prog.py Line 35 in 597d9e5
|
Yes, as @shanearthur said. Those values (polynomial coefficients) are estimated based on a custom dataset. |
Hello,
I would like to know, if this script can measure the distance of any object shown in a stream, no matter where it's located?
If not, what adjustments in the code are necessary?
I plan to use a stereo camera and a pretrained CNN, which detects objects, additionally I want to measure the distance to the detected objects.
Thanks in advance
The text was updated successfully, but these errors were encountered: