implementation algorithm
Dear all,
I have a question for cvFlip function in C. I implemented horizontal cvFlip function algorithm. But, the problem is that the speed is slower than using dll file from opencv. I just implemented same algorithm and did not use function call.
Could any one explain this? The implementation is
for( ii = 0; ii < ROIWidth3; ii++ ) for( kk = 0; kk < 2; kk++ )
tab[ii2 + kk] = (int)((ROIWidth3 - ii - 1)2 + kk);
for( ; ll < ROIHeight3; ll++, imageArray3+= ROIWidth32, imageArray3_1+= ROIWidth32) {
for( ii = 0; ii < (int)(ROIWidth3 + 1); ii++ ) { jj = tab[ii]; temp3 = imageArray3[ii], temp31 = imageArray3[jj]; imageArray3_1[ii] = temp31; imageArray3_1[jj] = temp3; } }
imageArray3_1 -= ROIHeight3ROIWidth3;
imageArray3 -= ROIHeight3ROIWidth3;
Sincerely, Taiyoon Lee
Re-format and rephrase your question.
Could you please explain why you would code your own cvFlip function, if it is provided by OpenCV? All OpenCV functions are highly optimized for use with TBB and other parallel processing tools. This is probably the reason why you don't get the same performance.