How to use CFAR algorithm in my case

13 visualizaciones (últimos 30 días)
Chen yuru
Chen yuru el 14 de Nov. de 2019
Editada: Alaa Eddin Ziadah el 15 de Dic. de 2020
Hello,
I have a spectrum in test.mat. (as shown in Figure, size is 1024 x 32)
I would like to do CFAR to detect tearget.
I reference Constant False Alarm Rate (CFAR) Detection in matlab code.(link as shown in below)
But it doesn't work.
----------------------
It appears error:
Error using step
Expected Row 2 of Idx to be an array with all of the values <= 32.
Error in sigdatatypes.validateIndex (line 36)
validateattributes(x,type,varargin{2},funcname,varname);
Error in phased.CFARDetector2D/stepImpl (line 320)
sigdatatypes.validateIndex(Idx(2,:),'step','Row 2 of Idx',...
---------------------
Could you please tell me how to revised the code.
Thanks!
load test.mat
cfar2D = phased.CFARDetector2D('GuardBandSize',2,'TrainingBandSize',5,...
'ProbabilityFalseAlarm',1e-5);
dopGrid = 1:1024;
rngGrid = 1:32;
[~,rangeIndx] = min(abs(rngGrid'-[1 32]));
[~,dopplerIndx] = min(abs(dopGrid'-[1 1024]));
[columnInds,rowInds] = meshgrid(dopplerIndx(1):dopplerIndx(2),...
rangeIndx(1):rangeIndx(2));
CUTIdx = [rowInds(:) columnInds(:)]';
detections = cfar2D(test,CUTIdx);
helperDetectionsMap(test,rngGrid,dopGrid,rangeIndx,dopplerIndx,detections)
  1 comentario
Alaa Eddin Ziadah
Alaa Eddin Ziadah el 15 de Dic. de 2020
Editada: Alaa Eddin Ziadah el 15 de Dic. de 2020
Hello Chen,
I have now the same task with CFAR to detect tearget in thermal images, but i have also the same error in matlab.
Can you kindly tell me, if you could have to solve this Problem .
Thank you.
Best wishes

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by