Dear expert,
I am working on stereovision system.
I test the function : VLIB_disparity_SAD8
This fonction give the results of disparity from left to right image, isn't it?
How can I have the disparity from right to left?
I would like after to make a Left right Check to remove some false detection
Thanks a lot for your replies
Jerome
//FIRST ROW DISPARITY
i=0;
memset(pCost, 0, sizeof(pCost) );
memset(minCost, 0x7f, sizeof(minCost));
for(d = DMIN; d <= DMAX; d++)
{
VLIB_disparity_SAD_firstRow8
(
left+WINDOW_SIZE*W+DMAX+WS_BY_2,
rght+WINDOW_SIZE*W+DMAX+WS_BY_2-d,
pCost + (d - DMIN)*(W+ARRAY_PAD - DMAX - WS_BY_2),
minCost,
versum,
disparity+ (DMAX+WS_BY_2),
d, (W - DMAX - WS_BY_2), W, WINDOW_SIZE
);
}
rndx += 1;
for (i = 1; i < H; ++i)
{
memset(minCost, 0x7f, sizeof(minCost));
for(d = DMIN; d <= DMAX; d++)
{
VLIB_disparity_SAD8
(
left+rndx*W+(DMAX+WS_BY_2),
rght+rndx*W+(DMAX+WS_BY_2) -d,
pCost + (d - DMIN)*(W+ARRAY_PAD - DMAX - WS_BY_2),
minCost,
disparity+i*W + (DMAX+WS_BY_2),
d, (W- DMAX - WS_BY_2), W, WINDOW_SIZE
);
}
rndx += 1;
if (rndx + WS_BY_2 >= RBLINES)
{
readimage_rows8(left, leftIm8 , &rl,W, W,H, BLOCK_SIZE, WINDOW_SIZE);
readimage_rows8(rght, rghtIm8 , &rr,W, W,H, BLOCK_SIZE, WINDOW_SIZE);
rndx = WS_BY_2 + 1;
}
I