Realm

oa::image::hough_lines_p

Probabilistic Hough segment transform per plane, following HoughLinesP: votes accumulate as in hough_lines, strict local-maxima cells above threshold emit candidate lines, and each candidate is walked along its direction to find the dominant contiguous edge run that tolerates gaps of up to max_line_gap pixels and reaches min_line_length. The F32 output carries plane x max_lines x 4 rows of (x1, y1, x2, y2) endpoints; line slots without a qualifying run are zero. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image, edge_threshold/rho_step/theta_step are finite, rho_step/theta_step are positive, theta_step does not exceed 180, min_line_length is nonnegative, and max_lines is nonzero.

FnRust public API

Function Documentation

pub fn hough_lines_p( input: &Image, edge_threshold: f32, rho_step: f32, theta_step: f32, threshold: u32, max_lines: u32, min_line_length: f32, max_line_gap: u32 ) -> Result<Matrix>
Probabilistic Hough segment transform per plane, following HoughLinesP: votes accumulate as in hough_lines, strict local-maxima cells above threshold emit candidate lines, and each candidate is walked along its direction to find the dominant contiguous edge run that tolerates gaps of up to max_line_gap pixels and reaches min_line_length. The F32 output carries plane x max_lines x 4 rows of (x1, y1, x2, y2) endpoints; line slots without a qualifying run are zero. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image, edge_threshold/rho_step/theta_step are finite, rho_step/theta_step are positive, theta_step does not exceed 180, min_line_length is nonnegative, and max_lines is nonzero.