CN103118261A - Method for rapidly selecting H.264 interframe modes - Google Patents
Method for rapidly selecting H.264 interframe modes Download PDFInfo
- Publication number
- CN103118261A CN103118261A CN2013100775867A CN201310077586A CN103118261A CN 103118261 A CN103118261 A CN 103118261A CN 2013100775867 A CN2013100775867 A CN 2013100775867A CN 201310077586 A CN201310077586 A CN 201310077586A CN 103118261 A CN103118261 A CN 103118261A
- Authority
- CN
- China
- Prior art keywords
- macro block
- frame
- macro
- image
- coloured image
- 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.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention relates to the field of video coding, in particular to a method for rapidly selecting H.264 interframe modes. The method includes the steps: S01, performing region segmentation by the aid of a depth image corresponding to a color image and respectively extracting a background region and a motion region of the color image; S02, dividing macro-blocks for the color image; S03, marking the region type of each macro-block as a background region macro-block, a motion region macro-block or other region macro-blocks according to the region of the color image in each macro-block; and S04, selecting a corresponding coding strategy according to the region type of each macro-block. By the method for rapidly selecting the H.264 interframe modes, operational complexity of H.264 interframe coding is reduced, interframe mode selection is accelerated, and coding time is effectively shortened while video quality is ensured.
Description
Technical field
The present invention relates to field of video encoding, relate in particular to a kind of H.264 inter-frame mode fast selecting method, the method can effectively reduce the computation complexity of encoder, accelerates inter mode decision speed.
Background technology
JVT(or H.264, MPEG-4 AVC) video encoding standard has become the video compression standard of main flow day by day, but H.264 the complexity of encoder is higher.In the implementation procedure of H.264 encoding, model selection (MD) and estimation (ME) are the operand the best parts.In inter mode decision, the macro block of 16x16 can be divided into 16x8, the sub-macro block of 8x16 or 8x8, and sub-macro block can also be divided into 8x4,4x8, the small size macro block of 4x4.In order to select optimum macro-block coding pattern, H.264 encoder need to calculate the rate distortion costs (RDCost) of all candidate pattern, will produce the pattern of minimum rate distortion costs as optimal mode.In order to calculate the rate distortion costs under each pattern, need to be to repeatedly the residual error data of macro block being made integer transform, quantification, coding and inverse transformation.In addition, although the intra-frame encoding mode of P frame has lacked much than interframe encode, encoder still can calculate the rate distortion costs of the frame mode of each macro block.High computational complexity when above reason has caused the calculation rate distortion cost.Some researcher has proposed the improved mode selection, reduces computational complexity, saves the algorithm of scramble time.This class algorithm only relies on the information of coloured image itself to cut apart, often not accurately or algorithm too complicated.
The present invention utilizes depth image to carry out Region Segmentation.Background area and the motion of extracting image by adaptive Threshold segmentation and frame difference method are violent regional.Algorithm extracts the background area of image and the violent zone of moving according to the information of depth image, takes respectively different coding strategies for different zones during coding.When guaranteeing video quality, effectively shortened the scramble time.
Summary of the invention
In view of this, the purpose of this invention is to provide a kind of H.264 inter-frame mode fast selecting method, when guaranteeing video quality, effectively shortened the scramble time.
The present invention adopts following scheme to realize: a kind of H.264 inter-frame mode fast selecting method, it is characterized in that, and comprise the following steps:
S01: utilize depth image corresponding to coloured image to carry out Region Segmentation, extract respectively background area and the moving region of coloured image;
S02: coloured image is carried out macroblock partitions;
S03: be background area macro block, moving region macro block or other regional macro blocks according to the affiliated area type of each macro block of affiliated area mark of coloured image in each macro block;
S04: according to the corresponding coding strategy of affiliated area type selecting of each macro block: background area macro block search SKIP and inter16x16 pattern, moving region macro block search inter8x8 and intra-frame encoding mode, other regional macro blocks adopt full candidate pattern searching algorithm.
In an embodiment of the present invention, the concrete grammar of the background area of described extraction coloured image is: use the adaptive threshold split plot design to carry out Region Segmentation to every frame depth image, namely utilize morphological operator to carry out rim detection and obtain edge pixel, by building the grey level histogram of described edge pixel, the peak value of choosing low tonal range on described grey level histogram carries out cutting apart of background as segmentation threshold.
In an embodiment of the present invention, the concrete grammar of the moving region of described extraction coloured image is: use frame differential method to carry out Region Segmentation to every frame depth image, namely present frame depth image and former frame depth image being implemented frame differential method and calculate frame difference image, is moving region in coloured image with the regional determination that in described frame difference image, change in depth is violent.
In an embodiment of the present invention, the described concrete grammar that coloured image is carried out macroblock partitions is: coloured image is carried out the division of 16x16 macro block.
In an embodiment of the present invention, the concrete grammar of described step S03 is: belonging to background area, moving region and other regional pixel quantity in each macro block of coloured image accounts for the scale of sum of all pixels in macro block as the affiliated area type according to each macro block of mark.
In an embodiment of the present invention, the concrete grammar of described step S04 is: the background area macro block is only searched for SKIP pattern and inter16x16 pattern, and stops the model selection of back; The moving region macro block is only searched for inter8x8 and intra-frame encoding mode, and stops the model selection of back, saves the search time of other pattern; Other regional macro blocks adopt full candidate pattern searching algorithm.
A kind of H.264 inter-frame mode of the present invention fast selecting method has the characteristics of the following aspects:
(1) at present H.264 in standard in the inter mode decision algorithm amount of calculation large and complicated, and according to the characteristics of SKIP piece and inter8x8 piece, in the judgement that is applied to inter mode decision with video foreground and background detection technological innovation.
(2) can increase the accuracy that background area and moving region are cut apart, especially increase the slow regional SKIP of background area or motion and the quantity of inter16x16 pattern, reduce simultaneously and calculate complexity, when guaranteeing video quality, improved operation efficiency.
(3) in operation: the division to the figure macro block is: every two field picture is carried out the division of 16x16 macro block.Aspect Region Segmentation: based on depth image, utilize morphological operator to carry out rim detection and obtain edge pixel, by building the edge pixel grey level histogram, the peak value of choosing low tonal range on histogram carries out cutting apart of background as segmentation threshold.By asking the frame difference image of depth image, the part that change in depth in frame difference image is violent is as the moving region in image.The macro block that will belong in the background area selects SKIP and inter16x16 pattern to search for, and the macro block that belongs to the moving region selects inter8x8 or intra-frame encoding mode to search for.
Description of drawings
Fig. 1 is a kind of H.264 inter-frame mode of the present invention fast selecting method flow chart.
Fig. 2 a is a pending depth image.
Fig. 2 b is that threshold value is got the result images that Fig. 2 a is carried out the background area extraction at 68 o'clock.
Fig. 2 c is T
RIt is the result images after the macro block affiliated area of Fig. 2 b being judged in 0.5 o'clock.
Fig. 3 a adopts frame differential method to carry out the operation result image that extract the moving region.
Fig. 3 b is T
RIt is the result images after the macro block affiliated area of Fig. 3 a being judged in 0.5 o'clock.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below will by specific embodiment and relevant drawings, the present invention be described in further detail.
The invention provides a kind of H.264 inter-frame mode fast selecting method, it is characterized in that, comprise the following steps:
S01: utilize depth image corresponding to coloured image to carry out Region Segmentation, extract respectively background area and the moving region of coloured image;
S02: coloured image is carried out macroblock partitions;
S03: be background area macro block, moving region macro block or other regional macro blocks according to the affiliated area type of each macro block of affiliated area mark of coloured image in each macro block;
S04: according to the corresponding coding strategy of affiliated area type selecting of each macro block: background area macro block search SKIP and inter16x16 pattern, moving region macro block search inter8x8 and intra-frame encoding mode, other regional macro blocks adopt full candidate pattern searching algorithm.
As shown in Figure 1, the present embodiment provides a kind of H.264 inter-frame mode fast selecting method, it is characterized in that, comprises the following steps:
S01: utilize depth image corresponding to coloured image to carry out Region Segmentation, extract respectively background area and the moving region of coloured image;
S02: coloured image is carried out macroblock partitions;
S03: be background area macro block, moving region macro block or other regional macro blocks (i.e. macro block (mb) type except described background area macro block and described moving region macro block) according to the affiliated area type of each macro block of affiliated area mark of coloured image in each macro block;
S04: according to the corresponding coding strategy of affiliated area type selecting of each macro block:
Judge respectively the affiliated area type of each macro block, if the background area macro block is searched for SKIP and inter16x16 pattern, if the moving region macro block is searched for inter8x8 and intra-frame encoding mode, if other regional macro blocks adopt full candidate pattern searching algorithm.
The concrete grammar of the background area of described extraction coloured image is: use the adaptive threshold split plot design to carry out Region Segmentation to every frame depth image, namely utilize morphological operator to carry out rim detection and obtain edge pixel, by building the grey level histogram of described edge pixel, the peak value of choosing low tonal range on described grey level histogram carries out cutting apart of background as segmentation threshold.
Edge clear is the depth image outstanding feature, and the pixel on the edge often contains the boundary information of image-region, so we utilize the level of edge analysis depth image, utilizes the edge of morphology edge strength operator extraction depth image.Suppose that picture material is by background, prospect and zone line consist of, the grey level histogram that is in so the pixel on the edge will be multimodal and distribute, and the crest that is positioned at low gray areas is comprised of background pixel often, therefore we select gray value corresponding to crest as the threshold value of cutting apart depth map, depth image to be carried out Threshold segmentation (as binary conversion treatment), extract the background area in image.As shown in Fig. 2 b, Fig. 2 b is that threshold value is got the result images that Fig. 2 a is carried out the background area extraction at 68 o'clock.Fig. 2 a is a pending depth image.
The concrete grammar of the moving region of described extraction coloured image is: use frame differential method to carry out Region Segmentation to every frame depth image, namely present frame depth image and former frame depth image being implemented frame differential method and calculate frame difference image, is moving region in coloured image with the regional determination that in described frame difference image, change in depth is violent.
Detecting moving target with frame differential method is important method in the extraction algorithm, and because degree of depth sequence is subject to light and interference of texture hardly, therefore, we extract the moving region of coloured image from the frame difference image of degree of depth sequence.
In a preferred embodiment of the present invention, the described concrete grammar that coloured image is carried out macroblock partitions is: coloured image is carried out the division of 16x16 macro block, or carry out the division of other macro blocks, do not do restriction at this.
The concrete grammar of described step S03 is: belonging to background area, moving region and other regional pixel quantity in each macro block of coloured image accounts for the scale of sum of all pixels in macro block as the affiliated area type according to each macro block of mark.
Be positioned in the macro block of any one 16x16 in the note coloured image (
i,
j) being characterized as an of pixel locating
τ(
i,
j),
p(
i,
j) be positioned in the result of step S01 Region Segmentation with the macro block of current macro same position (
i,
j) grey scale pixel value located, so, the determination methods of pixel affiliated area is:
p(
i,
j)
Tp,
τ(
i,
j) be defined as:
In formula,
τ(
i,
j) expression be positioned in coloured image current macro (
i,
j) pixel of locating whether belong to background area or moving region pixel (
τ(
i,
j)=1 o'clock represents to belong to background area or moving region), when
p(
i,
j) surpass the threshold value of certain setting
Tp, can judge that this pixel belongs to background area or moving region pixel.
When the background area extraction result according to step S01 judges the pixel affiliated area, be bianry image owing to carrying out after background extracting, therefore
TpDirectly get 0.When the moving region extraction result according to step S01 judges the pixel affiliated area,
TpShould get 40.
Remember the R that is characterized as of each 16x16 macro block, the determination methods of macro block affiliated area is: R 〉
T R, wherein:
In formula,
RThe ratio that the interior background area of current macro or moving region number of pixels account for the total number of pixels of macro block, when
RThe threshold value that surpasses certain setting
T RThe time, can judge that current macro belongs to background area macro block or moving region macro block.For example, if the ratio that in current macro, the background area pixels number accounts for the total number of pixels of macro block during greater than the threshold value set, judges that current macro belongs to the background area macro block; If the ratio that the moving region number of pixels accounts for total macro block pixels number in current macro during greater than the threshold value set, judges that current macro belongs to the moving region macro block; If current macro neither belongs to the background area macro block and also do not belong to the moving region macro block, judge that current macro belongs to other regional macro blocks.
As shown in Fig. 2 c, Fig. 2 c is T
RBe the result images after the macro block affiliated area of Fig. 2 b being judged in 0.5 o'clock, the macro block that is marked as white in figure is the macro block of background area.
Fig. 3 a adopts frame differential method to carry out the operation result image that extract the moving region.Fig. 3 b is T
RBe the result images after the macro block affiliated area of Fig. 3 a being judged in 0.5 o'clock, the macro block that is marked as white in figure is the macro block of moving region.
The concrete grammar of described step S04 is: the background area macro block is only searched for SKIP pattern and inter16x16 pattern, and stops the model selection of back, saves the search time of other pattern (namely except SKIP pattern and inter16x16 pattern other patterns); The moving region macro block is only searched for inter8x8 and intra-frame encoding mode, and stops the model selection of back, saves the search time of other pattern (namely except inter8x8 and intra-frame encoding mode other patterns); Other regional macro blocks adopt full candidate pattern searching algorithm.
That is: when macro block was judged as the background area macro block, according to the characteristics of SKIP pattern and inter16x16 pattern, macro block was only searched for SKIP pattern and inter16x16 pattern, directly stops afterwards the search of other pattern; When macro block was judged as the moving region macro block, according to the characteristics of inter8x8 pattern and intra-frame encoding mode, macro block was only searched for inter8x8 pattern and intra-frame encoding mode, directly stops afterwards the search of other pattern; When macro block is judged as other regional macro blocks, adopt full candidate pattern searching algorithm.
Above-listed preferred embodiment; the purpose, technical solutions and advantages of the present invention are further described; institute is understood that; the above is only preferred embodiment of the present invention; not in order to limit the present invention; within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.
Claims (6)
1. an inter-frame mode fast selecting method H.264, is characterized in that, comprises the following steps:
S01: utilize depth image corresponding to coloured image to carry out Region Segmentation, extract respectively background area and the moving region of coloured image;
S02: coloured image is carried out macroblock partitions;
S03: be background area macro block, moving region macro block or other regional macro blocks according to the affiliated area type of each macro block of affiliated area mark of coloured image in each macro block;
S04: according to the corresponding coding strategy of affiliated area type selecting of each macro block: background area macro block search SKIP and inter16x16 pattern, moving region macro block search inter8x8 and intra-frame encoding mode, other regional macro blocks adopt full candidate pattern searching algorithm.
2. a kind of H.264 inter-frame mode fast selecting method according to claim 1, it is characterized in that: the concrete grammar of the background area of described extraction coloured image is: use the adaptive threshold split plot design to carry out Region Segmentation to every frame depth image, namely utilize morphological operator to carry out rim detection and obtain edge pixel, by building the grey level histogram of described edge pixel, the peak value of choosing low tonal range on described grey level histogram carries out cutting apart of background as segmentation threshold.
3. a kind of H.264 inter-frame mode fast selecting method according to claim 1, it is characterized in that: the concrete grammar of the moving region of described extraction coloured image is: use frame differential method to carry out Region Segmentation to every frame depth image, namely present frame depth image and former frame depth image being implemented frame differential method and calculate frame difference image, is moving region in coloured image with the regional determination that in described frame difference image, change in depth is violent.
4. a kind of H.264 inter-frame mode fast selecting method according to claim 1 is characterized in that: the described concrete grammar that coloured image is carried out macroblock partitions is: coloured image is carried out the division of 16x16 macro block.
5. a kind of H.264 inter-frame mode fast selecting method according to claim 1, it is characterized in that: the concrete grammar of described step S03 is: belonging to background area, moving region and other regional pixel quantity in each macro block of coloured image accounts for the scale of sum of all pixels in macro block as the affiliated area type according to each macro block of mark.
6. a kind of H.264 inter-frame mode fast selecting method according to claim 1, it is characterized in that: the concrete grammar of described step S04 is: the background area macro block is only searched for SKIP pattern and inter16x16 pattern, and stops the model selection of back; The moving region macro block is only searched for inter8x8 and intra-frame encoding mode, and stops the model selection of back, saves the search time of other pattern; Other regional macro blocks adopt full candidate pattern searching algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100775867A CN103118261A (en) | 2013-03-12 | 2013-03-12 | Method for rapidly selecting H.264 interframe modes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100775867A CN103118261A (en) | 2013-03-12 | 2013-03-12 | Method for rapidly selecting H.264 interframe modes |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103118261A true CN103118261A (en) | 2013-05-22 |
Family
ID=48416517
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013100775867A Pending CN103118261A (en) | 2013-03-12 | 2013-03-12 | Method for rapidly selecting H.264 interframe modes |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103118261A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103942756A (en) * | 2014-03-13 | 2014-07-23 | 华中科技大学 | Post-processing filtering method for depth map |
WO2015006951A1 (en) * | 2013-07-18 | 2015-01-22 | Mediatek Singapore Pte. Ltd. | Methods for fast encoder decision |
CN107516318A (en) * | 2017-08-25 | 2017-12-26 | 四川长虹电器股份有限公司 | Multi-Level Threshold Image Segmentation method based on pattern search algorithm and glowworm swarm algorithm |
CN109087351A (en) * | 2018-07-26 | 2018-12-25 | 北京邮电大学 | The method and device of closed loop detection is carried out to scenic picture based on depth information |
CN114374847A (en) * | 2022-01-17 | 2022-04-19 | 海宁奕斯伟集成电路设计有限公司 | Image compression method, device, equipment and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101374243A (en) * | 2008-07-29 | 2009-02-25 | 宁波大学 | Depth map encoding compression method for 3DTV and FTV system |
CN101574709A (en) * | 2009-06-12 | 2009-11-11 | 东北大学 | Automatic steel rotation method for medium plates |
-
2013
- 2013-03-12 CN CN2013100775867A patent/CN103118261A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101374243A (en) * | 2008-07-29 | 2009-02-25 | 宁波大学 | Depth map encoding compression method for 3DTV and FTV system |
CN101574709A (en) * | 2009-06-12 | 2009-11-11 | 东北大学 | Automatic steel rotation method for medium plates |
Non-Patent Citations (2)
Title |
---|
YU-HSUN AND JA-LING: ""A depth information based fast mode decision algorithm for color plus depth-map 3D videos"", 《IEEE TRANSACTIONS ON BROADCASTING》 * |
YU-HSUN AND JA-LING: ""A depth information based fast mode decision algorithm for color plus depth-map 3D videos"", 《IEEE TRANSACTIONS ON BROADCASTING》, vol. 57, no. 2, 30 June 2011 (2011-06-30), pages 542 - 550, XP011323548, DOI: doi:10.1109/TBC.2011.2131510 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015006951A1 (en) * | 2013-07-18 | 2015-01-22 | Mediatek Singapore Pte. Ltd. | Methods for fast encoder decision |
CN103942756A (en) * | 2014-03-13 | 2014-07-23 | 华中科技大学 | Post-processing filtering method for depth map |
CN103942756B (en) * | 2014-03-13 | 2017-03-29 | 华中科技大学 | A kind of method of depth map post processing and filtering |
CN107516318A (en) * | 2017-08-25 | 2017-12-26 | 四川长虹电器股份有限公司 | Multi-Level Threshold Image Segmentation method based on pattern search algorithm and glowworm swarm algorithm |
CN109087351A (en) * | 2018-07-26 | 2018-12-25 | 北京邮电大学 | The method and device of closed loop detection is carried out to scenic picture based on depth information |
CN109087351B (en) * | 2018-07-26 | 2021-04-16 | 北京邮电大学 | Method and device for carrying out closed-loop detection on scene picture based on depth information |
CN114374847A (en) * | 2022-01-17 | 2022-04-19 | 海宁奕斯伟集成电路设计有限公司 | Image compression method, device, equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103118261A (en) | Method for rapidly selecting H.264 interframe modes | |
CN104662908B (en) | Depth map decodes | |
CN106993187B (en) | A kind of coding method of variable frame rate and device | |
CN103141106A (en) | Moving image encoding device, moving image decoding device, moving image coding method, and moving image decoding method | |
CN103188496A (en) | Fast motion estimation video encoding method based on motion vector distribution forecast | |
CN102291581B (en) | Realizing method of self-adaptive motion estimation supporting frame field | |
CN101448159A (en) | Rapid interframe mode selection method based on rate-distortion cost and mode frequency | |
CN105657420B (en) | HEVC-oriented fast intra-frame prediction mode decision method and device | |
CN102547289A (en) | Fast motion estimation method realized based on GPU (Graphics Processing Unit) parallel | |
CN107810632A (en) | The intra-prediction process device of intra mode decision with block segmentation and the refinement for reducing cost | |
CN105187826A (en) | Rapid intra-frame mode decision method specific to high efficiency video coding standard | |
CN110446052A (en) | The quick CU depth selection method of depth map in a kind of 3D-HEVC frame | |
CN100579228C (en) | Method for rapidly predicting frame space of aerophotographic traffic video | |
CN102740073A (en) | Coding method and device | |
CN102647598A (en) | H.264 inter-frame mode optimization method based on maximin MV (Music Video) difference value | |
CN101304529A (en) | Method and device for selecting macro block pattern | |
CN101895761B (en) | Quick intraframe prediction algorithm | |
CN101883275B (en) | Video coding method | |
CN101389023A (en) | Adaptive movement estimation method | |
CN103533349A (en) | Support vector machine-based fast inter-frame prediction macro block mode selection method for B frame | |
CN100592797C (en) | Fast motion estimating method | |
CN106686383A (en) | Depth map intra-frame coding method capable of preserving edge of depth map | |
CN101783956A (en) | Back-prediction forecast method based on spatio-temporal neighbor information | |
CN102592130B (en) | Target identification system aimed at underwater microscopic video and video coding method thereof | |
CN104469380B (en) | Video image forecasting search method based on H.264/AVC standard |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130522 |