语言 C#
使用的SDK,https://github.com/thrixton/EDSDK.NET
使用相机Canon 760D
最近公司需求,需要控制相机拍照并把照片存储到电脑上用于智能视觉的分析。
简单调查发现佳能官方并没有提供开放相机控制SDK下载,需要去官网提交申请
在外网通过搜索后发现github有人开源了C#的SDK,下载后发现是可以正常使用的,简单的使用过程
sdkHandler = new SDKHandler();
List<Camera> OutCamList = sdkHandler.GetCameraList();
if (OutCamList.Count == 0)
{
Console.WriteLine("No camera");
return;
}
Camera camera = OutCamList.First();
sdkHandler.OpenSession(camera);
sdkHandler.SetSetting(PropID_SaveTo, (int)EdsSaveTo.Host);
sdkHandler.ImageSaveDirectory = "D:\\";
sdkHandler.SetCapacity();
sdkHandler.TakePhoto();
如果熟悉C#的话,编写软件速度还是很快的。
C# 佳能相机拍照code
https://download.csdn.net/download/suziguai/12493119