Is it possible to acquire and display real-time video from the VGA port of a notebook?

조회 수: 7 (최근 30일)
The video is acquired by a CCD-camera with a BNC port. By a BNC to VGA converter I can display video on a seperate monitor. I now want to display it directly in an axis on the MATLAB GUI which I have set-up to control the manufacturing system. Is there anyway to realize this? Thanks.

채택된 답변

Ben Mitch
Ben Mitch 2011년 5월 25일
There are mechanisms for doing real-time video capture, yes. AFAIK VGA streams are rarely used in this way.
If you have an analog signal (such as BNC or VGA) you would be looking for a "video capture card", which digitizes the analog stream. How you import this into Matlab will depend on the manufacturer of the card - usually, the card will ship with an SDK and include an API offered in C, so you can build a simple mex file which collects a frame from their driver on a fixed interval.
However, unless your application is tied in to a particular camera model, or requires particular camera characteristics (low light, high frame rate, for example) that are only available from a particular class of analog camera, I think it's much easier these days to start with a camera with a digital interface. Frames from many webcams can be captured using the Image Acquisition toolbox. Standard video streams (over firewire, USB) are accessible through generic OS-specific interfaces, which allows you to use much higher grade cameras (e.g. consumer DV or HD camcorders). Tools to access these interfaces from Matlab most likely already exist (see URL, below, for instance). Special purpose cameras (e.g. high speed or high resolution) typically provide their own API, and allow very simple frame import via a mex file that calls their API.
Note that for real-time capture, the HDMI interface (becoming standard on consumer HD cameras) is not currently suitable owing to high lag and poor real-time OS support. I speak from bitter experience. If you need not-so-great image quality and extremely low latency (or fairly high frame rate) I can't recommend enough the pairing of the PS3 Eye camera and the CLEye interface (google this). I am using this myself and it's top dog.
  댓글 수: 3
Ben Mitch
Ben Mitch 2011년 5월 25일
No, I am afraid I am not familiar with the capture card market. Here is an example http://bit.ly/jsCRYu but it is just that, an example - I know nothing about this card, it may be awful, and there are hundreds on the market. Most products will do adequate video capture; the key will be finding one with a suitable API for access from Matlab. This is a black art, and I strongly recommend searching out someone with prior experience. If they used a card with Matlab, and it worked, throw caution to the wind and buy that card ;).
If you are going to use the camera for real-time "control [of a] manufacturing system", your most important parameter may be latency - that is, how long between the shutter open time and the time a frame becomes available from the capture card driver. If the thing you are controlling is a slow process, this becomes less important, but for rapid processes it is critical. Unfortunately, manufacturers seldom quote this parameter since it is irrelevant for video logging and transcoding, the most common uses of video capture.
If latency is important to you, have a poke around the enthusiast forums for video capture. Someone there is most likely to be able to help you further.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by