CN108156461A - A kind of Bayer method for compressing image and device - Google Patents
A kind of Bayer method for compressing image and device Download PDFInfo
- Publication number
- CN108156461A CN108156461A CN201711455811.0A CN201711455811A CN108156461A CN 108156461 A CN108156461 A CN 108156461A CN 201711455811 A CN201711455811 A CN 201711455811A CN 108156461 A CN108156461 A CN 108156461A
- Authority
- CN
- China
- Prior art keywords
- pixel
- pix
- image
- current
- pixel point
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/117—Filters, e.g. for pre-processing or post-processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/80—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a kind of Bayer method for compressing image and devices, and described method includes following steps:Step S1 carries out macroblock partition to the uniline image of input;Step S2, predicts current macro, obtains the prediction residual of current pixel point;Step S3 carries out noise analysis by the prediction residual and gradient information, obtains noise rank;Using obtained noise rank, adaptive-filtering is carried out to the reconstruction pixel in row buffer area by step S4;Step S5, entropy coding and output code flow are carried out to prediction residual, the present invention to image by carrying out sound level analysis, adaptive filtering process is carried out for the image of different sound levels, reach and effectively inhibit noise, greatly improve the efficiency of compression, and be effectively retained the purpose of the true raw information of image.
Description
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of Bayer based on the sources such as noise specificity analysis
Method for compressing image and device.
Background technology
At present, most of camera and digital camera are all carried out photosensitive using CCD or cmos sensor, in order to obtain coloured silk
Color information, it is most of a two-dimensional color filter array CFA (Color Filter Array, color filter array) to be placed
Between camera lens and sensor.Each filter unit and sensor pixel of CFA corresponds to, and light is incident upon sensing through CFA
On device.Each pixel unit of sensor only acquires a kind of strength information of color in R, G or B.Then, Bayer gusts
Become current most widely used CFA pixel distributions form if arranging (such as Fig. 1), i.e. the image of Bayer format becomes sensing
The final output format of device.
But due to technique and technical reason, all more or less there are noise problem, performance is inadequate for the sensor imaging
Perfect, especially under the conditions of dark, the noise problem of imaging sensor just more highlights, and causes directly from sensor
Obtained image either details or color all have sizable gap with real image.
At this moment, it is necessary to which ((Image Signal Processing, picture signal processing) in sensor to what is come out by ISP
Image is post-processed, these Processing Algorithms include linearity rectification, noise remove, bad point removal, interpolation, automatic white balance, oneself
Dynamic exposure etc..In order to complete all image procossings, the image data of a frame or continuous several frames is generally required, then just need
Bayer images are stored in DDR after sensor imaging, be used with facilitating to read.
At present, for the compression method of Bayer images, following three classes are broadly divided into:
(1) using existing image compression algorithm (such as JPEG2000, JPEG-LS) or data compression algorithm (such as
SPIHT, FELICS, CALIC etc.), bayer images are directly compressed.
(2) the RGB three-components of Bayer images are carried out gamut transform, such as transforms to YUV colour gamuts, can eliminated certain superfluous
Then remaining information is compressed with existing compression algorithm again.
(3) processing of spatial rearrangement row, matrixing etc. is carried out to Bayer picture formats, partial redundance can be eliminated
Then information is compressed with existing compression algorithm again.
But the above-mentioned prior art mainly has following three shortcomings:
(1) due to low-light (level), the factors such as electric current is unstable, interference between each component circuit influence generation noise
Bayer images, even if the methods of using transformation, spatial manipulation, noise information can occupy most information always, be unable to reach and disappear
Except the effect of redundancy;
(2) it since noise typically belongs to high-frequency information, is very unlikely to compress, if using lossless compression, it is possible to can not
Reach expected bandwidth and memory requirement or even side effect can be brought;
(3) if using lossy compression, in order to meet bandwidth and memory requirement, then being bound to corresponding quantization loss also can be anxious
Sharp increase adds namely the raw information of meeting extreme loss image.
Invention content
To overcome above-mentioned the shortcomings of the prior art, the present invention's is designed to provide a kind of Bayer compression of images sides
Method and device, by carrying out sound level analysis to image, adaptive filtering is carried out for the image of different sound levels
Processing reaches and effectively inhibits noise, greatly improves the efficiency of compression, and be effectively retained the purpose of the true raw information of image.
In view of the above and other objects, the present invention proposes a kind of Bayer method for compressing image, include the following steps:
Step S1 carries out macroblock partition to the uniline image of input;
Step S2, predicts current macro, obtains the prediction residual of current pixel point;
Step S3 carries out noise analysis by the prediction residual and gradient information, obtains noise rank;
Using obtained noise rank, adaptive-filtering is carried out to the reconstruction pixel in row buffer area by step S4;
Step S5 carries out entropy coding and output code flow to prediction residual.
Preferably, in step S2, for R/G/B three-components using identical prediction algorithm, using current pixel point with
Surrounding pixel point relationship obtains prediction pixel point value, and then obtains the prediction residual of current pixel point.
Preferably, step S2 further comprises:
Reconstruction point pix_b, pix_c, pix_d of lastrow are read from row buffer area, wherein pix_b is rebuild for surface
Pixel, pix_c rebuild pixel for upper left, and pix_d rebuilds pixel for upper right, and reads left side original image vegetarian refreshments pix_a,
And left end original image vegetarian refreshments pix_f;
Left end pixel pix_a and left end pixel pix_f are filtered, obtain filtered pixel
pix_flt;
Calculate maximum, the minimum value that leftmost pixel point and surface pixel is obtained
Pixel pix_c is rebuild according to upper left and the relationship of above-mentioned result of calculation obtains final prediction pixel point value;
The prediction residual is calculated according to prediction pixel point and current pixel point.
Preferably, step S3 further comprises:
Current pixel point and surrounding pixel point are analyzed, obtain the gradient information of current pixel point;
Statistics with histogram is carried out, and carry out classification processing to the gradient of current pixel point;
That minimum one kind of gradient in current all categories is found, pixel number therein is grad_bin [0], and then
Acquire its ratio sgrad_ratio in whole image all pixels point;
Different threshold values is configured according to the ratio sgrad_ratio, and then calculates the noise rank of present image.
Preferably, the noise rank is obtained by equation below:
Wherein, thr1, thr2, thr3, thr4 is judge the other threshold parameter of noise level.
Preferably, it is described that current pixel point and surrounding pixel point are analyzed, obtain the gradient information of current pixel point
The step of be specially:It calculates and obtains between current pixel point pix_0 and surrounding pixel point pix_a, pix_b, pix_c, pix_d
Gradient, and the gradient for taking the minimum value between this four gradients final as current pixel point.
Preferably, in step S4, for G component adaptive-filterings, step S4 is specifically included:
Select the wave filter of even-order;
Choose current reconstruction pixel and two, its left side reconstruction pixel, three, the right reconstruction pixel;
Adaptive-filtering is carried out using the wave filter of selection;
To filtered reconstruction pixel normalized, final reconstruction pixel is obtained;
In the reconstruction pixel update to row buffer of current macro.
Preferably, in step S4, for R/B component adaptive-filterings, step S4 is specifically included:
Select the wave filter of odd-order;
Choose current reconstruction pixel and three, left side reconstruction pixel, three, the right reconstruction pixel;
Carry out adaptive-filtering;
To filtered reconstruction pixel normalized, final reconstruction pixel is obtained;
In the reconstruction pixel update to row buffer of current macro.
Preferably, step S5 further comprises:
Prediction residual is post-processed, obtains finally needing the residual error coefficient encoded;
Entropy coding and output code flow are carried out to the residual error coefficient.
In order to achieve the above objectives, the present invention also provides a kind of Bayer image compressing devices, including:
Macroblock partition unit carries out macroblock partition to the uniline image of input;
Predicting unit for predicting current macro, obtains the prediction residual of current pixel point;
Noise analysis unit for carrying out noise analysis by the prediction residual and gradient information, obtains noise rank;
Adaptive-filtering unit, for using obtained noise rank, being clicked through to the reconstruction pixel in the row buffer area
Row adaptive-filtering;
Entropy code unit, for carrying out entropy coding and output code flow to prediction residual.
Compared with prior art, a kind of Bayer method for compressing image of the present invention and device by image into Row noise etc.
Grade analysis carries out adaptive filtering process for the image of different sound levels, can reach and effectively inhibit noise, carry significantly
The efficiency of high compression, and it is effectively retained the purpose of the true raw information of image.
Description of the drawings
Fig. 1 is current Bayer format image schematic diagram;
Fig. 2 is a kind of step flow chart of Bayer method for compressing image of the present invention;
Fig. 3 is current pixel point and the position relationship schematic diagram of surrounding pixel point in the specific embodiment of the invention;
Fig. 4 is the thin portion flow chart of step S2 in the specific embodiment of the invention;
Fig. 5 is the thin portion flow chart of step S3 in the specific embodiment of the invention;
The thin portion flow chart of step S5 in Fig. 6 specific embodiment of the invention;
Fig. 7 is a kind of system architecture diagram of Bayer image compressing devices.
Specific embodiment
Below by way of specific specific example and embodiments of the present invention are described with reference to the drawings, those skilled in the art can
Understand the further advantage and effect of the present invention easily by content disclosed in the present specification.The present invention can also pass through other differences
Specific example implemented or applied, the various details in this specification also can be based on different viewpoints with application, without departing substantially from
Various modifications and change are carried out under the spirit of the present invention.
Fig. 2 is a kind of step flow chart of Bayer method for compressing image of the present invention.As shown in Fig. 2, the present invention is a kind of
Bayer method for compressing image, includes the following steps:
Step S1 carries out macro block (MB) to the uniline image of input and divides, specifically, the macroblock size of segmentation can be 1,
16th, 32,64,128 etc..Since specific macroblock partition is using the prior art, it will not be described here.
Step S2, predicts current macro, obtains the prediction residual pred_diff of current pixel point.
In the specific embodiment of the invention, for the identical prediction algorithm of R/G/B three-components, current pixel is mainly utilized
Point pix_0 is obtained with surrounding pixel point relationship.Wherein, the future position of upper row is read from linebuffer (row buffer)
The reconstruction point of the lastrow gone out, and the original image vegetarian refreshments to enter is selected on the left side.Specific location relationship is as shown in Figure 3.Specifically, such as
Shown in Fig. 4, step S2 further comprises:
Step S200, reconstruction point pix_b, pix_c, pix_d of the lastrow read from row buffer linebuffer,
Wherein pix_b rebuilds pixel for surface, and pix_c rebuilds pixel for upper left, and pix_d rebuilds pixel for upper right;It reads again
Go out left side original image vegetarian refreshments pix_a and left end original image vegetarian refreshments pix_f;
Step S201 is filtered left end pixel pix_a and left end pixel pix_f, after obtaining filtering
Pixel pix_flt;Formula is as follows:
Wherein, flt_coeff () represents filter factor, and different noise rank noise_lev corresponds to different filtering systems
Number.
Step S202 calculates maximum, the minimum value that leftmost pixel point and surface pixel is obtained;Formula is as follows:
Max_ab=MAX (pix_flt, pix_b)
Min_ab=MIN (pix_flt, pix_b)
Wherein, MAX () represents to take the two maximum value, and MIN () represents to take the two minimum value.
Step S203 is obtained final according to the relationship of the result of calculation of upper left reconstruction pixel pix_c and step S202
Prediction pixel point value;
Step S204 calculates prediction residual.Specifically, it is poor prediction pixel point pred and current pixel point pix_0 to be made, just
Prediction residual pred_diff is obtained.Formula is as follows:
Pred_diff=pix_0-pred
Step S3 carries out noise analysis by information such as prediction residual and gradients, obtains noise rank.
It specifically,, can by analyzing the information such as current pixel point pix_0 and the gradient of surrounding pixel point in step S3
To obtain corresponding statistical information, the sound level of a frame has just been obtained in this way, has always been divided into five noise ranks, noise rank
Noise_lev=4 is most strong noise rank, and noise rank noise_lev=0 is most weak noise rank.As shown in figure 5, step
S3 further comprises:
Step S300 is calculated and is obtained between current pixel pix_0 and surrounding pixel point pix_a, pix_b, pix_c, pix_d
Gradient, and the gradient for taking the minimum value between this four gradients final as current pixel;Formula is as follows:
Grad=MIN (| pix_0-pix_a |, | pix_0-pix_b |, | pix_0-pix_c |, | pix_0-pix_d |);
Wherein, | | expression takes absolute value.
Step S301 carries out statistics with histogram, and carry out classification processing to the gradient of current pixel point, and the present invention is specific real
It applies in example, the sum of classification is 256.Formula is as follows:
grad_bin[grad]++;
Wherein, grad_bin [grad] is the classification classified according to grad values, if grad is same value, number
It carries out cumulative
Step S302 finds that minimum one kind of gradient in current all categories, and pixel number therein is grad_
Bin [0], and then acquire its ratio sgrad_ratio in whole image all pixels point;Formula is as follows
Sgrad_ratio=grad_bin [0]/(frm_height*frm_width);
Wherein, frm_height and frm_width is respectively the height and width of image.
Different threshold values is configured according to sgrad_ratio by step S303, and then calculate the noise of present image etc.
Grade.Specific judgment formula is as follows:
Wherein, thr1, thr2, thr3, thr4 is judge the other threshold parameter of noise level.
By noise rank, adaptive-filtering is carried out to row buffer (linebuffer) by step S4.
That is, according to the noise rank noise_lev obtained in step S3, its is corresponding for selection that can be adaptive
Wave filter carries out special filtering process to the reconstruction pixel in linebuffer, to eliminate noise redundancy, retains effective
Original image information.
Due to G components and inconsistency and particularity of the R/B components in space, phase, carry out at differentiation here
Reason, can effectively eliminate redundancy spatially so that prediction accuracy higher is greatly improved the efficiency of compression in this way.
For G component adaptive-filterings, it is as follows:
A. corresponding wave filter is chosen.For G components, current pixel point and lastrow pixel there is false relation,
It is corresponding to it right over i.e. without pixel, therefore the wave filter of present invention selection even-order, filter length can choose 2,4,6,8
Deng.Here for choosing the wave filter of 6 level numbers.
B. selected pixels point.Current reconstruction pixel and two, left side reconstruction pixel, the reconstruction of three, the right can be chosen
Pixel.It is denoted as pix_rec_g (0), pix_rec_g (1), pix_rec_g (2), pix_rec_g (3), pix_rec_g respectively
(4)、pix_rec_g(5)。
C. adaptive-filtering is carried out, obtains filter value G_rec_flt.Formula is as follows:
Wherein, coeff_g () represents the even order filter coefficient adaptively chosen according to noise rank noise_lev.
D. to filtered reconstruction pixel normalized, final reconstruction pixel G_rec_norm is obtained.Formula
It is as follows:
G_rec_norm=(G_rec_flt+128)/256
E. the reconstruction pixel of current macro is updated into linebuffer (row buffer).Specifically formula is:
Pix_rec=pred+pred_diff
Wherein, pix_rec represents the pixel after rebuilding.
For R/B component adaptive-filterings, it is as follows:
A. selecting filter.For R/B components, although current pixel point and lastrow pixel there is interlacing relationship,
I.e. position is corresponding, therefore the wave filter of present invention selection odd-order, filter length can choose 1,3,5,7 etc..Here with choosing
For the wave filter for taking 7 level numbers.
B. selected pixels point.Current reconstruction pixel and three, left side reconstruction pixel, the reconstruction of three, the right can be chosen
Pixel.It is denoted as pix_rec_rb (0), pix_rec_rb (1), pix_rec_rb (2), pix_rec_rb (3), pix_ respectively
rec_rb(4)、pix_rec_rb(5)、pix_rec_rb(6)。
C. adaptive-filtering is carried out, obtains filter value R/B_rec_flt.Formula is as follows:
Wherein, coeff_rb () represents the filter coefficient adaptively chosen according to noise rank noise_lev.
D. to filtered reconstruction pixel normalized, final reconstruction pixel R/B_rec_norm is obtained.It is public
Formula is as follows:
R/B_rec_norm=(R/B_rec_flt+128)/256
E. the reconstruction pixel of current macro is updated into linebuffer (row buffer).Specifically formula is:
Pix_rec=pred+pred_diff
Wherein, pix_rec represents the pixel after rebuilding.
Step S5 carries out entropy coding and output code flow to prediction residual pred_diff, in the specific embodiment of the invention,
Huffman (Huffman) or Golomb (Ge Luomu) codings can be used.Specifically, as shown in fig. 6, step S5 is further wrapped
It includes:
Step S500 post-processes prediction residual pred_diff, obtains finally needing the residual error coefficient Diff_q encoded.
Diff_q=ABS (pred_diff) * 2-sign (pred_diff)
Wherein, when pred_diff is negative, sign (pred_diff) is 1, is otherwise 0;
Step S501 encodes residual error coefficient Diff_q using Huffman/Golomb.
Fig. 7 is a kind of system architecture diagram of Bayer image compressing devices of the present invention.As shown in fig. 7, the present invention is a kind of
Bayer image compressing devices, including:
Macroblock partition unit 701 carries out macro block (MB) to the uniline image of input and divides, and specifically, the macro block of segmentation is big
Small can be 1,16,32,64,128 etc., and the present invention is not limited.
Predicting unit 702 for predicting current macro, obtains the prediction residual pred_diff of current pixel point.
In the specific embodiment of the invention, for the identical prediction algorithm of R/G/B three-components, current pixel is mainly utilized
Point pix_0 is obtained with surrounding pixel point relationship.Wherein, the future position of upper row is from linebuffer (single port row caching)
The reconstruction point of the lastrow of reading, and the original image vegetarian refreshments to enter is selected on the left side.Predicting unit 702 is specifically used for:
Reconstruction point pix_b, pix_c, pix_d of the lastrow read from linebuffer, wherein pix_b are surface
Pixel is rebuild, pix_c rebuilds pixel for upper left, and pix_d rebuilds pixel for upper right;Left side original image vegetarian refreshments is read again
Pix_a and left end original image vegetarian refreshments pix_f;
Left end pixel pix_a and left end pixel pix_f are filtered, obtain filtered pixel
pix_flt;
Calculate maximum, the minimum value that leftmost pixel point and surface pixel is obtained;
Pixel pix_c is rebuild according to upper left and final prediction pixel point value is obtained in the relationship of above-mentioned result of calculation;
Prediction residual is calculated, specifically, it is poor that prediction pixel point pred and current pixel point pix_0 is made, and has just obtained pre-
Survey residual error pred_diff.
Noise analysis unit 703 carries out noise analysis for passing through the information such as prediction residual and gradient, obtains noise level
Not.
Specifically, noise analysis unit 703 is by analyzing the letters such as current pixel point pix_0 and the gradient of surrounding pixel point
Breath, can obtain corresponding statistical information, just obtain the sound level of a frame in this way, always be divided into five grades, noise level
Other noise_lev=4 is most strong noise rank, and noise rank noise_lev=0 is most weak noise rank.Noise analysis unit
403 are specifically used for:
The gradient obtained between current pixel pix_0 and surrounding pixel point pix_a, pix_b, pix_c, pix_d is calculated, and
The gradient for taking the minimum value between this four gradients final as current pixel;
Statistics with histogram is carried out, and carry out classification processing to the gradient of current pixel point;
That minimum one kind of gradient in current all categories is found, pixel number therein is grad_bin [0], and then
Acquire its ratio sgrad_ratio in whole image all pixels point;
Different threshold values is configured according to sgrad_ratio, and then calculates the sound level of present image.
Adaptive-filtering unit 704, for according to noise rank, adaptive-filtering to be carried out to linebuffer.
That is, the noise rank noise_lev obtained according to noise analysis unit 703, its is right for adaptive selection
The wave filter answered carries out the reconstruction pixel in row buffer (linebuffer) special filtering process, superfluous to eliminate noise
Remaining information retains effective original image information.
Due to G components and inconsistency and particularity of the R/B components in space, phase, carry out at differentiation here
Reason, can effectively eliminate redundancy spatially so that prediction accuracy higher is greatly improved the efficiency of compression in this way.
For G component adaptive-filterings, adaptive-filtering unit 404 is specifically used for:
A. corresponding wave filter is chosen.For G components, current pixel point and lastrow pixel there is false relation,
It is corresponding to it right over i.e. without pixel, therefore the wave filter of present invention selection even-order, filter length can choose 2,4,6,8
Deng.Here for choosing the wave filter of 6 level numbers.
B. selected pixels point.Current reconstruction pixel and two, left side reconstruction pixel, the reconstruction of three, the right can be chosen
Pixel.It is denoted as pix_rec_g (0), pix_rec_g (1), pix_rec_g (2), pix_rec_g (3), pix_rec_g respectively
(4)、pix_rec_g(5)。
C. adaptive-filtering is carried out, obtains filter value G_rec_flt.
D. to filtered reconstruction pixel normalized, final reconstruction pixel G_rec_norm is obtained.
E. the reconstruction pixel of current macro is updated into linebuffer (row buffer).
For R/B component adaptive-filterings, adaptive-filtering unit 404 is specifically used for:
A. selecting filter.For R/B components, although current pixel point and lastrow pixel there is interlacing relationship,
I.e. position is corresponding, therefore the wave filter of present invention selection odd-order, filter length can choose 1,3,5,7 etc..Here with choosing
For the wave filter for taking 7 level numbers.
B. selected pixels point.Current reconstruction pixel and three, left side reconstruction pixel, the reconstruction of three, the right can be chosen
Pixel.It is denoted as pix_rec_rb (0), pix_rec_rb (1), pix_rec_rb (2), pix_rec_rb (3), pix_ respectively
rec_rb(4)、pix_rec_rb(5)、pix_rec_rb(6)。
C. adaptive-filtering is carried out, obtains filter value R/B_rec_flt.
D. to filtered reconstruction pixel normalized, final reconstruction pixel R/B_rec_norm is obtained.
E. the reconstruction pixel of current macro is updated into linebuffer (row buffer).
Entropy code unit 705 for carrying out entropy coding and output code flow to prediction residual pred_diff, has in the present invention
In body embodiment, Huffman (Huffman) or Golomb (Ge Luomu) codings can be used in entropy code unit 705.Entropy coding list
Member 705 is specifically used for:
Prediction residual pred_diff is post-processed, obtains finally needing the residual error coefficient Diff_q encoded.
Residual error coefficient Diff_q is encoded using Huffman/Golomb.
In conclusion a kind of Bayer method for compressing image of the present invention and device be to image by carrying out sound level analysis,
Adaptive filtering process is carried out for the image of different sound levels, can be reached and effectively be inhibited noise, greatly improve compression
Efficiency, and be effectively retained the purpose of the true raw information of image.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.Any
Field technology personnel can modify above-described embodiment and changed under the spirit and scope without prejudice to the present invention.Therefore,
The scope of the present invention, should be as listed by claims.
Claims (10)
1. a kind of Bayer method for compressing image, includes the following steps:
Step S1 carries out macroblock partition to the uniline image of input;
Step S2, predicts current macro, obtains the prediction residual of current pixel point;
Step S3 carries out noise analysis by the prediction residual and gradient information, obtains noise rank;
Using obtained noise rank, adaptive-filtering is carried out to the reconstruction pixel in row buffer area by step S4;
Step S5 carries out entropy coding and output code flow to prediction residual.
2. a kind of Bayer method for compressing image as described in claim 1, it is characterised in that:In step S2, for R/G/B
Three-component uses identical prediction algorithm, and prediction pixel point value is obtained using current pixel point and surrounding pixel point relationship, and then
Obtain the prediction residual of current pixel point.
3. a kind of Bayer method for compressing image as claimed in claim 2, which is characterized in that step S2 further comprises:
Reconstruction point pix_b, pix_c, pix_d of lastrow are read from row buffer area, wherein pix_b rebuilds pixel for surface
Point, pix_c for upper left rebuild pixel, pix_d for upper right rebuild pixel, and read left side original image vegetarian refreshments pix_a and
Left end original image vegetarian refreshments pix_f;
Left end pixel pix_a and left end pixel pix_f are filtered, obtain filtered pixel pix_
flt;
Calculate maximum, the minimum value that leftmost pixel point and surface pixel is obtained
Pixel pix_c is rebuild according to upper left and the relationship of above-mentioned result of calculation obtains final prediction pixel point value;
The prediction residual is calculated according to prediction pixel point and current pixel point.
4. a kind of Bayer method for compressing image as claimed in claim 2, which is characterized in that step S3 further comprises:
Current pixel point and surrounding pixel point are analyzed, obtain the gradient information of current pixel point;
Statistics with histogram is carried out, and carry out classification processing to the gradient of current pixel point;
That minimum one kind of gradient in current all categories is found, pixel number therein is grad_bin [0], and then is acquired
Its ratio sgrad_ratio in whole image all pixels point;
Different threshold values is configured according to the ratio sgrad_ratio, and then calculates the noise rank of present image.
5. a kind of Bayer method for compressing image as claimed in claim 4, which is characterized in that the noise rank passes through as follows
Formula obtains:
Wherein, thr1, thr2, thr3, thr4 is judge the other threshold parameter of noise level.
6. a kind of Bayer method for compressing image as claimed in claim 4, which is characterized in that described to current pixel point and week
The step of enclosing pixel to be analyzed, obtaining the gradient information of current pixel point be specially:It calculates and obtains current pixel point pix_0
With the gradient between surrounding pixel point pix_a, pix_b, pix_c, pix_d, and the minimum value conduct between this four gradients is taken
The final gradient of current pixel point.
7. a kind of Bayer method for compressing image as claimed in claim 4, which is characterized in that in step S4, for G components
Adaptive-filtering, step S4 are specifically included:
Select the wave filter of even-order;
Choose current reconstruction pixel and two, its left side reconstruction pixel, three, the right reconstruction pixel;
Adaptive-filtering is carried out using the wave filter of selection;
To filtered reconstruction pixel normalized, final reconstruction pixel is obtained;
In the reconstruction pixel update to row buffer of current macro.
8. a kind of Bayer method for compressing image as claimed in claim 7, which is characterized in that in step S4, for R/B points
Adaptive-filtering is measured, step S4 is specifically included:
Select the wave filter of odd-order;
Choose current reconstruction pixel and three, left side reconstruction pixel, three, the right reconstruction pixel;
Carry out adaptive-filtering;
To filtered reconstruction pixel normalized, final reconstruction pixel is obtained;
In the reconstruction pixel update to row buffer of current macro.
9. a kind of Bayer method for compressing image as claimed in claim 8, which is characterized in that step S5 further comprises:
Prediction residual is post-processed, obtains finally needing the residual error coefficient encoded;
Entropy coding and output code flow are carried out to the residual error coefficient.
10. a kind of Bayer image compressing devices, including:
Macroblock partition unit carries out macroblock partition to the uniline image of input;
Predicting unit for predicting current macro, obtains the prediction residual of current pixel point;
Noise analysis unit for carrying out noise analysis by the prediction residual and gradient information, obtains noise rank;
Adaptive-filtering unit, for using obtained noise rank, being carried out to the reconstruction pixel in row buffer area adaptive
Filtering;
Entropy code unit, for carrying out entropy coding and output code flow to prediction residual.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711455811.0A CN108156461B (en) | 2017-12-28 | 2017-12-28 | Bayer image compression method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711455811.0A CN108156461B (en) | 2017-12-28 | 2017-12-28 | Bayer image compression method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108156461A true CN108156461A (en) | 2018-06-12 |
CN108156461B CN108156461B (en) | 2021-12-10 |
Family
ID=62463827
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711455811.0A Active CN108156461B (en) | 2017-12-28 | 2017-12-28 | Bayer image compression method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108156461B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110049337A (en) * | 2019-05-24 | 2019-07-23 | 安翰科技(武汉)股份有限公司 | The compression processing method and system of capsule endoscope bayer image |
CN110896487A (en) * | 2018-09-12 | 2020-03-20 | 阿诺德和里克特电影技术公司 | Method for compressing image data |
CN113727117A (en) * | 2021-11-01 | 2021-11-30 | 武汉精测电子集团股份有限公司 | DP-based compressed data stream transmission method, device, equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1662066A (en) * | 2004-02-26 | 2005-08-31 | 中国科学院计算技术研究所 | Method for selecting predicting mode within frame |
CN1845608A (en) * | 2006-05-19 | 2006-10-11 | 北京工业大学 | Video interframe compression method based on space-time correlation |
CN101783956A (en) * | 2010-02-03 | 2010-07-21 | 武汉大学 | Back-prediction forecast method based on spatio-temporal neighbor information |
CN103369209A (en) * | 2013-07-31 | 2013-10-23 | 上海通途半导体科技有限公司 | Video noise reduction device and video noise reduction method |
CN104349171A (en) * | 2013-07-31 | 2015-02-11 | 上海通途半导体科技有限公司 | Image compression encoding and decoding devices without visual loss, and encoding and decoding methods |
CN107105208A (en) * | 2017-06-06 | 2017-08-29 | 山东大学 | A kind of lossless coding and coding/decoding method of Bayer images |
-
2017
- 2017-12-28 CN CN201711455811.0A patent/CN108156461B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1662066A (en) * | 2004-02-26 | 2005-08-31 | 中国科学院计算技术研究所 | Method for selecting predicting mode within frame |
CN1845608A (en) * | 2006-05-19 | 2006-10-11 | 北京工业大学 | Video interframe compression method based on space-time correlation |
CN101783956A (en) * | 2010-02-03 | 2010-07-21 | 武汉大学 | Back-prediction forecast method based on spatio-temporal neighbor information |
CN103369209A (en) * | 2013-07-31 | 2013-10-23 | 上海通途半导体科技有限公司 | Video noise reduction device and video noise reduction method |
CN104349171A (en) * | 2013-07-31 | 2015-02-11 | 上海通途半导体科技有限公司 | Image compression encoding and decoding devices without visual loss, and encoding and decoding methods |
CN107105208A (en) * | 2017-06-06 | 2017-08-29 | 山东大学 | A kind of lossless coding and coding/decoding method of Bayer images |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110896487A (en) * | 2018-09-12 | 2020-03-20 | 阿诺德和里克特电影技术公司 | Method for compressing image data |
CN110896487B (en) * | 2018-09-12 | 2023-10-13 | 阿诺德和里克特电影技术公司 | Method for compressing image data |
CN110049337A (en) * | 2019-05-24 | 2019-07-23 | 安翰科技(武汉)股份有限公司 | The compression processing method and system of capsule endoscope bayer image |
CN110049337B (en) * | 2019-05-24 | 2021-05-25 | 安翰科技(武汉)股份有限公司 | Compression processing method and system for capsule endoscope bayer image |
CN113727117A (en) * | 2021-11-01 | 2021-11-30 | 武汉精测电子集团股份有限公司 | DP-based compressed data stream transmission method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108156461B (en) | 2021-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9906764B2 (en) | Resolution based formatting of compressed image data | |
KR102419112B1 (en) | Residual sign prediction method and apparatus in transform domain | |
US7483486B2 (en) | Method and apparatus for encoding high dynamic range video | |
JP6822121B2 (en) | Image processing equipment, image processing methods and programs | |
TW201921928A (en) | System and method of cross-component dynamic range adjustment (CC-DRA) in video coding | |
WO2010004726A1 (en) | Image coding method, image decoding method, image coding device, image decoding device, program, and integrated circuit | |
JP6141295B2 (en) | Perceptually lossless and perceptually enhanced image compression system and method | |
KR20100016214A (en) | Video camera | |
JP2008527789A (en) | Entropy encoding method | |
KR20200110442A (en) | Method and apparatus for harmonizing multi-code bit hiding and residual code prediction | |
JP2005517316A (en) | Configurable pattern optimizer | |
US10735724B2 (en) | Method and device for compressing image on basis of photography information | |
CN112042202B (en) | Decoded picture buffer management and dynamic range adjustment | |
US20160301894A1 (en) | Video camera with rate control video compression | |
CN108156461A (en) | A kind of Bayer method for compressing image and device | |
JP2017216630A (en) | Image encoding device and its control method | |
Perra et al. | Light field compression on sliced lenslet array | |
Richter et al. | Bayer pattern compression with JPEG XS | |
JP6685198B2 (en) | Imaging device, control method thereof, and program | |
TW202141979A (en) | Methods for quantization parameter control for video coding with joined pixel/transform based quantization | |
CN114600166A (en) | Image processing method, image processing apparatus, and storage medium | |
CN108989820B (en) | Data compression method and device adopting respective corresponding chroma sampling formats at all stages | |
JP2020123864A (en) | Image encoder | |
US11785352B2 (en) | Image encoding apparatus, method for controlling the same, and non-transitory computer-readable storage medium | |
CN116828200B (en) | Image processing method, processing device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220419 Address after: 250200 room 9001-2, floor 9, building 1, shuangchuang base, No. 7888 jingshidong Road, Shuangshan street, Zhangqiu District, Jinan City, Shandong Province Patentee after: Qingchi (Jinan) Intelligent Technology Co.,Ltd. Address before: 201203 block 22301-1530, building 14, No. 498, GuoShouJing Road, Pudong New Area, Shanghai Patentee before: SHANGHAI TONGTU SEMICONDUCTOR TECHNOLOGY Co.,Ltd. |
|
TR01 | Transfer of patent right |