Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
prevented sending of empty arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Feb 28, 2020
1 parent 31f97ec commit fcd79de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def main(): # main method defined

# if out is not None:
# out.write(frame)
if tracking_data is not None and main_controller.send_tracking_data:
if len(tracking_data) != 0 and main_controller.send_tracking_data:
# sort tracking data by closests object
logger.info(tracking_data)
tracking_data = sorted(tracking_data, key = lambda i: i['dist'])
Expand Down
2 changes: 1 addition & 1 deletion processing/port_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def process(img, camera, frame_cnt, color_profile):
#
if shape_util.dimensions_match(contour, 6,1, WIDTH_TO_HEIGHT_RATIO):
# print 'x:%s, y:%s angle:%s ' % ( center_mass_x, center_mass_y, angle )
distance = shape_util.ge:(w)
distance = shape_util.distance_in_inches_long(w)
angle = shape_util.get_angle(camera, center_mass_x, center_mass_y)
font = cv2.FONT_HERSHEY_DUPLEX

Expand Down

0 comments on commit fcd79de

Please sign in to comment.