2D primitives🔗
Pose estimation for circles🔗
HALCON offers an alternative approach to estimate the pose of 3D circles, which can be applied with less effort than the previously described approaches.
It is based on the known geometrical behavior of perspectively distorted circles.
In particular, 3D circles are represented as ellipses in the image.
Using the extracted 2D ellipse of a 3D circle together with the internal camera parameters and the known radius of the circle, the two possible 3D poses of the circle (having the same position but opposite orientations) can be obtained easily using the operator get_circle_pose.
The HDevelop examples %HALCONEXAMPLES%\hdevelop\Transformations\Poses\get_circle_pose.hdev and %HALCONEXAMPLES%\hdevelop\Applications\Position-Recognition-3D\
3d_position_of_circles.hdev show in detail how to apply the approach.
Pose estimation for rectangles🔗
Additionally to the pose estimation for 3D circles, also the poses of 3D rectangles can be estimated with an approach that can be applied with less effort than the general approach.
It is based on the known geometrical behavior of perspectively distorted rectangles.
In particular, a contour is segmented into four line segments and their intersections are considered as the corners of a quadrangular contour.
Using the extracted 2D quadrangle of the 3D rectangle together with the internal camera parameters and the known size of the rectangle, the four (or eight in case of a square) possible 3D poses of the rectangle can be obtained easily using the operator get_rectangle_pose.
The examples %HALCONEXAMPLES%\hdevelop\Applications\Position-Recognition-3D\get_rectangle_pose_barcode.hdev and %HALCONEXAMPLES%\hdevelop\Applications\Position-Recognition-3D\3d_position_of_rectangle.hdev show in detail how to apply the approach.