Hi,
I have some problem to use the 'VLIB_ORB_computeRBRIEF' in VLIB 3.2.
In the example code(vlib_ORB_computeRBRIEF_d.c) there is a 'orbPatten' at line #101 ~ #104.
for( i = 0; i < CORB_NUM_ORIENTATIONS; i++ ) {
const RotationMatrix rMat = getRotationMatrix(i);
for( j = 0; j < CORB_NUM_PATTERNS; j++ ) {
const VLIB_D64 x1 = (VLIB_D64) prm[tpi].orbPattern[j * 4];
const VLIB_D64 y1 = (VLIB_D64) prm[tpi].orbPattern[j * 4 + 1];
const VLIB_D64 x2 = (VLIB_D64) prm[tpi].orbPattern[j * 4 + 2];
const VLIB_D64 y2 = (VLIB_D64) prm[tpi].orbPattern[j * 4 + 3];
const int32_t x1p = ROUND_DOUBLE(rMat.val[0][0] * x1 + rMat.val[0][1] * y1);
const int32_t y1p = ROUND_DOUBLE(rMat.val[1][0] * x1 + rMat.val[1][1] * y1);
const int32_t x2p = ROUND_DOUBLE(rMat.val[0][0] * x2 + rMat.val[0][1] * y2);
const int32_t y2p = ROUND_DOUBLE(rMat.val[1][0] * x2 + rMat.val[1][1] * y2);
const int32_t nstep = (int)prm[tpi].imageWidth;
int32_t center;
center = (int32_t)(x1p + prm[tpi].imageWidth * y1p);
relative_patterns[i * CORB_NUM_PATTERNS * 2 + j * 2] =
4 * (center - CORB_PATCH_KERNEL_HALF_WIDTH - CORB_PATCH_KERNEL_HALF_WIDTH * nstep - 1 - nstep);
center = (int32_t)(x2p + prm[tpi].imageWidth * y2p);
relative_patterns[i * CORB_NUM_PATTERNS * 2 + j * 2 + 1] =
4 * (center - CORB_PATCH_KERNEL_HALF_WIDTH - CORB_PATCH_KERNEL_HALF_WIDTH * nstep - 1 - nstep);
}
}
I thought the orbPattern is a array in the user-guide documentation, ex] orbPattern[16] = { 15, 15, 15, ~ };
However, in the example file the index ' j ' goes to lager than 16, in fact goes to CORB_NUM_PATTERNS(#defined as 256 in vlib_orb.h).
Since the size of orbPattern[16] is '16', I can't put the value when ' j ' is lager than 16.
In short, my questions are
1. What is the orbPattern in the example file(vlib_ORB_computeRBRIEF_d.c, #101 ~ #104) ?
2. Is it equal to the orbPattern[16] = { 15, 15, 15, 15 ~ } ?
3. If it is equal the orbPattern[16], how can I get the value of orbPattern[17 ~ ] ?
4. or should I change the CORB_NUM_PATTERNS to 16( size of orbPattern) ?
Also, in the 'vlib_orb.h' there is a description of orbPattern31.
(int8_t *orbPattern31; /*!< User-populated pointer to precomputed orbPattern31 array (found in VLIB_orb_idat.c file) */)
Does 'orbPattern31' differ from orbPattern[16] = { 15, 15, 15, ~ } ?
If it differ from orbPattern[16], how can I get the orbPattern31?
I can't find the file ' VLIB_orb_idat.c'.
Thank you !
Regards,
Tahk.