A Brief Analysis of the Software Structure of the Monitoring Image Processing System

Publisher:Amy啊111111Latest update time:2010-07-05 Source: 安防知识网Keywords:Monitoring Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Functions of the imaging software system

In the current computer memory-oriented image processing system, Windows operating system, PCI bus, single-screen operation mode are generally used, and image communication technology is integrated. The current image software system should generally have the following functions:

1. Image input and output

Image input mainly includes image input from cameras, scanners, and digital cameras; image output mainly includes image output from printers, video copiers, and monitors. To embed input and output devices into the image software system to complete the image input and output functions, it is necessary to call or install the device drivers of these devices.

2. Storage and loading of image files

The storage of image files is to store the image in the frame memory or memory on the disk, and the loading of image files is to transfer the image files in the disk into the frame memory or memory. There is the problem of image file format here, and the general BMP format is often used.

3. System management

System management can be considered as controlling the working status of the image hardware system, such as switching between input and output channels, and selecting storage media.

4. Image processing

There are many types of image processing, and major categories are often used as the contents of the first-level menu, such as grayscale transformation, image editing, image measurement, image enhancement, etc.

5. Image communication

Image communication includes sending and receiving images, and often involves image compression and transmission. It is generally divided into static image compression and transmission and dynamic image compression and transmission. There are two types of image data sources for image compression and transmission: image data from the hard disk; image data from the hardware image system.

Hierarchical structure of image software system

Usually, the image software system is constructed in layers. Figure 1 shows the layered structure of the image software system. The dotted box in the figure is the image software system, where the bottom layer is the hardware driver layer, which mainly solves the connection problem with the hardware, the middle layer is the processing layer, which implements various algorithms, and the top layer is data storage and communication.

Generally speaking, there are three ways to drive hardware devices:

Provide high-level language calling subroutines;

Provide installable device drivers;

Provides universal device drivers.

In Windows operating system, users can directly install drivers for printers, scanners and other devices. Because Windows operating system already includes many peripheral device drivers, it is very convenient for users.

Hardware device drivers for image software systems

The hardware device driver of the image software system must complete the following tasks:

·Operation of device configuration space on the PCI bus;

· Operations on the internal registers of SAA7146;

Initialization of the video front-end subsystem;

Maintenance of PC hardware interrupts;

·Getting the video image data buffer;

Real-time display of video images;

·The overall software structure and implementation of special functions.

[page]

From the data processing flow of the entire system, we can see that the image data buffer located in the host is the transfer link of the data flow from the external dedicated hardware platform to the general processing platform inside the host. The external image data is written to the buffer through the PCI bus interface control chip, and the internal software needs to read the data from the buffer for processing and display.

Figure 1. Hierarchical structure of image software system

The display problem of video image data is currently realized by using the Windows API function SetDIBitsToDevice to transfer image data from the buffer to the display device. The hardware functions of most graphics cards support SetDIBitsToDevice. When the hardware does not support it, Windows will provide the SetDIBitsToDevice function simulated by software. Due to the unified specification, there is no need to care about the specific details of the selected graphics card, and the problem of display mode is also solved. Since the transmission of image data is completed by the graphics card hardware, it can achieve good results.

The basic structure of Windows image software system

In Windows operating system and single screen mode, to process images, images must be loaded into memory. When physical memory is insufficient, the system uses memory paging to simulate memory using hard disk space. The application uses unified system memory management, simple code, easy maintenance, and automatic scalability.

When an image is put into memory as a processing object, a data structure must be used to describe it, which is the image data structure. For any image application, image data is always the core part of the application data.

Almost all functions of the application are carried out around it. For example, file reading and writing, scanning, shooting, processing, displaying, printing, etc., all require the establishment and access of image data, and are actually centered on the core of the image data structure. Even the simplest image display software requires two major parts: image file reading and image display.

An image software system, including different image processing algorithms, image display, scanner or camera support, image acquisition card support, image file format conversion, etc., all involve image data structures. If we build a basic structure of a Windows image software system with image data structures as the core, we have established a complete software image environment.

The image infrastructure includes the image data structure core and the peripheral modules built around this core. The image data structure core is in the center. The peripheral modules include image file format support, image display, image processing, etc.

During the design process, pay attention to the following issues:

[page]

The core part of the image infrastructure is completed in C/C++ language. Because C/C++ language has high compilation efficiency and fast execution speed, it is very critical for image applications that need to process large amounts of data; and C/C++ language is very flexible, so the image infrastructure can be implemented efficiently, while using other languages ​​to implement some of the same functions may take a lot of effort; C/C++ language is highly portable and can be ported to almost any hardware and operating system.

The internal implementation of the image infrastructure can use C++, but the external interface must use the C interface. Because there is no unified standard for the name resolution method of C++, the names obtained by C++ compilers from different companies for the same C++ symbol may be completely different, so the target files generated by different C++ compilers cannot be correctly connected. This makes the application of dynamic link libraries (DLLs) with C++ interfaces in Windows systems not feasible, so there is no such problem when using C language for external interfaces.

Avoid using platform-dependent declarations, functions, etc. to maintain the portability of the core. The image core definition and code only use standard C data types and standard C library (ANSI) calls. When high-end applications are needed, the image core can be quickly ported to UNIX and other platforms, making the entire application highly portable and scalable.

Currently, the image infrastructure consists of the following modules:

StdImage: The core of the image data structure and the basic functions that operate on this core;

ProgressStub: Definition and interface of progress handling mechanism;

·VirtualFile: virtual file I/O interface;

Vf_file: actual file implementation of virtual file I/O;

Vf_memory: memory file implementation of virtual file I/O;

ImageFile: virtual image file reading and writing interface;

·Jfit_file: JPEG format implementation of virtual image file reading and writing interface;

Bmp-file: BMP format implementation of virtual image file reading and writing interface;

Fgi_file: Free grayscale image format implementation of virtual image file reading and writing interface;

DibStdImage: conversion between DIB (device-independent bitmap) and StdImage;

mess_util: miscellaneous auxiliary functions that are difficult to categorize;

ProgressWinHint: A progress handling mechanism implementation under Windows;

WinMessUtilities: Miscellaneous auxiliary functions under Windows that are difficult to classify.

The structure of the image hardware system for frame storage is centered on the image frame storage, and also includes modules such as image input, output, and processing; while the image system for computer memory is centered on the computer memory, and also includes modules such as image input, output, and processing. The former is based on the overall hardware structure, and the software seems to be only image processing and data storage, while the latter is based on the overall software structure, and the hardware is managed by the software. The two system structures are very different, but in terms of function, they have similarities.

The image software system structure facing the computer memory is called the Windows image infrastructure. The overall structure diagram of this Windows image infrastructure is shown in Figure 2. In Figure 2, the StdImage structure represents an image or image sequence, and almost all functions are carried out around it. It can use the ImageFile module to load images from image files or write images to files. In the Windows environment, DIB is usually used to display or print images. In addition, scanners, cameras, etc. will also input images to the computer in the form of DIB. Therefore, the image infrastructure has a DibStdImage module to quickly convert between DIB and StdImage. Image communication is inserted between the network and StdImage, so that image transmission can be realized. This transmission uses memory as the medium, which has the advantage of fast speed.

Keywords:Monitoring Reference address:A Brief Analysis of the Software Structure of the Monitoring Image Processing System

Previous article:Multi-sensor bridge remote monitoring system based on PXI and SCXI
Next article:The birth opportunity and innovative application of integrated thermal imaging positioning system

Recommended Content
Latest Security Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号