Skip to content

Commit

Permalink
Merge pull request #14 from PreSenseRadar/people_tracking_demo_fix
Browse files Browse the repository at this point in the history
People tracking demo fix
  • Loading branch information
edwin-pan authored Mar 17, 2020
2 parents 0c199e5 + fe12c5c commit 65bcd62
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions demo/people_tracking/people_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@


# Start DSP processing
range_azimuth = np.zeros((ANGLE_BINS, BINS_PROCESSED), dtype=np.complex_)
range_azimuth = np.zeros((ANGLE_BINS, BINS_PROCESSED))
num_vec, steering_vec = dsp.gen_steering_vec(ANGLE_RANGE, ANGLE_RES, VIRT_ANT)
tracker = EKF()

Expand All @@ -64,14 +64,13 @@
radar_cube = radar_cube - mean

# --- capon beamforming
beamWeights = np.zeros((VIRT_ANT, BINS_PROCESSED))
beamWeights = np.zeros((VIRT_ANT, BINS_PROCESSED), dtype=np.complex_)
radar_cube = np.concatenate((radar_cube[0::2, ...], radar_cube[1::2, ...]), axis=1)
# Note that when replacing with generic doppler estimation functions, radarCube is interleaved and
# has doppler at the last dimension.
for i in range(BINS_PROCESSED):
range_azimuth[:,i], beamWeights[:,i] = dsp.aoa_capon(steering_vec, radar_cube[:, :, i].T)
range_azimuth = np.abs(range_azimuth)

range_azimuth[:,i], beamWeights[:,i] = dsp.aoa_capon(radar_cube[:, :, i].T, steering_vec, magnitude=True)

""" 3 (Object Detection) """
heatmap_log = np.log2(range_azimuth)

Expand Down

0 comments on commit 65bcd62

Please sign in to comment.