WO2016202285A1 - Real-time video transmission method and electronic apparatus - Google Patents

Real-time video transmission method and electronic apparatus Download PDF

Info

Publication number
WO2016202285A1
WO2016202285A1 PCT/CN2016/086134 CN2016086134W WO2016202285A1 WO 2016202285 A1 WO2016202285 A1 WO 2016202285A1 CN 2016086134 W CN2016086134 W CN 2016086134W WO 2016202285 A1 WO2016202285 A1 WO 2016202285A1
Authority
WO
WIPO (PCT)
Prior art keywords
instant video
video frame
interest
region
parameter
Prior art date
Application number
PCT/CN2016/086134
Other languages
French (fr)
Chinese (zh)
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
Priority claimed from CN201510346214.9A external-priority patent/CN104967917A/en
Priority claimed from CN201510346061.8A external-priority patent/CN104967914A/en
Priority claimed from CN201510346213.4A external-priority patent/CN104967916A/en
Priority claimed from CN201510346215.3A external-priority patent/CN105049949A/en
Priority claimed from CN201510346188.XA external-priority patent/CN105049948A/en
Application filed by 美国掌赢信息科技有限公司, 武俊敏 filed Critical 美国掌赢信息科技有限公司
Publication of WO2016202285A1 publication Critical patent/WO2016202285A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Definitions

  • the present invention relates to the field of video, and in particular, to a method and a device for transmitting instant video.
  • the prior art provides a method for transmitting an instant video.
  • the method includes: acquiring an instant video input by a user; encoding a uniform encoding manner for all areas in the instant video frame; and transmitting the encoded real-time video.
  • the present invention provides an instant video transmission method and an electronic device.
  • the technical solution is as follows:
  • a method for transmitting an instant video comprising:
  • the acquiring an area of interest in the current instant video frame includes:
  • the transmitting, according to the first transmission policy, the current instant video frame that includes the region of interest includes :
  • the current real-time video is processed according to an importance matrix corresponding to the current instant video frame, and the processing is performed.
  • the following instant video frames include:
  • the generating an importance matrix corresponding to the current instant video frame according to the region of interest includes:
  • the transmitting the current instant video frame that includes the region of interest according to the second transmission policy Strategies include:
  • the setting, by the setting, the quantization parameter corresponding to the at least one macroblock includes:
  • a quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
  • the transmitting, according to the third transmission policy, the current instant video frame that includes the region of interest includes:
  • the acquiring the residual data between the current instant video frame and the reference frame that includes the region of interest includes:
  • the transmitting, according to the fourth transmission policy, the current instant video frame that includes the region of interest includes:
  • the acquiring, by using the second feature parameter, the second feature parameter is:
  • the acquiring the posture parameter and the location parameter of the at least one triangular region includes:
  • an electronic device comprising:
  • a determining module configured to determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition
  • the decision module is further configured to trigger any one of the following modules according to a preset condition that the network bandwidth meets and a transmission policy supported by the electronic device:
  • a first processing module configured to: according to the first transmission, when the network bandwidth meets a first preset condition a policy of transmitting the current instant video frame including the region of interest; or
  • a second processing module configured to: when the network bandwidth meets a second preset condition, transmit the current instant video frame that includes the interest area according to a second transmission policy; or
  • a third processing module configured to: when the network bandwidth meets a third preset condition, transmit the current instant video frame including the interest area according to a third transmission policy; or
  • a fourth processing module configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the interest area according to the fourth transmission policy.
  • the acquiring module is specifically configured to:
  • the first processing module is specifically configured to:
  • the first processing module is specifically configured to:
  • the first processing module is specifically configured to:
  • the second processing module is specifically configured to:
  • the second processing module is specifically configured to:
  • a quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
  • the third processing module is specifically configured to:
  • the third processing module is specifically configured to:
  • the fourth processing module is specifically configured to:
  • the fourth processing module is specifically configured to:
  • the fourth processing module is specifically configured to:
  • an electronic device comprising a transmitting module, a memory, and the transmitting module, the memory connecting processor, wherein the memory is configured to store a set of program codes, the processing The program code stored by the memory is used to perform the following operations:
  • the processor invokes program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored by the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • a quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the present invention provides an instant video encoding method and an electronic device, including: acquiring an interest region in a current instant video frame; performing the following operations according to a preset condition that the network bandwidth satisfies and a transmission policy supported by the electronic device; Any one of the following: if the network bandwidth meets the first preset condition, transmitting the current instant video frame including the interest area according to the first transmission policy; if the network bandwidth meets the second preset condition, transmitting, including the interest according to the second transmission policy The current instant video frame of the area; if the network bandwidth meets the third preset condition, transmitting the current instant video frame including the interest area according to the third transmission policy; and if the network bandwidth satisfies the fourth preset condition, according to the fourth transmission policy
  • the transmission includes the current live video frame of the region of interest.
  • the method improves the utilization of the network bandwidth and saves the network resources, thereby improving the transmission efficiency of the instant video and improving the user experience.
  • the method is: after obtaining the region of interest from the current instant video frame, processing the current instant video frame, so that more bandwidth resources are used in the case that the bandwidth resources are unchanged compared to the conventional real-time video encoding method.
  • the transmission of the interest area ensures the transmission of the interest area, further improves the transmission efficiency of the instant video and improves the user experience.
  • FIG. 1 is a flowchart of a method for transmitting instant video according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for transmitting an instant video according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • An embodiment of the present invention provides an instant video encoding method, where the method is used in an interactive system including at least two electronic devices, wherein in the interactive system, the at least two electronic devices are stored by running the self.
  • the application implements real-time video interaction, and the electronic device includes at least a transmitting/receiving module, a video input module, and a display module having a touch function, the video input module includes a camera, the display module may include a display screen, and the electronic device passes the transmitting/receiving module Realizing the sending and receiving of instant video, realizing the input of instant video through the video input module, realizing the display of the instant video and obtaining the instruction triggered by the user through the display module with the touch function.
  • An embodiment of the present invention provides a method for transmitting an instant video. Referring to FIG. 1, the method includes:
  • step 102 Determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition; if the network bandwidth meets the first preset condition, and the electronic device supports the first a transmission policy, step 103 is performed; if the network bandwidth meets the second preset condition, and the electronic device supports the second transmission policy, step 104 is performed; if the network bandwidth meets the third preset condition, and the electronic device supports the third transmission If the network bandwidth meets the fourth preset condition and the electronic device supports the fourth transmission policy, step 106 is performed.
  • the first transmission policy transmit a current instant video frame including the area of interest, and end.
  • the current live video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
  • the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
  • the second transmission policy transmit the current instant video frame including the interest area, and end.
  • the instant video frame including at least the region of interest is divided into at least one macroblock, and the quantization parameter corresponding to the at least one macroblock is set;
  • the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
  • the third transmission policy transmit the current instant video frame including the interest area, and end.
  • the process ends. And after the end, the instant video frame is transmitted by conventional transmission.
  • the fourth transmission policy transmit a current instant video frame including the interest area, and end.
  • the process ends, and after the end, the instant video frame is transmitted through the conventional transmission mode.
  • the present invention provides a method for transmitting an instant video, which can be determined according to whether the network bandwidth satisfies any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition.
  • Low network bandwidth adopts different transmission strategies for real-time video. Compared with traditional instant video transmission methods, this method improves network bandwidth utilization and saves network resources, thereby improving the efficiency of real-time video transmission and improving users.
  • the method according to the embodiment of the present invention processes the current instant video frame after acquiring the region of interest from the current instant video frame, so that the bandwidth resource is unchanged compared to the conventional instant video encoding method. In the case, more broadband resources are used for the transmission of the interest area, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video and improving the user experience.
  • An embodiment of the present invention provides a method for transmitting an instant video. Referring to FIG. 2, the method includes:
  • the area of interest may include an area where the user details are located, the user details include a face; the area of interest may also include an area where the screen included in the current instant video frame is located, and the area of interest may further include other areas.
  • the specific region of interest is not limited in the embodiment of the present invention.
  • the embodiment of the present invention takes the region where the region of interest is the face, for example, the process may be:
  • the feature parameters for indicating the area where the face is located include pixels for describing the face and bits of the feature point. Set parameters, etc., which are used to describe the outline of a human face.
  • the parameters of the pixel include a position parameter of the pixel point, and the position parameter is used to uniquely determine the pixel point.
  • the method of the present invention can be used to Perform undistorted transmission, perform corresponding low-pass filtering on the rest, remove high-frequency signals, and reduce the bandwidth occupied by other areas during transmission, so that the bandwidth required by the method is compared to the conventional instant video transmission method. Fewer resources, which can further save bandwidth resources, improve the efficiency of instant video transmission, and improve the user experience.
  • step 203 Determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition; if the network bandwidth meets the first preset condition, and the electronic device supports the first a transmission policy, step 203 is performed; if the network bandwidth meets the second preset condition, and the electronic device supports the second transmission policy, step 205 is performed; if the network bandwidth meets the third preset condition, and the electronic device supports the third transmission If the network bandwidth meets the fourth preset condition and the electronic device supports the fourth transmission policy, step 210 is performed.
  • the specific manner of determining the specific manner in the embodiment of the present invention is not limited.
  • the process of determining the numerical relationship between the network bandwidth and the first preset value, the second preset value, and the third preset value may be:
  • step 203 Determining whether the network bandwidth is greater than or equal to the first preset value, and if yes, determining that the network bandwidth meets the first preset condition, and performing step 203; if not, determining whether the network bandwidth is greater than or equal to the second preset value, and if so, Then, it is determined that the network bandwidth meets the second preset condition, and step 205 is performed; if not, it is determined whether the network bandwidth is greater than or equal to the third preset value, and if yes, determining that the network bandwidth meets the third preset condition, and performing step 208 If not, it is determined that the network bandwidth meets the fourth preset condition, and step 210 is performed.
  • the actual preset value may be 100 kb/s
  • the second preset value may be 50 kb/s
  • the third preset value may be 10 kb/s.
  • the network bandwidth is unstable during network transmission, it may be determined whether the average value of the network bandwidth in the preset time period before the current time meets the first preset condition, the second preset condition, and the third pre-predetermined Set any of the conditions and the fourth preset condition.
  • the preset time period may be 0.2 seconds.
  • the network bandwidth instability during network transmission is eliminated, the reliability of the instant video coding is ensured, and the user experience is improved.
  • the instant video frame is transmitted through the conventional transmission mode.
  • the instant video frame is transmitted by using a conventional transmission manner.
  • the instant video frame is transmitted through the conventional transmission mode.
  • the instant video frame is transmitted through the conventional transmission mode.
  • the processing of the instant video can improve the utilization of the network bandwidth, save the network resources, improve the transmission efficiency of the instant video, and improve the user experience.
  • an importance matrix corresponding to the current instant video frame is generated; the process may be:
  • An importance matrix corresponding to the current instant video frame is generated according to the importance metric of all pixels in the current instant video frame after processing.
  • the current instant video frame is processed, the processed instant video frame is obtained, and the processed instant video frame is input into the video encoder.
  • the processed instant video frame is obtained according to the filtered current instant video frame, the current instant video frame, and the importance matrix.
  • the current instant video frame and the filtered current instant video frame may be merged on the basis of the importance matrix by using a preset generation algorithm to obtain the processed instant video frame.
  • the algorithm may be:
  • the matrix indicates the region of interest and the region of non-interest in the instant video frame. Therefore, the region of interest indicated by the importance matrix is reserved by the importance matrix, and the non-interest region in the low-pass filtered instant video frame is used to replace the instant region.
  • the image of the region of interest in the processed processed instant video frame is an undistorted original image
  • the image of the non-interest region is an image that does not include a high-frequency signal, so that after the processing is transmitted Instant
  • the bandwidth resources required for transmission are reduced, the transmission efficiency of the instant video is improved, and the user experience is improved.
  • the processed instant video frame is input to the encoder, and the processed instant video frame is encoded by the encoder to generate code stream data;
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • step 203 to step 204 a process of transmitting a current instant video frame including an area of interest according to the first transmission policy is implemented, and the process may be implemented in other manners in addition to the manner described in the foregoing steps.
  • the specific embodiments of the invention are not limited.
  • the embodiment of the present invention processes the current instant video frame according to the importance matrix, and the importance matrix indicates the importance metric value of each pixel in the current instant video, thereby processing each pixel point, thereby improving the processing.
  • the picture quality of the instant video further enhances the user experience.
  • the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
  • the processed current instant video frame may be divided into at least one macroblock according to a preset division rule, and the specific division rule is not limited in the embodiment of the present invention.
  • the quantization parameter of the macroblock including all or part of the interest area to the first value; since the value of the quantization parameter ranges from 0 to 51 in practical applications, the first value may be between 0 and 25 Or any value defined by any of the systems.
  • the quantization parameter of the macroblock not including all or part of the region of interest is set to a second value; the second value may be any value defined by any one of the user or system between 25 and 51.
  • the quantization parameter of the macroblock including all or part of the region of interest is the first value.
  • more details of the region of interest are reserved, so that the image quality of the region of interest can be ensured in the process of instant video, and the user is interested in The requirements of the detailed picture of the area further enhance the user experience.
  • the mutual attention and the picture quality of the interest area in the instant video such as the area where the face is located are greater than other areas, so the macro block not including all or part of the interest area may be set.
  • the quantization parameter is a second value.
  • the details of the macroblock that does not include all or part of the region of interest are not reserved, and the bandwidth occupied by the macroblocks that do not include all or part of the region of interest is reduced.
  • the method requires less bandwidth resources, thereby further saving bandwidth resources, improving the efficiency of instant video transmission, and improving the user experience.
  • the quantization parameter of the macroblock including all or part of the region of interest is set to the second value, so that the region of interest is reserved during the encoding process.
  • the details of the non-interest area are not preserved, so that the bandwidth occupied by the non-interest area during transmission is further reduced on the basis of undistorted transmission of the interest area, so that compared with the traditional instant video transmission method
  • the method can not only ensure the picture quality of the region of interest, but also requires less bandwidth resources, thereby further saving bandwidth resources, improving the efficiency of instant video transmission, and improving the user experience.
  • the processed instant video frame is encoded according to the first value and the second value.
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • step 205 to step 207 a process of transmitting a current instant video frame including an area of interest according to the second transmission policy is implemented, and the process may be implemented according to other manners, in addition to the manner described in the foregoing steps.
  • the specific embodiments of the invention are not limited.
  • the details of the region of interest are retained during the encoding process, and the non-interest region is fine
  • the section is not reserved, not only uses more broadband resources for the transmission of the interest area, but also ensures the picture quality of the interest area in the instant video, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video, and improving the efficiency. user experience.
  • the process ends, and after the end, the instant video frame is transmitted through the conventional transmission mode.
  • step 203 may also be performed.
  • the location parameter and the pose parameter of the region of interest are obtained from the current instant video frame.
  • the position parameter and the attitude parameter are normalized to generate a standard position parameter and a standard posture parameter.
  • the attitude parameter of the region of interest in the reference frame is a standard gesture parameter.
  • the attitude parameter of the region of interest in the current video frame and the gesture parameter of the region of interest in the reference frame are standard gesture parameters
  • the current location video frame and the reference frame including the region of interest are obtained according to the standard location parameter and the standard gesture parameter.
  • the residual data generates residual data compared to the position parameter and the position parameter in the reference frame according to the posture parameter position parameter of the interest region in the current instant video frame, thereby reducing the data transmission amount and the processing amount in the instant video transmission process. It further improves the transmission efficiency of instant video and improves the user experience.
  • the method further reduces the instantaneous video transmission compared to the conventional instant video transmission method.
  • the amount of data transmission and processing in the process further provides the transmission efficiency of the instant video and improves the user experience.
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • step 208 to step 209 a process of transmitting a current instant video frame including an area of interest according to the third transmission policy is implemented, and in addition to the manner described in the foregoing steps, The specific manner is not limited in the embodiment of the present invention.
  • the method further saves network bandwidth resources compared to the conventional transmission of all the instant video frames, and ensures the instant video.
  • the picture quality of the area of interest ensures the transmission of the area of interest, thereby further improving the transmission efficiency of the instant video and improving the user experience.
  • the process ends, and after the end, the instant video frame is transmitted by the conventional transmission mode.
  • step 205 and step 203 may also be performed before step 208 is performed.
  • the region of interest is triangulated to obtain at least one triangular region.
  • the attitude parameter and the position parameter corresponding to any one of the triangular regions are generated.
  • the attitude parameter and the position parameter of the triangular area indicate the current position and posture of the triangular area
  • driving of the triangular area can be realized, and the posture of at least one triangular area constituting the interest area in the current instant video is adopted.
  • the parameter and the position parameter are used to adjust the attitude parameter and the position parameter of the same triangular area in the transmitted instant video frame, so as to migrate the interest area in the current instant video frame to the already transmitted instant video frame, compared to transmitting the current live video.
  • the frame further saves network bandwidth, improves the transmission efficiency of instant video, and improves the user experience.
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • step 210 to step 211 a process of transmitting a current instant video frame including an area of interest according to the fourth transmission policy is implemented, and in addition to the manner described in the foregoing steps, The specific manner is not limited in the embodiment of the present invention.
  • the bandwidth resource is further saved compared to transmitting all the instant video frame data, thereby further improving the transmission efficiency of the instant video and improving the user experience.
  • the process ends, and after the end, the instant video frame is transmitted through the conventional transmission mode.
  • the present invention provides a method for transmitting an instant video, which can be determined according to whether the network bandwidth satisfies any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition.
  • Low network bandwidth adopts different transmission strategies for real-time video. Compared with traditional instant video transmission methods, this method improves network bandwidth utilization and saves network resources, thereby improving the efficiency of real-time video transmission and improving users.
  • the method according to the embodiment of the present invention processes the current instant video frame after acquiring the region of interest from the current instant video frame, so that the bandwidth resource is unchanged compared to the conventional instant video encoding method.
  • the embodiment of the present invention processes the current instant video frame according to the importance matrix, and the importance matrix indicates the importance metric value of each pixel in the current instant video, thereby processing each pixel point, thereby improving The picture quality of the processed instant video further enhances the user experience.
  • the details of the region of interest are preserved during the encoding process, and the details of the non-interest region are not retained.
  • the method further saves network bandwidth resources and ensures instantness compared to conventional transmission of all real-time video frames.
  • the picture quality of the interest area in the video ensures the transmission of the interest area, thereby further improving the transmission efficiency of the instant video and improving the user experience.
  • by transmitting only The feature parameters used to describe the interest area further save bandwidth resources compared to transmitting all the real-time video frame data, thereby further improving the transmission efficiency of the instant video and improving the user experience.
  • An embodiment of the present invention provides an electronic device 3.
  • the electronic device 3 includes:
  • the obtaining module 31 is configured to acquire an area of interest in the current instant video frame.
  • the determining module 32 is configured to determine whether the network bandwidth meets any one of the first preset condition, the second preset condition, the third preset condition, and the fourth preset condition;
  • the first processing module 33 is configured to: when the network bandwidth meets the first preset condition, transmit the current instant video frame including the interest area according to the first transmission policy; or
  • the second processing module 34 is configured to: when the network bandwidth meets the second preset condition, transmit the current instant video frame including the interest area according to the second transmission policy; or
  • the third processing module 35 is configured to: when the network bandwidth meets the third preset condition, transmit the current instant video frame including the interest area according to the third transmission policy; or
  • the fourth processing module 36 is configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the interest area according to the fourth transmission policy.
  • the obtaining module 31 is specifically configured to:
  • the first processing module 33 is specifically configured to:
  • the current instant video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
  • the first processing module 33 is specifically configured to:
  • the current instant video frame is processed, the processed instant video frame is obtained, and the processed instant video frame is input into the video encoder.
  • the first processing module 33 is specifically configured to:
  • An importance matrix corresponding to the current instant video frame is generated according to the importance metric of all pixels in the current instant video frame after processing.
  • the second processing module 34 is specifically configured to:
  • the second processing module 34 is specifically configured to:
  • a quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
  • the third processing module 35 is specifically configured to:
  • the third processing module 35 is specifically configured to:
  • the fourth processing module 36 is specifically configured to:
  • the fourth processing module 36 is specifically configured to:
  • the fourth processing module 36 is specifically configured to:
  • the present invention provides an electronic device, which can determine whether the network bandwidth satisfies any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition.
  • Low network bandwidth adopts different transmission strategies for real-time video. Compared with traditional instant video transmission methods, this method improves network bandwidth utilization and saves network resources, thereby improving the efficiency of real-time video transmission and improving users.
  • the method according to the embodiment of the present invention processes the current instant video frame after acquiring the region of interest from the current instant video frame, so that the bandwidth resource is unchanged compared to the conventional instant video encoding method. In the case, more broadband resources are used for the transmission of the interest area, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video and improving the user experience.
  • the electronic device 5 includes a sending module 41, a memory 42 and a sending module 41.
  • the memory 42 is connected to the processor 43, wherein the memory 42 is used to store a The group program code, the processor 43 calls the program code stored in the memory 42 for performing the following operations:
  • the current instant video frame including the region of interest is transmitted according to the fourth transmission policy.
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the current instant video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the current instant video frame is processed, the processed instant video frame is obtained, and the processed instant video frame is input into the video encoder.
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • An importance matrix corresponding to the current instant video frame is generated according to the importance metric of all pixels in the current instant video frame after processing.
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • a quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the processor 43 calls the program code stored in the memory 42 to perform the following operations:
  • the present invention provides an electronic device, which can determine whether the network bandwidth satisfies any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition.
  • Low network bandwidth adopts different transmission strategies for real-time video. Compared with traditional instant video transmission methods, this method improves network bandwidth utilization and saves network resources, thereby improving the efficiency of real-time video transmission and improving users.
  • the method according to the embodiment of the present invention processes the current instant video frame after acquiring the region of interest from the current instant video frame, so that the bandwidth resource is unchanged compared to the conventional instant video encoding method. In the case, more broadband resources are used for the transmission of the interest area, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video and improving the user experience.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

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

Abstract

The invention relates to the field of video technology. Disclosed are a real-time video transmission method and an electronic apparatus comprising: acquiring, from a current real-time video frame, a region of interest (ROI); if a network bandwidth meets a first preset condition, transmitting, according to a first transmission strategy, the current real-time video frame comprising the ROI; if the network bandwidth meets a second preset condition, transmitting, according to a second transmission strategy, the current real-time video frame comprising the ROI; if the network bandwidth meets a third preset condition, transmitting, according to a third transmission strategy, the current real-time video frame comprising the ROI; and if the network bandwidth meets a fourth preset condition, transmitting, according to a fourth transmission strategy, the current real-time video frame comprising the ROI. According to different network bandwidths, different transmission strategies are adopted for a real-time video so as to facilitate utilization of the network bandwidths and save network resources, thereby increasing an efficiency in transmitting the real-time video and improving user experience.

Description

一种即时视频的传输方法和电子设备Instant video transmission method and electronic device 技术领域Technical field
本发明涉及视频领域,特别涉及一种即时视频的传输方法和电子设备。The present invention relates to the field of video, and in particular, to a method and a device for transmitting instant video.
背景技术Background technique
随着移动设备和即时视频通讯技术的普及,越来越多的用户选择利用移动设备实现即时视频的交互,使得需要提供一种即时视频的传输方法,实现即时视频的传输,以满足用户日益增长的即时视频交互需求。With the popularization of mobile devices and instant video communication technologies, more and more users choose to use mobile devices to realize real-time video interaction, which necessitates providing an instant video transmission method to realize real-time video transmission to meet the growing user demand. Instant video interaction needs.
现有技术提供了一种即时视频的传输方法,该方法包括:获取用户输入的即时视频;对即时视频帧内的所有区域采用统一的编码方式进行编码;传输该编码后的即时视频。The prior art provides a method for transmitting an instant video. The method includes: acquiring an instant video input by a user; encoding a uniform encoding manner for all areas in the instant video frame; and transmitting the encoded real-time video.
由于网络带宽的限制以及不稳定性,使得在使用现有技术所提供的方法时,在网络带宽较低的情况下,会导致即时视频传输的效率降低,出现即时视频画面的传输停止,即时视频连接断开等现象,从而降低了即时视频交互过程中的用户体验。Due to the limitation and instability of the network bandwidth, when the method provided by the prior art is used, when the network bandwidth is low, the efficiency of the instant video transmission is reduced, and the transmission of the instant video picture is stopped, and the video is instantaneous. The connection is disconnected, which reduces the user experience during instant video interaction.
发明内容Summary of the invention
为了提高即时视频的传输效率,提高用户体验,本发明提供了一种即时视频的传输方法和电子设备。所述技术方案如下:In order to improve the transmission efficiency of the instant video and improve the user experience, the present invention provides an instant video transmission method and an electronic device. The technical solution is as follows:
第一方面,提供了一种即时视频的传输方法,所述方法包括:In a first aspect, a method for transmitting an instant video is provided, the method comprising:
在当前即时视频帧中获取兴趣区域;Obtaining an area of interest in the current instant video frame;
根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,执行以下操作中的任意一个: Perform any of the following operations based on the preset conditions that the network bandwidth meets and the transmission policies supported by the electronic device:
若网络带宽满足第一预设条件,则根据第一传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the first preset condition, transmitting the current instant video frame including the interest area according to the first transmission policy; or
若所述网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting the current instant video frame including the interest area according to the second transmission policy; or
若所述网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting the current instant video frame including the interest area according to the third transmission policy; or
若所述网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述兴趣区域的所述当前即时视频帧。If the network bandwidth meets the fourth preset condition, transmitting the current instant video frame including the interest area according to the fourth transmission policy.
结合第一方面,在第一种可能的实现方式中,所述在当前即时视频帧中获取兴趣区域包括:With reference to the first aspect, in a first possible implementation manner, the acquiring an area of interest in the current instant video frame includes:
获取用于指示所述兴趣区域的第一特征参数;Obtaining a first feature parameter for indicating the region of interest;
根据所述第一特征参数,从当前即时视频帧中获取所述兴趣区域。Obtaining the region of interest from the current instant video frame according to the first feature parameter.
结合第一方面或第一方面的第一种可能的实现方式中,在第二种可能的实现方式中,所述根据第一传输策略,传输包括所述兴趣区域的所述当前即时视频帧包括:With reference to the first aspect, or the first possible implementation manner of the first aspect, in a second possible implementation manner, the transmitting, according to the first transmission policy, the current instant video frame that includes the region of interest includes :
根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中,所述根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧包括:With reference to the second possible implementation of the first aspect, in a third possible implementation, the current real-time video is processed according to an importance matrix corresponding to the current instant video frame, and the processing is performed. The following instant video frames include:
根据所述兴趣区域,生成与所述当前即时视频帧对应的重要性矩阵;Generating an importance matrix corresponding to the current instant video frame according to the region of interest;
根据所述重要性矩阵,对所述当前即时视频帧进行处理,获取处理后的即时视频帧,并将所述处理后的即时视频帧输入视频编码器。And processing, according to the importance matrix, the current instant video frame, acquiring the processed instant video frame, and inputting the processed instant video frame into the video encoder.
结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中,所述根据所述兴趣区域,生成与所述当前即时视频帧对应的重要性矩阵包括: With reference to the third possible implementation manner of the foregoing aspect, in a fourth possible implementation, the generating an importance matrix corresponding to the current instant video frame according to the region of interest includes:
设置所述当前即时视频帧内所有像素点的重要性度量值;Setting an importance metric value of all pixels in the current instant video frame;
对所述兴趣区域进行低通滤波处理,生成处理后的当前即时视频帧;Performing low-pass filtering processing on the region of interest to generate a processed current instant video frame;
根据所述处理后的当前即时视频帧内所有像素点的重要性度量值,生成所述与所述当前即时视频帧对应的重要性矩阵。Generating the importance matrix corresponding to the current instant video frame according to the importance metric of all the pixels in the current current video frame.
结合第一方面至第一方面的第四种任一可能的实现方式,在第五种可能的实现方式中,所述根据第二传输策略,传输包括所述兴趣区域的所述当前即时视频帧策略包括:With reference to the first aspect, the fourth possible implementation of the fourth aspect, in a fifth possible implementation, the transmitting the current instant video frame that includes the region of interest according to the second transmission policy Strategies include:
将至少包括所述兴趣区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least the region of interest into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧;Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
结合第一方面的第五种可能的实现方式,在第六种可能的实现方式中,所述设置组成所述至少一个宏块所对应的量化参数包括:With reference to the fifth possible implementation manner of the foregoing aspect, in a sixth possible implementation, the setting, by the setting, the quantization parameter corresponding to the at least one macroblock includes:
将所述处理后的当前即时视频帧划分为至少一个宏块;Dividing the processed current instant video frame into at least one macroblock;
设置包括全部或者部分所述兴趣区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the region of interest as a first value;
设置不包括所述全部或者部分所述兴趣区域的宏块的量化参数为第二数值。A quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
结合第一方面至第一方面的第六种可能的实现方式,在第七种可能的实现方式中,所述根据第三传输策略,传输包括所述兴趣区域的所述当前即时视频帧包括:With reference to the first aspect to the sixth possible implementation of the first aspect, in a seventh possible implementation, the transmitting, according to the third transmission policy, the current instant video frame that includes the region of interest includes:
获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame and the reference frame including the region of interest;
传输所述残差数据。Transmitting the residual data.
结合第一方面的第七种可能的实现方式中,在第八种可能的实现方式中,所述获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据包括:With reference to the seventh possible implementation manner of the foregoing aspect, in an eighth possible implementation manner, the acquiring the residual data between the current instant video frame and the reference frame that includes the region of interest includes:
获取所述兴趣区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the interest area;
对所述位置参数与所述姿态参数进行归一化处理,生成标准位置参数与标 准姿态参数;Normalizing the position parameter and the posture parameter to generate a standard position parameter and a standard Quasi-pose parameter
根据所述标准位置参数与所述标准姿态参数,获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region of interest according to the standard location parameter and the standard gesture parameter.
结合第一方面,在第九种可能的实现方式中,所述根据第四传输策略,传输包括所述兴趣区域的所述当前即时视频帧包括:With reference to the first aspect, in a ninth possible implementation manner, the transmitting, according to the fourth transmission policy, the current instant video frame that includes the region of interest includes:
获取用于描述所述兴趣区域的第二特征参数;Obtaining a second feature parameter for describing the region of interest;
传输所述第二特征参数。Transmitting the second characteristic parameter.
结合第一方面的第九种可能的实现方式中,在第十种可能的实现方式中,所述获取用于描述所述兴趣区域的第二特征参数包括:In conjunction with the ninth possible implementation manner of the first aspect, in the tenth possible implementation manner, the acquiring, by using the second feature parameter, the second feature parameter is:
对所述兴趣区域进行三角分割,获取至少一个三角区域;Performing triangulation on the region of interest to acquire at least one triangular region;
获取所述至少一个三角区域对应的姿态参数和位置参数;Acquiring the attitude parameter and the position parameter corresponding to the at least one triangular area;
根据所述至少一个三角区域对应的姿态参数和位置参数,生成所述第二特征参数。Generating the second feature parameter according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
结合第一方面的第十种可能的实现方式中,在第十一种可能的实现方式中,所述获取所述至少一个三角区域的姿态参数和位置参数包括:In conjunction with the tenth possible implementation manner of the first aspect, in the eleventh possible implementation manner, the acquiring the posture parameter and the location parameter of the at least one triangular region includes:
获取用于描述任意一个三角区域的三个特征点的位置参数和姿态参数;Obtaining position parameters and attitude parameters for describing three feature points of any one of the triangular regions;
根据所述三个特征点的位置参数和姿态参数,生成与所述任意一个三角区域对应的姿态参数和位置参数;Generating a posture parameter and a position parameter corresponding to the arbitrary one of the triangular regions according to the position parameter and the posture parameter of the three feature points;
以此类推,获取所述至少一个三角区域对应的姿态参数和位置参数。And so on, acquiring the attitude parameter and the position parameter corresponding to the at least one triangular region.
第二方面,提供了一种电子设备,所述电子设备包括:In a second aspect, an electronic device is provided, the electronic device comprising:
获取模块,在当前即时视频帧中获取兴趣区域;Obtaining a module, acquiring an area of interest in the current instant video frame;
判决模块,用于判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个;a determining module, configured to determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition;
所述判决模块还用于根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,触发以下模块中的任意一个:The decision module is further configured to trigger any one of the following modules according to a preset condition that the network bandwidth meets and a transmission policy supported by the electronic device:
第一处理模块,用于在所述网络带宽满足第一预设条件时,根据第一传输 策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,a first processing module, configured to: according to the first transmission, when the network bandwidth meets a first preset condition a policy of transmitting the current instant video frame including the region of interest; or
第二处理模块,用于在所述网络带宽满足第二预设条件时,根据第二传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,a second processing module, configured to: when the network bandwidth meets a second preset condition, transmit the current instant video frame that includes the interest area according to a second transmission policy; or
第三处理模块,用于在所述网络带宽满足第三预设条件时,根据第三传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,a third processing module, configured to: when the network bandwidth meets a third preset condition, transmit the current instant video frame including the interest area according to a third transmission policy; or
第四处理模块,用于在所述网络带宽满足第四预设条件时,根据第四传输策略,传输包括所述兴趣区域的所述当前即时视频帧。And a fourth processing module, configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the interest area according to the fourth transmission policy.
结合第二方面,在第一种可能的实现方式中,所述获取模块具体用于:With reference to the second aspect, in a first possible implementation manner, the acquiring module is specifically configured to:
获取用于指示所述兴趣区域的第一特征参数;Obtaining a first feature parameter for indicating the region of interest;
根据所述第一特征参数,从当前即时视频帧中获取所述兴趣区域。Obtaining the region of interest from the current instant video frame according to the first feature parameter.
结合第二方面或第二方面的第一种可能的实现方式中,在第二种可能的实现方式中,所述第一处理模块具体用于:With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner, the first processing module is specifically configured to:
根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
结合第二方面的第二种可能的实现方式中,在第三种可能的实现方式中,所述第一处理模块具体用于:In conjunction with the second possible implementation of the second aspect, in a third possible implementation, the first processing module is specifically configured to:
根据所述兴趣区域,生成与所述当前即时视频帧对应的重要性矩阵;Generating an importance matrix corresponding to the current instant video frame according to the region of interest;
根据所述重要性矩阵,对所述当前即时视频帧进行处理,获取处理后的即时视频帧,并将所述处理后的即时视频帧输入视频编码器。And processing, according to the importance matrix, the current instant video frame, acquiring the processed instant video frame, and inputting the processed instant video frame into the video encoder.
结合第二方面的第三种可能的实现方式中,在第四种可能的实现方式中,所述第一处理模块具体用于:In conjunction with the third possible implementation of the second aspect, in a fourth possible implementation, the first processing module is specifically configured to:
设置所述当前即时视频帧内所有像素点的重要性度量值;Setting an importance metric value of all pixels in the current instant video frame;
对所述兴趣区域进行低通滤波处理,生成处理后的当前即时视频帧;Performing low-pass filtering processing on the region of interest to generate a processed current instant video frame;
根据所述处理后的当前即时视频帧内所有像素点的重要性度量值,生成所述与所述当前即时视频帧对应的重要性矩阵。 Generating the importance matrix corresponding to the current instant video frame according to the importance metric of all the pixels in the current current video frame.
结合第二方面至第二方面的第四种可能的实现方式,在第五种可能的实现方式中,所述第二处理模块具体用于:With reference to the second aspect to the fourth possible implementation of the second aspect, in a fifth possible implementation, the second processing module is specifically configured to:
将至少包括所述兴趣区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least the region of interest into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧;Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
结合第二方面的第五种可能的实现方式,在第六种可能的实现方式中,所述第二处理模块具体用于:With reference to the fifth possible implementation of the second aspect, in a sixth possible implementation, the second processing module is specifically configured to:
将所述处理后的当前即时视频帧划分为至少一个宏块;Dividing the processed current instant video frame into at least one macroblock;
设置包括全部或者部分所述兴趣区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the region of interest as a first value;
设置不包括所述全部或者部分所述兴趣区域的宏块的量化参数为第二数值。A quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
结合第二方面至第二方面的第六种可能的实现方式,在第七种可能的实现方式中,所述第三处理模块具体用于:With reference to the second aspect to the sixth possible implementation of the second aspect, in a seventh possible implementation, the third processing module is specifically configured to:
获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame and the reference frame including the region of interest;
传输所述残差数据。Transmitting the residual data.
结合第二方面的第七种可能的实现方式,在第八种可能的实现方式中,所述第三处理模块具体用于:With reference to the seventh possible implementation of the second aspect, in the eighth possible implementation, the third processing module is specifically configured to:
获取所述兴趣区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the interest area;
对所述位置参数与所述姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the posture parameter to generate a standard position parameter and a standard posture parameter;
根据所述标准位置参数与所述标准姿态参数,获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region of interest according to the standard location parameter and the standard gesture parameter.
结合第二方面,在第九种可能的实现方式中,所述第四处理模块具体用于:With reference to the second aspect, in a ninth possible implementation manner, the fourth processing module is specifically configured to:
获取用于描述所述兴趣区域的第二特征参数;Obtaining a second feature parameter for describing the region of interest;
传输所述第二特征参数。 Transmitting the second characteristic parameter.
结合第二方面的第九种可能的实现方式,在第十种可能的实现方式中,所述第四处理模块具体用于:With reference to the ninth possible implementation of the second aspect, in a tenth possible implementation, the fourth processing module is specifically configured to:
对所述兴趣区域进行三角分割,获取至少一个三角区域;Performing triangulation on the region of interest to acquire at least one triangular region;
获取所述至少一个三角区域对应的姿态参数和位置参数;Acquiring the attitude parameter and the position parameter corresponding to the at least one triangular area;
根据所述至少一个三角区域对应的姿态参数和位置参数,生成所述第二特征参数。Generating the second feature parameter according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
结合第二方面的第十种可能的实现方式,在第十一种可能的实现方式中,所述第四处理模块具体用于:With reference to the tenth possible implementation of the second aspect, in the eleventh possible implementation, the fourth processing module is specifically configured to:
获取用于描述任意一个三角区域的三个特征点的位置参数和姿态参数;Obtaining position parameters and attitude parameters for describing three feature points of any one of the triangular regions;
根据所述三个特征点的位置参数和姿态参数,生成与所述任意一个三角区域对应的姿态参数和位置参数;Generating a posture parameter and a position parameter corresponding to the arbitrary one of the triangular regions according to the position parameter and the posture parameter of the three feature points;
以此类推,获取所述至少一个三角区域对应的姿态参数和位置参数。And so on, acquiring the attitude parameter and the position parameter corresponding to the at least one triangular region.
第三方面,提供了一种电子设备,所述电子设备包括发送模块、存储器和与所述发送模块,所述存储器连接处理器,其中,所述存储器用于存储一组程序代码,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In a third aspect, an electronic device is provided, the electronic device comprising a transmitting module, a memory, and the transmitting module, the memory connecting processor, wherein the memory is configured to store a set of program codes, the processing The program code stored by the memory is used to perform the following operations:
在当前即时视频帧中获取兴趣区域;Obtaining an area of interest in the current instant video frame;
根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,执行以下操作中的任意一个:Perform any of the following operations based on the preset conditions that the network bandwidth meets and the transmission policies supported by the electronic device:
若网络带宽满足第一预设条件,则根据第一传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the first preset condition, transmitting the current instant video frame including the interest area according to the first transmission policy; or
若所述网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting the current instant video frame including the interest area according to the second transmission policy; or
若所述网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting the current instant video frame including the interest area according to the third transmission policy; or
若所述网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述兴趣区域的所述当前即时视频帧。 If the network bandwidth meets the fourth preset condition, transmitting the current instant video frame including the interest area according to the fourth transmission policy.
结合第三方面,在第一种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the third aspect, in a first possible implementation, the processor invokes program code stored in the memory to perform the following operations:
获取用于指示所述兴趣区域的第一特征参数;Obtaining a first feature parameter for indicating the region of interest;
根据所述第一特征参数,从当前即时视频帧中获取所述兴趣区域。Obtaining the region of interest from the current instant video frame according to the first feature parameter.
结合第三方面或第三方面的第一种可能的实现方式中,,在第二种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In combination with the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner, the processor invokes the program code stored by the memory to perform the following operations:
根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
结合第三方面的第二种可能的实现方式,在第三种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the second possible implementation of the third aspect, in a third possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
根据所述兴趣区域,生成与所述当前即时视频帧对应的重要性矩阵;Generating an importance matrix corresponding to the current instant video frame according to the region of interest;
根据所述重要性矩阵,对所述当前即时视频帧进行处理,获取处理后的即时视频帧,并将所述处理后的即时视频帧输入视频编码器。And processing, according to the importance matrix, the current instant video frame, acquiring the processed instant video frame, and inputting the processed instant video frame into the video encoder.
结合第三方面的第三种可能的实现方式,在第四种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the third possible implementation of the third aspect, in a fourth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
设置所述当前即时视频帧内所有像素点的重要性度量值;Setting an importance metric value of all pixels in the current instant video frame;
对所述兴趣区域进行低通滤波处理,生成处理后的当前即时视频帧;Performing low-pass filtering processing on the region of interest to generate a processed current instant video frame;
根据所述处理后的当前即时视频帧内所有像素点的重要性度量值,生成所述与所述当前即时视频帧对应的重要性矩阵。Generating the importance matrix corresponding to the current instant video frame according to the importance metric of all the pixels in the current current video frame.
结合第三方面至第三方面的第四种任一可能的实现方式,在第五种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:With reference to any of the third aspect to the fourth possible implementation of the third aspect, in a fifth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
将至少包括所述兴趣区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least the region of interest into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧; Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
结合第三方面的第五种可能的实现方式,在第六种可能的实现方式中,,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the fifth possible implementation of the third aspect, in a sixth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
将所述处理后的当前即时视频帧划分为至少一个宏块;Dividing the processed current instant video frame into at least one macroblock;
设置包括全部或者部分所述兴趣区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the region of interest as a first value;
设置不包括所述全部或者部分所述兴趣区域的宏块的量化参数为第二数值。A quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
结合第三方面至第三方面的第六种可能的实现方式,在第七种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:With reference to the third aspect to the sixth possible implementation of the third aspect, in a seventh possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame and the reference frame including the region of interest;
传输所述残差数据。Transmitting the residual data.
结合第一方面的第七种可能的实现方式中,在第八种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the seventh possible implementation of the first aspect, in an eighth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
获取所述兴趣区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the interest area;
对所述位置参数与所述姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the posture parameter to generate a standard position parameter and a standard posture parameter;
根据所述标准位置参数与所述标准姿态参数,获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region of interest according to the standard location parameter and the standard gesture parameter.
结合第一方面,在第九种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the first aspect, in a ninth possible implementation, the processor invokes program code stored in the memory to perform the following operations:
获取用于描述所述兴趣区域的第二特征参数;Obtaining a second feature parameter for describing the region of interest;
传输所述第二特征参数。Transmitting the second characteristic parameter.
结合第三方面的第九种可能的实现方式中,在第十种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the ninth possible implementation of the third aspect, in a tenth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
对所述兴趣区域进行三角分割,获取至少一个三角区域;Performing triangulation on the region of interest to acquire at least one triangular region;
获取所述至少一个三角区域对应的姿态参数和位置参数;Acquiring the attitude parameter and the position parameter corresponding to the at least one triangular area;
根据所述至少一个三角区域对应的姿态参数和位置参数,生成所述第二特 征参数。Generating the second special according to the attitude parameter and the position parameter corresponding to the at least one triangular region Sign the parameters.
结合第三方面的第十种可能的实现方式中,在第十一种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the tenth possible implementation of the third aspect, in an eleventh possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
获取用于描述任意一个三角区域的三个特征点的位置参数和姿态参数;Obtaining position parameters and attitude parameters for describing three feature points of any one of the triangular regions;
根据所述三个特征点的位置参数和姿态参数,生成与所述任意一个三角区域对应的姿态参数和位置参数;Generating a posture parameter and a position parameter corresponding to the arbitrary one of the triangular regions according to the position parameter and the posture parameter of the three feature points;
以此类推,获取所述至少一个三角区域对应的姿态参数和位置参数。And so on, acquiring the attitude parameter and the position parameter corresponding to the at least one triangular region.
本发明提供了一种即时视频的编码方法和电子设备,包括:在当前即时视频帧中获取兴趣区域;根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,执行以下操作中的任意一个:若网络带宽满足第一预设条件,则根据第一传输策略,传输包括兴趣区域的当前即时视频帧;若网络带宽满足第二预设条件,则根据第二传输策略,传输包括兴趣区域的当前即时视频帧;若网络带宽满足第三预设条件,则根据第三传输策略,传输包括兴趣区域的当前即时视频帧;若网络带宽满足第四预设条件,则根据第四传输策略,传输包括兴趣区域的当前即时视频帧。通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽低对即时视频采取不同的传输策略,相比于传统的即时视频的传输方法,该方法提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例所述的方法是在从当前即时视频帧中获取兴趣区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于兴趣区域的传输,从而保证了兴趣区域的传输,进一步提高了即时视频的传输效率,提高了用户体验。The present invention provides an instant video encoding method and an electronic device, including: acquiring an interest region in a current instant video frame; performing the following operations according to a preset condition that the network bandwidth satisfies and a transmission policy supported by the electronic device; Any one of the following: if the network bandwidth meets the first preset condition, transmitting the current instant video frame including the interest area according to the first transmission policy; if the network bandwidth meets the second preset condition, transmitting, including the interest according to the second transmission policy The current instant video frame of the area; if the network bandwidth meets the third preset condition, transmitting the current instant video frame including the interest area according to the third transmission policy; and if the network bandwidth satisfies the fourth preset condition, according to the fourth transmission policy The transmission includes the current live video frame of the region of interest. By determining whether the network bandwidth meets any one of the first preset condition, the second preset condition, the third preset condition, and the fourth preset condition, different transmission strategies may be adopted for the live video according to different network bandwidths. Compared with the traditional method for transmitting a real-time video, the method improves the utilization of the network bandwidth and saves the network resources, thereby improving the transmission efficiency of the instant video and improving the user experience. In addition, as described in the embodiment of the present invention, The method is: after obtaining the region of interest from the current instant video frame, processing the current instant video frame, so that more bandwidth resources are used in the case that the bandwidth resources are unchanged compared to the conventional real-time video encoding method. The transmission of the interest area ensures the transmission of the interest area, further improves the transmission efficiency of the instant video and improves the user experience.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following description will be made on the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are incorporated in the drawings The drawings obtain other figures.
图1是本发明实施例提供的一种即时视频的传输方法流程图;FIG. 1 is a flowchart of a method for transmitting instant video according to an embodiment of the present invention;
图2是本发明实施例提供的一种即时视频的传输方法流程图;2 is a flowchart of a method for transmitting an instant video according to an embodiment of the present invention;
图3是本发明实施例提供的一种电子设备结构示意图;3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
图4是本发明实施例提供的一种电子设备结构示意图。FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. Some embodiments of the invention, rather than all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供了一种即时视频的编码方法,该方法用于一种至少包括两个电子设备的交互系统,其中,在该交互系统中,该至少两个电子设备通过运行自身所存储的应用程序实现即时视频的交互,电子设备至少包括发送/接收模块、视频输入模块以及具有触控功能的显示模块,该视频输入模块包括摄像头,显示模块可以包括显示屏,电子设备通过发送/接收模块实现即时视频的发送与接收,通过视频输入模块实现即时视频的输入,通过具有触控功能的显示模块实现即时视频的显示以及获取用户触发的指令。An embodiment of the present invention provides an instant video encoding method, where the method is used in an interactive system including at least two electronic devices, wherein in the interactive system, the at least two electronic devices are stored by running the self. The application implements real-time video interaction, and the electronic device includes at least a transmitting/receiving module, a video input module, and a display module having a touch function, the video input module includes a camera, the display module may include a display screen, and the electronic device passes the transmitting/receiving module Realizing the sending and receiving of instant video, realizing the input of instant video through the video input module, realizing the display of the instant video and obtaining the instruction triggered by the user through the display module with the touch function.
值得注意的是,上述交互系统仅仅是示例性的,是为了进一步说明本发明实施例所提供的方法,并非特指,本发明实施例对具体的交互系统不加以限定。It is to be noted that the above-mentioned interactive system is merely exemplary, and is used to further illustrate the method provided by the embodiment of the present invention. The specific embodiment of the present invention does not limit the specific interactive system.
实施例一Embodiment 1
本发明实施例提供了一种即时视频的传输方法,参照图1所示,该方法包括: An embodiment of the present invention provides a method for transmitting an instant video. Referring to FIG. 1, the method includes:
101、在当前即时视频帧中获取兴趣区域。101. Acquire an area of interest in the current instant video frame.
具体的,获取用于指示所述兴趣区域的第一特征参数;Specifically, acquiring a first feature parameter for indicating the area of interest;
根据所述第一特征参数,从当前即时视频帧中获取所述兴趣区域。Obtaining the region of interest from the current instant video frame according to the first feature parameter.
102、判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个;若网络带宽满足第一预设条件,且电子设备支持第一传输策略,则执行步骤103;若网络带宽满足第二预设条件,且电子设备支持第二传输策略,则执行步骤104;若网络带宽满足第三预设条件,且电子设备支持第三传输策略,则执行步骤105;若网络带宽满足第四预设条件,且电子设备支持第四传输策略,则执行步骤106。102. Determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition; if the network bandwidth meets the first preset condition, and the electronic device supports the first a transmission policy, step 103 is performed; if the network bandwidth meets the second preset condition, and the electronic device supports the second transmission policy, step 104 is performed; if the network bandwidth meets the third preset condition, and the electronic device supports the third transmission If the network bandwidth meets the fourth preset condition and the electronic device supports the fourth transmission policy, step 106 is performed.
103、根据第一传输策略,传输包括兴趣区域的当前即时视频帧,结束。103. According to the first transmission policy, transmit a current instant video frame including the area of interest, and end.
具体的,根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧;Specifically, the current live video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
传输处理后的即时视频帧。Transmit processed instant video frames.
若网络带宽满足第一预设条件,且电子设备不支持第一传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth meets the first preset condition, and the electronic device does not support the first transmission policy, the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
104、根据第二传输策略,传输包括兴趣区域的当前即时视频帧,结束。104. According to the second transmission policy, transmit the current instant video frame including the interest area, and end.
具体的,将至少包括兴趣区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数;Specifically, the instant video frame including at least the region of interest is divided into at least one macroblock, and the quantization parameter corresponding to the at least one macroblock is set;
根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧;Encoding at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输编码后的即时视频帧。Transmit the encoded instant video frame.
若网络带宽满足第二预设条件,且电子设备支持第二传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth meets the second preset condition, and the electronic device supports the second transmission policy, the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
105、根据第三传输策略,传输包括兴趣区域的当前即时视频帧,结束。105. According to the third transmission policy, transmit the current instant video frame including the interest area, and end.
具体的,获取包括兴趣区域的当前即时视频帧与参考帧之间的残差数据;Specifically, acquiring residual data between the current instant video frame and the reference frame including the region of interest;
传输残差数据。Transmit residual data.
若网络带宽满足第三预设条件,且电子设备不支持第三传输策略,则结束, 并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth meets the third preset condition, and the electronic device does not support the third transmission policy, the process ends. And after the end, the instant video frame is transmitted by conventional transmission.
106、根据第四传输策略,传输包括兴趣区域的当前即时视频帧,结束。106. According to the fourth transmission policy, transmit a current instant video frame including the interest area, and end.
具体的,获取用于描述兴趣区域的特征参数;Specifically, acquiring feature parameters for describing an area of interest;
传输特征参数。Transfer feature parameters.
若网络带宽满足第四预设条件,且电子设备不支持第四传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth satisfies the fourth preset condition, and the electronic device does not support the fourth transmission policy, the process ends, and after the end, the instant video frame is transmitted through the conventional transmission mode.
本发明提供了一种即时视频的传输方法,通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽低对即时视频采取不同的传输策略,相比于传统的即时视频的传输方法,该方法提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例所述的方法是在从当前即时视频帧中获取兴趣区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于兴趣区域的传输,从而保证了兴趣区域的传输,进一步提高了即时视频的传输效率,提高了用户体验。The present invention provides a method for transmitting an instant video, which can be determined according to whether the network bandwidth satisfies any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition. Low network bandwidth adopts different transmission strategies for real-time video. Compared with traditional instant video transmission methods, this method improves network bandwidth utilization and saves network resources, thereby improving the efficiency of real-time video transmission and improving users. In addition, the method according to the embodiment of the present invention processes the current instant video frame after acquiring the region of interest from the current instant video frame, so that the bandwidth resource is unchanged compared to the conventional instant video encoding method. In the case, more broadband resources are used for the transmission of the interest area, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video and improving the user experience.
实施例二Embodiment 2
本发明实施例提供了一种即时视频的传输方法,参照图2所示,该方法包括:An embodiment of the present invention provides a method for transmitting an instant video. Referring to FIG. 2, the method includes:
201、在当前即时视频帧中获取兴趣区域。201. Acquire an area of interest in the current instant video frame.
具体的,兴趣区域可以包括用户细节所在的区域,该用户细节包括人脸;兴趣区域还可以包括当前即时视频帧中所包括的屏幕所在的区域,除此之外,兴趣区域还还可以包括其他区域,本发明实施例对具体的兴趣区域不加以限定。Specifically, the area of interest may include an area where the user details are located, the user details include a face; the area of interest may also include an area where the screen included in the current instant video frame is located, and the area of interest may further include other areas. In the embodiment, the specific region of interest is not limited in the embodiment of the present invention.
为了方便说明,本发明实施例以兴趣区域为人脸所在的区域为例,该过程可以为:For convenience of description, the embodiment of the present invention takes the region where the region of interest is the face, for example, the process may be:
a、获取用于指示兴趣区域的第一特征参数;a. acquiring a first feature parameter for indicating an area of interest;
用于指示人脸所在区域的特征参数包括用于描述人脸的像素、特征点的位 置参数等,该特征点用于描述人脸的轮廓。The feature parameters for indicating the area where the face is located include pixels for describing the face and bits of the feature point. Set parameters, etc., which are used to describe the outline of a human face.
b、根据第一特征参数,从当前即时视频帧中获取兴趣区域。b. Acquire an area of interest from the current instant video frame according to the first feature parameter.
获取特征参数所指示的区域内所有像素点的参数,该像素点的参数包括像素点的位置参数,该位置参数用于唯一确定像素点。Obtaining parameters of all pixels in the region indicated by the feature parameter, the parameters of the pixel include a position parameter of the pixel point, and the position parameter is used to uniquely determine the pixel point.
由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等兴趣区域的关注度和画面质量要求大于其他区域,所以,可以通过本发明实施例所提供的方法,对兴趣区域进行不失真传输,对其他其余进行相应的低通滤波处理,去除高频信号,较少其他区域在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法所需的带宽资源更少,从而能够进一步节省带宽资源,提高即时视频传输的效率,提高用户体验。In the scenario of the instant video interaction, the interaction between the two parties in the instant video, such as the area where the face is located, and the image quality are greater than the other regions. Therefore, the method of the present invention can be used to Perform undistorted transmission, perform corresponding low-pass filtering on the rest, remove high-frequency signals, and reduce the bandwidth occupied by other areas during transmission, so that the bandwidth required by the method is compared to the conventional instant video transmission method. Fewer resources, which can further save bandwidth resources, improve the efficiency of instant video transmission, and improve the user experience.
202、判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个;若网络带宽满足第一预设条件,且电子设备支持第一传输策略,则执行步骤203;若网络带宽满足第二预设条件,且电子设备支持第二传输策略,则执行步骤205;若网络带宽满足第三预设条件,且电子设备支持第三传输策略,则执行步骤208;若网络带宽满足第四预设条件,且电子设备支持第四传输策略,则执行步骤210。202. Determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition; if the network bandwidth meets the first preset condition, and the electronic device supports the first a transmission policy, step 203 is performed; if the network bandwidth meets the second preset condition, and the electronic device supports the second transmission policy, step 205 is performed; if the network bandwidth meets the third preset condition, and the electronic device supports the third transmission If the network bandwidth meets the fourth preset condition and the electronic device supports the fourth transmission policy, step 210 is performed.
具体的,判断网络带宽与第一预设值、第二预设值和第三预设值之间的数值关系,本发明实施例对具体的判断方式不加以限定。Specifically, determining a numerical relationship between the network bandwidth and the first preset value, the second preset value, and the third preset value, the specific manner of determining the specific manner in the embodiment of the present invention is not limited.
若网络带宽大于或者等于第一预设值,则判定网络带宽满足第一预设条件;If the network bandwidth is greater than or equal to the first preset value, determining that the network bandwidth meets the first preset condition;
若网络带宽小于第一预设值,且大于或者等于第二预设值,则判定网络带宽满足第二预设条件;If the network bandwidth is less than the first preset value and greater than or equal to the second preset value, determining that the network bandwidth meets the second preset condition;
若网络带宽小于第二预设值,且大于或者等于第三预设值,则判定网络带宽满足第三预设条件;If the network bandwidth is less than the second preset value and greater than or equal to the third preset value, determining that the network bandwidth meets the third preset condition;
若网络带宽小于第三预设条件,则判定网络带宽满足第四预设条件。If the network bandwidth is less than the third preset condition, determining that the network bandwidth meets the fourth preset condition.
判断网络带宽与第一预设值、第二预设值和第三预设值之间的数值关系的过程可以为: The process of determining the numerical relationship between the network bandwidth and the first preset value, the second preset value, and the third preset value may be:
判断网络带宽是否大于或者等于第一预设值,若是,则判定网络带宽满足第一预设条件,并执行步骤203;若不是,则判断网络带宽是否大于或者等于第二预设值,若是,则判定网络带宽满足第二预设条件,并执行步骤205;若不是,则判断网络带宽是否大于或者等于第三预设值,若是,则判定网络带宽满足第三预设条件,并执行步骤208;若不是,则判定网络带宽满足第四预设条件,并执行步骤210。Determining whether the network bandwidth is greater than or equal to the first preset value, and if yes, determining that the network bandwidth meets the first preset condition, and performing step 203; if not, determining whether the network bandwidth is greater than or equal to the second preset value, and if so, Then, it is determined that the network bandwidth meets the second preset condition, and step 205 is performed; if not, it is determined whether the network bandwidth is greater than or equal to the third preset value, and if yes, determining that the network bandwidth meets the third preset condition, and performing step 208 If not, it is determined that the network bandwidth meets the fourth preset condition, and step 210 is performed.
其中,在实际应用中,第一预设值可以为100kb/s,第二预设值可以为50kb/s,第三预设值可以为10kb/s。The actual preset value may be 100 kb/s, the second preset value may be 50 kb/s, and the third preset value may be 10 kb/s.
可选的,由于网络传输时网络带宽的不稳定性,所以,可以判断当前时刻之前的预设时间段内网络带宽的平均值是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个。Optionally, because the network bandwidth is unstable during network transmission, it may be determined whether the average value of the network bandwidth in the preset time period before the current time meets the first preset condition, the second preset condition, and the third pre-predetermined Set any of the conditions and the fourth preset condition.
其中,在实际应用中,预设时间段可以为0.2秒。Among them, in practical applications, the preset time period may be 0.2 seconds.
通过判断当前时刻之间的预设时间段内网络带宽的平均值是否满足预设条件,消除了网络传输时网络带宽的不稳定性,保证了即时视频编码的可靠性,提高了用户体验。By determining whether the average value of the network bandwidth in the preset time period meets the preset condition, the network bandwidth instability during network transmission is eliminated, the reliability of the instant video coding is ensured, and the user experience is improved.
需要说明的是,若网络带宽大于或者等于第一预设值,且电子设备不支持第一传输策略,则通过常规的传输方式传输即时视频帧。It should be noted that if the network bandwidth is greater than or equal to the first preset value, and the electronic device does not support the first transmission policy, the instant video frame is transmitted through the conventional transmission mode.
若网络带宽小于第一预设值,大于或者等于第二预设值,且电子设备不支持第二传输策略,则通过常规的传输方式传输即时视频帧。If the network bandwidth is less than the first preset value, greater than or equal to the second preset value, and the electronic device does not support the second transmission policy, the instant video frame is transmitted by using a conventional transmission manner.
若网络带宽小于第二预设值,大于或者等于第三预设值,且电子设备不支持第三传输策略,则通过常规的传输方式传输即时视频帧。If the network bandwidth is less than the second preset value, greater than or equal to the third preset value, and the electronic device does not support the third transmission policy, the instant video frame is transmitted through the conventional transmission mode.
若网络带宽小于第三预设值,且电子设备不支持第四传输策略,则通过常规的传输方式传输即时视频帧。If the network bandwidth is less than the third preset value, and the electronic device does not support the fourth transmission policy, the instant video frame is transmitted through the conventional transmission mode.
由于通过判断网络带宽是否满足预设条件,所以在判定网络带宽低时,对即时视频进行处理,可以提高网络带宽的利用率,节省网络资源,提高了即时视频的传输效率,提高了用户体验。 By determining whether the network bandwidth meets the preset condition, when the network bandwidth is determined to be low, the processing of the instant video can improve the utilization of the network bandwidth, save the network resources, improve the transmission efficiency of the instant video, and improve the user experience.
203、根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧。203. Process the current instant video according to an importance matrix corresponding to the current instant video frame, and obtain the processed instant video frame.
具体的,根据兴趣区域,生成与当前即时视频帧对应的重要性矩阵;该过程可以是:Specifically, according to the region of interest, an importance matrix corresponding to the current instant video frame is generated; the process may be:
设置当前即时视频帧内所有像素点的重要性度量值;Set the importance metric of all pixels in the current instant video frame;
对兴趣区域进行低通滤波处理,生成处理后的当前即时视频帧;Performing low-pass filtering processing on the region of interest to generate a processed current instant video frame;
根据处理后的当前即时视频帧内所有像素点的重要性度量值,生成与当前即时视频帧对应的重要性矩阵。An importance matrix corresponding to the current instant video frame is generated according to the importance metric of all pixels in the current instant video frame after processing.
根据重要性矩阵,对当前即时视频帧进行处理,获取处理后的即时视频帧,并将处理后的即时视频帧输入视频编码器。According to the importance matrix, the current instant video frame is processed, the processed instant video frame is obtained, and the processed instant video frame is input into the video encoder.
对当前即时视频帧进行低通滤波于对兴趣区域进行低通滤波的过程相同,此处再不加以赘述。The process of low-pass filtering the current instant video frame in the low-pass filtering of the region of interest is the same, and will not be described here.
根据滤波后的当前即时视频帧、当前即时视频帧以及重要性矩阵,获取处理后的即时视频帧。The processed instant video frame is obtained according to the filtered current instant video frame, the current instant video frame, and the importance matrix.
可以通过预设的生成算法,在重要性矩阵的基础上,对当前即时视频帧和滤波后的当前即时视频帧进行融合,获取处理后的即时视频帧,该算法可以为:The current instant video frame and the filtered current instant video frame may be merged on the basis of the importance matrix by using a preset generation algorithm to obtain the processed instant video frame. The algorithm may be:
Figure PCTCN2016086134-appb-000001
Figure PCTCN2016086134-appb-000001
其中,out为处理后的即时视频帧,src为当前即时视频帧,low为滤波后的当前即时视频帧,
Figure PCTCN2016086134-appb-000002
为重要性矩阵。
Where out is the processed instant video frame, src is the current instant video frame, and low is the filtered current instant video frame.
Figure PCTCN2016086134-appb-000002
For the importance matrix.
通过对当前即时视频进行低通滤波,消除该当前即时视频中的高频信号,减少当前即时视频所占用的带宽资源,从而可以进一步提高即时视频的传输效率,提高用户体验;另外,由于重要性矩阵指示了即时视频帧内的兴趣区域和非兴趣区域,所以,通过重要性矩阵,对重要性矩阵所指示的兴趣区域进行保留,利用低通滤波后的即时视频帧内的非兴趣区域替换即时视频帧内的非兴趣区域,使得输出的处理后的即时视频帧中兴趣区域的图像为不失真的原始图像,非兴趣区域的图像为不包括高频信号的图像,从而使得在传输该处理后的即时 视频帧时,减少了传输时所需的带宽资源,提高了即时视频的传输效率,提高了用户体验。By performing low-pass filtering on the current live video, the high-frequency signal in the current instant video is eliminated, and the bandwidth resource occupied by the current instant video is reduced, thereby further improving the transmission efficiency of the instant video and improving the user experience; The matrix indicates the region of interest and the region of non-interest in the instant video frame. Therefore, the region of interest indicated by the importance matrix is reserved by the importance matrix, and the non-interest region in the low-pass filtered instant video frame is used to replace the instant region. a non-interest area in the video frame, such that the image of the region of interest in the processed processed instant video frame is an undistorted original image, and the image of the non-interest region is an image that does not include a high-frequency signal, so that after the processing is transmitted Instant When the video frame is used, the bandwidth resources required for transmission are reduced, the transmission efficiency of the instant video is improved, and the user experience is improved.
204、传输处理后的即时视频帧,结束。204. The instant video frame after the transmission process ends.
具体的,将该处理后的即时视频帧输入编码器,由编码器对该处理后的即时视频帧编码,生成码流数据;Specifically, the processed instant video frame is input to the encoder, and the processed instant video frame is encoded by the encoder to generate code stream data;
传输该码流数据,本发明实施例对具体的传输方式不加以限定。The specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤203至步骤204是实现根据第一传输策略,传输包括兴趣区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 203 to step 204, a process of transmitting a current instant video frame including an area of interest according to the first transmission policy is implemented, and the process may be implemented in other manners in addition to the manner described in the foregoing steps. The specific embodiments of the invention are not limited.
由于本发明实施例是根据重要性矩阵对当前即时视频帧进行处理,而重要性矩阵指示了当前即时视频内每一个像素的重要性度量值,从而对每一个像素点进行处理,提高了处理后的即时视频的画面质量,从而进一步提高了用户体验。The embodiment of the present invention processes the current instant video frame according to the importance matrix, and the importance matrix indicates the importance metric value of each pixel in the current instant video, thereby processing each pixel point, thereby improving the processing. The picture quality of the instant video further enhances the user experience.
若网络带宽满足第一预设条件,且电子设备不支持第一传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth meets the first preset condition, and the electronic device does not support the first transmission policy, the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
205、将至少包括兴趣区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数。205. Divide an instant video frame including at least an area of interest into at least one macroblock, and set a quantization parameter corresponding to the at least one macroblock.
具体的,可以按照预设的划分规则将处理后的当前即时视频帧划分为至少一个宏块,本发明实施例对具体的划分规则不加以限定。Specifically, the processed current instant video frame may be divided into at least one macroblock according to a preset division rule, and the specific division rule is not limited in the embodiment of the present invention.
设置包括全部或者部分兴趣区域的宏块的量化参数为第一数值;由于在实际应用中,量化参数的取值范围为0至51之间,所以该第一数值可以为0至25之间用户或者系统中的任意一个所定义的任意数值。Setting the quantization parameter of the macroblock including all or part of the interest area to the first value; since the value of the quantization parameter ranges from 0 to 51 in practical applications, the first value may be between 0 and 25 Or any value defined by any of the systems.
设置不包括全部或者部分兴趣区域的宏块的量化参数为第二数值;该第二数值可以为25至51之间用户或者系统中的任意一个所定义的任意数值。The quantization parameter of the macroblock not including all or part of the region of interest is set to a second value; the second value may be any value defined by any one of the user or system between 25 and 51.
由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等兴趣区域的关注度和画面质量要求大于其他区域,所以,可以通过设置该包 括全部或者部分兴趣区域的宏块的量化参数为第一数值,在编码过程中,较多的保留该兴趣区域的细节,使得在即时视频过程中能够保证兴趣区域的画面质量,满足用户对兴趣区域的画面细节的要求,进一步提高了用户体验。另外,由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等兴趣区域的关注度和画面质量要求大于其他区域,所以,可以设置不包括全部或者部分兴趣区域的宏块的量化参数为第二数值,在编码过程中,对该不包括全部或者部分兴趣区域的宏块的细节不进行保留,减少不包括全部或者部分兴趣区域的宏块在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法所需的带宽资源更少,从而能够进一步节省带宽资源,提高即时视频传输的效率,提高用户体验。另外,通过设置包括全部或者部分兴趣区域的宏块的量化参数为第一数值,设置不包括全部或者部分兴趣区域的宏块的量化参数为第二数值,使得在编码过程中,保留了兴趣区域的细节,对非兴趣区域的细节不进行保留,使得在对兴趣区域进行不失真传输的基础上,进一步减少了非兴趣区域在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法不仅能够保证兴趣区域的画面质量,而且所需的带宽资源更少,从而能够进一步节省带宽资源,提高即时视频传输的效率,提高用户体验。In the scenario of real-time video interaction, the interaction between the two parties in the instant video, such as the area where the face is located, and the image quality are greater than other areas, so the package can be set. The quantization parameter of the macroblock including all or part of the region of interest is the first value. During the encoding process, more details of the region of interest are reserved, so that the image quality of the region of interest can be ensured in the process of instant video, and the user is interested in The requirements of the detailed picture of the area further enhance the user experience. In addition, in the scenario of real-time video interaction, the mutual attention and the picture quality of the interest area in the instant video such as the area where the face is located are greater than other areas, so the macro block not including all or part of the interest area may be set. The quantization parameter is a second value. During the encoding process, the details of the macroblock that does not include all or part of the region of interest are not reserved, and the bandwidth occupied by the macroblocks that do not include all or part of the region of interest is reduced. Compared with the traditional instant video transmission method, the method requires less bandwidth resources, thereby further saving bandwidth resources, improving the efficiency of instant video transmission, and improving the user experience. In addition, by setting the quantization parameter of the macroblock including all or part of the region of interest to the first value, the quantization parameter of the macroblock not including all or part of the region of interest is set to the second value, so that the region of interest is reserved during the encoding process. The details of the non-interest area are not preserved, so that the bandwidth occupied by the non-interest area during transmission is further reduced on the basis of undistorted transmission of the interest area, so that compared with the traditional instant video transmission method The method can not only ensure the picture quality of the region of interest, but also requires less bandwidth resources, thereby further saving bandwidth resources, improving the efficiency of instant video transmission, and improving the user experience.
206、根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧。206. Encode at least one macroblock according to the quantization parameter to generate an encoded instant video frame.
具体的,根据第一数值和第二数值对该处理后的即时视频帧进行编码。Specifically, the processed instant video frame is encoded according to the first value and the second value.
本发明实施例对具体的编码方式不加以限定。The specific coding manner is not limited in the embodiment of the present invention.
207、传输编码后的即时视频帧,结束。207. Transmit the encoded instant video frame and end.
具体的,本发明实施例对具体的传输方式不加以限定。Specifically, the specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤205至步骤207是实现根据第二传输策略,传输包括兴趣区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以根据其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 205 to step 207, a process of transmitting a current instant video frame including an area of interest according to the second transmission policy is implemented, and the process may be implemented according to other manners, in addition to the manner described in the foregoing steps. The specific embodiments of the invention are not limited.
由于根据用于指示宏块在编码过程中的精细程度的量化参数,对至少一个宏块进行编码,使得在编码过程中,保留了兴趣区域的细节,非兴趣区域的细 节不加以保留,不仅将更多的宽带资源用于兴趣区域的传输,而且保证了即时视频中兴趣区域的画面质量,从而保证了兴趣区域的传输,进一步提高了即时视频的传输效率,提高了用户体验。Since at least one macroblock is encoded according to a quantization parameter for indicating the degree of fineness of the macroblock in the encoding process, the details of the region of interest are retained during the encoding process, and the non-interest region is fine The section is not reserved, not only uses more broadband resources for the transmission of the interest area, but also ensures the picture quality of the interest area in the instant video, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video, and improving the efficiency. user experience.
若网络带宽满足第二预设条件,且电子设备不支持第二传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth meets the second preset condition, and the electronic device does not support the second transmission policy, the process ends, and after the end, the instant video frame is transmitted through the conventional transmission mode.
可选的,在实际应用中,在执行步骤205之前,还可以执行步骤203。Optionally, in the actual application, before step 205 is performed, step 203 may also be performed.
208、获取包括兴趣区域的当前即时视频帧与参考帧之间的残差数据。208. Acquire residual data between the current instant video frame and the reference frame including the region of interest.
具体的,从当前即时视频帧中获取兴趣区域的位置参数与姿态参数。Specifically, the location parameter and the pose parameter of the region of interest are obtained from the current instant video frame.
对位置参数与姿态参数进行归一化处理,生成标准位置参数与标准姿态参数。The position parameter and the attitude parameter are normalized to generate a standard position parameter and a standard posture parameter.
根据标准位置参数与标准姿态参数,获取包括兴趣区域的当前即时视频帧与参考帧之间的残差数据。其中,该参考帧中兴趣区域的姿态参数为标准姿态参数。Obtaining residual data between the current instant video frame and the reference frame including the region of interest according to the standard position parameter and the standard posture parameter. The attitude parameter of the region of interest in the reference frame is a standard gesture parameter.
由于当前即时视频帧中兴趣区域的姿态参数与参考帧中兴趣区域的姿态参数为标准姿态参数,所以根据标准位置参数与标准姿态参数,获取包括兴趣区域的当前即时视频帧与参考帧之间的残差数据,相比于根据当前即时视频帧中兴趣区域的姿态参数位置参数,与参考帧中的位置参数和姿态参数,生成残差数据,减少了即时视频传输过程中数据传输量和处理量,进一步提高了即时视频的传输效率,提高了用户体验。另外,通过获取当前即时视频帧中的兴趣区域与参考帧中的兴趣区域之间的残差数据,实现即时视频的传输,相比于传统的即时视频传输方法,该方法进一步减少了即时视频传输过程中数据传输量和处理量,从而进一步提供了即时视频的传输效率,提高了用户体验。Since the attitude parameter of the region of interest in the current video frame and the gesture parameter of the region of interest in the reference frame are standard gesture parameters, the current location video frame and the reference frame including the region of interest are obtained according to the standard location parameter and the standard gesture parameter. The residual data generates residual data compared to the position parameter and the position parameter in the reference frame according to the posture parameter position parameter of the interest region in the current instant video frame, thereby reducing the data transmission amount and the processing amount in the instant video transmission process. It further improves the transmission efficiency of instant video and improves the user experience. In addition, by acquiring residual data between the interest area in the current instant video frame and the interest area in the reference frame, real-time video transmission is realized, and the method further reduces the instantaneous video transmission compared to the conventional instant video transmission method. The amount of data transmission and processing in the process further provides the transmission efficiency of the instant video and improves the user experience.
209、传输残差数据,结束。209. Transmit the residual data and end.
具体的,本发明实施例对具体的传输方式不加以限定。Specifically, the specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤208至步骤209是实现根据第三传输策略,传输包括兴趣区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通 过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 208 to step 209, a process of transmitting a current instant video frame including an area of interest according to the third transmission policy is implemented, and in addition to the manner described in the foregoing steps, The specific manner is not limited in the embodiment of the present invention.
由于获取并传输包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据,相比于传统的传输全部即时视频帧,该方法进一步节省了网络带宽资源,同时保证了即时视频中兴趣区域的画面质量,保证了兴趣区域的传输,从而进一步提高了即时视频的传输效率,提高了用户体验。Since the residual data between the current instant video frame and the reference frame including the region of interest is acquired and transmitted, the method further saves network bandwidth resources compared to the conventional transmission of all the instant video frames, and ensures the instant video. The picture quality of the area of interest ensures the transmission of the area of interest, thereby further improving the transmission efficiency of the instant video and improving the user experience.
若网络带宽满足第三预设条件,且电子设备不支持第三传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth satisfies the third preset condition, and the electronic device does not support the third transmission policy, the process ends, and after the end, the instant video frame is transmitted by the conventional transmission mode.
可选的,在实际应用中,在执行步骤208之前,还可以执行步骤205和步骤203中的至少一个。Optionally, in an actual application, at least one of step 205 and step 203 may also be performed before step 208 is performed.
210、获取用于描述兴趣区域的第二特征参数。210. Acquire a second feature parameter for describing an area of interest.
具体的,对兴趣区域进行三角分割,获取至少一个三角区域。Specifically, the region of interest is triangulated to obtain at least one triangular region.
获取用于描述任意一个三角区域的三个特征点的位置参数和姿态参数。Obtain positional parameters and attitude parameters for describing three feature points of any one of the triangular regions.
根据三个特征点的位置参数和姿态参数,生成与任意一个三角区域对应的姿态参数和位置参数。According to the position parameter and the attitude parameter of the three feature points, the attitude parameter and the position parameter corresponding to any one of the triangular regions are generated.
根据至少一个三角区域对应的姿态参数和位置参数,生成第二特征参数。Generating a second feature parameter according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
本发明实施例对具体的生成方式不加以限定。The specific generation manner of the embodiment of the present invention is not limited.
由于三角区域的姿态参数和位置参数指示了三角区域当前的位置和姿态,通过调整该特征参数,可以实现对三角区域的驱动,通过该当前即时视频中组成该兴趣区域的至少一个三角区域的姿态参数和位置参数,调整已经传输的即时视频帧中相同三角区域的姿态参数和位置参数,可以实现将当前即时视频帧中的兴趣区域迁移至已经传输的即时视频帧,相比于传输当前即时视频帧,进一步节省了网络带宽,提高了即时视频的传输效率,提高了用户体验。Since the attitude parameter and the position parameter of the triangular area indicate the current position and posture of the triangular area, by adjusting the characteristic parameter, driving of the triangular area can be realized, and the posture of at least one triangular area constituting the interest area in the current instant video is adopted. The parameter and the position parameter are used to adjust the attitude parameter and the position parameter of the same triangular area in the transmitted instant video frame, so as to migrate the interest area in the current instant video frame to the already transmitted instant video frame, compared to transmitting the current live video. The frame further saves network bandwidth, improves the transmission efficiency of instant video, and improves the user experience.
211、传输第二特征参数,结束。211. Transmit the second feature parameter and end.
具体的,本发明实施例对具体的传输方式不加以限定。Specifically, the specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤210至步骤211是实现根据第四传输策略,传输包括兴趣区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通 过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 210 to step 211, a process of transmitting a current instant video frame including an area of interest according to the fourth transmission policy is implemented, and in addition to the manner described in the foregoing steps, The specific manner is not limited in the embodiment of the present invention.
通过只传输用于描述兴趣区域的特征参数,相比于传输全部即时视频帧数据,进一步节省了带宽资源,从而进一步提高了即时视频的传输效率,提高了用户体验。By transmitting only the feature parameters for describing the region of interest, the bandwidth resource is further saved compared to transmitting all the instant video frame data, thereby further improving the transmission efficiency of the instant video and improving the user experience.
若网络带宽满足第四预设条件,且电子设备不支持第四传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth satisfies the fourth preset condition, and the electronic device does not support the fourth transmission policy, the process ends, and after the end, the instant video frame is transmitted through the conventional transmission mode.
本发明提供了一种即时视频的传输方法,通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽低对即时视频采取不同的传输策略,相比于传统的即时视频的传输方法,该方法提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例所述的方法是在从当前即时视频帧中获取兴趣区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于兴趣区域的传输,从而保证了兴趣区域的传输,进一步提高了即时视频的传输效率,提高了用户体验。另外,由于本发明实施例是根据重要性矩阵对当前即时视频帧进行处理,而重要性矩阵指示了当前即时视频内每一个像素的重要性度量值,从而对每一个像素点进行处理,提高了处理后的即时视频的画面质量,从而进一步提高了用户体验。另外,由于根据用于指示宏块在编码过程中的精细程度的量化参数,对至少一个宏块进行编码,使得在编码过程中,保留了兴趣区域的细节,非兴趣区域的细节不加以保留,不仅将更多的宽带资源用于兴趣区域的传输,而且保证了即时视频中兴趣区域的画面质量,从而保证了兴趣区域的传输,进一步提高了即时视频的传输效率,提高了用户体验。另外,由于获取并传输包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据,相比于传统的传输全部即时视频帧,该方法进一步节省了网络带宽资源,同时保证了即时视频中兴趣区域的画面质量,保证了兴趣区域的传输,从而进一步提高了即时视频的传输效率,提高了用户体验。另外,通过只传输 用于描述兴趣区域的特征参数,相比于传输全部即时视频帧数据,进一步节省了带宽资源,从而进一步提高了即时视频的传输效率,提高了用户体验。The present invention provides a method for transmitting an instant video, which can be determined according to whether the network bandwidth satisfies any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition. Low network bandwidth adopts different transmission strategies for real-time video. Compared with traditional instant video transmission methods, this method improves network bandwidth utilization and saves network resources, thereby improving the efficiency of real-time video transmission and improving users. In addition, the method according to the embodiment of the present invention processes the current instant video frame after acquiring the region of interest from the current instant video frame, so that the bandwidth resource is unchanged compared to the conventional instant video encoding method. In the case, more broadband resources are used for the transmission of the interest area, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video and improving the user experience. In addition, the embodiment of the present invention processes the current instant video frame according to the importance matrix, and the importance matrix indicates the importance metric value of each pixel in the current instant video, thereby processing each pixel point, thereby improving The picture quality of the processed instant video further enhances the user experience. In addition, since at least one macroblock is encoded according to a quantization parameter for indicating the degree of fineness of the macroblock in the encoding process, the details of the region of interest are preserved during the encoding process, and the details of the non-interest region are not retained. Not only the more broadband resources are used for the transmission of the interest area, but also the picture quality of the interest area in the instant video is ensured, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video and improving the user experience. In addition, since the residual data between the current instant video frame and the reference frame including the region of interest is acquired and transmitted, the method further saves network bandwidth resources and ensures instantness compared to conventional transmission of all real-time video frames. The picture quality of the interest area in the video ensures the transmission of the interest area, thereby further improving the transmission efficiency of the instant video and improving the user experience. In addition, by transmitting only The feature parameters used to describe the interest area further save bandwidth resources compared to transmitting all the real-time video frame data, thereby further improving the transmission efficiency of the instant video and improving the user experience.
实施例三Embodiment 3
本发明实施例提供了一种电子设备3,参照图3所示,该电子设备3包括:An embodiment of the present invention provides an electronic device 3. Referring to FIG. 3, the electronic device 3 includes:
获取模块31,在当前即时视频帧中获取兴趣区域;The obtaining module 31 is configured to acquire an area of interest in the current instant video frame.
判决模块32,用于判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个;The determining module 32 is configured to determine whether the network bandwidth meets any one of the first preset condition, the second preset condition, the third preset condition, and the fourth preset condition;
第一处理模块33,用于在网络带宽满足第一预设条件时,根据第一传输策略,传输包括兴趣区域的当前即时视频帧;或者,The first processing module 33 is configured to: when the network bandwidth meets the first preset condition, transmit the current instant video frame including the interest area according to the first transmission policy; or
第二处理模块34,用于在网络带宽满足第二预设条件时,根据第二传输策略,传输包括兴趣区域的当前即时视频帧;或者,The second processing module 34 is configured to: when the network bandwidth meets the second preset condition, transmit the current instant video frame including the interest area according to the second transmission policy; or
第三处理模块35,用于在网络带宽满足第三预设条件时,根据第三传输策略,传输包括兴趣区域的当前即时视频帧;或者,The third processing module 35 is configured to: when the network bandwidth meets the third preset condition, transmit the current instant video frame including the interest area according to the third transmission policy; or
第四处理模块36,用于在网络带宽满足第四预设条件时,根据第四传输策略,传输包括兴趣区域的当前即时视频帧。The fourth processing module 36 is configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the interest area according to the fourth transmission policy.
可选的,获取模块31具体用于:Optionally, the obtaining module 31 is specifically configured to:
获取用于指示兴趣区域的第一特征参数;Obtaining a first feature parameter for indicating an area of interest;
根据第一特征参数,从当前即时视频帧中获取兴趣区域。Obtaining an area of interest from the current instant video frame according to the first feature parameter.
可选的,第一处理模块33具体用于:Optionally, the first processing module 33 is specifically configured to:
根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧;The current instant video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
传输处理后的即时视频帧。Transmit processed instant video frames.
可选的,第一处理模块33具体用于:Optionally, the first processing module 33 is specifically configured to:
根据兴趣区域,生成与当前即时视频帧对应的重要性矩阵;Generating an importance matrix corresponding to the current instant video frame according to the region of interest;
根据重要性矩阵,对当前即时视频帧进行处理,获取处理后的即时视频帧,并将处理后的即时视频帧输入视频编码器。 According to the importance matrix, the current instant video frame is processed, the processed instant video frame is obtained, and the processed instant video frame is input into the video encoder.
可选的,第一处理模块33具体用于:Optionally, the first processing module 33 is specifically configured to:
设置当前即时视频帧内所有像素点的重要性度量值;Set the importance metric of all pixels in the current instant video frame;
对兴趣区域进行低通滤波处理,生成处理后的当前即时视频帧;Performing low-pass filtering processing on the region of interest to generate a processed current instant video frame;
根据处理后的当前即时视频帧内所有像素点的重要性度量值,生成与当前即时视频帧对应的重要性矩阵。An importance matrix corresponding to the current instant video frame is generated according to the importance metric of all pixels in the current instant video frame after processing.
可选的,第二处理模块34具体用于:Optionally, the second processing module 34 is specifically configured to:
将至少包括兴趣区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area of interest into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧;Encoding at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输编码后的即时视频帧。Transmit the encoded instant video frame.
可选的,第二处理模块34具体用于:Optionally, the second processing module 34 is specifically configured to:
将处理后的当前即时视频帧划分为至少一个宏块;Dividing the processed current instant video frame into at least one macroblock;
设置包括全部或者部分兴趣区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the region of interest to a first value;
设置不包括全部或者部分兴趣区域的宏块的量化参数为第二数值。A quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
可选的,第三处理模块35具体用于:Optionally, the third processing module 35 is specifically configured to:
获取包括兴趣区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame including the region of interest and the reference frame;
传输残差数据。Transmit residual data.
可选的,第三处理模块35具体用于:Optionally, the third processing module 35 is specifically configured to:
获取兴趣区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the region of interest;
对位置参数与姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the attitude parameter to generate a standard position parameter and a standard posture parameter;
根据标准位置参数与标准姿态参数,获取包括兴趣区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region of interest according to the standard position parameter and the standard posture parameter.
可选的,第四处理模块36具体用于:Optionally, the fourth processing module 36 is specifically configured to:
获取用于描述兴趣区域的特征参数;Obtaining feature parameters for describing an area of interest;
传输特征参数。 Transfer feature parameters.
可选的,第四处理模块36具体用于:Optionally, the fourth processing module 36 is specifically configured to:
对兴趣区域进行三角分割,获取至少一个三角区域;Triangulating the region of interest to obtain at least one triangular region;
获取至少一个三角区域对应的姿态参数和位置参数;Obtaining at least one posture parameter and a position parameter corresponding to the triangular area;
根据至少一个三角区域对应的姿态参数和位置参数,生成第二特征参数。Generating a second feature parameter according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
可选的,第四处理模块36具体用于:Optionally, the fourth processing module 36 is specifically configured to:
获取用于描述任意一个三角区域的三个特征点的位置参数和姿态参数;Obtaining position parameters and attitude parameters for describing three feature points of any one of the triangular regions;
根据三个特征点的位置参数和姿态参数,生成与任意一个三角区域对应的姿态参数和位置参数;Generating an attitude parameter and a position parameter corresponding to any one of the triangular regions according to the position parameter and the attitude parameter of the three feature points;
以此类推,获取至少一个三角区域对应的姿态参数和位置参数。And so on, the at least one triangle region corresponding to the attitude parameter and the position parameter are obtained.
本发明提供了一种电子设备,该电子设备通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽低对即时视频采取不同的传输策略,相比于传统的即时视频的传输方法,该方法提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例所述的方法是在从当前即时视频帧中获取兴趣区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于兴趣区域的传输,从而保证了兴趣区域的传输,进一步提高了即时视频的传输效率,提高了用户体验。The present invention provides an electronic device, which can determine whether the network bandwidth satisfies any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition. Low network bandwidth adopts different transmission strategies for real-time video. Compared with traditional instant video transmission methods, this method improves network bandwidth utilization and saves network resources, thereby improving the efficiency of real-time video transmission and improving users. In addition, the method according to the embodiment of the present invention processes the current instant video frame after acquiring the region of interest from the current instant video frame, so that the bandwidth resource is unchanged compared to the conventional instant video encoding method. In the case, more broadband resources are used for the transmission of the interest area, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video and improving the user experience.
实施例四Embodiment 4
本发明实施例提供了一种电子设备4,参照图4所示,该电子设备5包括发送模块41、存储器42和与发送模块41,存储器42连接处理器43,其中,存储器42用于存储一组程序代码,处理器43调用存储器42所存储的程序代码用于执行以下操作:An embodiment of the present invention provides an electronic device 4. Referring to FIG. 4, the electronic device 5 includes a sending module 41, a memory 42 and a sending module 41. The memory 42 is connected to the processor 43, wherein the memory 42 is used to store a The group program code, the processor 43 calls the program code stored in the memory 42 for performing the following operations:
在当前即时视频帧中获取兴趣区域;Obtaining an area of interest in the current instant video frame;
若网络带宽满足第一预设条件,则根据第一传输策略,传输包括兴趣区域的当前即时视频帧;或者, If the network bandwidth meets the first preset condition, transmitting the current instant video frame including the interest area according to the first transmission policy; or
若网络带宽满足第二预设条件,则根据第二传输策略,传输包括兴趣区域的当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting the current instant video frame including the interest area according to the second transmission policy; or
若网络带宽满足第三预设条件,则根据第三传输策略,传输包括兴趣区域的当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting the current instant video frame including the interest area according to the third transmission policy; or
若网络带宽满足第四预设条件,则根据第四传输策略,传输包括兴趣区域的当前即时视频帧。If the network bandwidth meets the fourth preset condition, the current instant video frame including the region of interest is transmitted according to the fourth transmission policy.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
获取用于指示兴趣区域的第一特征参数;Obtaining a first feature parameter for indicating an area of interest;
根据第一特征参数,从当前即时视频帧中获取兴趣区域。Obtaining an area of interest from the current instant video frame according to the first feature parameter.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧;The current instant video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
传输处理后的即时视频帧。Transmit processed instant video frames.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
根据兴趣区域,生成与当前即时视频帧对应的重要性矩阵;Generating an importance matrix corresponding to the current instant video frame according to the region of interest;
根据重要性矩阵,对当前即时视频帧进行处理,获取处理后的即时视频帧,并将处理后的即时视频帧输入视频编码器。According to the importance matrix, the current instant video frame is processed, the processed instant video frame is obtained, and the processed instant video frame is input into the video encoder.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
设置当前即时视频帧内所有像素点的重要性度量值;Set the importance metric of all pixels in the current instant video frame;
对兴趣区域进行低通滤波处理,生成处理后的当前即时视频帧;Performing low-pass filtering processing on the region of interest to generate a processed current instant video frame;
根据处理后的当前即时视频帧内所有像素点的重要性度量值,生成与当前即时视频帧对应的重要性矩阵。An importance matrix corresponding to the current instant video frame is generated according to the importance metric of all pixels in the current instant video frame after processing.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
将至少包括兴趣区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area of interest into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧; Encoding at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输编码后的即时视频帧。Transmit the encoded instant video frame.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
将处理后的当前即时视频帧划分为至少一个宏块;Dividing the processed current instant video frame into at least one macroblock;
设置包括全部或者部分兴趣区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the region of interest to a first value;
设置不包括全部或者部分兴趣区域的宏块的量化参数为第二数值。A quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
获取包括兴趣区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame including the region of interest and the reference frame;
传输残差数据。Transmit residual data.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
获取兴趣区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the region of interest;
对位置参数与姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the attitude parameter to generate a standard position parameter and a standard posture parameter;
根据标准位置参数与标准姿态参数,获取包括兴趣区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region of interest according to the standard position parameter and the standard posture parameter.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
获取用于描述兴趣区域的第二特征参数;Obtaining a second feature parameter for describing an area of interest;
传输第二特征参数。Transmitting the second feature parameter.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
对兴趣区域进行三角分割,获取至少一个三角区域;Triangulating the region of interest to obtain at least one triangular region;
获取至少一个三角区域对应的姿态参数和位置参数;Obtaining at least one posture parameter and a position parameter corresponding to the triangular area;
根据至少一个三角区域对应的姿态参数和位置参数,生成第二特征参数。Generating a second feature parameter according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
可选的,处理器43调用存储器42所存储的程序代码用于执行以下操作:Optionally, the processor 43 calls the program code stored in the memory 42 to perform the following operations:
获取用于描述任意一个三角区域的三个特征点的位置参数和姿态参数;Obtaining position parameters and attitude parameters for describing three feature points of any one of the triangular regions;
根据三个特征点的位置参数和姿态参数,生成与任意一个三角区域对应的姿态参数和位置参数;Generating an attitude parameter and a position parameter corresponding to any one of the triangular regions according to the position parameter and the attitude parameter of the three feature points;
以此类推,获取至少一个三角区域对应的姿态参数和位置参数。 And so on, the at least one triangle region corresponding to the attitude parameter and the position parameter are obtained.
本发明提供了一种电子设备,该电子设备通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽低对即时视频采取不同的传输策略,相比于传统的即时视频的传输方法,该方法提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例所述的方法是在从当前即时视频帧中获取兴趣区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于兴趣区域的传输,从而保证了兴趣区域的传输,进一步提高了即时视频的传输效率,提高了用户体验。The present invention provides an electronic device, which can determine whether the network bandwidth satisfies any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition. Low network bandwidth adopts different transmission strategies for real-time video. Compared with traditional instant video transmission methods, this method improves network bandwidth utilization and saves network resources, thereby improving the efficiency of real-time video transmission and improving users. In addition, the method according to the embodiment of the present invention processes the current instant video frame after acquiring the region of interest from the current instant video frame, so that the bandwidth resource is unchanged compared to the conventional instant video encoding method. In the case, more broadband resources are used for the transmission of the interest area, thereby ensuring the transmission of the interest area, further improving the transmission efficiency of the instant video and improving the user experience.
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。All of the above optional technical solutions may be used in any combination to form an optional embodiment of the present invention, and will not be further described herein.
值得注意的是,上述实施例中的“第一”、“第二”、“第三”和“第四”仅仅是示例性的,并非特指。It is to be noted that the “first”, “second”, “third” and “fourth” in the above embodiments are merely exemplary and not specifically indicated.
需要说明的是:上述实施例提供的电子设备在进行即时视频的传输时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的电子设备与即时视频的传输方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when the electronic device provided by the foregoing embodiment performs the transmission of the instant video, only the division of the above functional modules is illustrated. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the embodiment of the present invention is the same as the embodiment of the method for transmitting an instant video. The specific implementation process is described in detail in the method embodiment, and details are not described herein again.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims (17)

  1. 一种即时视频的传输方法,其特征在于,所述方法包括:A method for transmitting an instant video, characterized in that the method comprises:
    在当前即时视频帧中获取兴趣区域;Obtaining an area of interest in the current instant video frame;
    根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,执行以下操作中的任意一个:Perform any of the following operations based on the preset conditions that the network bandwidth meets and the transmission policies supported by the electronic device:
    若所述网络带宽满足第一预设条件,则根据第一传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the first preset condition, transmitting the current instant video frame including the interest area according to the first transmission policy; or
    若所述网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting the current instant video frame including the interest area according to the second transmission policy; or
    若所述网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting the current instant video frame including the interest area according to the third transmission policy; or
    若所述网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述兴趣区域的所述当前即时视频帧。If the network bandwidth meets the fourth preset condition, transmitting the current instant video frame including the interest area according to the fourth transmission policy.
  2. 根据权利要求1所述的方法,其特征在于,所述在当前即时视频帧中获取兴趣区域包括:The method according to claim 1, wherein the obtaining the region of interest in the current instant video frame comprises:
    获取用于指示所述兴趣区域的第一特征参数;Obtaining a first feature parameter for indicating the region of interest;
    根据所述第一特征参数,从当前即时视频帧中获取所述兴趣区域。Obtaining the region of interest from the current instant video frame according to the first feature parameter.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据第一传输策略,传输包括所述兴趣区域的所述当前即时视频帧包括:The method according to claim 1 or 2, wherein the transmitting the current instant video frame including the region of interest according to the first transmission policy comprises:
    根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
    传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
  4. 根据权利要求3所述的方法,其特征在于,所述根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧包括: The method according to claim 3, wherein the processing the current instant video according to the importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame comprises:
    根据所述兴趣区域,生成与所述当前即时视频帧对应的重要性矩阵;Generating an importance matrix corresponding to the current instant video frame according to the region of interest;
    根据所述重要性矩阵,对所述当前即时视频帧进行处理,获取处理后的即时视频帧,并将所述处理后的即时视频帧输入视频编码器。And processing, according to the importance matrix, the current instant video frame, acquiring the processed instant video frame, and inputting the processed instant video frame into the video encoder.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述兴趣区域,生成与所述当前即时视频帧对应的重要性矩阵包括:The method according to claim 4, wherein the generating an importance matrix corresponding to the current instant video frame according to the region of interest comprises:
    设置所述当前即时视频帧内所有像素点的重要性度量值;Setting an importance metric value of all pixels in the current instant video frame;
    对所述兴趣区域进行低通滤波处理,生成处理后的当前即时视频帧;Performing low-pass filtering processing on the region of interest to generate a processed current instant video frame;
    根据所述处理后的当前即时视频帧内所有像素点的重要性度量值,生成所述与所述当前即时视频帧对应的重要性矩阵。Generating the importance matrix corresponding to the current instant video frame according to the importance metric of all the pixels in the current current video frame.
  6. 根据权利要求1至5任一所述的方法,其特征在于,所述根据第二传输策略,传输包括所述兴趣区域的所述当前即时视频帧策略包括:The method according to any one of claims 1 to 5, wherein the transmitting the current instant video frame policy including the region of interest according to the second transmission policy comprises:
    将至少包括所述兴趣区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least the region of interest into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
    根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧;Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
    传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
  7. 根据权利要求6所述的方法,其特征在于,所述设置组成所述至少一个宏块所对应的量化参数包括:The method according to claim 6, wherein the setting the quantization parameter corresponding to the at least one macroblock comprises:
    将所述处理后的当前即时视频帧划分为至少一个宏块;Dividing the processed current instant video frame into at least one macroblock;
    设置包括全部或者部分所述兴趣区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the region of interest as a first value;
    设置不包括所述全部或者部分所述兴趣区域的宏块的量化参数为第二数值。A quantization parameter that sets a macroblock that does not include all or part of the region of interest is a second value.
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述根据第三传输策略,传输包括所述兴趣区域的所述当前即时视频帧包括:The method according to any one of claims 1 to 7, wherein the transmitting the current instant video frame including the region of interest according to the third transmission policy comprises:
    获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame and the reference frame including the region of interest;
    传输所述残差数据。Transmitting the residual data.
  9. 根据权利要求8所述的方法,其特征在于,所述获取包括所述兴趣区域 的当前即时视频帧与参考帧之间的残差数据包括:The method of claim 8 wherein said obtaining comprises said region of interest The residual data between the current instant video frame and the reference frame includes:
    获取所述兴趣区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the interest area;
    对所述位置参数与所述姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the posture parameter to generate a standard position parameter and a standard posture parameter;
    根据所述标准位置参数与所述标准姿态参数,获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region of interest according to the standard location parameter and the standard gesture parameter.
  10. 根据权利要求1所述的方法,其特征在于,所述根据第四传输策略,传输包括所述兴趣区域的所述当前即时视频帧包括:The method according to claim 1, wherein the transmitting the current instant video frame including the region of interest according to the fourth transmission policy comprises:
    获取用于描述所述兴趣区域的第二特征参数;Obtaining a second feature parameter for describing the region of interest;
    传输所述第二特征参数。Transmitting the second characteristic parameter.
  11. 根据权利要求10所述的方法,其特征在于,所述获取用于描述所述兴趣区域的第二特征参数包括:The method according to claim 10, wherein the acquiring the second feature parameter for describing the region of interest comprises:
    对所述兴趣区域进行三角分割,获取至少一个三角区域;Performing triangulation on the region of interest to acquire at least one triangular region;
    获取所述至少一个三角区域对应的姿态参数和位置参数;Acquiring the attitude parameter and the position parameter corresponding to the at least one triangular area;
    根据所述至少一个三角区域对应的姿态参数和位置参数,生成所述第二特征参数。Generating the second feature parameter according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
  12. 根据权利要求11所述的方法,其特征在于,所述获取所述至少一个三角区域的姿态参数和位置参数包括:The method according to claim 11, wherein the acquiring the attitude parameter and the position parameter of the at least one triangular region comprises:
    获取用于描述任意一个三角区域的三个特征点的位置参数和姿态参数;Obtaining position parameters and attitude parameters for describing three feature points of any one of the triangular regions;
    根据所述三个特征点的位置参数和姿态参数,生成与所述任意一个三角区域对应的姿态参数和位置参数;Generating a posture parameter and a position parameter corresponding to the arbitrary one of the triangular regions according to the position parameter and the posture parameter of the three feature points;
    以此类推,获取所述至少一个三角区域对应的姿态参数和位置参数。And so on, acquiring the attitude parameter and the position parameter corresponding to the at least one triangular region.
  13. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, comprising:
    获取模块,在当前即时视频帧中获取兴趣区域;Obtaining a module, acquiring an area of interest in the current instant video frame;
    判决模块,用于判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个; a determining module, configured to determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition;
    所述判决模块还用于根据所述网络带宽所满足的预设条件以及电子设备所支持的传输策略,触发以下模块中的任意一个:The decision module is further configured to trigger any one of the following modules according to a preset condition that the network bandwidth meets and a transmission policy supported by the electronic device:
    第一处理模块,用于在所述网络带宽满足第一预设条件时,根据第一传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,a first processing module, configured to: when the network bandwidth meets the first preset condition, transmit the current instant video frame including the interest area according to the first transmission policy; or
    第二处理模块,用于在所述网络带宽满足第二预设条件时,根据第二传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,a second processing module, configured to: when the network bandwidth meets a second preset condition, transmit the current instant video frame that includes the interest area according to a second transmission policy; or
    第三处理模块,用于在所述网络带宽满足第三预设条件时,根据第三传输策略,传输包括所述兴趣区域的所述当前即时视频帧;或者,a third processing module, configured to: when the network bandwidth meets a third preset condition, transmit the current instant video frame including the interest area according to a third transmission policy; or
    第四处理模块,用于在所述网络带宽满足第四预设条件时,根据第四传输策略,传输包括所述兴趣区域的所述当前即时视频帧。And a fourth processing module, configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the interest area according to the fourth transmission policy.
  14. 根据权利要求13所述的设备,其特征在于,所述第一处理模块具体用于:The device according to claim 13, wherein the first processing module is specifically configured to:
    根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
    传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
  15. 根据权利要求14所述的设备,其特征在于,所述第二处理模块具体用于:The device according to claim 14, wherein the second processing module is specifically configured to:
    将至少包括所述兴趣区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least the region of interest into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
    根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧;Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
    传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
  16. 根据权利要求15所述的设备,其特征在于,所述第三处理模块具体用于:The device according to claim 15, wherein the third processing module is specifically configured to:
    获取包括所述兴趣区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame and the reference frame including the region of interest;
    传输所述残差数据。 Transmitting the residual data.
  17. 根据权利要求13所述的设备,其特征在于,所述第四处理模块具体用于:The device according to claim 13, wherein the fourth processing module is specifically configured to:
    获取用于描述所述兴趣区域的第二特征参数;Obtaining a second feature parameter for describing the region of interest;
    传输所述第二特征参数。 Transmitting the second characteristic parameter.
PCT/CN2016/086134 2015-06-19 2016-06-17 Real-time video transmission method and electronic apparatus WO2016202285A1 (en)

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
CN201510346188.X 2015-06-19
CN201510346214.9A CN104967917A (en) 2015-06-19 2015-06-19 Instant video coding method and electronic device
CN201510346061.8A CN104967914A (en) 2015-06-19 2015-06-19 Instant video coding method and electronic device
CN201510346213.4A CN104967916A (en) 2015-06-19 2015-06-19 Instant video coding method and electronic device
CN201510346061.8 2015-06-19
CN201510346215.3A CN105049949A (en) 2015-06-19 2015-06-19 Coding method of instant video and electronic equipment
CN201510346215.3 2015-06-19
CN201510346213.4 2015-06-19
CN201510346214.9 2015-06-19
CN201510346188.XA CN105049948A (en) 2015-06-19 2015-06-19 Coding method of instant video and electronic equipment

Publications (1)

Publication Number Publication Date
WO2016202285A1 true WO2016202285A1 (en) 2016-12-22

Family

ID=57544955

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/086134 WO2016202285A1 (en) 2015-06-19 2016-06-17 Real-time video transmission method and electronic apparatus

Country Status (1)

Country Link
WO (1) WO2016202285A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049324A (en) * 2019-04-12 2019-07-23 深圳壹账通智能科技有限公司 Method for video coding, system, equipment and computer readable storage medium
US20200327350A1 (en) * 2019-04-10 2020-10-15 Teraki Gmbh System and method for pre-processing images captured by a vehicle
CN112104872A (en) * 2020-08-17 2020-12-18 西安万像电子科技有限公司 Image transmission method and device
CN112533029A (en) * 2020-11-17 2021-03-19 浙江大华技术股份有限公司 Video time-sharing transmission method, camera device, system and storage medium

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079716A (en) * 2006-04-06 2007-11-28 通用电气公司 Adaptive selection of image streaming mode
CN101588496A (en) * 2008-05-20 2009-11-25 吴平 A kind of communication system of the finely-coded local regions based on video content
WO2014000238A1 (en) * 2012-06-28 2014-01-03 宇龙计算机通信科技(深圳)有限公司 Terminal and video image compression method
US20140136686A1 (en) * 2012-11-09 2014-05-15 Institute For Information Industry Dynamic resolution regulating system and dynamic resolution regulating method
CN104427337A (en) * 2013-08-21 2015-03-18 杭州海康威视数字技术股份有限公司 Region of interest (ROI) video coding method and apparatus based on object detection
CN104967916A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104967917A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104967914A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104967867A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104994405A (en) * 2015-06-19 2015-10-21 美国掌赢信息科技有限公司 Instant-video transmission method and electronic equipment
CN105049947A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Transmission method of instant video and electronic equipment
CN105049948A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Coding method of instant video and electronic equipment
CN105049949A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Coding method of instant video and electronic equipment
CN105163125A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163196A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163198A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163197A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163194A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163199A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163195A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079716A (en) * 2006-04-06 2007-11-28 通用电气公司 Adaptive selection of image streaming mode
CN101588496A (en) * 2008-05-20 2009-11-25 吴平 A kind of communication system of the finely-coded local regions based on video content
WO2014000238A1 (en) * 2012-06-28 2014-01-03 宇龙计算机通信科技(深圳)有限公司 Terminal and video image compression method
US20140136686A1 (en) * 2012-11-09 2014-05-15 Institute For Information Industry Dynamic resolution regulating system and dynamic resolution regulating method
CN104427337A (en) * 2013-08-21 2015-03-18 杭州海康威视数字技术股份有限公司 Region of interest (ROI) video coding method and apparatus based on object detection
CN104967916A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104967917A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104967914A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104967867A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104994405A (en) * 2015-06-19 2015-10-21 美国掌赢信息科技有限公司 Instant-video transmission method and electronic equipment
CN105049947A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Transmission method of instant video and electronic equipment
CN105049948A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Coding method of instant video and electronic equipment
CN105049949A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Coding method of instant video and electronic equipment
CN105163125A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163196A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163198A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163197A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163194A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163199A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163195A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200327350A1 (en) * 2019-04-10 2020-10-15 Teraki Gmbh System and method for pre-processing images captured by a vehicle
CN110049324A (en) * 2019-04-12 2019-07-23 深圳壹账通智能科技有限公司 Method for video coding, system, equipment and computer readable storage medium
CN110049324B (en) * 2019-04-12 2022-10-14 深圳壹账通智能科技有限公司 Video encoding method, system, device, and computer-readable storage medium
CN112104872A (en) * 2020-08-17 2020-12-18 西安万像电子科技有限公司 Image transmission method and device
CN112104872B (en) * 2020-08-17 2024-05-17 西安万像电子科技有限公司 Image transmission method and device
CN112533029A (en) * 2020-11-17 2021-03-19 浙江大华技术股份有限公司 Video time-sharing transmission method, camera device, system and storage medium

Similar Documents

Publication Publication Date Title
CN109151468B (en) A kind of image data encoding, decoding method and device
US9172907B2 (en) Method and apparatus for dynamically adjusting aspect ratio of images during a video call
CN113141380B (en) Coding optimization for blurred media
EP3046331B1 (en) Media control method and system based on cloud desktop
CN108600783B (en) Frame rate adjusting method and device and terminal equipment
WO2016202285A1 (en) Real-time video transmission method and electronic apparatus
CN109151477B (en) Image data encoding and decoding methods and devices
CN105049949A (en) Coding method of instant video and electronic equipment
CN105404788B (en) Distributed medical diagnosis system
CN115209189B (en) Video stream transmission method, system, server and storage medium
CN103517072A (en) Video communication method and video communication equipment
CN111970565A (en) Video data processing method and device, electronic equipment and storage medium
WO2017128632A1 (en) Method, apparatus and system for image compression and image reconstruction
CN111031389A (en) Video processing method, electronic device and storage medium
CN104967914A (en) Instant video coding method and electronic device
CN105049947A (en) Transmission method of instant video and electronic equipment
CN112672162A (en) Encoding method, apparatus and storage medium
CN104994405A (en) Instant-video transmission method and electronic equipment
CN104967917A (en) Instant video coding method and electronic device
CN116033155A (en) Binocular image compression method, device and readable storage medium
CN107423187A (en) A kind of screen monitor method, apparatus and system
US11334979B2 (en) System and method to detect macroblocking in images
CN104967867A (en) Instant video coding method and electronic device
US10448009B1 (en) Determining sample adaptive offset filter parameters
WO2024061087A1 (en) Dynamic collection method and device for desktop image, and computer-readable storage medium

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 10/04/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16811026

Country of ref document: EP

Kind code of ref document: A1