PixelEdgeDetector

class giant.image_processing.edge_detection.PixelEdgeDetector(*args, **kwargs)[source]

This class implements a basic pixel level edge detector using the Scharr methodology.

Essentially, a Scharr filter is convolved with the image and then Otsu’s method is used to automatically threshold the image gradients to detect the strongest signals, which presumably correspond to edges.

refine_edges(image, edges)[source]

Refines the pixel level edge locations to pixel level edge locations.

This does nothing except return the input…

Parameters:
  • image (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – The image to use to refine the edges

  • edges (ndarray[tuple[Any, ...], dtype[int64]]) – the edges to refine

Returns:

the refined edges.

Return type:

ndarray[tuple[Any, …], dtype[int64]]

identify_edges(image)[source]

This method identifies pixel level edges in the image.

Parameters:

image (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – The image to detect the edges in.

Returns:

The edges as a 2xn array with x (column) components in the first axis and y (row) components in the second axis

Return type:

ndarray[tuple[Any, …], dtype[int64]]

Methods

identify_edges

This method identifies pixel level edges in the image.

refine_edges

Refines the pixel level edge locations to pixel level edge locations.

Inherited Attributes

  • horizontal_mask

  • vertical_mask

  • horizontal_gradient

  • vertical_gradient

  • gradient_magnitude