edgeDetection
edge_extraction(upscaled_image:np.ndarray, thr:int)
Extract edge pixels from an upscaled image using a threshold.
This function detects the first pixel above the threshold from the left, right, and top of the image to form a rough outline of detected objects. Duplicate points are removed.


Parameters:
upscaled_image
(np.ndarray): Input BGR image (as NumPy array or PIL Image).thr
(int): Threshold value for pixel intensity (0–255).
Returns:
Tuple[List[int], List[int]]
: Tuple of (i_list, j_list) representing the x and yAuthor:
- Yassin Riyazi (Using SIMD for speedup)
- Sajjad Shumaly
Labels:
src_PyThon_ContactAngle_CaMeasurer_edgeDetection_edge_extraction
advancing_pixel_selection(i_list:List[int], j_list:List[int], left_number_of_pixels:int)
Selects pixels from the advancing (left) side of a droplet, with spatial filtering and improved precision, ensuring even row distribution. There is a logocal error in the code. Look at Projects/ContactAngle/CaMeasurer/advancing_pixel_selection_advacingPoints30.png




Parameters:
i_list
(List[int]): x-coordinates (horizontal positions) of edge pixels.j_list
(List[int]): y-coordinates (vertical positions) of edge pixels.left_number_of_pixels
(int): Maximum number of pixels to return.
Returns:
Tuple[List[int], List[int]]
: Selected advancing edge pixels (x, y).Author:
- Sajjad Shumaly
Labels:
src_PyThon_ContactAngle_CaMeasurer_edgeDetection_advancing_pixel_selection
Advancing_pixel_selection_Euclidean(i_list:List[int], j_list:List[int], left_number_of_pixels:int)
Selects pixels from the advancing (left) side of a droplet, sorted by 2D Euclidean distance from the leftmost point, returning specified number of pixels.




Parameters:
i_list
(List[int]): x-coordinates (horizontal positions) of edge pixels.j_list
(List[int]): y-coordinates (vertical positions) of edge pixels.left_number_of_pixels
(int): Number of pixels to return.
Returns:
Tuple[List[int], List[int]]
: Selected advancing edge pixels (x, y).Author:
- Yassin Riyazi (Norm2 based selection)
Labels:
src_PyThon_ContactAngle_CaMeasurer_edgeDetection_Advancing_pixel_selection_Euclidean
Receding_pixel_selection_Euclidean(i_list:List[int], j_list:List[int], left_number_of_pixels:int)
Selects pixels from the receding (right) side of a droplet, sorted by 2D Euclidean distance from the leftmost point, returning specified number of pixels from both ends.




Parameters:
i_list
(List[int]): x-coordinates (horizontal positions) of edge pixels.j_list
(List[int]): y-coordinates (vertical positions) of edge pixels.left_number_of_pixels
(int): Number of pixels to return from each end (total 2*left_number_of_pixels).
Returns:
Tuple[List[int], List[int]]
: Selected receding edge pixels (x, y).Author:
- Yassin Riyazi (Norm2 based selection)
Labels:
src_PyThon_ContactAngle_CaMeasurer_edgeDetection_Receding_pixel_selection_Euclidean