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.

A bug in VLIB_goodFeaturestoTrack for VLIB Release 3.2.0.2 (C674X)

A bug in VLIB_goodFeaturestoTrack for VLIB Release 3.2.0.2 (C674X)

I test the VLIB_goodFeaturestoTrack in the VLIB_harrisScore_7x7_674_LE_COFF testcase.

in the VLIB_harrisScore_7x7_674_LE_COFF testcase, the iput image is a (width ,height) is
(64,64),(48,64),(32,64),(32,32),(320,240),(320,240)
I test the (64,64),(48,64),(32,64),(32,32) in VLIB_nonMaxSuppress_3x3_S16 or VLIB_goodFeaturestoTrack
respectively,
then save the output image,the image is correct.and the good_points_number_opt isnot equal to zfnum;
when I test the (320,240),(320,240) ,the output of VLIB_nonMaxSuppress_3x3_S16 is correct but
VLIB_goodFeaturestoTrack is wrong ,and the good_points_number_opt isnot equal to zfnum

I think there is sth wrong in VLIB_goodFeaturestoTrack ; it maybe not support Relatively high resolution such
as (320,240)

please help me ,thank you!

here is the code:


VLIB_xyGradients_cn(input,gradX+prm[tpi].width+1,gradY+prm[tpi].width+1,prm[tpi].width,prm[tpi].height);
VLIB_harrisScore_7x7(gradX,gradY,prm[tpi].width,prm[tpi].height,(int16_t*)outm,prm[tpi].k,scratch);
VLIB_nonMaxSuppress_3x3_S16(outm,prm[tpi].width,prm[tpi].height,5000,out_my+prm[tpi].width+1);

uint32_t inp_size = prm[tpi].width*prm[tpi].height;
uint32_t pixIndex_size = inp_size *2 + 2;
uint32_t internalBuf_size = inp_size +(2*7);//3,5,7

uint8_t *out_opt = (uint8_t *)VLIB_malloc(inp_size *sizeof(uint8_t));
uint16_t *outTemp = (uint16_t *)VLIB_malloc(inp_size *sizeof(uint16_t));
int16_t *pixIndex = (int16_t *)VLIB_malloc(pixIndex_size *sizeof(int16_t));
uint16_t *internalBuf = (uint16_t *)VLIB_malloc(internalBuf_size *sizeof(uint16_t));
int32_t *ind = (int32_t *)VLIB_malloc(inp_size *sizeof(int32_t ));
int32_t good_points_number_opt = 0;

good_points_number_opt = 0;
memset(out_opt,0,inp_size *sizeof(uint8_t));
memset(outTemp,0,inp_size *sizeof(uint16_t));
memset(pixIndex,0,pixIndex_size *sizeof(int16_t));
memset(internalBuf,0,internalBuf_size *sizeof(uint16_t));
memset(ind,0,inp_size *sizeof(int32_t ));

VLIB_goodFeaturestoTrack(outm,out_opt,prm[tpi].width,prm[tpi].height,
5000,3,80,
50,5,
outTemp,&good_points_number_opt,pixIndex,internalBuf,ind);
zfnum = 0;
for(i = 0; i<prm[tpi].width*prm[tpi].height;i++ )
{
if(out_opt[i] == 255)
{
zfnum++;
}
}

printf("###########point num %d %d\n",good_points_number_opt,zfnum);