CN102769743B - Method for processing image files - Google Patents

Method for processing image files Download PDF

Info

Publication number
CN102769743B
CN102769743B CN201110120298.6A CN201110120298A CN102769743B CN 102769743 B CN102769743 B CN 102769743B CN 201110120298 A CN201110120298 A CN 201110120298A CN 102769743 B CN102769743 B CN 102769743B
Authority
CN
China
Prior art keywords
coefficient
mcu
image
fragment
image file
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 - Fee Related
Application number
CN201110120298.6A
Other languages
Chinese (zh)
Other versions
CN102769743A (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.)
Altek Corp
Original Assignee
Altek Corp
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 Altek Corp filed Critical Altek Corp
Priority to CN201110120298.6A priority Critical patent/CN102769743B/en
Publication of CN102769743A publication Critical patent/CN102769743A/en
Application granted granted Critical
Publication of CN102769743B publication Critical patent/CN102769743B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a method for processing image files. The method comprises the following steps: providing the image files of images, wherein the image files comprise bit stream and commutative image files data; reading a band indicator and a minimum coding unit indicator on the basis of the expanding range; obtaining reference DC (direct-current) coefficient on the basis of the mixed DC coefficient corresponding to the first minimum coding unit contained within the expanding range; decoding sub-fragments of the minimum coding unit contained within the expanding range corresponding to the bit stream on the basis of the read band indicator, the minimum coding unit indicator and the reference DC coefficient, thereby obtaining at least one minimum coding unit.

Description

The processing method of image file
Technical field
The present invention relates to a kind of processing method of image file, particularly a kind of by the method for image file partial decoding of h.
Background technology
Digital camera utilizes optical sensor pick-up image and is converted to after digital signal, with the form of electronic chart file, the image storage of acquisition is become to image file.One of image file form is Joint Photographics Expert Group JPEG (Joint Photographic Experts Group, JPEG) the most widely at present, and the image file of jpeg format has been used in most digital cameras or other digital product.
And after pick-up image, user often can inspect the image file being stored in digital camera.No matter but exist the image in digital camera to there is how high resolution, user can only inspect reduced image by undersized display screen.Therefore when the part scope in user wants careful checking image, can be by image zoom, to inspect the details of image of part.
Even but only the part scope of image need be amplified and present to user, the most direct processing method still needs whole image file to decode back after full resolution (full resolution), then shows the partial image that user specifies.This way need to have the memory body of the image that can hold full resolution in advance, the operand therefore can expend a large amount of memory body capacity, memory body reading and writing bandwidth and decoding image time.And along with the epoch are progressive, the resolution of image increases fast, the burden while more increasing the weight of to understand code.
In order to reduce required memory body capacity, can consider only the part scope in image is decoded and is shown to user.Correlation technique for example can be referring to U.S. Patent Bulletin the 7th, 480, No. 418.Compared to original file, existing way can increase the size of image file because of added burden (overhead), and makes data compression ratio low.For example, moreover the image file of processing also cannot be applicable to existing and general decoder (jpeg decoder), and has lost exhausted large circulation.
Summary of the invention
From the above, the object of the present invention is to provide a kind of processing method of image file, use and solve in prior art and cannot only the method for the part scope decoding in image or processing image file be had to the operand while expending a large amount of memory body capacity, memory body reading and writing bandwidth and decoding image, added burden is overweight and/or cannot be applicable to the problems such as existing decoder.
The processing method of the disclosed image file of the present invention, in order to decode the part scope in image.
First, one image file of one image is provided.Wherein this image is divided into multiple image blocks (image block), using at least one image blocks as a minimum code unit (minimum coded unit, MCU), and with the MCU of row or multiple row sequentially image is defined as to multiple frequency bands (band).Image file comprises a bit stream (bit stream) and a commutative image file (Exchangeable Image File, EXIF) data.And image file can be a Joint Photographics Expert Group JPEG (Joint Photographic Experts Group, JPEG) form.
Bit stream can represent the packed data of image in a huffman coding (Huffman coding) mode.Bit stream has multiple fragments of corresponding frequency band respectively, and wherein each fragment has multiple sub-fragments.And in each fragment, sub-fragment is the MCU that corresponds respectively to the frequency band corresponding with fragment.
Commutative image file data comprise multiple band indictors (band indicator), multiple MCU indicating device (MCU indicator) and multiple mixed DC coefficient (Hybrid DC coefficient).Wherein band indictor corresponding frequency band respectively, and each band indictor is in order to indicate the position of the corresponding fragment bit of corresponding frequency band in bit stream.Similarly, MCU indicating device is corresponding MCU respectively, and each MCU indicating device is to indicate the position of the corresponding sub-fragment bit of corresponding MCU in fragment.Sequentially corresponding to image direct current (DC) coefficient in each sub-fragment and mix DC coefficient; It is to be a difference type DC coefficient (differential DC coefficient) or a non-difference type DC coefficient (non-differential DCcoefficient) that DC coefficient table (DC table, DC coefficient table) mixes DC coefficient in order to record.In addition, commutative image file also can comprise acquisition parameters when image is captured.
Then the processing method of image file comprises: according to a spread of the partial block in order to select image, read at least one band indictor and a MCU indicating device; The corresponding mixing of first MCU DC coefficient of containing according to spread obtains a benchmark DC coefficient; And according to the band indictor, MCU indicating device and the benchmark DC coefficient that read, by least one of at least one MCU that in bit stream, corresponding spread contains sub-fragment decoding, to obtain the image data of at least one MCU.
Commutative image file data also can comprise a DC coefficient table.And the step of " the corresponding mixing of first MCU of containing according to spread DC coefficient obtains a benchmark DC number " can comprise: consult DC coefficient table, to judge that whether the corresponding mixing of first MCU DC coefficient that spread contains is as non-difference type DC coefficient; When mixing DC coefficient corresponding to first MCU of containing when spread is non-difference type DC coefficient, mixing DC coefficient corresponding to first MCU that spread is contained is as benchmark DC coefficient; And mixing DC coefficient corresponding to first MCU of containing when spread is while being difference type DC coefficient, find the nearest non-difference type DC coefficient of mixing DC coefficient that first MCU of containing from spread is corresponding as benchmark, calculate the benchmark DC coefficient that first MCU is corresponding.
And the processing method of image file also can comprise: show the spread in decoding MCU.
Above-mentioned band indictor can record a fragment length of corresponding fragment, or the fragment original position of corresponding fragment in bit stream.And MCU indicating device can record a fragment length of corresponding sub-fragment, or the sub-fragment original position of corresponding sub-fragment in bit stream or fragment.Wherein the relative address of band indictor or the length of absolute address are identical, and/or the relative address of MCU indicating device or the length of absolute address identical, promote the speed of image file processed to reduce the difficulty of decoding.
And about in the mixing DC coefficient in commutative image file data, difference type DC coefficient is to use 4 to 8 storages, but not difference type DC coefficient can use 8 to 16 storages.
In addition, bit stream is in can also have the mark of restarting after N sub-fragment, and N is positive integer.Wherein there is a non-difference type DC coefficient every N sub-fragment, and non-difference type DC coefficient is corresponding to first image blocks in MCU corresponding to sub-fragment.And the value of restarting mark can be 0xFFD0 to 0xFFD7.
In order to make the processing method of image file can be applicable at large existing encoder (encoder) and decoder (decoder), wherein the value of restarting mark in each fragment can be sequentially 0xFFD0 to 0xFFD7.In more detail, every continuous 8 frequency bands can be defined as to a large frequency band.And the value of restarting mark in 8 fragments corresponding with large frequency band can be sequentially 0xFFD0 to 0xFFD7, in the bit stream that wherein each large frequency band is corresponding, these first values of restarting mark of restarting in mark are 0xFFD0.Can meet like this some decoder runs into first and restarts the essential restriction for 0xFFD0 of mark value.
In sum, do not need whole the image full resolution of all decoding back according to the processing method of image file of the present invention, and a large amount of memory body capacity, memory body reading and writing bandwidth and operand required while saving lower decoding.According in the processing method of image file of the present invention, image file is that required extra information writes on EXIF data and is additional in jpeg file during by partial decoding of h such as band indictors, and the part of bit stream still meets JPEG specification, therefore can be compatible with existing jpeg decoder.And, compared to existing way, according in the processing method of image file of the present invention, the added burden (overhead) that the band indictor increasing in EXIF data causes is smaller, and therefore image file can have outstanding data compression ratio.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Brief description of the drawings
Fig. 1 is one schematic diagram of implementing the image file of example according to the present invention;
Fig. 2 is one schematic diagram of implementing the image of example according to the present invention;
Fig. 3 is one schematic diagram of implementing the bit stream of example according to the present invention;
Fig. 4 is one schematic diagram of implementing the commutative image file data of example according to the present invention;
Fig. 5 A is one schematic diagram of implementing the object bounds of example according to the present invention;
Fig. 5 B is the schematic diagram of the DC coefficient table of corresponding diagram 5A;
Fig. 6 is one flow chart of implementing the processing method of the image file of example according to the present invention; And
Fig. 7 is one schematic diagram of implementing the spread of example according to the present invention.
Wherein, Reference numeral
20 image files
30 bit streams
32 fragments
34 sub-fragments
38 restart mark
39 non-difference type DC coefficient
40 commutative image file data
42 band indictors
44 minimum code unit indicating devices (MCU indicating device)
46 mixed DCs (DC) coefficient
48 direct currents (DC) coefficient table
50 images
52,52a, 52b frequency band
54,54a, 54b, 54c, 54d, 54e, 54f minimum code unit (MCU)
56 image blocks
58 object bounds
59 spreads
Embodiment
Below in conjunction with accompanying drawing, structural principle of the present invention and operation principle are described in detail:
Be in order to according to spread, the part scope in image is decoded according to the processing method of image file of the present invention, and then show the partial image that spread circle is chosen.The processing method of image file can be processed an image file of an image.The processing method of this image file can, according to the only image file of decoded portion of a spread (also can be described as interest window, window of interest, WOI), be used the partial image obtaining in spread.The image file of part refers to the part in single image file.
Fig. 1 is one schematic diagram of implementing the image file of example according to the present invention.
With reference to Fig. 1, image file 20 comprises a bit stream (bit stream) 30 and a commutative image file (Exchangeable Image File, EXIF) data 40.Image file 20 can be a Joint Photographics Expert Group JPEG (Joint Photographic Experts Group, JPEG) form, so the present invention is not limited in Joint Photographics Expert Group JPEG (JPEG) form, and the image file type that such as can reach this object all should contain it.
Fig. 2 and Fig. 3 are respectively according to the present invention one schematic diagram of image and the schematic diagram of bit stream of implementing example.
Please refer to Fig. 2 and Fig. 3, image 50 is divided into multiple continuous image blocks (image block) 56, and using one or more image blocks 56 as a minimum code unit (minimum coded unit, MCU) 54, more sequentially image 50 is defined as to multiple frequency bands (band) 52 with the MCU 54 of row or multiple row.Wherein, the size of image blocks 56 can be for example 8 × 8 pixels (pixel).
Bit stream 30 can represent the packed data of image 50 in a huffman coding (Huffman coding) mode.Image 50 can be used YC bc rthe mode of color space (color space) represents.Wherein, YC bc ry, the C of color space band C rrepresent respectively brightness (Luminance, also referred to as lightness), chroma blue (Chrominance, also referred to as chroma or saturation) and the red color of a pixel in image 50.And each MCU 54 can be expressed as at least one data cell (data unit) with aberration color space.The mode taking MCU 54 as unit, image 50 being sampled and encode has a variety of.For instance, the sampling mode of " 4:2:0 " is to represent that a MCU 54 comprises 4 image blocks 56, and MCU 54 with the chroma blue between brightness and the image blocks 56 of 4 image blocks 56 and red color totally 6 data cell lists show.
In JPEG image standard, the data cell after each compression can represent with an image DC coefficient (DCcoefficient, DC coefficient) and 63 image ac coefficients (AC coefficient, AC coefficient).And bit stream 30 can comprise image DC coefficient and the image AC coefficient of the data cell after huffman coding.Image DC coefficient in bit stream 30 can be with non-difference type (non-differential) or difference type (differential).Wherein the image DC coefficient of non-difference type is that the value that represents this DC coefficient is complete and independently, the image DC coefficient of difference type records the difference of the image DC coefficient of this data cell and a upper data cell.
Therefore, when being that image DC coefficient with difference type represents data cell in bit stream 30, wish to get the complete value of the image DC coefficient representative of knowing a difference type during decoding, just need to find toward the initiating terminal of bit stream 30 the image DC coefficient of a non-difference type nearest from this image DC coefficient, represent the complete DC value of the image DC coefficient of this difference type to utilize the image DC coefficient of nearest non-difference type to calculate.
Bit stream 30 has multiple fragments 32 of the frequency band 52 of corresponding image 50 respectively, and fragment 32 is corresponding with the frequency band 52 in image 50 respectively, and the multiple sub-fragment 34 in a fragment 32 is corresponding with the MCU 54 in frequency band 52 respectively.
In addition, bit stream 30 is in also can have the mark of restarting (RestartMarker, RSTm, or be called RM) 38 after N sub-fragment 34, and N is positive integer.The section start of each fragment 32 also can have a non-difference type DC coefficient 39, and non-difference type DC coefficient 39 is first image blocks 56 corresponding to fragment 32.In other words, in bit stream 30, after N sub-fragment 34, can there is one and restart mark 38, and the section start of at least every N sub-fragment 34 can have a non-difference type DC coefficient 39.The value of wherein restarting mark 38 can be one of 0xFFD0 to 0xFFD7.
Please refer to Fig. 4, it is one schematic diagram of implementing the commutative image file data of example according to the present invention.The EXIF data 40 of image file 20 comprise multiple band indictors (band indicator) 42, multiple MCU indicating device (MCU indicator) 44 and multiple mixing DC coefficients (Hybrid DCcoefficient) 46.In addition, EXIF data 40 also can comprise a direct current coefficient table (DC table, DC coefficient table) 48.
Band indictor 42 is corresponding frequency band 52 respectively, and each band indictor 42 is to indicate 32 of corresponding fragments of corresponding frequency band 52 position in bit stream 30.Similarly, MCU indicating device 44 is corresponding MCU 54 respectively, and each MCU indicating device 44 is to indicate 34 of corresponding sub-fragments of corresponding MCU 54 position in fragment 32.
Wherein band indictor 42 can record a fragment length of corresponding fragment 32, or the fragment original position of corresponding fragment 32 in bit stream 30.44 of MCU indicating devices can record a sub-fragment length of corresponding sub-fragment 34, or the sub-fragment original position of corresponding sub-fragment 34 in affiliated fragment 32 or bit stream 30.That is to say, band indictor 42 or MCU indicating device 44 can carry out addressing by corresponding frequency band 52 or sub-fragment 34 with record absolute address or the mode of relative address.And in order to reduce the difficulty of decoding and then to promote the speed of processing image file 20, all relative address of band indictor 42 or the length of absolute address can be identical.Similarly, all relative addresses of MCU indicating device 44 or the length of absolute address also can be identical.
But in image file 20, band indictor 42 or MCU indicating device 44 also can adopt to mix simultaneously and use the mode of absolute address or relative address that corresponding fragment 32 or sub-fragment 34 are carried out to addressing.As long as note down in modes such as bitmaps (bitmap), just can know that ensuing band indictor 42/MCU indicating device 44 is to adopt absolute address or relative address.The relative address of band indictor 42 or MCU indicating device 44 or the length of absolute address also can be different.
Mixing DC coefficient 46 in EXIF data 40 is sequentially corresponding to the image DC coefficient in each sub-fragment 34.It is to be a difference type or the DC coefficient of non-difference type that 48 of DC coefficient tables mix DC coefficient 46 in order to record.According to the present invention, the value of mixing DC coefficient 46 can be identical with corresponding image DC coefficient, also can be recorded as in the mode of object reference prediction (object-based prediction) the DC coefficient of difference type according to corresponding image DC coefficient.
The mode of object reference prediction is the object bounds (object boundary) that can judge in cataloged procedure in image 50.Object bounds is compared to the other parts in image 50, in color or brightness is first-class has a more violent variation.In other words, even two continuous MCU 54, the MCU54 in object bounds the and difference between the corresponding image DC of MCU 54 coefficient value in object bounds may be very not large.For this image DC coefficient that is positioned at MCU 54 correspondences on object bounds, may also cannot reduce required figure place even carry out recording image DC coefficient in the mode of difference type.Therefore, image file 20 is to record the corresponding mixing of the MCU 54 DC coefficient 46 in object bounds in the mode of non-difference type.
Fig. 5 A is one schematic diagram of implementing the object bounds of example according to the present invention; Fig. 5 B is the schematic diagram of the DC coefficient table of corresponding diagram 5A.
Please refer to Fig. 5 A and Fig. 5 B, in image 50, object bounds 58 is contained the MCU 54 of part.DC coefficient table 48 whether has by object bounds 58 and contains and can record MCU 54 by the mode of matrix.For example available in DC coefficient table 48 " 1 " represents that this MCU 54 contained by object bounds 58, and the mixing DC coefficient 46 of these MCU 54 correspondences is to be non-difference type; Available otherwise " 0 " represents that this MCU54 do not contained by object bounds 58, and the mixing DC coefficient 46 of these MCU 54 correspondences is to be difference type.
In order to reduce the size of EXIF data 40, can store non-difference type DC coefficient 39 (being the mixing DC coefficient 46 of non-difference type) with 8 to 16, and only store difference type DC coefficient (being the mixing DC coefficient 46 of difference type) with 4 to 8.
In addition, commutative image file also can comprise acquisition parameters when image is captured.Acquisition parameters can be a camera model, a focal length, a shooting time, a time for exposure (exposure time), a f-number (f-number), a photosensitivity (photosensitivity) or a metering mode (metering).
When code book is invented applicable image file 20, can process one by one each frequency band 52 and MCU54.When encoder generates bit stream 30, the sub-fragment 34 of every coding N MCU 54 correspondences is restarted mark 38 rear all adding.Every N MCU 54 can be a frequency band 52.And after sub-fragment 34 of the every generation of encoder, calculate the MCU indicating device 44 of sub-fragment 34 correspondences of corresponding harsh one-tenth, and deposited in EXIF data 40.Similarly, encoder when frequency band 52 is encoded into fragment 32, calculates by row corresponding band indictor 42 and is write in EXIF data 40.48 of DC coefficient tables can be that encoder is filled in gradually according to the generation of corresponding each MCU 54 of object reference prediction mode.
Please refer to Fig. 6 and Fig. 7, it is respectively according to the present invention one flow chart of implementing the processing method of the image file of example, and the schematic diagram of spread.Next describe the step of the above-mentioned image file 20 of the disposal methods of image file provided by the invention in detail by Fig. 6 and Fig. 7.And the processing method of image file can decode to obtain the partial image in spread 59 by the bit stream 30 of part according to spread 59.
First, the image file 20 (step S100) of the compression of image 50 described above is provided, and can receives the spread 59 of being selected by frame.Wherein spread 59 can be specified by user, and spread 59 contains one or more MCU 54.As in Fig. 7 illustrates, spread 59 contains frequency band 52a and 52b, and contains MCU 54a, 54b, 54c, 54d, 54e and 54f.Wherein can be called as an initial MCU from the nearest MCU 54a of the initiating terminal of bit stream 30.
Then according to spread 59, in EXIF data 40, read the band indictor 42 corresponding with being unfolded frequency band 52 that scope 59 contains, and the MCU indicating device 44 (step S110) corresponding with being unfolded MCU 54 that scope 59 contains.In the processing method of image file, can be first confirm that according to spread 59 spread 59 contains which or which frequency band 52 and the MCU 54 in image 50.Therefore in step S110, corresponding to the band indictor 42 of frequency band 52a and 52b, and can be read corresponding to the MCU indicating device 44 of MCU54a, 54b, 54c, 54d, 54e and 54f, to obtain sub-fragment 34 that MCU 54a, 54b, 54c, 54d, 54e and 54f the are corresponding position in bit stream 30.
By band indictor 42 and MCU indicating device 44, the method for the absolute position of the sub-fragment 34 of searching MCU 54 correspondences in bit stream 30 for example has following two kinds.
The first be for when record in band indictor 42 be fragment original position in bit stream 30 of corresponding fragment 32 time, read corresponding to the band indictor 42 of frequency band 52a and 52b and can directly learn frequency band 52a and the absolute position of fragment 32 corresponding to 52b in bit stream 30.And in the time of the sub-fragment original position that is corresponding sub-fragment 34 in bit stream 30 or affiliated fragment 32 of record in MCU indicating device 44, read the absolute position of the sub-fragment 34 that can learn these MCU 54 correspondences corresponding to the MCU indicating device 44 of MCU 54a, 54b, 54c, 54d, 54e and 54f in bit stream 30.
The second be for when record in band indictor 42 be the fragment length (visual is the relative position of corresponding fragment 32 in bit stream 30) of corresponding fragment 32 time, also need to read all band indictors 42 before the band indictor 42 of corresponding frequency band 52a and added up, to obtain fragment 32 that frequency band 52a and 52b the are corresponding absolute position in bit stream 30.Similarly, when record in MCU indicating device 44 be the sub-fragment length (visual is the relative position of corresponding sub-fragment 34 in fragment 32) of corresponding sub-fragment 34 time, also may need at least one MCU indicating device 44 to add up.
Therefore according to said method, by band indictor 42 and MCU indicating device 44, can learn the content of corresponding sub-fragment 34 starts record by which position in bit stream 30.
Then the corresponding mixing DC coefficient 46 of first MCU 54 (being initial MCU) of containing according to spread 59 obtains a benchmark DC coefficient.According to an enforcement example of the present invention, this step can comprise following step S120, step S130 and step S140.The processing method of image file can be consulted DC coefficient table 48, to judge that whether the corresponding mixing DC coefficient 46 of first MCU 54 (being initial MCU) that spread 59 contains is as non-difference type DC coefficient 39 (step S120).
The benchmark DC coefficient (step S130) of first MCU 54 correspondences that the mixing DC coefficient 46 of first MCU 54 correspondences that contain when spread 59 can be contained as spread 59 during for non-difference type DC coefficient 39.
Then, according to the band indictor 42, MCU indicating device 44 and the benchmark DC coefficient that read, the sub-fragment 34 of the MCU 54 that in bit stream 30, corresponding spread 59 contains is decoded, to obtain the partial image (step S150) of at least one MCU 54.
Can find according to the band indictor 42 and the MCU indicating device 44 that read fragment 32 and the sub-fragment 34 that it is corresponding.And due to the initial MCU that can directly be contained by spread 59, obtain non-difference type DC coefficient 39.Therefore, while decoding in step S150, all sub-fragment 34 in bit stream 30 before the sub-fragment 34 of spread 59 correspondences does not need decoded.And obtain after the non-difference type DC coefficient 39 of initial MCU of spread 59, just can the sub-fragment 34 of spread 59 correspondences be decoded according to non-difference type DC coefficient 39.
In the sub-fragment 34 of spread 59 correspondences, first data cell of spread 59 corresponding decodings is used the image DC coefficient of non-difference type.Can be according to the decoding process of JPEG by relevant data cell decoding.Therefore, in whole bit stream 30, only have the correlator fragment 34 corresponding with spread 59 decoded, the MCU 54 of containing to obtain spread 59.
Otherwise the mixing DC coefficient 46 of first MCU 54 correspondences that contain when spread 59 is during for difference type DC coefficient, the MCU 54 that cannot directly contain with above-mentioned method acquisition spread 59.Can be in DC coefficient table 48, find the nearest non-difference type DC coefficient 39 of the corresponding mixing of first MCU 54 of containing from spread 59 DC coefficient 46 as benchmark toward initiating terminal, calculate the corresponding benchmark DC coefficient (step 140) of first MCU 54.After obtaining benchmark DC coefficient, just can the sub-fragment 34 of spread 59 correspondences be decoded as the above-mentioned step S150 that carries out.
In addition, the processing method of image file also can comprise: show the spread 59 in the MCU 54 decoding.That is to say, the partial image that is unfolded scope 59 frame choosings in the MCU 54 that can only decoding be obtained is shown to user's inspection.
Be 0xFFD0 but the existing decoder of part can only pick out the value of restarting mark 38 of carrying out for the first time.For the processing method that makes image file can be applicable to existing decoder at large, continuous 8 frequency bands 52 can be defined as to a large frequency band.And the value of restarting mark 38 in 8 fragments 32 corresponding with large frequency band can be sequentially 0xFFD0,0xFFD1,0xFFD2,0xFFD3,0xFFD4,0xFFD5,0xFFD6 and 0xFFD7.That thus, just can avoid the logy existing decoder of part can only recognize for the first time carrying out taking large frequency band as unit restarts the problem of mark 38 values as 0xFFD0.
In sum, read the band indictor that is written in EXIF data, MCU indicating device, DC coefficient table and mix DC coefficient according to the processing method of image file of the present invention, and the sub-fragment of bit stream corresponding to a minority MCU before the MCU that can only spread be contained and spread is decoded.Therefore, do not need whole the image full resolution of all decoding back according to the processing method of image file of the present invention, and can save in a large number required memory body capacity, memory body reading and writing bandwidth and operand of lower when decoding, and then significantly promote the time required image partial decoding of h, also reduce the required cost of this image processing.
Moreover according in the processing method of image file of the present invention, image file is that required extraneous information writes on EXIF data and is additional in jpeg file during by partial decoding of h such as band indictors, and the part of bit stream meets JPEG specification.Therefore image file provided by the present invention can be compatible with existing jpeg decoder, and retains its vast negotiability.And compared to existing way, according to the processing method of image file of the present invention, the added burden (overhead) that the band indictor increasing in EXIF data causes is smaller, and therefore image file can have outstanding data compression ratio.
Certainly; the present invention also can have other various embodiments; in the situation that not deviating from spirit of the present invention and essence thereof; those of ordinary skill in the art are when making according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.

Claims (9)

1. a processing method for image file, is characterized in that, comprising:
One image file of one image is provided, this image is divided into multiple image blocks, using at least one this image blocks as a minimum code unit, and sequentially this image is defined as to multiple frequency bands with those minimum code unit of row or multiple row, wherein this image file comprises: a bit stream and commutative image file data, this bit stream represents the packed data of this image, this bit stream has multiple fragments of respectively corresponding those frequency bands, wherein each this fragment has multiple sub-fragments, in each this fragment, this a little fragment corresponds respectively to those minimum code unit of this frequency band corresponding with this fragment, these commutative image file data comprise again: multiple band indictors, multiple MCU indicating device and multiple mixed DC coefficient, respectively corresponding those frequency bands of those band indictors, and each this band indictor is in order to indicate the position of corresponding corresponding this fragment bit of this frequency band in this bit stream, respectively corresponding those MCU of those MCU indicating devices, and each this MCU indicating device is in order to indicate corresponding corresponding this sub-fragment bit position in this fragment of this MCU, those mixed DC coefficients are sequentially corresponding to an image DC coefficient of each this sub-fragment,
According to a spread of the partial block in order to select this image, read at least one this band indictor and this MCU indicating device;
Corresponding this mixed DC coefficient of this MCU of first that contain according to this spread obtains a benchmark DC coefficient; And
According to this band indictor, this MCU indicating device and this benchmark DC coefficient that read, by least one this sub-fragment decoding at least one this MCU of should spread containing in this bit stream, to obtain at least one this MCU.
2. the processing method of image file according to claim 1, is characterized in that, also comprises:
Show the partial image of this spread in corresponding this MCU decoding in this image.
3. the processing method of image file according to claim 1, is characterized in that, this image file also comprises a direct current coefficient table, and it is a difference type DC coefficient or a non-difference type DC coefficient in order to record those mixed DC coefficients; And the step that corresponding this mixed DC coefficient of described first this MCU of containing according to this spread obtains this benchmark DC coefficient comprises:
Consult this DC coefficient table, to judge that whether corresponding this mixed DC coefficient of first this MCU that this spread contains is as this non-difference type DC coefficient;
This mixed DC coefficient corresponding to first this MCU of containing when this spread be during for this non-difference type DC coefficient, and this mixed DC coefficient corresponding to this MCU of first that this spread is contained is as this benchmark DC coefficient; And
When this mixed DC coefficient corresponding to first this MCU of containing when this spread is this difference type DC coefficient, find this nearest non-difference type DC coefficient of this mixed DC coefficient that first this MCU of containing from this spread is corresponding as benchmark, calculate this benchmark DC coefficient.
4. the processing method of image file according to claim 1, is characterized in that, a fragment length of this fragment that this band indictor record is corresponding, and a MCU length of this MCU of this MCU indicating device record correspondence.
5. the processing method of image file according to claim 1, it is characterized in that, the fragment original position of this fragment of this band indictor record correspondence in this bit stream, and the sub-fragment original position of this sub-fragment of this MCU indicating device record correspondence in this bit stream.
6. the processing method of image file according to claim 3, is characterized in that, this difference type DC coefficient is used 4 to 8 storages, and this non-difference type DC coefficient is used 8 to 16 storages.
7. the processing method of image file according to claim 1, it is characterized in that, every continuous 8 those frequency bands are defined as to a large frequency band, in this bit stream that wherein this large frequency band is corresponding at each, multiple restart in mark first this restart mark value be 0xFFD0.
8. the processing method of image file according to claim 1, is characterized in that, the relative address of those band indictors or the length of absolute address are identical.
9. the processing method of image file according to claim 1, is characterized in that, the relative address of those MCU indicating devices or the length of absolute address are identical.
CN201110120298.6A 2011-05-06 2011-05-06 Method for processing image files Expired - Fee Related CN102769743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110120298.6A CN102769743B (en) 2011-05-06 2011-05-06 Method for processing image files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110120298.6A CN102769743B (en) 2011-05-06 2011-05-06 Method for processing image files

Publications (2)

Publication Number Publication Date
CN102769743A CN102769743A (en) 2012-11-07
CN102769743B true CN102769743B (en) 2014-11-26

Family

ID=47096979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110120298.6A Expired - Fee Related CN102769743B (en) 2011-05-06 2011-05-06 Method for processing image files

Country Status (1)

Country Link
CN (1) CN102769743B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7483581B2 (en) * 2001-07-02 2009-01-27 Qualcomm Incorporated Apparatus and method for encoding digital image data in a lossless manner
US7643694B2 (en) * 2004-12-31 2010-01-05 Zoran Corporation Method and apparatus for processing a compressed image in an order other than the order in which it was compressed
US7800642B2 (en) * 2006-03-01 2010-09-21 Polycom, Inc. Method and system for providing continuous presence video in a cascading conference
US8107754B2 (en) * 2007-12-07 2012-01-31 Mediatek Inc. Systems and methods for randomly accessing compressed images
CN101489018A (en) * 2008-01-18 2009-07-22 华晶科技股份有限公司 Static image compression method and computer readable storage apparatus

Also Published As

Publication number Publication date
CN102769743A (en) 2012-11-07

Similar Documents

Publication Publication Date Title
CN109005426B (en) Picture file processing method
US6426771B1 (en) Image processing apparatus and method and computer readable memory storing the method
US20170132756A1 (en) Camera System Encoder/Decoder Architecture
EP3707891B1 (en) Method and device for generating a second image from a first image
CN100477788C (en) Image processing display device and method
US8558909B2 (en) Method and apparatus for generating compressed file, camera module associated therewith, and terminal including the same
CN109089162B (en) Picture file processing method and system
CN109040789B (en) Picture file processing method
JP2001320588A (en) Memory management method, device therefor and its storage medium
TW508940B (en) Method and apparatus for color image date processing and compression
US20030179943A1 (en) Image processing method and image coding apparatus utilizing the image processing method
US9819957B2 (en) Method and apparatus for decoding a progressive JPEG image
Lukac et al. Single-sensor camera image compression
US8355057B2 (en) Joint scalar embedded graphics coding for color images
US8000545B2 (en) Method for accessing image data and method for accessing YUV420 image data
JP2004032698A (en) Differential image compressing method and apparatus
CN102769743B (en) Method for processing image files
US8411973B2 (en) Image file processing method
US8428355B2 (en) Image file processing method
CN102238379B (en) Processing method for image file
CN101287057A (en) Buffer saving image decompressing storing method and module thereof
US20090317007A1 (en) Method and apparatus for processing a digital image
US20110286663A1 (en) Method And Apparatus Of Color Image Rotation For Display And Recording Using JPEG
CN116347089A (en) JPEG image processing method and device, electronic equipment and storage medium
TWI305088B (en) Digital video decoding apparatus and method thereof

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20141126

Termination date: 20190506