Background technology
To the existing many reports of the achievement in research of HYPERSPECTRAL IMAGERY compression, but rest on theoretical research and software processes stage mostly, accomplish the few of real-time hardware adaptations.Trace it to its cause, the one, the hyperspectral image data amount is huge, and is very high to the hardware handles Capability Requirement, is difficult in the past finish in real time with hardware circuit; The 2nd, HYPERSPECTRAL IMAGERY to be carried out the application often of Compression Study and handle unit, its research work does not have and the development work of imaging spectrometer is closely linked, seldom by practical application.
Along with the development of large scale integrated circuit technology, many high speeds, high reliability, the integrated circuit (IC) chip of low-power consumption is developed out, and the real-time processing of the hardware of digital picture has become possibility.Utilize multi-disc high-performance treatments chip to form parallel processing system (PPS), the real-time compression system that constitutes in conjunction with the HYPERSPECTRAL IMAGERY compression algorithm can reach the practical stage.And the miniaturization of imaging spectrometer requires and the pressure of a large amount of hyperspectral image data storage and transmission also makes the development department of imaging spectrometer begin to pay attention to the research work of this respect.The coastal waters imager (COIS) that carries as the NEMO naval map observation satellite by the United States Naval Research Laboratory research and design comprises two imagers, comprises that respectively 60 and 150 width are the spectral band of 10nm.The data transfer rate of these two imagers has reached 145Mb/s.In order to reach 10 times data compression rate (diminishing), alleviate that HYPERSPECTRAL IMAGERY is stored and the burden when transmitting earthward on star, United States Naval Research Laboratory has been developed real time processing system on a feature extraction and the data compression star, is called optics real-time adaptive spectrum identification system (ORASIS).In the experiment that unmanned spacecraft carries out, the actual compression effect that ORASIS reaches is: when ratio of compression=12, and Y-PSNR=48.0db; When ratio of compression=20, Y-PSNR=44.2db.In China, relevant research was also done by units such as BJ University of Aeronautics ﹠ Astronautics, the National University of Defense technology, Tsing-Hua University, Harbin Institute of Technology.Form by green (0.52-0.6 μ m), red (0.63-0.69 μ m), three wave bands of near infrared (0.76-0.94 μ m) by the imaging spectrometer that " No. one, space flight Tsing-Hua University " microsatellite of Chinese Tsing-Hua University, company of China Aerospace Machinery and Electronics Corporation and Britain Sa Rui university joint research and development carries, adopt a-MPBTC (Adaptive Moment Preserving Block Truncation Coding) compression method, obtain 4 times compressibility.
But all there is the interference of random noise inevitably in actual remote sensing images, analyze these imaging spectrum compressibilities, its weak point is the noisiness that they do not consider image, when image is carried out the data compression of certain multiple, the original noise of image border and transitional zone is amplified by system, and spread, polluteed the higher bit data of image, caused the loss of image information.When utilizing these compressibilities that image is compressed in brief, image information can not reasonably be kept.
Summary of the invention
As mentioned above, how according to the noise pollution situation of HYPERSPECTRAL IMAGERY, the compression multiple that improves image under the condition that does not increase image information loss is a technical matters to be solved by this invention.Therefore, the object of the present invention is to provide a kind of HYPERSPECTRAL IMAGERY compressibility, by noise analysis to each wave band data of original image, design effective method for compressing image, each wave band data of HYPERSPECTRAL IMAGERY is compressed targetedly, set up HYPERSPECTRAL IMAGERY real-time compression system based on masking by noise.
Technical solution of the present invention is as follows:
According to a kind of HYPERSPECTRAL IMAGERY real-time compression system of the present invention based on the masking by noise algorithm, comprise main frame, high speed image from processor and image collecting device, described image collecting device is connected and is connected with main frame through pci bus from processor with high speed image through the CAB bus interface; This main frame becomes double-way connection with high speed image from processor through pci bus, and also connects image display and Image Data Compression result memory respectively, and characteristics are:
A, shelter compression module and host interface at described high speed image from the picture noise that processor is provided with into the bidirectional traffic connection, this picture noise is sheltered compression module and is comprised the original image input block that connects successively, the signal noise ratio (snr) of image evaluation unit, the image subblock cutting unit, the image subblock two dimension quantizes cosine transform unit and signal noise ratio (snr) of image reconstruction unit, and coded image data compression unit, the signal to noise ratio (S/N ratio) of described its image of being rebuild of signal noise ratio (snr) of image reconstruction unit sends main frame so that accept from the order data of main frame with image Real Time Compression result data than the big 10db of signal to noise ratio (S/N ratio) of original image;
B, on main frame, be provided with host computer control module, from processor interface and display module and memory module, this control module is accepted the order that raw image data that image collecting device sends here and main frame send here and is formed the data source of system, and through from processor interface to high speed image compression result data when processor sends order and accept the image of force feed; Host computer control module is sent raw image data display module and is sent memory module to form compressed file image Real Time Compression result data and leaves in the Image Data Compression result memory.
Further, described main frame is portable PC;
Described high speed image is made of a plurality of dsp chip image processing boards from processor;
Described image subblock cutting unit is divided into 4 * 4 or 5 * 5 or 8 * 8 sub-pieces to original image.
HYPERSPECTRAL IMAGERY compressibility based on the masking by noise algorithm of the present invention is characterized in: for designed HYPERSPECTRAL IMAGERY compression algorithm, can not add modification or few as far as possible ground of revising with the hardware system realization, save the required workload of algorithm of reappraising.
System of the present invention also has stronger dirigibility, system can easily carry out the improvement of algorithm at application request, and the whole hardware system of development and Design again, and having extensibility and a portability, hardware design is convenient to system and is expanded later on or be applied to new platform.
The present invention is owing to the compression method that has used based on the masking by noise effect, control reconstructed image signal to noise ratio (S/N ratio) is greater than original image signal to noise ratio (S/N ratio) 10db, the noise that makes compression algorithm introduce is sheltered by the original image noise, thereby guarantees to have improved under the situation that does not increase image fault the compression of images multiple.
Put it briefly, the present invention has made full use of the noisiness of HYPERSPECTRAL IMAGERY, the noise that to be introduced by compression algorithm is reduced to minimum to the influence of image information, realized high-fidelity compression to HYPERSPECTRAL IMAGERY, while has also guaranteed the compression of images rate, compares with traditional HYPERSPECTRAL IMAGERY compressibility to have tangible technical progress and substantive meaning.
Embodiment
Provide better embodiment of the present invention according to Fig. 1~Fig. 8-2 below, and further provide ins and outs of the present invention, to enable understanding architectural feature of the present invention and functional effect better in conjunction with description to this embodiment.
Consult Fig. 1, hardware architecture of the present invention comprises that system's main control system 10, high speed image are from processor 20, image acquisition board 22, CAB bus interface 21 etc.Wherein: system's main control system 10 adopts portable PC, the image processing board Python/C6 disposable plates that high speed image adopts based on multi-disc TMS320C6201 from processor 20.Described main frame 10 its tasks are master control total systems, utilize its friendly interface to receive user command, starting/stop from processor is the work of high speed image from processor 20, working routine of change DSP on the disposable plates etc., and the view data of gathering and the relevant information of compression of images shown in real time, the data storage after the compression is got off.In addition, after the software of described main frame 10 also is responsible for the real-time working end, the decompress(ion) playback of compression result work during aftertreatment.The task of Python/C6 disposable plates then is to accept view data, and the program that allows DSP select according to main frame is handled, the output compression result.The original spectrum view data that described image acquisition board 22 is gathered is divided the two-way transmission, and the CAB bus interface 21 of leading up to is directly inputted among the Python/C6 to be handled; The computer PCI bus 30 of leading up to is sent to main frame 10 to carry out Real Time Compression and by image display 12 demonstrations, is convenient to monitoring.The data compression result of Python/C6 then passes to main frame 10 by pci bus 30, by storer 11 storages or further processing.
Consult Fig. 2, software architecture of the present invention is divided into main frame 10 platforms (Host) and from processor 20 platforms (Slave) two parts.Main modular on the main frame 10 has main control module 101, from processor interface module 102, image display 103 and data memory module 104.Its major function provides good man computer interface, accepts user command, and control receives the compression result of microprocessor board from the operation of processor machine 20, utilizes the real-time demonstration of technology realization original images such as multithreading and the memory function of compression result.From the main modular of processor 20 softwares image compression algorithm module 201 and host interface module 202 are arranged.Its major function then is to utilize multiple code optimization means on the DSP platform, and uses the high-level efficiency code encoder of TI company, gives full play to the hardware resource performance of DSP, finishes the data in real time compression work and passes to main frame according to user's order.Whole software with original image and user command as data source, with the compression result end of file.
Be illustrated in figure 3 as multi-disc DSP pipelined-flash processing mode synoptic diagram on the Python/C6 image processing board of the present invention.Every DSP individual processing one circuit-switched data of parallel processing mode is finished a complete compression algorithm task, after each circuit-switched data all disposes, all modules is exported simultaneously.The advantage of this structure is that Task Distribution is simple, and each DSP function, algorithm are identical, is easy to realize.In system of the present invention, characteristics in conjunction with many DSP image processing board, adopted the method for parallel processing of timesharing flowing water, that is: with the hyperspectral image data of importing, according to the size of the memory buffer of each DSP configuration, be divided into a certain size frame, flowing water is given each DSP in chronological order, and the result of each DSP also combines in chronological order, is transferred to main frame 10 by pci bus.
Selected DSP is the TMS320C6201 chip of TI company in the present embodiment, and CPU can visit IDRAM twice in a clock period, and comparing will be through the external memorizer of EMIF extended memory interface and external bus, and efficient is much higher.In order to give full play to the performance of DSP, will be the buffer zone of IDRAM as exchanges data.But for the compression of images of needs processing mass data, the IDRAM capacity is too little, can not satisfy the needs of rapid data input and output.For this reason, adopted the two-level cache structure: chip external memory SDRAM (16MB) is as frame buffer, and IDRAM (64KB) is as the image subblock buffer memory.Raw image data earlier input is temporarily stored in the frame buffer, is that unit sends in the sheet block cache and handles to CPU with sub-piece again.The dma controller of C6201 has the passage of 4 separate programmings, allows the DMA that carries out 4 different contents to transmit.For the intensive image compression system of storage, the I/O handling capacity is most important to the processing power and the efficient of system.Utilize Python/C6 to go up four DMA of C6201, can realize two-stage I/O buffering, i.e. the exchange of view data relatively slow SDRAM storer from the bus to C6201, and the SDRAM storer is to the exchange of the interior high-speed data RAM of sheet of C6201.Like this, data compression process can be carried out among the high-speed data RAM in sheet, and the handling capacity of data is greatly improved.
Be illustrated in figure 4 as monolithic DSP two-stage double buffering streamline workflow synoptic diagram.Realize of the operation of first order input equipment respectively with DMA2 and DMA3 to incoming frame buffer memory BufFrameIn and output frame buffer memory BufFrameOut to output device, with DMA0 and DMA1 realize respectively second level incoming frame buffer memory BufFrameIn in the sheet in sub-block cache BufBlockIn and the sheet block cache BufBlockOut operate to output frame buffer memory BufFrameOut.This two-stage has all been utilized ping-pong buffer, and the method for using pipeline parallel method to handle makes input and output and data compression process carry out simultaneously.Dotted line among the figure and solid line are respectively the operation of two mutual exclusions, can not carry out simultaneously, but can carry out simultaneously with the operation that a kind of line is represented.The operation that dotted line and solid line are represented is alternately carried out and is formed streamline.Concrete pipeline parallel method processing procedure following (establishing two level production line initialization filling finishes):
1) starts DMA2, gather the next frame view data to BufFrameIn1 from input equipment;
2) start DMA3, the result outputs to pci bus from BufFrameOut1 with the previous frame compression of images;
3) start DMA0, next image subblock among this frame image data BufFrameIn2 is sent to BufBlockIn2;
4) start DMA1, will go up an image subblock compression result and be sent to BufFrameOut2 from BufBlockOut2;
5) this image subblock among the compression treatments B ufBlockIn1, the result puts into BufBlockOut1;
6) wait transmits end up to DMA0, DMA1, and repeating step 3,4,5 also is used alternatingly sub-block cache in two sheets, all compresses up to this frame to finish
7) wait for and to transmit end that repeating step 1,2,3,4,5,6 also is used alternatingly and extends out frame buffer, begins to compress subsequent frame up to DMA2, DMA3.
Such processing procedure makes the transmission of 4 DMA channel datas and DSP kernel compression work parallel fully, and has guaranteed that main calculation task carries out in sheet is internally cached, has given full play to the performance of system hardware, has improved data throughput capabilities.
Shown in Fig. 5-1 and Fig. 5-2, the hyper spectrum image compression method in the present embodiment has made full use of the noisiness of image, before image is compressed, at first will estimate the signal to noise ratio (S/N ratio) of image.Native system to the basic thought of signal noise ratio (snr) of image estimation is: owing to select a certain size homogeneous area relatively more difficult, just segment the image into zonule one by one, can think basically in these zonules uniformly; Calculate LSD (Local Standard Deviation, local standard is poor) in these zonules respectively as the local noise size, and select the average noise of that maximum interval LSD of sum as entire image.Concrete operation steps is as follows:
Image segmentation is become 4 * 4, or 5 * 5 ..., or 8 * 8 fritter, for each image subblock, the LM of signal (Local Mean local mean value) is obtained by following formula:
Here, Si is the gray-scale value of i pixel in the image subblock; N is the sum of all pixels in the image subblock.LSD is obtained by following formula:
For the sub-piece of uniform image, LSD is less, and to uneven image subblock, as comprises the sub-piece of image border or textural characteristics, and LSD is then bigger.Calculate the LM (being designated as LMo) of entire image, the LSD of the sub-piece of all images, and find out minimum and maximum LSD in the sub-piece of all images.
Between minimum and maximum LSD, set up several equivalent intervals at interval.The LSD of all sub-pieces is entered corresponding interval successively according to the size of value.Number to each interval LSD is counted, and the mean value of that interval LSD of count value maximum is the noise of entire image, is designated as LSDo.
Can try to achieve the signal to noise ratio snr of entire image by following formula:
Be that its basic step is: step 51, original image are input to original image input block 2011; Step 52 is estimated by 2012 pairs of input picture signal to noise ratio (S/N ratio)s of signal noise ratio (snr) of image evaluation unit; Step 53, image subblock cutting unit 2013 is divided into 8 * 8 image subblocks one by one with image; Step 54, the image subblock two dimension quantizes the discrete cosine transform (2DCT) that 2014 pairs of each image subblocks in cosine transform unit carry out two dimension; Step 55, signal noise ratio (snr) of image reconstruction unit 2015 according to the signal-to-noise ratio (snr) estimation result to conversion after data quantize, make the reconstructed image signal to noise ratio (S/N ratio) greater than original image signal to noise ratio (S/N ratio) 10db; Step 56, data are carried out the Huffman coding after 2016 pairs of quantifications of coded image data compression unit, realize the compression to view data.
Consult Fig. 6 and be masking by noise effect experiment principle schematic.Adopt a desirable image that is not subjected to noise as original input signal, add not homoscedastic zero-mean white Gaussian noise therein, as noisy input signal; Employing is carried out the CR multiplication of voltage to the signals and associated noises of importing and is contracted based on the JPEG compression algorithm of DCT; Packed data is decompressed the reconstructed image of getting back.Consult Fig. 7 and be masking by noise effect experiment result curve figure.Among the figure, horizontal ordinate is σ
c 2/ σ
i 2, i.e. the ratio of quantizing distortion variance and input noise variance, ordinate are σ
2/ σ
i 2, i.e. the ratio of reconstructed image overall noise variance and input noise variance, as shown in the figure, relation curve when three curves represent respectively that input signal-to-noise ratio is 50db, 35db, 20db.As seen from the figure, work as σ
c 2/ σ
i 2Behind the<-10db, the curve under three different input noises begins to trend towards simultaneously 0, i.e. σ
i 2≈ σ
2(reconstructed image overall noise variance approximates the input noise variance), this shows that quality of reconstructed images almost depends on the size of input noise, and irrelevant with compression noise (quantizing noise).Thus, also drawn the result that chooses of optimal compression noise: be lower than more than the input noise 10db as long as control compression noise (quantizing noise), i.e. σ
c 2/ σ
i 2<-10db just can strengthen the data compression dynamics under the situation that does not increase the reconstructed image distortion.
Compression method based on masking by noise of the present invention is exactly at σ
c 2/ σ
i 2Realize on the basis of<-10db.Lift an OMIS (practical modularization imaging spectrometer) HYPERSPECTRAL IMAGERY example of compression.For noisy OMIS HYPERSPECTRAL IMAGERY, its original image signal to noise ratio snr i is:
Reconstructed image signal to noise ratio snr o is:
By masking by noise effect experiment result, order
Substitution SNRo,
Therefore, for the lossy compression method of noisy HYPERSPECTRAL IMAGERY, as long as control reconstructed image signal to noise ratio snr o than original image signal to noise ratio snr i greater than more than the 10db, just can guarantee the compression multiple of raising image under the situation that does not increase the reconstructed image distortion.Based on this thought, each wave band data of OMIS image is carried out in various degree lossy compression method, control the SNRo size by the quantizing distortion that changes compression algorithm, make each wave band SNR
o=10+SNR
iBe depicted as compression method application example curve map as Fig. 8-1 and Fig. 8-2 based on masking by noise.Fig. 8-the 1st wherein, the signal to noise ratio (S/N ratio) curve map of each wave band original image of OMIS and reconstructed image; Fig. 8-the 2nd, each band image ratio of compression curve map of OMIS.From figure as can be seen, the view data of arbitrary wave band has all obtained maximum compression according to its noise pollution situation, and reconstructed image is because its SNRo remains the big 10db of SNRi than original image, the basic free of losses of image information, image information has obtained good fidelity.