Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you should not do anything per pixel, but process whole rows at a time:

for(int i=0; i<image.size(); i++) 
{
    Mat wb = (w[i] - b[i]) * 0.9;
    for (int j=0; j<images[i].rows; j++)
    {
        image[i].row(j) = (image[i].row(j) - b[i]) / wb;
    }    
}

you should not do anything per pixel, but process whole rows at a time:

for(int i=0; i<image.size(); i++) 
{
    Mat wb = (w[i] - b[i]) * 0.9;
    for (int j=0; j<images[i].rows; j++)
    {
       divide( image[i].row(j) - b[i], wb,  image[i].row(j) = (image[i].row(j) - b[i]) / wb;
);
    }    
}

you should not do anything per pixel, but process whole rows at a time:

for(int i=0; i<image.size(); i++) 
{
    Mat wb = (w[i] - b[i]) * 0.9;
    for (int j=0; j<images[i].rows; j++)
    {
       divide( image[i].row(j) - b[i], wb,  (image[i].row(j) image[i].row(j) );
    }    
}