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.
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
- Popular Resources
- Popular amplifiers
- Mir T527 series core board, high-performance vehicle video surveillance, departmental standard all-in-one solution
- Akamai Expands Control Over Media Platforms with New Video Workflow Capabilities
- Tsinghua Unigroup launches the world's first open architecture security chip E450R, which has obtained the National Security Level 2 Certification
- Pickering exhibits a variety of modular signal switches and simulation solutions at the Defense Electronics Show
- Parker Hannifin Launches Service Master COMPACT Measuring Device for Field Monitoring and Diagnostics
- Connection and distance: A new trend in security cameras - Wi-Fi HaLow brings longer transmission distance and lower power consumption
- Smartway made a strong appearance at the 2023 CPSE Expo with a number of blockbuster products
- Dual-wheel drive, Intellifusion launches 12TOPS edge vision SoC
- Toyota receives Japanese administrative guidance due to information leakage case involving 2.41 million pieces of user data
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- After reading this article from the Research Institute, I feel that 6-lane Wi-Fi still has a long way to go.
- Warning for trouble~~~~ la la la~ hurry to the front of the post to find out
- mcgs Kunlun Tongtai Modbus RTU, Modbus TCP communication method Modicon Modbus communication configuration steps
- Proficient in hardware and familiar with software
- [Nucleo G071 Review] SYSTICK & Comparison of Two Commonly Used Low Power Modes
- [Top Micro Smart Display Screen Review] 3. Run SciTE Lua script editor to test the screen alarm function
- Material problem of wifi gun
- The processing of instantaneous signals, the signal is -50mV-0V, the time length is 16us, such instantaneous signals need to be extracted and processed...
- Can adding a resistor in parallel to the load effectively prevent voltage fluctuations?
- 【TGF4042 signal generator】+Sweep application in issue 7