This commit is contained in:
2026-07-27 11:22:49 +07:00
parent e2ee28bd63
commit e3b52765c1
2 changed files with 67 additions and 1 deletions

View File

@@ -99,6 +99,12 @@ private:
double* min_x, double* min_y, double* max_x, double* max_y);
bool readDepthMeters(const robot_sensor_msgs::Image& depth, unsigned int u, unsigned int v,
double& depth_m, bool& is_valid) const;
/// True when the invalid pixel at (u, v) is an isolated hole surrounded by
/// valid returns (a flying pixel, safe to clear), false when it belongs to a
/// structurally invalid region such as the stereo no-disparity strip on the
/// left image edge (no free-space evidence, must be left untouched).
bool invalidPixelIsIsolated(const robot_sensor_msgs::Image& depth,
unsigned int u, unsigned int v) const;
void updateDepthRayCache(unsigned int width, unsigned int height, unsigned int pixel_step,
double fx, double fy, double cx, double cy);
bool clipRaytraceEndpoint(double ox, double oy, double oz, double& wx, double& wy, double& wz);
@@ -125,7 +131,8 @@ private:
double min_band_dist = -1.0; ///< horizontal distance of nearest in-band return; < 0 = none
double azimuth = 0.0; ///< beam direction in the global frame
double best_row_delta = std::numeric_limits<double>::infinity();
bool has_ray = false; ///< column had at least one readable pixel
bool has_ray = false; ///< column had at least one readable pixel
bool has_valid_return = false; ///< column had at least one valid depth measurement
};
std::vector<DepthColumnStat> depth_column_stats_;
unsigned int unknown_threshold_, mark_threshold_, size_z_;