DropDetection_AbsDifference
drop_cropping(diff_img:np.ndarray, drop_middle_y:int, drop_start:int, x_left_margin:int, x_right_margin:int, y_up_margin:int, object_detection_threshold:int)
Crops the droplet reflection from the difference image based on detected edges.
Parameters:
diff_img
(np.ndarray): Difference image containing the droplet reflection.drop_middle_y
(int): Approximate vertical center of the droplet.drop_start
(int): Approximate starting point of the droplet.x_left_margin
(int): Margin added to the left crop boundary.x_right_margin
(int): Margin added to the right crop boundary.y_up_margin
(int): Margin subtracted from the upper crop boundary.object_detection_threshold
(int): Pixel intensity threshold for detecting droplet edges.
Returns:
- y_down (int)
: Bottom y-coordinate of the crop.Raises:
ValueError
: If the input image is not a valid numpy array.
Labels:
src_PyThon_ContactAngle_DropDetection_DropDetection_AbsDifference_drop_cropping