Main Content

2-D CFAR Detector

二维恒虚警率(CFAR) detector

  • Library:
  • Phased Array System Toolbox / Detection

  • 2-D CFAR Detector block

Description

The2-D CFAR Detectorblock implements a constant false-alarm rate detector for two dimensional image data. A detection is declared when an image cell value exceeds a threshold. To maintain a constant false alarm-rate, the threshold is set to a multiple of the image noise power. The detector estimates noise power from neighboring cells surrounding the cell-under-test(CUT)using one of three cell averaging methods, or an order statistics method. The cell-averaging methods are cell-averaging (CA), greatest-of cell averaging (GOCA), or smallest-of cell averaging (SOCA).

For each test cell, the detector:

  1. estimates the noise statistic from the cell values in the training band surrounding the CUT cell.

  2. computes the threshold by multiplying the noise estimate by the threshold factor.

  3. compares the CUT cell value to the threshold to determine whether a target is present or absent. If the value is greater than the threshold, a target is present.

Ports

Input

expand all

Input image, specified as a realM-by-Nmatrix or realM-by-N-by-Parray.MandNrepresent the rows and columns of the matrix. Each page is a different 2-D signal.

The size of the first dimension of the input matrix can vary to simulate a changing signal length. A size change can occur, for example, in the case of a pulse waveform with variable pulse repetition frequency.

The size of the first dimension of the input matrix can vary to simulate a changing signal length. A size change can occur, for example, in the case of a pulse waveform with variable pulse repetition frequency.

Data Types:double
Complex Number Support:Yes

Location of test cells, specified as a2-by-Lmatrix of positive integers, whereLis the number of test cells. Each column ofidxspecifies the row and column index of a CUT cell. The locations of CUT cells are restricted so that their training regions lie completely within the input images.

Data Types:double

Threshold factor used to calculate the detection threshold, specified as a positive scalar.

Dependencies

To enable this port, set theThreshold factor methodparameter to'Input port'

Data Types:double

Output

expand all

Detection results, whose format depends on theOutput Formatproperty

  • WhenOutputFormatis'Cut result',Yis aD-by-Pmatrix containing logical detection results for cells under test.Dis the length ofcutidxandPis the number of pages ofX. The rows ofYcorrespond to the rows ofcutidx. For each row,Ycontains1in a column if there is a detection in the corresponding cell inX. Otherwise,Ycontains a0.

  • WhenOutputFormatisDetection index,Yis aK-by-Lmatrix containing detections indices.Kis the number of dimensions ofX.Lis the number of detections found in the input data. WhenXis a matrix,Ycontains the row and column indices of each detection inXin the form[detrow;detcol]. WhenXis an array,Ycontains the row, column, and page indices of each detection inXin the form[detrow;detcol;detpage]. When theNumDetectionsSourceproperty is set to'Property',Lequals the value of theNumDetections财产。如果实际检测勒的数量ss than this value, columns without detections are set toNaN.

Data Types:double

Computed detection threshold for each detected cell, returned as a real-valued matrix.Thhas the same dimensions asY.

  • WhenOutputFormatis'CUT result',Threturns the detection threshold whenever an element ofYis1andNaNwhenever an element ofYis0.

  • WhenOutputFormatisDetection index,threturns a detection threshold for each corresponding detection inY. When theNumDetectionsSourceproperty is set to'Property',Lequals the value of theNumDetections财产。如果实际检测勒的数量ss than this value, columns without detections are set toNaN.

Dependencies

To enable this port, select theOutput detection thresholdcheckbox.

Data Types:double

Estimated noise power for each detected cell, returned as a real-valued matrix.noisehas the same dimensions asY.

  • WhenOutputFormatis'CUT result',noisereturns the noise power whenever an element ofYis1andNaNwhenever an element ofYis0.

  • WhenOutputFormatis'Detection index',noisereturns a noise power for each corresponding detection inY. When theNumDetectionsSourceproperty is set to'Property',Lequals the value of theNumDetections财产。如果实际检测勒的数量ss than this value, columns without detections are set toNaN.

Dependencies

To enable this port, select theOutput estimated noise powercheckbox.

Data Types:double

Parameters

expand all

Noise power estimation algorithm, specified asCA,GOCA,SOCA, orOS. ForCA,GOCA,SOCA, the noise power is the sample mean derived from the training band. ForOS, the noise power is thekth cell value obtained from a numerical ordering of all training cell values. Setkby theRank of order statisticparameter. SeeTraining cells.

Averaging Method Description
CA— Cell-averaging algorithm

Computes the sample mean of all training cells surrounding the CUT cell.

GOCA— Greatest-of cell-averaging algorithm

Splits the 2-D training window surrounding the CUT cell into left and right halves. Then, the algorithm computes the sample mean for each half and selects the largest mean.

SOCA— Smallest-of cell-averaging algorithm

Splits the 2-D training window surrounding the CUT cell into left and right halves. Then, the algorithm computes the sample mean for each half and selects the smallest mean.

OS— Order statistic algorithm

Sorts training cells in ascending order of numeric values. Then the algorithm selects thekth value from the list.kis the rank specified by theRankparameter.

Specify the rank of the order statistic used in the 2-D CFAR algorithm as a positive integer. The value of this parameter must lie between 1 andNtrain, whereNtrainis the number of training cells. A value of 1 selects the smallest value in the training region.

Dependencies

To enable this parameter, set theCFAR Algorithmparameter toOS.

The number of row and column guard cells on each side of the cell under test as nonnegative integers. The first element specifies the guard band size along the row dimension. The second element specifies the guard band size along the row dimension. SpecifyingSize in cells of the guard region bandas a scalar is equivalent to specifying a vector with the same value for both dimensions. For example, a value of[1 1], indicates that there is a one-guard-cell-wide region surrounding each CUT cell.

Size in cells of the training region band, specified as a nonnegative integer or 1-by-2 matrix of nonnegative integers. The first element specifies the training band size along the row dimension, and the second along the column dimension. SpecifyingSize in cells of the training region bandas a scalar is equivalent to specifying a vector with the same value for both dimensions. For example, a value of[1 1]indicates that there is a one-training-cell-wide region surrounding the guard region for each cell under test.

Method to determine threshold factor, specified asAuto,Input port, orCustom.

  • When you chooseAuto, the threshold factor is determined from the estimated noise statistic and the probability of false alarm.

  • When you chooseInput Port, set the threshold factor using theKinput port.

  • When you chooseCustom, set the threshold factor using theCustom threshold factorparameter.

Custom threshold factor, specified as a positive scalar.

Dependencies

To enable this parameter, set theThreshold factor methodparameter toCustom.

Probability of false alarm, specified as a real scalar between 0 and 1. You can calculate the threshold factor from the required probability of false alarm.

Dependencies

To enable this parameter, set theThreshold factor methodproperty toAuto.

Format of detection results, specified asCUT resultorDetection index.

  • When set to'CUT result', the detection results are logical detection values (1or0) for each tested cell.

  • When set to'Detection index', the results form a vector or matrix containing the indices of tested cells that exceed a detection threshold.

Select this check box to enable the output of detection thresholds via theThoutput port.

Select this check box to enable the output of estimated noise power via theNoutput port.

Source of the number of detections, specified asAutoorProperty. When you selectAuto, the number of detection indices reported is the total number of cells under test that have detections. If you selectProperty, the number of reported detections is determined by the value of theMaximum number of detectionsparameter.

Dependencies

To enable this parameter, set theOutput formatparameter toDetection index.

Data Types:char

Maximum number of detection indices to report, specified as a positive integer.

Dependencies

To enable this parameter, set theOutput formatparameter toDetection indexand theSource of the number of detectionsparameter toProperty.

Data Types:double

Algorithms

CFAR 2-D requires an estimate of the noise power. Noise power is computed from cells that are assumed not to contain any target signal. These cells are thetraining cells. Training cells form a band around the cell-under-test (CUT) cell but may be separated from the CUT cell by a guard band. The detection threshold is computed by multiplying the noise power by the threshold factor.

For GOCA and SOCA averaging, the noise power is derived from the mean value of one of the left or right halves of the training cell region.

Because the number of columns in the training region is odd, the cells in the middle column are assigned equally to either the left or right half.

When using the order-statistic method, the rank cannot be larger than the number of cells in the training cell region,Ntrain. You can computeNtrain.

  • NTCis the number of training band columns.

  • NTRis the number of training band rows.

  • NGCis the number of guard band columns.

  • NGRis the number of guard band rows.

The total number of cells in the combined training region, guard region, and CUT cell isNtotal= (2NTC+ 2NGC+ 1)(2NTR+ 2NGR+ 1).

The total number of cells in the combined guard region and CUT cell isNguard= (2NGC+ 1)(2NGR+ 1).

The number of training cells isNtrain= Ntotal– Nguard.

By construction, the number of training cells is always even. Therefore, to implement a median filter, you can choose a rank ofNtrain/2orNtrain/2 + 1.

Version History

Introduced in R2016b