使用edsdk 2.8拍照并直接将图像保存到电脑
我是 EDSDK 2.8 的新手
目前,我的程序可以拍照。然而,当拍摄照片时,该照片会暂时存储在佳能相机的缓冲区中。我想知道如何将其目录保存到PC上?
有人有什么想法吗?或者 c# 或 vb.net 中的示例代码?
I'm new to the EDSDK 2.8
At the moment, my program can take pictures. However, when a picture is taken, that picture is temporarily stored in a buffer in the Canon camera. I would like to know how to save it directory to the PC?
Does anyone have any ideas? Or sample code in c# or vb.net?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我正在做同样的事情,因为我的相机中没有存储卡,并且想在发送拍照命令后将图像传输到主机。以下是当佳能 EOS50D 中未安装存储卡时调用
ObjectEventHandler
回调的方法。瞧,回调被调用,然后我可以继续执行 getCapturedItem() 函数,正如 Wayne 在之前的帖子中发布的那样。
I am doing the same in that I have no memory card in the camera and want to transfer the image to the host computer after the take picture command is sent. Here is what worked for me to get the
ObjectEventHandler
callback called when no memory card is installed in the Canon EOS50D.Voila, the callback gets called and I can then proceed to do the
getCapturedItem()
function as Wayne has posted in the earlier post.这是我所做的:
首先,您必须在创建对象(即图片)时注册回调事件。我在创建的 registerEvents 方法中执行了此操作:
objectEventHandler
是创建图片时将调用的方法。该方法需要符合 API 规定的接口。下面是该方法的一个示例实现:
在这个示例中,我转身并生成我自己的事件,该事件具有对流对象的引用。这是通过以下代码处理的:
Here is what I have done:
First, you have to register for the callback event when an object is created (ie, a picture). I did this in a registerEvents method that I created:
The
objectEventHandler
is the method that will be called when a picture is created.The method needs to conform to the interface dictated by the API. Here's an example implementation of that method:
In this example I turn around and spawn my own event, which has the reference to the stream object. This is handled by the following code: