Why am I getting horizontal scanline distortions in the images acquired using Image Acquisition Toolbox 4.2 (R2011b)?

1 view (last 30 days)
I am using a frame grabber with the winvideo adaptor to acquire images using the Image Acquisition Toolbox 4.2 (R2011b). However, the frames acquired by MATLAB comes out distorted, with horizontal scanline like artifacts in the image. It also comes out distorted using AMCAP. See the top image below:
However, if I use the manufacturer's driver software, I get the clean image as shown below:
How can I fix this in MATLAB?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Oct 2013
When using an analog camera with frame grabber, this may be an issue with the PAL versus NTSC format.
The PAL format is an old poor quality format and is the one most likely giving the distortions. Switching to the NTSC format, as outlined below, should fix such distortions. The manufacturer's driver was most likely defaulting to the NTSC format, thus displaying the clear frame.
You should be able to set the better format by code similar to below:
%obtain video input object (the frame grabber)
vid= videoinput('winvideo', 1);
%obtain video source object (the camera)
src= getselectedsource(vid);
%check the format of the source, which should return PAL
get(src, 'AnalogVideoFormat')
%set the format of the source to NTSC
set(src, 'AnalogVideoFormat', 'ntsc_m');
Please note that different cameras and devices use slightly different naming conventions for the formats. Such as, in this case, the NTSC format is referred to as 'ntsc_m' and the PAL format is referred to as 'pal_b'. Please run IMAQSUPPORT with the devices connected, and the output text file should list possible options under 'AnalogVideoFormat' field of the specific device.

More Answers (0)

Products


Release

R2011b

Community Treasure Hunt

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

Start Hunting!