1、畫線:
#include <cv.h>
#include <highgui.h>
IplImage *ShowImage;
CvPoint BeginPoint,EndPoint;
CvScalar Color;
int Thickness;
int main() {
CvSize ImageSize = cvSize(1000,700);
ShowImage= cvCreateImage(ImageSize,IPL_DEPTH_8U,3);
BeginPoint= cvPoint(100,100);
EndPoint= cvPoint(800,600);
Color=CV_RGB(255,0,0);
Thickness=3;
cvLine(ShowImage,BeginPoint,EndPoint,Color,Thickness);
cvNamedWindow("cvLineTest",1);
cvShowImage("cvLineTest",ShowImage);
cvWaitKey(0);
}
#include <cv.h>
#include <highgui.h>
IplImage *ShowImage;
CvPoint BeginPoint,EndPoint;
CvScalar Color;
int Thickness;
int main() {
CvSize ImageSize = cvSize(1000,700);
ShowImage= cvCreateImage(ImageSize,IPL_DEPTH_8U,3);
BeginPoint= cvPoint(100,100);
EndPoint= cvPoint(800,600);
Color=CV_RGB(255,0,0);
Thickness=3;
cvLine(ShowImage,BeginPoint,EndPoint,Color,Thickness);
cvNamedWindow("cvLineTest",1);
cvShowImage("cvLineTest",ShowImage);
cvWaitKey(0);
}
