WO2015042976A1 - 图像编码、解码方法和系统以及终端 - Google Patents

图像编码、解码方法和系统以及终端 Download PDF

Info

Publication number
WO2015042976A1
WO2015042976A1 PCT/CN2013/084766 CN2013084766W WO2015042976A1 WO 2015042976 A1 WO2015042976 A1 WO 2015042976A1 CN 2013084766 W CN2013084766 W CN 2013084766W WO 2015042976 A1 WO2015042976 A1 WO 2015042976A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
face
information
face image
positive
Prior art date
Application number
PCT/CN2013/084766
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 酷派软件技术(深圳)有限公司
Priority to CN201380068849.6A priority Critical patent/CN104904203A/zh
Priority to EP13894234.7A priority patent/EP3054677A4/en
Priority to PCT/CN2013/084766 priority patent/WO2015042976A1/zh
Priority to US14/912,133 priority patent/US20160205406A1/en
Publication of WO2015042976A1 publication Critical patent/WO2015042976A1/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/20Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to an image encoding method, an image decoding method, an image encoding and decoding method and system, and a terminal. Background technique
  • Video communication systems typically require a video sequence to be transmitted at the transmitting end to reduce the bandwidth required.
  • the following methods are used to reduce the bandwidth required for video communication by using an encoding method:
  • One method of encoding is to encode all parts of an image frame using the same encoding algorithm (such as JPEG2000).
  • the amount of information encoded by this encoding method is still very large, and still cannot provide users with a smooth video communication experience.
  • Another coding method is to distinguish the face area from the background area in the image frame, use different coding algorithms for the face area and the background area, or directly discard the background information.
  • This coding method considers that both parties of the communication (compared to the background information) pay more attention to the face information of the other party, adopt different coding algorithms for the face area and the background area or directly discard the background information, in order to reduce the amount of information after coding.
  • this coding method still has the following two shortcomings:
  • the receiving end cannot recover the original image frame. This is because this encoding method does not transmit the position and size of the face region in the original image frame (e.g., for the rectangular face region, i.e., the length and width) to the receiving end through the network communication module.
  • the invention is based on the above problems, and proposes an image processing technology, which can further reduce the bandwidth occupied by the transmission during the image transmission process, improve the user experience for image transmission, and enable the image receiving end to restore the original image. frame.
  • the present invention provides an image encoding method, including: Step 102: Determine whether at least one positive face image exists in a face image of a current image frame in a video sequence to be transmitted to a receiving terminal; Step 104: If there is at least one positive face image, each of the at least one positive face image is segmented along a mid-perpendicular line of the binocular line of the face image, and half of the segmented face image is calculated Step 106: encoding, by using a first encoding manner, any one of the positive face images and the difference data in the front face image to obtain positive face information, and Positive face information is transmitted to the receiving terminal.
  • the encoding operation of the image may be performed by a transmitting terminal, the transmitting terminal as an image transmitting and encoding terminal, and the receiving terminal as an image receiving and decoding terminal, but those skilled in the art should understand that the transmitting terminal It is also possible to have the same function of receiving and decoding as the receiving terminal, and at the same time, the receiving terminal can also have the same function of transmitting and encoding as the transmitting terminal.
  • the following description will be made only for the case where the transmitting terminal is a transmitting and encoding terminal of an image, and the receiving terminal is a receiving and decoding terminal of an image.
  • the transmitting terminal and the receiving terminal can be applied to various scenarios.
  • the transmitting terminal may be a video sender in a video communication process
  • the receiving terminal may be a video receiver in a video communication process
  • the transmitting terminal may also be an image capturing device in the monitoring system, such as a camera, and the receiving terminal may be a display in the monitoring system for receiving an image collected by the camera.
  • the transmitting terminal determines whether there is a positive face image in the current image frame, and the half image obtained by dividing the positive face image along the mid-perpendicular line of the double-eye line is The other half of the image (ie, the left half face and the right half face) is almost symmetrical, so when it is determined that there is a positive face image in the current image frame, only half of the image after the face image is equally divided, and then half of the image is calculated.
  • the difference data of half of the image and only encodes the half image and the difference data (the above half of the image can be compressed by a compression algorithm such as JPEG2000, and then the difference data is compressed), and under normal circumstances, the left half of the person
  • the face and the right half face are almost symmetrical, so the amount of information contained in the difference data is very small (close to 0), so when transmitting a positive face image, only the image of the half face and a small difference data can be transmitted, Double the compression ratio of the image, greatly reducing image transmission Occupied bandwidth.
  • the method further includes: encoding, by using the first coding mode, a non-positive face image in a face image of the current image frame to obtain non-positive face information, and performing a second coding mode
  • the non-face image in the current image frame is encoded to obtain non-face information, and the non-face information and the non-face information are transmitted to the receiving terminal.
  • the image quality encoded by the first encoding method is superior to the image quality encoded by the second encoding method, that is, the encoded positive face information and the non-positive face information (both are face faces)
  • the image quality of the information is better than the quality of non-face information such as background information.
  • non-face information can be directly discarded and not encoded.
  • the receiving terminal can restore the positive face information and the non-positive face information with a high degree of reduction, and the bandwidth occupied by the non-face information transmission process is greatly reduced, so that the overall bandwidth occupied by the image transmission is also reduced.
  • the method further includes: marking, by the first identifier, the front face information, marking the non-positive face information by using the second identifier, and using the third identifier to the non-face information Marking, transmitting the first identifier, the second identifier, and the third identifier to the receiving terminal.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the receiving terminal may identify the positive face information according to the first identifier, and decode the positive face information in a first decoding manner corresponding to the first encoding manner to obtain a half positive face image and corresponding difference data, and then according to the half positive face image. And the difference data calculates the other half of the face image, for example, the difference data is the gray value of the pixel, then the other half of the face image can be obtained according to the difference between the gray value of the pixel of the half face image and the difference data.
  • the receiving terminal may also identify the non-positive face information according to the second identifier, and decode the non-positive face information in the first decoding manner to obtain the non-positive face image, and identify the non-face information according to the third identifier, and The decoding method decodes the non-face information to obtain a non-face image.
  • the method further includes: encoding, by using a second encoding manner, a non-face image in the face image in the current image frame, and a non-face image in the current image frame to obtain secondary information Transmitting the secondary information to the receiving terminal.
  • the transmitting terminal may also encode the front face image only by the first coding mode according to the user setting, and then encode the non-positive face image and the non-face image by the second coding mode (corresponding to the face image)
  • the priority of the non-face image and the non-face image is higher than that of the non-face image, so that the receiving terminal can restore the positive face image with a higher degree of reduction, and restore the non-frontal image with a lower degree of reduction and Non-face image.
  • the method further includes: marking, by using the first identifier, the front face information, and marking, by the second identifier, the non-positive face information and the non-face information, An identification and the second identification are transmitted to the receiving terminal.
  • the receiving terminal may perform different processing on the different information according to the identifier of the different information. For example, the first face image is decoded by the first decoding method to obtain a half face image and the corresponding difference data, and then the other half face image is calculated according to the half face image and the difference data, and then the non-positive face information is decoded by the second decoding method. Non-face information, resulting in non-face images and non-face images.
  • the step 106 further includes: when the front face image is not present in the face image of the current image frame, encoding the face image by using a first preset encoding manner Face information, and encoding the non-face image in the current image frame by the second encoding method to obtain non-face information, and transmitting the face information and the non-face information to the receiving terminal.
  • the transmitting terminal determines that there is no positive face image in the current image frame, it may be determined that all face images in the current image frame (including only non-positive face images) have higher priority, thereby passing the first encoding
  • the method encodes the same, so that the receiving terminal can restore the face image with a higher degree of reduction, and restore the non-face information with a lower degree of reduction.
  • the method further includes: marking, by the first identifier, the face information, marking the non-face information by the second identifier, and using the first identifier and the second identifier The identification is transmitted to the receiving terminal.
  • the receiving terminal when receiving the face information and the non-face information, the receiving terminal can perform different processing on different information according to the identification of different information.
  • the method further includes: acquiring size information and location information of the face image in the current image frame, and transmitting the location information and the size information to the receiving terminal.
  • the transmitting terminal may further acquire size information and location information of the face image in the current image frame, so as to send the encoded image to the receiving terminal, and then size information and location of the face image.
  • the information is also transmitted to the receiving terminal, so that the receiving terminal can accurately determine the size and position of the face image in the image frame according to the received size information and position information, thereby accurately restoring the original image frame transmitted by the transmitting terminal.
  • the method further includes: determining whether the face image in the next image frame of the current image frame is moved according to a preset manner, and if moving according to the preset manner, according to The preset manner generates a corresponding movement instruction, and transmits the movement instruction to the receiving terminal, so that the receiving terminal moves the face image in the current image frame of the receiving terminal in the preset manner. And moving the current image frame of the receiving terminal as the next image frame of the receiving terminal.
  • the transmitting terminal can generate corresponding instructions for each movement mode. For example, for horizontal movement, a horizontal movement instruction can be generated, so that the face image in the receiving terminal also transmits a corresponding horizontal movement without transmitting the next image frame to the receiving terminal, without affecting the user experience, effectively Reduced data transfer.
  • the present application further provides an image decoding method, including: Step 202: Receive positive face information from a transmitting terminal, where the positive face information includes each positive in a face image in a current image frame of the transmitting terminal a half face image of the face image and difference data of the half face image and the other half face image; Step 204, decoding the face information by using a first decoding manner to obtain each of the face images a half-face image and the difference data; Step 206, obtaining the other half-face image according to the half-face image and the difference data, and according to the half-face image and the other half-face image The front face image is obtained.
  • the receiving terminal may decode the positive face information by using the first decoding mode (corresponding to the first encoding mode), and obtain the positive face in the image frame transmitted by the transmitting terminal.
  • the half face image and the difference data of the image, and then the other half face image is calculated according to the half face image and the difference data, for example, the difference data is the pixel point gray value difference of the half face image and the other half face image.
  • you can use the above half face The difference between the pixel gray value of the image and the difference data results in the other half of the face image, and finally the half face image and the other half face image are combined to obtain a complete face image.
  • the degree of reduction of the image frame is ensured, and since only the data of the half face image and the minimum difference data are transmitted by the transmitting terminal, the bandwidth occupied by the image frame during the transmission process is reduced.
  • the method further includes: receiving non-positive face information and non-face information from the transmitting terminal, and decoding the non-positive face information by using a first decoding manner to obtain the current image frame.
  • the non-face image in the face image is decoded by the second decoding method to obtain a non-face image in the current image frame.
  • the receiving terminal may further receive non-positive face information and non-face information from the transmitting terminal, and then decode the positive face information and the non-positive face information by using the first decoding mode.
  • Decoding the non-face information by using the second decoding mode (corresponding to the second encoding mode), wherein the image quality of the positive face information and the non-positive face information obtained by the transmitting terminal by the first encoding mode is higher than that of passing the second
  • the image quality of the non-face information obtained by the encoding method so that the receiving terminal can restore the positive face image and the non-positive face image with a high degree of reduction, and restore the non-face image with a low degree of reduction.
  • the method further includes: determining, according to the first identifier from the sending terminal, the positive face information, determining the non-positive face information and the non-identification according to the second identifier from the sending terminal. Face information.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the receiving terminal may identify the positive face information according to the first identifier, and decode the positive face information in a first decoding manner corresponding to the first encoding manner to obtain a half positive face image and corresponding difference data, and then according to the half positive face image. And the difference data calculates the other half of the face image, for example, the difference data is the pixel point gray value, then the other half face image can be obtained according to the difference between the pixel point gray value of the half face image and the difference data.
  • the receiving terminal may also identify the non-positive face information according to the second identifier, and decode the non-positive face information in the first decoding manner to obtain the non-positive face image, and identify the non-face information according to the third identifier, and The decoding method decodes the non-face information to obtain a non-face image.
  • the method further includes: receiving non-positive face information and non-face information from the transmitting terminal, and decoding the non-positive face information and the non-face information by using a second decoding manner. Obtaining a non-positive face image in the face image of the current image frame and a non-face image in the current image frame.
  • the transmitting terminal may also encode the front face image only by the first coding mode according to the user setting, and then encode the non-positive face image and the non-face image by the second coding mode (corresponding to the face image)
  • the priority of the non-face image and the non-face image is higher than that of the non-face image, so that the receiving terminal can restore the positive face image with a higher degree of reduction, and restore the non-frontal image with a lower degree of reduction and Non-face image.
  • the method further includes: determining, according to the first identifier from the sending terminal, the positive face information, determining the non-positive face information and the non-identification according to the second identifier from the sending terminal. Face information.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the first face image is decoded by the first decoding method to obtain a half face image and the corresponding difference data, and then the other half face image is calculated according to the half face image and the difference data, and then the non-positive face information is decoded by the second decoding method. Non-face information, resulting in non-face images and non-face images.
  • the method further includes: receiving size information and location information of the face image from the transmitting terminal, and determining, according to the size information and the location information, the face image in the The size and position in the current image frame.
  • the transmitting terminal may further acquire size information and location information of the face image in the current image frame, so as to send the encoded image to the receiving terminal, and then size information and location of the face image.
  • the information is also transmitted to the receiving terminal, so that the receiving terminal can accurately determine the size and position of the face image in the image frame according to the received size information and position information, thereby accurately restoring the original image frame transmitted by the transmitting terminal.
  • the method further includes: receiving a movement instruction from the transmitting terminal, and moving a face image in the current image frame according to a preset manner corresponding to the movement instruction, and moving the moved image
  • the current image frame is used as the next image frame of the current image frame.
  • the transmitting terminal can generate corresponding instructions for each movement mode. For example, for horizontal movement, a horizontal movement instruction can be generated, so that the face image in the receiving terminal also transmits a corresponding horizontal movement without transmitting the next image frame to the receiving terminal, without affecting the user experience, effectively Reduced data transfer.
  • the present application also proposes an image encoding and decoding method, comprising the image encoding method and the image decoding method according to any of the above.
  • the present application further provides a terminal, including: a determining unit, configured to determine, in a video sequence to be transmitted to a receiving terminal, whether at least one positive face image exists in a face image of a current image frame; a difference calculating unit, configured to When the determining unit determines that there is at least one positive face image, each of the at least one positive face image is segmented along a mid-perpendicular line of the binocular line of the front face image, and the segmented The difference data of the half face image and the other half face image in the front face image; the coding unit, configured to encode any half face image in the face image and the difference data by using the first coding mode to obtain a positive a transmission unit, configured to transmit the positive face information to the receiving terminal.
  • a determining unit configured to determine, in a video sequence to be transmitted to a receiving terminal, whether at least one positive face image exists in a face image of a current image frame
  • a difference calculating unit configured to When the determining unit determines that there is
  • the terminal may be a transmitting terminal for transmitting and encoding images (to be distinguished from the receiving terminal, the terminal is hereinafter referred to as a transmitting terminal), and the receiving terminal is used as an image receiving and decoding terminal, but It should be understood by those skilled in the art that the transmitting terminal may also have the same function of receiving and decoding as the receiving terminal, and at the same time, the receiving terminal may also have the same function of transmitting and encoding as the transmitting terminal. The following description will be made only for the case where the transmitting terminal is a transmitting and encoding terminal of an image, and the receiving terminal is a receiving and decoding terminal of an image.
  • the transmitting terminal and the receiving terminal can be applied to various scenarios.
  • the transmitting terminal may be a video sender in a video communication process
  • the receiving terminal may be a video receiver in a video communication process.
  • the transmitting terminal may also be an image capturing device in the monitoring system, such as a camera.
  • the receiving terminal may be a display in the monitoring system for receiving an image captured by the camera.
  • the transmitting terminal determines whether there is a positive face image in the current image frame, and the half image obtained by dividing the positive face image along the mid-perpendicular line of the double-eye line is The other half of the image (ie, the left half face and the right half face) is almost symmetrical, so when it is determined that there is a positive face image in the current image frame, only half of the image after the face image is equally divided, and then half of the image is calculated.
  • the difference data of half of the image and only encodes the half image and the difference data (the above half of the image can be compressed by a compression algorithm such as JPEG2000, and then the difference data is compressed), and under normal circumstances, the left half of the person
  • the face and the right half face are almost symmetrical, so the amount of information contained in the difference data is very small (close to 0), so when transmitting a positive face image, only the image of the half face and a small difference data can be transmitted, Double the compression ratio of the image, greatly reducing image transmission Occupied bandwidth.
  • the encoding unit is further configured to: encode the non-positive face image in the face image of the current image frame by using the first encoding manner to obtain non-positive face information, and pass the second The encoding method encodes the non-face image in the current image frame to obtain non-face information; the transmitting unit is further configured to transmit the non-positive face information and the non-face information to the receiving terminal.
  • the image quality encoded by the first encoding method is superior to the image quality encoded by the second encoding method, that is, the encoded positive face information and the non-positive face information (both are face faces)
  • the image quality of the information is better than the quality of non-face information such as background information.
  • the receiving terminal can restore the positive face information and the non-positive face information with a high degree of reduction, and greatly reduces the bandwidth occupied by the non-face face information transmission, so that the overall bandwidth occupied by the image transmission is also reduced.
  • the method further includes: a marking unit, configured to mark the positive face information by using the first identifier, mark the non-positive face information by the second identifier, and use the third identifier to The non-face information is marked, wherein the transmitting unit is further configured to transmit the first identifier, the second identifier, and the third identifier to the receiving terminal.
  • a marking unit configured to mark the positive face information by using the first identifier, mark the non-positive face information by the second identifier, and use the third identifier to The non-face information is marked
  • the transmitting unit is further configured to transmit the first identifier, the second identifier, and the third identifier to the receiving terminal.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the receiving terminal may identify the positive face information according to the first identifier, and decode the positive face information in a first decoding manner corresponding to the first encoding manner to obtain a half positive face image and corresponding difference data, and then according to the half positive face image. And the difference data calculates the other half of the face image, for example, the difference data is the pixel point gray value, then the other half face image can be obtained according to the difference between the pixel point gray value of the half face image and the difference data.
  • the receiving terminal may also identify the non-positive face information according to the second identifier, and decode the non-positive face information in the first decoding manner to obtain the non-positive face image, and identify the non-face information according to the third identifier, and The decoding method decodes the non-face information to obtain a non-face image.
  • the encoding unit is further configured to encode, by using a second encoding manner, a non-face image in the face image in the current image frame, and a non-face image in the current image frame.
  • the transmitting unit is further configured to transmit the secondary information to the receiving terminal.
  • the transmitting terminal may also encode the front face image only by the first coding mode according to the user setting, and then encode the non-positive face image and the non-face image by the second coding mode (corresponding to the face image)
  • the priority of the non-face image and the non-face image is higher than that of the non-face image, so that the receiving terminal can restore the positive face image with a higher degree of reduction, and restore the non-frontal image with a lower degree of reduction and Non-face image.
  • the method further includes: a marking unit, configured to mark the positive face information by using the first identifier, and mark the non-positive face information by the second identifier and the non-face information Marking, wherein the transmitting unit is further configured to transmit the first identifier and the second identifier to the receiving terminal.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the first face image is decoded by the first decoding method to obtain a half face image and the corresponding difference data, and then the other half face image is calculated according to the half face image and the difference data, and then the non-positive face information is decoded by the second decoding method. Non-face information, resulting in non-face images and non-face images.
  • the encoding unit is further configured to: when the determining unit determines that there is no positive face image in the face image of the current image frame, by using the first preset encoding manner on the person The face image is encoded to obtain face information, and the non-face image in the current image frame is encoded by the second encoding method to obtain non-face information; the transmitting unit is further configured to use the face information and the location information The non-face information is transmitted to the receiving terminal.
  • the transmitting terminal determines that there is no positive face image in the current image frame, it may be determined that all face images in the current image frame (including only non-positive face images) have higher priority, thereby passing the first encoding
  • the method encodes the same, so that the receiving terminal can restore the face image with a higher degree of reduction, and restore the non-face information with a lower degree of reduction.
  • the method further includes: a marking unit, configured to mark the face information by using a first identifier, and mark the non-face information by a second identifier, where the transmission unit And for transmitting the first identifier and the second identifier to the receiving terminal.
  • a marking unit configured to mark the face information by using a first identifier, and mark the non-face information by a second identifier, where the transmission unit And for transmitting the first identifier and the second identifier to the receiving terminal.
  • the receiving terminal when receiving the face information and the non-face information, the receiving terminal can perform different processing on different information according to the identification of different information.
  • the method further includes: an acquiring unit, configured to acquire size information and location information of the face image in the current image frame, where the transmitting unit is further configured to: Information and size information Transfer to the receiving terminal.
  • the transmitting terminal may further acquire size information and location information of the face image in the current image frame, so as to send the encoded image to the receiving terminal, and then size information and location of the face image.
  • the information is also transmitted to the receiving terminal, so that the receiving terminal can accurately determine the size and position of the face image in the image frame according to the received size information and position information, thereby accurately restoring the original image frame transmitted by the transmitting terminal.
  • the method further includes: an instruction generating unit, wherein the determining unit is further configured to determine whether the face image in the next image frame of the current image frame is moved according to a preset manner; The instruction generating unit determines that the movement is performed according to the preset manner, and generates a corresponding movement instruction according to the preset manner; the transmission unit is further configured to transmit the movement instruction to the receiving a terminal, so that the receiving terminal moves the face image in the current image frame of the receiving terminal in the preset manner, and uses the current image frame of the receiving terminal as the next terminal of the receiving terminal Image frame.
  • the transmitting terminal can generate corresponding instructions for each movement mode. For example, for horizontal movement, a horizontal movement instruction can be generated, so that the face image in the receiving terminal also transmits a corresponding horizontal movement without transmitting the next image frame to the receiving terminal, without affecting the user experience, effectively Reduced data transfer.
  • the present application further provides a terminal, including: a receiving unit, configured to receive positive face information from a transmitting terminal, where the positive face information includes each positive in a face image in a current image frame of the transmitting terminal a half-face image of the face image and difference data of the half-face image and the other half-face image; a decoding unit, configured to decode the face information by using a first decoding manner to obtain each of the front faces a half-face image and the difference data in the image; an image processing unit for obtaining the half-face image and the difference data to obtain the other half-face image, and according to the half-face image and the other Half of the face image gets the face image.
  • a receiving unit configured to receive positive face information from a transmitting terminal, where the positive face information includes each positive in a face image in a current image frame of the transmitting terminal a half-face image of the face image and difference data of the half-face image and the other half-face image
  • a decoding unit configured to decode the face information by using
  • the terminal (which is distinguished from the transmitting terminal, hereinafter referred to as the receiving terminal) can be used to receive the information of the transmitting terminal, and decode to obtain a corresponding image, and the receiving terminal sends the front face after receiving the transmitting terminal.
  • the positive face information can be decoded by the first decoding mode (corresponding to the first encoding mode), and half of the face image and the difference data of the face image in the image frame transmitted by the transmitting terminal are obtained, and then according to the half face image
  • the difference data calculates the other half of the face image
  • the difference data is the pixel point gray value difference of the half positive face image and the other half face image
  • the pixel point gray value and the difference according to the above half face image can be
  • the difference of the data is obtained from the other half of the face image, and finally the half face image and the other half face image are combined to obtain a complete face image.
  • the receiving unit is configured to receive non-positive face information and non-face information from the transmitting terminal;
  • the decoding unit is configured to use the first decoding mode to the non-positive face information Performing decoding to obtain a non-face image in the face image of the current image frame, and decoding the non-face information by using a second decoding manner to obtain a non-face image in the current image frame.
  • the receiving terminal may further receive non-positive face information and non-face information from the transmitting terminal, and then decode the positive face information and the non-positive face information by using the first decoding mode.
  • Decoding the non-face information by using the second decoding mode (corresponding to the second encoding mode), wherein the image quality of the positive face information and the non-positive face information obtained by the transmitting terminal by the first encoding mode is higher than that of passing the second
  • the image quality of the non-face information obtained by the encoding method so that the receiving terminal can restore the positive face image and the non-positive face image with a high degree of reduction, and restore the non-face image with a low degree of reduction.
  • the method further includes: an identifier identifying unit, configured to: according to the first from the sending terminal Determining the positive face information, and determining the non-positive face information and the non-face information according to the second identifier from the sending terminal.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the receiving terminal may identify the positive face information according to the first identifier, and decode the positive face information in a first decoding manner corresponding to the first encoding manner to obtain a half positive face image and corresponding difference data, and then according to the half positive face image. And the difference data calculates the other half of the face image, for example, the difference data is the pixel point gray value, then the other half face image can be obtained according to the difference between the pixel point gray value of the half face image and the difference data.
  • the receiving terminal may also identify the non-positive face information according to the second identifier, and decode the non-positive face information in the first decoding manner to obtain the non-positive face image, and identify the non-face information according to the third identifier, and The decoding method decodes the non-face information to obtain a non-face image.
  • the receiving unit is configured to receive non-positive face information and non-face information from the sending terminal; the decoding unit is configured to use the second decoding mode to the non-positive face information Decoding with the non-face information to obtain a non-face image in the face image of the current image frame and a non-face image in the current image frame.
  • the transmitting terminal may also encode the front face image only by the first coding mode according to the user setting, and then encode the non-positive face image and the non-face image by the second coding mode (corresponding to the face image)
  • the priority of the non-face image and the non-face image is higher than that of the non-face image, so that the receiving terminal can restore the positive face image with a higher degree of reduction, and restore the non-frontal image with a lower degree of reduction and Non-face image.
  • the method further includes: an identifier identifying unit, configured to determine the positive face information according to the first identifier from the sending terminal, and determine the non-positive according to the second identifier from the sending terminal Face information and the non-face information.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the first face image is decoded by the first decoding method to obtain a half face image and the corresponding difference data, and then the other half face image is calculated according to the half face image and the difference data, and then the non-positive face information is decoded by the second decoding method. Non-face information, resulting in non-face images and non-face images.
  • the method further includes: a location determining unit, wherein the receiving unit is further configured to receive size information and location information of the face image from the sending terminal, where the location determining unit is used by And determining a size and a position of the face image in the current image frame according to the size information and the location information.
  • the transmitting terminal may further acquire size information and location information of the face image in the current image frame, so as to send the encoded image to the receiving terminal, and then size information and location of the face image.
  • the information is also transmitted to the receiving terminal, so that the receiving terminal can accurately determine the size and position of the face image in the image frame according to the received size information and position information, thereby accurately restoring the original image frame transmitted by the transmitting terminal.
  • the method further includes: an image frame determining unit, wherein the receiving unit is further configured to receive a move instruction from the sending terminal, where the image frame determining unit is configured to respond according to the moving instruction The preset manner moves the face image in the current image frame, and uses the moved current image frame as the next image frame of the current image frame.
  • the transmitting terminal can generate corresponding instructions for each movement mode. For example, for horizontal movement, a horizontal movement instruction can be generated, so that the face image in the receiving terminal also transmits a corresponding horizontal movement without transmitting the next image frame to the receiving terminal, without affecting the user experience, effectively Reduced data transfer.
  • the present application also proposes an image encoding and decoding system comprising the two terminals described in any of the above.
  • a program product stored on a non-transitory machine readable medium for image encoding, the program product comprising machine executable instructions for causing a computer system to perform the following steps : determining whether at least one positive face image exists in the face image of the current image frame in the video sequence to be transmitted to the receiving terminal; if there is at least one positive face image, each of the at least one positive face image is positive The face image is segmented along a mid-perpendicular line of the binocular line of the front face image, and the difference data of the half face image and the other half face image in the segmented positive face image are calculated; Any one of the half face images in the face image and the difference data are encoded to obtain positive face information, and the face information is transmitted to the receiving terminal.
  • a program product stored on a non-transitory machine readable medium for image decoding, the program product comprising machine executable instructions for causing a computer system to perform the following steps Receiving positive face information from the transmitting terminal, where the positive face information includes a half positive face image and the half positive face image of each face image in the face image in the current image frame of the transmitting terminal The difference data of the other half of the face image; decoding the face information by the first decoding manner to obtain half of the face image and the difference data in each of the face images; The difference data obtains the other half-face image, and the front-face image is obtained according to the half-face image and the other half-face image.
  • a program product stored on a non-transitory machine readable medium for image encoding and decoding including the above two program products, is also proposed.
  • a non-volatile machine readable medium storing a program product for image encoding, the program product comprising machine executable instructions for causing a computer system to perform the following steps: Whether at least one positive face image exists in the face image of the current image frame in the video sequence transmitted to the receiving terminal; if there is at least one positive face image, each positive face image in the at least one positive face image is edged Dividing a vertical line of the double-eye line of the front face image, and calculating difference data of the half face image and the other half face image in the divided face image; and the face image by the first coding mode Any one of the half face images and the difference data are encoded to obtain positive face information, and the positive face information is transmitted to the receiving terminal.
  • a non-transitory machine readable medium storing a program product for image decoding, the program product comprising machine executable instructions for causing a computer system to perform the steps of: receiving from Sending positive face information of the terminal, where the positive face information includes half of the positive face image and the half of the positive face image and the other half of the positive face image in the face image in the current image frame in the current image frame of the transmitting terminal a difference data of the face image; decoding the positive face information by the first decoding manner to obtain a half face image and the difference data in each of the front face images; according to the half face image and the difference The data obtains the other half of the face image, and the face image is obtained based on the half face image and the other half face image.
  • a nonvolatile machine readable medium storing a program product for image encoding and decoding, the program product comprising the above two program products.
  • a machine readable program the program causing a machine to perform the image encoding and decoding method according to any one of the above-described technical solutions.
  • a storage medium storing a machine readable program, wherein the machine readable program causes a machine to perform the image encoding and decoding method according to any one of the above-described aspects.
  • the bandwidth occupied by the transmission can be further reduced during the image transmission process, the user's experience for image transmission is improved, and the image receiving end can be restored to the original image frame.
  • FIG. 1 shows a schematic flow chart of an image encoding method according to an embodiment of the present invention
  • FIG. 2 shows a schematic flow chart of an image decoding method according to an embodiment of the present invention
  • Figure 3 shows a schematic block diagram of a terminal in accordance with one embodiment of the present invention
  • FIG. 4 shows a schematic block diagram of a terminal in accordance with another embodiment of the present invention
  • FIG. 5 shows a specific schematic flow chart of an image encoding method according to an embodiment of the present invention
  • FIG. 6 shows a specific schematic flow chart of an image decoding method according to an embodiment of the present invention. detailed description
  • FIG. 1 shows a schematic flow chart of an image encoding method according to an embodiment of the present invention.
  • an image encoding method includes: Step 102: Determine whether at least one positive face image exists in a face image of a current image frame in a video sequence to be transmitted to a receiving terminal; If there is at least one positive face image, each positive face image in the at least one positive face image is segmented along a mid-perpendicular line of the binocular line of the face image, and half of the face of the segmented face image is calculated The difference data of the image and the other half of the face image; Step 106, encoding any half face image and difference data in the face image by the first coding mode to obtain positive face information, and transmitting the face information to the receiving terminal.
  • the encoding operation of the image may be performed by a transmitting terminal, the transmitting terminal as an image transmitting and encoding terminal, and the receiving terminal as an image receiving and decoding terminal, but those skilled in the art should understand that the transmitting terminal It is also possible to have the same function of receiving and decoding as the receiving terminal, and at the same time, the receiving terminal can also have the same function of transmitting and encoding as the transmitting terminal. The following description will be made only for the case where the transmitting terminal is a transmitting and encoding terminal of an image, and the receiving terminal is a receiving and decoding terminal of an image.
  • the transmitting terminal and the receiving terminal can be applied to various scenarios.
  • the transmitting terminal may be a video sender in a video communication process
  • the receiving terminal may be a video receiver in a video communication process.
  • the transmitting terminal may also be an image capturing device in the monitoring system, such as a camera.
  • the receiving terminal may be a display in the monitoring system for receiving an image captured by the camera.
  • the transmitting terminal determines whether there is a positive face image in the current image frame, and the half image obtained by dividing the positive face image along the mid-perpendicular line of the double-eye line is The other half of the image (ie, the left half face and the right half face) is almost symmetrical, so when it is determined that there is a positive face image in the current image frame, only half of the image after the face image is equally divided, and then half of the image is calculated.
  • the difference data of half of the image and only encodes the half image and the difference data (the above half of the image can be compressed by a compression algorithm such as JPEG2000, and then the difference data is compressed), and under normal circumstances, the left half of the person
  • the face and the right half face are almost symmetrical, so the amount of information contained in the difference data is very small (close to 0), so when transmitting a positive face image, only the image of the half face and a small difference data can be transmitted, Double the compression ratio of the image, greatly reducing image transmission Occupied bandwidth.
  • the method further includes: encoding, by using the first coding manner, the non-positive face image in the face image of the current image frame to obtain non-positive face information, and performing the second coding mode on the current image frame
  • the face image is encoded to obtain non-face information, and the non-face information and the non-face information are transmitted to the receiving terminal.
  • the image quality encoded by the first encoding method is superior to the image quality encoded by the second encoding method, that is, the encoded positive face information and the non-positive face information (both are face faces)
  • the image quality of the information is better than the quality of non-face information such as background information.
  • non-face information can be directly discarded and not encoded.
  • the receiving terminal can restore the positive face information and the non-positive face information with a high degree of reduction, and greatly reduces the bandwidth occupied by the non-face face information transmission, so that the overall bandwidth occupied by the image transmission is also reduced.
  • the method further includes: marking the positive face information by the first identifier, marking the non-positive face information by the second identifier, and marking the non-face information by the third identifier, and the first The identification, the second identification, and the third identification are transmitted to the receiving terminal.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the receiving terminal may identify the positive face information according to the first identifier, and decode the positive face information in a first decoding manner corresponding to the first encoding manner to obtain a half positive face image and corresponding difference data, and then according to the half positive face image. And the difference data calculates the other half of the face image, for example, the difference data is the pixel point gray value, then the other half face image can be obtained according to the difference between the pixel point gray value of the half face image and the difference data.
  • the receiving terminal may also identify the non-positive face information according to the second identifier, and decode the non-positive face information in the first decoding manner to obtain the non-positive face image, and identify the non-face information according to the third identifier, and The decoding method decodes the non-face information to obtain a non-face image.
  • the method further includes: encoding, by using the second encoding manner, the non-face image in the face image in the current image frame, and the non-face image in the current image frame to obtain secondary information, which will be secondary The information is transmitted to the receiving terminal.
  • the transmitting terminal may also encode the front face image only by the first coding mode according to the user setting, and then encode the non-positive face image and the non-face image by the second coding mode (corresponding to the face image)
  • the priority of the non-face image and the non-face image is higher than that of the non-face image, so that the receiving terminal can restore the positive face image with a higher degree of reduction, and restore the non-frontal image with a lower degree of reduction and Non-face image.
  • the method further includes: marking the positive face information by the first identifier, marking the non-positive face information and the non-face information by the second identifier, and transmitting the first identifier and the second identifier to Receiving terminal.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the first face image is decoded by the first decoding method to obtain a half face image and the corresponding difference data, and then the other half face image is calculated according to the half face image and the difference data, and then the non-positive face information is decoded by the second decoding method. Non-face information, resulting in non-face images and non-face images.
  • the step 106 further includes: when the front face image is not present in the face image of the current image frame, encoding the face image by using the first preset encoding manner to obtain the face information, and passing The second encoding method encodes the non-face image in the current image frame to obtain non-face information, and transmits the face information and the non-face information to the receiving terminal.
  • the transmitting terminal determines that there is no positive face image in the current image frame, it may be determined that all face images in the current image frame (including only non-positive face images) have higher priority, thereby passing the first encoding
  • the method encodes the same, so that the receiving terminal can restore the face image with a higher degree of reduction, and restore the non-face information with a lower degree of reduction.
  • the method further includes: marking the face information by the first identifier, marking the non-face information by the second identifier, and transmitting the first identifier and the second identifier to the receiving terminal.
  • the receiving terminal when receiving the face information and the non-face information, the receiving terminal can perform different processing on different information according to the identification of different information.
  • the identifier may be a 01-bit sequence, such as a positive face marked with 00, a non-positive face by 01, and a non-face by 10 mark.
  • the method further includes: acquiring size information and location information of the face image in the current image frame, and transmitting the location information and the size information to the receiving terminal.
  • the transmitting terminal may further acquire size information and location information of the face image in the current image frame, so as to send the encoded image to the receiving terminal, and then size information and location of the face image.
  • the information is also transmitted to the receiving terminal, so that the receiving terminal can accurately determine the size and position of the face image in the image frame according to the received size information and position information, thereby accurately restoring the original image frame transmitted by the transmitting terminal.
  • the method further includes: determining whether the face image in the next image frame of the current image frame is The mobile device performs the mobile device according to the preset mode, and generates a corresponding mobile command according to the preset mode, and transmits the mobile command to the receiving terminal, so that the receiving terminal moves the current terminal of the receiving terminal in a preset manner.
  • a face image in the image frame, and the current image frame of the received receiving terminal is used as the next image frame of the receiving terminal.
  • the transmitting terminal can generate corresponding instructions for each movement mode. For example, for horizontal movement, a horizontal movement instruction can be generated, so that the face image in the receiving terminal also transmits a corresponding horizontal movement without transmitting the next image frame to the receiving terminal, without affecting the user experience, effectively Reduced data transfer.
  • FIG. 2 shows a schematic flow chart of an image decoding method according to an embodiment of the present invention.
  • the image decoding method includes: Step 202: Receive positive face information from a transmitting terminal, where the positive face information includes each of the face images in the current image frame of the transmitting terminal The difference between the half face image of the positive face image and the difference between the half face image and the other half face image; Step 204: Decode the face information by the first decoding method to obtain a half face image in each face image and Difference data; Step 206, obtaining another half face image according to the half face image and the difference data, and obtaining a face image according to the half face image and the other half face image.
  • the receiving terminal may decode the positive face information by using the first decoding mode (corresponding to the first encoding mode), and obtain the positive face in the image frame transmitted by the transmitting terminal.
  • the half face image and the difference data of the image, and then the other half face image is calculated according to the half face image and the difference data, for example, the difference data is the pixel point gray value difference of the half face image and the other half face image.
  • the other half positive face image can be obtained according to the difference between the pixel gray value of the half positive face image and the difference data, and finally the half positive face image and the other half positive face image are combined to obtain a complete positive face image.
  • the method further includes: receiving non-positive face information and non-face information from the transmitting terminal, and decoding the non-positive face information by using the first decoding manner to obtain a non-face image in the face image of the current image frame.
  • the face image is decoded by the second decoding method to obtain a non-face image in the current image frame.
  • the receiving terminal may further receive non-positive face information and non-face information from the transmitting terminal, and then decode the positive face information and the non-positive face information by using the first decoding mode.
  • Decoding the non-face information by using the second decoding mode (corresponding to the second encoding mode), wherein the image quality of the positive face information and the non-positive face information obtained by the transmitting terminal by the first encoding mode is higher than that of passing the second
  • the image quality of the non-face information obtained by the encoding method so that the receiving terminal can restore the positive face image and the non-positive face image with a high degree of reduction, and restore the non-face image with a low degree of reduction.
  • the method further includes: determining positive face information according to the first identifier from the transmitting terminal, and determining non-positive face information and non-face information according to the second identifier from the transmitting terminal.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the receiving terminal may identify the positive face information according to the first identifier, and decode the positive face information in a first decoding manner corresponding to the first encoding manner to obtain a half positive face image and corresponding difference data, and then according to the half positive face image. And the difference data calculates the other half of the face image, for example, the difference data is the pixel point gray value, then the other half face image can be obtained according to the difference between the pixel point gray value of the half face image and the difference data.
  • the receiving terminal may also identify the non-positive face information according to the second identifier, and decode the non-positive face information in the first decoding manner to obtain the non-positive face image, and identify the non-face information according to the third identifier, and The decoding method decodes the non-face information to obtain a non-face image.
  • the transmitting terminal may also encode the front face image only by the first coding mode according to the user setting, and then encode the non-positive face image and the non-face image by the second coding mode (corresponding to the face image)
  • the priority of the non-face image and the non-face image is higher than that of the non-face image, so that the receiving terminal can restore the positive face image with a higher degree of reduction, and restore the non-frontal image with a lower degree of reduction and Non-face image.
  • the method further includes: determining positive face information according to the first identifier from the transmitting terminal, and determining non-positive face information and non-face information according to the second identifier from the transmitting terminal.
  • the receiving terminal when the receiving terminal receives the positive face information, the non-positive face information, and the non-face information, the receiving terminal may perform different processing on different information according to the identifier of the different information.
  • the first face image is decoded by the first decoding method to obtain a half face image and the corresponding difference data, and then the other half face image is calculated according to the half face image and the difference data, and then the non-positive face information is decoded by the second decoding method.
  • the identifier can be a 01-bit sequence, such as marking the positive face with 00, non-positive face with 01, and non-human face with 10 mark.
  • the method further includes: receiving size information and location information of the face image from the transmitting terminal, and determining a size and a position of the face image in the current image frame according to the size information and the location information.
  • the transmitting terminal may further acquire size information and location information of the face image in the current image frame, so as to send the encoded image to the receiving terminal, and then size information and location of the face image.
  • the information is also transmitted to the receiving terminal, so that the receiving terminal can accurately determine the size and position of the face image in the image frame according to the received size information and position information, thereby accurately restoring the original image frame transmitted by the transmitting terminal.
  • the method further includes: receiving a movement instruction from the transmitting terminal, and moving the face image in the current image frame according to a preset manner corresponding to the movement instruction, and using the moved current image frame as the current image. The next image frame of the frame.
  • the transmitting terminal can generate corresponding instructions for each movement mode. For example, for horizontal movement, a horizontal movement instruction can be generated, so that the face image in the receiving terminal also transmits a corresponding horizontal movement without transmitting the next image frame to the receiving terminal, without affecting the user experience, effectively Reduced data transfer.
  • the present application also proposes an image encoding and decoding method, including the image encoding method and the image decoding method of any of the above.
  • Figure 3 shows a schematic block diagram of a terminal in accordance with one embodiment of the present invention.
  • the terminal 300 includes: a determining unit 302, configured to determine, in a video sequence to be transmitted to a receiving terminal, whether at least one positive face image exists in a face image of a current image frame.
  • the difference calculation unit 304 is configured to, when the determining unit 302 determines that at least one positive face image exists, divide each positive face image in the at least one positive face image along a mid-perpendicular line of the binocular line of the front face image, and Calculating difference data of the half face image and the other half face image in the divided positive face image; the encoding unit 306 is configured to encode any half face image and the difference data in the face image by using the first coding mode Positive face information; a transmitting unit 308, configured to transmit positive face information to the receiving terminal.
  • the terminal 300 may be a transmitting terminal for transmitting and encoding images (to distinguish from the receiving terminal, the terminal is as follows)
  • the transmitting terminal 300 is called a transmitting terminal), and the receiving terminal serves as a receiving and decoding terminal for the image.
  • the transmitting terminal may also have the same function of receiving and decoding as the receiving terminal, and the receiving terminal may also have The same function of sending and encoding as the transmitting terminal.
  • the following description will be made only for the case where the transmitting terminal is a transmitting and encoding terminal of an image, and the receiving terminal is a receiving and decoding terminal of an image.
  • the transmitting terminal and the receiving terminal can be applied to various scenarios.
  • the transmitting terminal may be a video sender in a video communication process
  • the receiving terminal may be a video receiver in a video communication process.
  • the transmitting terminal may also be an image capturing device in the monitoring system, such as a camera, and the receiving terminal may be a display in the monitoring system for receiving an image collected by the camera.
  • the transmitting terminal determines whether there is a positive face image in the current image frame, and the half image obtained by dividing the positive face image along the mid-perpendicular line of the double-eye line is The other half of the image (ie, the left half face and the right half face) is almost symmetrical, so when it is determined that there is a positive face image in the current image frame, only half of the image after the face image is equally divided, and then half of the image is calculated.
  • the difference data of half of the image and only encodes the half image and the difference data (the above half of the image can be compressed by a compression algorithm such as JPEG2000, and then the difference data is compressed), and under normal circumstances, the left half of the person
  • the face and the right half face are almost symmetrical, so the amount of information contained in the difference data is very small (close to 0), so when transmitting a positive face image, only the image of the half face and a small difference data can be transmitted, Double the compression ratio of the image, greatly reducing image transmission Occupied bandwidth.
  • the encoding unit 306 is further configured to encode the non-positive face image in the face image of the current image frame by using the first encoding manner to obtain non-positive face information, and use the second encoding mode to perform non-face image in the current image frame.
  • the encoding is performed to obtain non-face information;
  • the transmitting unit 308 is further configured to transmit the non-positive face information and the non-face information to the receiving terminal.
  • the image quality encoded by the first encoding method is superior to the image quality encoded by the second encoding method, that is, the encoded positive face information and the non-positive face information (both are face information) have excellent image quality.
  • the quality of non-face information (such as background information).
  • the receiving terminal can restore the positive face information and the non-positive face information with a high degree of reduction, and the bandwidth occupied by the non-face information transmission process is greatly reduced, so that the overall bandwidth occupied by the image transmission is also reduced.
  • the method further includes: a marking unit 310, configured to mark the positive face information by the first identifier, mark the non-positive face information by the second identifier, and mark the non-face information by the third identifier, where the transmission
  • the unit 308 is further configured to transmit the first identifier, the second identifier, and the third identifier to the receiving terminal.
  • the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the receiving terminal may identify the positive face information according to the first identifier, and decode the positive face information in a first decoding manner corresponding to the first encoding manner to obtain a half positive face image and corresponding difference data, and then according to the half positive face image. And the difference data calculates the other half of the face image, for example, the difference data is the pixel point gray value, then the other half face image can be obtained according to the difference between the pixel point gray value of the half face image and the difference data.
  • the receiving terminal may also identify the non-positive face information according to the second identifier, and decode the non-positive face information in the first decoding manner to obtain the non-positive face image, and identify the non-face information according to the third identifier, and The decoding method decodes the non-face information to obtain a non-face image.
  • the encoding unit 306 is further configured to encode the non-positive face image in the face image in the current image frame and the non-face image in the current image frame by using a second encoding manner to obtain secondary information; the transmitting unit 308 is further configured to: The secondary information is transmitted to the receiving terminal.
  • the transmitting terminal may also encode the positive face image only by the first encoding method according to the user setting, and then encode the non-frontal face image and the non-face image by the second encoding mode (corresponding to the positive face image having higher priority than the non-face image) The priority of the face image and the non-face image), so that the receiving terminal can restore the face image with a higher degree of reduction, and restore the non-face image and the non-face image with a lower degree of reduction.
  • the method further includes: a marking unit 310, configured to mark the positive face information by using the first identifier, and mark and non-face information of the non-positive face information by the second identifier, where the transmission unit 308 is further used for Transmitting the first identifier and the second identifier to the receiving terminal.
  • a marking unit 310 configured to mark the positive face information by using the first identifier, and mark and non-face information of the non-positive face information by the second identifier, where the transmission unit 308 is further used for Transmitting the first identifier and the second identifier to the receiving terminal.
  • the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, decoding the positive face information by the first decoding method to obtain a half positive face image and corresponding difference Different data, then calculate the other half of the face image based on the half face image and the difference data, and then decode the non-positive face information and the non-face face information by the second decoding method to obtain the non-frontal face image and the non-face face image.
  • the encoding unit 306 is further configured to: when the determining unit 302 determines that there is no positive face image in the face image of the current image frame, encode the face image by using the first preset encoding manner to obtain face information, and pass the The two encoding method encodes the non-face image in the current image frame to obtain non-face information; the transmitting unit 308 is further configured to transmit the face information and the non-face information to the receiving terminal.
  • the transmitting terminal determines that there is no positive face image in the current image frame, it may be determined that all face images in the current image frame (including only non-positive face images) have a higher priority, and thus are encoded by the first encoding method. In order to enable the receiving terminal to restore the face image with a higher degree of reduction, and to restore the non-face information with a lower degree of reduction.
  • the method further includes: a marking unit 310, configured to mark the face information by the first identifier, and mark the non-face information by the second identifier, wherein the transmitting unit 308 further transmits the first identifier and the second identifier To the receiving terminal.
  • a marking unit 310 configured to mark the face information by the first identifier, and mark the non-face information by the second identifier, wherein the transmitting unit 308 further transmits the first identifier and the second identifier To the receiving terminal.
  • the receiving terminal may perform different processing on different information according to the identifier of the different information.
  • the identifier may be a 01-bit sequence, for example, a positive face is marked by 00, a non-positive face is indicated by 01, and a non-human face is marked by 10.
  • the method further includes: an obtaining unit 312, configured to acquire size information and location information of the face image in the current image frame, where the transmission unit 308 is further configured to transmit the location information and the size information to the receiving terminal.
  • an obtaining unit 312 configured to acquire size information and location information of the face image in the current image frame
  • the transmission unit 308 is further configured to transmit the location information and the size information to the receiving terminal.
  • the transmitting terminal may further acquire size information and location information of the face image in the current image frame, so as to send the encoded image to the receiving terminal, and send the size information and the location information of the face image to the receiving terminal.
  • the receiving terminal can accurately determine the size and position of the face image in the image frame according to the received size information and the location information, thereby accurately restoring the original image frame sent by the transmitting terminal.
  • the method further includes: an instruction generating unit 314, wherein the determining unit 302 is further configured to determine whether the face image in the next image frame of the current image frame is moved according to a preset manner; the command generating unit determines, according to the determining unit, The preset mode is moved to generate a corresponding movement instruction according to a preset manner; the transmission unit 308 is further configured to transmit the movement instruction to the receiving terminal, so that the receiving terminal moves the face in the current image frame of the receiving terminal in a preset manner. The image, and the current image frame of the received receiving terminal is used as the next image frame of the receiving terminal.
  • the transmitting terminal can generate corresponding instructions for each mobile mode, such as for horizontal movement can generate
  • the horizontal movement instruction causes the face image in the receiving terminal to also transmit the corresponding horizontal movement without transmitting the next image frame to the receiving terminal without the transmitting terminal, effectively reducing the data transmission amount without affecting the user experience.
  • FIG. 4 shows a schematic block diagram of a terminal in accordance with another embodiment of the present invention.
  • the terminal 400 includes: a receiving unit 402, configured to receive positive face information from a transmitting terminal, where the positive face information includes a face in a current image frame of the transmitting terminal a difference between the half face image of each positive face image and the half face image and the other half face image; the decoding unit 404 is configured to decode the face information by using the first decoding mode to obtain each face Half face image and difference data in the image; Image processing unit 406, for half face image and difference data to obtain the other half face image, and obtain a face image from the half face image and the other half face image.
  • the terminal 400 (to be distinguished from the transmitting terminal, hereinafter referred to as the receiving terminal) can be used to receive the information of the transmitting terminal, and perform decoding to obtain a corresponding image. After receiving the transmitting terminal, the receiving terminal can send the positive face information.
  • the first face decoding mode (corresponding to the first encoding mode) is used to decode the positive face information, and the half face image and the difference data of the face image in the image frame transmitted by the transmitting terminal are obtained, and then calculated according to the half face image and the difference data.
  • the other half of the face image for example, the difference data is the pixel point gray value difference of the half face image and the other half face image
  • the difference between the pixel gray value of the half face image and the difference data may be Get the other half of the face image
  • half The positive face image is merged with the other half of the face image to obtain a complete positive face image.
  • the receiving unit 402 is configured to receive non-positive face information and non-face information from the transmitting terminal;
  • the decoding unit 404 is configured to decode the non-positive face information by using the first decoding manner to obtain a face image in the current image frame.
  • the non-face image is decoded by the second decoding method to obtain a non-face image in the current image frame.
  • the receiving terminal may also receive the non-positive face information and the non-face information from the transmitting terminal, and then decode the positive face information and the non-positive face information by using the first decoding mode, and adopt the second decoding mode. (corresponding to the second encoding mode) decoding the non-face information, wherein the image quality of the positive face information and the non-positive face information obtained by the transmitting terminal by the first encoding method is higher than the non-human obtained by the second encoding method The image quality of the face information, so that the receiving terminal can restore the positive face image and the non-front face image with a high degree of reduction, and restore the non-face image with a low degree of reduction.
  • the method further includes: an identifier identifying unit 408, configured to determine positive face information according to the first identifier from the sending terminal, and determine non-positive face information and non-face information according to the second identifier from the sending terminal.
  • an identifier identifying unit 408 configured to determine positive face information according to the first identifier from the sending terminal, and determine non-positive face information and non-face information according to the second identifier from the sending terminal.
  • the receiving terminal may perform different processing on different information according to the identifier of the different information. For example, the receiving terminal may identify the positive face information according to the first identifier, and decode the positive face information in a first decoding manner corresponding to the first encoding manner to obtain a half positive face image and corresponding difference data, and then according to the half positive face image. And the difference data calculates the other half of the face image, for example, the difference data is the pixel point gray value, then the other half face image can be obtained according to the difference between the pixel point gray value of the half face image and the difference data.
  • the receiving terminal may also identify the non-positive face information according to the second identifier, and decode the non-positive face information in the first decoding manner to obtain the non-positive face image, and identify the non-face information according to the third identifier, and The decoding method decodes the non-face information to obtain a non-face image.
  • the receiving unit 402 is configured to receive non-positive face information and non-face information from the transmitting terminal;
  • the decoding unit 404 is configured to decode the non-positive face information and the non-face information by using the second decoding manner to obtain a current image frame.
  • the transmitting terminal may also encode the positive face image only by the first encoding method according to the user setting, and then encode the non-frontal face image and the non-face image by the second encoding mode (corresponding to the positive face image having higher priority than the non-face image) The priority of the face image and the non-face image), so that the receiving terminal can restore the face image with a higher degree of reduction, and restore the non-face image and the non-face image with a lower degree of reduction.
  • the method further includes: an identifier identifying unit 408, configured to determine positive face information according to the first identifier from the sending terminal, and determine non-positive face information and non-face information according to the second identifier from the sending terminal.
  • an identifier identifying unit 408 configured to determine positive face information according to the first identifier from the sending terminal, and determine non-positive face information and non-face information according to the second identifier from the sending terminal.
  • the receiving terminal may perform different processing on different information according to the identifier of the different information.
  • the first face image is decoded by the first decoding method to obtain a half face image and the corresponding difference data, and then the other half face image is calculated according to the half face image and the difference data, and then the non-positive face information is decoded by the second decoding method.
  • Non-face information resulting in non-face images and non-face images.
  • the identifier may be a 01 bit sequence, such as a positive face marked by 00, a non-positive face by 01, and a non-face by 10 mark.
  • the method further includes: a location determining unit 410, wherein the receiving unit 402 is further configured to receive size information and location information of the face image from the transmitting terminal, where the location determining unit 410 is configured to determine the face image according to the size information and the location information. The size and position in the current image frame.
  • the transmitting terminal may further acquire size information and location information of the face image in the current image frame, so as to send the encoded image to the receiving terminal, and send the size information and the location information of the face image to the receiving terminal.
  • the receiving terminal can accurately determine the size and position of the face image in the image frame according to the received size information and the location information, thereby accurately restoring the original image frame sent by the transmitting terminal.
  • the method further includes: an image frame determining unit 412, wherein the receiving unit 402 is further configured to receive a move instruction from the sending terminal, where the image frame determining unit 412 is configured to move the person in the current image frame according to a preset manner corresponding to the moving instruction.
  • the face image, and the moved current image frame is taken as the next image frame of the current image frame. If the face image in the next image frame of the current image frame is only moved according to a preset manner with respect to the face image in the current image frame, for example, during video communication, the user's avatar of the video transmitting end only moves horizontally.
  • the transmitting terminal can generate corresponding instructions for each mobile mode, such as for horizontal movement can generate
  • the horizontal movement instruction causes the face image in the receiving terminal to also transmit the corresponding horizontal movement without transmitting the next image frame to the receiving terminal without the transmitting terminal, effectively reducing the data transmission amount without affecting the user experience.
  • the present application also proposes an image encoding and decoding system comprising the terminal 300 as shown in FIG. 3 and the terminal 400 as shown in FIG.
  • FIG. 5 shows a specific schematic flow chart of an image encoding method according to an embodiment of the present invention.
  • the image encoding method specifically includes:
  • Step 502 the transmitting terminal (which may be the terminal 300 as shown in FIG. 3) acquires (for example, obtains from the image collecting device) a video sequence to be transmitted to the receiving terminal (which may be the terminal 400 as shown in FIG. 4).
  • Step 504 The sending terminal determines whether the current image frame of the video sequence includes a face image. If the face image exists, the process proceeds to step 506. If the face image does not exist, the process proceeds to step 514.
  • Step 506 if there is a face image, acquiring position information (such as coordinates) and size information (such as length and width values) of the face image in the current image frame, and the amount of data occupied by the position information and the size information is small. By transmitting information of a small amount of data, the receiving terminal can restore the original image frame with a high degree of reduction.
  • position information such as coordinates
  • size information such as length and width values
  • Step 508 Determine whether a face image is included in the face image.
  • the corresponding face portion may be intercepted from the corresponding face image to be recognized according to the distance between the two eyes, and then the corresponding face is taken according to the cut.
  • Generating a mirrored face corresponding to the face portion, and calculating difference information between the two images according to the gray value of the gray value of each pixel corresponding to the face portion and the mirror face, and the calculated difference will be The information is compared with a preset threshold to determine whether the face included in the face image to be recognized is a positive face.
  • Step 510 If there is no positive face image in the face image (that is, the face image is a non-positive face image, wherein the face image may be a face image or a face image, but the difference between the left half face and the right half face is larger) Then, the face image is encoded by the first coding method, the non-face image is encoded by the second coding method, and the coded information is marked.
  • Step 512 If there is a positive face image, obtain half of the image of the front face image (specifically, the image may be divided along the mid-perpendicular line of the double-eye line in the face image, and one of the two divided images is taken) And calculating difference data of the other half of the image of the half image, encoding the difference data and the half image obtained by the first coding method, and encoding the non-frontal image and the non-face image by the second coding method, after encoding The information is marked.
  • the image of the front face image specifically, the image may be divided along the mid-perpendicular line of the double-eye line in the face image, and one of the two divided images is taken
  • Step 514 If there is no face image in the current image frame (the description is a background image), the image in the current image frame is encoded by the second encoding mode.
  • Step 516 The transmitting terminal transmits the encoded information, the location information, and the size information after being encoded to the receiving terminal (if the marking information is also transmitted, the marking information is transmitted to the receiving terminal).
  • FIG. 6 shows a specific schematic flow chart of an image decoding method according to an embodiment of the present invention.
  • the image decoding method according to the embodiment of the present invention specifically includes:
  • Step 602 The receiving terminal receives related information of the current image frame sent by the sending terminal, that is, the encoded image information.
  • Step 604 Determine different types of information according to the identifiers corresponding to different information, for example, the information corresponding to the identifier 00 is positive face information.
  • Step 606 Perform non-positive face information and non-face information, and decode according to the coding mode in a corresponding decoding manner.
  • Step 608 For the positive face information, perform decoding in a corresponding decoding manner to obtain half of the face image and the difference data, and calculate the other half image according to the half face image and the difference data.
  • Step 610 Combine the half positive face image and the other half positive face image into one positive face image.
  • Step 612 Display a front face image, a non-positive face image, and a non-face image according to the size information and the position information, thereby completing The restoration of the pair of current image frames.
  • a program product stored on a non-transitory machine readable medium for image encoding, the program product comprising machine executable instructions for causing a computer system to perform the following steps: Whether there is at least one positive face image in the face image of the current image frame in the video sequence to be transmitted to the receiving terminal; if there is at least one positive face image, each positive face image in the at least one positive face image is along the positive The mid-perpendicular line of the double-eye line of the face image is segmented, and the difference data of the half-face image and the other half-face image in the segmented positive face image are calculated; and any half of the face image is corrected by the first coding method.
  • the face image and the difference data are encoded to obtain positive face information, and the face information is transmitted to the receiving terminal.
  • a program product stored on a non-transitory machine readable medium for image decoding, the program product comprising machine executable instructions for causing a computer system to perform the steps of: receiving Positive face information from the transmitting terminal, wherein the positive face information includes half of the positive face image of each face image and the difference data of the half face image and the other half face image in the face image in the current image frame of the transmitting terminal Decoding the positive face information by the first decoding method to obtain half positive face images and difference data in each positive face image; obtaining the other half positive face image according to the half positive face image and the difference data, and according to the half positive face image and The other half of the face image gets a positive face image.
  • a program product stored on a non-transitory machine readable medium for image encoding and decoding including the above two program products, is also proposed.
  • a non-volatile machine readable medium storing a program product for image encoding, the program product comprising machine executable instructions for causing a computer system to perform the steps of: determining to be transmitted to Whether there is at least one positive face image in the face image of the current image frame in the video sequence of the receiving terminal; if there is at least one positive face image, each positive face image in the at least one positive face image is along the front face image The mid-perpendicular line of the double-eye line is divided, and the difference data of the half-face image and the other half-face image in the divided positive face image are calculated; and any half-face image in the face image is encoded by the first coding method. The difference data is encoded to obtain positive face information, and the positive face information is transmitted to the receiving terminal.
  • a non-volatile machine readable medium storing a program product for image decoding, the program product comprising machine executable instructions for causing a computer system to: receive from a transmitting terminal Positive face information, wherein the positive face information includes half of the positive face image of each positive face image and the difference data of the half positive face image and the other half of the positive face image in the face image in the current image frame of the transmitting terminal; A decoding method decodes the positive face information to obtain half of the face image and difference data in each face image; and obtains the other half face image according to the half face image and the difference data, and according to the half face image and the other half The face image gets a positive face image.
  • a nonvolatile machine readable medium storing a program product for image encoding and decoding, the program product comprising the above two program products.
  • a machine readable program the program causing a machine to perform the image encoding and decoding method of any of the above aspects.
  • a storage medium storing a machine readable program, wherein the machine readable program causes the machine to perform the image encoding and decoding method of any of the above aspects.
  • the image coding method does not fully consider the information such as the imaging angle of the face, and it is difficult to further reduce the amount of information after the image frame is encoded, and the original image cannot be restored. frame.
  • the technical solution of the present application it is possible to further reduce the bandwidth occupied by the transmission during image transmission, improve the user's experience with image transmission, and enable the image receiving end to restore the original image frame.
  • the terms “first”, “second”, and “third” are used for descriptive purposes only, and are not to be construed as indicating or implying relative importance.
  • the term “plurality” refers to two or more, unless specifically defined otherwise.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明提供了图像编码方法和图像解码方法,以及图像编码、解码方法和系统,以及终端,其中,图像编码方法包括:判断待传输至接收终端的视频序列中,当前图像帧的人脸图像中是否存在至少一个正脸图像;若存在至少一个正脸图像,则将至少一个正脸图像中的每个正脸图像沿正脸图像的双眼连线的中垂线进行分割,并计算分割后的正脸图像中一半正脸图像与另一半正脸图像的差异数据;通过第一编码方式对正脸图像中的任一半正脸图像和差异数据进行编码得到正脸信息,并将正脸信息传输至接收终端。通过本申请的技术方案,能够在进行图像传输过程中,进一步减小传输所占的带宽,提高用户对于图像传输的体验,并且能够使得图像接收端恢复原图像帧。

Description

图像编码、 解码方法和系统以及终端 技术领域
本发明涉及图像处理技术领域, 具体而言, 涉及图像编码方法, 图像解码方法, 图像编 码、 解码方法和系统, 以及终端。 背景技术
视频通信系统在发送端通常需要对待传输的视频序列进行编码来减少所需占用的带宽。 现有技术中通过编码方法来减少视频通信所需占用的带宽主要采用如下两种方式:
一种编码方法是对图像帧的各个部分都采用相同的编码算法 (如 JPEG2000 ) 进行编码。 通过这种编码方法编码后的信息量依然非常大, 仍然无法给用户带来流畅的视频通信体验。
另一种编码方法是区分图像帧中的人脸区域和背景区域, 对人脸区域和背景区域采用不 同的编码算法或者直接丟掉背景信息。
这种编码方法考虑到通信双方 (相比于背景信息) 更加关注对方的面部信息, 对人脸区 域和背景区域采用不同的编码算法或者直接丟掉背景信息, 目的是减少编码后的信息量。 然 而这种编码方法还是存在以下二点不足:
1. 接收端不能恢复原图像帧。 这是因为这种编码方法没有将人脸区域在原图像帧中的位 置和大小 (如对于矩形的人脸区域, 即长和宽) 通过网络通信模块传送给接收端。
2. 对所有的人脸图像使用相同的编码算法编码, 并且也没有为人脸图像给出具体的编码 算法。 事实上, 人脸具有相当复杂的细节变化, 比如眼和嘴可以是开的也可以是闭的; 人脸 可以有或者没有带眼镜。 此外人脸还会依据成像角度、 光照、 图像的成像条件 (如摄像设备 的焦距、 成像距离等) 等的变化而变化。 因此, 使用相同的编码算法来编码所有的人脸 (而 不管其成像角度等信息) 并不高效, 没有充分地考虑人脸的成像角度等信息, 难以进一步降 低图像帧编码后的信息量, 无法给用户带来更加流畅的视频通信体验。 发明内容
本发明正是基于上述问题, 提出了一种图像处理技术, 能够在进行图像传输过程中, 进 一步减小传输所占的带宽, 提高用户对于图像传输的体验, 并且能够使得图像接收端恢复原 图像帧。
有鉴于此, 本发明提出了一种图像编码方法, 包括: 步骤 102, 判断待传输至接收终端 的视频序列中, 当前图像帧的人脸图像中是否存在至少一个正脸图像; 步骤 104, 若存在至 少一个正脸图像, 则将所述至少一个正脸图像中的每个正脸图像沿所述正脸图像的双眼连线 的中垂线进行分割, 并计算分割后的正脸图像中一半正脸图像与另一半正脸图像的差异数 据; 步骤 106, 通过第一编码方式对所述正脸图像中的任一半正脸图像和所述差异数据进行 编码得到正脸信息, 并将所述正脸信息传输至所述接收终端。
在该技术方案中, 图像的编码操作可以由一个发送终端来完成, 发送终端作为图像的发 送和编码终端, 接收终端则作为图像的接收和解码终端, 但是, 本领域技术人员应当理解, 发送终端也可以具有与接收终端相同的接收和解码的功能, 同时, 接收终端也可以具有与发 送终端相同的发送和编码的功能。 以下仅针对发送终端作为图像的发送和编码终端, 且接收 终端作为图像的接收和解码终端的情况进行描述。 发送终端和接收终端可以应用于多种场景, 比如, 发送终端可以是视频通信过程中的视 频发送方, 则接收终端可以是视频通信过程中的视频接收方。 发送终端也可以是监控系统中 的一个图像采集设备, 比如摄像头, 则接收终端可以是该监控系统中的显示器, 用于接收摄 像头采集到的图像。
在发送终端将视频序列 (也可以是图片 ) 传输至接收终端时, 发送终端判断当前图像帧 中是否存在正脸图像, 由于正脸图像沿双眼连线的中垂线进行平分得到的一半图像与另一半 图像 (即左半边脸和右半边脸) 几乎是对称的, 因此在判定当前图像帧中存在正脸图像时, 可以只获取对正脸图像平分后的一半图像, 然后计算一半图像与另一半图像的差异数据, 并 只对这一半图像和差异数据进行编码 (可以通过压缩算法, 如 JPEG2000 对上述一半图像进 行压缩, 然后对差异数据进行压缩) , 而在正常情况下, 人的左半边脸和右半边脸几乎是对 称的, 因此差异数据中包含的信息量非常少 (接近于 0 ) , 因此在传输正脸图像时, 可以只 传输半边脸的图像和一个极小的差异数据, 相当于将图像的压缩率提高了一倍, 很大程度上 降低了图像传输所占用的带宽。
在上述技术方案中, 优选地, 还包括: 通过所述第一编码方式对所述当前图像帧的人脸 图像中非正脸图像进行编码得到非正脸信息, 并通过第二编码方式对所述当前图像帧中非人 脸图像进行编码得到非人脸信息, 将所述非正脸信息和所述非人脸信息传输至所述接收终 端。
在该技术方案中, 通过第一编码方式编码后的图像质量, 要优于采用第二编码方式编码 后的图像质量, 即, 编码后的正脸信息和非正脸信息 (两者均为人脸信息) 的图像质量优于 非人脸信息 (例如背景信息) 的质量。 当然, 在网络条件不好 (比如带宽非常有限) 的情况 下, 可以直接丟弃非人脸信息, 不对其进行编码。 从而使得接收终端能够以较高的还原度还 原正脸信息和非正脸信息, 并且极大地减少了非人脸信息传输过程中所占用的带宽, 使得图 像传输所占用的整体带宽也降低了。
在上述技术方案中, 优选地, 还包括: 通过第一标识对所述正脸信息进行标记, 通过第 二标识对所述非正脸信息进行标记, 通过第三标识对所述非人脸信息进行标记, 将所述第一 标识、 所述第二标识和所述第三标识传输至所述接收终端。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如接收终端可以根据第一标识识别出正脸信 息, 并以与第一编码方式相对应的第一解码方式解码正脸信息, 得到一半正脸图像和相应的 差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 比如差异数据是像素 点的灰度值, 那么就可以根据一半正脸图像的像素点的灰度值与差异数据的差值得出另一半 正脸图像。 同理, 接收终端也可以根据第二标识识别出非正脸信息, 并以第一解码方式解码 非正脸信息得到非正脸图像, 根据第三标识识别出非人脸信息, 并以第二解码方式解码非人 脸信息得到非人脸图像。
在上述技术方案中, 优选地, 还包括: 通过第二编码方式对所述当前图像帧中人脸图像 中非正脸图像, 以及所述当前图像帧中非人脸图像进行编码得到次要信息, 将所述次要信息 传输至所述接收终端。
在该技术方案中, 发送终端也可以根据用户设置仅通过第一编码方式对正脸图像进行编 码, 然后通过第二编码方式对非正脸图像和非人脸图像进行编码 (相当于正脸图像的优先级 高于非正脸图像和非人脸图像的优先级) , 从而使得接收终端可以以较高的还原度还原出正 脸图像, 而以较低的还原度还原出非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 还包括: 通过第一标识对所述正脸信息进行标记, 通过第 二标识对所述非正脸信息和所述非人脸信息进行标记, 将所述第一标识和所述第二标识传输 至所述接收终端。 在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如通过第一解码方式解码正脸信息得到一半正 脸图像和相应的差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 然后 通过第二解码方式解码非正脸信息和非人脸信息, 得到非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 所述步骤 106 还包括: 在所述当前图像帧的人脸图像中不 存在正脸图像时, 通过第一预设编码方式对所述人脸图像进行编码得到人脸信息, 并通过第 二编码方式对所述当前图像帧中的非人脸图像进行编码得到非人脸信息, 将所述人脸信息和 所述非人脸信息传输至所述接收终端。
在该技术方案中, 若发送终端判定当前图像帧中不存在正脸图像, 可以判定当前图像帧 中的所有人脸图像 (其中只包含非正脸图像) 优先级较高, 从而通过第一编码方式对其进行 编码, 以使接收终端能够以较高的还原度还原出人脸图像, 而以较低的还原度还原出非人脸 信息。
在上述技术方案中, 优选地, 还包括: 通过第一标识对所述人脸信息进行标记, 通过第 二标识对所述非人脸信息进行标记, 将所述第一标识和所述第二标识传输至所述接收终端。
在该技术方案中, 接收终端在接收到人脸信息和非人脸信息时, 可以根据不同信息的标 识对不同信息进行区别处理。
在上述技术方案中, 优选地, 还包括: 获取所述人脸图像在所述当前图像帧中的尺寸信 息与位置信息, 并将所述位置信息与所述尺寸信息传输至所述接收终端。
在该技术方案中, 发送终端还可以获取人脸图像在当前图像帧中的尺寸信息和位置信 息, 从而在将编码后的图像发送至接收终端的同时, 将其中人脸图像的尺寸信息和位置信息 也发送至接收终端, 使得接收终端可以根据接收到的尺寸信息和位置信息准确地确定人脸图 像在图像帧中的尺寸和位置, 从而准确地还原发送终端发送的原图像帧。
在上述技术方案中, 优选地, 还包括: 判断所述当前图像帧的下一图像帧中的人脸图像 是否按照预设方式进行了移动, 若按照所述预设方式进行了移动, 则根据所述预设方式生成 相应的移动指令, 并将所述移动指令传输至所述接收终端, 以使所述接收终端以所述预设方 式移动所述接收终端的当前图像帧中的人脸图像, 并将移动后的所述接收终端的当前图像帧 作为所述接收终端的下一图像帧。
在该技术方案中, 若当前图像帧的下一图像帧中的人脸图像相对于当前图像帧中的人脸 图像只是按照预设方式进行了移动, 比如视频通信过程中, 视频发送端的用户的头像仅发生 了水平移动 (比如水平靠近摄像头, 或水平远离摄像头) , 或者在竖直方向上发生移动, 或 者在原垂直平面内发生了转动, 那么发送终端可以针对每种移动方式生成相应的指令, 比如 针对水平移动可以生成水平移动指令, 使得接收终端中的人脸图像也发送相应的水平移动, 而无需发送终端将下一图像帧传输至接收终端, 在不影响用户体验的情况下, 有效地降低了 数据传输量。
本申请还提出了一种图像解码方法, 包括: 步骤 202, 接收来自发送终端的正脸信息, 其中, 所述正脸信息包含所述发送终端的当前图像帧中的人脸图像中每个正脸图像的一半正 脸图像和所述一半正脸图像与另一半正脸图像的差异数据; 步骤 204, 通过第一解码方式对 所述正脸信息进行解码, 得到所述每个正脸图像中一半正脸图像和所述差异数据; 步骤 206 , 根据所述一半正脸图像和所述差异数据得到所述另一半正脸图像, 并根据所述一半正脸 图像和所述另一半正脸图像得到所述正脸图像。
在该技术方案中, 接收终端在接收到发送终端发送正脸信息后, 可以通过第一解码方式 (与第一编码方式相对应) 来解码正脸信息, 得到发送终端所传输的图像帧中正脸图像的一 半正脸图像和差异数据, 进而根据一半正脸图像和差异数据计算出另一半正脸图像, 比如差 异数据是一半正脸图像和另一半正脸图像的像素点灰度值差值, 那么可以根据上述一半正脸 图像的像素点灰度值与差异数据的差值得到另一半正脸图像, 最后将一半正脸图像和另一半 正脸图像合并, 得到一张完整的正脸图像。 从而保证了图像帧的还原度, 并且由于只需发送 终端传输一半正脸图像的数据和极小的差异数据, 降低了图像帧在传输过程中所占用的带 宽。
在上述技术方案中, 优选地, 还包括: 接收来自所述发送终端的非正脸信息和非人脸信 息, 通过第一解码方式对所述非正脸信息进行解码得到所述当前图像帧的人脸图像中的非正 脸图像, 通过第二解码方式对所述非人脸信息进行解码得到所述当前图像帧中的非人脸图 像。
在该技术方案中, 接收终端在接收到发送终端的正脸信息后, 还可以从发送终端接收非 正脸信息和非人脸信息, 然后通过第一解码方式解码正脸信息和非正脸信息, 通过第二解码 方式 (与第二编码方式相对应) 解码非人脸信息, 其中, 发送终端通过第一编码方式得到的 正脸信息和非正脸信息的图像质量, 要高于通过第二编码方式得到的非人脸信息的图像质 量, 从而接收终端可以以较高的还原度还原正脸图像和非正脸图像, 并以较低的还原度还原 非人脸图像。
在上述技术方案中, 优选地, 还包括: 根据来自所述发送终端的第一标识确定所述正脸 信息, 根据来自所述发送终端的第二标识确定所述非正脸信息和所述非人脸信息。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如接收终端可以根据第一标识识别出正脸信 息, 并以与第一编码方式相对应的第一解码方式解码正脸信息, 得到一半正脸图像和相应的 差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 比如差异数据是像素 点灰度值, 那么就可以根据一半正脸图像的像素点灰度值与差异数据的差值得出另一半正脸 图像。 同理, 接收终端也可以根据第二标识识别出非正脸信息, 并以第一解码方式解码非正 脸信息得到非正脸图像, 根据第三标识识别出非人脸信息, 并以第二解码方式解码非人脸信 息得到非人脸图像。
在上述技术方案中, 优选地, 还包括: 接收来自所述发送终端的非正脸信息和非人脸信 息, 通过第二解码方式对所述非正脸信息和所述非人脸信息进行解码, 得到所述当前图像帧 的人脸图像中的非正脸图像以及所述当前图像帧中的非人脸图像。
在该技术方案中, 发送终端也可以根据用户设置仅通过第一编码方式对正脸图像进行编 码, 然后通过第二编码方式对非正脸图像和非人脸图像进行编码 (相当于正脸图像的优先级 高于非正脸图像和非人脸图像的优先级) , 从而使得接收终端可以以较高的还原度还原出正 脸图像, 而以较低的还原度还原出非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 还包括: 根据来自所述发送终端的第一标识确定所述正脸 信息, 根据来自所述发送终端的第二标识确定所述非正脸信息和所述非人脸信息。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如通过第一解码方式解码正脸信息得到一半正 脸图像和相应的差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 然后 通过第二解码方式解码非正脸信息和非人脸信息, 得到非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 还包括: 接收来自所述发送终端的所述人脸图像的尺寸信 息与位置信息, 并根据所述尺寸信息和所述位置信息确定所述人脸图像在所述当前图像帧中 的尺寸与位置。
在该技术方案中, 发送终端还可以获取人脸图像在当前图像帧中的尺寸信息和位置信 息, 从而在将编码后的图像发送至接收终端的同时, 将其中人脸图像的尺寸信息和位置信息 也发送至接收终端, 使得接收终端可以根据接收到的尺寸信息和位置信息准确地确定人脸图 像在图像帧中的尺寸和位置, 从而准确地还原发送终端发送的原图像帧。 在上述技术方案中, 优选地, 还包括: 接收来自所述发送终端的移动指令, 并根据所述 移动指令对应的预设方式移动所述当前图像帧中的人脸图像, 并将移动后的所述当前图像帧 作为所述当前图像帧的下一图像帧。
在该技术方案中, 若当前图像帧的下一图像帧中的人脸图像相对于当前图像帧中的人脸 图像只是按照预设方式进行了移动, 比如视频通信过程中, 视频发送端的用户的头像仅发生 了水平移动 (比如水平靠近摄像头, 或水平远离摄像头) , 或者在竖直方向上发生移动, 或 者在原垂直平面内发生了转动, 那么发送终端可以针对每种移动方式生成相应的指令, 比如 针对水平移动可以生成水平移动指令, 使得接收终端中的人脸图像也发送相应的水平移动, 而无需发送终端将下一图像帧传输至接收终端, 在不影响用户体验的情况下, 有效地降低了 数据传输量。
本申请还提出了一种图像编码、 解码方法, 包括上述任一项所述的图像编码方法和图像 解码方法。
本申请还提出了一种终端, 包括: 判断单元, 用于判断待传输至接收终端的视频序列 中, 当前图像帧的人脸图像中是否存在至少一个正脸图像; 差异计算单元, 用于在所述判断 单元判定存在至少一个正脸图像时, 将所述至少一个正脸图像中的每个正脸图像沿所述正脸 图像的双眼连线的中垂线进行分割, 并计算分割后的正脸图像中一半正脸图像与另一半正脸 图像的差异数据; 编码单元, 用于通过第一编码方式对所述正脸图像中的任一半正脸图像和 所述差异数据进行编码得到正脸信息; 传输单元, 用于将所述正脸信息传输至所述接收终 端。
在该技术方案中, 终端可以是用于图像的发送和编码的发送终端 (为与接收终端区分, 以下将该终端称为发送终端) , 接收终端则作为图像的接收和解码终端, 但是, 本领域技术 人员应当理解, 发送终端也可以具有与接收终端相同的接收和解码的功能, 同时, 接收终端 也可以具有与发送终端相同的发送和编码的功能。 以下仅针对发送终端作为图像的发送和编 码终端, 且接收终端作为图像的接收和解码终端的情况进行描述。
发送终端和接收终端可以应用于多种场景, 比如, 发送终端可以是视频通信过程中的视 频发送方, 则接收终端可以是视频通信过程中的视频接收方。 发送终端也可以是监控系统中 的一个图像采集设备, 比如摄像头, 则接收终端可以是该监控系统中的显示器, 用于接收摄 像头采集到的图像。
在发送终端将视频序列 (也可以是图片 ) 传输至接收终端时, 发送终端判断当前图像帧 中是否存在正脸图像, 由于正脸图像沿双眼连线的中垂线进行平分得到的一半图像与另一半 图像 (即左半边脸和右半边脸) 几乎是对称的, 因此在判定当前图像帧中存在正脸图像时, 可以只获取对正脸图像平分后的一半图像, 然后计算一半图像与另一半图像的差异数据, 并 只对这一半图像和差异数据进行编码 (可以通过压缩算法, 如 JPEG2000 对上述一半图像进 行压缩, 然后对差异数据进行压缩) , 而在正常情况下, 人的左半边脸和右半边脸几乎是对 称的, 因此差异数据中包含的信息量非常少 (接近于 0 ) , 因此在传输正脸图像时, 可以只 传输半边脸的图像和一个极小的差异数据, 相当于将图像的压缩率提高了一倍, 很大程度上 降低了图像传输所占用的带宽。
在上述技术方案中, 优选地, 所述编码单元还用于通过所述第一编码方式对所述当前图 像帧的人脸图像中非正脸图像进行编码得到非正脸信息, 并通过第二编码方式对所述当前图 像帧中非人脸图像进行编码得到非人脸信息; 所述传输单元还用于将所述非正脸信息和所述 非人脸信息传输至所述接收终端。
在该技术方案中, 通过第一编码方式编码后的图像质量, 要优于采用第二编码方式编码 后的图像质量, 即, 编码后的正脸信息和非正脸信息 (两者均为人脸信息) 的图像质量优于 非人脸信息 (例如背景信息) 的质量。 当然, 在网络条件不好 (比如带宽非常有限) 的情况 下, 可以直接丟弃非人脸信息, 不对其进行编码。 从而使得接收终端能够以较高的还原度还 原正脸信息和非正脸信息, 并且极大地减少了非人脸信息传输过程中所占用的带宽, 使得图 像传输所占用的整体带宽也降低了。
在上述技术方案中, 优选地, 还包括: 标记单元, 用于通过第一标识对所述正脸信息进 行标记, 通过第二标识对所述非正脸信息进行标记, 通过第三标识对所述非人脸信息进行标 记, 其中, 所述传输单元还用于将将所述第一标识、 所述第二标识和所述第三标识传输至所 述接收终端。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如接收终端可以根据第一标识识别出正脸信 息, 并以与第一编码方式相对应的第一解码方式解码正脸信息, 得到一半正脸图像和相应的 差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 比如差异数据是像素 点灰度值, 那么就可以根据一半正脸图像的像素点灰度值与差异数据的差值得出另一半正脸 图像。 同理, 接收终端也可以根据第二标识识别出非正脸信息, 并以第一解码方式解码非正 脸信息得到非正脸图像, 根据第三标识识别出非人脸信息, 并以第二解码方式解码非人脸信 息得到非人脸图像。
在上述技术方案中, 优选地, 所述编码单元还用于通过第二编码方式对所述当前图像帧 中人脸图像中非正脸图像, 以及所述当前图像帧中非人脸图像进行编码得到次要信息; 所述 传输单元还用于将所述次要信息传输至所述接收终端。
在该技术方案中, 发送终端也可以根据用户设置仅通过第一编码方式对正脸图像进行编 码, 然后通过第二编码方式对非正脸图像和非人脸图像进行编码 (相当于正脸图像的优先级 高于非正脸图像和非人脸图像的优先级) , 从而使得接收终端可以以较高的还原度还原出正 脸图像, 而以较低的还原度还原出非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 还包括: 标记单元, 用于通过第一标识对所述正脸信息进 行标记, 通过第二标识对所述非正脸信息进行标记和所述非人脸信息进行标记, 其中, 所述 传输单元还用于将所述第一标识和所述第二标识传输至所述接收终端。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如通过第一解码方式解码正脸信息得到一半正 脸图像和相应的差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 然后 通过第二解码方式解码非正脸信息和非人脸信息, 得到非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 所述编码单元还用于在所述判断单元判定所述当前图像帧 的人脸图像中不存在正脸图像时, 通过第一预设编码方式对所述人脸图像进行编码得到人脸 信息, 并通过第二编码方式对所述当前图像帧中的非人脸图像进行编码得到非人脸信息; 所 述传输单元还用于将所述人脸信息和所述非人脸信息传输至所述接收终端。
在该技术方案中, 若发送终端判定当前图像帧中不存在正脸图像, 可以判定当前图像帧 中的所有人脸图像 (其中只包含非正脸图像) 优先级较高, 从而通过第一编码方式对其进行 编码, 以使接收终端能够以较高的还原度还原出人脸图像, 而以较低的还原度还原出非人脸 信息。
在上述技术方案中, 优选地, 还包括: 标记单元, 用于通过第一标识对所述人脸信息进 行标记, 通过第二标识对所述非人脸信息进行标记, 其中, 所述传输单元还用于将所述第一 标识和所述第二标识传输至所述接收终端。
在该技术方案中, 接收终端在接收到人脸信息和非人脸信息时, 可以根据不同信息的标 识对不同信息进行区别处理。
在上述技术方案中, 优选地, 还包括: 获取单元, 用于获取所述人脸图像在所述当前图 像帧中的尺寸信息与位置信息, 其中, 所述传输单元还用于将所述位置信息与所述尺寸信息 传输至所述接收终端。
在该技术方案中, 发送终端还可以获取人脸图像在当前图像帧中的尺寸信息和位置信 息, 从而在将编码后的图像发送至接收终端的同时, 将其中人脸图像的尺寸信息和位置信息 也发送至接收终端, 使得接收终端可以根据接收到的尺寸信息和位置信息准确地确定人脸图 像在图像帧中的尺寸和位置, 从而准确地还原发送终端发送的原图像帧。
在上述技术方案中, 优选地, 还包括: 指令生成单元, 其中, 所述判断单元还用于判断 所述当前图像帧的下一图像帧中的人脸图像是否按照预设方式进行了移动; 所述指令生成单 元在所述判断单元判定按照所述预设方式进行了移动, 根据所述预设方式生成相应的移动指 令; 所述传输单元还用于将所述移动指令传输至所述接收终端, 以使所述接收终端以所述预 设方式移动所述接收终端的当前图像帧中的人脸图像, 并将移动后的所述接收终端的当前图 像帧作为所述接收终端的下一图像帧。
在该技术方案中, 若当前图像帧的下一图像帧中的人脸图像相对于当前图像帧中的人脸 图像只是按照预设方式进行了移动, 比如视频通信过程中, 视频发送端的用户的头像仅发生 了水平移动 (比如水平靠近摄像头, 或水平远离摄像头) , 或者在竖直方向上发生移动, 或 者在原垂直平面内发生了转动, 那么发送终端可以针对每种移动方式生成相应的指令, 比如 针对水平移动可以生成水平移动指令, 使得接收终端中的人脸图像也发送相应的水平移动, 而无需发送终端将下一图像帧传输至接收终端, 在不影响用户体验的情况下, 有效地降低了 数据传输量。
本申请还提出了一种终端, 包括: 接收单元, 用于接收来自发送终端的正脸信息, 其 中, 所述正脸信息包含所述发送终端的当前图像帧中的人脸图像中每个正脸图像的一半正脸 图像和所述一半正脸图像与另一半正脸图像的差异数据; 解码单元, 用于通过第一解码方式 对所述正脸信息进行解码, 得到所述每个正脸图像中一半正脸图像和所述差异数据; 图像处 理单元, 用于所述一半正脸图像和所述差异数据得到所述另一半正脸图像, 并根据所述一半 正脸图像和所述另一半正脸图像得到所述正脸图像。
在该技术方案中, 终端 (为与发送终端区分, 以下将该终端称为接收终端) 可以用于接 收发送终端的信息, 并进行解码得到相应的图像, 接收终端在接收到发送终端发送正脸信息 后, 可以通过第一解码方式 (与第一编码方式相对应) 来解码正脸信息, 得到发送终端所传 输的图像帧中正脸图像的一半正脸图像和差异数据, 进而根据一半正脸图像和差异数据计算 出另一半正脸图像, 比如差异数据是一半正脸图像和另一半正脸图像的像素点灰度值差值, 那么可以根据上述一半正脸图像的像素点灰度值与差异数据的差值得到另一半正脸图像, 最 后将一半正脸图像和另一半正脸图像合并, 得到一张完整的正脸图像。 从而保证了图像帧的 还原度, 并且由于只需发送终端传输一半正脸图像的数据和极小的差异数据, 降低了图像帧 在传输过程中所占用的带宽。
在上述技术方案中, 优选地, 所述接收单元用于接收来自所述发送终端的非正脸信息和 非人脸信息; 所述解码单元用于通过第一解码方式对所述非正脸信息进行解码得到所述当前 图像帧的人脸图像中的非正脸图像, 通过第二解码方式对所述非人脸信息进行解码得到所述 当前图像帧中的非人脸图像。
在该技术方案中, 接收终端在接收到发送终端的正脸信息后, 还可以从发送终端接收非 正脸信息和非人脸信息, 然后通过第一解码方式解码正脸信息和非正脸信息, 通过第二解码 方式 (与第二编码方式相对应) 解码非人脸信息, 其中, 发送终端通过第一编码方式得到的 正脸信息和非正脸信息的图像质量, 要高于通过第二编码方式得到的非人脸信息的图像质 量, 从而接收终端可以以较高的还原度还原正脸图像和非正脸图像, 并以较低的还原度还原 非人脸图像。
在上述技术方案中, 优选地, 还包括: 标识识别单元, 用于根据来自所述发送终端的第 一标识确定所述正脸信息, 根据来自所述发送终端的第二标识确定所述非正脸信息和所述非 人脸信息。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如接收终端可以根据第一标识识别出正脸信 息, 并以与第一编码方式相对应的第一解码方式解码正脸信息, 得到一半正脸图像和相应的 差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 比如差异数据是像素 点灰度值, 那么就可以根据一半正脸图像的像素点灰度值与差异数据的差值得出另一半正脸 图像。 同理, 接收终端也可以根据第二标识识别出非正脸信息, 并以第一解码方式解码非正 脸信息得到非正脸图像, 根据第三标识识别出非人脸信息, 并以第二解码方式解码非人脸信 息得到非人脸图像。
在上述技术方案中, 优选地, 所述接收单元用于接收来自所述发送终端的非正脸信息和 非人脸信息; 所述解码单元用于通过第二解码方式对所述非正脸信息和所述非人脸信息进行 解码, 得到所述当前图像帧的人脸图像中的非正脸图像以及所述当前图像帧中的非人脸图 像。
在该技术方案中, 发送终端也可以根据用户设置仅通过第一编码方式对正脸图像进行编 码, 然后通过第二编码方式对非正脸图像和非人脸图像进行编码 (相当于正脸图像的优先级 高于非正脸图像和非人脸图像的优先级) , 从而使得接收终端可以以较高的还原度还原出正 脸图像, 而以较低的还原度还原出非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 还包括: 标识识别单元, 用于根据来自所述发送终端的第 一标识确定所述正脸信息, 根据来自所述发送终端的第二标识确定所述非正脸信息和所述非 人脸信息。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如通过第一解码方式解码正脸信息得到一半正 脸图像和相应的差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 然后 通过第二解码方式解码非正脸信息和非人脸信息, 得到非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 还包括: 位置确定单元, 其中, 所述接收单元还用于接收 来自所述发送终端的所述人脸图像的尺寸信息与位置信息, 所述位置确定单元用于根据所述 尺寸信息和所述位置信息确定所述人脸图像在所述当前图像帧中的尺寸与位置。
在该技术方案中, 发送终端还可以获取人脸图像在当前图像帧中的尺寸信息和位置信 息, 从而在将编码后的图像发送至接收终端的同时, 将其中人脸图像的尺寸信息和位置信息 也发送至接收终端, 使得接收终端可以根据接收到的尺寸信息和位置信息准确地确定人脸图 像在图像帧中的尺寸和位置, 从而准确地还原发送终端发送的原图像帧。
在上述技术方案中, 优选地, 还包括: 图像帧确定单元, 其中, 所述接收单元还用于接 收来自所述发送终端的移动指令, 所述图像帧确定单元用于根据所述移动指令对应的预设方 式移动所述当前图像帧中的人脸图像, 并将移动后的所述当前图像帧作为所述当前图像帧的 下一图像帧。
在该技术方案中, 若当前图像帧的下一图像帧中的人脸图像相对于当前图像帧中的人脸 图像只是按照预设方式进行了移动, 比如视频通信过程中, 视频发送端的用户的头像仅发生 了水平移动 (比如水平靠近摄像头, 或水平远离摄像头) , 或者在竖直方向上发生移动, 或 者在原垂直平面内发生了转动, 那么发送终端可以针对每种移动方式生成相应的指令, 比如 针对水平移动可以生成水平移动指令, 使得接收终端中的人脸图像也发送相应的水平移动, 而无需发送终端将下一图像帧传输至接收终端, 在不影响用户体验的情况下, 有效地降低了 数据传输量。
本申请还提出了一种图像编码、 解码系统, 包括上述任一项所述的两种终端。 根据本发明的实施方式, 还提供了一种存储在非易失性机器可读介质上的程序产品, 用 于图像编码, 所述程序产品包括用于使计算机系统执行以下步骤的机器可执行指令: 判断待 传输至接收终端的视频序列中, 当前图像帧的人脸图像中是否存在至少一个正脸图像; 若存 在至少一个正脸图像, 则将所述至少一个正脸图像中的每个正脸图像沿所述正脸图像的双眼 连线的中垂线进行分割, 并计算分割后的正脸图像中一半正脸图像与另一半正脸图像的差异 数据; 通过第一编码方式对所述正脸图像中的任一半正脸图像和所述差异数据进行编码得到 正脸信息, 并将所述正脸信息传输至所述接收终端。
根据本发明的实施方式, 还提出了一种存储在非易失性机器可读介质上的程序产品, 用 于图像解码, 所述程序产品包括用于使计算机系统执行以下步骤的机器可执行指令: 接收来 自发送终端的正脸信息, 其中, 所述正脸信息包含所述发送终端的当前图像帧中的人脸图像 中每个正脸图像的一半正脸图像和所述一半正脸图像与另一半正脸图像的差异数据; 通过第 一解码方式对所述正脸信息进行解码, 得到所述每个正脸图像中一半正脸图像和所述差异数 据; 根据所述一半正脸图像和所述差异数据得到所述另一半正脸图像, 并根据所述一半正脸 图像和所述另一半正脸图像得到所述正脸图像。
根据本发明的实施方式, 还提出了一种存储在非易失性机器可读介质上的程序产品, 用 于图像编码、 解码, 包括上述两种程序产品。
根据本发明的实施方式, 还提供了一种非易失机器可读介质, 存储有用于图像编码的程 序产品, 所述程序产品包括用于使计算机系统执行以下步骤的机器可执行指令: 判断待传输 至接收终端的视频序列中, 当前图像帧的人脸图像中是否存在至少一个正脸图像; 若存在至 少一个正脸图像, 则将所述至少一个正脸图像中的每个正脸图像沿所述正脸图像的双眼连线 的中垂线进行分割, 并计算分割后的正脸图像中一半正脸图像与另一半正脸图像的差异数 据; 通过第一编码方式对所述正脸图像中的任一半正脸图像和所述差异数据进行编码得到正 脸信息, 并将所述正脸信息传输至所述接收终端。
根据本发明的实施方式, 还提供了一种非易失机器可读介质, 存储有用于图像解码的程 序产品, 所述程序产品包括用于使计算机系统执行以下步骤的机器可执行指令: 接收来自发 送终端的正脸信息, 其中, 所述正脸信息包含所述发送终端的当前图像帧中的人脸图像中每 个正脸图像的一半正脸图像和所述一半正脸图像与另一半正脸图像的差异数据; 通过第一解 码方式对所述正脸信息进行解码, 得到所述每个正脸图像中一半正脸图像和所述差异数据; 根据所述一半正脸图像和所述差异数据得到所述另一半正脸图像, 并根据所述一半正脸图像 和所述另一半正脸图像得到所述正脸图像。
根据本发明的实施方式, 还提供了一种非易失机器可读介质, 存储有用于图像编码、 解 码的程序产品, 所述程序产品包括上述两种程序产品。
根据本发明的实施方式, 还提供了一种机器可读程序, 所述程序使机器执行如上所述技 术方案中任一所述的图像编码、 解码方法。
根据本发明的实施方式, 还提供了一种存储有机器可读程序的存储介质, 其中, 所述机 器可读程序使得机器执行如上所述技术方案中任一所述的图像编码、 解码方法。
通过以上技术方案, 可以在进行图像传输过程中, 进一步减小传输所占的带宽, 提高用 户对于图像传输的体验, 并且能够使得图像接收端恢复原图像帧。 附图说明
图 1示出了根据本发明的实施例的图像编码方法的示意流程图;
图 2示出了根据本发明的实施例的图像解码方法的示意流程图;
图 3示出了根据本发明的一个实施例的终端的示意框图;
图 4示出了根据本发明的另一个实施例的终端的示意框图; 图 5示出了根据本发明的实施例的图像编码方法的具体示意流程图;
图 6示出了根据本发明的实施例的图像解码方法的具体示意流程图。 具体实施方式
为了能够更清楚地理解本发明的上述目的、 特征和优点, 下面结合附图和具体实施方式 对本发明进行进一步的详细描述。 需要说明的是, 在不冲突的情况下, 本申请的实施例及实 施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本发明, 但是, 本发明还可以采用 其他不同于在此描述的其他方式来实施, 因此, 本发明的保护范围并不受下面公开的具体实 施例的限制。
图 1示出了根据本发明的实施例的图像编码方法的示意流程图。
如图 1 所示, 根据本发明的实施例的图像编码方法包括: 步骤 102, 判断待传输至接收 终端的视频序列中, 当前图像帧的人脸图像中是否存在至少一个正脸图像; 步骤 104, 若存 在至少一个正脸图像, 则将至少一个正脸图像中的每个正脸图像沿正脸图像的双眼连线的中 垂线进行分割, 并计算分割后的正脸图像中一半正脸图像与另一半正脸图像的差异数据; 步 骤 106, 通过第一编码方式对正脸图像中的任一半正脸图像和差异数据进行编码得到正脸信 息, 并将正脸信息传输至接收终端。
在该技术方案中, 图像的编码操作可以由一个发送终端来完成, 发送终端作为图像的发 送和编码终端, 接收终端则作为图像的接收和解码终端, 但是, 本领域技术人员应当理解, 发送终端也可以具有与接收终端相同的接收和解码的功能, 同时, 接收终端也可以具有与发 送终端相同的发送和编码的功能。 以下仅针对发送终端作为图像的发送和编码终端, 且接收 终端作为图像的接收和解码终端的情况进行描述。
发送终端和接收终端可以应用于多种场景, 比如, 发送终端可以是视频通信过程中的视 频发送方, 则接收终端可以是视频通信过程中的视频接收方。 发送终端也可以是监控系统中 的一个图像采集设备, 比如摄像头, 则接收终端可以是该监控系统中的显示器, 用于接收摄 像头采集到的图像。
在发送终端将视频序列 (也可以是图片 ) 传输至接收终端时, 发送终端判断当前图像帧 中是否存在正脸图像, 由于正脸图像沿双眼连线的中垂线进行平分得到的一半图像与另一半 图像 (即左半边脸和右半边脸) 几乎是对称的, 因此在判定当前图像帧中存在正脸图像时, 可以只获取对正脸图像平分后的一半图像, 然后计算一半图像与另一半图像的差异数据, 并 只对这一半图像和差异数据进行编码 (可以通过压缩算法, 如 JPEG2000 对上述一半图像进 行压缩, 然后对差异数据进行压缩) , 而在正常情况下, 人的左半边脸和右半边脸几乎是对 称的, 因此差异数据中包含的信息量非常少 (接近于 0 ) , 因此在传输正脸图像时, 可以只 传输半边脸的图像和一个极小的差异数据, 相当于将图像的压缩率提高了一倍, 很大程度上 降低了图像传输所占用的带宽。
在上述技术方案中, 优选地, 还包括: 通过第一编码方式对当前图像帧的人脸图像中非 正脸图像进行编码得到非正脸信息, 并通过第二编码方式对当前图像帧中非人脸图像进行编 码得到非人脸信息, 将非正脸信息和非人脸信息传输至接收终端。
在该技术方案中, 通过第一编码方式编码后的图像质量, 要优于采用第二编码方式编码 后的图像质量, 即, 编码后的正脸信息和非正脸信息 (两者均为人脸信息) 的图像质量优于 非人脸信息 (例如背景信息) 的质量。 当然, 在网络条件不好 (比如带宽非常有限) 的情况 下, 可以直接丟弃非人脸信息, 不对其进行编码。 从而使得接收终端能够以较高的还原度还 原正脸信息和非正脸信息, 并且极大地减少了非人脸信息传输过程中所占用的带宽, 使得图 像传输所占用的整体带宽也降低了。 在上述技术方案中, 优选地, 还包括: 通过第一标识对正脸信息进行标记, 通过第二标 识对非正脸信息进行标记, 通过第三标识对非人脸信息进行标记, 将第一标识、 第二标识和 第三标识传输至接收终端。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如接收终端可以根据第一标识识别出正脸信 息, 并以与第一编码方式相对应的第一解码方式解码正脸信息, 得到一半正脸图像和相应的 差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 比如差异数据是像素 点灰度值, 那么就可以根据一半正脸图像的像素点灰度值与差异数据的差值得出另一半正脸 图像。 同理, 接收终端也可以根据第二标识识别出非正脸信息, 并以第一解码方式解码非正 脸信息得到非正脸图像, 根据第三标识识别出非人脸信息, 并以第二解码方式解码非人脸信 息得到非人脸图像。
在上述技术方案中, 优选地, 还包括: 通过第二编码方式对当前图像帧中人脸图像中非 正脸图像, 以及当前图像帧中非人脸图像进行编码得到次要信息, 将次要信息传输至接收终 端。
在该技术方案中, 发送终端也可以根据用户设置仅通过第一编码方式对正脸图像进行编 码, 然后通过第二编码方式对非正脸图像和非人脸图像进行编码 (相当于正脸图像的优先级 高于非正脸图像和非人脸图像的优先级) , 从而使得接收终端可以以较高的还原度还原出正 脸图像, 而以较低的还原度还原出非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 还包括: 通过第一标识对正脸信息进行标记, 通过第二标 识对非正脸信息和非人脸信息进行标记, 将第一标识和第二标识传输至接收终端。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如通过第一解码方式解码正脸信息得到一半正 脸图像和相应的差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 然后 通过第二解码方式解码非正脸信息和非人脸信息, 得到非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 步骤 106 还包括: 在当前图像帧的人脸图像中不存在正脸 图像时, 通过第一预设编码方式对人脸图像进行编码得到人脸信息, 并通过第二编码方式对 当前图像帧中的非人脸图像进行编码得到非人脸信息, 将人脸信息和非人脸信息传输至接收 终端。
在该技术方案中, 若发送终端判定当前图像帧中不存在正脸图像, 可以判定当前图像帧 中的所有人脸图像 (其中只包含非正脸图像) 优先级较高, 从而通过第一编码方式对其进行 编码, 以使接收终端能够以较高的还原度还原出人脸图像, 而以较低的还原度还原出非人脸 信息。
在上述技术方案中, 优选地, 还包括: 通过第一标识对人脸信息进行标记, 通过第二标 识对非人脸信息进行标记, 将第一标识和第二标识传输至接收终端。
在该技术方案中, 接收终端在接收到人脸信息和非人脸信息时, 可以根据不同信息的标 识对不同信息进行区别处理。 其中, 标识可以是 01 比特序列, 比如通过 00标记正脸, 通过 01代表非正脸, 通过 10标记非人脸。
在上述技术方案中, 优选地, 还包括: 获取人脸图像在当前图像帧中的尺寸信息与位置 信息, 并将位置信息与尺寸信息传输至接收终端。
在该技术方案中, 发送终端还可以获取人脸图像在当前图像帧中的尺寸信息和位置信 息, 从而在将编码后的图像发送至接收终端的同时, 将其中人脸图像的尺寸信息和位置信息 也发送至接收终端, 使得接收终端可以根据接收到的尺寸信息和位置信息准确地确定人脸图 像在图像帧中的尺寸和位置, 从而准确地还原发送终端发送的原图像帧。
在上述技术方案中, 优选地, 还包括: 判断当前图像帧的下一图像帧中的人脸图像是否 按照预设方式进行了移动, 若按照预设方式进行了移动, 则根据预设方式生成相应的移动指 令, 并将移动指令传输至接收终端, 以使接收终端以预设方式移动接收终端的当前图像帧中 的人脸图像, 并将移动后的接收终端的当前图像帧作为接收终端的下一图像帧。
在该技术方案中, 若当前图像帧的下一图像帧中的人脸图像相对于当前图像帧中的人脸 图像只是按照预设方式进行了移动, 比如视频通信过程中, 视频发送端的用户的头像仅发生 了水平移动 (比如水平靠近摄像头, 或水平远离摄像头) , 或者在竖直方向上发生移动, 或 者在原垂直平面内发生了转动, 那么发送终端可以针对每种移动方式生成相应的指令, 比如 针对水平移动可以生成水平移动指令, 使得接收终端中的人脸图像也发送相应的水平移动, 而无需发送终端将下一图像帧传输至接收终端, 在不影响用户体验的情况下, 有效地降低了 数据传输量。
图 2示出了根据本发明的实施例的图像解码方法的示意流程图。
如图 2 所示, 根据本发明的实施例的图像解码方法包括: 步骤 202, 接收来自发送终端 的正脸信息, 其中, 正脸信息包含发送终端的当前图像帧中的人脸图像中每个正脸图像的一 半正脸图像和一半正脸图像与另一半正脸图像的差异数据; 步骤 204, 通过第一解码方式对 正脸信息进行解码, 得到每个正脸图像中一半正脸图像和差异数据; 步骤 206, 根据一半正 脸图像和差异数据得到另一半正脸图像, 并根据一半正脸图像和另一半正脸图像得到正脸图 像。
在该技术方案中, 接收终端在接收到发送终端发送正脸信息后, 可以通过第一解码方式 (与第一编码方式相对应) 来解码正脸信息, 得到发送终端所传输的图像帧中正脸图像的一 半正脸图像和差异数据, 进而根据一半正脸图像和差异数据计算出另一半正脸图像, 比如差 异数据是一半正脸图像和另一半正脸图像的像素点灰度值差值, 那么可以根据上述一半正脸 图像的像素点灰度值与差异数据的差值得到另一半正脸图像, 最后将一半正脸图像和另一半 正脸图像合并, 得到一张完整的正脸图像。 从而保证了图像帧的还原度, 并且由于只需发送 终端传输一半正脸图像的数据和极小的差异数据, 降低了图像帧在传输过程中所占用的带宽。
在上述技术方案中, 优选地, 还包括: 接收来自发送终端的非正脸信息和非人脸信息, 通过第一解码方式对非正脸信息进行解码得到当前图像帧的人脸图像中的非正脸图像, 通过 第二解码方式对非人脸信息进行解码得到当前图像帧中的非人脸图像。
在该技术方案中, 接收终端在接收到发送终端的正脸信息后, 还可以从发送终端接收非 正脸信息和非人脸信息, 然后通过第一解码方式解码正脸信息和非正脸信息, 通过第二解码 方式 (与第二编码方式相对应) 解码非人脸信息, 其中, 发送终端通过第一编码方式得到的 正脸信息和非正脸信息的图像质量, 要高于通过第二编码方式得到的非人脸信息的图像质 量, 从而接收终端可以以较高的还原度还原正脸图像和非正脸图像, 并以较低的还原度还原 非人脸图像。
在上述技术方案中, 优选地, 还包括: 根据来自发送终端的第一标识确定正脸信息, 根 据来自发送终端的第二标识确定非正脸信息和非人脸信息。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如接收终端可以根据第一标识识别出正脸信 息, 并以与第一编码方式相对应的第一解码方式解码正脸信息, 得到一半正脸图像和相应的 差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 比如差异数据是像素 点灰度值, 那么就可以根据一半正脸图像的像素点灰度值与差异数据的差值得出另一半正脸 图像。 同理, 接收终端也可以根据第二标识识别出非正脸信息, 并以第一解码方式解码非正 脸信息得到非正脸图像, 根据第三标识识别出非人脸信息, 并以第二解码方式解码非人脸信 息得到非人脸图像。
在上述技术方案中, 优选地, 还包括: 接收来自发送终端的非正脸信息和非人脸信息, 通过第二解码方式对非正脸信息和非人脸信息进行解码, 得到当前图像帧的人脸图像中的非 正脸图像以及当前图像帧中的非人脸图像。
在该技术方案中, 发送终端也可以根据用户设置仅通过第一编码方式对正脸图像进行编 码, 然后通过第二编码方式对非正脸图像和非人脸图像进行编码 (相当于正脸图像的优先级 高于非正脸图像和非人脸图像的优先级) , 从而使得接收终端可以以较高的还原度还原出正 脸图像, 而以较低的还原度还原出非正脸图像和非人脸图像。
在上述技术方案中, 优选地, 还包括: 根据来自发送终端的第一标识确定正脸信息, 根 据来自发送终端的第二标识确定非正脸信息和非人脸信息。
在该技术方案中, 接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据 不同信息的标识对不同信息进行区别处理。 比如通过第一解码方式解码正脸信息得到一半正 脸图像和相应的差异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 然后 通过第二解码方式解码非正脸信息和非人脸信息, 得到非正脸图像和非人脸图像。 其中, 标 识可以是 01比特序列, 比如通过 00标记正脸, 通过 01代表非正脸, 通过 10标记非人脸。
在上述技术方案中, 优选地, 还包括: 接收来自发送终端的人脸图像的尺寸信息与位置 信息, 并根据尺寸信息和位置信息确定人脸图像在当前图像帧中的尺寸与位置。
在该技术方案中, 发送终端还可以获取人脸图像在当前图像帧中的尺寸信息和位置信 息, 从而在将编码后的图像发送至接收终端的同时, 将其中人脸图像的尺寸信息和位置信息 也发送至接收终端, 使得接收终端可以根据接收到的尺寸信息和位置信息准确地确定人脸图 像在图像帧中的尺寸和位置, 从而准确地还原发送终端发送的原图像帧。
在上述技术方案中, 优选地, 还包括: 接收来自发送终端的移动指令, 并根据移动指令 对应的预设方式移动当前图像帧中的人脸图像, 并将移动后的当前图像帧作为当前图像帧的 下一图像帧。
在该技术方案中, 若当前图像帧的下一图像帧中的人脸图像相对于当前图像帧中的人脸 图像只是按照预设方式进行了移动, 比如视频通信过程中, 视频发送端的用户的头像仅发生 了水平移动 (比如水平靠近摄像头, 或水平远离摄像头) , 或者在竖直方向上发生移动, 或 者在原垂直平面内发生了转动, 那么发送终端可以针对每种移动方式生成相应的指令, 比如 针对水平移动可以生成水平移动指令, 使得接收终端中的人脸图像也发送相应的水平移动, 而无需发送终端将下一图像帧传输至接收终端, 在不影响用户体验的情况下, 有效地降低了 数据传输量。
本申请还提出了一种图像编码、 解码方法, 包括上述任一项的图像编码方法和图像解码 方法。
图 3示出了根据本发明的一个实施例的终端的示意框图。
如图 3 所示, 根据本发明的一个实施例的终端 300 包括: 判断单元 302, 用于判断待传 输至接收终端的视频序列中, 当前图像帧的人脸图像中是否存在至少一个正脸图像; 差异计 算单元 304, 用于在判断单元 302 判定存在至少一个正脸图像时, 将至少一个正脸图像中的 每个正脸图像沿正脸图像的双眼连线的中垂线进行分割, 并计算分割后的正脸图像中一半正 脸图像与另一半正脸图像的差异数据; 编码单元 306, 用于通过第一编码方式对正脸图像中 的任一半正脸图像和差异数据进行编码得到正脸信息; 传输单元 308, 用于将正脸信息传输 至接收终端。
终端 300 可以是用于图像的发送和编码的发送终端 (为与接收终端区分, 以下将该终端
300 称为发送终端) , 接收终端则作为图像的接收和解码终端, 但是, 本领域技术人员应当 理解, 发送终端也可以具有与接收终端相同的接收和解码的功能, 同时, 接收终端也可以具 有与发送终端相同的发送和编码的功能。 以下仅针对发送终端作为图像的发送和编码终端, 且接收终端作为图像的接收和解码终端的情况进行描述。 发送终端和接收终端可以应用于多种场景, 比如, 发送终端可以是视频通信过程中的视 频发送方, 则接收终端可以是视频通信过程中的视频接收方。 发送终端也可以是监控系统中 的一个图像采集设备, 比如摄像头, 则接收终端可以是该监控系统中的显示器, 用于接收摄 像头采集到的图像。
在发送终端将视频序列 (也可以是图片 ) 传输至接收终端时, 发送终端判断当前图像帧 中是否存在正脸图像, 由于正脸图像沿双眼连线的中垂线进行平分得到的一半图像与另一半 图像 (即左半边脸和右半边脸) 几乎是对称的, 因此在判定当前图像帧中存在正脸图像时, 可以只获取对正脸图像平分后的一半图像, 然后计算一半图像与另一半图像的差异数据, 并 只对这一半图像和差异数据进行编码 (可以通过压缩算法, 如 JPEG2000 对上述一半图像进 行压缩, 然后对差异数据进行压缩) , 而在正常情况下, 人的左半边脸和右半边脸几乎是对 称的, 因此差异数据中包含的信息量非常少 (接近于 0 ) , 因此在传输正脸图像时, 可以只 传输半边脸的图像和一个极小的差异数据, 相当于将图像的压缩率提高了一倍, 很大程度上 降低了图像传输所占用的带宽。
优选地, 编码单元 306 还用于通过第一编码方式对当前图像帧的人脸图像中非正脸图像 进行编码得到非正脸信息, 并通过第二编码方式对当前图像帧中非人脸图像进行编码得到非 人脸信息; 传输单元 308还用于将非正脸信息和非人脸信息传输至接收终端。
通过第一编码方式编码后的图像质量, 要优于采用第二编码方式编码后的图像质量, 即, 编码后的正脸信息和非正脸信息 (两者均为人脸信息) 的图像质量优于非人脸信息 (例 如背景信息) 的质量。 当然, 在网络条件不好 (比如带宽非常有限) 的情况下, 可以直接丟 弃非人脸信息, 不对其进行编码。 从而使得接收终端能够以较高的还原度还原正脸信息和非 正脸信息, 并且极大地减少了非人脸信息传输过程中所占用的带宽, 使得图像传输所占用的 整体带宽也降低了。
优选地, 还包括: 标记单元 310, 用于通过第一标识对正脸信息进行标记, 通过第二标 识对非正脸信息进行标记, 通过第三标识对非人脸信息进行标记, 其中, 传输单元 308 还用 于将将第一标识、 第二标识和第三标识传输至接收终端。
接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据不同信息的标识对 不同信息进行区别处理。 比如接收终端可以根据第一标识识别出正脸信息, 并以与第一编码 方式相对应的第一解码方式解码正脸信息, 得到一半正脸图像和相应的差异数据, 然后根据 一半正脸图像和差异数据计算出另一半正脸图像, 比如差异数据是像素点灰度值, 那么就可 以根据一半正脸图像的像素点灰度值与差异数据的差值得出另一半正脸图像。 同理, 接收终 端也可以根据第二标识识别出非正脸信息, 并以第一解码方式解码非正脸信息得到非正脸图 像, 根据第三标识识别出非人脸信息, 并以第二解码方式解码非人脸信息得到非人脸图像。
优选地, 编码单元 306 还用于通过第二编码方式对当前图像帧中人脸图像中非正脸图 像, 以及当前图像帧中非人脸图像进行编码得到次要信息; 传输单元 308 还用于将次要信息 传输至接收终端。
发送终端也可以根据用户设置仅通过第一编码方式对正脸图像进行编码, 然后通过第二 编码方式对非正脸图像和非人脸图像进行编码 (相当于正脸图像的优先级高于非正脸图像和 非人脸图像的优先级) , 从而使得接收终端可以以较高的还原度还原出正脸图像, 而以较低 的还原度还原出非正脸图像和非人脸图像。
优选地, 还包括: 标记单元 310, 用于通过第一标识对正脸信息进行标记, 通过第二标 识对非正脸信息进行标记和非人脸信息进行标记, 其中, 传输单元 308 还用于将第一标识和 第二标识传输至接收终端。
接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据不同信息的标识对 不同信息进行区别处理。 比如通过第一解码方式解码正脸信息得到一半正脸图像和相应的差 异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 然后通过第二解码方式 解码非正脸信息和非人脸信息, 得到非正脸图像和非人脸图像。
优选地, 编码单元 306还用于在判断单元 302判定当前图像帧的人脸图像中不存在正脸 图像时, 通过第一预设编码方式对人脸图像进行编码得到人脸信息, 并通过第二编码方式对 当前图像帧中的非人脸图像进行编码得到非人脸信息; 传输单元 308 还用于将人脸信息和非 人脸信息传输至接收终端。
若发送终端判定当前图像帧中不存在正脸图像, 可以判定当前图像帧中的所有人脸图像 (其中只包含非正脸图像) 优先级较高, 从而通过第一编码方式对其进行编码, 以使接收终 端能够以较高的还原度还原出人脸图像, 而以较低的还原度还原出非人脸信息。
优选地, 还包括: 标记单元 310, 用于通过第一标识对人脸信息进行标记, 通过第二标 识对非人脸信息进行标记, 其中, 传输单元 308还将第一标识和第二标识传输至接收终端。
接收终端在接收到人脸信息和非人脸信息时, 可以根据不同信息的标识对不同信息进行 区别处理。 其中, 标识可以是 01比特序列, 比如通过 00标记正脸, 通过 01代表非正脸, 通 过 10标记非人脸。
优选地, 还包括: 获取单元 312, 用于获取人脸图像在当前图像帧中的尺寸信息与位置 信息, 其中, 传输单元 308还用于将位置信息与尺寸信息传输至接收终端。
发送终端还可以获取人脸图像在当前图像帧中的尺寸信息和位置信息, 从而在将编码后 的图像发送至接收终端的同时, 将其中人脸图像的尺寸信息和位置信息也发送至接收终端, 使得接收终端可以根据接收到的尺寸信息和位置信息准确地确定人脸图像在图像帧中的尺寸 和位置, 从而准确地还原发送终端发送的原图像帧。
优选地, 还包括: 指令生成单元 314, 其中, 判断单元 302 还用于判断当前图像帧的下 一图像帧中的人脸图像是否按照预设方式进行了移动; 指令生成单元在判断单元判定按照预 设方式进行了移动, 根据预设方式生成相应的移动指令; 传输单元 308 还用于将移动指令传 输至接收终端, 以使接收终端以预设方式移动接收终端的当前图像帧中的人脸图像, 并将移 动后的接收终端的当前图像帧作为接收终端的下一图像帧。
若当前图像帧的下一图像帧中的人脸图像相对于当前图像帧中的人脸图像只是按照预设 方式进行了移动, 比如视频通信过程中, 视频发送端的用户的头像仅发生了水平移动 (比如 水平靠近摄像头, 或水平远离摄像头) , 或者在竖直方向上发生移动, 或者在原垂直平面内 发生了转动, 那么发送终端可以针对每种移动方式生成相应的指令, 比如针对水平移动可以 生成水平移动指令, 使得接收终端中的人脸图像也发送相应的水平移动, 而无需发送终端将 下一图像帧传输至接收终端, 在不影响用户体验的情况下, 有效地降低了数据传输量。
图 4示出了根据本发明的另一个实施例的终端的示意框图。
如图 4 所示, 根据本发明的另一个实施例的终端 400 包括: 接收单元 402, 用于接收来 自发送终端的正脸信息, 其中, 正脸信息包含发送终端的当前图像帧中的人脸图像中每个正 脸图像的一半正脸图像和一半正脸图像与另一半正脸图像的差异数据; 解码单元 404, 用于 通过第一解码方式对正脸信息进行解码, 得到每个正脸图像中一半正脸图像和差异数据; 图 像处理单元 406, 用于一半正脸图像和差异数据得到另一半正脸图像, 并根据一半正脸图像 和另一半正脸图像得到正脸图像。
终端 400 (为与发送终端区分, 以下将该终端 400 称为接收终端) 可以用于接收发送终 端的信息, 并进行解码得到相应的图像, 接收终端在接收到发送终端发送正脸信息后, 可以 通过第一解码方式 (与第一编码方式相对应) 来解码正脸信息, 得到发送终端所传输的图像 帧中正脸图像的一半正脸图像和差异数据, 进而根据一半正脸图像和差异数据计算出另一半 正脸图像, 比如差异数据是一半正脸图像和另一半正脸图像的像素点灰度值差值, 那么可以 根据上述一半正脸图像的像素点灰度值与差异数据的差值得到另一半正脸图像, 最后将一半 正脸图像和另一半正脸图像合并, 得到一张完整的正脸图像。 从而保证了图像帧的还原度, 并且由于只需发送终端传输一半正脸图像的数据和极小的差异数据, 降低了图像帧在传输过 程中所占用的带宽。
优选地, 接收单元 402 用于接收来自发送终端的非正脸信息和非人脸信息; 解码单元 404 用于通过第一解码方式对非正脸信息进行解码得到当前图像帧的人脸图像中的非正脸图 像, 通过第二解码方式对非人脸信息进行解码得到当前图像帧中的非人脸图像。
接收终端在接收到发送终端的正脸信息后, 还可以从发送终端接收非正脸信息和非人脸 信息, 然后通过第一解码方式解码正脸信息和非正脸信息, 通过第二解码方式 (与第二编码 方式相对应) 解码非人脸信息, 其中, 发送终端通过第一编码方式得到的正脸信息和非正脸 信息的图像质量, 要高于通过第二编码方式得到的非人脸信息的图像质量, 从而接收终端可 以以较高的还原度还原正脸图像和非正脸图像, 并以较低的还原度还原非人脸图像。
优选地, 还包括: 标识识别单元 408, 用于根据来自发送终端的第一标识确定正脸信 息, 根据来自发送终端的第二标识确定非正脸信息和非人脸信息。
接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据不同信息的标识对 不同信息进行区别处理。 比如接收终端可以根据第一标识识别出正脸信息, 并以与第一编码 方式相对应的第一解码方式解码正脸信息, 得到一半正脸图像和相应的差异数据, 然后根据 一半正脸图像和差异数据计算出另一半正脸图像, 比如差异数据是像素点灰度值, 那么就可 以根据一半正脸图像的像素点灰度值与差异数据的差值得出另一半正脸图像。 同理, 接收终 端也可以根据第二标识识别出非正脸信息, 并以第一解码方式解码非正脸信息得到非正脸图 像, 根据第三标识识别出非人脸信息, 并以第二解码方式解码非人脸信息得到非人脸图像。
优选地, 接收单元 402 用于接收来自发送终端的非正脸信息和非人脸信息; 解码单元 404 用于通过第二解码方式对非正脸信息和非人脸信息进行解码, 得到当前图像帧的人脸图 像中的非正脸图像以及当前图像帧中的非人脸图像。
发送终端也可以根据用户设置仅通过第一编码方式对正脸图像进行编码, 然后通过第二 编码方式对非正脸图像和非人脸图像进行编码 (相当于正脸图像的优先级高于非正脸图像和 非人脸图像的优先级) , 从而使得接收终端可以以较高的还原度还原出正脸图像, 而以较低 的还原度还原出非正脸图像和非人脸图像。
优选地, 还包括: 标识识别单元 408, 用于根据来自发送终端的第一标识确定正脸信 息, 根据来自发送终端的第二标识确定非正脸信息和非人脸信息。
接收终端在接收到正脸信息、 非正脸信息和非人脸信息时, 可以根据不同信息的标识对 不同信息进行区别处理。 比如通过第一解码方式解码正脸信息得到一半正脸图像和相应的差 异数据, 然后根据一半正脸图像和差异数据计算出另一半正脸图像, 然后通过第二解码方式 解码非正脸信息和非人脸信息, 得到非正脸图像和非人脸图像。 其中, 标识可以是 01 比特序 列, 比如通过 00标记正脸, 通过 01代表非正脸, 通过 10标记非人脸。
优选地, 还包括: 位置确定单元 410, 其中, 接收单元 402 还用于接收来自发送终端的 人脸图像的尺寸信息与位置信息, 位置确定单元 410 用于根据尺寸信息和位置信息确定人脸 图像在当前图像帧中的尺寸与位置。
发送终端还可以获取人脸图像在当前图像帧中的尺寸信息和位置信息, 从而在将编码后 的图像发送至接收终端的同时, 将其中人脸图像的尺寸信息和位置信息也发送至接收终端, 使得接收终端可以根据接收到的尺寸信息和位置信息准确地确定人脸图像在图像帧中的尺寸 和位置, 从而准确地还原发送终端发送的原图像帧。
优选地, 还包括: 图像帧确定单元 412, 其中, 接收单元 402 还用于接收来自发送终端 的移动指令, 图像帧确定单元 412 用于根据移动指令对应的预设方式移动当前图像帧中的人 脸图像, 并将移动后的当前图像帧作为当前图像帧的下一图像帧。 若当前图像帧的下一图像帧中的人脸图像相对于当前图像帧中的人脸图像只是按照预设 方式进行了移动, 比如视频通信过程中, 视频发送端的用户的头像仅发生了水平移动 (比如 水平靠近摄像头, 或水平远离摄像头) , 或者在竖直方向上发生移动, 或者在原垂直平面内 发生了转动, 那么发送终端可以针对每种移动方式生成相应的指令, 比如针对水平移动可以 生成水平移动指令, 使得接收终端中的人脸图像也发送相应的水平移动, 而无需发送终端将 下一图像帧传输至接收终端, 在不影响用户体验的情况下, 有效地降低了数据传输量。
本申请还提出了一种图像编码、 解码系统, 包括上述如图 3所示的终端 300和如图 4所 示的终端 400
图 5示出了根据本发明的实施例的图像编码方法的具体示意流程图。
如图 5所示, 根据本发明的实施例的图像编码方法的具体包括:
步骤 502, 发送终端 (可以是如图 3 所示的终端 300 ) 获取 (比如从图像采集设备中获 取) 待发送至接收终端 (可以是如图 4所示的终端 400 ) 的视频序列。
步骤 504, 发送终端判断视频序列的当前图像帧中是否含有人脸图像, 若存在人脸图像 则进入步骤 506, 若不存在人脸图像, 则进入步骤 514
步骤 506, 若存在人脸图像, 则获取人脸图像在当前图像帧中的位置信息 (比如坐标) 和尺寸信息 (比如长、 宽数值) , 位置信息和尺寸信息所占的数据量很小, 通过传输较小数 据量的信息, 就可以使得接收终端以较高的还原度还原原图像帧。
步骤 508, 判断人脸图像中是否含有正脸图像, 具体地, 可以根据处于水平的双眼的距 离自相应待识别的人脸图像中截取出相应人脸部分, 然后根据所截取出的相应人脸部分生成 与所述人脸部分相应的镜像人脸, 根据所述人脸部分与镜像人脸对应各像素点灰度值的灰度 值计算两图像之间的差异信息, 将将计算出的差异信息与预设的阀值进行比较以判断所述待 识别的人脸图像包含的人脸是否为正脸。
步骤 510, 若人脸图像中不存在正脸图像 (即人脸图像都是非正脸图像, 其中具体可以 是侧脸图像, 或者是正脸图像, 但是左半边脸和右半边脸的差距较大) , 则通过第一编码方 式对人脸图像进行编码, 通过第二编码方式对非人脸图像进行编码, 并对编码后的信息进行 标记。
步骤 512, 若存在正脸图像, 则获取正脸图像的一半图像 (具体可以是沿着人脸图像中 双眼连线的中垂线分割图像, 取分割后的两份图像中的一份) , 并计算一半图像图另一半图 像的差异数据, 通过第一编码方式对差异数据和所取的一半图像进行编码, 通过第二编码方 式对非正脸图像和非人脸图像进行编码, 对编码后的信息进行标记。
步骤 514, 若当前图像帧中不存在人脸图像 (说明都是背景图像) , 则通过第二编码方 式对当前图像帧中的图像进行编码。
步骤 516, 发送终端将编码后的将编码后的信息、 位置信息、 尺寸信息传输至接收终端 (若有标记信息也将标记信息传输至接收终端) 。
图 6示出了根据本发明的实施例的图像解码方法的具体示意流程图。
如图 6所示, 根据本发明的实施例的图像解码方法具体包括:
步骤 602, 接收终端接收发送终端发送的当前图像帧的相关信息, 即编码后的图像信息。 步骤 604, 根据不同信息分别对应的标识, 确定不同类型的信息, 比如标识 00对应的信 息为正脸信息。
步骤 606, 对于非正脸信息和非人脸信息, 根据其编码方式以相应的解码方式进行解码。 步骤 608, 对于正脸信息, 以相应的解码方式进行解码, 得到一半正脸图像和差异数 据, 根据一半正脸图像和差异数据计算出另一半图像。
步骤 610, 将一半正脸图像和另一半正脸图像合成为一张正脸图像。
步骤 612, 根据尺寸信息和位置信息显示正脸图像、 非正脸图像和非人脸图像, 从而完 成对当前图像帧的还原。
根据本发明的实施方式, 还提供了一种存储在非易失性机器可读介质上的程序产品, 用 于图像编码, 程序产品包括用于使计算机系统执行以下步骤的机器可执行指令: 判断待传输 至接收终端的视频序列中, 当前图像帧的人脸图像中是否存在至少一个正脸图像; 若存在至 少一个正脸图像, 则将至少一个正脸图像中的每个正脸图像沿正脸图像的双眼连线的中垂线 进行分割, 并计算分割后的正脸图像中一半正脸图像与另一半正脸图像的差异数据; 通过第 一编码方式对正脸图像中的任一半正脸图像和差异数据进行编码得到正脸信息, 并将正脸信 息传输至接收终端。
根据本发明的实施方式, 还提出了一种存储在非易失性机器可读介质上的程序产品, 用 于图像解码, 程序产品包括用于使计算机系统执行以下步骤的机器可执行指令: 接收来自发 送终端的正脸信息, 其中, 正脸信息包含发送终端的当前图像帧中的人脸图像中每个正脸图 像的一半正脸图像和一半正脸图像与另一半正脸图像的差异数据; 通过第一解码方式对正脸 信息进行解码, 得到每个正脸图像中一半正脸图像和差异数据; 根据一半正脸图像和差异数 据得到另一半正脸图像, 并根据一半正脸图像和另一半正脸图像得到正脸图像。
根据本发明的实施方式, 还提出了一种存储在非易失性机器可读介质上的程序产品, 用 于图像编码、 解码, 包括上述两种程序产品。
根据本发明的实施方式, 还提供了一种非易失机器可读介质, 存储有用于图像编码的程 序产品, 程序产品包括用于使计算机系统执行以下步骤的机器可执行指令: 判断待传输至接 收终端的视频序列中, 当前图像帧的人脸图像中是否存在至少一个正脸图像; 若存在至少一 个正脸图像, 则将至少一个正脸图像中的每个正脸图像沿正脸图像的双眼连线的中垂线进行 分割, 并计算分割后的正脸图像中一半正脸图像与另一半正脸图像的差异数据; 通过第一编 码方式对正脸图像中的任一半正脸图像和差异数据进行编码得到正脸信息, 并将正脸信息传 输至接收终端。
根据本发明的实施方式, 还提供了一种非易失机器可读介质, 存储有用于图像解码的程 序产品, 程序产品包括用于使计算机系统执行以下步骤的机器可执行指令: 接收来自发送终 端的正脸信息, 其中, 正脸信息包含发送终端的当前图像帧中的人脸图像中每个正脸图像的 一半正脸图像和一半正脸图像与另一半正脸图像的差异数据; 通过第一解码方式对正脸信息 进行解码, 得到每个正脸图像中一半正脸图像和差异数据; 根据一半正脸图像和差异数据得 到另一半正脸图像, 并根据一半正脸图像和另一半正脸图像得到正脸图像。
根据本发明的实施方式, 还提供了一种非易失机器可读介质, 存储有用于图像编码、 解 码的程序产品, 程序产品包括上述两种程序产品。
根据本发明的实施方式, 还提供了一种机器可读程序, 程序使机器执行如上技术方案中 任一的图像编码、 解码方法。
根据本发明的实施方式, 还提供了一种存储有机器可读程序的存储介质, 其中, 机器可 读程序使得机器执行如上技术方案中任一的图像编码、 解码方法。
以上结合附图详细说明了本发明的技术方案, 考虑到相关技术中, 图像编码方式没有充 分地考虑人脸的成像角度等信息, 难以进一步降低图像帧编码后的信息量, 而且无法恢复原 图像帧。 通过本申请的技术方案, 能够在进行图像传输过程中, 进一步减小传输所占的带 宽, 提高用户对于图像传输的体验, 并且能够使得图像接收端恢复原图像帧。
在本发明中, 术语 "第一" 、 "第二" 、 "第三" 仅用于描述目的, 而不能理解为指示 或暗示相对重要性。 术语 "多个" 指两个或两个以上, 除非另有明确的限定。
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技术人员 来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的任何修改、 等 同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种图像编码方法, 其特征在于, 包括:
步骤 102 , 判断待传输至接收终端的视频序列中, 当前图像帧的人脸图像中是否 存在至少一个正脸图像;
步骤 104 , 若存在至少一个正脸图像, 则将所述至少一个正脸图像中的每个正脸 图像沿所述正脸图像的双眼连线的中垂线进行分割, 并计算分割后的正脸图像中一半 正脸图像与另一半正脸图像的差异数据;
步骤 106 , 通过第一编码方式对所述正脸图像中的任一半正脸图像和所述差异数 据进行编码得到正脸信息, 并将所述正脸信息传输至所述接收终端。
2. 根据权利要求 1 所述的图像编码方法, 其特征在于, 还包括: 通过第二编码 方式对所述当前图像帧中人脸图像中非正脸图像, 以及所述当前图像帧中非人脸图像 进行编码得到次要信息, 将所述次要信息传输至所述接收终端。
3. 根据权利要求 2 所述的图像编码方法, 其特征在于, 还包括: 通过第一标识 对所述正脸信息进行标记, 通过第二标识对所述非正脸信息和所述非人脸信息进行标 记, 将所述第一标识和所述第二标识传输至所述接收终端。
4. 根据权利要求 1 至 3 中任一项所述的图像编码方法, 其特征在于, 还包括: 获取所述人脸图像在所述当前图像帧中的尺寸信息与位置信息, 并将所述位置信息与 所述尺寸信息传输至所述接收终端。
5. 根据权利要求 1 至 3 中任一项所述的图像编码方法, 其特征在于, 还包括: 判断所述当前图像帧的下一图像帧中的人脸图像是否按照预设方式进行了移动, 若按 照所述预设方式进行了移动, 则根据所述预设方式生成相应的移动指令, 并将所述移 动指令传输至所述接收终端, 以使所述接收终端以所述预设方式移动所述接收终端的 当前图像帧中的人脸图像, 并将移动后的所述接收终端的当前图像帧作为所述接收终 端的下一图像帧。
6. 一种图像解码方法, 其特征在于, 包括:
步骤 202 , 接收来自发送终端的正脸信息, 其中, 所述正脸信息包含所述发送终 端的当前图像帧中的人脸图像中每个正脸图像的一半正脸图像和所述一半正脸图像与 另一半正脸图像的差异数据;
步骤 204 , 通过第一解码方式对所述正脸信息进行解码, 得到所述每个正脸图像 中一半正脸图像和所述差异数据;
步骤 206 , 根据所述一半正脸图像和所述差异数据得到所述另一半正脸图像, 并 根据所述一半正脸图像和所述另一半正脸图像得到所述正脸图像。
7. 根据权利要求 6 所述的图像解码方法, 其特征在于, 还包括: 接收来自所述 发送终端的非正脸信息和非人脸信息, 通过第二解码方式对所述非正脸信息和所述非 人脸信息进行解码, 得到所述当前图像帧的人脸图像中的非正脸图像以及所述当前图 像帧中的非人脸图像。
8. 根据权利要求 7 所述的图像解码方法, 其特征在于, 还包括: 根据来自所述 发送终端的第一标识确定所述正脸信息, 根据来自所述发送终端的第二标识确定所述 非正脸信息和所述非人脸信息。
9. 根据权利要求 6 至 8 中任一项所述的图像解码方法, 其特征在于, 还包括: 接收来自所述发送终端的所述人脸图像的尺寸信息与位置信息, 并根据所述尺寸信息 和所述位置信息确定所述人脸图像在所述当前图像帧中的尺寸与位置。
10. 根据权利要求 6至 8 中任一项所述的图像解码方法, 其特征在于, 还包括: 接收来自所述发送终端的移动指令, 并根据所述移动指令对应的预设方式移动所述当 前图像帧中的人脸图像, 并将移动后的所述当前图像帧作为所述当前图像帧的下一图 像帧。
1 1. 一种图像编码、 解码方法, 其特征在于, 包括权利要求 1至 5 中任一项所述 的图像编码方法, 以及权利要求 6至 10中任一项所述的图像解码方法。
12. 一种终端, 其特征在于, 包括:
判断单元, 用于判断待传输至接收终端的视频序列中, 当前图像帧的人脸图像中 是否存在至少一个正脸图像;
差异计算单元, 用于在所述判断单元判定存在至少一个正脸图像时, 将所述至少 一个正脸图像中的每个正脸图像沿所述正脸图像的双眼连线的中垂线进行分割, 并计 算分割后的正脸图像中一半正脸图像与另一半正脸图像的差异数据;
编码单元, 用于通过第一编码方式对所述正脸图像中的任一半正脸图像和所述差 异数据进行编码得到正脸信息;
传输单元, 用于将所述正脸信息传输至所述接收终端。
13. 根据权利要求 12 所述的终端, 其特征在于, 所述编码单元还用于通过第二 编码方式对所述当前图像帧中人脸图像中非正脸图像, 以及所述当前图像帧中非人脸 图像进行编码得到次要信息; 所述传输单元还用于将所述次要信息传输至所述接收终 端。
14. 根据权利要求 13所述的终端, 其特征在于, 还包括:
标记单元, 用于通过第一标识对所述正脸信息进行标记, 通过第二标识对所述非 正脸信息进行标记和所述非人脸信息进行标记,
其中, 所述传输单元还用于将所述第一标识和所述第二标识传输至所述接收终 端。
15. 根据权利要求 12至 14中任一项所述的终端, 其特征在于, 还包括: 获取单元, 用于获取所述人脸图像在所述当前图像帧中的尺寸信息与位置信息, 其中, 所述传输单元还用于将所述位置信息与所述尺寸信息传输至所述接收终 端。
16. 根据权利要求 12至 14中任一项所述的终端, 其特征在于, 还包括: 指令生 成单元,
其中, 所述判断单元还用于判断所述当前图像帧的下一图像帧中的人脸图像是否 按照预设方式进行了移动; 所述指令生成单元在所述判断单元判定按照所述预设方式 进行了移动, 根据所述预设方式生成相应的移动指令; 所述传输单元还用于将所述移 动指令传输至所述接收终端, 以使所述接收终端以所述预设方式移动所述接收终端的 当前图像帧中的人脸图像, 并将移动后的所述接收终端的当前图像帧作为所述接收终 端的下一图像帧。
17. 一种终端, 其特征在于, 包括:
接收单元, 用于接收来自发送终端的正脸信息, 其中, 所述正脸信息包含所述发 送终端的当前图像帧中的人脸图像中每个正脸图像的一半正脸图像和所述一半正脸图 像与另一半正脸图像的差异数据;
解码单元, 用于通过第一解码方式对所述正脸信息进行解码, 得到所述每个正脸 图像中一半正脸图像和所述差异数据;
图像处理单元, 用于所述一半正脸图像和所述差异数据得到所述另一半正脸图 像, 并根据所述一半正脸图像和所述另一半正脸图像得到所述正脸图像。
18. 根据权利要求 17所述的终端, 其特征在于, 所述接收单元用于接收来自所述 发送终端的非正脸信息和非人脸信息; 所述解码单元用于通过第二解码方式对所述非 正脸信息和所述非人脸信息进行解码, 得到所述当前图像帧的人脸图像中的非正脸图 像以及所述当前图像帧中的非人脸图像。
19. 根据权利要求 18所述的终端, 其特征在于, 还包括:
标识识别单元, 用于根据来自所述发送终端的第一标识确定所述正脸信息, 根据 来自所述发送终端的第二标识确定所述非正脸信息和所述非人脸信息。
20. 根据权利要求 17至 19中任一项所述的终端, 其特征在于, 还包括: 位置确定单元,
其中, 所述接收单元还用于接收来自所述发送终端的所述人脸图像的尺寸信息与 位置信息, 所述位置确定单元用于根据所述尺寸信息和所述位置信息确定所述人脸图 像在所述当前图像帧中的尺寸与位置。
21. 根据权利要求 17至 19中任一项所述的终端, 其特征在于, 还包括: 图像帧确定单元,
其中, 所述接收单元还用于接收来自所述发送终端的移动指令, 所述图像帧确定 单元用于根据所述移动指令对应的预设方式移动所述当前图像帧中的人脸图像, 并将 移动后的所述当前图像帧作为所述当前图像帧的下一图像帧。
22.一种图像编码、 解码系统, 其特征在于, 包括权利要求 12至 16 中任一项所 述的终端, 以及权利要求 17至 21中任一项所述的终端。
PCT/CN2013/084766 2013-09-30 2013-09-30 图像编码、解码方法和系统以及终端 WO2015042976A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201380068849.6A CN104904203A (zh) 2013-09-30 2013-09-30 图像编码、解码方法和系统以及终端
EP13894234.7A EP3054677A4 (en) 2013-09-30 2013-09-30 Methods and systems for image encoding and decoding and terminal
PCT/CN2013/084766 WO2015042976A1 (zh) 2013-09-30 2013-09-30 图像编码、解码方法和系统以及终端
US14/912,133 US20160205406A1 (en) 2013-09-30 2013-09-30 Image encoding and decoding method and system and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/084766 WO2015042976A1 (zh) 2013-09-30 2013-09-30 图像编码、解码方法和系统以及终端

Publications (1)

Publication Number Publication Date
WO2015042976A1 true WO2015042976A1 (zh) 2015-04-02

Family

ID=52741895

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/084766 WO2015042976A1 (zh) 2013-09-30 2013-09-30 图像编码、解码方法和系统以及终端

Country Status (4)

Country Link
US (1) US20160205406A1 (zh)
EP (1) EP3054677A4 (zh)
CN (1) CN104904203A (zh)
WO (1) WO2015042976A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107347144A (zh) * 2016-05-05 2017-11-14 掌赢信息科技(上海)有限公司 一种人脸特征点的编解码方法、设备及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020150374A1 (en) 2019-01-15 2020-07-23 More Than Halfway, L.L.C. Encoding and decoding visual information
CN115376196B (zh) * 2022-10-25 2023-01-31 上海联息生物科技有限公司 图像处理方法、金融隐私数据的安全处理方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1189059A (zh) * 1996-12-30 1998-07-29 大宇电子株式会社 在基于3维模型的编码系统中产生唇部活动参数的方法及装置
EP1739965A1 (en) * 2005-06-27 2007-01-03 Matsuhita Electric Industrial Co., Ltd. Method and system for processing video data
CN101527786A (zh) * 2009-03-31 2009-09-09 西安交通大学 一种增强网络视频中视觉重要区域清晰度的方法
CN101771864A (zh) * 2008-12-26 2010-07-07 中国移动通信集团公司 一种视频图像传输处理方法及装置

Family Cites Families (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6095989A (en) * 1993-07-20 2000-08-01 Hay; Sam H. Optical recognition methods for locating eyes
US5710590A (en) * 1994-04-15 1998-01-20 Hitachi, Ltd. Image signal encoding and communicating apparatus using means for extracting particular portions of an object image
US20030063796A1 (en) * 2001-09-28 2003-04-03 Koninklijke Philips Electronics N.V. System and method of face recognition through 1/2 faces
JP3775346B2 (ja) * 2002-05-29 2006-05-17 株式会社日立製作所 テレビ電話システムおよびその端末装置
US8638846B1 (en) * 2003-06-23 2014-01-28 At&T Intellectual Property Ii, L.P. Systems and methods for encoding and decoding video streams
KR100559471B1 (ko) * 2003-12-17 2006-03-10 한국전자통신연구원 대칭축을 이용한 얼굴 검출 시스템 및 방법
KR100716999B1 (ko) * 2005-06-03 2007-05-10 삼성전자주식회사 영상의 대칭성을 이용한 인트라 예측 방법, 이를 이용한영상의 복호화, 부호화 방법 및 장치
JP4410732B2 (ja) * 2005-07-27 2010-02-03 グローリー株式会社 顔画像検出装置、顔画像検出方法および顔画像検出プログラム
US7860280B2 (en) * 2006-06-09 2010-12-28 Samsung Electronics Co., Ltd. Facial feature detection method and device
US8073287B1 (en) * 2007-02-26 2011-12-06 George Mason Intellectual Properties, Inc. Recognition by parts using adaptive and robust correlation filters
EP2179589A4 (en) * 2007-07-20 2010-12-01 Fujifilm Corp IMAGE PROCESSING DEVICE, IMAGE PROCESSING AND PROGRAM
CN101141608B (zh) * 2007-09-28 2011-05-11 腾讯科技(深圳)有限公司 一种视频即时通讯系统及方法
CN101257635A (zh) * 2008-03-21 2008-09-03 北京中星微电子有限公司 一种基于人脸检测的视频压缩容错方法及编解码方法
US9628755B2 (en) * 2010-10-14 2017-04-18 Microsoft Technology Licensing, Llc Automatically tracking user movement in a video chat application
US9323980B2 (en) * 2011-05-13 2016-04-26 Microsoft Technology Licensing, Llc Pose-robust recognition
TWI511056B (zh) * 2011-09-20 2015-12-01 Altek Corp 特徵資料壓縮裝置、多方向人臉偵測系統及其偵測方法
US20140003662A1 (en) * 2011-12-16 2014-01-02 Peng Wang Reduced image quality for video data background regions
CN102595164A (zh) * 2012-02-27 2012-07-18 中兴通讯股份有限公司 一种视频图像发送方法、装置及系统
US9202108B2 (en) * 2012-04-13 2015-12-01 Nokia Technologies Oy Methods and apparatuses for facilitating face image analysis
GB201301445D0 (en) * 2013-01-28 2013-03-13 Microsoft Corp Adapting robustness in video coding
GB2513090B (en) * 2013-01-28 2019-12-11 Microsoft Technology Licensing Llc Conditional concealment of lost video data
GB2514540B (en) * 2013-04-10 2020-01-08 Microsoft Technology Licensing Llc Resource for encoding a video signal
CN104885082B (zh) * 2013-04-27 2018-04-10 东莞宇龙通信科技有限公司 终端和数据信息的隐藏保护方法
GB201312382D0 (en) * 2013-07-10 2013-08-21 Microsoft Corp Region-of-interest aware video coding
GB201318658D0 (en) * 2013-10-22 2013-12-04 Microsoft Corp Controlling resolution of encoded video

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1189059A (zh) * 1996-12-30 1998-07-29 大宇电子株式会社 在基于3维模型的编码系统中产生唇部活动参数的方法及装置
EP1739965A1 (en) * 2005-06-27 2007-01-03 Matsuhita Electric Industrial Co., Ltd. Method and system for processing video data
CN101771864A (zh) * 2008-12-26 2010-07-07 中国移动通信集团公司 一种视频图像传输处理方法及装置
CN101527786A (zh) * 2009-03-31 2009-09-09 西安交通大学 一种增强网络视频中视觉重要区域清晰度的方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107347144A (zh) * 2016-05-05 2017-11-14 掌赢信息科技(上海)有限公司 一种人脸特征点的编解码方法、设备及系统

Also Published As

Publication number Publication date
EP3054677A4 (en) 2017-05-10
US20160205406A1 (en) 2016-07-14
EP3054677A1 (en) 2016-08-10
CN104904203A (zh) 2015-09-09

Similar Documents

Publication Publication Date Title
JP5731672B2 (ja) 暗黙基準フレームを用いる動画像符号化システム
JP6247324B2 (ja) 引き続くアプリケーションを容易にするためにビデオ画像パラメータを動的に適合させるための方法
JP5899518B2 (ja) サーバ装置、システム制御方法及びシステム制御プログラム
US8666042B2 (en) Techniques for performing key frame requests in media servers and endpoint devices
US8953671B2 (en) Codec capability negotiation method and terminal thereof
US9912714B2 (en) Sending 3D image with first video image and macroblocks in the second video image
EP2654039B1 (en) Audio decoding method and apparatus
WO2015024362A1 (zh) 一种图像处理方法及设备
WO2019144818A1 (zh) 视频帧传输方法、探测器及用户设备
KR20130129471A (ko) 관심 객체 기반 이미지 처리
CN102195894A (zh) 即时通信中实现立体视频通信的系统及方法
WO2015042976A1 (zh) 图像编码、解码方法和系统以及终端
CN113794903A (zh) 视频图像处理方法、装置及服务器
CN111654660B (zh) 一种基于图像分割的视频会议系统编码传输方法
US10536726B2 (en) Pixel patch collection for prediction in video coding system
CN108156465B (zh) 运算装置、发送方法
CN111901663A (zh) 视频传输系统、方法及计算机可读存储介质
JP6743609B2 (ja) 画像同期装置、画像同期プログラム、及び画像同期方法
WO2020107376A1 (zh) 图像处理的方法、设备及存储介质
WO2023051705A1 (zh) 视频通讯方法及装置、电子设备、计算机可读介质
KR102094848B1 (ko) (초)다시점 미디어의 라이브 스트리밍 방법 및 장치
CN111901664A (zh) 视频传输系统及方法
KR20150086385A (ko) 관심 객체 기반 이미지 처리
JP2006238121A (ja) 情報処理装置
KR20140006453A (ko) 영상 데이터의 디코딩 방법 및 장치

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: 13894234

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14912133

Country of ref document: US

REEP Request for entry into the european phase

Ref document number: 2013894234

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013894234

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE