This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR1443BOOST: Lab0009-gesture-recog-twirl: how to change the maximum detection range?

Part Number: IWR1443BOOST

In the Lab0009-gesture-recog-twirl, the original detection range is under 40cm. When I twirl my finger with a distance larger than 40cm, the picture will not be zoomed in or out.

Objective: I want to increse the functional range in the lab009, i.e. when I twirl my finger with a distance of 2m, the picture still can be zoomed in or out according to the gesture.

Problems:

In the previous answers from the engineer, I learned that 

In gesture_twirl.h the following parameters are defined that affect the initial and max range bins used for gesture recognition:

#define NUM_INITIAL_RANGE_BINS_SKIP 2
#define MAX_RANGE_BIN_USED 9

But after I incresed the MAX_RANGE_BIN_USED from 9 to 20, the maximum detection range was not changed, i.e. I twirled my finger with a distance greater than 40cm, the picture cannot be zoomed in or out.

And after I decresed the MAX_RANGE_BIN_USED from 9 to 5, the maximum detectioin range was reduced to 30 cm or so.

1. I want to know why the maximum detection range can only be decresed but not incresed.

And I looked into the code carefully. The variable MAX_RANGE_BIN_USED is used in the following code (in the gesture_twirl.c):

//tempPtr=preDetMatrixPtr+numDopplerBins*NUM_INITIAL_RANGE_BINS_SKIP+NUM_INITIAL_DOPPLER_BINS_SKIP;
	//Computing statistics for positive dopplers
	for(i=NUM_INITIAL_RANGE_BINS_SKIP;i<MAX_RANGE_BIN_USED ;i++)
	{

		for(j=NUM_INITIAL_DOPPLER_BINS_SKIP+1;j<MAX_DOPPLER_BIN_USED_ONE_SIDED+1;j++)//+1 to include the zero doppler bin
		{
			valatindx = preDetMatrix[i*numDopplerBins+j];
			if((valatindx>detThresh))
			{
				numDetectionsPos++;
				wt=valatindx;
				dopplerAvgPos+=wt*j;
				rangeAvgPos+=(wt+4000)*i;
				wtSumPos+=wt;
			}

			if(valatindx>maxVal)
			{
				maxVal=valatindx;
				maxRangeIdx=i;
				maxDopplerIdx=j;
			}
		}
	}

2. can you explain the following code above specifically line by line:

valatindx = preDetMatrix[i*numDopplerBins+j];
			if((valatindx>detThresh))
			{
				numDetectionsPos++;
				wt=valatindx;
				dopplerAvgPos+=wt*j;
				rangeAvgPos+=(wt+4000)*i;
				wtSumPos+=wt;
			}

			if(valatindx>maxVal)
			{
				maxVal=valatindx;
				maxRangeIdx=i;
				maxDopplerIdx=j;
			}

3. And why there are rangeAvgPos and rangeAvgNeg (both positive and negative)?

4. What does the parameter detThresh mean in the function Gesture_findNumDetections(uint16_t numRangeBins, uint16_t numDopplerBins,uint16_t *preDetMatrix,uint16_t detThresh,short * gestureMetrics, uint16_t *maxIndices )

5.When I changed the parameter detThresh from 8000 to 4000, the matlab program cannot run correctly, I think maybe the memory of the chip was crashed beacuse of the data overflow(I am not sure), can you tell me why?
Does this parameter connected to the maximum detection range.

6.The ultimate problem is to change the detection range of the lab0009. For example, the picture can response to my gesture with a distance of 2m or so.

Thank you very much!