摘要: #include "stdafx.h"#include <atltime.h>#include <highgui.h>int main(){ int c; CTime time; IplImage *img; CvCapture* capture = cvCaptureFromCAM(1); cvNamedWindow("mainWin", CV_WINDOW_AUTOSIZE); cvMoveWindow("mainWin", 50, 50); while(1) { img=cvQueryFrame(capt 阅读全文
posted @ 2012-06-04 20:42 Epirus 阅读(4849) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include "cv.h"#include "highgui.h"CvRect box;bool drawing_box=false;void draw_box(IplImage* img,CvRect rect){ cvRectangle(img,cvPoint(box.x,box.y),cvPoint(box.x+box.width,box.y+box.height),cvScalar(0xff,0x00,0x00));}void my_mouse_callback(int event , 阅读全文
posted @ 2012-06-04 20:08 Epirus 阅读(1620) 评论(0) 推荐(0) 编辑
摘要: #include<stdlib.h>void DivArray(int *pArray,int size){}void main(){int arr[5]={1,2,3,4,5};DivArray(arr,,5);} 阅读全文
posted @ 2012-06-02 19:07 Epirus 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 我觉得在做MFC的时候最好不要破坏原来的东西,所以自己的代码都写到头文件中这样子好管理,这也是为什么类的成员函数可以再类外进行设计,这样子方便多人进行编程,然后只要将自己的头文件放在一起即可: 如果你是做全局的函数,类内是可以调用的,那门只要你将自己的函数放到对应的头文件中即可,有一个缺点就是不能调用类内的成员函数,或成员变量,所以这样对编程没有什么很大的意义。 所以就需要将函数声明为类内的成员变量,这样子方便对类内的数据进行处理: 那么若何做类内的函数声明,就是可以再对应的**Dlg.h的头文件的public:下加入对应的函数声明。step1:CMyLLKDlg.hclass CM... 阅读全文
posted @ 2012-05-31 21:39 Epirus 阅读(4754) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include "cv.h"#include "highgui.h"int main(){ IplImage* image=cvLoadImage("test.jpg"); int x=200; int y=200; int width=200; int height=200; int add=150; cvSetImageROI(image,cvRect(x,y,width,height)); cvAddS(image,cvScalar(add),image);// cvR 阅读全文
posted @ 2012-05-30 22:38 Epirus 阅读(251) 评论(0) 推荐(0) 编辑