Object Distance Tracking with Python and OpenCV
ฝัง
- เผยแพร่เมื่อ 26 ก.ค. 2020
- Who needs an expensive lidar to detect object distance from the camera? we got Webcams for that now. The demo shows how the object was detected and its distance was identified easily with a script.
Github repo link : github.com/TareDevarsh/distan... - วิทยาศาสตร์และเทคโนโลยี
you helped my project bro thanks
i can use this without the object? i want it in the centre
will it find the distance of the object which is approx 20 metre far?
Can I calculate the live speed with it?
I am currently doing a project for university and I am not able to understand how is it measuring the distance I watched some of the other videos but in many of them it requires the actual height of the object can you please help me!!!!!!
Hey bro, if you see my repo for GitHub, even I have used the width of the object which is basically the same think. One thing I can suggest is use two cameras at a definite distance from each other and calculate the relative displacement of the object from both the angles, maybe you can try and triangulate the distance.Probably this can help you with something www.sciencedirect.com/science/article/pii/S2590005620300011
I could not really understand the way you ve measured with just one camera. Did you give the specific sizes of the object to calculate the distance. Which means you can not calculate the distance of another object without inputing the sizes?
You can calculate without having to input sizes. You will need two cameras for that process. This was used to determine with a prespecified size. For eg with industrial applications you can identify what that object is then calculate its distance based on the pixels
How do I change the designated color?
also trying to figure this out, can't seem to figure out how the get_color.py function correlates to the main python file
i have a beacon and i want to detect it and find the distance
can you help me out
Well if it is possible it means I can do it
Hello :-) Thank you for sharing this interesting video.
I am having the following error though when running dist_measure
_,cont,hei = cv2.findContours(d_img,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)
It seems like you are using OpenCV version 4.x, where the cv2.findContours function returns only two values: contours and hierarchy. In OpenCV version 3.x, it used to return three values: image, contours, and hierarchy. Just delete the "_," before "cont,hei.." in code.
I'll try. Thank you very much @@flaviusblanariu1861
I done this.But there is nothing detecting.
Camara is opened but not detecting any thing
code not running
Bro can u plz share the code
@@luvkushr6627 all done with diff code
@@vslraw4202 Can You share the code pls
dude you look like mrwhoosetheboss
Can you share the code???