Skip to content

Commit

Permalink
z_pos 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 fc8ad75 commit d2ddb5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions people_tracking/src/people_tracking/person_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit d2ddb5a

Please sign in to comment.