Add Example
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
% stat_RD: range-doppler statistics
|
||||
% P_fa: false alarm rate
|
||||
|
||||
% target_map: show targets in RD map
|
||||
% target list include range and doppler information
|
||||
|
||||
|
||||
function [ target_list_RD, target_map ] = rd_detection(stat_RD, P_fa)
|
||||
|
||||
% parameters
|
||||
target_map = zeros(size(stat_RD));
|
||||
[lenA, lenR, lenP] = size(stat_RD);
|
||||
|
||||
% detection threshold
|
||||
d_thd = chi2inv(1 - P_fa, 2) / 2;
|
||||
|
||||
% find target
|
||||
target_list_RD = [];
|
||||
for i = 1: lenA
|
||||
RD_map = squeeze(stat_RD(i, :, :));
|
||||
detect_map = zeros(size(RD_map));
|
||||
detect_map(RD_map > d_thd) = 1;
|
||||
target_map(i, :, :) = detect_map;
|
||||
[r, c] = find(detect_map);
|
||||
temp_list = zeros(length(r), 3);
|
||||
temp_list(:, 1) = i;
|
||||
temp_list(:, 2) = r;
|
||||
temp_list(:, 3) = c;
|
||||
target_list_RD = [target_list_RD; temp_list];
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user