mirror of
				https://github.com/rendies/People-Counting-in-Real-Time.git
				synced 2025-10-31 20:33:04 +07:00 
			
		
		
		
	fix: polishing code
This commit is contained in:
		| @@ -31,7 +31,7 @@ args = None | |||||||
| def counter(): | def counter(): | ||||||
| 	# return the rendered template | 	# return the rendered template | ||||||
| 	global people_count | 	global people_count | ||||||
| 	return jsonify(people_count) | 	return jsonify({counter: people_count}) | ||||||
|  |  | ||||||
| @app.route("/video") | @app.route("/video") | ||||||
| @cross_origin() | @cross_origin() | ||||||
| @@ -290,7 +290,7 @@ def PeopleCounter(): | |||||||
| 			cv2.putText(frame, text, (centroid[0] - 10, centroid[1] - 10), | 			cv2.putText(frame, text, (centroid[0] - 10, centroid[1] - 10), | ||||||
| 				cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 2) | 				cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 2) | ||||||
| 			cv2.circle(frame, (centroid[0], centroid[1]), 4, (255, 255, 255), -1) | 			cv2.circle(frame, (centroid[0], centroid[1]), 4, (255, 255, 255), -1) | ||||||
| 		people_count = {counter: totalDown} | 		people_count = totalDown | ||||||
| 		# construct a tuple of information we will be displaying on the | 		# construct a tuple of information we will be displaying on the | ||||||
| 		info = [ | 		info = [ | ||||||
| 		("Exit", totalUp), | 		("Exit", totalUp), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user