Comments (1)
You need to add the following line before cv2.imshow to draw the distance in the frame. However, you can use more OpenCV functionalities to draw customized boxes, text, overlay over a frame using cv2.rectangle, cv2.overlay, etc. Anyway, I have updated the repo with few modifications, hope these will solve your issues.
frame = cv2.putText(frame, str("{:.2f} Inches".format(distance)), (x,y), cv2.FONT_HERSHEY_DUPLEX, 0.6, (0,0,255), 1, cv2.LINE_AA)
from object-detection-and-distance-measurement.
Related Issues (20)
- Wrong output rpi HOT 2
- Doubt regarding the distance estimation HOT 2
- How to use this code on raspberry pi
- Field of View
- distance measurement HOT 1
- No detection taking place using WebCam HOT 15
- About diatance measurement HOT 2
- how do i use his code on linux with a jetson nano gpu?
- Thank you for reaching out! HOT 1
- video output related HOT 2
- I take [Errno 2] No such file or directory: 'yolov4.weights' HOT 1
- I wanted to add text-to-speech to YoloV4 HOT 2
- How to implement YOLOv4 Tiny? HOT 1
- Raspberry Pi OS to be Used HOT 2
- NEED HELP HOT 2
- issues reg opencv accessing webcam on windows 10 HOT 3
- Distance Measurement HOT 1
- NEED HELP UNDERSTANDING THE CODE
- !ssize.empty() HOT 1
- Using in ubuntu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from object-detection-and-distance-measurement.