最終更新: mikk_ni3_92 2009年11月20日(金) 16:31:08履歴
現在地 >> メニュー >> OpenCV >> CvMat編02 >> CvMat編02::まとめ4
#include <iostream> #include <cv.h> #include <highgui.h> //-------- メイン関数 ---------// int main() { CvMat *matA = cvCreateMat(400,400,CV_32FC1); cvSetZero(matA); for(int row = 50;row <100;++row) { for(int col = 100;col < 150;++col) { CV_MAT_ELEM(*matA,float,row,col) = 255; } } cvNamedWindow("CV_MAT_ELEM"); cvShowImage("CV_MAT_ELEM",matA); cvWaitKey(); cvReleaseMat(& matA); cvDestroyAllWindows(); return 0; }