CN-121985208-A - Time-space step length recombination and image restoration method and system for time-sharing imaging of linear array camera
Abstract
The invention discloses a time-sharing imaging space-time step size reorganization and image restoration method of a linear array camera, which comprises the steps of S1, an image acquisition and parameter analysis step, S2, a differential line offset model establishment step, S5, a time-sharing number K, a time-sharing demultiplexing step, S3, a differential compensation calculation step, a differential line offset compensation calculation step and a S4, wherein the image acquisition and parameter analysis step is used for acquiring a synthesized image data stream, the configuration parameter is analyzed, the S2, the differential line offset model establishment step is used for determining the physical position of each photosensitive channel relative to a reference channel according to the topological type of a sensor, the target total offset S_ { target }, the preset offset S_ executed by an ISP in the camera is estimated according to the internal space correction state mark F of the camera, the differential line offset compensation calculation step is used for calculating the differential line offset compensation DeltaS needed to be executed by a software end, the calculation formula is DeltaS =S_ and S_ { target } -S_ internal is used for carrying out longitudinal translation on data of the synthesized channel data in the synthesized image according to DeltaS, and the time-series demultiplexing step is used for carrying out line lag extraction on the model K, and reconstructing a stereoscopic image or a multi-spectral image of an independent light source.
Inventors
- DENG JUNGUANG
- HUANG JIANLANG
- GUO GONGPING
- DENG JUNTAO
- ZHANG TING
- LIU YONGKANG
Assignees
- 东莞康视达自动化科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260130
Claims (9)
- 1. A time-sharing imaging space-time step length reorganization and image restoration method of a linear array camera is characterized by comprising the following steps: The method comprises the steps of S1, image acquisition and parameter analysis, wherein image processing equipment acquires a composite image data stream transmitted by a linear array camera through an acquisition card and analyzes configuration parameters of an imaging system, wherein the configuration parameters comprise time sharing number K, sensor topology type, physical line spacing D among channels of a sensor and a camera internal space correction state identifier F; S2, establishing a differential line offset model, namely determining the physical position of each photosensitive channel relative to a reference channel by image processing equipment according to the topology type of the sensor, and calculating a target total offset S_ { target } required for theoretically completely eliminating time domain parallax by combining the time-sharing quantity K; S3, calculating differential compensation quantity by using image processing equipment to calculate differential line offset compensation quantity DeltaS to be executed by software end, wherein the calculation formula is DeltaS =S_ { target } -S_ { internal }; S4, an image reverse restoration step, wherein the image processing equipment establishes a data buffer area in a memory of the image processing equipment, and carries out longitudinal translation on hysteresis channel data in a synthesized image according to the calculated differential line offset compensation amount DeltaS, carries out upward translation operation when DeltaS is more than 0, and carries out downward translation operation when DeltaS is more than 0, so that restored image data in a space-time matching state is obtained; And S5, time sequence demultiplexing, namely performing line-level interlaced extraction of the mode K on the repaired image data by using the image processing equipment, and reconstructing photometric stereo images or multispectral images of K independent light sources.
- 2. The method for time-division imaging space-time step reconstruction and image restoration of a line camera according to claim 1, wherein in the step S1, The image processing equipment is an industrial personal computer, a personal computer or an embedded computing platform; the imaging system is a machine vision detection system consisting of a linear camera, a lens, a plurality of groups of light sources capable of being switched rapidly and an image acquisition card.
- 3. The method for time-division imaging space-time step reconstruction and image restoration of a line camera according to claim 1, wherein in the step S1, The manner of acquiring the composite image data stream is: And receiving original Raw data or RGB-packet format data transmitted by the linear array camera through CAMERALINK, COAXPRESS or a GigE interface, and storing the Raw data or the RGB-packet format data into a memory buffer area of the image processing equipment.
- 4. The method for time-division imaging space-time step reconstruction and image restoration of a line camera according to claim 1, wherein in the step S1, The topology type of the sensor is any one of the following: Single line/black and white sensor with physical row spacing d=0; the double-line color sensor comprises two photosensitive lines, wherein a physical line spacing D exists between the first photosensitive line and the second photosensitive line; Three-line color sensors comprise three independent photosensitive rows, typically red (R), green (G), blue (B) rows with a physical row spacing D between them.
- 5. The method for time-division imaging space-time step reconstruction and image restoration of a line camera according to claim 4, wherein in said step S2, The specific method for calculating the target total offset S_ { target } and the preset offset S_ { internal } is as follows: S_ { target } = d×k, where D is the physical number of rows of the current channel relative to the reference channel, K is the number of time-sharing; s_ { internal } =d×alpha, where alpha is an internal correction factor, alpha=1 when the camera internal space correction state flag F is on, and alpha=0 when the internal space correction state flag F is off.
- 6. The method for time-division imaging space-time step reconstruction and image restoration of a line camera according to claim 5, wherein in said step S3, The specific calculation logic for the differential row offset compensation DeltaS further includes the Bayer phase correction term delta, which is given by the following formula: DeltaS _i= (d_i×k) - (d_i×alpha) +delta for the i-th color channel; Wherein: D_i is the physical line number of the ith color channel relative to the reference channel, wherein the color channel refers to R, G or B photosensitive lines which are physically separated on the sensor; delta is a fine tuning correction term used for compensating phase deviation of the double-line camera during Bayer interpolation or sub-pixel row deviation caused by mechanical installation.
- 7. The method for time-sharing imaging space-time step reconstruction and image restoration of a linear array camera according to claim 5, wherein the method supports reverse restoration for a special working condition of "camera on inner space correction F", i.e. when alpha=1: When detecting that the linear array camera has been aligned by mistake based on the static scene assumption, assuming that the error alignment is the displacement of the D lines, and the time-sharing imaging actually requires the displacement of the d×k lines, the step S3 automatically calculates the forward additional compensation amount DeltaS =d×k-D; and when detecting that the alignment inside the linear array camera causes data dislocation, the step S4 realizes logic rollback or addition of the data by moving a memory address pointer.
- 8. The method for time-division imaging space-time step reconstruction and image restoration according to claim 1, wherein in the step S5, The time sequence demultiplexing specifically comprises: constructing K target image containers, wherein the target image containers are memory blocks which are allocated in advance and used for storing independent light source images; traversing the repaired image data to obtain a Row index Row_ { idx } of the current Row; Calculating a Target index target_idx =row_idx } pmodK; and copying the current line data to the corresponding positions of the Target image containers of the target_ { idx }, thereby separating illumination information of different times.
- 9. An image processing system applied to a time-sharing imaging space-time step length reorganization and image restoration method of a linear array camera as defined in any one of claims 1 to 8, comprising a user interaction module and a logic control module, wherein the user interaction module is used for: Dynamically receiving an instruction input by a user, and selecting whether an input image contains camera internal correction; when the user chooses to include an internal correction, the system automatically locks the number of times the two-wire camera, k=2, and applies compelled compensation logic of alpha=1 to prevent aliasing errors caused by internal correction in the high frequency time-sharing mode of the two-wire Bayer interpolation structure.
Description
Time-space step length recombination and image restoration method and system for time-sharing imaging of linear array camera Technical Field The invention relates to the technical field of image restoration of machine vision, in particular to a time-sharing imaging space-time step length reorganization and image restoration method and system of a linear array camera. Background The multi-light source time-sharing imaging (luminosity stereo) technology utilizes a single linear array camera to acquire normal vector or multispectral information of the surface of an object through fast switching of light sources. In the prior art, processing time-shared images of color line cameras presents a significant challenge: 1. The sensor has various structures, namely cameras on the market are divided into a plurality of structures such as double lines (RG-BG) and three lines (Tri-linear), and the like, and different physical line spacing leads to different image dislocation modes. 2. Interference of camera internal processing most commercial color cameras default to the "spatial correction (SpatialCorrection)" preprocessing mode. The function can align colors during ordinary shooting, but in a time-sharing shooting mode, a camera can wrongly forcedly combine the data shot at different times (namely different light sources), so that the integrity of time sequence data is damaged. 3. The limitation of the existing scheme is that the current image splitting algorithm is mostly only aimed at the original image of the closing correction. Once the field engineer opens the correction function of the camera by mistake, the existing algorithm is invalid, so that the defects of purple-green stripes and the like of the image occur, and the image cannot be repaired through simple geometric transformation. Disclosure of Invention The invention aims to overcome the defects in the prior art and provide a time-sharing imaging space-time step length reorganization and image restoration method and system for a linear array camera, wherein the system and the method utilize a general differential line offset calculation model, the multi-spectral time-sharing imaging device can be adaptively compatible with black-white, double-line and three-line cameras, can effectively restore images with internal space correction opened, and achieves low-cost, high-universality and clear multi-spectral time-sharing imaging. To achieve the above object, the present invention is achieved by the following two aspects: in a first aspect, the present invention provides a time-sharing imaging space-time step length reorganization and image restoration method for a linear array camera, including the following steps: The method comprises the steps of S1, image acquisition and parameter analysis, wherein image processing equipment acquires a composite image data stream transmitted by a linear array camera through an acquisition card and analyzes configuration parameters of an imaging system, wherein the configuration parameters comprise time sharing number K, sensor topology type, physical line spacing D among channels of a sensor and a camera internal space correction state identifier F; S2, establishing a differential line offset model, namely determining the physical position of each photosensitive channel relative to a reference channel by image processing equipment according to the topology type of the sensor, and calculating a target total offset S_ { target } required for theoretically completely eliminating time domain parallax by combining the time-sharing quantity K; S3, calculating differential compensation quantity by using image processing equipment to calculate differential line offset compensation quantity DeltaS to be executed by software end, wherein the calculation formula is DeltaS =S_ { target } -S_ { internal }; S4, an image reverse restoration step, wherein the image processing equipment establishes a data buffer area in a memory of the image processing equipment, and carries out longitudinal translation on hysteresis channel data in a synthesized image according to the calculated differential line offset compensation amount DeltaS, carries out upward translation operation when DeltaS is more than 0, and carries out downward translation operation when DeltaS is more than 0, so that restored image data in a space-time matching state is obtained; And S5, time sequence demultiplexing, namely performing line-level interlaced extraction of the mode K on the repaired image data by using the image processing equipment, and reconstructing photometric stereo images or multispectral images of K independent light sources. Preferably, in the step S1, The image processing equipment is an industrial personal computer, a personal computer or an embedded computing platform; the imaging system is a machine vision detection system consisting of a linear camera, a lens, a plurality of groups of light sources capable of being switched rapidly and an image acqu