CN106954065A - Recursive prediction method for compressing image based on gradient orientation histogram - Google Patents

Recursive prediction method for compressing image based on gradient orientation histogram Download PDF

Info

Publication number
CN106954065A
CN106954065A CN201710119825.9A CN201710119825A CN106954065A CN 106954065 A CN106954065 A CN 106954065A CN 201710119825 A CN201710119825 A CN 201710119825A CN 106954065 A CN106954065 A CN 106954065A
Authority
CN
China
Prior art keywords
pixel
matrix
block
row
prediction
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
Application number
CN201710119825.9A
Other languages
Chinese (zh)
Other versions
CN106954065B (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.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN201710119825.9A priority Critical patent/CN106954065B/en
Publication of CN106954065A publication Critical patent/CN106954065A/en
Application granted granted Critical
Publication of CN106954065B publication Critical patent/CN106954065B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a kind of recursive prediction method for compressing image based on frequency domain direction wave filter, it is low mainly to solve grain direction accuracy in detection in the prior art, and time complexity is high, the problem of predictive coefficient number is more.Its step is:1) prototype anisotropic filter;2) one group of anisotropic filter is generated according to prototype anisotropic filter;3) original-gray image data are read in, and carry out grain direction judgement;4) original-gray image data are extended;5) expanded image data is read out in units of block;6) according to the block number of reading according to setting up Markov prediction;7) the block number evidence to reading is predicted compression;8) judge whether to complete the prediction of all block number evidences, if it is, terminating compression, otherwise data read address saltus step, return to step 5).The present invention can flexibly and accurately detect grain direction, and time complexity is low, and predictive coefficient number is few, improves compression performance, available for the image compression encoding to various digital devices.

Description

Recursive prediction method for compressing image based on gradient orientation histogram
Technical field
The present invention relates to technical field of image processing is belonged to, further relate to a kind of method for compressing image, available for pair The image compression encoding of various digital devices.
Background technology
Information age people increasingly obtain and utilized information by computer, and the multimedia messages after digitizing have There is mass data, have very big difference between the Computer Storage resource and the network bandwidth that can be provided with Current hardware technology Away from, therefore the storage and transmission of information cause very big difficulty.Image information is as most important resource on computer, to it Carry out effective compression processing undoubtedly necessary, can also bring huge benefit.Compression of images is not still various dynamic State compression of images, the basis of transmission, but also be to influence the key factor of its effect quality.
Predictive coding, as the topmost method of compression of images, is also most basic method, at some to picture compression matter The field that amount requires higher is often used, such as text image and medical imaging.Predictive coding generally comprises two parts:One Part is decorrelation, and mostly using fallout predictor, pixel grey scale to be encoded is predicted using encoded neighborhood territory pixel gray value Value;Another part is to carry out entropy code to predicated error.
Fallout predictor is generally divided into following three types:
(1) global prediction device:To different pictures or to the different pixels point in a width picture, using the pre- of one group of fixation Coefficient is surveyed to be predicted it;
(2) local predictor:Difference part to image is predicted using different predictive coefficients to it;
(3) fully adaptive fallout predictor:Predictive coefficient changes with the change of image slices vegetarian refreshments.
Main method based on prediction has the intermediate value rim detection MED side used in Joint Photographic Experts Group JPEG-LS Method, this method from top to bottom, is from left to right encoded pixel-by-pixel to the pixel of piece image, and its essence is that current region is entered The simple gradient calculation of row one, is predicted then along the direction parallel with border.For current pixel X prediction, it is Different variable-length encoding patterns are first selected according to the gradient between neighborhood pixels, then current pixel is predicted, will be current Pixel is subtracted each other with prediction pixel obtains prediction difference, finally carries out entropy code to prediction difference.
Compared to JPEG-LS, the self-adaptive non-loss method for encoding images CALIC based on context is more multiple using one The miscellaneous adaptive forecasting method GAP based on gradient.This method based on context the horizontal gradient of formwork calculation current pixel and Vertical gradient, obtains the difference of horizontal gradient and vertical gradient, is then judged whether horizontally or vertically according to difference Edge, finally according to the intensity of variation at horizontally or vertically edge, suitably chooses the weight calculation current pixel of adjacent pixel Predicted value.
Although above-mentioned JPEG-LS, CALIC employ the adaptive prediction algorithm based on context and pixel are carried out in advance Survey, but taken due to both is relatively simple gradient calculation, it is impossible to texture trend, therefore compression accuracy are tracked well Have to be hoisted.In recent years, many scholars were studied fast intra-mode prediction model selection, and introduced Canny edge sides To histogram method, the texture features of image are more fully utilized.
One kind is proposed in the article " the image adaptive predictive coding based on LMS " that the super and all inspection of Xiaoization in 2011 is delivered The Forecasting Methodology of adaptive updates weights, electronic design engineering, 2011.19 (4):p.109-112.Its essence is to being adopted in prediction Neighborhood pixels constantly update weights, to obtain less prediction difference, although this method prediction is relatively more accurate, due to not having There are the texture features for making full use of image, time complexity is too high.
, the paper " the Fast Intra-prediction Algorithm research judged based on texture similarity " that burnt long day wise man delivers at it in 2012 In disclose it is a kind of based on texture similarity judge quick selection intra prediction mode method, Xian Electronics Science and Technology University, 2012.Although this method is avoided that full search pattern, and the time complexity of infra-frame prediction is greatly lowered, but is due to various The prediction of each pixel uses linear prediction under predictive mode, and predictive coefficient number is more, and data to be compressed are added again Amount.
The content of the invention
It is an object of the invention to overcome the shortcomings of above-mentioned prior art, there is provided a kind of passing based on gradient orientation histogram Return prognostic chart picture compression method, to reduce time complexity, reduce the number and prediction difference of predictive coefficient, realize compression performance Lifting.
Realizing the technical scheme of the object of the invention is:By the method based on Sobel gradient orientation histograms and recurrence Ma Er Can husband's forecast model be combined, first judge the grain direction of image block, then utilize neighbouring some reference pixels in this direction Recurrence Markov prediction is set up, the weight coefficient of reference pixel in forecast model is obtained using least-squares estimation, is had Body step includes as follows:
(1) from natural image concentrate read in a width size be M × M, the original-gray image that suffix is .raw forms, its In, M represents the width and height of original-gray image, × represent multiplication operations;
(2) grain direction judgement is carried out to original image:
(2a) carries out each a line up and down to the original-gray image in step (1), and the border extension of each row in left and right is obtained Size is (M+2) × (M+2) expanded images;
(2b), according to from left to right, order from top to bottom does not include side using Sobel gradient operators to expanded images The gradient direction angle of each pixel of boundary's extension is calculated, and then obtains the gradient direction angle matrix G of original-gray image;
Gradient direction angle matrix G is uniformly divided into the block matrix that size is N × N by (2c), reads these block matrix, and will read Number of times k is taken to be initialized as 1, wherein, N represents block matrix line number and columns, and value is 4 or 8;
(2d) counts the gradient orientation histogram of k-th of block matrix, obtains the corresponding angle of gradient orientation histogram peak value , and according to the orthogonality relation in image texture direction and image gradient direction, the texture principal direction angle for determining video data block is
(2e) judges whether that the grain direction for completing all original-gray image data blocks judges, if it is, performing step Suddenly (3), otherwise, k increases 1, return to step (2d) certainly.
(3) the original-gray image data in step (1) are carried out with each three row up and down, the border extension of each three row in left and right, Obtain size and be (M+6) × (M+6) expanded image data, and data read address is initialized as expanded image data address Original position;
(4) since data read address, to expanded image data using size as (N+3) × (N+3) block be unit carry out Read;
(5) according to the block number of reading according to setting up Markov prediction:
The texture principal direction that (5a) is obtained according to step (2), to block number according in include the row of top three, the left side three arrange it is each Individual pixel, two-dimentional recurrence Markov prediction is set up using with some reference image vegetarian refreshments neighbouring in the grain direction;
(5b) estimates the weights system of reference pixel in recurrence Markov prediction using the method for least-squares estimation Number;
(6) prediction of block number evidence
(6a) does not include the row of top three to block number in, each pixel that the left side three is arranged, according to what is set up in step (5) Recurrence Markov prediction is predicted, and obtains predicting value matrix;
Block number is not included the row of top three by (6b) in, each grey scale pixel value that the left side three is arranged, with it in predicted value square Corresponding predicted value is subtracted each other in battle array, obtains matrix of differences R, and matrix of differences R progress discrete cosine transforms are become Coefficient matrix T is changed, then transform coefficient matrix T is quantified, entropy code, compressed code is obtained;
(6c) is decoded to compressed code, re-quantization, inverse dct transform, the matrix of differences R ' after being restored, and by R ' with Matrix of differences R, which is added, to be obtained rebuilding value matrix, according to reconstruction value matrix to pixel at the appropriate address in expanded image data block Value is updated;
(7) judge whether to complete the pre- measured compressed of all block number evidences, if it is, terminate compression, otherwise, digital independent Location saltus step is the initial address of next block number evidence, return to step (4).
The present invention compared with prior art, has the following advantages that:
1. reduce time complexity.
The present invention improves selection due to according to Sobel gradient orientation histograms, prejudging the grain direction of image block The speed of predictive mode, reduces time complexity.
2. improve estimated performance and compression performance.
The present invention is obtained due to original-gray image data are carried out with each three row up and down, the border extension of each three row in left and right Size is (M+6) × (M+6) expanded image data, and to expanded image data using size as (N+3) × (N+3) block is unit It is read out, it is contemplated that the reading to the reference pixel reconstructed value of the row row of top three of the left side three of block number evidence, overcomes existing skill The problem of art is simply inaccurate to result caused by image block, reduces prediction residual, improves estimated performance;While by The method based on Sobel histogram of gradients is combined with recurrence Markov prediction in the present invention, same block number The prediction of all pixels in reduces the number of predictive coefficient with reference to same group of weight coefficient, can preferably adapt to figure As local grain characteristic, more accurately pixel predictors are obtained, prediction difference is reduced, further improves compression performance.
Brief description of the drawings
Fig. 1 be the present invention realize flow chart;
Embodiment
With reference to the accompanying drawings and examples, the embodiment to the present invention is described in further detail, embodiment For illustrating the present invention, but it is not limited to the scope of the present invention.
The present invention's of reference picture 1 realizes that step is as follows:
Step one, original-gray image data are read in.
From natural image concentrate read in a width size be M × M, the original-gray image that suffix is .raw forms, wherein, M The width and height of original-gray image are represented, × represent multiplication operations;
Original-gray image data are carried out grain direction judgement by step 2.
2.1) each a line up and down is carried out to the original-gray image in step one, the border extension of each row in left and right is obtained Size is (M+2) × (M+2) expanded images, wherein each a line up and down, the border extension of each row in left and right, refer to original ash Centered on the edge pixel point for spending image, to a line each up and down in expanded image data, each row pixel in left and right carries out mirror As assignment;
2.2) according to from left to right, order from top to bottom does not include side using Sobel gradient operators to expanded images The gradient direction angle of each pixel of boundary's extension is calculated:
2.2a) choose Sobel gradient operator pattern matrixs as follows:
Wherein SxFor horizontal direction gradient operator, SyFor vertical direction gradient operator;
2.2b) by SxConvolution is carried out with 3 × 3 neighborhoods of current pixel point, horizontal direction gradient G is obtainedx, and by SyWith working as 3 × 3 neighborhoods of preceding pixel point carry out convolution, obtain vertical direction gradient Gy
2.2c) according to step (2.2b) result, the gradient direction angle θ (x, y) of current pixel point is calculated:
2.3) gradient direction angle of each pixel is counted, obtains the gradient direction angle matrix of original-gray image G;
2.4) gradient direction angle matrix G is uniformly divided into the block matrix that size is N × N, reads these block matrix, and will read Number of times k is taken to be initialized as 1, wherein, N represents block matrix line number and columns, and value is 4 or 8;
2.5) gradient orientation histogram of k-th of block matrix is counted, the corresponding angle of gradient orientation histogram peak value is obtainedAnd according to the orthogonality relation in image texture direction and image gradient direction, determine the texture principal direction angle of video data block For
2.6) judge whether that the grain direction for completing all original-gray image data blocks judges, if it is, performing step Rapid three, otherwise, k increases 1, return to step (2.5) certainly.
Pass through above-mentioned steps one and step 2, you can complete to carry out grain direction judgement to original-gray image data, with Lower step will start to be predicted gray level image compression:
Step 3, extends original-gray image data.
Original-gray image data in step one are carried out with each three row up and down, the border extension of each three row in left and right is obtained Size is (M+6) × (M+6) expanded image data, and the address that data read address is initialized as into expanded image data is risen Beginning position, wherein each three row up and down, the border extension of each three row in left and right refers to the edge pixel point using original-gray image in The heart, to three rows each up and down in expanded image data, each three row pixel in left and right carries out mirror image assignment;
Step 4, since data read address, to expanded image data using size as (N+3) × (N+3) block is unit It is read out.
4.1) initialize (N+3) × (N+3) two-dimensional matrix and carry out memory block data, and reading times i is initialized as 0, because to not including the row of top three, the prediction of the pixel of block number that the left side three is arranged in is, it is necessary to reference to neighbouring and completed Some pixel reconstructed values of the block of prediction, therefore in this step, overabsorption go out 3 × 3 matrix unit store it is neighbouring and Some pixel reconstructed values of the block of prediction are completed;
4.2) since data read address, N+3 data are read, and these data are assigned to the first of two-dimensional matrix OK;
4.3) data read address is increased into M+6, and i is increased 1 certainly;
4.4) judge whether i is equal to N+3, if it is, the reading of complete block data, otherwise, return to step 4.2).
Step 5, according to the block number of reading according to setting up Markov prediction.
5.1) the texture principal direction obtained according to step 4, to block number according in include the row of top three, the left side three arrange it is each Individual pixel, two-dimentional recurrence Markov prediction is set up such as using with some reference image vegetarian refreshments neighbouring in the grain direction Under:
U (i, j)=ρ1u1(i,j)+ρ2u2(i,j)+ρ3u3(i,j)+ρ4u4(i, j)+e (i, j), i, j=0,1,2 ... N
Wherein u (i, j) denotation coordination is the predicted value of the pixel of (i, j), u1(i,j),u2(i,j),u3(i,j),u4 (i, j) represents the gray value of four reference pixels, ρ respectively1234The weight coefficient of respectively four reference pixels, e is White noise;
It is different according to the direction number L of the one of design group of anisotropic filter value, four ginsengs of diverse location can be chosen Examine pixel, when L=8 exemplified by, the gray value for four reference pixels that eight kinds of grain directions are chosen is as follows:
In 0 degree of direction of level:
u1(i, j)=u (i-1, j)
u2(i, j)=u (i-2, j)
u3(i, j)=u (i-3, j)
u4(i, j)=u (i-2, j-1)
Counterclockwise with x-axis positive axis into the direction of 22.5 degree of angles:
u1(i, j)=u (i, j-1)
u2(i, j)=u (i+1, j-1)
u3(i, j)=u (i+2, j-1)
u4(i, j)=u (i+2, j-2)
In direction counterclockwise with x-axis positive axis in angle of 45 degrees:
u1(i, j)=u (i, j-1)
u2(i, j)=u (i+1, j-1)
u3(i, j)=u (i+1, j-2)
u4(i, j)=u (i+2, j-2)
Counterclockwise with x-axis positive axis into the direction of 67.5 degree of angles:
u1(i, j)=u (i, j-1)
u2(i, j)=u (i+1, j-1)
u3(i, j)=u (i, j-2)
u4(i, j)=u (i+1, j-2)
Counterclockwise with x-axis positive axis into the direction of 90 degree of angles:
u1(i, j)=u (i, j-1)
u2(i, j)=u (i+1, j-1)
u3(i, j)=u (i+1, j-2)
u4(i, j)=u (i+2, j-2)
Counterclockwise with x-axis positive axis into the direction of 112.5 degree of angles:
u1(i, j)=u (i, j-1)
u2(i, j)=u (i-1, j-1)
u3(i, j)=u (i-1, j-2)
u4(i, j)=u (i, j-2)
Counterclockwise with x-axis positive axis into the direction of 135 degree of angles:
u1(i, j)=u (i-1, j)
u2(i, j)=u (i-1, j-1)
u3(i, j)=u (i, j-1)
u4(i, j)=u (i-2, j-2)
Counterclockwise with x-axis positive axis into the direction of 157.5 degree of angles:
u1(i, j)=u (i-1, j)
u2(i, j)=u (i-2, j-1)
u3(i, j)=u (i-1, j-1)
u4(i, j)=u (i, j-1)
In L > 8, quadratic interpolattion is respectively adopted for L kind grain directions, is calculated in grain direction from the close-by examples to those far off Four grey scale pixel values in the same direction, are used as the gray value of four reference pixels;
5.2) using the method for least-squares estimation, to the weight coefficient of reference pixel in recurrence Markov prediction Estimated as follows:
5.2a) block number is not included in each pixel that the row of top three, the left side three are arranged Prediction sum squares E (i, J) it is expressed as follows:
E (i, j)=(u (i, j)-ρ1u1(i,j)-ρ2u2(i,j)-ρ3u3(i,j)-ρ4u4(i,j))2
Wherein u (i, j) denotation coordination is the predicted value of the pixel of (i, j), u1(i,j),u2(i,j),u3(i,j),u4 (i, j) represents the gray value of four reference pixels, ρ respectively1234The weight coefficient of respectively four reference pixels, i, j =1,2 ... N, wherein N represent that block number does not include the row of top three, the line number in the region of the row pixel of the left side three and columns, value in For 4 or 8;
5.2b) block number is not included in each pixel that the row of top three, the left side three are arranged Prediction sum squares E (i, J) it is added, obtains the Prediction sum squares E of block number evidencetotal
WhereinRepresent in i=1,2 ... N, j=1,2 ... it is cumulative to E (i, j) in the range of N;
5.2c) according to the Prediction sum squares E of block number evidencetotalSet up equation group:
WhereinRepresent EtotalTo the weight coefficient ρ of first reference pixel1Seek partial differential,Represent EtotalTo the weight coefficient ρ of second reference pixel2Seek partial differentialRepresent Etotal To the weight coefficient ρ of the 3rd reference pixel3Seek partial differential,Represent EtotalTo the power of the 4th reference pixel Value coefficient ρ4Seek partial differential;
5.2d) equation group in step (5.2c) is solved, reference pixel weight coefficient vector is obtainedAnd then Obtain the weight coefficient ρ of four reference pixels1234
Original picture block data are predicted compression by step 6.
6.1) each pixel of the row of top three, the row of the left side three is not included in block number, according to what is set up in step 5 Recurrence Markov prediction is predicted, and obtains predicting value matrix;
6.2) each grey scale pixel value for not arranging block number including the row of top three, the left side three in, with it in predicted value square Corresponding predicted value is subtracted each other in battle array, obtains matrix of differences R, and matrix of differences R progress discrete cosine transforms are become Coefficient matrix T is changed, then transform coefficient matrix T is quantified, entropy code, compressed code is obtained, if wherein by quantization step Omit, the compressed code of Lossless Compression can be obtained;
6.3) compressed code is decoded, re-quantization, inverse dct transform, the matrix of differences R ' after being restored, and by R ' with Matrix of differences R, which is added, to be obtained rebuilding value matrix, according to reconstruction value matrix to pixel at the appropriate address in expanded image data block Value is updated.
Step 7, judges whether to complete the prediction of all block number evidences, if it is, terminate compression, otherwise, digital independent Location saltus step is the initial address of next block number evidence, return to step four.
Above description is only example of the present invention, does not constitute any limitation of the invention, it is clear that for this , all may be without departing substantially from the principle of the invention, structure after understand present disclosure and principle for the professional in field In the case of, the various modifications and variations in form and details are carried out, but these modifications and variations based on inventive concept are still Within the claims of the present invention.

Claims (5)

1. the recursive prediction method for compressing image based on gradient orientation histogram, specific steps include as follows:
(1) from natural image concentrate read in a width size be M × M, the original-gray image that suffix is .raw forms, wherein, M tables Show the width and height of original-gray image, × represent multiplication operations;
(2) grain direction judgement is carried out to original image:
(2a) carries out each a line up and down to the original-gray image in step (1), and the border extension of each row in left and right obtains size For (M+2) × (M+2) expanded images;
(2b), according to from left to right, order from top to bottom is expanded the border that do not include of expanded images using Sobel gradient operators The gradient direction angle of each pixel of exhibition is calculated, and then obtains the gradient direction angle matrix G of original-gray image;
Gradient direction angle matrix G is uniformly divided into the block matrix that size is N × N by (2c), reads these block matrix, and will read secondary Number k is initialized as 1, wherein, N represents block matrix line number and columns, and value is 4 or 8;
(2d) counts the gradient orientation histogram of k-th of block matrix, obtains the corresponding angle of gradient orientation histogram peak valueAnd According to the orthogonality relation in image texture direction and image gradient direction, the texture principal direction angle for determining video data block is
(2e) judges whether that the grain direction for completing all original-gray image data blocks judges, if it is, performing step (3), otherwise, k increases 1, return to step (2d) certainly.
(3) the original-gray image data in step (1) are carried out with each three row up and down, the border extension of each three row in left and right is obtained Size is (M+6) × (M+6) expanded image data, and data read address is initialized as into the starting of expanded image data address Position;
(4) since data read address, to expanded image data using size as (N+3) × (N+3) block is read out for unit;
(5) according to the block number of reading according to setting up Markov prediction:
The texture principal direction that (5a) is obtained according to step (2), each picture of the row of top three, the row of the left side three is not included to block number in Vegetarian refreshments, two-dimentional recurrence Markov prediction is set up using with some reference image vegetarian refreshments neighbouring in the grain direction;
(5b) estimates the weight coefficient of reference pixel in recurrence Markov prediction using the method for least-squares estimation;
(6) prediction of block number evidence
(6a) does not include the row of top three to block number in, each pixel that the left side three is arranged, according to the recurrence set up in step (5) Markov prediction is predicted, and obtains predicting value matrix;
Block number is not included the row of top three by (6b) in, each grey scale pixel value that the left side three is arranged, with it in prediction value matrix Corresponding predicted value is subtracted each other, and obtains matrix of differences R, and obtain transformation series to matrix of differences R progress discrete cosine transforms Matrix number T, is then quantified, entropy code to transform coefficient matrix T, obtains compressed code;
(6c) is decoded to compressed code, re-quantization, inverse dct transform, the matrix of differences R ' after being restored, and by R ' and difference Matrix R, which is added, to be obtained rebuilding value matrix, and pixel value at the appropriate address in expanded image data block is entered according to value matrix is rebuild Row updates;
(7) judge whether to complete the pre- measured compressed of all block number evidences, if it is, terminating compression, otherwise, data read address is jumped It is changed into the initial address of next block number evidence, return to step (4).
2. the ladder of each pixel of original-gray image according to the method described in claim 1, is calculated wherein in step (2b) Deflection is spent, is carried out as follows:
It is as follows that (2b1) chooses Sobel gradient operator pattern matrixs:
S x = - 1 0 + 1 - 2 0 + 2 - 1 0 + 1 , S y = + 1 + 2 + 1 0 0 0 - 1 - 2 - 1
Wherein SxFor horizontal direction gradient operator, SyFor vertical direction gradient operator;
(2b2) is by SxConvolution is carried out with 3 × 3 neighborhoods of current pixel point, horizontal direction gradient G is obtainedx, and by SyWith current picture 3 × 3 neighborhoods of vegetarian refreshments carry out convolution, obtain vertical direction gradient Gy
(2b3) calculates the gradient direction angle θ (x, y) of current pixel point according to step (2b2) result:
θ ( x , y ) = a r c t a n ( G y G x ) .
3. according to the method described in claim 1, wherein in step (4) to expanded image data using size as (N+3) × (N+3) Block is read out for unit, carries out as follows:
(4a) initializes (N+3) × (N+3) two-dimensional matrix and carrys out memory block data, and reading times i is initialized as into 1;
(4b) reads N+3 data, and be assigned to the first row of two-dimensional matrix since data read address;
Data read address is increased M+6 by (4c), and i is increased into 1 certainly;
(4d) judges whether i is equal to N+3, if it is, the reading of complete block data, otherwise, return to step (4b).
4. according to the method described in claim 1, the two-dimensional Markov forecast model wherein in step (5a), is expressed as follows:
U (i, j)=ρ1u1(i,j)+ρ2u2(i,j)+ρ3u3(i,j)+ρ4u4(i, j)+e (i, j), i, j=0,1,2 ... N
Wherein u (i, j) denotation coordination is the predicted value of the pixel of (i, j), u1(i,j),u2(i,j),u3(i,j),u4(i, j) point Not Biao Shi four reference pixels gray value, ρ1234The weight coefficient of respectively four reference pixels, e (i, j) is white Noise.
5. according to the method described in claim 1, referred in the estimation recurrence Markov prediction wherein in step (5b) The weight coefficient of pixel, is carried out as follows:
(5b1) does not include block number in the row of top three, Prediction sum squares E (i, the j) table for each pixel that the left side three is arranged in Show as follows:
E (i, j)=(u (i, j)-ρ1u1(i,j)-ρ2u2(i,j)-ρ3u3(i,j)-ρ4u4(i,j))2
Wherein u (i, j) denotation coordination is the predicted value of the pixel of (i, j), u1(i,j),u2(i,j),u3(i,j),u4(i, j) point Not Biao Shi four reference pixels gray value, ρ1234The weight coefficient of respectively four reference pixels, i, j=1,2 ... N, wherein N represent that block number does not include the row of top three, the line number in the region of the row pixel of the left side three and columns in, and value is 4 or 8;
Block number is not included the row of top three by (5b2) in, the Prediction sum squares E (i, j) for each pixel that the left side three is arranged enters Row is added, and obtains the Prediction sum squares E of block number evidencetotal
E t o t a l = Σ i = 1 N Σ j = 1 N E ( i , j )
WhereinRepresent in i=1,2 ... N, j=1,2 ... it is cumulative to E (i, j) in the range of N;
(5b3) is according to the Prediction sum squares E of block number evidencetotalSet up equation group:
∂ E t o t a l / ∂ ρ 1 = 0 ∂ E t o t a l / ∂ ρ 2 = 0 ∂ E t o t a l / ∂ ρ 3 = 0 ∂ E t o t a l / ∂ ρ 4 = 0
WhereinRepresent EtotalTo the weight coefficient ρ of first reference pixel1Seek partial differential,Table Show EtotalTo the weight coefficient ρ of second reference pixel2Seek partial differentialRepresent Etotal3rd is referred to The weight coefficient ρ of pixel3Seek partial differential,Represent EtotalTo the weight coefficient ρ of the 4th reference pixel4Ask inclined Differential;
(5b4) is solved to the equation group in step (5b3), obtains reference pixel weight coefficient vectorAnd then obtain four The weight coefficient ρ of individual reference pixel1234
CN201710119825.9A 2017-03-01 2017-03-01 Recursive prediction image compression method based on gradient direction histogram Active CN106954065B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710119825.9A CN106954065B (en) 2017-03-01 2017-03-01 Recursive prediction image compression method based on gradient direction histogram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710119825.9A CN106954065B (en) 2017-03-01 2017-03-01 Recursive prediction image compression method based on gradient direction histogram

Publications (2)

Publication Number Publication Date
CN106954065A true CN106954065A (en) 2017-07-14
CN106954065B CN106954065B (en) 2020-01-07

Family

ID=59467108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710119825.9A Active CN106954065B (en) 2017-03-01 2017-03-01 Recursive prediction image compression method based on gradient direction histogram

Country Status (1)

Country Link
CN (1) CN106954065B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070788A (en) * 2020-09-03 2020-12-11 武汉工程大学 Image processing method for rapidly counting deformation twin crystal based on block gradient segmentation
CN112967207A (en) * 2021-04-23 2021-06-15 北京恒安嘉新安全技术有限公司 Image processing method and device, electronic equipment and storage medium
CN116071242A (en) * 2023-03-17 2023-05-05 山东云海国创云计算装备产业创新中心有限公司 Image processing method, system, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007035387A2 (en) * 2005-09-16 2007-03-29 Sony Electronics, Inc. Adaptive motion estimation for temporal prediction filter over irregular motion vector samples
CN101977323A (en) * 2010-11-16 2011-02-16 上海交通大学 Method for reconstructing distributed video coding based on constraints on temporal-spatial correlation of video
CN103856776A (en) * 2013-12-26 2014-06-11 辽宁师范大学 Image coding and decoding method for boundary and curvature drive repairing
CN105069819A (en) * 2015-07-23 2015-11-18 西安交通大学 Predicted value compensation method based on MED predication algorithm
CN106231322A (en) * 2016-07-21 2016-12-14 北京奇艺世纪科技有限公司 Lossless image compression method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007035387A2 (en) * 2005-09-16 2007-03-29 Sony Electronics, Inc. Adaptive motion estimation for temporal prediction filter over irregular motion vector samples
CN101977323A (en) * 2010-11-16 2011-02-16 上海交通大学 Method for reconstructing distributed video coding based on constraints on temporal-spatial correlation of video
CN103856776A (en) * 2013-12-26 2014-06-11 辽宁师范大学 Image coding and decoding method for boundary and curvature drive repairing
CN105069819A (en) * 2015-07-23 2015-11-18 西安交通大学 Predicted value compensation method based on MED predication algorithm
CN106231322A (en) * 2016-07-21 2016-12-14 北京奇艺世纪科技有限公司 Lossless image compression method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070788A (en) * 2020-09-03 2020-12-11 武汉工程大学 Image processing method for rapidly counting deformation twin crystal based on block gradient segmentation
CN112070788B (en) * 2020-09-03 2023-03-10 武汉工程大学 Image processing method for rapidly counting deformation twin crystal based on block gradient segmentation
CN112967207A (en) * 2021-04-23 2021-06-15 北京恒安嘉新安全技术有限公司 Image processing method and device, electronic equipment and storage medium
CN112967207B (en) * 2021-04-23 2024-04-12 北京恒安嘉新安全技术有限公司 Image processing method and device, electronic equipment and storage medium
CN116071242A (en) * 2023-03-17 2023-05-05 山东云海国创云计算装备产业创新中心有限公司 Image processing method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN106954065B (en) 2020-01-07

Similar Documents

Publication Publication Date Title
CN106952314B (en) Recursive prediction method for compressing image based on frequency domain direction filter
CN108141594B (en) Method and apparatus for encoding or decoding image
CN101366279B (en) Adaptive motion search range
US20150154450A1 (en) Optical Flow Tracking Method and Apparatus
US6590937B1 (en) Efficient motion vector detection
CN110222758A (en) A kind of image processing method, device, equipment and storage medium
JP3733161B2 (en) Image processing apparatus and method
JPH10313456A (en) Signal-adaptive filtering method and signal-adaptive filter
JPH1056643A (en) Device for encoding and decoding moving image recording arbitrary object
CN106954065A (en) Recursive prediction method for compressing image based on gradient orientation histogram
KR20080050491A (en) Classified filtering for temporal prediction
CN111050176B (en) Video encoding method, video decoding method, video encoding apparatus, video decoding apparatus, computer device, and storage medium
CN103262539A (en) Moving image encoding device, moving image decoding device, moving image encoding method and moving image decoding method
Walach et al. A fractal based approach to image compression
Peter Fast inpainting-based compression: Combining Shepard interpolation with joint inpainting and prediction
Wang et al. Perceptually quasi-lossless compression of screen content data via visibility modeling and deep forecasting
JP2019023798A (en) Super-resolution device and program
CN114651270A (en) Depth loop filtering by time-deformable convolution
JP6678835B2 (en) Crowd density calculation device, crowd density calculation method, and crowd density calculation program
US20150296207A1 (en) Method and Apparatus for Comparing Two Blocks of Pixels
CN110136061B (en) Resolution improving method and system based on depth convolution prediction and interpolation
CN106231322A (en) Lossless image compression method and device
CN114565511A (en) Lightweight image registration method, system and device based on global homography estimation
CN104125471B (en) A kind of video image compressing method
Knezovic et al. Novel prediction based technique for efficient compression of medical imaging data

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