如何使用 c++从图像采集卡采集数据
我们的实验室有一台“MC1362 相机”和一台“Inspecta-5”图像采集卡。 LABVIEW11中有一个程序可以从图像采集卡获取数据,但是由于Labview速度很慢,我的主管告诉我用C++编写一个程序来从图像采集卡获取数据。我不知道如何编写 C++ 程序来连接到图像采集卡并进行数据采集。我知道如何用 C++ 编写软件,但从未尝试过编程来连接到硬件并从中读取数据。是否有任何特定的库或框架可以帮助我,或者任何教程? 如果有人知道的话,请帮助我解决这件事。
更新:补充一下,我们正在进行医学图像分析,激光照射一个对象,因此相机会拍照并将其传递到计算机。我需要抓取图片并分析它们。
We have an "MC1362 Camera" and an "Inspecta-5" frame grabber in our lab. There is program in LABVIEW11 which gets the data from a frame grabber, however as the Labview is slow my supervisor has told me to write a program in c++ to get the data from the frame grabber. I have no idea how to write a c++ program to connect to a frame grabber and do the data acquisition. I know how to write software in c++, but have never tried programming to connect to hardware and read data from it. Is there any specific library or framework which can help me, or any tutorial?
Please, if anybody knows, help me in this matter.
Update:just to add, we are doing medical image analysis, and a laser illuminate a subject, so camera will take pictures and pass it to the computer. I need to grab the pictures and analysis them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您基本上有几个选项,
1 查看是否有用于采集卡的 SDK,如果有,这通常比选项 2 更容易,但当然仅限于与该采集卡或采集卡系列一起使用,我们这样做使用eurysys 采集卡的方式。
2 假设您在 Windows 平台上运行,实现 DirectShow filtergraph 并编写自己的输出过滤器来获取数据,DirectShow 的 SDK 非常好并且有很多示例。这种方法更加灵活,您应该能够使用多个采集器,但它也更加复杂,我们对 USB/其他一些内置采集器采用这种方法。
我们的软件是在 Delphi 7 中完成的,但它只是导入 DLL,对于 C++ 来说应该没有问题,而且大多数 SDK 都是围绕 C++ 编写的。
我知道它不多,但它是一个起点。
更新
刚刚在 Google 上快速搜索了一下,发现有一个适用于该 Grabber 的 SDK,乍一看它的接缝相当简单。
You basically have a couple of options,
1 see if there is an SDK for the grabber card, if there is this is usually easier then option 2 but is of course restricted to work with that grabber or familly of grabber cards, we do it this way with the eurysys grabber cards.
2 assuming you are running on a windows platform, implement a DirectShow filtergraph and write your own ouput filter to get the data, the SDK for DirectShow is quiet good and has many examples. This approach is far more flexible and you should be able to use a number of grabber but its also alot more complex, we do it this way for USB / some other inbuilt grabbers.
Our software is done in Delphi 7 but its just importing DLLs, for C++ should be no problem and most SDK's are written round C++ anyway.
I know its not much but its a place to start.
Update
Just done a quick Google search and there is an SDK for that Grabber and on first looks its seams fairly straight forward.