Skip to content

Commit

Permalink
depth camera update 2
Browse files Browse the repository at this point in the history
Signed-off-by: Ken Haagh <[email protected]>
  • Loading branch information
KenH2 committed Dec 14, 2023
1 parent 724254e commit e376e99
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions people_tracking/src/people_tracking/person_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ def process_latest_image(self):
# print("Median color:", median_color)


cv_depth_image[mask_depth == 0] = 0
depth_cropped = cv_depth_image[y1:y2, x1:x2]
image_message_depth = self.bridge.cv2_to_imgmsg(depth_cropped, encoding="passthrough")
depth_detected.append(image_message_depth)
# cv_depth_image[mask_depth == 0] = 0
# depth_cropped = cv_depth_image[y1:y2, x1:x2]
# image_message_depth = self.bridge.cv2_to_imgmsg(depth_cropped, encoding="passthrough")
# depth_detected.append(image_message_depth)

# average_color = cv2.mean(cv_depth_image, mask=mask_depth)
# rospy.loginfo(f"color {int(average_color[0])}")
Expand Down Expand Up @@ -194,8 +194,8 @@ def process_latest_image(self):

# for image_message in depth_detected:
# self.publisher_debug.publish(image_message)
for image_message in detected_persons:
self.publisher_debug.publish(image_message)
# for image_message in detected_persons:
# self.publisher_debug.publish(image_message)

def main_loop(self):
""" Main loop that makes sure only the latest images are processed. """
Expand Down

0 comments on commit e376e99

Please sign in to comment.