imaqtool + firewire camera (dcam driver) = strange artefact (see picture)

1 visualización (últimos 30 días)
Felix
Felix el 9 de Dic. de 2012
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...

Respuestas (2)

David Tarkowski
David Tarkowski el 13 de Dic. de 2012
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.

Image Analyst
Image Analyst el 9 de Dic. de 2012
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 comentarios
Felix
Felix el 9 de Dic. de 2012
Editada: Felix el 9 de Dic. de 2012
It's a monochrome camera, also I find these names Y F7 etc quite strange, they are not called like that under winvideo (its a windows computer), for some reason winvideo disappeared after installation of dcam. I guess I will uninstall dcam, as I don't really see an advantage over winvideo, and I think there were no problems with it. is it possible to set the preview window to 16bit?
Image Analyst
Image Analyst el 9 de Dic. de 2012
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).

Iniciar sesión para comentar.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by