C#中的WIA取景器 [英] WIA viewfinder in c#

查看:125
本文介绍了C#中的WIA取景器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试用c#编写程序来绑定佳能s3is数码相机.

当我连接相机时,似乎进入一种睡眠模式或连接模式,镜头缩回,并且取景器中没有图像,但我可以在资源管理器中看到相机.

我可以使用WIA进行拍照,打开相机,拍照,然后返回睡眠模式",所以我想这意味着它可以兼容wia.

现在,我需要在程序中使用实时取景器,但是我似乎找不到有关如何执行此操作的任何信息.

我尝试使用IWIAVideo的CreateVideoByWiaDevID,但它给出了异常HRESULT:0x80210015.显然这意味着设备不兼容或缺少,这很奇怪,因为我可以用它来拍照...

我确实可以使用canon SDK,但是我只是出于爱好而编程,所以我对C(SDK语言使用),指针,标头,回调和使用SDK似乎需要的所有其他东西都不熟悉.

i''m trying to write a program in c# for tethering a canon s3is digital camera.

When i connect the camera it seems to go into a kind of sleep mode or connection mode, the lens is retracted and no image in the viewfinder but i can see the camera in explorer.

I''m able to make it take pictures using WIA , the camera turns on , take a picture and goes back to ''sleep mode'' so i guess that would mean it''s wia compatible.

Now i need to have the live viewfinder work in the program but i can''t seem to find any info on how to do that.

i tried using CreateVideoByWiaDevID from IWIAVideo but it gives an exception HRESULT: 0x80210015. Apparently it means the device is not compatible or abscent which is weird cause i can take pictures with it...

I do have access to the canon SDK but i do programming for a hobby and i''m not familiar with C (the sdk language uses), pointers , headers , callback and all the other things that seems to be necessary to use the SDK

any help will be apreciated

推荐答案

我为佳能SDK编写了一个C#包装器,这是Code Project上的一篇文章.只需搜索佳能.它可能已经过时了很多,但是如果您想更新它,或者只是看看它是否有效,这可能是前进的方向.假设它是相同的SDK.

当我尝试使用WIA而不是该SDK时,我所能做的就是拍照,不使用取景器等.SDK允许我设置所有相机设置,缩放,预览等.
I wrote a C# wrapper for the Canon SDK, it''s an article here on Code Project. Just search for Canon. It''s probably quite a bit out of date, but it could be the way forward if you wanted to update it, or just see if it works. That''s assuming it''s the same SDK.

When I tried using WIA instead of that SDK, all I could do was take pictures, no viewfinder, etc. The SDK let me set all camera settings, zoom, preview, etc.


这篇关于C#中的WIA取景器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆