89 for (
int i = 0; i < max; i += 3)
91 unsigned char temp = pixels[i];
92 pixels[i] = pixels[i + 2];
101 const int max = pImage->
width * pImage->
height * 3;
103 for (
int i = 0; i < max; i += 3)
105 unsigned char temp = pixels[i];
106 pixels[i] = pixels[i + 2];
107 pixels[i + 2] = temp;
111 cvReleaseImageHeader(&pIplImage);
int width
The width of the image in pixels.
COpenCVWindow(int nWidth, int nHeight, const char *pWindowName)
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
unsigned char * pixels
The pointer to the the pixels.
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
int height
The height of the image in pixels.
ImageType type
The type of the image.
std::string m_sWindowName
void DrawImage(const CByteImage *pImage, int x=0, int y=0)
IplImage * Adapt(const CByteImage *pImage, bool bAllocateMemory=false)
Converts a CByteImage to an IplImage.