Skip to content

Commit

Permalink
Fix bugs after refactor. Use correct name of mediapipe lib. Use missi…
Browse files Browse the repository at this point in the history
…ng parameter in get_position_of_human_in_the_image. Do no extract number of channels from depth image
  • Loading branch information
Wiktor-99 committed Jul 16, 2024
1 parent a81b171 commit 3fbdc1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions human_detector/human_detector/human_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from geometry_msgs.msg import TransformStamped
from human_detector.human_detector_parameters import human_detector_parameters
from image_geometry import PinholeCameraModel
import mediaspipe as mp
import mediapipe as mp
import rclpy
from rclpy.lifecycle import LifecycleNode
from rclpy.lifecycle.node import LifecycleState, TransitionCallbackReturn
Expand Down Expand Up @@ -110,7 +110,7 @@ def store_camera_info(self, info: CameraInfo):

def are_rgb_image_same_size_as_depth_image(self):
rgb_image_height, rgb_image_width, _ = self.image.shape
depth_image_height, depth_image_width, _ = self.depth_image.shape
depth_image_height, depth_image_width = self.depth_image.shape

return rgb_image_height == depth_image_height and rgb_image_width == depth_image_width

Expand Down Expand Up @@ -154,7 +154,7 @@ def get_3d_human_position(self, x_pos_of_detected_person, y_pos_of_detected_pers
"z": mm_to_m(point_xyz[1]),
}

def get_position_of_human_in_the_image(self):
def get_position_of_human_in_the_image(self, landmarks):
x, y = 0, 0
if self.detected_landmarks:
landmarks = mp.solutions.pose.PoseLandmark
Expand Down

0 comments on commit 3fbdc1b

Please sign in to comment.