#include "cv.h"
#include "highgui.h"
#include <iostream>
using namespace std;
CvVideoWriter* video=NULL;
FILE* pFile;
IplImage* RgbToYUV420(IplImage* pImage)
{
//cout<<"number of channels:"<<pImage->nChannels<<" width step:"<<pImage->widthStep<<endl;
cout<<"width:"<<pImage->width<<" height:"<<pImage->height<<endl;
//cout<<"order of data:"<<pImage->dataOrder<<endl;
//cout<<"channel sequence:"<<pImage->channelSeq<<endl;*/
int width=pImage->width;
int height=pImage->height;
int yuvSize=width*height*3/2;
char* pRgbBuf=pImage->imageData;
char* pYBuf,*pUBuf,*pVBuf;
char* pYUVBuf;
#include "highgui.h"
#include <iostream>
using namespace std;
CvVideoWriter* video=NULL;
FILE* pFile;
IplImage* RgbToYUV420(IplImage* pImage)
{
//cout<<"number of channels:"<<pImage->nChannels<<" width step:"<<pImage->widthStep<<endl;
cout<<"width:"<<pImage->width<<" height:"<<pImage->height<<endl;
//cout<<"order of data:"<<pImage->dataOrder<<endl;
//cout<<"channel sequence:"<<pImage->channelSeq<<endl;*/
int width=pImage->width;
int height=pImage->height;
int yuvSize=width*height*3/2;
char* pRgbBuf=pImage->imageData;
char* pYBuf,*pUBuf,*pVBuf;
char* pYUVBuf;