WO2015003573A1 - 视频编解码方法、装置及系统 - Google Patents

视频编解码方法、装置及系统 Download PDF

Info

Publication number
WO2015003573A1
WO2015003573A1 PCT/CN2014/081564 CN2014081564W WO2015003573A1 WO 2015003573 A1 WO2015003573 A1 WO 2015003573A1 CN 2014081564 W CN2014081564 W CN 2014081564W WO 2015003573 A1 WO2015003573 A1 WO 2015003573A1
Authority
WO
WIPO (PCT)
Prior art keywords
roi
image
current frame
frame image
information
Prior art date
Application number
PCT/CN2014/081564
Other languages
English (en)
French (fr)
Inventor
陈明亮
林巍嶢
郑萧桢
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015003573A1 publication Critical patent/WO2015003573A1/zh

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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal 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/134Methods 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/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission

Definitions

  • Video codec method method, device and system
  • Embodiments of the present invention relate to codec technology, and in particular, to a video codec method, apparatus, and system.
  • Video codec plays an important role in today's information transmission. It plays an important role in compressing information and improving video clarity.
  • the existing video codec system usually takes a direct compression method for the R0I description information, that is, directly encodes the description information into the code stream.
  • the direct compression method greatly increases the overhead of the bit stream and affects the coding efficiency.
  • Embodiments of the present invention provide a video encoding and decoding method, apparatus, and system, to improve compression efficiency of R0I description information in video data.
  • an embodiment of the present invention provides a video coding method, including:
  • Each of the positional relationships is encoded as the description information of each R01 in the current frame image.
  • the encoded image includes at least one of the following encoded images:
  • nth frame encoded image before the current frame image encoding order the nth frame encoded image before the current frame image display order, the encoded image in the reference frame buffer, or the encoded image according to a preset rule; where n is greater than or equal to 1 .
  • the R0I is a rectangular area, and the location information of the R0I includes an upper left coordinate value, a width, and a height of the R0I.
  • each R0I in the current frame image and each R0I in the encoded image includes one or more of the following:
  • the R0I in the current frame image is a newly appearing R0I with respect to the encoded image
  • the R0I in the current frame image is the same position R0I with respect to the R0I in the encoded image
  • the R0I in the current frame image is the positional deviation R0I with respect to the R0I in the encoded image
  • the R0I in the encoded image is the disappearing R0I with respect to the R0I in the current frame image.
  • the location information of the R0I in the current frame image and the at least one R0I in the encoded image are based on a preset proximity matching rule.
  • the location information is approximated, and obtaining a positional relationship between each R0I in the current frame image and each R0I in the encoded image includes:
  • the positional relationship is the positional deviation
  • the R0I in the encoded image has the same position or positional deviation relationship as the R0I in the current frame image.
  • the ROI determines that the positional relationship is gone.
  • the encoding the location relationship includes:
  • the positional deviation R01 is used to encode the positional information difference value of R01 in the encoded image
  • the code is the second identifier.
  • the first identifier and the second identifier have one bit.
  • the location information is encoded as the description information of each R0I in the current frame image, including:
  • the coded values of the positional relationships are sorted according to the sequence number of the R0I, and are used as the description information of each R0I in the current frame image, wherein the sequence numbers of the same R0I, the positional deviation ROI, and the disappearing ROI are the corresponding R0I numbers in the encoded image. Similarly, the newly occurring R0I assigns a new sequence number after the existing sequence number.
  • the code values of the position relationships are sorted according to the sequence number of R01, and the description information of each R01 in the current frame image includes:
  • the coded value of the position deviation R01 is recorded in the fifth field of the description information according to the R0I sequence number;
  • the encoded value of the newly appearing R01 is recorded in the sixth field of the description information.
  • an embodiment of the present invention provides a video decoding method, including:
  • the decoded image includes at least one of the following decoded images:
  • n is greater than or equal to 1 .
  • the R0I is a rectangular area, and the location information of the R0I includes an upper left coordinate value, a width, and a height of the R0I.
  • each R0I in the current frame image and each R0I in the decoded image includes one or more of the following:
  • R01 in the current frame image is a new occurrence R01 with respect to the decoded image
  • the R0I in the current frame image is the same position R0I with respect to the R0I in the decoded image
  • the R0I in the current frame image is the positional deviation R0I with respect to the R0I in the decoded image
  • the R0I in the decoded image is the disappearing R0I with respect to the R0I in the current frame image.
  • acquiring a positional relationship between each R0I in the current frame image and at least one R0I in the decoded image including: decoding field information in the description information And acquiring, according to the field information, a positional relationship of R0I in the current frame image.
  • the field information in the decoding description information, the location information of the R0I in the current frame image is obtained according to the field information, including:
  • Obtaining a positional relationship between each R0I in the current frame image and at least one R0I in the decoded image includes: decoding a first field of the description information, acquiring a number of newly appearing R0Is and a positional deviation R0I; decoding a second field of the description information , get the number of newly occurring R0Is;
  • Decoding the third field of the description information obtaining the number of the same location R0I and the disappearing R0I; decoding the encoded value of the fourth field record of the description information one by one according to the number of the third field record, obtaining the first identifier, And obtaining a positional relationship of the same location R0I according to the first identifier and the R0I sequence, where the first identifier is used to identify the location R0I, or obtain the second identifier, and obtain the location relationship of the disappearing ROI according to the second identifier.
  • the second identifier is used to identify the disappearing R0I; Decoding the encoded value recorded in the fifth field of the description information according to the number of the first field and the second field record, to obtain the positional relationship of the position deviation R01 according to the R01 sequence number;
  • the location relationship of the R0I is obtained according to the R0I sequence number, including:
  • the R0I position information in the decoded image corresponding to the position R0I is used as the position information of the same R0I in the current frame image;
  • an embodiment of the present invention provides a video coding apparatus, including:
  • a detection module configured to detect position information of at least one R01 from the current frame image
  • a position relationship obtaining module configured to: in the position image of the R01 in the current frame image and the encoded image, according to a preset approximation matching rule Performing proximity matching on the position information of the at least one R01, and obtaining a positional relationship between each R0I in the current frame image and each R0I in the encoded image;
  • an encoding module configured to encode each of the positional relationships as description information of each R0I in the current frame image.
  • the encoded image includes at least one of the following encoded images:
  • n is greater than or equal to 1.
  • the R0I is a rectangular area, and the location information of the R0I includes an upper left coordinate value, a width, and a height of the R0I.
  • any one of the first to the second possible implementation manners of the third aspect in a second possible implementation manner, each R0I in the current frame image and each R0I in the encoded image
  • the positional relationship includes one or more of the following:
  • the R0I in the current frame image is a newly appearing R0I with respect to the encoded image
  • the R0I in the current frame image is the same position R0I with respect to the R0I in the encoded image
  • the R0I in the current frame image is the positional deviation R0I with respect to the R0I in the encoded image
  • the R0I in the encoded image is the disappearing R0I with respect to the R0I in the current frame image.
  • the location relationship acquiring module is specifically configured to:
  • the positional relationship is the positional deviation
  • the R0I in the encoded image and the R0I in the current frame image where the R0I does not have the same position or positional deviation relationship determine the positional relationship as disappearing.
  • the coding module is specifically configured to:
  • the positional deviation R01 is used to encode the positional information difference value of R01 in the encoded image
  • the code is the second identifier.
  • the first identifier and the second identifier have one bit.
  • the coding module includes:
  • a sorting unit configured to sort the coded values of each of the positional relationships according to the sequence number of the R0I, as the description information of each R0I in the current frame image, where the sequence numbers of the same position R0I, the position deviation ROI, and the disappearing R0I and the coded image
  • the corresponding R0I serial number is the same, and the newly generated R0I assigns a new serial number after the existing serial number.
  • the sorting unit is specifically configured to:
  • an embodiment of the present invention provides a video decoding apparatus, including:
  • a description information acquiring module configured to acquire description information of at least one R0I in the current frame image
  • a position relationship obtaining module configured to acquire a positional relationship between each R0I in the current frame image and at least one R0I in the decoded image
  • the location information obtaining module is configured to obtain location information of the R0I in the current frame image according to a positional relationship between each R0I and at least one R0I in the decoded image and a description information decoding value.
  • the decoded image includes at least one of the following decoded images:
  • n is greater than or equal to 1 .
  • the ROI is a rectangular area
  • the location information of the ROI includes an upper left coordinate value, a width, and a height of the ROI.
  • the positional relationship between each R0I in the current frame image and each R0I in the decoded image includes one or more of the following: a current frame R01 in the image is a new occurrence R01 with respect to the decoded image;
  • the R0I in the current frame image is the same position R0I with respect to the R0I in the decoded image
  • the R0I in the current frame image is the positional deviation R0I with respect to the R0I in the decoded image
  • the R0I in the decoded image is the disappearing R0I with respect to the R0I in the current frame image.
  • the location relationship is obtained, specifically:
  • the field information in the description information is decoded, and the positional relationship of R0I in the current frame image is obtained according to the field information.
  • the location relationship acquiring module is specifically configured to:
  • Decoding a first field of the description information acquiring a number of newly occurring R0Is and positional deviations R0I; decoding a second field of the description information, obtaining a number of newly occurring R0Is;
  • Decoding the third field of the description information obtaining the number of the same location R0I and the disappearing R0I; decoding the encoded value of the fourth field record of the description information one by one according to the number of the third field record, obtaining the first identifier, And obtaining a positional relationship of the same location R0I according to the first identifier and the R0I sequence, where the first identifier is used to identify the location R0I, or obtain the second identifier, and obtain the location relationship of the disappearing ROI according to the second identifier.
  • the second identifier is used to identify the disappearing R0I;
  • the location relationship acquiring module is specifically configured to:
  • the location information obtaining module is specifically configured to:
  • the R0I position information in the decoded image corresponding to the position R0I is used as the position information of the same R0I in the current frame image;
  • a fifth aspect of the present invention provides a video codec system, including:
  • a video decoding apparatus according to any one of the first to seventh possible implementations of the fourth aspect, the fourth aspect.
  • the time domain coding information is realized according to the correspondence between the R0I in the current frame image and the R0I in the coded image, that is, the R0I description information of the current frame image is compression-encoded by using the R0I description information of the coded image. Since the R0I description information of the two images in the time domain is relatively large, the method can effectively improve the encoding and decoding compression efficiency of the R0I description information.
  • Embodiment 2 is a flowchart of Embodiment 2 of a video encoding method according to the present invention
  • FIG. 3 is a schematic diagram showing the positional relationship of R0I in Figure 2;
  • FIG. 4 is a schematic diagram of a specific coding rule of the R0I positional relationship in FIG. 2;
  • FIG. 5 is a flowchart of Embodiment 1 of a video decoding method according to the present invention.
  • Embodiment 1 of a video encoding apparatus according to the present invention
  • FIG. 7 is a structural diagram of Embodiment 2 of a video encoding apparatus according to the present invention
  • FIG. 8 is a structural diagram of Embodiment 1 of a video decoding apparatus according to the present invention.
  • FIG. 9 is a structural diagram of Embodiment 1 of a video codec system according to the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention.
  • the embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • FIG. 1 is a flowchart of a first embodiment of a video encoding method according to the present invention.
  • the method execution body of the embodiment is a video encoding apparatus, and the apparatus can be implemented in the form of hardware or software, and can be configured in an encoder, as shown in FIG.
  • the method includes the following steps:
  • Step 101 Detecting location information of at least one R01 from the current frame image.
  • the R0I location information may be detected in the current frame, such as based on the robust skin color detector technology, the image block content-based motion and texture analysis technology, and the method for identifying R01 in the embodiment of the present invention. No restrictions are imposed.
  • the position information of the R0I can be expressed in various forms, for example, a circular area can be described as a center and a radius, and a rectangular area can be described as a four-corner coordinate value.
  • the R0I in this step may be a rectangular area, and the location information of the R0I includes the upper left coordinate value, the width and the height of the R0I.
  • Step 102 Perform, according to a preset approximation matching rule, the position information of the R0I in the current frame image and the position information of at least one R0I in the encoded image to obtain an approximate degree of the R0I in the current frame image.
  • the encoded image includes at least one of the following encoded images: an nth frame encoded image before the current frame image encoding order, an nth frame encoded image before the current frame image display order, and a reference frame Encoded image in the cache or encoded image according to a preset rule; where n is greater than or equal to 1.
  • the preset approximation matching rule may be set according to a result of a comparison operation between the position information of the R0I in the current frame image and the position information of at least one R0I in the encoded image.
  • the encoded image may be one or more of the previous frame image, or the first few frames of the image within a certain time range.
  • the positional relationship between each R0I in the current frame image and each R0I in the encoded image may be defined to include one or more of the following:
  • the ROI in the current frame image is a newly occurring ROI with respect to the encoded image;
  • the ROI in the current frame image is the same position ROI relative to the ROI in the encoded image
  • the ROI in the current frame image is the position deviation ROI relative to the ROI in the encoded image
  • the ROI in the encoded image is the disappearing ROI relative to the ROI in the current frame image.
  • Step 103 Encode each of the positional relationships as description information of each R0I in the current frame image.
  • the direct compression method is adopted for the R0I description information, that is, the description information is directly encoded into the code stream, and the embodiment is based on the correspondence between the R0I in the current frame image and the R0I in the encoded image.
  • Realizing the use of time domain coding information that is, compressing and encoding the R0I description information of the current frame image by using the R0I description information of the coded image. Since the ROI description information of two images in the time domain is relatively correlated, the same or similar description information is more, and the new description information is less, so the amount of data of the description information can be reduced, and the method can be effective. Improve the encoding compression efficiency of R0I.
  • FIG. 2 is a flowchart of a second embodiment of a video encoding method according to the present invention. This embodiment is based on the foregoing embodiment, and adds specific steps for calculating a positional relationship calculation and encoding a positional relationship. As shown in FIG. 2, the method specifically includes The following steps:
  • Step 201 Detect location information of at least one R01 from the current frame image.
  • Step 202 Perform, according to a preset approximation matching rule, the location information of the R0I in the current frame image and the location information of at least one R0I in the encoded image to obtain each R0I in the current frame image.
  • the positional relationship includes the newly occurring R0I, the same position R0I, the positional deviation R0I, and the disappearing R0I described in the previous embodiment.
  • the position information of each R0I in the current frame image is in the encoded image.
  • the position information of each R0I is compared; when the comparison result is the same position information, the positional relationship is the same position; when the comparison result is that the difference between the position information of R01 in the current frame image and R01 in the encoded image is less than the set threshold
  • the comparison result is that the position information of the R0I in the current frame image and the position information of the R0I in the encoded image is equal to or greater than the set threshold, the positional relationship is newly appearing;
  • the ROI determines that the positional relationship is disappeared from the ROI where the R0I does not have the same position or positional deviation relationship in the current frame image.
  • the preset approximation matching rule may be set according to a result of a comparison operation between the position information of the R0I in the current frame image and the position information of at least one R0I in the encoded image, such as a bit of the R0I.
  • the similarity between the two R0Is can be defined as: OP(R,R*) ⁇ (xx*f +(yy f +(ww*f +(hh*f , where R and R* are separated by 1 J is the current frame and already R0I in the encoded image. Calculate each OP of R to find the minimum value.
  • R corresponds to R0I in the previous frame.
  • an upper limit should be set for the minimum value to avoid that the R* obtained is far from the R position.
  • Step 203 Sort the coded values of the positional relationships according to the sequence number of the R0I, as the description information of each R0I in the current frame image;
  • any sorting method may be used when sorting in this step, such as sequential, reverse or raster scan order or other sorting methods, wherein the sequence numbers of the same position R0I, the position deviation ROI, and the disappearing R0I correspond to the corresponding images in the encoded image.
  • the R0I sequence number is the same, and the newly generated R0I assigns a new sequence number after the existing sequence number.
  • the method of sorting in the raster scanning order is: scanning the pixels in the image in order from top to bottom, and using the position of the upper left corner of the R0I as a reference, scanning the new R0I to the R0I in the previous R01 Add 1 to the serial number.
  • FIG. 3 is a schematic diagram of the positional relationship of the R0I in FIG. 2.
  • the above frame is taken as an example of the coded image, and the R and R 5 ' appearing in the previous frame are defined according to the position approximation matching calculation result.
  • R 3 , R 4 and R 6 are defined as ROIs of the same position or positional deviation
  • each ROI of the serial number is the same as the R0I corresponding to the previous frame
  • R 7 , R s and 11 9 are defined as the newly appearing ROI
  • the serial number is A new serial number is assigned after the serial number has been added.
  • the number of newly appearing ROI and the positional deviation R0I is recorded in the first field of the description information; the number of newly appearing ROIs is recorded in the second field of the description information;
  • the three fields record the same number of R0I and disappeared R0I; according to the number of the third field records, according to the R0I sequence, the encoded values of the same R0I and the disappearing R0I are recorded in the fourth field of the description information;
  • the number of records in one field and the second field, according to the R0I sequence number An encoded value of the positional deviation ROI is recorded in a fifth field of the description information; an encoded value of the newly appearing R01 is recorded in a sixth field of the description information.
  • the position information of the newly occurring R0I is encoded for the positional relationship of the newly occurring R0I; the positional relationship of the same R0I is coded as the first identifier; and the positional relationship of the positional deviation R0I,
  • the positional deviation R0I is used to encode the position information difference value of the R0I in the encoded image; and the positional relationship of the disappearing ROI is encoded as the second identifier.
  • the bits of the first identifier and the second identifier are one bit.
  • the flag when the R0I existing in the encoded image disappears in the current frame, the flag is "disappear skip” mode, and the mode can be assigned a second identifier "0"; when the corresponding R0I position information of the two frames is the same, the flag is In the "same position skip” mode, this mode can be assigned the first identifier "1".
  • FIG. 4 is a schematic diagram of a specific coding rule of the R0I positional relationship in FIG. 2.
  • the above frame is taken as an example of a coded image, and is a R0I with the same position.
  • the first identifier is assigned as "1"; 2 is a disappearing R0I, coding, assigning a second identifier is "0"; R 3 is a positional deviation R0I, coding, Bian 3 encodes position information on a differential value in the R image with R; R is. 4
  • the newly emerging R0I is coded with fixed length coding.
  • the order of encoding is encoded in the order of the number of R0I.
  • the first field indicates the number of encoding strategies used, that is, the number of newly occurring R0I and positional deviation R0I, since there is only one newly appearing 11 4 and one positional deviation R 3 in FIG. 4, so the value of the first field To fix 8 bytes of binary "0000010", that is, 2;
  • the second field indicates the number of new occurrences of interest, because there is only one new R 4 in Figure 4, so one is fixed by 2 bytes, that is, binary "01"; in specific implementation, it can be based on R0I
  • the number is represented by multiple binary bytes, such as 4 or 8;
  • the third field indicates the number of "skip”, that is, the number of the same position R0I and the disappearing R0I, and there is one position corresponding to ⁇ and one position disappearing R 2 in FIG.
  • the third field uses variable length coding to represent 2 with a variable length coding rule "001", where the variable length coding rule represents 0 with a binary "0", "01” for 1 and "001" for 2.
  • the fourth field uses "0" and "1" to indicate the disappearing R0I and the same R0I position information encoding, respectively;
  • the fifth field indicates the coded value of the offset R0I, that is, the code of the offset value of the R0I encoded by the offset and the corresponding R0I position information in the previous frame.
  • the sixth field indicates the location information encoding of the newly occurring R0I encoded with fixed length.
  • Step 204 Finally, the bit stream encoded by the positional relationship of each R0I in the current frame is finally embedded in a frame header or a slice header of the video frame or user-defined data or supplemental enhancement information (SEI) data.
  • SEI Supplemental Enhancement information
  • the embodiment obtains the correspondence between the R0I in the current frame image and the R0I in the encoded image by using a specific algorithm, and uses a specific coding rule to correspond to each corresponding relationship.
  • the R0I description information is compression-encoded, which can effectively compress the number of bits used, and when the number of R0Is encoded per frame is large, the compression effect will become more obvious, and the number of R0I position-coded bits in the entire frame can be minimized. The proportion of the number.
  • FIG. 5 is a flowchart of Embodiment 1 of a video decoding method according to the present invention.
  • the method execution body of this embodiment is a video decoding device, and the device can be implemented in hardware or software, and can be configured in a decoder, as shown in FIG. 5 .
  • the method includes the following steps:
  • Step 501 Obtain description information of at least one R0I in the current frame image.
  • the description information of the R0I may be the location information of the R0I, and the R0I may be a rectangular area, and the location information of the R01 includes the coordinate values, width and height of the upper left corner of the R01.
  • Step 502 Obtain a positional relationship between each R0I in the current frame image and at least one R0I in the decoded image.
  • the decoded image includes at least one of the following decoded images: the nth frame decoded image before the current frame image decoding order, the nth frame decoded image before the current frame image display order, and the reference frame A decoded image in the cache or a decoded image according to a preset rule; where n is greater than or equal to 1.
  • the location relationship may be located to include one or more of the following:
  • R01 in the current frame image is a new occurrence R01 with respect to the decoded image
  • the R0I in the current frame image is the same position R0I with respect to the R0I in the decoded image
  • the R0I in the current frame image is the positional deviation R0I with respect to the R0I in the decoded image
  • the R0I in the decoded image is the disappearing R0I with respect to the R0I in the current frame image.
  • Step 503 According to each of the R0I in the current frame image and the bit of at least one R0I in the decoded image. Set the relationship and description information decoding value to obtain the location information of the R0I in the current frame image.
  • the method can effectively improve the decoding compression efficiency of the R0I. .
  • each R0I in the current frame image and at least one R0I in the decoded image is obtained, including:
  • the field information in the description information is decoded, and the positional relationship of R0I in the current frame image is obtained according to the field information.
  • the field information in the description information is obtained, and the location relationship of the R0I in the current frame image is obtained according to the field information, including:
  • Decoding a first field of the description information acquiring a number of newly occurring R0Is and positional deviations R0I; decoding a second field of the description information, obtaining a number of newly occurring R0Is;
  • Decoding the third field of the description information obtaining the number of the same location R0I and the disappearing R0I; decoding the encoded value of the fourth field record of the description information one by one according to the number of the third field record, obtaining the first identifier, And obtaining a positional relationship of the same location R0I according to the first identifier and the R0I sequence, where the first identifier is used to identify the location R0I, or obtain the second identifier, and obtain the location relationship of the disappearing ROI according to the second identifier.
  • the second identifier is used to identify the disappearing R0I;
  • the encoded value of the newly generated R0I is decoded in the sixth field of the description information to obtain the positional relationship of the newly appearing R01 according to the R0I sequence number.
  • R0I sequence number including:
  • the location information of the R0I in the current frame image is obtained according to the positional relationship between the R0I and the at least one RO I in the decoded image and the description information decoding value.
  • the R0I position information in the decoded image corresponding to the position R0I is used as the position information of the same R0I in the current frame image;
  • FIG. 6 is a structural diagram of Embodiment 1 of a video encoding apparatus according to the present invention.
  • the apparatus 60 is generally integrated in an encoder. As shown in FIG. 6, the apparatus 60 includes:
  • the detecting module 61 is configured to detect location information of the at least one RO I from the current frame image
  • the location relationship obtaining module 62 is configured to: according to the preset proximity matching rule, the location information of the R0I in the current frame image Positioning information of at least one R0I in the encoded image is approximated, and obtaining a positional relationship between each RO I in the current frame image and each RO I in the encoded image; optionally, the encoded image includes at least Describe an encoded image:
  • nth frame encoded image before the current frame image encoding order the nth frame encoded image before the current frame image display order, the encoded image in the reference frame buffer, or the encoded image according to a preset rule; where n is greater than or equal to 1 .
  • the encoding module 63 is configured to encode each of the positional relationships as description information of each R0I in the current frame image.
  • the device in this embodiment is used to perform the technical solution of the method embodiment shown in FIG. 1.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • Figure ⁇ is a structural diagram of the second embodiment of the video encoding apparatus of the present invention.
  • the present embodiment adds a sorting unit in the encoding module.
  • the apparatus 60 includes:
  • the location relationship obtaining module 62 is specifically configured to: compare location information of each R0I in the current frame image with location information of each R0I in the encoded image; when the comparison result is the same location information, the location relationship is the same location
  • the comparison result is that the difference between the positional information of the RO I in the current frame image and the RO I in the encoded image is less than the set threshold, the positional relationship is the positional deviation; when the comparison result is the R0I and the encoded image in the current frame image;
  • the position information difference of the R0I is equal to or greater than the set threshold, Then, the positional relationship is newly appeared; the ROI in the encoded image is determined to be disappeared from the ROI having the same position or positional deviation relationship of the R0I in the current frame image.
  • the R0I is a rectangular area, and the location information of the R0I includes a coordinate value, a width, and a height of an upper left corner of the R0I;
  • each R0I in the current frame image and each R0I in the encoded image in the present embodiment includes one or more of the following: R0I in the current frame image is a newly appearing R0I with respect to the encoded image; The R0I in the current frame image is the same position R0I with respect to the R0I in the encoded image; the R0I in the current frame image is the positional deviation R0I with respect to the R0I in the encoded image; the R0I in the encoded image is relative to the current frame image The R0I is the disappearing R0I.
  • the coding module 63 is specifically configured to: encode a position information of the newly appearing R0I, and encode a position information value of the newly generated R0I; code the positional relationship of the same position R0I as a first identifier; and positional relationship of the positional deviation R0I And encoding the position difference R0I with the position information difference value of R0I in the encoded image; and encoding the positional relationship of the disappearing R0I as the second identifier.
  • the bits of the first identifier and the second identifier are one bit.
  • the encoding module 63 includes: a sorting unit 71, configured to sort the encoded values of the positional relationships according to the sequence number of the R0I, as the description information of each R0I in the current frame image, where the position is the same as the R0I, the positional deviation ROI
  • the sequence number of the disappearing ROI is the same as the corresponding ROI number in the encoded image, and the newly generated R0I assigns a new sequence number after the existing sequence number.
  • the sorting unit 71 is specifically configured to: record, in a first field of the description information, a number of newly appearing R0Is and a positional deviation R0I; and record, in a second field of the description information, a number of newly generated R0Is;
  • the third field of the information records the number of the same R0I and the disappearing R0I; according to the number of the third field record, according to the R0I sequence, the encoded value of the same R0I and the disappearing R0I is recorded in the fourth field of the description information; Recording, by the number of the first field and the second field, the encoded value of the positional deviation R0I in the fifth field of the description information according to the R0I number; recording the coded value of the newly appearing R01 in the sixth field of the description information .
  • the device in this embodiment is used to implement the technical solution of the method embodiment shown in FIG. 2, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • FIG. 8 is a structural diagram of Embodiment 1 of a video decoding apparatus according to the present invention.
  • the apparatus 80 is generally integrated in a decoder. As shown in FIG. 8, the apparatus 80 includes:
  • a description information obtaining module 81 configured to acquire description information of at least one R0I in the current frame image
  • the location relationship obtaining module 82 is configured to acquire a positional relationship between each ROI in the current frame image and at least one R0I in the decoded image.
  • the location information obtaining module 83 is configured to obtain location information of the R0I in the current frame image according to a positional relationship between each R0I and the decoded image in the current frame image and a description information decoding value.
  • the device in this embodiment is used to perform the technical solution of the method embodiment shown in FIG. 5, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • the decoded image includes at least one of the following decoded images:
  • n is greater than or equal to 1 .
  • the R0I is a rectangular area, and the location information of the R0I includes the upper left coordinate value, the width and the height of the R0I.
  • the positional relationship between each R0I in the current frame image and each R 01 in the decoded image includes one or more of the following:
  • R01 in the current frame image is a new occurrence R01 with respect to the decoded image
  • the R0I in the current frame image is the same position R0I with respect to the R0I in the decoded image
  • the R0I in the current frame image is the positional deviation R0I with respect to the R0I in the decoded image
  • the R0I in the decoded image is the disappearing R0I with respect to the R0I in the current frame image.
  • the location relationship obtaining module 82 is specifically configured to: decode the field information in the description information, and obtain a positional relationship of the R0I in the current frame image according to the field information.
  • the location relationship obtaining module 82 is specifically configured to:
  • Decoding a first field of the description information acquiring a number of newly occurring R0Is and positional deviations R0I; decoding a second field of the description information, obtaining a number of newly occurring R0Is;
  • Decoding the third field of the description information obtaining the number of the same location R0I and the disappearing R0I; decoding the encoded value of the fourth field record of the description information one by one according to the number of the third field record, obtaining the first identifier, And obtaining a positional relationship of the same location R0I according to the first identifier and the R0I sequence, where the first identifier is used to identify the location R0I, or obtain the second identifier, and obtain the location relationship of the disappearing ROI according to the second identifier.
  • the second identifier is used to identify the disappearing R0I; Decoding the encoded value recorded in the fifth field of the description information according to the number of the first field and the second field record, to obtain the positional relationship of the position deviation R01 according to the R01 sequence number;
  • the encoded value of the R0I newly appears in the sixth field of the description information is decoded to obtain the positional relationship of the newly occurring R0I according to the R0I sequence number.
  • the location relationship obtaining module 82 is specifically configured to:
  • the location information obtaining module 83 is specifically configured to:
  • the R0I position information in the decoded image corresponding to the position R0I is used as the position information of the same R0I in the current frame image;
  • FIG. 9 is a structural diagram of Embodiment 1 of a video codec system according to the present invention. As shown in FIG. 9, an encoder 91 and a decoder 92 are included.
  • the encoder 91 includes the video encoding device 60 according to any of the foregoing embodiments.
  • the decoder 92 includes the video encoding device 80 described in any of the above embodiments.
  • the video encoding device 60 in this embodiment can perform the video encoding method provided by any embodiment of the present invention, and the implementation principle and technical effects are similar, and are not described herein again;
  • the video decoding device 80 in this embodiment can perform the video decoding method provided by any embodiment of the present invention, and the implementation principle and technical effects are similar, and details are not described herein again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种视频编解码方法、装置及系统。其中,方法包括:从当前帧图像中检测出至少一个ROI的位置信息;基于预设近似度匹配规则,将所述当前帧图像中ROI的位置信息与已编码图像中至少一个ROI的位置信息进行近似度匹配,获得所述当前帧图像中各ROI与所述已编码图像中各ROI的位置关系;对各所述位置关系进行编码,作为当前帧图像中各ROI的描述信息。所述视频编解码方法可以提高视频数据中ROI描述信息的压缩效率。

Description

视频编解码方法、 装置及系统 技术领域
本发明实施例涉及编解码技术, 尤其涉及一种视频编解码方法、 装置及 系统。
背景技术
视频编解码在如今的信息传输中有着举足轻重的地位, 它对压缩信息量, 提高视频清晰度有着十分重要的应用。
目前, 视频压缩技术中基于感兴趣区域(Region Of Interes t , 简称 ROI ) 的视频编解码方法已经成为热点。 现有的编码方法策略大多釆用相似的步骤: 先对视频帧中的图像块进行分类, 区分出 R0I和非 R0I等分类区域; 然后, 再根据线形预测模型、 码率失真模型调节分类图像块的量化参数, 对 R0I 釆 用小的量化参数, 对非 R0I 釆用大的量化参数; 最后, 根据得到的量化参数 对原始视频帧数据进行编码。 所以, 在编码端需要釆用描述信息指明哪些是 R0I , 以便在解码端能够根据描述信息获知哪些区域是 R0I , 从而釆用对应的 算法进行解码。
现有的视频编解码系统通常对 R0I描述信息釆取直接压缩的方法, 即对这 些描述信息进行直接编码写入码流中。 当一帧图像中 R0I较多而使得描述信息 量较大时, 直接压缩的方法会大幅增加比特流的开销而影响编码效率。
发明内容 本发明实施例提供一种视频编解码方法、 装置及系统, 以提高视频数据 中 R0I描述信息的压缩效率。
第一方面, 本发明实施例提供一种视频编码方法, 包括:
从当前帧图像中检测出至少一个感兴趣区域 R01的位置信息; 基于预设近似度匹配规则, 将所述当前帧图像中 R0I的位置信息与已编码 图像中至少一个 R0I的位置信息进行近似度匹配, 获得所述当前帧图像中各 R0I与所述已编码图像中各 R0I的位置关系;
对各所述位置关系进行编码, 作为当前帧图像中各 R01的描述信息。
在第一方面的第一种可能的实现方式中, 所述已编码图像至少包括下述 一种已编码图像:
当前帧图像编码顺序之前第 n 帧已编码图像、 当前帧图像显示顺序之前 第 n帧已编码图像、 参考帧緩存中的已编码图像或按预设规则的已编码图像; 其中 n大于或等于 1。
在第一方面的第二种可能的实现方式中, 所述 R0I为矩形区域, 所述 R0I 的位置信息包括所述 R0I的左上角坐标值、 宽和高。
根据第一方面、 第一方面第一种至第二种可能的实现方式任意一种, 在 第三种可能的实现方式中, 所述当前帧图像中各 R0I与所述已编码图像中各 R0I的位置关系包括如下一种或多种:
当前帧图像中的 R0I相对于已编码图像为新出现 R0I ;
当前帧图像中的 R0I相对于已编码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已编码图像中的 R0I为位置偏差 R0I ;
已编码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
根据第一方面第三种可能的实现方式, 在第四种可能的实现方式中, 基 于预设近似度匹配规则, 将所述当前帧图像中 R0I的位置信息与已编码图像中 至少一个 R0I的位置信息进行近似度匹配, 获得所述当前帧图像中各 R0I与所 述已编码图像中各 R0I的位置关系包括:
将当前帧图像中每个 R0I的位置信息与已编码图像中每个 R0I的位置信息 进行比较;
当比较结果为位置信息相同时, 则位置关系为位置相同;
当比较结果为当前帧图像中 R0I与已编码图像中 R0I的位置信息差值小于 设定阔值时, 则位置关系为位置偏差;
当比较结果为当前帧图像中 R0I与已编码图像中 R0I的位置信息差值等于 或大于设定阔值时, 则位置关系为新出现;
已编码图像中的 R0I与当前帧图像中 R0I不存在位置相同或位置偏差关系 的 ROI确定位置关系为消失。
根据第一方面第四种可能的实现方式, 在第五种可能的实现方式中, 对 各所述位置关系进行编码包括:
对新出现 R0I的位置关系, 对所述新出现 R0I的位置信息数值进行编码; 对位置相同 R0I的位置关系, 编码为第一标识;
对位置偏差 R01的位置关系, 釆用所述位置偏差 R01与已编码图像中 R01的 位置信息差分值进行编码;
对消失 R0I的位置关系, 编码为第二标识。
根据第一方面第五种可能的实现方式, 在第六种可能的实现方式中, 所 述第一标识和第二标识的比特位为一位。
根据第一方面第六种可能的实现方式, 在第七种可能的实现方式中, 对 各所述位置关系进行编码, 作为当前帧图像中各 R0I的描述信息包括:
将各所述位置关系的编码值按照 R0I的序号进行排序, 作为当前帧图像中 各 R0I的描述信息, 其中, 位置相同 R0I、 位置偏差 ROI和消失 ROI的序号与已 编码图像中对应的 R0I序号相同, 新出现 R0I在已有序号后分配新的序号。
根据第一方面第七种可能的实现方式, 在第八种可能的实现方式中, 将 各所述位置关系的编码值按照 R01的序号进行排序, 作为当前帧图像中各 R01 的描述信息包括:
在所述描述信息的第一字段记录新出现 R0I和位置偏差 R0I的数目; 在所述描述信息的第二字段记录新出现 R0I的数目;
在所述描述信息的第三字段记录位置相同 R0I和消失 R0I的数目; 根据所述第三字段记录的数目, 按照 R0I序号, 在所述描述信息的第四字 段记录位置相同 R01和消失 R01的编码值;
根据所述第一字段和第二字段记录的数目, 按照 R0I序号, 在所述描述信 息的第五字段记录位置偏差 R01的编码值;
在所述描述信息的第六字段记录新出现 R01的编码值。
第二方面, 本发明实施例提供一种视频解码方法, 包括:
获取当前帧图像中至少一个 R0I的描述信息;
获取当前帧图像中各 R0I与已解码图像中至少一个 R0I的位置关系; 根据所述当前帧图像中各 R0I与已解码图像中至少一个 R0I 的位置关系 和描述信息解码值, 获取当前帧图像中 R0I的位置信息。
在第二方面的第一种可能的实现方式中, 所述已解码图像至少包括下述 一种已解码图像:
当前帧图像解码顺序之前第 n 帧已解码图像、 当前帧图像显示顺序之前 第 n帧已解码图像、 参考帧緩存中的已解码图像或按预设规则的已解码图像; 其中 n大于或等于 1。
在第二方面的第二种可能的实现方式中, 所述 R0I为矩形区域, 所述 R0I 的位置信息包括所述 R0I的左上角坐标值、 宽和高。
根据第二方面、 第二方面第一种至第二种可能的实现方式任意一种, 在 第三种可能的实现方式中, 所述当前帧图像中各 R0I与所述已解码图像中各 R0I的位置关系包括如下一种或多种:
当前帧图像中的 R01相对于已解码图像为新出现 R01;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置偏差 R0I ;
已解码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
根据第二方面第三种可能的实现方式, 在第四种可能的实现方式中, 获 取当前帧图像中各 R0I与已解码图像中至少一个 R0I的位置关系, 包括: 解码描述信息中的字段信息, 根据所述字段信息获取当前帧图像中 R0I 的位置关系。
根据第二方面第四种可能的实现方式, 在第五种可能的实现方式中, 所 述解码描述信息中的字段信息, 根据所述字段信息获取当前帧图像中 R0I 的 位置关系, 包括:
获取当前帧图像中各 R0I与已解码图像中至少一个 R0I的位置关系包括: 解码所述描述信息的第一字段, 获取新出现 R0I和位置偏差 R0I的数目; 解码所述描述信息的第二字段, 获取新出现 R0I的数目;
解码所述描述信息的第三字段, 获取位置相同 R0I和消失 R0I的数目; 根据所述第三字段记录的数目, 逐个解码所述描述信息的第四字段记录 的编码值, 获取第一标识, 并根据所述第一标识和 R0I序号获取位置相同 R0I 的位置关系, 所示第一标识用于标识位置相同 R0I , 或获取第二标识, 并根据 所述第二标识和获取消失 R0I的位置关系, 所述第二标识用于标识消失 R0I ; 根据所述第一字段和第二字段记录的数目, 解码所述描述信息的第五字 段记录的编码值, 以按照 R01序号获取位置偏差 R01的位置关系;
解码所述描述信息的第六字段中各新出现 R01的编码值, 以按照 R01序号 获取新出现 R01的位置关系。
根据第二方面第五种可能的实现方式, 在第六种可能的实现方式中, 根 据 R0I序号获取 R0I位置关系, 包括:
根据 R0I序号和已编码图像中 R0I序号的排序关系获取当前帧图像中 R0I 的排序关系, 并根据所述排序关系获取 R0I位置关系; 其中位置相同 R0I、 位 置偏差 R0I和消失 R0I的序号与已编码图像中对应的 R0I序号相同, 新出现 R0I 在已有序号后分配新的序号。
根据第二方面第六种可能的实现方式, 在第七种可能的实现方式中, 所 述根据所述当前帧图像中各 R0I与已解码图像中至少一个 R0I的位置关系和描 述信息解码值, 获取当前帧图像中 R0I的位置信息, 包括:
将与位置相同 R0I对应的已解码图像中 R0I位置信息作为当前帧图像中位 置相同的 R0I的位置信息;
根据所述第五字段记录的位置偏差解码值和与位置偏差 R0I对应的已解 码图像中 R0I位置信息, 计算获取当前帧图像中位置偏差 R0I的位置信息; 根据所述第六字段记录的位置解码值,计算获取当前帧图像中新出现 R0I 的位置信息。
第三方面, 本发明实施例提供一种视频编码装置, 包括:
检测模块, 用于从当前帧图像中检测出至少一个 R01的位置信息; 位置关系获取模块, 用于基于预设近似度匹配规则, 将所述当前帧图像 中 R01的位置信息与已编码图像中至少一个 R01的位置信息进行近似度匹配, 获得所述当前帧图像中各 R0I与所述已编码图像中各 R0I的位置关系;
编码模块, 用于对各所述位置关系进行编码, 作为当前帧图像中各 R0I的 描述信息。
在第三方面的第一种可能的实现方式中, 所述已编码图像至少包括下述 一种已编码图像:
当前帧图像编码顺序之前第 n 帧已编码图像、 当前帧图像显示顺序之前 第 n帧已编码图像、 参考帧緩存中的已编码图像或按预设规则的已编码图像; 其中 n大于或等于 1。
在第三方面的第二种可能的实现方式中, 所述 R0I为矩形区域, 所述 R0I 的位置信息包括所述 R0I的左上角坐标值、 宽和高。
根据第三方面、 第三方面第一种至第二种可能的实现方式任意一种, 在 第二种可能的实现方式中, 所述当前帧图像中各 R0I与所述已编码图像中各 R0I的位置关系包括如下一种或多种:
当前帧图像中的 R0I相对于已编码图像为新出现 R0I ;
当前帧图像中的 R0I相对于已编码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已编码图像中的 R0I为位置偏差 R0I ;
已编码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
根据第三方面第三种可能的实现方式, 在第四种可能的实现方式中, 所 述位置关系获取模块, 具体用于:
将当前帧图像中每个 R0I的位置信息与已编码图像中每个 R0I的位置信息 进行比较;
当比较结果为位置信息相同时, 则位置关系为位置相同;
当比较结果为当前帧图像中 R0I与已编码图像中 R0I的位置信息差值小于 设定阔值时, 则位置关系为位置偏差;
当比较结果为当前帧图像中 R0I与已编码图像中 R0I的位置信息差值等于 或大于设定阔值时, 则位置关系为新出现;
已编码图像中的 R0I与当前帧图像中 R0I不存在位置相同或位置偏差关系 的 R0I确定位置关系为消失。
根据第三方面第四种可能的实现方式, 在第五种可能的实现方式中, 所 述编码模块, 具体用于:
对新出现 R0I的位置关系, 对所述新出现 R0I的位置信息数值进行编码; 对位置相同 R0I的位置关系, 编码为第一标识;
对位置偏差 R01的位置关系, 釆用所述位置偏差 R01与已编码图像中 R01的 位置信息差分值进行编码;
对消失 R0I的位置关系, 编码为第二标识。
根据第三方面第五种可能的实现方式, 在第六种可能的实现方式中, 所 述第一标识和第二标识的比特位为一位。 根据第三方面第六种可能的实现方式, 在第七种可能的实现方式中, 所 述编码模块, 包括:
排序单元, 用于将各所述位置关系的编码值按照 R0I的序号进行排序, 作 为当前帧图像中各 R0I的描述信息, 其中, 位置相同 R0I、 位置偏差 ROI和消失 R0I的序号与已编码图像中对应的 R0I序号相同, 新出现 R0I在已有序号后分配 新的序号。
根据第三方面第七种可能的实现方式, 在第八种可能的实现方式中, 所 述排序单元, 具体用于:
在所述描述信息的第一字段记录新出现 R0I和位置偏差 R0I的数目; 在所述描述信息的第二字段记录新出现 R0I的数目;
在所述描述信息的第三字段记录位置相同 R0I和消失 R0I的数目; 根据所述第三字段记录的数目, 按照 R0I序号, 在所述描述信息的第四字 段记录位置相同 R01和消失 R01的编码值;
根据所述第一字段和第二字段记录的数目, 按照 R0I 序号, 在所述描述 信息的第五字段记录位置偏差 R0I 的编码值; 在所述描述信息的第六字段记 录新出现 R0I的编码值。
第四方面, 本发明实施例提供一种视频解码装置, 包括:
描述信息获取模块, 用于获取当前帧图像中至少一个 R0I的描述信息; 位置关系获取模块, 用于获取当前帧图像中各 R0I 与已解码图像中至少 一个 R0I的位置关系;
位置信息获取模块, 用于根据所述当前帧图像中各 R0I 与已解码图像中 至少一个 R0I 的位置关系和描述信息解码值, 获取当前帧图像中 R0I 的位置 信息。
在第四方面的第一种可能的实现方式中, 所述已解码图像至少包括下述 一种已解码图像:
当前帧图像解码顺序之前第 n 帧已解码图像、 当前帧图像显示顺序之前 第 n帧已解码图像、 参考帧緩存中的已解码图像或按预设规则的已解码图像; 其中 n大于或等于 1。
在第四方面的第二种可能的实现方式中, 所述 R0I为矩形区域, 所述 R0I 的位置信息包括所述 R0I的左上角坐标值、 宽和高。 根据第四方面、 第四方面第一种至第二种可能的实现方式, 所述当前帧 图像中各 R0I与所述已解码图像中各 R0I的位置关系包括如下一种或多种: 当前帧图像中的 R01相对于已解码图像为新出现 R01;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置偏差 R0I ;
已解码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
根据第四方面第三种可能的实现方式, 在第四种可能的实现方式中, 所 述位置关系获取, 具体用于:
解码描述信息中的字段信息, 根据所述字段信息获取当前帧图像中 R0I 的位置关系。
根据第四方面第四种可能的实现方式, 在第五种可能的实现方式中, 所 述位置关系获取模块, 具体用于:
解码所述描述信息的第一字段, 获取新出现 R0I和位置偏差 R0I的数目; 解码所述描述信息的第二字段, 获取新出现 R0I的数目;
解码所述描述信息的第三字段, 获取位置相同 R0I和消失 R0I的数目; 根据所述第三字段记录的数目, 逐个解码所述描述信息的第四字段记录 的编码值, 获取第一标识, 并根据所述第一标识和 R0I序号获取位置相同 R0I 的位置关系, 所示第一标识用于标识位置相同 R0I , 或获取第二标识, 并根据 所述第二标识和获取消失 R0I的位置关系, 所述第二标识用于标识消失 R0I ;
根据所述第一字段和第二字段记录的数目, 解码所述描述信息的第五字 段记录的编码值, 以按照各 R01序号的排序关系获取位置偏差 R01的位置关系; 解码所述描述信息的第六字段中各新出现 R01的编码值, 以按照各 R01序 号的排序关系获取新出现 R01的位置关系。
根据第四方面第四种可能的实现方式, 在第五种可能的实现方式中, 所 述位置关系获取模块, 具体用于:
根据 R0I序号和已编码图像中 R0I序号的排序关系获取当前帧图像中 R0I 的排序关系, 并根据所述排序关系获取 R0I位置关系; 其中位置相同 R0I、 位 置偏差 R0I和消失 R0I的序号与已编码图像中对应的 R0I序号相同, 新出现 R0I 在已有序号后分配新的序号。
根据第四方面第五种可能的实现方式, 在第六种可能的实现方式中, 所 述位置信息获取模块, 具体用于:
将与位置相同 R0I对应的已解码图像中 R0I位置信息作为当前帧图像中位 置相同的 R0I的位置信息;
根据所述第五字段记录的位置偏差解码值和与位置偏差 R0I对应的已解 码图像中 R0I位置信息, 计算获取当前帧图像中位置偏差 R0I的位置信息; 根据所述第六字段记录的位置解码值,计算获取当前帧图像中新出现 R0I 的位置信息。
第五方面, 本发明实施例提供一种视频编解码系统, 包括:
根据第三方面、 第三方面的第一种至第八种可能的实现方式的任意一种 所述的视频编码装置;
根据第四方面、 第四方面的第一种至第七种可能的实现方式的任意一种 所述的视频解码装置。
本发明实施例通过根据当前帧图像中 R0I与已编码图像中 R0I 的对应关 系, 实现利用时域编码信息, 即利用已编码图像的 R0I 描述信息对当前帧图 像的 R0I描述信息进行压缩编码。 由于在时域上相近的两帧图像的 R0I描述 信息相关度较大, 本方法可以有效提高 R0I描述信息的编解码压缩效率。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 图 1为本发明视频编码方法实施例一的流程图;
图 2为本发明视频编码方法实施例二的流程图;
图 3为图 2中的 R0I位置关系示意图;
图 4为图 2中的 R0I位置关系具体编码规则示意图;
图 5为本发明视频解码方法实施例一的流程图;
图 6为本发明视频编码装置实施例一的结构图;
图 7为本发明视频编码装置实施例二的结构图; 图 8为本发明视频解码装置实施例一的结构图;
图 9为本发明视频编解码系统实施例一的结构图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1 为本发明视频编码方法实施例一的流程图, 本实施例的方法执行主 体是一个视频编码装置, 该装置能够以硬件或软件的形式实现, 可配置在编 码器中, 如图 1所示, 该方法包括以下步骤:
步骤 101、 从当前帧图像中检测出至少一个 R01的位置信息;
本步骤中可以使用判断 R0I的技术在当前帧中检测 R0I位置信息, 如基于 强健性肤色检测器技术、 基于图像块内容的运动性和紋理性分析技术, 本发 明实施例对识别 R01的方式并不进行限制。
R0I的位置信息可以通过多种形式来表示, 例如, 对于圓形区域可描述为 圓心和半径, 对于矩形区域可描述为四角坐标值。 可选地, 本步骤中的 R0I可 以为矩形区域, 则所述 R0I的位置信息包括所述 R0I的左上角坐标值、 宽和高。
步骤 102、 基于预设近似度匹配规则, 将所述当前帧图像中 R0I的位置信 息与已编码图像中至少一个 R0I的位置信息进行近似度匹配, 获得所述当前帧 图像中各 R0I与所述已编码图像中各 R0I的位置关系;
本步骤中, 具体地, 所述已编码图像至少包括下述一种已编码图像: 当前帧图像编码顺序之前第 n 帧已编码图像、 当前帧图像显示顺序之前 第 n帧已编码图像、 参考帧緩存中的已编码图像或按预设规则的已编码图像; 其中 n大于或等于 1。
预设近似度匹配规则可以根据所述当前帧图像中 R0I 的位置信息与已编 码图像中至少一个 R0I 的位置信息进行比较运算的结果设定。 其中编码图像 可以是上一帧图像, 或者一定时间范围内的前几帧图像中的一个或多个。
具体地, 根据近似度匹配的结果, 可以将在所述当前帧图像中各 R0I与所 述已编码图像中各 R0I的位置关系定义成包括如下一种或多种: 当前帧图像中的 ROI相对于已编码图像为新出现 ROI ;
当前帧图像中的 ROI相对于已编码图像中的 ROI为位置相同 ROI ;
当前帧图像中的 ROI相对于已编码图像中的 ROI为位置偏差 ROI ;
已编码图像中的 ROI相对于当前帧图像中的 ROI为消失 ROI。
步骤 103、对各所述位置关系进行编码, 作为当前帧图像中各 R0I的描述 信息。
相对现有技术中, 对 R0I 描述信息釆取直接压缩的方法, 即对这些描述 信息进行直接编码写入码流中, 本实施例通过根据当前帧图像中 R0I 与已编 码图像中 R0I的对应关系, 实现利用时域编码信息, 即利用已编码图像的 R0I 描述信息对当前帧图像的 R0I 描述信息进行压缩编码。 由于在时域上相近的 两帧图像的 R0I 描述信息相关度较大, 所以相同或相似的描述信息较多, 而 新的描述信息较少, 因此可减少描述信息的数据量, 本方法可以有效提高 R0I的编码压缩效率。
图 2 为本发明视频编码方法实施例二的流程图, 本实施例是上述实施例 的基础上, 增加计算位置关系计算和对位置关系编码的具体步骤, 如图 2 所 示, 该方法具体包括以下步骤:
步骤 201、 从当前帧图像中检测出至少一个 R01的位置信息;
步骤 202、 基于预设近似度匹配规则, 将所述当前帧图像中 R0I的位置信 息与已编码图像中至少一个 R0I的位置信息进行近似度匹配, 获得所述当前帧 图像中各 R0I与所述已编码图像中各 R0I的位置关系;
本步骤中, 位置关系包括上一实施例中所述的新出现 R0I、 位置相同 R0I、 位置偏差 R0I和消失 R0I , 具体计算时, 将当前帧图像中每个 R0I的位置信息与 已编码图像中每个 R0I的位置信息进行比较; 当比较结果为位置信息相同时, 则位置关系为位置相同; 当比较结果为当前帧图像中 R01与已编码图像中 R01 的位置信息差值小于设定阔值时, 则位置关系为位置偏差; 当比较结果为当 前帧图像中 R0I与已编码图像中 R0I的位置信息差值等于或大于设定阔值时, 则位置关系为新出现; 已编码图像中的 R0I与当前帧图像中 R0I不存在位置相 同或位置偏差关系的 R0I确定位置关系为消失。
预设近似度匹配规则可以根据所述当前帧图像中 R0I 的位置信息与已编 码图像中至少一个 R0I 的位置信息进行比较运算的结果设定, 比如 R0I 的位 置信息定义为 R = {x,_y, ^}, 其中 x和 y分别是 ROI左上角的横纵坐标, w是 R0I 的 宽 , h 是 R0I 的长。 两 R0I 的相近程度可定义为 : OP(R,R*)^(x-x*f +(y-y f +(w-w*f +(h-h*f ,其中 R和 R*分另1 J是当前帧和已 编码图像中的 R0I。 对 R的每个 OP进行计算, 寻找出最小值, 此时的 就是
R在上一帧对应的 R0I。 同时应对最小值制定一个上限 ,避免得到的 R*离 R 位置相差很远。 用数学语言可以表示为:
t iarg min {OP{Rt , R* (k))) if OP{Rt , R* (k))≤ Top
[ Null if OPiR, , R* (k)) > TOP
当 OP(R,iT)=0时, 说明 Ri为与已编码图像中对应的 位置相同;
当 OP(R, T) ≤Γ。Ρ时, 说明 为与已编码图像中对应的 位置偏差; 当 OP(R ) >Γ。ρ时, 说明 Ri为相对于已编码图像中对应的 为新出现; 当 =Λ¾//时, 说明 Ri在已编码图像中没有对应的 R0I, 关系为消失。 步骤 203、 将各所述位置关系的编码值按照 R0I的序号进行排序, 作为当 前帧图像中各 R0I的描述信息;
可选地, 本步骤中排序时, 可以使用任何的排序方法, 比如顺序、 倒序 或者光栅扫描顺序或其他排序方法, 其中位置相同 R0I、 位置偏差 ROI和消失 R0I的序号与已编码图像中对应的 R0I序号相同, 新出现 R0I在已有序号后分配 新的序号。 所述按光栅扫描顺序排序的方法为: 按从左往右从上至下依次扫 描图像中的像素点, 以 R0I左上角位置为基准, 扫描到新的 R0I则将该 R0I序号 在前一 R01序号基础上加 1。
图 3为图 2中的 R0I位置关系示意图, 如图 3所示, 以上一帧作为已编码图 像为例, 根据位置近似度匹配计算结果, 将在上一帧中出现的 R 和 R5'定义为 消失的 R0I, 将!^、 R3、 R4和 R6定义为位置相同或位置偏差的 ROI, 序号各 ROI与 上一帧对应的 R0I相同, 将 R7、 Rs和 119定义为新出现的 ROI, 序号在已有序号后 分配新的序号。
本步骤中, 进一步地, 在所述描述信息的第一字段记录新出现 R0I和位置 偏差 R0I的数目; 在所述描述信息的第二字段记录新出现 R0I的数目; 在所述 描述信息的第三字段记录位置相同 R0I和消失 R0I的数目; 根据所述第三字段 记录的数目, 按照 R0I序号, 在所述描述信息的第四字段记录位置相同 R0I和 消失 R0I的编码值; 根据所述第一字段和第二字段记录的数目, 按照 R0I序号, 在所述描述信息的第五字段记录位置偏差 ROI的编码值; 在所述描述信息的第 六字段记录新出现 R01的编码值。
具体地, 本步骤中, 对新出现 R0I 的位置关系, 对所述新出现 R0I 的位 置信息数值进行编码; 对位置相同 R0I 的位置关系, 编码为第一标识; 对位 置偏差 R0I的位置关系, 釆用所述位置偏差 R0I与已编码图像中 R0I的位置 信息差分值进行编码; 对消失 R0I的位置关系, 编码为第二标识。
较佳地, 所述第一标识和第二标识的比特位为一位。 比如当已编码图像 中存在的 R0I 在当前帧中消失时, 标志为 "消失跳过" 模式, 可以给此模式 分配第二标识 "0" ; 当两帧的对应 R0I 位置信息相同时, 标志为 "位置相同 跳过" 模式, 可以给此模式分配第一标识 "1"。
图 4为图 2中的 R0I位置关系具体编码规则示意图, 如图 4所示, 以上 一帧作为已编码图像为例, 为位置相同的 R0I ,编码时,分配第一标识为 "1" ; R2为消失的 R0I , 编码时, 分配第二标识为 "0" ; R3为位置偏差 R0I , 编码时, 釆用 R3与上一帧图像中 R 的位置信息差分值进行编码; R4为新出现的 R0I , 编码时釆用固定长度编码。
如图 4的编码所示, 编码的顺序是按照 R0I的编号顺序编码。
第一字段表示釆用编码策略的个数, 即新出现 R0I和位置偏差 R0I 的数 目, 因图 4中只有 1个新出现的 114和 1个位置偏差的 R3, 因此第一字段的值 为固定 8个字节的二进制的 "0000010" , 即 2个;
第二字段表示新出现感兴趣的个数, 因图 4中只有 1个新出现的 R4, 因 此用固定 2个字节表示 1个, 即二进制 "01" ; 具体实施时, 可以根据 R0I的 个数使用多个二进制字节表示, 比如 4个或 8个等;
第三字段表示釆用可变长度编码的表示 "跳过的个数", 即位置相同 R0I 和消失 R0I的数目, 图 4中存在 1个位置相应的 ^和 1个位置消失的 R2, 因 此第三字段釆用可变长度编码, 以用可变长度编码规则 "001" 表示 2 , 其中 可变长度编码规则中以二进制 "0" 表示 0, "01" 表示 1 , "001" 表示 2。
第四字段用 "0" 和 "1" 分别表示消失的 R0I和相同的 R0I位置信息编 码;
第五字段表示偏差 R0I 的编码值, 即釆用偏差编码的 R0I与对应的上一 帧中 R0I位置信息的偏差值的编码。 第六字段表示釆用固定长度编码的新出现的 R0I的位置信息编码。
需要说明的是, 在第五和第六字段中间设置一个 "0" , 表示 "跳过的个 数为 0" , 即后面不存在釆用位置相同 R0I和消失 R0I的编码。 也是判断釆用 差值编码结束的重要标记。
步骤 204、 将当前帧中各 R0I的位置关系编码的比特流最终嵌入到该视频 帧的帧头或条带头或用户 自定义数据或附加增强信息 ( supplementa l enhancement informat ion, 简称 SEI )数据中。
与直接对 R0I 的位置信息进行编码的比特流相比, 本实施例通过具体的 算法, 获取当前帧图像中 R0I与已编码图像中 R0I 的对应关系, 并通过具体 的编码规则对各对应关系的 R0I 描述信息进行压缩编码, 能有效地压缩使用 的比特数, 而且当每帧编码的 R0I数量较多时, 压缩效果将会变得更加明显, 能够尽量减少 R0I位置编码比特数在整帧的编码比特数中所占的比例。
图 5 为本发明视频解码方法实施例一的流程图, 本实施例的方法执行主 体是一个视频解码装置, 该装置能够以硬件或软件的形式实现, 可配置在解 码器中, 如图 5所示, 该方法包括以下步骤:
步骤 501、 获取当前帧图像中至少一个 R0I的描述信息;
本步骤中, R0I的描述信息可以为 R0I的位置信息, R0I可以为矩形区域, 所述 R01的位置信息包括所述 R01的左上角坐标值、 宽和高。
步骤 502、获取当前帧图像中各 R0I与已解码图像中至少一个 R0I的位置 关系。
本步骤中, 具体地, 所述已解码图像至少包括下述一种已解码图像: 当前帧图像解码顺序之前第 n 帧已解码图像、 当前帧图像显示顺序之前 第 n帧已解码图像、 参考帧緩存中的已解码图像或按预设规则的已解码图像; 其中 n大于或等于 1。
具体地, 所述位置关系可以定位为包括如下一种或多种:
当前帧图像中的 R01相对于已解码图像为新出现 R01;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置偏差 R0I ;
已解码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
步骤 503、 根据所述当前帧图像中各 R0I与已解码图像中至少一个 R0I的位 置关系和描述信息解码值, 获取当前帧图像中 R0I的位置信息。
本实施例通过获取当前帧图像中各 R0I与已解码图像中至少一个 R0I 的 位置关系, 结合对应的已解码图像中 R0I 的解码获取当前帧的 R0I编码, 本 方法可以有效提高 R0I的解码压缩效率。
在本实施例的基础上, 进一步地, 获取当前帧图像中各 R0I 与已解码图 像中至少一个 R0I的位置关系, 包括:
解码描述信息中的字段信息, 根据所述字段信息获取当前帧图像中 R0I 的位置关系。
具体实施时, 所述解码描述信息中的字段信息, 根据所述字段信息获取 当前帧图像中 R0I的位置关系, 包括:
解码所述描述信息的第一字段, 获取新出现 R0I和位置偏差 R0I的数目; 解码所述描述信息的第二字段, 获取新出现 R0I的数目;
解码所述描述信息的第三字段, 获取位置相同 R0I和消失 R0I的数目; 根据所述第三字段记录的数目, 逐个解码所述描述信息的第四字段记录 的编码值, 获取第一标识, 并根据所述第一标识和 R0I序号获取位置相同 R0I 的位置关系, 所示第一标识用于标识位置相同 R0I , 或获取第二标识, 并根据 所述第二标识和获取消失 R0I的位置关系, 所述第二标识用于标识消失 R0I ;
根据所述第一字段和第二字段记录的数目, 解码所述描述信息的第五字 段记录的编码值, 以按照 R01序号获取位置偏差 R01的位置关系;
解码所述描述信息的第六字段中新出现 R0I的编码值, 以按照 R0I序号获 取新出现 R01的位置关系。
如图 4中所示, 解码第一标识为 "1" 时, 表示对应的 为位置相同的 R0I 解码第二标识为 "0" 时; 表示对应的 R2为消失的 R0I。
进一步地, 根据 R0I序号获取 R0I位置关系, 包括:
根据 R0I序号和已编码图像中 R0I序号的排序关系获取当前帧图像中 R0I 的排序关系, 并根据所述排序关系获取 R0I位置关系; 其中位置相同 R0I、 位 置偏差 R0I和消失 R0I的序号与已编码图像中对应的 R0I序号相同, 新出现 R0I 在已有序号后分配新的序号。
具体解码字段的序号和含义可参见图 4中编码各字段对应的序号和含义, 在此不在赘述。 在本实施例的基础上, 进一步地, 所述根据所述当前帧图像中各 R0I与已 解码图像中至少一个 RO I的位置关系和描述信息解码值, 获取当前帧图像中 R0I的位置信息, 包括:
将与位置相同 R0I对应的已解码图像中 R0I位置信息作为当前帧图像中位 置相同的 R0I的位置信息;
根据所述第五字段记录的位置偏差解码值和与位置偏差 R0I对应的已解 码图像中 R0I位置信息, 计算获取当前帧图像中位置偏差 R0I的位置信息; 根据所述第六字段记录的位置解码值, 计算获取当前帧图像中新出现 R0I 的位置信息。
图 6为本发明视频编码装置实施例一的结构图, 该装置 60通常集成在编码 器里面,如图 6所示, 该装置 60包括:
检测模块 61 , 用于从当前帧图像中检测出至少一个 RO I的位置信息; 位置关系获取模块 62 , 用于基于预设近似度匹配规则, 将所述当前帧图 像中 R0I的位置信息与已编码图像中至少一个 R0I的位置信息进行近似度匹 配, 获得所述当前帧图像中各 RO I与所述已编码图像中各 RO I的位置关系; 可选地, 所述已编码图像至少包括下述一种已编码图像:
当前帧图像编码顺序之前第 n 帧已编码图像、 当前帧图像显示顺序之前 第 n帧已编码图像、 参考帧緩存中的已编码图像或按预设规则的已编码图像; 其中 n大于或等于 1。
编码模块 63, 用于对各所述位置关系进行编码, 作为当前帧图像中各 R0I 的描述信息。
本实施例的装置, 用于执行图 1所示方法实施例的技术方案, 其实现原理 和技术效果类似, 此处不再赘述。
图 Ί为本发明视频编码装置实施例二的结构图, 本实施例在上一实施例的 基础上, 增加编码模块中的排序单元, 具体该装置 60包括:
位置关系获取模块 62 , 具体用于: 将当前帧图像中每个 R0I的位置信息与 已编码图像中每个 R0I的位置信息进行比较; 当比较结果为位置信息相同时, 则位置关系为位置相同; 当比较结果为当前帧图像中 RO I与已编码图像中 RO I 的位置信息差值小于设定阔值时, 则位置关系为位置偏差; 当比较结果为当 前帧图像中 R0I与已编码图像中 R0I的位置信息差值等于或大于设定阔值时, 则位置关系为新出现; 已编码图像中的 R0I与当前帧图像中 R0I不存在位置相 同或位置偏差关系的 R0I确定位置关系为消失。
具体地, 本实施中所述 R0I为矩形区域, 所述 R0I的位置信息包括所述 R0I 的左上角坐标值、 宽和高;
进一步地, 本实施中所述当前帧图像中各 R0I与所述已编码图像中各 R0I 的位置关系包括如下一种或多种: 当前帧图像中的 R0I相对于已编码图像为新 出现 R0I ; 当前帧图像中的 R0I相对于已编码图像中的 R0I为位置相同 R0I ; 当 前帧图像中的 R0I相对于已编码图像中的 R0I为位置偏差 R0I ; 已编码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
编码模块 63 , 具体用于: 对新出现 R0I的位置关系, 对所述新出现 R0I的 位置信息数值进行编码; 对位置相同 R0I的位置关系, 编码为第一标识; 对位 置偏差 R0I的位置关系, 釆用所述位置偏差 R0I与已编码图像中 R0I的位置信息 差分值进行编码; 对消失 R0I的位置关系, 编码为第二标识。
优选地, 所述第一标识和第二标识的比特位为一位。
所述编码模块 63 , 包括: 排序单元 71 , 用于将各所述位置关系的编码值 按照 R0I的序号进行排序, 作为当前帧图像中各 R0I的描述信息, 其中, 位置 相同 R0I、 位置偏差 ROI和消失 ROI的序号与已编码图像中对应的 ROI序号相同, 新出现 R0I在已有序号后分配新的序号。
所述排序单元 71 , 具体用于: 在所述描述信息的第一字段记录新出现 R0I 和位置偏差 R0I的数目; 在所述描述信息的第二字段记录新出现 R0I的数目; 在所述描述信息的第三字段记录位置相同 R0I和消失 R0I的数目; 根据所述第 三字段记录的数目, 按照 R0I序号, 在所述描述信息的第四字段记录位置相同 R0I和消失 R0I的编码值; 根据所述第一字段和第二字段记录的数目, 按照 R0I 序号, 在所述描述信息的第五字段记录位置偏差 R0I的编码值; 在所述描述信 息的第六字段记录新出现 R01的编码值。
本实施例的装置, 用于执行图 2 所示方法实施例的技术方案, 其实现原 理和技术效果类似, 此处不再赘述。
图 8为本发明视频解码装置实施例一的结构图, 该装置 80通常集成在解 码器里面, 如图 8所示, 该装置 80包括:
描述信息获取模块 81 ,用于获取当前帧图像中至少一个 R0I的描述信息; 位置关系获取模块 82 , 用于获取当前帧图像中各 ROI与已解码图像中至 少一个 R0I的位置关系;
位置信息获取模块 83, 用于根据所述当前帧图像中各 R0I与已解码图像 中至少一个 R0I 的位置关系和描述信息解码值, 获取当前帧图像中 R0I 的位 置信息。
本实施例的装置, 用于执行图 5所示方法实施例的技术方案, 其实现原理 和技术效果类似, 此处不再赘述。
在本实施例的基础上, 具体地, 所述已解码图像至少包括下述一种已解 码图像:
当前帧图像解码顺序之前第 n 帧已解码图像、 当前帧图像显示顺序之前 第 n帧已解码图像、 参考帧緩存中的已解码图像或按预设规则的已解码图像; 其中 n大于或等于 1。
在本实施例的基础上, 具体地, 所述 R0I为矩形区域, 所述 R0I的位置信 息包括所述 R0I的左上角坐标值、 宽和高。
在本实施例的基础上, 具体地, 所述当前帧图像中各 R0I与所述已解码图 像中各 R 01的位置关系包括如下一种或多种:
当前帧图像中的 R01相对于已解码图像为新出现 R01;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置偏差 R0I ;
已解码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
进一步地, 所述位置关系获取模块 82 , 具体用于: 解码描述信息中的字 段信息, 根据所述字段信息获取当前帧图像中 R0I的位置关系。
具体实施时, 所述位置关系获取模块 82 , 具体用于:
解码所述描述信息的第一字段, 获取新出现 R0I和位置偏差 R0I的数目; 解码所述描述信息的第二字段, 获取新出现 R0I的数目;
解码所述描述信息的第三字段, 获取位置相同 R0I和消失 R0I的数目; 根据所述第三字段记录的数目, 逐个解码所述描述信息的第四字段记录 的编码值, 获取第一标识, 并根据所述第一标识和 R0I序号获取位置相同 R0I 的位置关系, 所示第一标识用于标识位置相同 R0I , 或获取第二标识, 并根据 所述第二标识和获取消失 R0I的位置关系, 所述第二标识用于标识消失 R0I ; 根据所述第一字段和第二字段记录的数目, 解码所述描述信息的第五字 段记录的编码值, 以按照 R01序号获取位置偏差 R01的位置关系;
解码所述描述信息的第六字段中新出现 R0I 的编码值, 以按照 R0I序号 获取新出现 R0I的位置关系。
具体地, 所述位置关系获取模块 82 , 具体用于:
根据 R0I序号和已编码图像中 R0I序号的排序关系获取当前帧图像中 R0I 的排序关系, 并根据所述排序关系获取 R0I位置关系; 其中位置相同 R0I、 位 置偏差 R0I和消失 R0I的序号与已编码图像中对应的 R0I序号相同, 新出现 R0I 在已有序号后分配新的序号。
进一步地, 所述位置信息获取模块 83 , 具体用于:
将与位置相同 R0I对应的已解码图像中 R0I位置信息作为当前帧图像中位 置相同的 R0I的位置信息;
根据所述第五字段记录的位置偏差解码值和与位置偏差 R0I对应的已解 码图像中 R0I位置信息, 计算获取当前帧图像中位置偏差 R0I的位置信息; 根据所述第六字段记录的位置解码值,计算获取当前帧图像中新出现 R0I 的位置信息。
以上实施例用于执行上述任意一视频解码方法实施例的技术方案, 其实 现原理和技术效果类似, 此处不再赘述。
图 9为本发明视频编解码系统实施例一的结构图, 如图 9所示, 包括编码 器 91和解码器 92 , 所述编码器 91包括上述任意实施例所述的视频编码装置 60, 所述解码器 92包括上述任意实施例所述的视频编码装置 80。
本实施例中的视频编码装置 60对应的可执行本发明任意实施例所提供的 视频编码方法, 实现原理和技术效果类似, 此处不再赘述;
本实施例中的视频解码装置 80对应的可执行本发明任意实施例所提供的 视频解码方法, 实现原理和技术效果类似, 此处不再赘述。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述实施例所记载的技术方案进行修改, 或者 对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并不使 相应技术方案的本质脱离本发明实施例技术方案的范围。

Claims

权 利 要求 书
1、 一种视频编码方法, 其特征在于, 包括:
从当前帧图像中检测出至少一个感兴趣区域 R01的位置信息;
基于预设近似度匹配规则, 将所述当前帧图像中 R0I的位置信息与已编码图 像中至少一个 R0I的位置信息进行近似度匹配, 获得所述当前帧图像中各 R0I与 所述已编码图像中各 R 01的位置关系;
对各所述位置关系进行编码, 作为当前帧图像中各 R01的描述信息。
2、 根据权利要求 1所述的方法, 其特征在于, 所述已编码图像至少包括下 述一种已编码图像:
当前帧图像编码顺序之前第 n帧已编码图像、当前帧图像显示顺序之前第 n 帧已编码图像、 参考帧緩存中的已编码图像或按预设规则的已编码图像;
其中 n大于或等于 1。
3、 根据权利要求 1所述的方法, 其特征在于:
所述 R0I为矩形区域, 所述 R0I的位置信息包括所述 R0I的左上角坐标值、 宽 和高。
4、 根据权利要求 1-3任一所述的方法, 其特征在于, 所述当前帧图像中各 R0I与所述已编码图像中各 R0I的位置关系包括如下一种或多种:
当前帧图像中的 R0I相对于已编码图像为新出现 R0I ;
当前帧图像中的 R0I相对于已编码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已编码图像中的 R0I为位置偏差 R0I ;
已编码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
5、 根据权利要求 4所述的方法, 其特征在于, 基于预设近似度匹配规则, 将所述当前帧图像中 R0I的位置信息与已编码图像中至少一个 R0I的位置信息进 行近似度匹配, 获得所述当前帧图像中各 R0I与所述已编码图像中各 R0I的位置 关系包括:
将当前帧图像中每个 R0I的位置信息与已编码图像中每个 R0I的位置信息进 行比较;
当比较结果为位置信息相同时, 则位置关系为位置相同;
当比较结果为当前帧图像中 R0I与已编码图像中 R0I的位置信息差值小于设 定阔值时, 则位置关系为位置偏差; 当比较结果为当前帧图像中 ROI与已编码图像中 ROI的位置信息差值等于或 大于设定阔值时, 则位置关系为新出现;
已编码图像中的 R0I与当前帧图像中 R0I不存在位置相同或位置偏差关系的 R0I确定位置关系为消失。
6、 根据权利要求 5所述的方法, 其特征在于, 对各所述位置关系进行编码 包括:
对新出现 R0I的位置关系, 对所述新出现 R0I的位置信息数值进行编码; 对位置相同 R0I的位置关系, 编码为第一标识;
对位置偏差 R0I的位置关系, 釆用所述位置偏差 R0I与已编码图像中 R0I的位 置信息差分值进行编码;
对消失 R0I的位置关系, 编码为第二标识。
7、 根据权利要求 6所述的方法, 其特征在于: 所述第一标识和第二标识的 比特位为一位。
8、 根据权利要求 7所述的方法, 其特征在于, 对各所述位置关系进行编码, 作为当前帧图像中各 R0I的描述信息包括:
将各所述位置关系的编码值按照 R0I的序号进行排序, 作为当前帧图像中各 R0I的描述信息, 其中, 位置相同 R0I、 位置偏差 ROI和消失 ROI的序号与已编码 图像中对应的 R0I序号相同, 新出现 R0I在已有序号后分配新的序号。
9、 根据权利要求 8所述的方法, 其特征在于, 将各所述位置关系的编码值 按照 R0I的序号进行排序, 作为当前帧图像中各 R0I的描述信息包括:
在所述描述信息的第一字段记录新出现 R0I和位置偏差 R0I的数目; 在所述描述信息的第二字段记录新出现 R0I的数目;
在所述描述信息的第三字段记录位置相同 R0I和消失 R0I的数目;
根据所述第三字段记录的数目, 按照 R0I序号, 在所述描述信息的第四字段 记录位置相同 R01和消失 R01的编码值;
根据所述第一字段和第二字段记录的数目, 按照 R0I序号, 在所述描述信息 的第五字段记录位置偏差 R01的编码值;
在所述描述信息的第六字段记录新出现 R01的编码值。
10、 一种视频解码方法, 其特征在于, 包括:
获取当前帧图像中至少一个感兴趣区域 R0I的描述信息; 获取当前帧图像中 ROI与已解码图像中至少一个 R0I的位置关系; 根据所述当前帧图像中各 R0I与已解码图像中至少一个 R0I 的位置关系和 描述信息, 获取当前帧图像中 R0I的位置信息。
11、 根据权利要求 10所述的方法, 其特征在于, 所述已解码图像至少包括 下述一种已解码图像:
当前帧图像解码顺序之前第 n帧已解码图像、当前帧图像显示顺序之前第 n 帧已解码图像、 参考帧緩存中的已解码图像或按预设规则的已解码图像;
其中 n大于或等于 1。
12、 根据权利要求 10所述的方法, 其特征在于:
所述 R0I为矩形区域, 所述 R0I的位置信息包括所述 R0I的左上角坐标值、 宽 和高。
13、 根据权利要求 10-12任一所述的方法, 其特征在于, 所述当前帧图像中 各 R0I与所述已解码图像中各 R0I的位置关系包括如下一种或多种:
当前帧图像中的 R01相对于已解码图像为新出现 R01;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置偏差 R0I ;
已解码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
14、 根据权利要求 13所述的方法, 其特征在于, 获取当前帧图像中 R0I与 已解码图像中至少一个 R0I的位置关系, 包括:
解码描述信息中的字段信息, 根据所述字段信息获取当前帧图像中 R0I 的 位置关系。
15、 根据权利要求 14所述的方法, 其特征在于, 所述解码描述信息中的字 段信息, 根据所述字段信息获取当前帧图像中 R0I的位置关系, 包括:
解码所述描述信息的第一字段, 获取新出现 R0I和位置偏差 R0I的数目; 解码所述描述信息的第二字段, 获取新出现 R0I的数目;
解码所述描述信息的第三字段, 获取位置相同 R0I和消失 R0I的数目; 根据所述第三字段记录的数目, 逐个解码所述描述信息的第四字段记录的 编码值, 获取第一标识, 并根据所述第一标识和 R0I序号获取位置相同 R0I的位 置关系, 所示第一标识用于标识位置相同 R0I , 或获取第二标识, 并根据所述第 二标识和获取消失 R0I的位置关系, 所述第二标识用于标识消失 R0I; 根据所述第一字段和第二字段记录的数目, 解码所述描述信息的第五字段 记录的编码值, 以按照 R0I序号获取位置偏差 R0I的位置关系;
解码所述描述信息的第六字段中新出现 R0I的编码值, 以按照 R0I序号获取 新出现 R0I的位置关系。
16、 根据权利要求 15所述的方法, 其特征在于, 根据 R0I序号获取 R0I位置 关系, 包括:
根据 R0I序号和已解码图像中 R0I序号的排序关系获取当前帧图像中 R0I的 排序关系, 并根据所述排序关系获取 R0I位置关系; 其中位置相同 R0I、 位置偏 差 R0I和消失 R0I的序号与已编码图像中对应的 R0I序号相同, 新出现 R0I在已有 序号后分配新的序号。
17、 根据权利要求 16所述的方法, 其特征在于, 所述根据所述当前帧图像 中各 RO I与已解码图像中至少一个 RO I的位置关系和描述信息解码值, 获取当前 帧图像中 R0I的位置信息, 包括:
将与位置相同 R0I对应的已解码图像中 R0I位置信息作为当前帧图像中位置 相同的 R0I的位置信息;
根据所述第五字段记录的位置偏差解码值和与位置偏差 R0I对应的已解码 图像中 R0I位置信息, 计算获取当前帧图像中位置偏差 R0I的位置信息;
根据所述第六字段记录的位置解码值, 计算获取当前帧图像中新出现 R0I的 位置信息。
18、 一种视频编码装置, 其特征在于, 包括:
检测模块, 用于从当前帧图像中检测出至少一个感兴趣区域 R0I的位置信 息;
位置关系获取模块, 用于基于预设近似度匹配规则, 将所述当前帧图像中 RO I的位置信息与已编码图像中至少一个 RO I的位置信息进行近似度匹配, 获得 所述当前帧图像中各 R0I与所述已编码图像中各 R0I的位置关系;
编码模块, 用于对各所述位置关系进行编码, 作为当前帧图像中各 R0I的描 述信息。
19、 根据权利要求 18所述的装置, 其特征在于, 所述已编码图像至少包括 下述一种已编码图像:
当前帧图像编码顺序之前第 n帧已编码图像、当前帧图像显示顺序之前第 n 帧已编码图像、 参考帧緩存中的已编码图像或按预设规则的已编码图像; 其中 n大于或等于 1。
20、 根据权利要求 18所述的装置, 其特征在于:
所述 R0I为矩形区域, 所述 R0I的位置信息包括所述 R0I的左上角坐标值、 宽 和高。
21、 根据权利要求 18-20任一所述的装置, 其特征在于, 所述当前帧图像中 各 R0I与所述已编码图像中各 R0I的位置关系包括如下一种或多种:
当前帧图像中的 R0I相对于已编码图像为新出现 R0I ;
当前帧图像中的 R0I相对于已编码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已编码图像中的 R0I为位置偏差 R0I ;
已编码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
22、 根据权利要求 21所述的装置, 其特征在于, 所述位置关系获取模块, 具体用于:
将当前帧图像中每个 R0I的位置信息与已编码图像中每个 R0I的位置信息进 行比较;
当比较结果为位置信息相同时, 则位置关系为位置相同;
当比较结果为当前帧图像中 R0I与已编码图像中 R0I的位置信息差值小于设 定阔值时, 则位置关系为位置偏差;
当比较结果为当前帧图像中 R0I与已编码图像中 R0I的位置信息差值等于或 大于设定阔值时, 则位置关系为新出现;
已编码图像中的 R0I与当前帧图像中 R0I不存在位置相同或位置偏差关系的 R0I确定位置关系为消失。
23、 根据权利要求 22所述的装置, 其特征在于, 所述编码模块, 具体用于: 对新出现 R0I的位置关系, 对所述新出现 R0I的位置信息数值进行编码; 对位置相同 R0I的位置关系, 编码为第一标识;
对位置偏差 R0I的位置关系, 釆用所述位置偏差 R0I与已编码图像中 R0I的位 置信息差分值进行编码;
对消失 R0I的位置关系, 编码为第二标识。
24、 根据权利要求 23所述的装置, 其特征在于: 所述第一标识和第二标识 的比特位为一位。
25、 根据权利要求 24所述的装置, 其特征在于, 所述编码模块, 包括: 排序单元, 用于将各所述位置关系的编码值按照 R0I的序号进行排序, 作为 当前帧图像中各 R0I的描述信息, 其中, 位置相同 R0I、 位置偏差 ROI和消失 ROI 的序号与已编码图像中对应的 ROI序号相同, 新出现 R0I在已有序号后分配新的 序号。
26、 根据权利要求 25所述的装置, 其特征在于, 所述排序单元, 具体用于: 在所述描述信息的第一字段记录新出现 R0I和位置偏差 R0I的数目; 在所述描述信息的第二字段记录新出现 R0I的数目;
在所述描述信息的第三字段记录位置相同 R0I和消失 R0I的数目;
根据所述第三字段记录的数目, 按照 R0I序号, 在所述描述信息的第四字段 记录位置相同 R01和消失 R01的编码值;
根据所述第一字段和第二字段记录的数目, 按照 R0I 序号, 在所述描述信 息的第五字段记录位置偏差 R0I的编码值;
在所述描述信息的第六字段记录新出现 R0I的编码值。
27、 一种视频解码装置, 其特征在于, 包括:
描述信息获取模块, 用于获取当前帧图像中至少一个感兴趣区域 R0I 的描 述信息;
位置关系获取模块, 用于获取当前帧图像中各 R0I 与已解码图像中至少一 个 R0I的位置关系;
位置信息获取模块, 用于根据所述当前帧图像中各 R0I 与已解码图像中至 少一个 R0I的位置关系和描述信息解码值, 获取当前帧图像中 R0I的位置信息。
28、 根据权利要求 27所述的装置, 其特征在于, 所述已解码图像至少包括 下述一种已解码图像:
当前帧图像解码顺序之前第 n帧已解码图像、当前帧图像显示顺序之前第 n 帧已解码图像、 参考帧緩存中的已解码图像或按预设规则的已解码图像;
其中 n大于或等于 1。
29、 根据权利要求 27所述的装置, 其特征在于:
所述 R0I为矩形区域, 所述 R0I的位置信息包括所述 R0I的左上角坐标值、 宽 和高。
30、 根据权利要求 27-29任一所述的装置, 其特征在于, 所述当前帧图像中 各 ROI与所述已解码图像中各 ROI的位置关系包括如下一种或多种: 当前帧图像中的 R01相对于已解码图像为新出现 R01;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置相同 R0I ;
当前帧图像中的 R0I相对于已解码图像中的 R0I为位置偏差 R0I ;
已解码图像中的 R0I相对于当前帧图像中的 R0I为消失 R0I。
31、 根据权利要求 30所述的装置, 其特征在于, 所述位置关系获取模块, 具体用于:
解码描述信息中的字段信息, 根据所述字段信息获取当前帧图像中 R0I 的 位置关系。
32、 根据权利要求 31所述的方法装置, 其特征在于, 所述位置关系获取模 块, 具体用于:
解码所述描述信息的第一字段, 获取新出现 R0I和位置偏差 R0I的数目; 解码所述描述信息的第二字段, 获取新出现 R0I的数目;
解码所述描述信息的第三字段, 获取位置相同 R0I和消失 R0I的数目; 根据所述第三字段记录的数目, 逐个解码所述描述信息的第四字段记录的 编码值, 获取第一标识, 并根据所述第一标识和 R0I序号获取位置相同 R0I的位 置关系, 所示第一标识用于标识位置相同 R0I , 或获取第二标识, 并根据所述第 二标识和获取消失 R0I的位置关系, 所述第二标识用于标识消失 R0I;
根据所述第一字段和第二字段记录的数目, 解码所述描述信息的第五字段 记录的编码值, 以按照 R0I序号获取位置偏差 R0I的位置关系;
解码所述描述信息的第六字段中新出现 R0I的编码值, 以按照 R0I序号获取 新出现 R0I的位置关系。
33、 根据权利要求 32所述的装置, 其特征在于, 所述位置关系获取模块, 具体用于:
根据 R0I序号和已编码图像中 R0I序号的排序关系获取当前帧图像中 R0I的 排序关系, 并根据所述排序关系获取 R0I位置关系; 其中位置相同 R0I、 位置偏 差 R0I和消失 R0I的序号与已编码图像中对应的 R0I序号相同, 新出现 R0I在已有 序号后分配新的序号。
34、 根据权利要求 33所述的装置, 其特征在于, 所述位置信息获取模块, 具体用于: 将与位置相同 ROI对应的已解码图像中 ROI位置信息作为当前帧图像中位置 相同的 R0I的位置信息;
根据所述第五字段记录的位置偏差解码值和与位置偏差 R0I对应的已解码 图像中 R0I位置信息, 计算获取当前帧图像中位置偏差 R0I的位置信息;
根据所述第六字段记录的位置解码值, 计算获取当前帧图像中新出现 R0I的 位置信息。
35、 一种视频编解码系统, 其特征在于, 包括:
权利要求 18-26任一所述的视频编码装置;
权利要求 27-34任一所述的视频解码装置。
PCT/CN2014/081564 2013-07-12 2014-07-03 视频编解码方法、装置及系统 WO2015003573A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310294435.7A CN103517073B (zh) 2013-07-12 2013-07-12 视频编解码方法、装置及系统
CN201310294435.7 2013-07-12

Publications (1)

Publication Number Publication Date
WO2015003573A1 true WO2015003573A1 (zh) 2015-01-15

Family

ID=49898989

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/081564 WO2015003573A1 (zh) 2013-07-12 2014-07-03 视频编解码方法、装置及系统

Country Status (2)

Country Link
CN (1) CN103517073B (zh)
WO (1) WO2015003573A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376580A (zh) * 2015-12-28 2016-03-02 上海集成电路研发中心有限公司 一种图像压缩方法
CN114422788A (zh) * 2022-03-30 2022-04-29 浙江智慧视频安防创新中心有限公司 数字视网膜视频联合编码方法、译码方法、装置及电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517073B (zh) * 2013-07-12 2016-11-02 上海交通大学 视频编解码方法、装置及系统
CN105592285B (zh) 2014-10-21 2020-04-21 华为技术有限公司 Roi视频实现方法及装置
CN110741635A (zh) * 2018-06-29 2020-01-31 深圳市大疆创新科技有限公司 编码方法、解码方法、编码设备和解码设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060002466A1 (en) * 2004-06-01 2006-01-05 Samsung Electronics Co., Ltd. Prediction encoder/decoder and prediction encoding/decoding method
CN101282479A (zh) * 2008-05-06 2008-10-08 武汉大学 基于感兴趣区域的空域分辨率可调整编解码方法
CN102045570A (zh) * 2011-01-13 2011-05-04 北京中星微电子有限公司 一种图像编码方法及装置
CN102682454A (zh) * 2012-04-28 2012-09-19 中国科学技术大学 一种视频中的感兴趣区域跟踪方法及装置
WO2012124497A1 (ja) * 2011-03-11 2012-09-20 ソニー株式会社 画像処理装置および方法
CN103517073A (zh) * 2013-07-12 2014-01-15 上海交通大学 视频编解码方法、装置及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060002466A1 (en) * 2004-06-01 2006-01-05 Samsung Electronics Co., Ltd. Prediction encoder/decoder and prediction encoding/decoding method
CN101282479A (zh) * 2008-05-06 2008-10-08 武汉大学 基于感兴趣区域的空域分辨率可调整编解码方法
CN102045570A (zh) * 2011-01-13 2011-05-04 北京中星微电子有限公司 一种图像编码方法及装置
WO2012124497A1 (ja) * 2011-03-11 2012-09-20 ソニー株式会社 画像処理装置および方法
CN102682454A (zh) * 2012-04-28 2012-09-19 中国科学技术大学 一种视频中的感兴趣区域跟踪方法及装置
CN103517073A (zh) * 2013-07-12 2014-01-15 上海交通大学 视频编解码方法、装置及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376580A (zh) * 2015-12-28 2016-03-02 上海集成电路研发中心有限公司 一种图像压缩方法
CN105376580B (zh) * 2015-12-28 2018-08-28 上海集成电路研发中心有限公司 一种图像压缩方法
CN114422788A (zh) * 2022-03-30 2022-04-29 浙江智慧视频安防创新中心有限公司 数字视网膜视频联合编码方法、译码方法、装置及电子设备

Also Published As

Publication number Publication date
CN103517073A (zh) 2014-01-15
CN103517073B (zh) 2016-11-02

Similar Documents

Publication Publication Date Title
TWI750483B (zh) 成分依賴的子區塊分割
CN110024398B (zh) 针对屏幕远程处理场景的局部的基于散列的运动估计
CN107046645B (zh) 图像编解码方法及装置
JP5905890B2 (ja) 事例ベースのデータ・プルーニングを用いたビデオ復号
WO2015003573A1 (zh) 视频编解码方法、装置及系统
WO2015035769A1 (zh) 运动矢量的获取方法、获取装置、视频编解码器及其方法
Daribo et al. Arithmetic edge coding for arbitrarily shaped sub-block motion prediction in depth video compression
US9667969B2 (en) Method and apparatus for encoding a video stream having a transparency information channel
EP2960855B1 (en) Method and device for determining a set of modifiable elements in a group of pictures
US20170041623A1 (en) Method and Apparatus for Intra Coding for a Block in a Coding System
CN110832863B (zh) 用于处理视频序列帧的编码器、解码器、计算机程序和计算机程序产品
CN109862365B (zh) 图像数据处理方法及装置
CN108366295B (zh) 视频分类特征提取方法、转码重压缩检测方法及存储介质
WO2019037471A1 (zh) 视频处理方法、视频处理装置以及终端
JP5950605B2 (ja) 画像処理システム、及び、画像処理方法
WO2016033725A1 (zh) 视频编码中的块分割方式处理方法和相关装置
JP2007525920A (ja) ビデオ信号エンコーダ、ビデオ信号プロセッサ、ビデオ信号配信システム及びビデオ信号配信システムの動作方法
CN113079375B (zh) 基于相关度比较确定视频编解码优先顺序的方法及装置
CN112534809B (zh) 视频编码中的选择性模板匹配
US20200107026A1 (en) Intra-prediction for video coding using perspective information
WO2022267569A1 (en) Systems and methods for block division in video processing
US20220030233A1 (en) Interpolation filtering method and apparatus for intra-frame prediction, medium, and electronic device
KR102345258B1 (ko) 객체영역 검출방법, 장치 및 이에 대한 컴퓨터 프로그램
Chen et al. An efficient coding method for coding region-of-interest locations in avs2
US8804046B1 (en) Methods and systems for detection of chroma dropouts in video

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14823208

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14823208

Country of ref document: EP

Kind code of ref document: A1