Digital Video Recorder with Motion JPEG using LabVIEW and IMAQ Products
Author(s):
Holger Lehnich - Martin-Luther-University Halle-Wittenberg
H.D. Pauer - Martin-Luther-University Halle-Wittenberg
Ursula Muller-Werdan - Martin-Luther-University Halle-Wittenberg
G. Kaltenborn - Martin-Luther-University Halle-Wittenberg
Industry:
Life Science
Products:
Vision, LabVIEW
The Challenge:
Determination of time dependent features in motion pictures.
The Solution:
On-line digital recording with Motion JPEG. Off-line image analysis.
"An important benefit of using LabVIEW is the ability to call Dynamic Link Libraries (DLL)."
Introduction
The identification of motions in a sequence of grey colour images is a frequent problem in medical research. If the on-line motion analysis is not necessary, the unambiguous chronological assign to every single image is sufficient. CCD-Cameras or analogue VCR in CCIR or RS 170 norm are conventionally used as image sources. The acquisition time varies from 1 to 60 minutes. These medical terms of reference form the basic of the technical demands on the image acquisition system.
System Hardware
- Sony CCIR CCD-Camera
- Grundig analogue VCR
- PCI 1407 Frame grabber
- PC 500 MHz Pentium III
- Dual processor system
- Intel BX Chip set
- 128 Mbytes RAM
- UW-SCSI Bus
The digitised video signal is displayed on the PC monitor (768*576 pixel 25 frames /s). Therefore no additional analogue monitor is required to control the sharpness or the brightness of the image.
System Software
- Windows NT 4.0
- LabVIEW 5.1
- IMAQVision 5.0
- Intel JPEG Library
Within a cycle of 40 ms the software has to manage the following tasks:
- Acquire the image
- Display it on the PC monitor
- Compress and write to file
The standard VI from the IMAQ Vision Library ‘Write JPEG File’ is the only one with compression functionality, but not fast enough to compress the images in real time ( 150 ms for 768*576 pixel ). To avoid the file handling in every cycle, the destination of the JPEG byte stream should be the memory and not a file. But there is no VI in the IMAQ Vision library, containing these properties. Nevertheless, the application of the JPEG standard is suitable for the compression of sequences. No frame differencing or motion estimation is used. This makes frame accurate analysing with-out any loss of image quality possible. So the goal was to create an encoder VI and a decoder VI using the JPEG still image compression standard.
LabVIEW Calls Intel
An important benefit of using LabVIEW is the ability to call Dynamic Link Libraries (DLL). In search of a JPEG compres-sion algorithm, we found the Intel JPEG Library ( IJL ). The IJL contains a DLL that pro-vides high performance JPEG encoding and decoding of full colour and grey scale images. The IJL was designed for use on Intel processor based systems and has been tuned for high performance ( MMX ) and efficient memory usage. It is available for free at http:/developer.intel.com .
This DLL makes conversion to and from JPEG simpler by working on a DIB byte format. This makes it easier to use for LabVIEW programmers than the Independent JPEG Group’s C code ( www.ijg.org ), since the input and output format in memory is a standard Windows format. Figure 2 shows the LabVIEW diagram of the realised JPEG encoder, containing some non-standard VI’s. The SetProps and GetProps VI’s write or read the JPEG Core Properties, serving as parameter passing. The VI’s IJLinit, IJLfree, IJLwrite and IJLread call the DLL functions of the same name. That shows, no C code ( CIN ) is necessary to develop the JPEG encoder and decoder ( see Figure 3 ). But how time consuming is the IJL compression algorithm ?
Benchmarks
Using the VI Performance Pro-filer, the following VI Times were measured on different PC systems for encoding one frame with a resolution of 768*576 pixel and 8 bit grey level.
- Pentium II 233 MHz Dual
- FSB 66 MHz 110 ms
- Pentium II 333 MHz Single
- FSB 66 MHz 89 ms
- AMD K6-2 333 MHz Single
- FSB 100 MHz 80 ms
- Pentium III 500 MHz Dual
- FSB 100 MHz 47 ms
- all systems: 128 Mbytes RAM
The selected JPEG image quality has no effect on the VI Time, only the size of the compressed byte stream is changing. As can be seen from the benchmarks a fully sized digital recording system, using LabVIEW and the IJL DLL, may be possible soon. To keep real time conditions JPEG images are currently scaled to ½ . The created large binary files can be saved cost effectively to DVD RAM.
Conclusion
Using LabVIEW and IMAQ products, we were able to develop a digital video recorder in a very short time. The high performance of PC technology makes it possible to create inexpensive real time applications based on Virtual Instruments.
Related Case Studies
EMC Test Automation Using Motion and VisionAutomated Analysis of Ultrasound Images
NI LabVIEW, IMAQ Vision Deliver Telepathology Microscope Control to Medical Clinics Via High-Speed Internet Connections
Taking Dimensional Tolerance Measurements of High-End Steel Plates with NI LabVIEW, IMAQ Vision
Innovative Visual Quality Control of Wood-Wool Slabs Using NI LabVIEW and IMAQ Vision
|
|
