CN1212723C - Digital image processing method and device - Google Patents
Digital image processing method and device Download PDFInfo
- Publication number
- CN1212723C CN1212723C CN 02121818 CN02121818A CN1212723C CN 1212723 C CN1212723 C CN 1212723C CN 02121818 CN02121818 CN 02121818 CN 02121818 A CN02121818 A CN 02121818A CN 1212723 C CN1212723 C CN 1212723C
- Authority
- CN
- China
- Prior art keywords
- data
- image
- foreground
- aforementioned
- background
- 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.)
- Expired - Lifetime
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
The present invention provides a digital image processing method and a processing device. The digital image processing method is divided into an encoding flow path and a decoding flow path, wherein the encoding flow path comprises: obtaining image background information; obtaining information of raw images; separating foreground information; generating headers of the images; encoding the images; the decoding flow path comprises: obtaining the information of encoding images; analyzing the headers of the images; reading out the wafer of the information; decoding the images. The present invention separates the foreground information from the background information of the digital images, newly records the foreground information, and recoveries the images. The present invention can effectively reduce information quantity of the images, and improves digital image processing efficiency.
Description
Technical field
The present invention relates to digital image processing techniques, particularly separate with background data, the new record foreground data of laying equal stress on and go back the digital picture coding and decoding method and the device thereof of original image about a kind of foreground data with digital picture.
Background technology
Because the data volume of digital picture is very huge, under the situation that does not have compression, the purpose that needs very high frequency range and system effectiveness just can reach data processing.Compress technique such as GIF, JPG, PIC etc. commonly used at present, some is the distortion compression, some is undistorted compression.The compression factor of distortion compression is higher usually, and the compression factor of undistorted compression is then lower.But for these compress techniques, all be that whole pictures is compressed, and in advance image do not carried out pre-process, compression factor is affected.Because general image, its required foreground data may only concentrate on regional area, for example only accounts for 20%, and all the other zones only are background data.If this foreground data can be separated in advance with background data, then can effectively save the size of image.
In addition, for image sensor (Image sensor), because the sensitivity (sensitivity) and analog-digital converter (the Analog-to-Digital Converter of image sensor, ADC) cause, zone for the homogeneous background color when scan image may have different output valves, influences scanning quality.
Summary of the invention
Because the problems referred to above the objective of the invention is to propose a kind of image coding and decoding method and device thereof, use foreground data is separated with background data, write down foreground data and background information again, image data amount is reduced.
Another object of the present invention is to propose a kind of image coding and decoding method and device thereof, uses foreground data is separated with background data, writes down foreground data and background information again, makes the image data amount minimizing and makes the background area color identical.
Another object of the present invention is coding and decoding method and the device thereof that proposes a kind of background data conversion, uses foreground data with after background data separates, and will store the directly background data displacement to be predetermined of background data field.
For this reason, the invention provides a kind of digital picture coding method, this method comprises the following step: the pixel critical value that obtains background data; Obtain a unpressed raw digital image data; Separate foreground data, separate aforementioned raw digital image data, produce a foreground data according to the pixel critical value of aforementioned background data; Produce the image header, this image header comprises the pixel critical value of aforementioned background data and the width and height of aforementioned raw digital image data; Image encoding is encoded aforementioned foreground data and is exported a data packet, and this data packet has comprised this foreground data with respect to the ranks position of image, width and the height and the foreground data of this foreground data; And this data packet combines the generation coded image data with this image header.
The present invention also provides a kind of digital image decoding method, and this method comprises the following step: obtain coded image data; Separate coded image data, image header in this coded image is separated with a data packet, this image header comprises the width and height of the pixel critical value of a background data and image, and this data packet comprises at least one foreground data and this foreground data ranks position with respect to original image; And the data format analysis, be used to obtain background data, foreground data with respect to the ranks position of original image, the width and the height of original image; Reconstructed picture according to earlier figures image scale head, writes the aforementioned opposite position of this image with the aforementioned foreground data of each data packet, and the zone that does not dispose foreground data writes the pixel critical value of aforementioned background data.
The present invention also provides a kind of digital image coding device, and this device comprises: the parameter setting unit, set the pixel critical value of a background data; The view data separative element is coupled to this parameter setting unit, according to the pixel critical value of aforementioned background data, separates a unpressed raw digital image data, produces at least one foreground data, and width, height and the form of exporting whole image; The foreground data storage element is coupled to this view data separative element, stores aforementioned foreground data; The data format generation unit in order to width, height and the form that receives aforementioned digital picture, and produces an image header, and this image header comprises the pixel critical value of aforementioned background data and the width and height of aforementioned raw digital image data; And coded image data unit, the foreground data of aforementioned foreground data storage element is encoded to export a data packet, this data packet is combined with earlier figures image scale head, to produce coded image data, wherein, this data packet has comprised this foreground data with respect to the ranks position of image, width and the height and the foreground data of this foreground data.
The present invention also provides a kind of digital image decoding device, this device comprises: a view data separative element, image header in this coded image is separated with a data packet, this image header comprises the width and height of the pixel critical value of a background data and image, and this data packet comprises at least one foreground data, this foreground data ranks position with respect to original image; One data packet storage element is used for storing the data packet that earlier figures is separated as the data separating unit; And the data format unit, be used to obtain background data, foreground data with respect to the ranks position of original image, the width and the height of original image; One view data recomposition unit according to earlier figures image scale head, is recorded in this opposite position with this foreground data in the data packet, and the zone that does not dispose foreground data writes the pixel critical value of this background data.
Digital image processing method of the present invention and processing unit, foreground data is separated with background data, write down foreground data and background information again, and background data can be replaced by a background data that has been predetermined, can reduce image data amount effectively, improve the usefulness of Digital Image Processing.
Description of drawings
Fig. 1 is the coding unit Organization Chart of image processing apparatus of the present invention;
Fig. 2 is the separation schematic diagram of view data separative element to n row view data;
Fig. 3 is the coding flow chart of image processing of the present invention;
Fig. 4 is the decoding unit Organization Chart of image processing apparatus of the present invention;
Fig. 5 is the reorganization schematic diagram of view data recomposition unit to n row view data;
Fig. 6 is the decoding process figure of image processing of the present invention.
Embodiment
Below with reference to accompanying drawing, image coding and decoding method of the present invention and device thereof are described in further detail.Image coding and decoding method of the present invention and device thereof are the modes of utilizing foreground data to separate with background data, and the foreground data of an image is taken out recompile, and the information of record background data.For general pattern, the data volume of foreground data is much smaller than the data volume of whole image, so the data volume of the image of recompile can greatly reduce.
Figure 1 shows that the Organization Chart of picture coding device of the present invention.As shown in the drawing, the code device 10 of this image comprises a parameter setting unit 11, a view data separative element 12, a foreground data storage element 13, a data format generation unit 14, graphics processing unit 16 and a coded image data unit 15.
Parameter setting unit 11 is to allow the user set the data of desiring coded image, for example background data.12 of view data separative elements are not belong to the pixel separation of background data, are stored to foreground data storage element 13.This view data separative element 12 is to classify processing unit as, first foreground data to the pixel data between last foreground data in the image of one row is recorded in foreground data storage element 13, and writes down first foreground data and last foreground data simultaneously in the position of these row.View data separative element 12 also can export the size and the form of whole image to data format generation unit 14.Below can describe the action of image data separating unit 12 again in detail.Data format generation unit 14 is the image headers that are used for producing this view data, in order to the background data that writes down this image, the height of image and the width of image etc.15 foreground data with foreground data storage element 13 in coded image data unit are encoded into data packet with block (block), and produce coded image behind the combining image header.
In addition, coded image data unit 15 also can comprise a compression unit (figure does not show), uses each data packet of compression, further contracts and falls the coded image size.Compression function can be selected suitable compressed format, for example compression forms such as GIF, JPG, PIC.And the compressed format identification code is additional to the image header, the identification so that decoding to be provided.
The separation schematic diagram of the 12 pairs of n row view data in Fig. 2 presentation video data separating unit.This n row view data has z pixel, supposes that each pixel is 8 bit data, and therefore every row image needs the memory of z byte (byte) to store.If the critical value setting of background data is 05H and is foreground data greater than the pixel definition of this background data critical value that then first foreground data is the x+4 pixel, last foreground data is the y+1 pixel.So, after the separation through view data separative element 12, last foreground data of first foreground data to the y+1 pixel of x+4 pixel is stored to foreground data storage element 13.Simultaneously, also with position information storage such as x+4 and y+1 in foreground data storage element 13, or with the length information storage such as (y+1)-(x+4)+1 of x+4 position and foreground data in foreground data storage element 13.Therefore, after 12 processing of view data separative element, the data volume that is stored to foreground data storage element 13 can obviously reduce.And the data packet form of every row comprises foreground pixel data and positional information.Because the foreground pixel data packet has been given up the pixel data that belongs to background data in this row front and back pixel, so foreground data storage element 13 stored data volumes obviously reduce.Simultaneously, if the pixel data of permutation all belongs to background data, then can skip this row image.
The setting of background data can be set according to different image category.For example monochromatic different with colored background data.Monochrome image only need be specified a background data, and coloured image then must be specified background datas such as R, G, B.The mode of setting can be to pass through interface setting by the user, or by setting up on their own behind the software analysis image.
Though aforesaid way is that first foreground data of record is to last foreground data, but also can set a background data amount critical value M, and to detect first foreground data simultaneously not the pixel of foreground data to whether continuous N is arranged between last foreground data.If first foreground data more than the continuous N is not the pixel of foreground data to existing between last foreground data, then this row pixel can be stored into the multiple segment data package.So, can further reduce the data volume of this image.
In the said method,, also can merge the ordered series of numbers data, store in the block mode though each data packet is the foreground data that stores every row.At this moment, each data packet need comprise the ranks starting point of this block and the width and height of this block.Coded image data unit 15 is output into coded image with the image header after the digital coding of foreground data storage element 13 is become data packet.Because the data of foreground data storage element 13 only are foreground data, therefore must will include the image header combination of the background data that sets, just can be by decoding device with image restoring.So the image header will comprise the background data that sets at least.Certainly, data packet also can further reduce the size of data packet by compression process.
Between foreground data storage element 13 and coded image data unit 15, a graphics processing unit 16 can also be arranged, this graphics processing unit 16 also can not certainly.Graphics processing unit 16 receives the foreground data of foreground data storage element 13 outputs, and this foreground data is further carried out image processing, for example: image smoothing (Image Smooth), edge reinforcement (Edge Enhance) etc.
In addition, but the present invention's direct replacement background data, need not to rely on for support image processing software, its method by data format generation unit 14 the image header of this view data of generation, get final product in order to the background data that writes down this image with the background data direct replacement that has been predetermined.
Figure 3 shows that the flow chart of image encoding of the present invention.As shown in the drawing, image encoding flow process of the present invention comprises:
Step S302: obtain the background data of image, this background data can be a critical value or an interval value.Certainly, if image is a coloured image, then must provide three groups of background datas such as R, G, B.
Step S304: obtain raw image data.This raw image data should be unpressed data.If the view data of having compressed then can't directly be separated foreground data with background data.
Step S306: separate foreground data.The foreground data of the raw image data obtained is separated with background data.Its separate mode is the pixel data of the pixel data of first non-background data of record to last non-background data, and write down the columns of these row, the locations of pixels of first non-background data and the locations of pixels of last non-background data simultaneously, and then produce a foreground data.
Step S308: produce the image header.This image header writes down the classification of this image, the height of image, the width of image and the background data that sets.Certainly, this image header also writes down identification code, to confirm the coded system of this image.
Step S310: image digitization is handled.Receive above-mentioned foreground data, carry out Digital Image Processing, and export prospect digital processing data.
Step S312: image encoding.Mode with data packet writes down the foreground data of being separated.This data packet has comprised this foreground data with respect to the ranks position of image, the size and the foreground data of this foreground data.This data packet can single-row mode writes down the foreground data of every row image, can also the block mode writes down the foreground data of ordered series of numbers image.Certainly, data packet can further reduce the size of data packet by compressed action.Compression function can be selected suitable compressed format, for example compression forms such as GIF, JPG, PIC.
Figure 4 shows that picture decoding apparatus Organization Chart of the present invention.As shown in the drawing, this picture decoding apparatus 40 comprises a view data separative element 41, a data format analytic unit 42, a data packet storage element 43 and a view data recomposition unit 44.
View data separative element 41 is that the image header in the received coded image is separated with the view data package, exports the image header to data format analytic unit 42, and the view data package is stored to data packet storage element 43.44 background datas that produced according to data format analytic unit 42 of view data recomposition unit are set background data, and after reading the foreground data package from data packet storage element 43, according to the position data of this foreground data package, foreground data is disposed at the ranks position in the image that is write down.Positional information in the data packet includes the initial and end position of column information and data, therefore, view data recomposition unit 44 can be apace with data recombination in the tram.Certainly, if the compressed format identification code of image header for compressing, after then view data recomposition unit 44 can decompress each data packet earlier and obtain every row foreground data, just is disposed at foreground data the ranks position in the image that is write down.
Between data packet storage element 43 and view data recomposition unit 44, a graphics processing unit 45 can also be arranged.This graphics processing unit 45 receives the foreground data of data packet storage element 43 outputs, and this foreground data is further carried out image processing, for example: image smoothing (Image Smooth), edge reinforcement (Edge Enhance) etc.
In addition, but the present invention's direct replacement background data need not to rely on for support image processing software, and its method directly gets final product with the background data displacement that has been predetermined for the background data at this image of record.
The schematic diagram of 44 pairs of n row view data reorganization of Fig. 5 display image data recomposition unit.The information that view data recomposition unit 44 is provided according to the image header can obtain the width z and the length of background data, image.Therefore, every row view data has z pixel, and each pixel is 8 bit data, and background data is set at 00H.After view data recomposition unit 44 reads each data packet in regular turn, view data is inserted the specified position of positional information according to the position data of data packet.For example, be example with Fig. 5, the positional information of data packet shows that this view data is the pixel of the x+4 to y+1 of n row.So, as long as the view data of data packet is inserted in regular turn the location of pixels of the x+4 to y+1 of n row.Therefore, view data recomposition unit 44 can be fast and is correctly restored view data.
Figure 6 shows that the decoding process figure of image processing of the present invention.As shown in the drawing, the decoding process of image processing of the present invention comprises:
Step S602: obtain coded image data, this coded image is the coded generation of coding step according to the present invention.
Step S604: analysis image header.Isolate the image header from the coded image data of obtaining.This image header writes down the classification of this image, the height of image, the width of image and the background data that sets.Certainly, this image header also writes down identification code, to confirm the coded system of this image.
Step S606: reading of data package.Isolate each data packet from the coded image data of obtaining.Each data packet has comprised this foreground data with respect to the ranks position of image, the size and the foreground data of this foreground data.
Step S608: image digitization is handled.Receive above-mentioned foreground data, carry out Digital Image Processing, and export prospect digital processing data.
Step S610: picture decoding.According to the image header, the foreground data of each data packet is write the ranks position of the image that this data packet writes down.The image-region that does not write down foreground data then writes background data.If the compressed format identification code of image header is for compressing, after then this step can decompress each data packet earlier according to the specified compressed format of compressed format identification code, just foreground data is write the ranks position of the image that this data packet writes down.
Background data in the above-mentioned steps can be the background data of image header, also can be the color that the user sets through interface.Therefore, image processing method of the present invention can change background data apace.
Image processing method of the present invention can be applicable to image capturing devices such as scanner, digital camera, digital photographic machine, and when especially being applied to scan monochrome image, its effect is the most remarkable.
Though more than with embodiment the present invention is described, therefore do not limit scope of the present invention, only otherwise break away from main idea of the present invention, various distortion or change that the sector person carries out all should be encompassed within the claim scope of this case.
Claims (14)
1. digital picture coding method, it is characterized in that: this method comprises the following step:
Obtain the pixel critical value of background data;
Obtain a unpressed raw digital image data;
Separate foreground data, separate aforementioned raw digital image data, produce a foreground data according to the pixel critical value of aforementioned background data;
Produce the image header, this image header comprises the pixel critical value of aforementioned background data and the width and height of aforementioned raw digital image data;
Image encoding is encoded aforementioned foreground data and is exported a data packet, and this data packet has comprised this foreground data with respect to the ranks position of image, width and the height and the foreground data of this foreground data; And
This data packet combines with this image header, produces coded image data.
2. digital picture coding method as claimed in claim 1 is characterized in that: also comprise image processing step in the wherein aforementioned separation foreground data step, receive above-mentioned foreground data, the foreground data of image processing has been carried out in output.
3. digital picture coding method as claimed in claim 1 is characterized in that: wherein the background data that comprised of earlier figures image scale head can be replaced by a background data that has been predetermined.
4. digital picture coding method as claimed in claim 1, it is characterized in that: wherein the aforementioned data package comprises the size of aforementioned foreground data corresponding to the original position in the earlier figures picture and this foreground data, or comprises aforementioned foreground data corresponding to original position in the earlier figures picture and end position.
5. digital image decoding method, it is characterized in that: this method comprises the following step:
Obtain coded image data;
Separate coded image data, image header in this coded image is separated with a data packet, this image header comprises the width and height of the pixel critical value of a background data and image, and this data packet comprises at least one foreground data and this foreground data ranks position with respect to original image; And
Data format is analyzed, and is used to obtain background data, foreground data with respect to the ranks position of original image, the width and the height of original image;
Reconstructed picture according to earlier figures image scale head, writes the aforementioned opposite position of this image with the aforementioned foreground data of each data packet, and the zone that does not dispose foreground data writes the pixel critical value of aforementioned background data.
6. digital image decoding method as claimed in claim 5 is characterized in that: also comprise image processing step in the wherein aforementioned separation coded image data step, receive the above-mentioned foreground data that has read, the foreground data of image processing has been carried out in output.
7. digital image decoding method as claimed in claim 5 is characterized in that: wherein write a preassigned background data in the zone that does not dispose foreground data.
8. digital image coding device, it is characterized in that: this device comprises:
The pixel critical value of a background data is set in the parameter setting unit;
The view data separative element is coupled to this parameter setting unit, according to the pixel critical value of aforementioned background data, separates a unpressed raw digital image data, produces at least one foreground data, and width, height and the form of exporting whole image;
The foreground data storage element is coupled to this view data separative element, stores aforementioned foreground data;
The data format generation unit in order to width, height and the form that receives aforementioned raw digital image data, and produces an image header, and this image header comprises the pixel critical value of aforementioned background data and the width and height of aforementioned raw digital image data; And
The coded image data unit, the foreground data of aforementioned foreground data storage element is encoded to export a data packet, this data packet is combined with earlier figures image scale head, to produce coded image data, wherein, this data packet has comprised this foreground data with respect to the ranks position of image, width and the height and the foreground data of this foreground data.
9. digital image coding device as claimed in claim 8 is characterized in that: wherein aforementioned foreground data storage element also writes down the original position and the end position of foreground data simultaneously.
10. digital image coding device as claimed in claim 8 is characterized in that: wherein also comprise graphics processing unit, between aforementioned foreground data storage element and aforementioned coded image data unit, carry out the image processing of foreground data.
11. digital image coding device as claimed in claim 8 is characterized in that: wherein the aforementioned background data that comprised of earlier figures image scale head is replaced with a background data that has been predetermined.
12. a digital image decoding device is characterized in that: this device comprises:
One view data separative element, image header in this coded image is separated with a data packet, this image header comprises the width and height of the pixel critical value of a background data and image, and this data packet comprises at least one foreground data, this foreground data ranks position with respect to original image;
One data packet storage element is used for storing the data packet that earlier figures is separated as the data separating unit; And
The data format unit is used to obtain background data, foreground data with respect to the ranks position of original image, the width and the height of original image;
One view data recomposition unit according to earlier figures image scale head, is recorded in this opposite position with this foreground data in the data packet, and the zone that does not dispose foreground data writes the pixel critical value of this background data.
13. digital image decoding device as claimed in claim 12 is characterized in that: wherein also comprise graphics processing unit, between aforementioned data package storage element and earlier figures are as the data recombination unit, carry out the image processing of foreground data.
14. digital image decoding device as claimed in claim 12 is characterized in that: wherein the aforementioned background data that comprised of earlier figures image scale head is replaced with a background data that has been predetermined.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 02121818 CN1212723C (en) | 2002-06-06 | 2002-06-06 | Digital image processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 02121818 CN1212723C (en) | 2002-06-06 | 2002-06-06 | Digital image processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1464746A CN1464746A (en) | 2003-12-31 |
CN1212723C true CN1212723C (en) | 2005-07-27 |
Family
ID=29743067
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 02121818 Expired - Lifetime CN1212723C (en) | 2002-06-06 | 2002-06-06 | Digital image processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1212723C (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100722972B1 (en) * | 2004-10-26 | 2007-05-30 | 삼성전자주식회사 | Device and method for processing image signal in digital broadcasting receiver |
EP1655966A3 (en) | 2004-10-26 | 2011-04-27 | Samsung Electronics Co., Ltd. | Apparatus and method for processing an image signal in a digital broadcast receiver |
CN103179402A (en) * | 2013-03-19 | 2013-06-26 | 中国科学院半导体研究所 | Video compression coding and decoding method and device |
CN107968917B (en) * | 2017-12-05 | 2019-10-18 | Oppo广东移动通信有限公司 | Image processing method and device, computer equipment, computer readable storage medium |
-
2002
- 2002-06-06 CN CN 02121818 patent/CN1212723C/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
CN1464746A (en) | 2003-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6192138B1 (en) | Apparatus and method for embedding/unembedding supplemental information | |
CN1044064C (en) | Picture signal coding and decoding methods and picture signal coding and decoding apparatus | |
CN87103561A (en) | The display packing and the device of image | |
KR970701473A (en) | IMAGE INFORMATION ENCODING DECODING SYSTEM | |
EP1355484A3 (en) | Image compression method and apparatus, and image coding method and apparatus | |
CN1058826C (en) | Digital video signal recording and reproducing method and apparatus thereof | |
CN1137154A (en) | Video information recording and reproduction apparatus and method as well as video tape | |
WO1995033337A1 (en) | A method for specifying a video window's boundary coordinates to partition a video signal and compress its components | |
CN1065702C (en) | Adaptive video decompression | |
US6078690A (en) | Image data conversion device and method having function of inserting delimiter code into position in image data where a predetermined amount of data is reached | |
CN1509071A (en) | Image processing apparatus | |
JPH10271529A (en) | Image processor, still image pickup device and image processing method | |
CN1212723C (en) | Digital image processing method and device | |
CN1066893C (en) | An apparatus of digitally recording and reproducing video signals | |
JPH10112862A (en) | Digital data processing method | |
CN1498493A (en) | Method for compression and decompression of image data | |
JP2003531553A (en) | Efficient video data access using fixed compression ratio | |
AU2126088A (en) | Identification information storage and retrieval | |
US7257260B2 (en) | Method and a device for processing digital image | |
CN1050208C (en) | A system for acquiring and playing back a equence of animated video images in real time | |
CN1311690C (en) | Device and method for processing image signal | |
CN1182488C (en) | Data compression method and image data compression equipment | |
CN101489018A (en) | Static image compression method and computer readable storage apparatus | |
CN1145563A (en) | Video isignal recording apparatus | |
CN1126107C (en) | Method for expanding data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CX01 | Expiry of patent term | ||
CX01 | Expiry of patent term |
Granted publication date: 20050727 |