资源简介
Opencv摄像头校正代码,可以直接运行,仅供参考!
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.xml;
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using Emgu.Util;
namespace Camera_Calibration_EmguCV
{
public partial class Form1 : Form
{
private delegate void SetTextCallback (Control control string text); //delegate declaration
#region declaring global variables
private MCvPoint3D32f[][] object_corner; //points in world coordinate
private PointF[][] corner_count; //points in image coordinate
private IntrinsicCameraParameters intrinsicParam = new IntrinsicCameraParameters(5); //camera intrinsic
private ExtrinsicCameraParameters[] extrinsicParams; //camera extrinsic
private Matrix mapx = new Matrix(height width); //mapping matrix
private Matrix mapy = new Matrix(height width);
private MCvTermCriteria criteria=new MCvTermCriteria (1001e-5);
private Capture capture1;
private const int width = 640; //camera resolution
private const int height = 480;
private Size imageSize = new Size(width height);
private Size patternSize; //corner pattern
private int nPoints; //number of corners
private int nImage; //number of images which use to calibrate
private float square; //the actual size of square (mm)
private bool captureInProcess; //the process sign of camera
private bool isCalibrating; //the sign of calibrating
private bool isCalibrated; //the sign of calibrated
Image imageframe1;
Image grayframe1;
private bool isCorners; //the var is ture when there is corners file in local
Thread newThread; //thread of calibrating
#endregion
public Form1()
{
InitializeComponent();
controlsInit();
}
private void controlsInit()
{
Corners_Nx.Text = “12“;
Corners_Ny.Text = “8“;
Square_Size.Text = “20“;
Image_Count.Text = “20“;
radio_camera.Checked = true;
isCalibrating = false;
isCalibrated = false;
captureInProcess = false;
isCorners = false;
Start_Calibrate.Enabled = false;
Exit_Calibrate.Enabled = false;
}
private void Processframe(object sender EventArgs arg)
{
imageframe1 = capture1.Queryframe();
grayframe1 = imageframe1.Convert();
if (!isCalib
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\
目录 0 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\
文件 897 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV.sln
文件 50688 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV.suo
目录 0 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\
文件 4113 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Camera Calibration EmguCV.csproj
文件 222 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Camera Calibration EmguCV.csproj.user
文件 22113 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Form1.Designer.cs
文件 25903 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Form1.cs
文件 5698 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Form1.resx
文件 485 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Program.cs
目录 0 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Properties\
文件 1364 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Properties\AssemblyInfo.cs
文件 2830 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Properties\Resources.Designer.cs
文件 5496 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Properties\Resources.resx
文件 1081 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Properties\Settings.Designer.cs
文件 242 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\Properties\Settings.settings
目录 0 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\
目录 0 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\
文件 48640 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\Camera Calibration EmguCV.pdb
文件 479 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\Camera Calibration EmguCV.vshost.exe.manifest
文件 126976 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\Emgu.CV.UI.dll
文件 331776 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\Emgu.CV.dll
文件 32768 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\Emgu.Util.dll
文件 307200 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\ZedGraph.dll
文件 256840 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\cudart32_65.dll
文件 1012224 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\opencv_calib3d2410.dll
文件 4245504 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\opencv_core2410.dll
文件 741376 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\opencv_features2d2410.dll
文件 526848 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\opencv_flann2410.dll
文件 2160640 2015-08-27 07:43 Camera-Calibration-by-EmguCV-master\Camera Calibration EmguCV\Camera Calibration EmguCV\bin\Debug\opencv_highgui2410.dll
............此处省略17个文件信息
评论
共有 条评论