矩阵的困惑

来源:互联网 发布:samba linux 64位下载 编辑:程序博客网 时间:2024/06/06 10:00

// MyTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <cv.h>
#include <cvcam.h>
#include <cxcore.h>
#include <highgui.h>

 

#pragma comment(lib,"cv.lib")
#pragma comment(lib,"cvcam.lib")
#pragma comment(lib,"cxcore.lib")
#pragma comment(lib,"highgui.lib")

int main(int argc, char* argv[])
{
 float vals[] = {0.8025, -0.500, 0.500, 0.8625};

 CvMat rotmat;

 cvInitMatHeader(
 &rotmat,
 2,
 2,
 CV_32FC1,
 vals
 );

 for (int i =0; i < 2; i++ )
 {
  for (int j = 0; j < 2; j++)
  {
   printf("%f/n",cvGet2D(&rotmat,i,j));
  }
 }


 return 0;
}

 

原创粉丝点击