pyEdgeEval.preprocess.nms package¶
Submodules¶
pyEdgeEval.preprocess.nms.fast_nms module¶
- pyEdgeEval.preprocess.nms.fast_nms.fast_nms(img: ndarray, r: int = 1, s: int = 5, m: float = 1.01, half_prec: bool = False, return_as_uint8: bool = False) ndarray [source]¶
NMS for binary edges
- Parameters
- Returns
supressed edge
References: - https://github.com/pdollar/edges/blob/master/private/edgesNmsMex.cpp
Current runtime is around 20ms
pyEdgeEval.preprocess.nms.toolbox module¶
- pyEdgeEval.preprocess.nms.toolbox.conv_tri(image: ndarray, r: int, s: int = 1) ndarray [source]¶
2D image convolution with a triangle filter (no fast) See https://github.com/pdollar/toolbox/blob/master/channels/convTri.m Note: signal.convolve2d does not support float16(‘single’ in MATLAB)
- pyEdgeEval.preprocess.nms.toolbox.grad2(image: ndarray) Tuple[ndarray, ndarray] [source]¶
numerical gradients along x and y directions (no fast) See https://github.com/pdollar/toolbox/blob/master/channels/gradient2.m Note: np.gradient return [oy, ox], MATLAB version return [ox, oy]
Module contents¶
- pyEdgeEval.preprocess.nms.fast_nms(img: ndarray, r: int = 1, s: int = 5, m: float = 1.01, half_prec: bool = False, return_as_uint8: bool = False) ndarray [source]¶
NMS for binary edges
- Parameters
- Returns
supressed edge
References: - https://github.com/pdollar/edges/blob/master/private/edgesNmsMex.cpp
Current runtime is around 20ms