CA-CFAR 예제 코드
이전 포스트에서 CFAR의 원리 에 대해 알아본 적이 있다. 본 포스트에서는 Python으로 CA-CFAR에 대해 간단하게 구현한 예제를 수록하고 있다. 구현된 CA-CFAR은 아래 그림과 같이 구현되었다. ca-cfar 코드 import numpy as np class cacfar(object): def __init__(self, window_size, guard_size,pfa = 0.01, scale=1.0): self.pfa = pfa self.scale = scale self.window_size = window_size self.guard_size = guard_size def cal_threshold(self, left, right): n = len(left)+len(right) s = np.sum(np.square(left))+np.sum(np.square(right)) if n > 0: T= np.power(self.pfa,(-1.0 /n)) - 1 average = s/n ...