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

Fixes #6291 and #6236 #6305

Merged
merged 3 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions cpp/open3d/geometry/PointCloudSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ RANSACResult EvaluateRANSACBasedOnDistance(
double distance = std::abs(plane_model.dot(point));

if (distance < distance_threshold) {
error += distance;
theNded marked this conversation as resolved.
Show resolved Hide resolved
error += distance * distance;
inliers.emplace_back(idx);
}
}
Expand All @@ -91,7 +91,7 @@ RANSACResult EvaluateRANSACBasedOnDistance(
result.inlier_rmse_ = 0;
} else {
result.fitness_ = (double)inlier_num / (double)points.size();
result.inlier_rmse_ = error / std::sqrt((double)inlier_num);
result.inlier_rmse_ = std::sqrt(error / (double)inlier_num);
ssheorey marked this conversation as resolved.
Show resolved Hide resolved
}
return result;
}
Expand Down
4 changes: 3 additions & 1 deletion cpp/open3d/geometry/RGBDImageFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ std::shared_ptr<RGBDImage> RGBDImage::CreateFromColorAndDepth(
bool convert_rgb_to_intensity /* = true*/) {
std::shared_ptr<RGBDImage> rgbd_image = std::make_shared<RGBDImage>();
if (color.height_ != depth.height_ || color.width_ != depth.width_) {
utility::LogError("Unsupported image format.");
utility::LogError(
"RGB image size ({} {}) and depth image size mismatch ({} {}).",
color.height_, color.width_, depth.height_, depth.width_);
theNded marked this conversation as resolved.
Show resolved Hide resolved
}
rgbd_image->depth_ =
*depth.ConvertDepthToFloatImage(depth_scale, depth_trunc);
Expand Down