torchbp.ops.cfar module

torchbp.ops.cfar.cfar_2d(img, Navg, Nguard, threshold, peaks_only=False)[source]

Constant False Alaram Rate detection for 2D image.

Parameters:
  • img (Tensor) – Absolute valued 2D image. If 3D then the first dimension is batch dimension.

  • Navg (tuple) – Number of averaged cells in 2D (N1, N0).

  • Nguard (tuple) – Number of guard cells in 2D (N1, N0). Both dimensions need to be less or same than the same entry in Navg.

  • threshold (float) – Threshold for detection.

  • peaks_only (bool) – Reject pixels that are not higher than their immediate neighbors. Defaults is False.

Returns:

detection – Detections tensor same shape as the input image. For each pixel 0 for no detection, positive value is the SNR of detection at that position.

Return type:

Tensor