Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples: Fix transform_point_cloud_via_checkerboard.py #185

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions continuous-integration/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ apt-yes dist-upgrade || exit

apt-yes install \
python3-pip \
cmake \
wget ||
exit $?

Expand All @@ -32,8 +31,6 @@ function install_www_deb {
install_www_deb "https://downloads.zivid.com/sdk/releases/2.13.1+18e79e79-1/u${VERSION_ID:0:2}/zivid_2.13.1+18e79e79-1_amd64.deb" || exit

python3 -m pip install --upgrade pip || exit
python3 -m pip install conan || exit
python3 -m pip install --requirement "$ROOT_DIR/requirements.txt" || exit
python3 -m pip install https://github.com/zivid/zivid-python/releases/download/v2.13.1.2.13.1/zivid-2.13.1.2.13.1.tar.gz || exit

echo Success! ["$(basename $0)"]
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ open3d
opencv-python
pyyaml
robodk
scipy
scipy
zivid
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def _get_coordinate_system_points(
z_axis_direction = _move_point(origin_position, np.array([0.0, 0.0, size_of_axis]), checkerboard_pose)

points_to_project = np.array([origin_position, x_axis_direction, y_axis_direction, z_axis_direction])
projected_points = cv2.projectPoints(points_to_project, np.zeros(3), np.zeros(3), cv_camera_matrix, cv_dist_coeffs)
projected_points = cv2.projectPoints(points_to_project, np.zeros(3), np.zeros(3), cv_camera_matrix, cv_dist_coeffs)[
0
]

projected_points = projected_points.reshape(-1, 2)
return {
Expand Down
Loading