[][src]Function opencv::imgproc::clip_line_size

pub fn clip_line_size(
    img_size: Size,
    pt1: &mut Point,
    pt2: &mut Point
) -> Result<bool>

Clips the line against the image rectangle.

The function cv::clipLine calculates a part of the line segment that is entirely within the specified rectangle. it returns false if the line segment is completely outside the rectangle. Otherwise, it returns true .

Parameters

  • imgSize: Image size. The image rectangle is Rect(0, 0, imgSize.width, imgSize.height) .
  • pt1: First line point.
  • pt2: Second line point.