diff --git a/people_tracking/src/people_tracking/person_detection.py b/people_tracking/src/people_tracking/person_detection.py index 6474cf6..7d6ac69 100755 --- a/people_tracking/src/people_tracking/person_detection.py +++ b/people_tracking/src/people_tracking/person_detection.py @@ -160,8 +160,9 @@ def process_latest_image(self): cv2.fillPoly(mask_depth, [seg], (255, 255, 255)) # Extract the values based on the mask - masked_pixels = cv_depth_image[mask_depth] - median_color = cv2.mean(cv_depth_image, mask=mask_depth)#np.median(masked_pixels) + # masked_pixels = cv_depth_image[mask_depth] + masked_pixels = cv_depth_image[y1:y2, x1:x2] + median_color = cv2.mean(masked_pixels)#np.median(masked_pixels) # print("Median color:", median_color)