imaqtool + firewire camera (dcam driver) = strange artefact (see picture)
1 次查看(过去 30 天)
显示 更早的评论
I am using Matlab 2012a 32bit, and I installed the dcam drivers from the imaqtoolbox. It recognizes my camera (Basler scout scA144-30fm, firewire via a National Instruments card) and sometimes works perfectly fine. But from time to time when I switch between the different resolutions and start the preview, I see this strange pattern of circles (see screenshot below, sometimes this mode works fine, the camera does support 1392x1040 pixels) instead of the actual picture. It's seems to appear quite randomly, sometimes the pattern stays no matter what mode I choose, sometimes it disappears when I choose one of the low resolution modes or when I restart matlab (but all this is not very reproducible...)
Any idea what the problem could be? Should I contact the Basler customer service for this (it cannot be a problem with the camera tough, it works perfectly fine under Labview 100% of the time).
Since I want to perform very sensitive measurements, it need the acquisition software to be working absolutely reliable...
1 个评论
回答(2 个)
David Tarkowski
2012-12-13
It looks like the Scout camera returns multi-byte data in little-endian format. This is somewhat common but the DCAM specification requires multi-byte data to be transmitted in big-endian format. Since the toolbox is expecting big-endian data, it is not able to correctly scale the image for preview.
Since this is somewhat common, the toolbox does provide a workaround. When you start MATLAB issues the command:
>> imaqmex('feature', '-useDCAMLittleEndian', true);
This tells the toolbox to expect the data in little-endian format. There could, however, be one further problem. The DCAM standard does not specify which bits are supposed to be used within the multi-byte data. That is, for a 12-bit camera the data could range from [0 4095] or [61440 65535] which results in a big gap between 0 and 61440. The toolbox has no control over this and may, therefore, still not be able to scale the image correctly for preview. The data returned by GETSNAPSHOT or GETDATA will be correct.
As to the available formats, the camera does have Y422 formats available. In these modes the U and V components are set to zero by the camera. This is presumable to allow client applications written in a language like C++ to use a common display routine across different camera models.
The formats that start with "F7" are "format 7" modes. According to the DCAM specification format 7 is the "partial scan mode". It allows for setting a hardware ROI which can increase the effective frame rate of the camera. It also has some other properties which can be useful in some situations. The Scout manual refers to these modes as "flexible" formats and has more information about what this means for the Scout cameras.
0 个评论
Image Analyst
2012-12-9
It's probably because it's 16 bit mode and the intensity is wrapping over the colormap. I don't know what the difference is between F7_y16 and Y16. You will have to contact Basler for that, probably. What happens if you use one of the 8 bit mode, like the last 4 modes on the list?
I see Y422 so this is probably a color camera, right? Funny that the don't have an RGB mode, and that there is no winvideo driver listed. Is this a Windows computer?
2 个评论
Image Analyst
2012-12-9
Images on the computer monitor can only be 8 bit. 16 bit images can be displayed, however they must be converted to 8 bit, either manually by your (your code), or automatically in the function (e.g. imshow).
另请参阅
类别
Test and Measurement
Image Acquisition Toolbox
Image Acquisition Toolbox Supported Hardware
DCAM Hardware
Image Processing and Computer Vision
Image Acquisition Toolbox
Image Acquisition Toolbox Supported Hardware
DCAM Hardware
Test and Measurement
Image Acquisition Toolbox
Image Acquisition Toolbox Supported Hardware
National Instruments Frame Grabbers
显示更多
在 Help Center 和 File Exchange 中查找有关 DCAM Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!