Canon EDSDK Liveview 的示例 C 代码?
是否有人拥有使用 Canon EDSDK 实现 LiveView 的示例 C 代码的工作片段?文档中的示例代码看起来很棒,直到您看到这一点:
//
// Display image
//
是的,就是这样。他们没有展示如何使用从相机检索的数据将图像 BLT 到窗口。他们只是说“显示图像”。谢谢,佳能。
我已经在互联网上搜索过(包括这个论坛),但我还没有找到一个 C 代码示例来展示如何做到这一点。我希望避免使用 MFC、VB、托管代码或 C#。当然可以在普通 C 中做到这一点,对吗? Vanilla C++ 也不错。
谢谢, 弗雷德·P
Is there anyone with a working piece of sample C code that implements LiveView using the Canon EDSDK? The sample code in the documentation looks great until you get to this bit:
//
// Display image
//
Yup, that's it. They don't show how to BLT an image to a window using the data retrieved from the camera. They just say, "Display image." Thanks, Canon.
I have hunted the Internet (including this forum), but I have yet to find a C code sample that shows how to do this. I'm looking to avoid MFC, VB, managed code, or C#. Surely it's possible to do this in vanilla C, right? Vanilla C++ is fine as well.
Thanks,
FredP
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有两个功能他们没有告诉您:
1)
EdsGetPointer
2)
EdsGetLength
这将为您提供分别指向 JPEG 流开头和大小的指针。
一旦您使用
LibJPEG Turbo
来解压缩,Libjpeg
就不够快。解压后,您可以使用
opencv
显示图像。There are two functions that they don't tell you about:
1)
EdsGetPointer
2)
EdsGetLength
This will give you a pointer to the beginning of the JPEG stream and the size respectively.
Once you have this use
LibJPEG Turbo
to decompress,Libjpeg
just isn't fast enough.Once you decompress, you can show the image using
opencv
.