Comments (1)
gui_window_on=True should show the opencv windows cv2.imshow(). There are also variables for show_thresh_on, show_crop_on plus the default full image2 window. You may need to add your own cv2.imshow() to display what you want. Your problem may be how you put in the new logic since you may not have the window name variable and image to display set correctly. Check logic and make sure the variables are correct. The speed-cam.py code to display windows is below. It is located just above if name == 'main': near end of code.
Make sure variables for the image you want to show are compatible with the new code you added. You can always add some debug code to help find out where the problem is.
if gui_window_on:
# cv2.imshow('Difference Image',difference image)
cv2.line(image2, (x_left, y_upper), (x_right, y_upper), cvRed, 1)
cv2.line(image2, (x_left, y_lower), (x_right, y_lower), cvRed, 1)
cv2.line(image2, (x_left, y_upper), (x_left, y_lower), cvRed, 1)
cv2.line(image2, (x_right, y_upper), (x_right, y_lower), cvRed, 1)
image_view = cv2.resize(image2, (image_width, image_height))
cv2.imshow('Movement (q Quits)', image_view)
if show_thresh_on:
cv2.imshow('Threshold', thresholdimage)
if show_crop_on:
cv2.imshow('Crop Area', image_crop)
# Close Window if q pressed
if cv2.waitKey(1) & 0xFF == ord('q'):
cv2.destroyAllWindows()
logging.info("End Motion Tracking ......")
vs.stop()
still_scanning = False
from speed-camera.
Related Issues (20)
- Improvement: Majority Vote for Direction? --- Tracking seems to use "direction" of last track event to set direction of overall track - conflicts if last track mis-identifies direction HOT 5
- Cannot run speed-cam.py - states "Could not import cv2 library" HOT 8
- No Window to view camera HOT 6
- Windows not displaying on host machine HOT 1
- Clarification on calibration HOT 4
- Frames dropped due to contour out of bounds? HOT 2
- Docker Install always 11.22 HOT 1
- Calibration with different Screen Ratio and Framerate HOT 1
- No detections or speed calcs HOT 2
- No images
- How do I manually trigger the camera? HOT 4
- Can I reposition calibration marks? HOT 1
- Capture being triggered by small objects and missing all vehicles. HOT 1
- Warnings in startup log: "Unsupported V4L2 pixel format" HOT 1
- Vehicles at higher speeds being missed. HOT 4
- search-speed / Not compatible with the major rewrite? HOT 2
- Bigger resolution - `picam720` plugin - `speed_camera Out - 0/6` messages HOT 1
- Vehicles detected twice: Ideal `MO_TRACK_EVENT_COUNT`
- `MO_MIN_AREA_PX` is not the area of the rectangle
- Capture video HOT 2
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 speed-camera.