Hello,
I am implementing feature extraction and zone decision on Matlab but I didn't get same results as the firmware implementation.
but "heat" variable gets wrong value.
Is there somthing wrong in this part of feature extraction on Matlab?
function feature= ODDemo_Feature_extract(zone_pair,azimuthHeatMap,feature) global zoneDef power_history power_historydB ph_idx; oddemo_parms.windowLen= 8; ODDEMO_MATRIX_ROW_SIZE= 6; ODDEMO_POWER_INIT_VAL= 48.0; ODDEMO_MAX_ZONES= 8; ODDEMO_ZONE_PAIR= (ODDEMO_MAX_ZONES / 2); oddemo_feature= zeros(ODDEMO_ZONE_PAIR); oddemo_zone= zoneDef; global oddemo_parms; oddemo_meanVec= [30.300249 31.578581 -7.697893 -6.419561 0.306626; 31.655145 32.674334 -6.327176 -5.307987 0.451940; 31.655145 32.674334 -6.327176 -5.307987 0.451940; 24.971068 27.073746 -8.162031 -6.059353 0.101263]; oddemo_stdVec= [11.033930 12.032618 9.021614 8.202547 0.439775; 10.224506 9.922317 7.227706 5.977525 0.483263; 10.224506 9.922317 7.227706 5.977525 0.483263; 10.738818 8.905771 9.023090 8.420234 0.406470]; ODDEMO_MAX_FRAME_HIST= 16; ODDEMO_MAX_AZIMUTH= 48; ODDEMO_MAX_RANGE= 64; if zone_pair== 1 zone= 1; else zone= ((zone_pair-1) * 2); end for idx= 1:2 % do 5x5 cell power sums % find the max 3x3 area inside the zone max= 0; heat= azimuthHeatMap + (ODDEMO_MAX_AZIMUTH * oddemo_zone{zone}(1)); heat= heat + oddemo_zone{zone}(3); for rng_idx= 1:oddemo_zone{zone}(2)-2 % point to the correct range row, then add the starting azimuth index for az_idx = 1:oddemo_zone{zone}(4)-2 offset = az_idx; tmp = heat(offset) + heat(offset+1) + heat(offset+2); offset = offset + ODDEMO_MAX_AZIMUTH; tmp= tmp + heat(offset) + heat(offset+1) + heat(offset+2); offset= offset + ODDEMO_MAX_AZIMUTH; tmp= tmp + heat(offset) + heat(offset+1) + heat(offset+2); if (tmp > max) max = tmp; max_rng = rng_idx; %center position is actually +1, +1 max_az = az_idx; end end heat= heat + ODDEMO_MAX_AZIMUTH; end % Save the max positions for output. max_rng= max_rng + oddemo_zone{zone}(1) + 1; max_az= max_az + oddemo_zone{zone}(3) + 1; oddemo_zone{zone}(5) = max_rng; oddemo_zone{zone}(6) = max_az; sum= 0; heat= azimuthHeatMap + (ODDEMO_MAX_AZIMUTH * (max_rng-2)); heat= heat + max_az - 2; ...
This is the part of c code of feature extraction.
Thanks,