1 | initial version |
Yes it makes difference and should use pointer in loops
int i,j;
uchar* p;
for( i = 0; i < nRows; ++i)
{
p = I.ptr<uchar>(i);
for ( j = 0; j < nCols; ++j,p++)
{
*p = table[*p];
}
}
If you want to improve code you can use ParallelLoopBody. Reading your code I think all is already written in LUT functions
2 | No.2 Revision |
Yes it makes difference and you should use pointer in loops
int i,j;
uchar* p;
for( i = 0; i < nRows; ++i)
{
p = I.ptr<uchar>(i);
for ( j = 0; j < nCols; ++j,p++)
{
*p = table[*p];
}
}
If you want to improve code you can use ParallelLoopBody. Reading your code I think all is already written in LUT functionsfunction