Revision: 40054
Updated Code
at January 28, 2011 16:22 by browny
Updated Code
// copy src image content to dst image
for (int j = 0; j < src->height; j++) {
uchar* pSrc = (uchar*) (src->imageData + j * src->widthStep);
uchar* pDst = (uchar*) (dst->imageData + j * dst->widthStep);
for (int k = 0; k < src->width; k++) {
for (int i = 0; i < 3; ++i) {
pDst [3 * k + i] = pSrc [3 * k + i];
}
}
}
Revision: 40053
Updated Code
at January 28, 2011 16:21 by browny
Updated Code
// copy src image content to dst image
for (int j = 0; j < src->height; j++) {
uchar* pSrc = (uchar*) (src->imageData + j * src->widthStep);
uchar* pDst = (uchar*) (dst->imageData + j * dst->widthStep);
for (int k = 0; k < src->width; k++) {
for (int i = 0; i < 3; ++i) {
if (i == 0)
pDst [3 * k + i] = pSrc [3 * k + i];
if (i == 1)
pDst [3 * k + i] = pSrc [3 * k + i];
if (i == 2)
pDst [3 * k + i] = pSrc [3 * k + i];
}
}
}
Revision: 40052
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 25, 2011 14:54 by browny
Initial Code
// src, rst are 2 IplImage
// copy src image content to rst image
for (int j = 0; j < src->height; j++) {
uchar* pImg = (uchar*) (src->imageData + j * src->widthStep);
uchar* pResult = (uchar*) (rst->imageData + j * rst->widthStep);
for (int k = 0; k < src->width; k++) {
for (int i = 0; i < 3; ++i) {
if (i == 0)
pResult[3 * k + i] = pImg[3 * k + i];
if (i == 1)
pResult[3 * k + i] = pImg[3 * k + i];
if (i == 2)
pResult[3 * k + i] = pImg[3 * k + i];
}
}
}
Initial URL
Initial Description
Initial Title
[OpenCV] IplImage Image pixel access method
Initial Tags
Initial Language
C++