使用 MATLAB 操作相机时出现分段错误
我正在使用 Matlab 来操作相机。 它是IDT SharpVision相机,我使用的是该公司提供的Matlab接口。 当我尝试获取图像时,出现分割错误。 我尝试通过为图像创建一个空数组来预分配内存,但这不起作用。
这是导致段错误的代码行:
[nResult, x] = sharpML('IdtSvAcquire',cameraId);
sharpML.dll 包含一个用于控制相机的 MEX 文件。
以下是错误消息堆栈跟踪的选择:
[0] QCamChildDriver.dll:0x160fdde4(0x0f99ef08, 15, 0x00ced938, 0x00ced938)
[1] QCamDriver.dll:0x0f9c1dd8(4146, 0x00ced938, 0x00ced924, 0x11283430)
[2] SharpML.dll:0x0f991d8c(2, 0x00cedf88, 2, 0x00cedfe8)
[3] SharpML.dll:0x0f991448(2, 0x00cedf88, 2, 0x00cedfe8)
...
[35] MATLAB.exe:0x00403bd2(1109972, 0, 0x7ffd9000, 0x805512fa)
[36] kernel32.dll:0x7c817077(0x00403daf, 0, 0x78746341, 32)
有什么建议吗? 制造这款相机的公司已经倒闭了。
〜亚当
I am using Matlab to operate a camera. It is an IDT SharpVision camera, and I am using the Matlab interface provided by the company. When I try to acquire an image, I get a segmentation fault. I have tried preallocating memory by creating an empty array for the image, but this does not work.
This is the line of code that causes the seg fault:
[nResult, x] = sharpML('IdtSvAcquire',cameraId);
sharpML.dll includes a MEX file for controlling the camera.
Here is a selection from the error message stack trace:
[0] QCamChildDriver.dll:0x160fdde4(0x0f99ef08, 15, 0x00ced938, 0x00ced938)
[1] QCamDriver.dll:0x0f9c1dd8(4146, 0x00ced938, 0x00ced924, 0x11283430)
[2] sharpML.dll:0x0f991d8c(2, 0x00cedf88, 2, 0x00cedfe8)
[3] sharpML.dll:0x0f991448(2, 0x00cedf88, 2, 0x00cedfe8)
...
[35] MATLAB.exe:0x00403bd2(1109972, 0, 0x7ffd9000, 0x805512fa)
[36] kernel32.dll:0x7c817077(0x00403daf, 0, 0x78746341, 32)
Any suggestions? The company that makes the camera has since gone out of business.
~ Adam
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这听起来像是驱动程序问题,因为故障发生在这里:
QCamChildDriver.dll:0x160fdde4(0x0f99ef08, 15, 0x00ced938, 0x00ced938)
一个可能的问题 - 驱动程序可能与您的操作系统冲突,特别是如果您运行的是 Vista 或任何 64 位操作系统位操作系统。
如果是驱动程序问题,即使该公司已经消失,您也可以在网上找到更新的驱动程序。
除此之外,除非您能找到 scrapML 和/或驱动程序的 C 源代码,否则您可能会陷入困境。
This sounds like a driver issue since the fault is occurring here:
QCamChildDriver.dll:0x160fdde4(0x0f99ef08, 15, 0x00ced938, 0x00ced938)
One possible issue - the driver might be in conflict with your OS, especially if you are running Vista or any 64 bit OS.
If it is a driver issue, you might be able to find updated drivers somewhere on line, even if the company is gone.
Other than that you might be up a creek, unless you can find the C-source for scratchML and/or the driver.
问题已解决:
我重新安装了相机软件和相关的 QCam 驱动程序,并清理了其他一些错误。
Problem solved:
I reinstalled the camera software and relevant QCam drivers, along with cleaning up a few other bugs.
如果您的相机使用火线,您可以尝试使用这个工具。
If your camera uses firewire, you could try to use this tool.