The utility model content
The utility model provides a kind of device of image processing, can handle flexibly view data, and reduce the volume of system, has reduced the cost of system.
The utility model provides a kind of device of image processing, and described device links to each other with imageing sensor, and described device comprises: the flush bonding processor of at least one processing that is used for carrying out collection, compression and the playback process of view data.
Described embedded processing implement body comprises: be used for from the imageing sensor image data image acquisition units, be used for that the data of gathering are compressed the image compression unit of processing and the data that are used for compression is obtained are carried out at least one unit of the image reproducing unit of playback process, wherein, described image acquisition units is connected with described image compression unit, and described image compression unit is connected with described image reproducing unit.
Described image acquisition units specifically comprises:
Be used for to imageing sensor send acquisition parameter the acquisition parameter output interface, be used for to imageing sensor tranmitting data register frequency the master clock output unit, be used to receive the pixel clock receiving element of the pixel clock that imageing sensor sends and be used for the data acquisition performance element of the acquisition function of carries out image data; Described acquisition parameter output interface links to each other with imageing sensor, and described master clock output unit links to each other with imageing sensor, and described pixel clock receiving element links to each other with imageing sensor, and described data acquisition performance element links to each other with imageing sensor.
Described image reproducing unit specifically comprises:
Be used for according to the file header information obtained set up look-up table and inverse quantization table the table structural unit,
But be used for decision block decompress the data block obtain whether within the indication range of equipment and will be in the cutting unit of the output of the data block within the equipment indication range,
Be used for the data after the conversion are carried out the downsampling unit of the down-sampling processing of luminance component,
One end of described table structural unit links to each other with the data message acquiring unit of the file header information that is used to obtain compressed file, the other end links to each other with the piece decoding unit that is used for compressed file is carried out the piece decompression, also has an end with the particular content that is used for according to the table structural unit converter unit that output block carries out conversion process to be linked to each other;
One end of described cutting unit links to each other with described decoding unit, and the other end links to each other with described converter unit;
Described downsampling unit links to each other with described converter unit.
The technical scheme that is provided by above-mentioned the utility model as can be seen, the utility model adopt flush bonding processor to view data gather, at least one processing in compression and the playback process, reduced the volume of system, reduced the cost of system, and can handle flexibly view data.
Embodiment
The utility model adopts flush bonding processor to realize at least one processing in collection, compression and the playback process of view data, promptly, flush bonding processor of the present utility model can be gathered, press and compile and playback process, perhaps gather, any two processing in compression and the playback process, perhaps gather, any one processing in compression and the playback process.The concrete structure of flush bonding processor of the present utility model comprises at least one unit in image acquisition units, image compression unit and the image reproducing unit as shown in Figure 2, wherein,
Image acquisition units is used for from the imageing sensor image data;
Image compression unit is used for linking to each other with image acquisition units, and the data of image acquisition units collection are compressed processing;
The image reproducing unit is used for linking to each other with image compression unit, and the data that the image compression unit compression obtains are carried out playback process.
Wherein, image acquisition units comprises:
The acquisition parameter output interface is used for linking to each other with imageing sensor, sends acquisition parameter to imageing sensor; Specifically can send acquisition parameter to imageing sensor by the serial data and the serial clock of flush bonding processor; This acquisition parameter is stored in the internal register of imageing sensor;
The master clock generation unit is used to produce clock frequency;
The master clock output unit is used for linking to each other with the master clock generation unit, and to imageing sensor tranmitting data register frequency, this clock frequency is as the master clock of imageing sensor;
The pixel clock receiving element is used for linking to each other with imageing sensor, receives the pixel clock that imageing sensor sends; The size of this pixel clock is determined according to the concrete parameter in the internal register of imageing sensor, and is produced by master clock;
The data acquisition performance element is used for linking to each other with imageing sensor, under the driving of pixel clock, and the acquisition function of carries out image data;
Synchronization signal unit is used for linking to each other with imageing sensor, initial with the row and column of imageing sensor synchronous transmission view data respectively by row, field sync signal.
This image reproducing unit specifically comprises:
The data message acquiring unit is used for linking to each other with image compression unit, obtains the file header information of compressed file;
The table structural unit is used for linking to each other with piece decoding unit, converter unit and data message acquiring unit, sets up look-up table and inverse quantization table according to the file header information of obtaining; This look-up table and inverse quantization table are used for carrying out under the situation of image operation at needs, directly find out the result from look-up table and inverse quantization table according to the parameter of computing, so that save time;
The piece decoding unit is used for linking to each other with the cutting unit, and compressed file is carried out the processing that piece decompresses, and the transmission of data blocks after piece decompressed is to the cutting unit;
The cutting unit decompresses the data block obtain whether within the indication range of equipment but be used for decision block, and will be in the transmission of data blocks within the equipment indication range to converter unit;
Converter unit is used for linking to each other with the cutting unit, receives the output block of cutting unit, and according to the particular content of table structural unit output block is carried out conversion process;
Downsampling unit is used for linking to each other with converter unit, the data after the conversion is carried out the down-sampling of luminance component and handles;
Color transformed unit is used for view data is transformed to the form that display unit can show;
Display unit is used for the result of converter unit is exported on display device.
Processing method to flush bonding processor of the present utility model is described in detail below.This processing method comprises: the collection of view data, compression and playback three phases are described in detail the processing procedure of this three phases respectively below.
The gatherer process of view data comprises the steps:
Step 1: flush bonding processor sends acquisition parameter and master clock frequency to imageing sensor;
Step 2: imageing sensor receives acquisition parameter and the master clock frequency that flush bonding processor sends, and this acquisition parameter is stored in the internal register, obtains pixel clock by master clock;
Step 3: imageing sensor sends view data and pixel clock to flush bonding processor;
Step 4: flush bonding processor receives view data according under the driving of pixel clock, and by row, field sync signal row and column initial of synchronous images data respectively.
After the entire image data acquisition finished, flush bonding processor compressed processing to the view data that collects.In compressing the process of processing, use standard-compression algorithm to compress, document size is further dwindled.And, in the process that compression is handled, after the part compression of view data is finished, with the compression after file storage to alternative document system (such as storage mediums such as flash memory, storage card, hard disks), afterwards, carry out the compression of other parts of view data again and handle, and the file storage after will compressing finishes up to the whole image data compression to the alternative document system.Adopt this compression method, can reduce the memory consumption of flush bonding processor, so that improve the processing speed of flush bonding processor.
Need carry out under the situation of playback process the view data after the compression, the step of this playback process comprises:
Step 1: flush bonding processor is resolved the form of view data, obtains the file header information of compressed file; This document header can comprise: information such as the picture size in the file header, sample mode, color depth;
Step 2: set up look-up table and inverse quantization table by file header information; Promptly in advance the operation result of image operation is made into look-up table and inverse quantization table, when requiring calculation, direct lookup result from table;
Step 3:, carry out the piece decoding processing of compressed file at different display devices;
Step 4: but whether the data block that the piece decoding processing obtains in the determining step 3 is within the indication range of equipment, but if within the realistic ranges of equipment, then this data block is carried out processing such as conversion, down-sampling, with demands such as the display resolution that adapts to relevant device, color types; But to the data block beyond the realistic ranges of the equipment of being judged as, then return execution in step 3, finish up to the decoding of compressed file piece; Like this, but the data block beyond the realistic ranges of equipment is not done any processing, significantly saved the time of implementation;
Step 5: image is sent to display device through graphic interface.
Use with typical case of the present utility model below: under the situation of ARM (senior compacting instruction set processor), on the ARM platform, realize that the camera function of terminal is an example, embodiment of the present utility model is described in detail as flush bonding processor.
The flush bonding processor in the terminal of the utility model embodiment and the connection diagram of imageing sensor are as shown in Figure 3, comprise in the structure chart shown in Figure 3: the flush bonding processor that is used to realize collection, compression and the playback process of view data, imageing sensor, this imageing sensor directly is connected with flush bonding processor.This flush bonding processor links to each other by serial data, serial clock, master clock, pixel clock, data/address bus and row, field synchronization bus with imageing sensor, wherein,
Serial data, clock bus are used for the register of initial configuration imageing sensor;
The master clock of imageing sensor is produced by flush bonding processor;
Pixel clock, determine according to register by imageing sensor, and obtain, specifically master clock eight frequency divisions can be obtained pixel clock by the master clock frequency division, be that pixel clock is 1/8th of a master clock size, pixel clock links to each other with INT (external interrupt) pin of flush bonding processor;
Data/address bus links to each other with GPIO (general input and output) port of flush bonding processor, is used for transmit image data;
Capable, field sync signal is distinguished the initial of synchronous row and column.
The gatherer process of the image of the utility model embodiment comprises the steps:
Step 1: flush bonding processor is by the register of serial data, clock bus configuration image transducer, and the master clock of generation imageing sensor;
Step 2: imageing sensor is according to the size of in the step 1 configuration result of register being determined pixel clock, and obtains pixel clock by master clock eight frequency divisions; The pixel clock that why is provided with is littler than master clock, be in order to make flush bonding processor that the sufficient processing time be arranged, this is operations such as man-machine interface is operated because flush bonding processor in the process of carrying out images acquired, also may be carried out response simultaneously, the conventional fortune of execution is leaned on;
Step 3: imageing sensor sends view data and pixel clock to flush bonding processor;
Step 4: flush bonding processor receives view data according under the driving of pixel clock, and by row, field sync signal row and column initial of synchronous images data respectively; In the image data transmission process, when image data transmission to flush bonding processor, can cause the interruption of flush bonding processor, and make flush bonding processor enter service routine; Be in the process of service routine GPIO port reads image data in the flush bonding processor at flush bonding processor; After view data reads and finishes, the image data transmission that reads in internal memory, is handled with products for further.
After the entire image collection finishes, the view data that collects is compressed processing.Image compression is used YUV420 (a kind of sample mode) sample mode in JPEG (a kind of compression standard) standard-compression algorithm.In the process that compression is handled, after the part compression of view data is finished, with the compression after file storage to alternative document system (such as storage mediums such as flash memory, storage card, hard disks), afterwards, carrying out the compression of other parts of view data again handles, and the file storage after will compressing finishes up to the whole image data compression to the alternative document system.
The schematic diagram of YUV420 sample mode is as shown in Figure 4:
As can be seen from Figure 4, initial data is Y (brightness), Cb, Cr (Cb, Cr are referred to as color difference components), after YUV420 sample mode down-sampling, the insensitive Cb of human eye, Cr chromatic component are down sampled to 8 * 8 from 16 * 16, and initial data Y remains unchanged, and has significantly reduced the demand to memory space.
After the entire image compression finishes, the file after the compression is carried out playback process, the playback process flow process of compressed file comprises the steps: as shown in Figure 5
Step 1: read the file header of compressed file, and judge whether the form of this document head is correct, if correct, execution in step 2, otherwise finish;
Step 2: rebuild Hafman decoding table, inverse quantization table according to the file header information that reads;
Step 3: compressed file is carried out the piece decode operation;
Step 4: whether the data block that the piece decode operation obtains in the determining step 3 enters the viewing area of terminal LCD (LCD), if then execution in step 5, if not, then judge whether to arrive the compressed file end, if not, then execution in step 3, if arrive the compressed file end, then finish;
Step 5: data block is carried out the operation of piece inverse quantization, inverse discrete cosine transformation, and wherein DC component is carried out the guards escorting prisoners according to original value and is divided coding, and the view data after obtaining afterwards reducing, this view data are the YUV420 forms; These two steps have been used the inverse quantization table of previous reconstruction, have accelerated processing speed equally;
Step 6: the view data of YUV420 form is carried out the operation of luminance component down-sampling, because Cb in the view data and Cr component have carried out down-sampling when compression, so only need carry out down-sampling to the Y component; The algorithm that the Y component is carried out down-sampling is: itself, right, down, four points in bottom right do average, concrete schematic diagram as shown in Figure 6, this down-sampling algorithm computing is simple, has saved the processing time.View data behind down-sampling, size are with the LCD size match;
Step 7: the translation operation of YCbCr to rgb color space carried out in pointwise, converts view data to LCD receptible rgb format;
Step 8: export this data block, and judge whether to arrive the compressed file ending, if, then finish, otherwise, execution in step 3.
Such as: the view data after the compression is of a size of 640 * 480, and terminal LCD is of a size of 176 * 224, and in order to adapt to the demonstration of LCD, (step 4) and down-sampling are handled (step 6) to carry out cutting to the view data after the compression.The method of handling is, reduces 352 * 448 (by finishing dealing with of step 4) from 640 * 480 earlier, it is down sampled to 172 * 224 (by finishing dealing with of step 6) again.These algorithms intersect in the JPEG decode procedure and carry out, and have reduced the number of times of access images data, thereby have improved efficient.
The above; it only is the preferable embodiment of the utility model; but protection range of the present utility model is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the utility model discloses; the variation that can expect easily or replacement all should be encompassed within the protection range of the present utility model.Therefore, protection range of the present utility model should be as the criterion with the protection range of claims.