Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

modify pixel of image with 1

hi, i have a image i want to modify it each pixel whose value is 0 with 1. how can i do in andrid.

i have done the same in matlab.

code - image(image==0)=1;

how can i do the same in opencv android.

thanks

modify pixel of image with 1

hi, i have a image i want to modify it each pixel whose of image having 0 value with 0.01. below is the code to replace the value 0 with 1. how can i do in andrid.

i have done the same in matlab.0.01. but it is not doing any thing.

code - image(image==0)=1;-

how can i do the same in opencv android.

for (int y=0; y<contrast.rows; y++)
{
        for (int x=0; x<contrast.cols; x++)
    {
    if(contrast.at<uchar>(y, x) ==0)
            contrast.at<uchar>(y, x) = 0.01;
    }
}

thanks

modify pixel of image with 10.01

hi, i have a image i want to modify it each pixel of image having 0 value with 0.01. below is the code to replace the value 0 with 0.01. but it is not doing any thing.

code -

for (int y=0; y<contrast.rows; y++)
{
        for (int x=0; x<contrast.cols; x++)
    {
    if(contrast.at<uchar>(y, x) ==0)
            contrast.at<uchar>(y, x) = 0.01;
    }
}

thanks

modify pixel of image with 0.01

hi, i have a image i want to modify it each pixel of image having 0 value with 0.01. below is the code to replace the value 0 with 0.01. but it is not doing any thing.

code -

for (int y=0; y<contrast.rows; y++)
{
        for (int x=0; x<contrast.cols; x++)
    {
    if(contrast.at<uchar>(y, x) ==0)
            contrast.at<uchar>(y, x) = 0.01;
    }
}

thanks