1 | initial version |
Hi,I use Mat format. If you have a gray picture & change a pixel. like:
image.at<uchar>(i,j)=valve// where i is image row & j is image cols.
if you want to change all picture value:
for(int y = 0; y < image.row; y++)
for(int x = 0 < image.col; x++)
{
..............
imageB.at<uchar>(i,j)=operator(image.at<uchar>(i,j))//where operator is image processing algorithm
............
}
& please ref:http://docs.opencv.org/modules/core/doc/basic_structures.html
If you want lower cost time. I think you should ref opencv code:SSE & AVX or CUDA
2 | No.2 Revision |
Hi,I use Mat format. If you have a gray picture & change a pixel. like:
image.at<uchar>(i,j)=valve// where i is image row & j is image cols.
if you want to change all picture value:
for(int y = 0; y < image.row; y++)
for(int x = 0 < image.col; x++)
{
..............
imageB.at<uchar>(i,j)=operator(image.at<uchar>(i,j))//where operator is image processing algorithm
............
}
& please ref:http://docs.opencv.org/modules/core/doc/basic_structures.htmlref Mat::isContinuous and other Mat operator :http://docs.opencv.org/modules/core/doc/basic_structures.html
If you want lower cost time. I think you should ref opencv code:SSE & AVX or CUDA
3 | No.3 Revision |
Hi,I use Mat format. If you have a gray picture & change a pixel. like:
image.at<uchar>(i,j)=valve// where i is image row & j is image cols.
cols & 0<=value<=255
if you want to change all picture value:
for(int y = 0; y < image.row; y++)
for(int x = 0 < image.col; x++)
{
..............
imageB.at<uchar>(i,j)=operator(image.at<uchar>(i,j))//where imageB.at<uchar>(i,j)=saturate_cast<uchar>(operator(image.at<uchar>(i,j)))
//where operator is image processing algorithm
............
}
& please ref Mat::isContinuous and other Mat operator :http://docs.opencv.org/modules/core/doc/basic_structures.html
If you want lower cost time. I think you should ref opencv code:SSE & AVX or CUDA
4 | No.4 Revision |
Hi,I use Mat format. If you have a gray picture & change a pixel. like:
image.at<uchar>(i,j)=valve// where i is image row & j is image cols & 0<=value<=255
if you want to change all picture value:
for(int y = 0; y < image.row; y++)
for(int x = 0 < image.col; x++)
{
..............
imageB.at<uchar>(i,j)=saturate_cast<uchar>(operator(image.at<uchar>(i,j)))
imageB.at<uchar>(x,y)=saturate_cast<uchar>(operator(image.at<uchar>(x,y)))
//where operator is image processing algorithm
............
}
& please ref Mat::isContinuous and other Mat operator :http://docs.opencv.org/modules/core/doc/basic_structures.html
If you want lower cost time. I think you should ref opencv code:SSE & AVX or CUDA
5 | No.5 Revision |
Hi,I use Mat format. If you have a gray picture & change a pixel. like:
image.at<uchar>(i,j)=valve// where i is image row & j is image cols & 0<=value<=255
if you want to change all picture value:
for(int y = 0; y < image.row; y++)
for(int x = 0 < image.col; x++)
{
..............
imageB.at<uchar>(x,y)=saturate_cast<uchar>(operator(image.at<uchar>(x,y)))
imageB.at<uchar>(y,x)=saturate_cast<uchar>(operator(image.at<uchar>(y,x)))
//where operator is image processing algorithm
............
}
& please ref Mat::isContinuous and other Mat operator :http://docs.opencv.org/modules/core/doc/basic_structures.html
If you want lower cost time. I think you should ref opencv code:SSE & AVX or CUDA