CN104902207B - A kind of high-speed signal acquisition method - Google Patents

A kind of high-speed signal acquisition method Download PDF

Info

Publication number
CN104902207B
CN104902207B CN201510336821.7A CN201510336821A CN104902207B CN 104902207 B CN104902207 B CN 104902207B CN 201510336821 A CN201510336821 A CN 201510336821A CN 104902207 B CN104902207 B CN 104902207B
Authority
CN
China
Prior art keywords
data
cpld
image
full
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510336821.7A
Other languages
Chinese (zh)
Other versions
CN104902207A (en
Inventor
邓伦兵
王红艳
段方杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Te Lunte Science And Technology Co Ltd
Original Assignee
Sichuan Te Lunte Science And Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Te Lunte Science And Technology Co Ltd filed Critical Sichuan Te Lunte Science And Technology Co Ltd
Priority to CN201510336821.7A priority Critical patent/CN104902207B/en
Publication of CN104902207A publication Critical patent/CN104902207A/en
Application granted granted Critical
Publication of CN104902207B publication Critical patent/CN104902207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a kind of high-speed signal acquisition method, this method includes:By the vedio data after CPLD collection digitlizations, the data of collection are carried out by coding compression by coding chip, then will encode the data after compression again by AGP bus transfers to host computer, decompression is carried out to image finally by host computer and contracts display.The present invention proposes a kind of picture signal collection and processing method, improves signal transmission storage speed, reduces the requirement to channel width and storage size.

Description

High-speed signal acquisition method
Technical Field
The invention relates to signal acquisition, in particular to an image signal acquisition processing method.
Background
With the development of image and video processing technology, network technology and automatic control technology, video monitoring systems have transitioned from early analog monitoring to digital network monitoring. The digital video monitoring system takes compression, transmission, storage and playing of digital video as a core, and adopts advanced digital image compression, coding, decoding and transmission technologies, thereby realizing visual monitoring. The traditional video acquisition system only supports video data of several systems, so that instantaneous pictures with rapidly changing targets are difficult to clearly snap, and a plurality of high-frame-frequency cameras only simply acquire the images and do not perform digital analysis and processing on the signals, so that the channel transmission and storage speed of the image data cannot get rid of the bottleneck.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a high-speed signal acquisition method, which comprises the following steps:
the CPLD collects the digitized video image data, the collected data is encoded and compressed through the encoding chip, then the encoded and compressed data is transmitted to the upper computer through the AGP bus, and finally the image is decompressed and displayed through the upper computer.
Preferably, the video is transmitted in frame units, interlaced scanning is adopted, and after receiving of image data is completed by the CPLD, the image data is transmitted to the coding chip for compression through format conversion and filtering; after compression and packaging are finished, data are transmitted back to the CPLD, the CPLD controls the time sequence of an AGP bus interface, and the data are finally transmitted to an upper computer; two queue buffers are designed between the coding chip and the CPLD;
an internal queue is established in an internal IP core of the CPLD, the data width is 32 bits, an independent read clock and an independent write clock are adopted, and when the data is half full, a half-full flag bit half _ flag is set to be 1; when the data is full, setting a full flag full _ flag to be 1; after the video data is acquired and processed, the CPLD checks whether the queue is full through a full mark of the queue, and if the queue is not full, 32-bit image data is written into the queue under the logic control of a write clock; connecting the half-full signal to an interrupt pin of the coding chip, setting the half-full signal to be high, triggering a DMA process of the coding chip, and reading out image data in the queue;
the coding chip firstly carries out forward preprocessing on a source image, then carries out discrete wavelet transformation on the source image, then carries out quantization processing and entropy coding on the transformed wavelet coefficient, and finally packs image data obtained after entropy coding into a compressed data packet for output; in the decoding process, the encoding process is reversely operated according to parameters provided in the compressed code stream, and finally the source image is reconstructed and restored;
the encoding chip takes the CPLD as an external storage space of the encoding chip through an external interface, compressed data is written into another queue inside the CPLD through a DMA, a half-full signal triggers a reading process inside the CPLD, the data is read out, and the data is uploaded to a control upper computer through an AGP bus.
Preferably, before compressing, the encoding chip further comprises:
the method comprises the following steps of preprocessing an initial image, converting a color image into a gray image, dividing the image into 8*8 pixel blocks, and then performing transformation according to the following transformation formula:
wherein x, y, u, v =0,1, …,7; and c (u) = c (v) and take when u =0, v =0Taking 1,x, y as the coordinate position of a value in the image data matrix in other cases; f (x, y) represents a value in the image data matrix; u, v represent coordinate positions of values in the transformed matrix; f (u, v) represents a value in the transformed matrix; the natural number of the matrix data after the transformation is a frequency coefficient;
then Z-shaped scanning is carried out, so that the same or adjacent frequency coefficients keep adjacent positions in a stack of sequences, and finally, the sequences are converted into a one-dimensional arrangement mode; after Z-shaped scanning, the nonzero transform coefficients are concentrated in front of the one-dimensional array, and a string of zero quantized transform coefficients are arranged behind the one-dimensional array for entropy coding;
non-zero coefficients are encoded in entropy coding, and consist of two parts: wherein the previous part is the number of consecutive zero coefficients before the non-zero coefficient, i.e. the run; while the latter part is the sign and magnitude of the non-zero coefficients.
Compared with the prior art, the invention has the following advantages: the signal transmission storage speed is improved, and the requirements on the channel width and the storage space size are reduced.
Drawings
Fig. 1 is a flow chart of a high speed signal acquisition method according to an embodiment of the present invention.
Detailed Description
A detailed description of one or more embodiments of the invention is provided below along with accompanying figures that illustrate the principles of the invention. The invention is described in connection with such embodiments, but the invention is not limited to any embodiment. The scope of the invention is limited only by the claims and the invention encompasses numerous alternatives, modifications and equivalents. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. These details are provided for the purpose of example and the invention may be practiced according to the claims without some or all of these specific details.
One aspect of the invention provides a high-speed signal acquisition method. Fig. 1 is a flow chart of a high-speed signal acquisition method according to an embodiment of the invention. The invention utilizes a multi-interface and high-speed transmission image processing system, acquires digitized video image data by a CPLD, encodes and compresses the acquired data by an encoding chip, then transmits the encoded and compressed data to an upper computer by an AGP bus, and finally decompresses and displays the image by the upper computer.
The invention configures a video decoder through a CPLD and receives image data output by the video decoder; meanwhile, a universal output interface is adopted to receive image data output by a standard digital camera. After the CPLD finishes the collection of video data and caches the video data through an internal queue, the data are packed and transmitted to an encoding chip in parallel, the encoding chip carries out JPEG compression on the image, the compressed data are transmitted to a control upper computer through an AGP bus, and then the image is decoded and displayed through the upper computer.
The video transmission protocol is transmitted in units of frames and adopts interlaced scanning. The video decoder adopts an output mode that the synchronous signal is embedded into the data. After the CPLD finishes receiving the image data, the image data is transmitted to an encoding chip for compression through format conversion and filtering. After compression and packaging are finished, the data are transmitted back to the CPLD, the AGP bus interface time sequence is controlled through the CPLD, and the data are finally uploaded to the upper computer. In order to meet the requirements of high-speed, bidirectional and real-time transmission of image data, two high-speed queue buffers are designed between the coding chip and the CPLD.
An internal queue is created in the CPLD internal IP core, the data width is 32 bits, and the storage capacity is 3 Mx 32 bits. Independent read clock and write clock are adopted, data reaches half full, half full flag position 1 (half _ flag = "1"); the full flag is set to 1 (full _ flag = "1") when the full is reached. After the video data acquisition and processing are finished, the CPLD checks whether the queue is full through a full mark of the queue, and if the queue is not full, 32-bit image data is written into the queue under the logic control of a write clock; and connecting the half-full signal to an interrupt pin of the coding chip, setting the half-full signal to be high, triggering a DMA process of the coding chip, and reading the image data in the queue. Similarly, the encoding chip takes the CPLD as an external storage space of the encoding chip through the peripheral interface, compressed data is written into another queue inside the CPLD through the DMA, a half-full signal triggers a reading process inside the CPLD, the data is read out, and the data is uploaded to the control upper computer through the AGP bus.
In the image data processing flow, a source image is subjected to forward preprocessing and then discrete wavelet transformation, then the transformed wavelet coefficients are subjected to quantization processing and entropy coding, and finally the image data obtained after entropy coding is packaged into a compressed data packet for output. And decoding, namely performing reverse operation on the encoding process according to each parameter provided in the compressed code stream, and finally reconstructing and restoring the source image.
In order to prevent data loss in the encoding process, a group of frame buffer circuits are designed between the acquisition and encoding circuits. The input video data flow is written into two different SDRAM memory units alternately by taking a frame as a unit, and when one SDRAM is written into the two different SDRAM memory units, the data in the other SDRAM is read out and sent to a data coding unit for operation. Therefore, the input/output of the data is uninterrupted, and the method is very suitable for pipeline operation and completes seamless caching and processing of the data.
And after receiving the image data transmitted by the CPLD, the coding chip alternately writes the image data into the two SDRAM memories by taking a frame as a unit. At the same time, the data is alternately read out and output to the data compression unit for encoding. The data flow is strictly and effectively controlled, no data loss or error code occurs, and the efficiency is high.
The encoding flow of the image data by the encoding chip is as follows: after power-on reset, the coding chip program is loaded and started from the Flash starting position, finally the application program is completely moved to the coding chip memory through secondary guidance, then the entry function is skipped to, the initialization configuration is completed, and the external interrupt trigger signal of the CPLD is waited. After the CPLD acquires the data, the data is cached in an interface queue, a DMA process of the coding chip is triggered in an interruption mode, the coding chip stores the data in an SDRAM in a DMA mode, and if the transmission of one frame of image is finished, soft interruption is triggered to enter a JPEG coding subprogram. And after the coding is finished, triggering the DMA process again, and returning the data to the CPLD.
The AGP bus interface internal logic judges the bus starting signal first, if the pin level changes from high to low, a data transmission process is started, then the read-write signal level LWR is judged, if the LWR is 1, the AGP write process is indicated, otherwise, the read process is indicated. The AGP reading process is divided into a reading state and reading data, the reading state and the reading data are judged through an address bus LA, and in the reading process, if LA =04H, the reading state is a register reading state; if LA = A0H, the batch image data is read. In the writing process, if LA =01H, the system is reset and immediately executed, and the register is not written; if LA =02H, for order download, need to write the order word into the corresponding register; if LA =03H, command refresh is performed immediately without writing to the register. In order to prevent data loss, a queue data buffer is added in an IP core for calling the CPLD in the design process of the AGP bus interface, and the bit width is 32 bits and is matched with the bit width of the AGP bus. Because the AGP data bus is in bidirectional transmission, a data direction control module is added in the CPLD, and the ordered downloading and uploading of data is ensured.
In the specific processing process of the coding chip, firstly, the image is processed in a blocking mode, then discrete cosine transform is carried out on each pixel block, the transformed coefficients are basically irrelevant, the energy of the coefficient matrix is concentrated in a low-frequency area, namely the upper left corner of the coefficient matrix, and the purpose of compression is achieved by retaining the low-frequency coefficient and removing the high-frequency coefficient; secondly, the matrix coefficients are quantized and summed; and finally, coding is carried out to realize the compression of the image.
The RGB employed by the display system must first be converted to a YCbCr module suitable for graphics compression. Conversion formula from RGB to YCbCr:
Y=0.299R+0.587G+0.114B
Cb=-0.169R-0.331G+0.5B+128
Cr=0.5R-0.419G-0.081B+128
YCbCr to RGB inverse transform formula:
R=Y+1.402(Cr-128)
G=Y-0.334(Cb-128)-0.714(Cr-128)
B=Y+1.722(Cb-128)
a complete coding unit consisting of a plurality of luminance component subblocks and two chrominance component subblocks is called a minimum coding unit. Since the image needs to be divided into sub-blocks of 8*8 when the image is processed later, the initial image needs to be filled in to have a width and a height which are multiples of 8 when the image is divided.
Before compression, an initial image is preprocessed, a color image is converted into a gray image, the image is divided into 8*8 pixel blocks, and then the following transformation is carried out, wherein the transformation formula is as follows:
wherein x, y, u, v =0,1, …,7; and c (u) = c (v) and take when u =0, v =0In other cases, 1,x, y represents the coordinate position of a certain numerical value in the image data matrix; f (x, y) represents a value within the image data matrix; u and v represent coordinate positions of a certain numerical value in the matrix after transformation; f (u, v) represents a value in the transformed matrix. The natural number of the matrix data after the transformation is a frequency coefficient, and the process is only a lossless transformation process without compression. After transformation, the low-frequency components are concentrated on the upper left corner of the coefficient module, and the high-frequency components are concentrated on the lower right corner of the coefficient module, wherein the low-frequency components contain main information of the image, and the high-frequency components are parts insensitive to human eyes, so that the low-frequency components lay a foundation for later quantization.
Then, Z-scan is performed, so that the same or adjacent frequency coefficients can keep adjacent positions in a stack sequence and finally be converted into a one-dimensional arrangement. Thus, after zig-zag scanning, the non-zero transform coefficients are concentrated in front of the one-dimensional array, followed by a string of zero quantized transform coefficients, ready for entropy coding.
Entropy coding means that only non-zero coefficients are coded. While the coding of the non-zero coefficients consists of two parts: the number of consecutive zero coefficients preceding the non-zero coefficient in the previous part, i.e. the run; while the latter part is the sign and magnitude of the non-zero coefficients. Since the previous zigzag scanning causes more zeros to appear continuously, the efficiency of run-length coding is naturally high. And on the basis of entropy coding, the law between the values can be found and then the coding can be carried out.
Preferably, the encoding compression process achieves both image compression and encryption. Firstly, calculating the regional gradient D of the pixel point to be coded 1 、D 2 、D 3
D 1 =R d -R b ,D 2 =R b -R c ,D 3 =R c -R a Wherein R is a 、R b 、R c 、R d The estimated values of the pixels at the positions a, b, c and d are obtained. The relation between the region gradient and the distortion control parameter Nc determines the subsequent coding mode:
if the gradient of the pixel point region is in the range of the distortion control parameter Nc, entering a run-length mode; otherwise, the normal mode is entered.
If the normal mode is entered, the prediction and coding are performed according to the following steps:
1) The gradient is quantized with a preset parameter Q (Q is an integer within the interval [0, 364 ]).
2) Calculated deviation e = sign (I) x -p x ) - β, sign = { -1,1}. Wherein: i is x For pixel point x to be encoded, p x The estimated value of the pixel point x to be coded and beta are self-adaptive compensation values. And carrying out non-negative mapping on the deviation to ensure that the bilateral geometric distribution of the deviation is folded into unilateral geometric distribution.
3) And carrying out fixed-length coding on the deviation.
4) Updating 4 statistical parameters A [ Q ], B [ Q ], C [ Q ] and N [ Q ] of the recording context.
If entering run mode, then coding as follows:
1) Run-length scanning.
2) Coding the run length, and entering 3) if the non-line is finished; otherwise go to 4).
3) End-sampling encoding is employed.
4) Updating 4 statistical parameters A [ Q ], B [ Q ], C [ Q ] and N [ Q ] of the recording context.
Wherein: a [ Q ] is the accumulated value of prediction error amplitude, B [ Q ] is the deviation value, C [ Q ] is the prediction correction value, and N [ Q ] is the count value of the frequency of the context.
And after the current pixel point or pixel segment is coded according to the mode, raster scanning and moving updating are carried out on the values of the positions a, b, c, d and x, and a corresponding mode is entered according to the relation between the regional gradient of the next pixel point and the distortion control parameter Nc.
Constructing an optimal Nc value sequence table (Nc) 0 ,Nc 1 ,…,Nc Max Max is the index maximum value of Nc. Method for screening Nc values: if the peak signal-to-noise ratio change rate is higher than a preset threshold value, the distortion control parameter Nc value is more densely selected; if the change is gradual, the Nc value is selected sparsely.
The adjustment of the Nc value and further the adjustment and control of the compression ratio are realized according to the following processes:
d i+1 =d i +st j ;i∈{1,2,…,N},j∈{0,1,2}
wherein: d i (i belongs to {1,2, …, N }) is a subscript value of the distortion control parameter Nc; st j (j ∈ {0,1,2 }) is 3 different step sizes.
Given the target compression ratio Ro and the initial distortion control parameter Nc, encoding is performed according to the following steps: (wherein B l For the currently acquired block size, bl 1 ,Bl 2 The image block size is the value of the image block size under two different conditions; ro is a target compression ratio; rc is the current compression ratio; abs (·) is an absolute value operation; d i A subscript value of the current distortion control parameter Nc;d i+1 subscript value for next distortion control parameter Nc).
1) A line of an image is encoded according to the JPEG algorithm.
2) The absolute value abs (Ro-Rc) of the measure of the target compression ratio and the current compression ratio is calculated. If abs (Ro-Rc) > t2, go to step 3); otherwise step 4) is entered.
3) And the coding block Bl1 updates the current compression ratio Rc.
4) And the coding block Bl2 updates the current compression ratio Rc.
5) Updating the next subscript value d according to the above formula i+1 The Nc in the table is looked up by the index value accordingly for the next block encoding, returning to step 2).
The method adopts a piecewise function form to adjust the subscript value of the distortion control parameter Nc according to the relation between the measure of the target compression ratio and the current compression ratio and the threshold, compared with the original method, the distortion control parameter Nc is adjusted more finely, the complexity of the texture is judged by better utilizing the prediction error, and the reconstructed image quality is better under the condition that the final real-time compression ratio is converged to the target compression ratio.
The present invention generates three sets of random binary sequences and concatenates the three sets to reduce the number of iterations. First, the following iterative method is selected:
y n+1 =y n +hf 1 (x n ,y n )
wherein: h is a set step length; f. of 1 (x n ,y n ) Is a corresponding differential equation; x is a radical of a fluorine atom n 、y n Is an independent variable parameter; n belongs to {0,1, …, N }, and N is the iteration number.
After iteration, the decimal sequence { x can be generated 1 ,x 2 ,…,x r },{y 1 ,y 2 ,…,y r },{z 1 ,z 2 ,…,z r R is a positive integer, and in order to enhance the complexity of the initial value attack, the generated decimal sequence is processed as follows: 1) Removing an integer part; 2) M before removal 1 Bit (m) 1 Is a positive integer). Taking x as an example:
x r =10 m1 x r -round(10 m1 x r )
then converted into binary sequence, and then x, y, z are connected, namely key. Obviously, key is along with iteration number N and initial value x 0 ,y 0 ,z 0 Q, and the parameter m 1.
Code stream D = (D) controlled by generated key and compression ratio 1 ,d 2 ,…,d M ) (where D represents a binary sequence of length M, M being a positive integer) performing the operation:
D1=g1(D,key)
wherein: d1= (D) 1 ',d 2 ',…,d M ') ciphertext of length M, g 1 (. Is an encryption operation and g) 1 The operation is reversible. If the key used in decryption is different from the key used in encoding, the image cannot be decrypted correctly, thereby realizing the encryption of data. Let the key used in decoding be key1, D 1 '=(d 1 ″,d 2 ″,…,d M ") is a decoding code stream, and the decryption operation is as follows:
D 1 '=g 1 -1 (D 1 ,key 1 )=g 1 -1 (g 1 (D,key),key 1 )
wherein g is 1 -1 Is g 1 The inverse operation of (c). Obviously, if key = key 1 Then D = D 1 ', i.e., the decryption is correct at this time.
In a further embodiment, in order to further improve the image compression efficiency, a method is adopted, which comprises the steps of firstly adopting wavelet transformation to carry out image decomposition, then adopting regression learning to approach wavelet coefficients, adopting a particle swarm optimization method to optimize learning parameters, and finally using a support vector, a weight and a low-frequency coefficient to carry out encoding to obtain a compressed data stream.
The regression learning adopts a support vector machine algorithm, selects a nonlinear mapping function, maps the input sample from the original space to a high-dimensional feature space, and constructs the high-dimensional feature spaceMaking an optimal regression function, i.e. f (x) = w T φ (x) + b. In the formula, b represents an offset, and w represents a weight vector.
Converting the above formula into a quadratic optimization problem, i.e.
yi-w T φ(x)+b=e i i=1,2…n
Wherein, gamma represents a penalty parameter,is a relaxation variable; e.g. of the type i The error is predicted for the model.
For the nonlinear regression problem, a kernel function is adopted to replace a vector inner product in a high-dimensional space, a radial basis kernel function is selected as the kernel function of the support vector machine, and the radial basis kernel function is defined as follows:
and finally, obtaining a regression model of the support vector machine as follows:
where σ is the radial basis kernel function width.
The support vector machine model prediction performance based on the radial basis kernel function is closely related to gamma and sigma values, and to obtain the support vector machine model with the optimal performance, the optimal gamma and sigma values are obtained at first, and the parameters of the support vector machine are optimized by using a particle swarm optimization method in the research.
The particle represents a potential solution of the problem to be solved, the particle tracks two extreme values pbest and gbest in the solution space to continuously adjust the direction of the particle, and finally the solution of the problem is found. At each iteration, the particle velocity and position update formula is:
V k+1 ij =ωV k ij +c 1 ×r 1 ×(pbest) ij -X k ij +c 2 ×r 2 ×(gbest) ij -X k ij
X k+1 ij =X k ij (t)+V k+1 ij
in the formula, c1 and c2 are acceleration coefficients; k is the current iteration number; r1 and r2 are random numbers in the range of [0,1 ]; omega is the inertia weight.
From any initial value z0, a certain time sequence z1, z2, z3, … can be iterated from the following equation of perturbation equation.
z i+1 =μz i (1-z i ),i∈(0,1)
Wherein μ is a control parameter.
The disturbance process of the particle swarm is specifically as follows:
(1) Pbest of particle i by the following equation i Mapping to the disturbance equation definition Domain [0,1] described above]The method comprises the following steps: z is a radical of i =(pbest i -a i )/(b i -a i )
(2) And carrying out multiple iterations through the disturbance equation to obtain a sequence: z is a radical of formula (m) i (m=1,2,…)。
(3) Inverse mapping the generated sequence back to the original solution space, thereby generating a variable resolvable sequence: p is a radical of (m) g =(p) (m) g1 ,p (m) g2 ,…,p (m) gd
p (m) g i =a i +(b i -a i )z (m) i
(4) In the original solution space, each feasible solution p after variable processing is calculated (m) g (m =1,2, …) and retains the feasible solution vector P corresponding to the best fitness value.
(5) Randomly selecting a particle from the current particle swarm, and replacing the position vector of the selected particle with the position vector of P.
After wavelet transform processing, the correlation between signal space domain and frequency domain is eliminated, so that most of the energy of wavelet coefficients is concentrated in low-frequency sub-bands, however, in practical application, the compression rate of some images by wavelet transform is low, mainly because the energy is compressed to the low-frequency band, but for some images with rich textures, the high-frequency coefficient still contains more energy, which causes the recovery quality of the images with rich textures to be seriously reduced, therefore, the embodiment utilizes the excellent approximation capability of a support vector machine, firstly inputs the high-frequency coefficient into the support vector machine for regression, and then codes the obtained support vector, weight and low-frequency sub-band coefficients to obtain the final code.
In summary, an image signal acquisition and processing method is provided, which improves the signal transmission and storage speed and reduces the requirements on the channel width and the storage space size.
It should be apparent to those skilled in the art that the modules or steps of the present invention described above can be implemented by a general purpose computing system, they can be centralized on a single computing system or distributed across a network of multiple computing systems, and they can optionally be implemented in program code that is executable by a computing system, such that it can be stored in a storage system and executed by a computing system. Thus, the present invention is not limited to any specific combination of hardware and software.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.

Claims (2)

1. A high-speed signal acquisition method, comprising:
the CPLD acquires digital video image data, the acquired data is encoded and compressed by an encoding chip, the encoded and compressed data is transmitted to an upper computer through an AGP bus, and finally the image is decompressed and displayed by the upper computer;
the video is transmitted by taking a frame as a unit, interlaced scanning is adopted, and after receiving of image data is completed by the CPLD, the image data is transmitted to the coding chip for compression through format conversion and filtering; after compression and packaging are finished, data are transmitted back to the CPLD, the CPLD is used for controlling the time sequence of an AGP bus interface, and the data are finally uploaded to an upper computer; two queue buffers are designed between the coding chip and the CPLD;
an internal queue is created in an internal IP core of the CPLD, the data width is 32 bits, an independent read clock and an independent write clock are adopted, and when the data is half full, a half full flag bit half _ flag is set to be 1; when the data is full, setting a full flag full _ flag to be 1; after the video data is acquired and processed, the CPLD checks whether the queue is full through a full mark of the queue, and if the queue is not full, 32-bit image data is written into the queue under the logic control of a write clock; connecting the half-full signal to an interrupt pin of the coding chip, setting the half-full signal to be high, triggering a DMA process of the coding chip, and reading out image data in the queue;
the encoding chip firstly carries out forward preprocessing on a source image, then carries out discrete wavelet transformation on the source image, then carries out quantization processing and entropy encoding on a transformed wavelet coefficient, and finally packs image data obtained after entropy encoding into a compressed data packet for outputting; in the decoding process, the encoding process is reversely operated according to parameters provided in the compressed code stream, and finally the source image is reconstructed and restored;
the encoding chip takes the CPLD as an external storage space of the CPLD through an external interface, compressed data is written into another queue inside the CPLD through a DMA, a half-full signal triggers a reading process inside the CPLD, the data is read out, and the data is uploaded to a control upper computer through an AGP bus;
a group of frame buffer circuits are designed between the acquisition and coding circuits; the input video data stream is written into two different SDRAM memory units alternately by taking a frame as a unit, while one SDRAM is written, the data in the other SDRAM is read out and sent to a data coding unit for operation; after receiving the image data transmitted by the CPLD, the coding chip alternately writes the image data into the two SDRAM memories by taking a frame as a unit; meanwhile, the data is read out alternately and output to the data compression unit for encoding.
2. The method of claim 1, wherein the encoding chip, prior to compressing, further comprises:
the method comprises the following steps of preprocessing an initial image, converting a color image into a gray image, dividing the image into 8*8 pixel blocks, and then performing transformation according to the following transformation formula:
wherein x, y, u, v =0,1, …,7; and c (u) = c (v) and take when u =0, v =0In other cases, 1,x, y represents the coordinate position of a certain numerical value in the image data matrix; f (x, y) represents a value in the image data matrix; u, v represent coordinate positions of values in the transformed matrix; f (u, v) represents a value in the transformed matrix; the natural number of the matrix data after the transformation is a frequency coefficient;
then Z-shaped scanning is carried out, so that the same or adjacent frequency coefficients keep adjacent positions in a stack of sequences, and finally, the sequences are converted into a one-dimensional arrangement mode; after Z-shaped scanning, the nonzero transform coefficients are concentrated in front of the one-dimensional array, and a string of zero quantized transform coefficients are arranged behind the one-dimensional array for entropy coding;
non-zero coefficients are encoded in entropy coding, and consist of two parts: wherein the previous part is the number of consecutive zero coefficients before the non-zero coefficient, i.e. the run; while the latter part is the sign and magnitude of the non-zero coefficients.
CN201510336821.7A 2015-06-17 2015-06-17 A kind of high-speed signal acquisition method Active CN104902207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510336821.7A CN104902207B (en) 2015-06-17 2015-06-17 A kind of high-speed signal acquisition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510336821.7A CN104902207B (en) 2015-06-17 2015-06-17 A kind of high-speed signal acquisition method

Publications (2)

Publication Number Publication Date
CN104902207A CN104902207A (en) 2015-09-09
CN104902207B true CN104902207B (en) 2018-03-30

Family

ID=54034571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510336821.7A Active CN104902207B (en) 2015-06-17 2015-06-17 A kind of high-speed signal acquisition method

Country Status (1)

Country Link
CN (1) CN104902207B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105407317A (en) * 2015-10-30 2016-03-16 国网江西省电力科学研究院 Time synchronization system based on intelligent substation video monitoring
CN111314638A (en) * 2020-01-07 2020-06-19 杭州华冲科技有限公司 Video data recording method and recording device
CN113365016A (en) * 2020-03-05 2021-09-07 阿里巴巴集团控股有限公司 Real-time map image data acquisition system and method
CN111469860B (en) * 2020-06-28 2020-10-30 江铃汽车股份有限公司 Lane departure early warning method and device, storage medium and automobile data recorder

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1558682A (en) * 2004-01-14 2004-12-29 华中科技大学 Embedded image processor
CN1722810A (en) * 2005-07-11 2006-01-18 中国水利水电科学研究院 A real-time acquisition system for digital camera
CN101191413A (en) * 2006-11-22 2008-06-04 中国海洋石油总公司 High speed transmission method for down hole digital television data and transmission system thereof
CN101500093A (en) * 2009-03-11 2009-08-05 南京大学 Video processing apparatus for bank
CN102221986A (en) * 2010-04-15 2011-10-19 研祥智能科技股份有限公司 High-speed data cache and collection system based on PCI (Peripheral Component Interconnect) bus
CN102273080A (en) * 2008-12-03 2011-12-07 诺基亚公司 Switching between DCT coefficient coding modes
CN102833546A (en) * 2012-08-21 2012-12-19 中国科学院光电技术研究所 High-speed image compression method and device based on optimally quantized wavelet sub-band interlacing
CN105430411A (en) * 2010-10-06 2016-03-23 Sk电信有限公司 Video coding method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1558682A (en) * 2004-01-14 2004-12-29 华中科技大学 Embedded image processor
CN1722810A (en) * 2005-07-11 2006-01-18 中国水利水电科学研究院 A real-time acquisition system for digital camera
CN101191413A (en) * 2006-11-22 2008-06-04 中国海洋石油总公司 High speed transmission method for down hole digital television data and transmission system thereof
CN102273080A (en) * 2008-12-03 2011-12-07 诺基亚公司 Switching between DCT coefficient coding modes
CN101500093A (en) * 2009-03-11 2009-08-05 南京大学 Video processing apparatus for bank
CN102221986A (en) * 2010-04-15 2011-10-19 研祥智能科技股份有限公司 High-speed data cache and collection system based on PCI (Peripheral Component Interconnect) bus
CN105430411A (en) * 2010-10-06 2016-03-23 Sk电信有限公司 Video coding method
CN102833546A (en) * 2012-08-21 2012-12-19 中国科学院光电技术研究所 High-speed image compression method and device based on optimally quantized wavelet sub-band interlacing

Also Published As

Publication number Publication date
CN104902207A (en) 2015-09-09

Similar Documents

Publication Publication Date Title
AU2018373495B2 (en) Frequency component selection for image compression
CN104902207B (en) A kind of high-speed signal acquisition method
CN102547283B (en) Device and method for dynamic video data compression
US10440360B2 (en) Video processing system
US20140086309A1 (en) Method and device for encoding and decoding an image
CN105933708B (en) A kind of method and apparatus of data compression and decompression
CN106030652B (en) Method, system and composite display controller for providing output surface and computer medium
CN105578190A (en) Lossless compression method and system for video hard decoding
CN109547784A (en) A kind of coding, coding/decoding method and device
CN113170140A (en) Bit plane encoding of data arrays
WO2009087783A1 (en) Data generator for coding, method of generating data for coding, decoder and decoding method
GB2561152A (en) Data processing systems
EP2787738B1 (en) Tile-based compression for graphic applications
JP4209631B2 (en) Encoding device, decoding device, and compression / decompression system
CN104954749B (en) A kind of information recording method
CN104883573B (en) A kind of signal high-efficient treatment method
JP2010098352A (en) Image information encoder
US8427494B2 (en) Variable-length coding data transfer interface
DE102011100936A9 (en) Techniques for storing and retrieving pixel data
CN111052742A (en) Image processing
KR100798386B1 (en) Method of compressing and decompressing image and equipment thereof
US11189006B2 (en) Managing data for transportation
JPH0488749A (en) Picture processor
JP3278149B2 (en) Image processing device
US20140300628A1 (en) Tile-based compression and decompression for graphic applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant