WO2020227973A1 - 一种图像发送方法、图像接收方法、图像传输方法及装置 - Google Patents

一种图像发送方法、图像接收方法、图像传输方法及装置 Download PDF

Info

Publication number
WO2020227973A1
WO2020227973A1 PCT/CN2019/087045 CN2019087045W WO2020227973A1 WO 2020227973 A1 WO2020227973 A1 WO 2020227973A1 CN 2019087045 W CN2019087045 W CN 2019087045W WO 2020227973 A1 WO2020227973 A1 WO 2020227973A1
Authority
WO
WIPO (PCT)
Prior art keywords
code stream
frame
image
resolution
threshold
Prior art date
Application number
PCT/CN2019/087045
Other languages
English (en)
French (fr)
Inventor
薛菲
马宁
苏文艺
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201980008816.XA priority Critical patent/CN111602398A/zh
Priority to PCT/CN2019/087045 priority patent/WO2020227973A1/zh
Publication of WO2020227973A1 publication Critical patent/WO2020227973A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/436Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Definitions

  • the present disclosure relates to the field of image transmission technology, and in particular to an image sending method, image receiving method, image transmission method and device.
  • UAVs generally carry shooting equipment such as cameras. When drones perform flight missions, it is often necessary to transmit the images taken by the camera to the ground. When the image is transmitted, the environment of the drone often changes drastically, and the channel capacity of the communication channel changes, which will affect the image transmission quality.
  • the image resolution can be changed to match the channel capacity.
  • the existing image transmission technology when the resolution of the image is changed, it is easy to cause the image to freeze and blur, resulting in flickering of the image, and affecting the subjective quality of the image.
  • the present disclosure provides an image sending method, which includes:
  • the parallel encoding step is performed: while continuing to encode the image first, use the second resolution Perform a second encoding on the image at a rate to generate a second code stream, and simultaneously send the first code stream and the second code stream through the communication channel;
  • the present disclosure also provides an image receiving method, which includes:
  • the first code stream is received through a communication channel, the first code stream is generated by first encoding the image at the first resolution, the first code stream is decoded, and the first code stream is displayed at the first resolution The first code stream;
  • Perform a parallel receiving step simultaneously receive the first code stream and the second code stream, the second code stream is generated by performing a second encoding on the image at a second resolution, and the first code stream and Decoding the second code stream, and continue to display the first code stream at the first resolution;
  • Perform the display switching step receiving the second code stream, the second code stream is generated by continuing to perform the second encoding on the image at the second resolution, and the second code stream is the same as the The channel capacity is matched, the second code stream is decoded and the second code stream is displayed at the second resolution.
  • the present disclosure also provides an image transmission method, which includes:
  • the parallel transmission step is performed: while continuing to encode the image first, use the second resolution
  • the image is encoded at a second rate to generate a second code stream, and the first code stream and the second code stream are simultaneously transmitted through the communication channel, and the first code stream and the second code stream are Decode the code stream, and continue to display the first code stream at the first resolution;
  • the second encoding is used to generate the second code stream, the second code stream matches the channel capacity, and the second code stream is transmitted through the communication channel, and the second code stream is decoded , And display the second code stream with the second resolution.
  • the present disclosure also provides an image sending device, which includes:
  • Memory used to store executable instructions
  • the processor is configured to read the executable instructions to perform the following operations:
  • the present disclosure also provides an image receiving device, which includes:
  • Memory used to store executable instructions
  • the processor is configured to read the executable instructions to perform the following operations:
  • the first code stream is generated by first encoding the image at the first resolution, the first code stream is decoded, and the first code stream is provided Displaying on the display with the first resolution;
  • Perform a parallel receiving operation receive the first code stream and the second code stream at the same time, the second code stream is generated by performing a second encoding on the image at the second resolution, and the first code stream and Decoding the second code stream, and continue to provide the first code stream to a display for display at the first resolution;
  • Perform a display switching operation receive the second code stream, the second code stream is generated by continuing to perform the second encoding on the image at the second resolution, and the second code stream is the same as the The channel capacity is matched, the second code stream is decoded, and the second code stream is provided to a display for display at the second resolution.
  • the present disclosure also provides an image transmission device, which includes: an image sending device and an image receiving device;
  • the image sending device is used to first encode the image at a first resolution to generate a first code stream, and transmit the first code stream to the image receiving device through a communication channel, and the image receiving device Decoding the first code stream, and displaying the first code stream at the first resolution;
  • the image sending device determines whether the first code stream matches the channel capacity; if not, executes a parallel transmission operation: the image sending device is used to continue to While the image is first-encoded, the image is second-encoded at a second resolution to generate a second code stream, and the first code stream and the second code stream are simultaneously transmitted through the communication channel To the image receiving device, the image receiving device decodes the first code stream and the second code stream, and continues to display the first code stream at the first resolution;
  • the image sending device determines whether the second code stream has reached the quality of the first code stream; if so, a switching operation is performed: the image sending device stops performing the first encoding on the image, and continues Perform the second encoding on the image at the second resolution to generate the second code stream, the second code stream matches the channel capacity, and the second code stream is transmitted through the communication channel The code stream is transmitted to the image receiving device, and the image receiving device decodes the second code stream and displays the second code stream at the second resolution.
  • the present disclosure also provides an unmanned aerial vehicle, including: the above-mentioned image sending device.
  • the present disclosure also provides a control device, including: the above-mentioned image receiving device.
  • the present disclosure also provides an unmanned aerial vehicle system, including: the above-mentioned image transmission device.
  • the present disclosure also provides an unmanned aerial vehicle system, including: the above-mentioned unmanned aerial vehicle and the above-mentioned control device.
  • the key frame of the second code stream with the second resolution is sent in advance through the parallel encoding step, that is, sent during the parallel encoding step, rather than when the resolution is switched.
  • the communication channel sends the predicted frame instead of the key frame, which will not cause the image to be blurred or jammed, and the quality of the second bit stream has been consistent with the quality of the first bit stream, so in the resolution switch Flicker will not occur at the time, the resolution is switched without flicker, the subjective quality of the image is improved, and the user experience is improved.
  • Fig. 1 is a flowchart of an image sending method according to an embodiment of the disclosure.
  • Fig. 2 is a timing diagram of the image sending method described in Fig. 1.
  • Fig. 3 is a graph showing the change of load capacity of the image sending method described in Fig. 1.
  • Fig. 4 is another graph showing the change of the load capacity of the image sending method described in Fig. 1.
  • Fig. 5 is a timing diagram of a conventional resolution switching method.
  • FIG. 6 is a flowchart of an image receiving method according to an embodiment of the disclosure.
  • Fig. 7 is a timing diagram of the image receiving method described in Fig. 6.
  • FIG. 8 is a flowchart of an image transmission method according to an embodiment of the disclosure.
  • FIG. 9 is a timing diagram of the second code stream of the image transmission method according to the embodiment of the disclosure.
  • FIG. 10 is a schematic structural diagram of an image sending device according to an embodiment of the disclosure.
  • FIG. 11 is a schematic structural diagram of an image receiving device according to an embodiment of the disclosure.
  • FIG. 12 is a schematic structural diagram of an image transmission device according to an embodiment of the disclosure.
  • the present disclosure provides an image sending method, an image receiving method, and an image transmission method, as well as an image sending device, an image receiving device, and an image transmission device that respectively perform the above methods, which are suitable for any image, including pictures, videos, etc.
  • the transmission system For the convenience of description, the following embodiments take an unmanned aerial vehicle system as an example to illustrate the present disclosure, but those skilled in the art should know that the above methods and devices provided in the present disclosure are also applicable to other systems.
  • the image sending device of the present disclosure is located on the drone, and the image receiving device is located on the control device of the drone, and the control device is, for example, a remote control.
  • the image sending device and the image receiving device constitute an image transmission device.
  • the image taken by the drone is sent by the image sending device, and the image receiving device of the control equipment receives the image and displays it, so as to realize the real-time image transmission of the drone.
  • An embodiment of the present disclosure provides an image sending method, as shown in FIG. 1, which includes the following steps:
  • S101 Perform first encoding on an image at a first resolution to generate a first code stream, and send the first code stream through a communication channel.
  • UAVs generally carry shooting equipment such as cameras.
  • the camera When the drone is performing a flight mission, the camera will take pictures of the scene in sight.
  • the drone encodes the image taken by the camera and sends the encoded image to the remote control.
  • Image resolution and frame rate are important parameters of image coding, which directly determine the bit rate of image transmission, and are also the main factors affecting the subjective quality of the image.
  • the drone uses the first resolution and frame rate to perform the first encoding on the image, and the first encoded image generates the first code stream.
  • the frame rate can be a common frame rate that can ensure the subjective quality of the image.
  • the first resolution may be 720P, 1080P, etc., for example.
  • the first resolution can be determined in various ways, and this embodiment is not limited.
  • the first resolution can be set by the user through the remote control.
  • the remote controller sends the resolution set by the user to the drone, and the drone uses the resolution as the first resolution to first encode the image.
  • the first resolution may also adopt the default resolution set by the drone.
  • the protocol used for the first encoding is also not limited, and it may be various standards or proprietary encoding protocols.
  • Standard encoding protocols such as but not limited to H.263, H.264, H.265, MPEG-4, etc.
  • the first code stream generated by the first encoding includes key frames (I frames) and predicted frames (P frames, B frames), each key frame and its corresponding multiple predicted frames Form a group of pictures (Group Of Picture, GOP).
  • the drone uses the communication channel of the wireless network to send the first code stream.
  • the wireless network can be a standard wireless network or a private wireless network.
  • the standard wireless network is, for example, WI-FI
  • the private wireless network is, for example, OcuSync, Light Bridge, etc.
  • the wireless network can use the 2.4GHz or 5.8GHz frequency band to transmit the first code stream.
  • the communication channel of the wired network can also be used to send the first code stream.
  • S102 In response to the change of the channel capacity of the communication channel, determine whether the first code stream matches the channel capacity; if not, perform the parallel encoding step: while continuing to encode the image first, perform the second resolution on the image at the second resolution. Encode to generate a second code stream, and simultaneously send the first code stream and the second code stream through the communication channel.
  • this step continuously detects whether the channel capacity has changed, and when the channel capacity changes, it is judged whether the first code stream matches the channel capacity.
  • This embodiment does not limit the specific method of channel capacity detection, and various mature methods can be used for detection.
  • the match refers to whether the code rate of the first code stream matches the channel capacity, which includes two meanings: when the channel capacity becomes smaller, the code rate of the first code stream is too large relative to the channel capacity. Mismatch: When the channel capacity becomes larger, the bit rate of the first bit stream is too small to match the channel capacity.
  • the above-mentioned first situation will cause the transmission delay of the first code stream and cause the image transmission not to be smooth.
  • the second situation above indicates that the communication channel is in good condition and a higher code rate can be used for the first encoding.
  • the first resolution can be increased to describe more detailed information of the image, so that the image is clearer, and a better viewing effect can be obtained.
  • judging whether the channel capacity of the first code stream matches the channel capacity of the communication channel includes:
  • the load capacity is greater than the first threshold or less than the second threshold, it is considered that the first code stream does not match the channel capacity; otherwise, when the load capacity is not less than the second threshold and not greater than the first threshold, it is considered that the first code stream and the channel Capacity matching; where the first threshold is greater than the second threshold, and the first threshold and the second threshold should be determined according to the bit rate of the first code stream.
  • Figure 3 shows the change curve of load capacity.
  • the above judgment condition means that as long as the load capacity is outside the first threshold and the second threshold, it is considered that the first code stream does not match the channel capacity, and the mismatch corresponds to the bold line in FIG. 3.
  • the parallel encoding step is performed: while continuing to encode the image first, perform the second encoding on the image at the second resolution to generate the first Two code streams, the first code stream and the second code stream are simultaneously sent through the communication channel.
  • the second resolution is greater than the first resolution, which can make full use of the channel capacity and present users with higher resolution Image to enhance the image transmission experience.
  • the second resolution is less than the first resolution, which can avoid the transmission delay of the first bit stream and the unsmooth image transmission, and improve the user experience.
  • the first code stream only occupies a part of the channel capacity of the communication channel.
  • the second code stream is sent using the remaining channel capacity of the communication channel.
  • an adaptive frame rate is used to perform a second encoding on the image.
  • the specific value of the adaptive frame rate is determined according to the remaining channel capacity. That is to say, when the image is secondly encoded with the second resolution and the adaptive frame rate, it is necessary to ensure that the frame rate of the second bit stream does not exceed the remaining channel capacity. In this way, as shown in FIG.
  • the parallel encoding step is equivalent to forming a resolution switching transition zone, and the second code stream is sent at the same time without affecting the transmission and display of the first code stream.
  • the second code stream is similar to the first code stream and also includes a key frame and at least one prediction frame.
  • the channel capacity of the first code stream matches the channel capacity of the communication channel in the following manner: determine whether the load capacity has experienced a change interval, if so, consider that the first code stream does not match the channel capacity; otherwise, It is considered that the first code stream matches the channel capacity.
  • the change interval includes: rising interval and falling interval.
  • the rising interval refers to the interval where the load capacity rises from less than the first threshold to greater than the first threshold; in this case, the second resolution is greater than the first resolution.
  • the decreasing interval refers to an interval in which the load capacity decreases from greater than the second threshold to less than the second threshold. In this case, the second resolution is less than the first resolution. That is, only when the load capacity has gone through the above-mentioned change interval, it is considered that the first code stream does not match the channel capacity, and the parallel coding step is executed. For other cases, as shown in Fig.
  • S103 Determine whether the second code stream reaches the quality of the first code stream; if so, perform the encoding switching step: stop performing the first encoding of the image, and continue to perform the second encoding on the image at the second resolution to generate the second code stream ,
  • the second code stream matches the channel capacity, and the second code stream is sent through the communication channel.
  • the code switching step is performed.
  • the quality can be measured by a variety of indicators, such as but not limited to Root Mean Square Error (RMSE), Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (Structural Similarity) Index, SSIM), Gradient Magnitude Similarity Deviation (GMSD), or a combination of at least any two of the above.
  • RMSE Root Mean Square Error
  • PSNR Peak Signal-to-Noise Ratio
  • SSIM Structural Similarity Index
  • GMSD Gradient Magnitude Similarity Deviation
  • the first encoding is no longer performed on the image, and the first code stream is no longer generated and sent, but the second encoding is continued on the image at the second resolution, and the communication channel is only Send the second stream.
  • the frame rate of the second encoding changes.
  • the second encoding uses an adaptive frame rate, but in the encoding switching step, the frame rate of the second encoding is equal to the frame rate of the first encoding. That is, in the parallel encoding step, the second encoding changes from the adaptive frame rate to the frame rate of the first encoding.
  • a common resolution switching method is shown in Figure 5.
  • the resolution needs to be switched due to changes in channel capacity, the image needs to be encoded with a new resolution. Since the resolution of the two frames before and after the resolution switch is different, the code stream after the switch cannot refer to the code stream before the switch.
  • a key frame must be generated. The communication channel first transmits the key frame of the code stream after switching, and then transmits the predicted frame. But because the key frame is extremely difficult to compress, when the resolution is switched, the image will appear blurred or stuck, causing obvious flickering when the resolution is switched. When the resolution is switched frequently, the subjective quality of the image is particularly poor .
  • the second code stream has generated the key frame and the predicted frame, and has been sent through the communication channel.
  • the second code stream generated by it only includes prediction frames and no key frames. What the communication channel sends is only prediction frames, without key frames. That is to say, in this embodiment, the key frame of the second code stream with the second resolution is sent in advance through the parallel encoding step, that is, sent in the parallel encoding step, rather than when the resolution is switched, that is, the code switching step is sent.
  • the communication channel sends the predicted frame instead of the key frame, which will not cause the image to be blurred or jammed, and the quality of the second bit stream has been consistent with the quality of the first bit stream, so in the resolution switch Flicker will not occur at the time, the resolution is switched without flicker, the subjective quality of the image is improved, and the user experience is improved.
  • the code switching step can be performed.
  • the threshold may be determined according to the index of the first code stream.
  • FIG. 6 Another embodiment of the present disclosure provides an image receiving method, as shown in FIG. 6, which includes the following steps:
  • Step S601 Receive a first code stream through a communication channel, where the first code stream is generated by first encoding the image at the first resolution, decodes the first code stream, and displays the first code stream at the first resolution .
  • this step corresponds to the first step of the image sending method, receiving the first code stream of the first resolution sent by the communication channel, and decoding and displaying the first code stream.
  • the first bit stream of the first resolution is displayed at this time.
  • Step S602 Perform a parallel receiving step: simultaneously receive the first code stream and the second code stream, the second code stream is generated by performing a second encoding on the image at the second resolution, and the first code stream and the second code stream are Decode, and continue to display the first code stream at the first resolution.
  • This step corresponds to the second step of the image sending method.
  • this step receives the first code stream and the second code stream at the same time, and compares the The first code stream and the second code stream are decoded, but the second code stream is not displayed, but the first code stream of the first resolution is still displayed.
  • Step S603 Perform a display switching step: receive a second code stream, which is generated by continuing to perform a second encoding on the image at the second resolution, and the second code stream matches the channel capacity, and the second code stream is decoded And display the second code stream with the second resolution.
  • This step corresponds to the third step of the image sending method.
  • the communication channel only transmits the second code stream
  • the second code stream is received and decoded, and the second code stream of the second resolution is displayed.
  • the key frame and the prediction frame of the second code stream have been received, and the first code stream is displayed.
  • the display switching step only the predicted frames of the second code stream are received.
  • the key frame of the second code stream with the second resolution is received in advance through the parallel receiving step, and the image will not be blurred or jammed when the resolution is switched, and the quality of the second code stream has been compared with that of the first code stream.
  • the quality of the code stream is consistent, so no flicker occurs when the resolution is switched, and the resolution is switched without flicker, which improves the subjective quality of the image and improves the user experience.
  • FIG. 8 Another embodiment of the present disclosure provides an image transmission method, as shown in FIG. 8, which includes the following steps:
  • Step S801 Perform first encoding on the image at the first resolution to generate a first code stream, and transmit the first code stream through a communication channel, decode the first code stream, and display the first code stream at the first resolution .
  • the drone uses the first resolution and frame rate to perform the first encoding on the image, and the first encoded image generates the first code stream.
  • the frame rate can be a common frame rate that can ensure the subjective quality of the image.
  • the first resolution may be 720P, 1080P, etc., for example.
  • the first resolution can be determined in various ways, and this embodiment is not limited.
  • the first resolution can be set by the user through the remote control.
  • the remote controller sends the resolution set by the user to the drone, and the drone uses the resolution as the first resolution to first encode the image.
  • the first resolution may also adopt the default resolution set by the drone.
  • the protocol used for the first encoding is also not limited, and it may be various standards or proprietary encoding protocols.
  • Standard encoding protocols such as but not limited to H.263, H.264, H.265, MPEG-4, etc.
  • the first code stream generated by the first encoding includes key frames (I frames) and predicted frames (P frames, B frames), each key frame and its corresponding multiple predicted frames Form a group of pictures (Group Of Picture, GOP).
  • the drone uses the communication channel of the wireless network to transmit the first code stream, and decode and display the first code stream.
  • the first bit stream of the first resolution is displayed at this time.
  • the wireless network can be a standard wireless network or a private wireless network.
  • the standard wireless network is, for example, WI-FI
  • the private wireless network is, for example, OcuSync, Light Bridge, etc.
  • the wireless network can use the 2.4GHz or 5.8GHz frequency band to transmit the first code stream.
  • the communication channel of the wired network may also be used to send the first code stream.
  • Step S802 In response to the change in the channel capacity of the communication channel, determine whether the first code stream matches the channel capacity; if not, perform the parallel transmission step: while continuing to perform the first encoding of the image, perform the second resolution on the image at the second resolution. Two encoding to generate the second code stream, and simultaneously transmit the first code stream and the second code stream through the communication channel, decode the first code stream and the second code stream, and continue to display the first code stream at the first resolution .
  • This step continuously detects whether the channel capacity has changed. When the channel capacity changes, it is judged whether the first code stream matches the channel capacity.
  • This embodiment does not limit the specific method of channel capacity detection, and various mature methods can be used for detection.
  • the match refers to whether the code rate of the first code stream matches the channel capacity, which includes two meanings: when the channel capacity becomes smaller, the code rate of the first code stream is too large relative to the channel capacity. Mismatch: When the channel capacity becomes larger, the bit rate of the first bit stream is too small to match the channel capacity.
  • the above-mentioned first situation will cause the transmission delay of the first code stream, and cause the image transmission not to be smooth.
  • the second case above indicates that the communication channel is in good condition and a higher code rate can be used for the first encoding.
  • the first resolution can be increased to describe more detailed information of the image, so that the image is clearer, and a better viewing effect can be obtained.
  • judging whether the channel capacity of the first code stream matches the channel capacity of the communication channel includes:
  • the load capacity is greater than the first threshold or less than the second threshold, it is considered that the first code stream does not match the channel capacity; otherwise, when the load capacity is not less than the second threshold and not greater than the first threshold, it is considered that the first code stream and the channel Capacity matching; where the first threshold is greater than the second threshold, and the first threshold and the second threshold should be determined according to the bit rate of the first code stream.
  • Figure 3 shows the change curve of load capacity.
  • the above judgment condition means that as long as the load capacity is outside the first threshold and the second threshold, it is considered that the first code stream does not match the channel capacity, and the mismatch corresponds to the bold line in FIG. 3.
  • the parallel encoding step is performed: while continuing to encode the image first, perform the second encoding on the image at the second resolution to generate the first Two code streams, the first code stream and the second code stream are simultaneously transmitted through the communication channel, and the first code stream and the second code stream are decoded, but the second code stream is not displayed, but the first resolution is still displayed The first stream.
  • the second resolution is greater than the first resolution, which can make full use of the channel capacity and present users with higher resolution Image to enhance the image transmission experience.
  • the second resolution is less than the first resolution, which can avoid the transmission delay of the first bit stream and the unsmooth image transmission, and improve the user experience.
  • the first code stream only occupies a part of the channel capacity of the red communication channel.
  • the second code stream uses the remaining channel capacity beyond this part of the communication channel for transmission.
  • an adaptive frame rate is used to perform a second encoding on the image.
  • the specific value of the adaptive frame rate is determined according to the remaining channel capacity. That is to say, when the image is secondly encoded with the second resolution and the adaptive frame rate, it is necessary to ensure that the frame rate of the second bit stream does not exceed the remaining channel capacity. In this way, as shown in FIG.
  • the parallel transmission step is equivalent to forming a resolution switching transition zone, and the second code stream is sent at the same time without affecting the transmission and display of the first code stream.
  • the second code stream is similar to the first code stream and also includes a key frame and at least one prediction frame.
  • the channel capacity of the first code stream matches the channel capacity of the communication channel in the following manner: determine whether the load capacity has experienced a change interval, if so, consider that the first code stream does not match the channel capacity; otherwise, It is considered that the first code stream matches the channel capacity.
  • the change interval includes: rising interval and falling interval.
  • the rising interval refers to the interval where the load capacity rises from less than the first threshold to greater than the first threshold; in this case, the second resolution is greater than the first resolution.
  • the decreasing interval refers to an interval in which the load capacity decreases from greater than the second threshold to less than the second threshold. In this case, the second resolution is less than the first resolution. That is, only when the load capacity has gone through the above-mentioned change interval, it is considered that the first code stream does not match the channel capacity, and the parallel coding step is executed. For other cases, as shown in Fig.
  • Step S803 Determine whether the second code stream reaches the quality of the first code stream; if so, perform the switching step: stop performing the first encoding of the image, and continue to perform the second encoding of the image at the second resolution to generate the second code stream ,
  • the second code stream is matched with the channel capacity, and the second code stream is transmitted through the communication channel, the second code stream is decoded, and the second code stream is displayed with the second resolution.
  • the switching step is performed.
  • the quality can be measured by a variety of indicators, such as but not limited to Root Mean Square Error (RMSE), Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (Structural Similarity) Index, SSIM), Gradient Magnitude Similarity Deviation (GMSD), or a combination of at least any two of the above.
  • RMSE Root Mean Square Error
  • PSNR Peak Signal-to-Noise Ratio
  • SSIM Structural Similarity Index
  • GMSD Gradient Magnitude Similarity Deviation
  • the first encoding is no longer performed on the image, and the first code stream is no longer generated and sent, but the image continues to be second encoded at the second resolution, and the communication channel only transmits The second code stream, and decode the second code stream, and display the second code stream of the second resolution.
  • the frame rate of the second encoding changes.
  • the second encoding uses an adaptive frame rate, but in the switching step, the frame rate of the second encoding is equal to the frame rate of the first encoding. That is, in the parallel transmission step, the second encoding changes from the adaptive frame rate to the frame rate of the first encoding.
  • a common resolution switching method is shown in Figure 5.
  • the resolution needs to be switched due to changes in channel capacity, the image needs to be encoded with a new resolution. Since the resolution of the two frames before and after the resolution switch is different, the code stream after the switch cannot refer to the code stream before the switch.
  • a key frame must be generated. The communication channel first transmits the key frame of the code stream after switching, and then transmits the predicted frame. But because the key frame is extremely difficult to compress, when the resolution is switched, the image will appear blurred or stuck, causing obvious flickering when the resolution is switched. When the resolution is switched frequently, the subjective quality of the image is particularly poor .
  • the second code stream has generated key frames and predicted frames, and has been sent through the communication channel.
  • the second code stream generated by it only includes prediction frames and no key frames. What the communication channel transmits is only prediction frames, without key frames. That is, in this embodiment, the key frame of the second code stream with the second resolution is sent in advance through the parallel transmission step, that is, it is transmitted in the parallel transmission step, rather than when the resolution is switched, that is, it is transmitted in the switching step.
  • the communication channel transmits the predicted frame instead of the key frame, which will not cause the image to be blurred or jammed, and the quality of the second bit stream has been consistent with the quality of the first bit stream, so in the resolution switch Flicker will not occur at the time, the resolution is switched without flicker, the subjective quality of the image is improved, and the user experience is improved.
  • the code switching step can be performed.
  • the threshold may be determined according to the index of the first code stream.
  • the communication channel in the parallel encoding step of step S102, sends the first code stream and the second code stream while judging whether there is an error in the first code stream, and if so, execute the code switching step.
  • the error of the first code stream can be quickly processed, so as to avoid the error of the first code stream from affecting the image quality, realize the rapid error correction of the image, and improve the image quality.
  • step S802 while the communication channel transmits the first code stream and the second code stream, it is judged whether there is an error in the first code stream, and if so, the switching step is performed.
  • step S803 if an error is detected in the first code stream, it is no longer judged whether the second code stream reaches the quality of the first code stream, but the switching step of step S803 is directly executed, that is, the discrimination is directly performed. Rate switching, stop the first encoding of the image, continue the second encoding, and only transmit the second code stream on the communication channel.
  • the error of the first code stream can be quickly processed, so as to avoid the error of the first code stream from affecting the image quality, realize the rapid error correction of the image, and improve the image quality.
  • step S103 error recovery is performed on the second code stream based on the feedback mechanism.
  • the feedback mechanism uses the feedback information of the image receiving device to perform error recovery on the code stream. Specifically, as shown in Figure 9, if the image receiving device finds that the P4 frame of the second code stream has an error, the information can be fed back to the image transmission
  • the device enables the image transmitting device to use the correct frame (any frame of the P1 to P3 frames) that has been received by the image receiving device before the P4 frame as the reference frame when encoding the P5 frame.
  • the second code stream generated by performing the second encoding on the image the frames of the second code stream are encoded with a frame sequence number, the frame sequence number is a global sequence number, and the frame sequence number of each frame is unique.
  • the frame sequence number is sent together with the frame.
  • Feedback mechanisms include:
  • Receive feedback information sent by the image receiving device where the feedback information includes: the frame sequence number of the correct frame of the second code stream received by the image receiving device.
  • the correct frame may be the last correct frame of the second code stream received by the image receiving device before sending the feedback information.
  • the image sending device creates a reference frame queue, and the reference frame queue is used to store the correct frame of the second code stream received by the image receiving device and its frame sequence number.
  • the frame sequence number and its corresponding correct frame are saved in the reference frame queue, and the received correct frame is taken as the first frame of the reference frame queue.
  • the first frame of the reference frame queue is used as the reference frame, and the current frame is coded with reference to this reference frame.
  • the image sending device always refers to the correct frame of the second code stream received by the image receiving device to encode the current frame, and even if an error frame appears in the second code stream, the error can be recovered. It can be seen that the feedback mechanism of this embodiment can ensure error recovery without sending key frames, greatly reducing the pressure on the communication channel capacity, improving image transmission quality, and enhancing user experience.
  • the reference frame may not be directly referenced.
  • the first frame of the frame queue is used as the reference frame, but the last frame sent before the current frame is used as the reference frame. Determine whether the frame sequence number of the correct frame is equal to the frame sequence number of the last frame. If not, the first frame of the reference frame queue is used as the reference frame.
  • the P3 frame and the P4 frame are sent sequentially, where the P3 frame is correct and the P4 frame is wrong.
  • the image receiving device may not yet return feedback information, so the image sending device does not know whether the P4 frame is received correctly. At this time, you can continue to encode the P5 frame with reference to the P4 frame. Because the P5 refers to the nearest frame (P4 frame) for encoding, the encoding efficiency is higher.
  • the correct frame returned by the image receiving device is a P3 frame, it is found that the correct frame is not a P4 frame, and then the first frame (P3 frame) of the reference frame queue is used as a reference frame to re-encode P5.
  • Adopting the above method can improve the coding efficiency, help reduce the code rate, and reduce the pressure of the communication channel.
  • step S603 error recovery is performed on the second code stream based on the feedback mechanism.
  • the image receiving device establishes a reference frame queue, and while receiving the second code stream, only the correct frame of the second code stream and its frame sequence number are saved in the reference frame queue.
  • the feedback mechanism includes: sending feedback information to the image sending device at predetermined time intervals, and the feedback information includes: referring to the frame sequence number of the last correct frame of the received second code stream stored in the frame queue before sending the feedback information.
  • the feedback mechanism may also not send feedback information at predetermined time intervals, but only send feedback information to the image sending device after an error frame occurs in the second code stream.
  • the image sending device always refers to the correct frame of the second code stream received by the image receiving device to encode the current frame, and even if an error frame appears in the second code stream, the error can be recovered. It can be seen that the feedback mechanism of this embodiment can ensure error recovery without sending key frames, greatly reducing the pressure on the communication channel capacity, improving image transmission quality, and enhancing user experience.
  • step S803 error recovery is performed on the second code stream based on the feedback mechanism.
  • Feedback mechanisms include:
  • the image sending device acquires the current frame of the second code stream
  • the image receiving device sends feedback information to the image sending device
  • the image sending device receives the feedback information, determines the reference frame of the current frame according to the feedback information, and performs second encoding on the current frame according to the reference frame.
  • the image receiving device may send feedback information to the image sending device at a predetermined time interval or in response to receiving an error frame of the second code stream.
  • the feedback information includes: the frame sequence number of the last correct frame of the second code stream received by the image receiving device before sending the feedback information or before receiving the error frame.
  • the reference frame of the current frame determined according to the feedback information includes:
  • the image sending device always refers to the correct frame of the second code stream received by the image receiving device to encode the current frame, and even if an error frame appears in the second code stream, the error can be recovered. It can be seen that the feedback mechanism of this embodiment can ensure error recovery without sending key frames, greatly reducing the pressure on the communication channel capacity, improving image transmission quality, and enhancing user experience.
  • Yet another embodiment of the present disclosure provides an image sending device, as shown in FIG. 10, which includes a memory, a processor, and a transmitter.
  • the memory is used to store executable instructions.
  • the processor is configured to read the executable instructions to perform the following operations: perform first encoding on the image at the first resolution to generate a first code stream.
  • the transmitter transmits the first code stream through a communication channel.
  • the processor determines whether the first code stream matches the channel capacity; if not, executes a parallel encoding operation: while continuing to encode the image first, perform the second resolution on the image at the second resolution. Encode to generate a second code stream, and the transmitter simultaneously transmits the first code stream and the second code stream through the communication channel.
  • the processor judges whether the second code stream has reached the quality of the first code stream; if it is, executes the code switching operation: stops performing the first encoding of the image, and continues to perform the second encoding on the image at the second resolution to generate the second code stream ,
  • the second code stream matches the channel capacity, and the transmitter uses the second code stream through the communication channel.
  • the image sending device uses the first resolution and frame rate to perform first encoding on the image, and the first encoded image generates a first code stream.
  • the frame rate can be a common frame rate that can ensure the subjective quality of the image.
  • the protocol used for the first encoding is also not limited, and it may be various standards or proprietary encoding protocols.
  • the transmitter uses the communication channel of the wireless network to send the first code stream.
  • the wireless network can be a standard wireless network or a private wireless network.
  • the communication channel of the wired network can also be used to send the first code stream.
  • the processor continuously detects whether the channel capacity has changed, and when the channel capacity changes, it determines whether the first code stream matches the channel capacity. This embodiment does not limit the specific method of channel capacity detection, and various mature methods can be used for detection.
  • the match refers to whether the code rate of the first code stream matches the channel capacity, which includes two meanings: when the channel capacity becomes smaller, the code rate of the first code stream is too large relative to the channel capacity. Mismatch: When the channel capacity becomes larger, the bit rate of the first bit stream is too small to match the channel capacity.
  • the above-mentioned first situation will cause the transmission delay of the first code stream, and cause the image transmission not to be smooth.
  • the second situation above indicates that the communication channel is in good condition and a higher code rate can be used for the first encoding.
  • the first resolution can be increased to describe more detailed information of the image, so that the image is clearer, and a better viewing effect can be obtained.
  • judging whether the channel capacity of the first code stream matches the channel capacity of the communication channel includes:
  • the load capacity is greater than the first threshold or less than the second threshold, it is considered that the first code stream does not match the channel capacity; otherwise, when the load capacity is not less than the second threshold and not greater than the first threshold, it is considered that the first code stream and the channel Capacity matching; where the first threshold is greater than the second threshold, and the first threshold and the second threshold should be determined according to the bit rate of the first code stream.
  • the parallel encoding operation is performed: while the image continues to be first coded, the image is second coded at the second resolution to generate a second code stream, which is sent simultaneously through the communication channel The first code stream and the second code stream.
  • the second resolution is greater than the first resolution, which can make full use of the channel capacity and present users with higher resolution Image to enhance the image transmission experience.
  • the second resolution is less than the first resolution, which can avoid the transmission delay of the first bit stream and the unsmooth image transmission, and improve the user experience.
  • the first code stream only occupies a part of the channel capacity of the red communication channel.
  • the second code stream is sent by using the remaining channel capacity of the communication channel.
  • the processor uses the adaptive frame rate to perform second encoding on the image.
  • the specific value of the adaptive frame rate is determined according to the remaining channel capacity. That is to say, when the image is secondly encoded with the second resolution and the adaptive frame rate, it is necessary to ensure that the frame rate of the second bit stream does not exceed the remaining channel capacity.
  • the parallel encoding operation is equivalent to forming a resolution switching transition zone, and the second code stream is sent at the same time without affecting the transmission and display of the first code stream.
  • the second code stream is similar to the first code stream and also includes a key frame and at least one prediction frame.
  • the channel capacity of the first code stream matches the channel capacity of the communication channel in the following manner: determine whether the load capacity has experienced a change interval, if so, consider that the first code stream does not match the channel capacity; otherwise, It is considered that the first code stream matches the channel capacity.
  • the change interval includes: rising interval and falling interval.
  • the rising interval refers to the interval in which the load capacity increases from less than the first threshold to greater than the first threshold; in this case, the second resolution is greater than the first resolution.
  • the decreasing interval refers to an interval in which the load capacity decreases from greater than the second threshold to less than the second threshold. In this case, the second resolution is less than the first resolution. That is, only when the load capacity has gone through the above-mentioned change interval, will it be considered that the first code stream does not match the channel capacity, and the parallel encoding step will be executed, which can reduce unnecessary resolution switching, reduce the frequency of resolution switching, and improve the image quality. Subjective quality improves user experience.
  • the code switching operation is performed.
  • the quality can be measured by a variety of indicators
  • the first code is no longer performed on the image, and the first code stream is no longer generated and sent, but the second code stream is continued to be performed on the image at the second resolution, and the communication channel only sends the second code stream.
  • the frame rate of the second encoding changes.
  • the second encoding uses an adaptive frame rate, but in the encoding switching step, the frame rate of the second encoding is equal to the frame rate of the first encoding.
  • the second code stream has generated the key frame and the predicted frame, and has been sent through the communication channel.
  • the second code stream generated by it only includes prediction frames and no key frames. What the communication channel sends is only prediction frames, without key frames. That is, in this embodiment, the key frame of the second code stream with the second resolution is sent in advance through the parallel encoding operation, that is, sent during the parallel encoding operation, rather than when the resolution is switched, that is, during the encoding switching operation.
  • the communication channel sends the predicted frame instead of the key frame, which will not cause the image to be blurred or jammed, and the quality of the second bit stream has been consistent with the quality of the first bit stream, so in the resolution switch Flicker will not occur at the time, the resolution is switched without flicker, the subjective quality of the image is improved, and the user experience is improved.
  • the second code stream can be considered to have reached the quality of the first code stream. So judging whether the second code stream reaches the quality of the first code stream can also be the following:
  • the code switching step can be performed.
  • the threshold may be determined according to the index of the first code stream.
  • FIG. 11 Another embodiment of the present disclosure provides an image receiving device, as shown in FIG. 11, which includes a memory, a processor, a receiver, and a display.
  • Memory used to store executable instructions
  • the receiver receives the first code stream through a communication channel, and the first code stream is generated by first encoding the image at the first resolution.
  • the processor is configured to read executable instructions to perform the following operations: decode the first code stream, and provide the first code stream to the display for display at the first resolution.
  • the display displays the first code stream at the first resolution.
  • the receiver receives the first code stream and the second code stream at the same time.
  • the second code stream is generated by performing a second encoding on the image at the second resolution.
  • the processor performs the first code stream and the second code stream Perform decoding and continue to provide the first code stream to the display to display at the first resolution; the display to display the first code stream at the first resolution.
  • the receiver receives the second code stream, which is generated by continuing to perform the second encoding of the image at the second resolution, the second code stream matches the channel capacity, and the processor performs the second code stream Decode, and provide the second code stream to the display to display at the second resolution.
  • the display displays the second code stream at the second resolution.
  • the image receiving device receives the first code stream of the first resolution sent by the communication channel, and decodes and displays the first code stream.
  • the first bit stream of the first resolution is displayed at this time.
  • the image receiving device When the communication channel transmits the first code stream and the second code stream at the same time, the image receiving device simultaneously receives the first code stream and the second code stream, and decodes the first code stream and the second code stream, but does not display the second code stream. Code stream, but still display the first code stream of the first resolution.
  • the image receiving device receives and decodes the second code stream, and displays the second code stream of the second resolution.
  • the key frame and prediction frame of the second code stream have been received, and the first code stream is displayed.
  • the display switching operation only the predicted frames of the second code stream are received.
  • the key frame of the second code stream with the second resolution is received in advance through the parallel receiving operation, and the image blur or jam will not occur when the resolution is switched, and the quality of the second code stream has been compared with that of the first code stream.
  • the quality of the code stream is consistent, so no flicker occurs when the resolution is switched, and the resolution is switched without flicker, which improves the subjective quality of the image and improves the user experience.
  • FIG. 12 Another embodiment of the present disclosure provides an image transmission device, as shown in FIG. 12, which includes: an image sending device and an image receiving device;
  • the image sending device is used to first encode the image at the first resolution to generate a first code stream, and transmit the first code stream to the image receiving device through a communication channel, and the image receiving device decodes the first code stream, And display the first code stream with the first resolution.
  • the image sending device judges whether the first bit stream matches the channel capacity; if not, the parallel transmission operation is performed: the image sending device is used to continue the first encoding of the image while performing the second resolution Perform a second encoding on the image to generate a second code stream, and simultaneously transmit the first code stream and the second code stream to the image receiving device through the communication channel, and the image receiving device decodes the first code stream and the second code stream , And continue to display the first code stream with the first resolution.
  • the image sending device judges whether the second code stream reaches the quality of the first code stream; if it is, the switching operation is performed: the image sending device stops the first encoding of the image, and continues to perform the second encoding of the image at the second resolution to generate the first Two code streams, the second code stream matches the channel capacity, and the second code stream is transmitted to the image receiving device through the communication channel, and the image receiving device decodes the second code stream and displays the second code stream at the second resolution .
  • the image sending device uses the first resolution and frame rate to perform first encoding on the image, and the first encoded image generates a first code stream.
  • the frame rate can be a common frame rate that can ensure the subjective quality of the image.
  • the protocol used for the first encoding is also not limited, and it can be various standards or proprietary encoding protocols.
  • the image sending device transmits the first code stream by using the communication channel of the wireless network, and decodes and displays the first code stream. The first bit stream of the first resolution is displayed at this time. This embodiment does not impose restrictions on the types of wireless networks, and the wireless network can be a standard wireless network or a private wireless network.
  • the communication channel of the wired network may also be used to send the first code stream.
  • the image sending device continuously detects whether the channel capacity has changed, and when the channel capacity changes, it judges whether the first code stream matches the channel capacity.
  • This embodiment does not limit the specific method of channel capacity detection, and various mature methods can be used for detection.
  • the match refers to whether the code rate of the first code stream matches the channel capacity, which includes two meanings: when the channel capacity becomes smaller, the code rate of the first code stream is too large relative to the channel capacity. Mismatch: When the channel capacity becomes larger, the bit rate of the first bit stream is too small to match the channel capacity.
  • the above-mentioned first situation will cause the transmission delay of the first code stream, and cause the image transmission not to be smooth.
  • the second situation above indicates that the communication channel is in good condition and a higher code rate can be used for the first encoding.
  • the first resolution can be increased to describe more detailed information of the image, so that the image is clearer, and a better viewing effect can be obtained.
  • judging whether the channel capacity of the first code stream matches the channel capacity of the communication channel includes:
  • the load capacity is greater than the first threshold or less than the second threshold, it is considered that the first code stream does not match the channel capacity; otherwise, when the load capacity is not less than the second threshold and not greater than the first threshold, it is considered that the first code stream and the channel Capacity matching; where the first threshold is greater than the second threshold, and the first threshold and the second threshold should be determined according to the bit rate of the first code stream.
  • the parallel encoding operation When the first code stream does not match the channel capacity, perform the parallel encoding operation: while continuing to encode the image first, perform the second encoding on the image at the second resolution to generate a second code stream, and transmit it simultaneously through the communication channel
  • the first code stream and the second code stream, and the first code stream and the second code stream are decoded, but the second code stream is not displayed, but the first code stream of the first resolution is still displayed.
  • the second resolution is greater than the first resolution, which can make full use of the channel capacity and present users with higher resolution Image to enhance the image transmission experience.
  • the second resolution is less than the first resolution, which can avoid the transmission delay of the first bit stream and the unsmooth image transmission, and improve the user experience.
  • the first code stream only occupies a part of the channel capacity of the red communication channel.
  • the second code stream uses the remaining channel capacity beyond this part of the communication channel for transmission. .
  • the second encoding is performed on the image using the adaptive frame rate.
  • the specific value of the adaptive frame rate is determined according to the remaining channel capacity. That is to say, when the image is secondly encoded with the second resolution and the adaptive frame rate, it is necessary to ensure that the frame rate of the second bit stream does not exceed the remaining channel capacity.
  • the parallel transmission operation is equivalent to forming a resolution switching transition zone, and the second code stream is sent at the same time without affecting the transmission and display of the first code stream.
  • the second code stream is similar to the first code stream and also includes a key frame and at least one prediction frame.
  • the channel capacity of the first code stream matches the channel capacity of the communication channel in the following manner: determine whether the load capacity has experienced a change interval, if so, consider that the first code stream does not match the channel capacity; otherwise, It is considered that the first code stream matches the channel capacity.
  • the change interval includes: rising interval and falling interval.
  • the rising interval refers to the interval in which the load capacity increases from less than the first threshold to greater than the first threshold; in this case, the second resolution is greater than the first resolution.
  • the decreasing interval refers to an interval in which the load capacity decreases from greater than the second threshold to less than the second threshold. In this case, the second resolution is less than the first resolution. That is, only when the load capacity has gone through the above-mentioned change interval, it is considered that the first code stream does not match the channel capacity, and the parallel coding step is executed.
  • the switching operation is performed.
  • the first encoding is no longer performed on the image, and the first code stream is no longer generated and sent, but the image is continued to be second encoded at the second resolution, and the communication channel only sends the second code stream, and Decode the second code stream and display the second code stream of the second resolution.
  • the frame rate of the second encoding changes.
  • the second encoding uses the adaptive frame rate, but in the switching operation, the frame rate of the second encoding is equal to the frame rate of the first encoding. That is, in the parallel transmission operation, the second encoding changes from the adaptive frame rate to the frame rate of the first encoding.
  • the second code stream because in the parallel transmission operation, the second code stream has generated the key frame and the predicted frame, and has been sent through the communication channel.
  • the second code stream generated by it only includes prediction frames and no key frames. What the communication channel transmits is only prediction frames, without key frames. That is to say, in this embodiment, the key frame of the second code stream with the second resolution is transmitted in advance through the parallel transmission operation, that is, transmitted in the parallel transmission operation, rather than when the resolution is switched, that is, transmitted in the switching operation.
  • the communication channel transmits the predicted frame instead of the key frame, which will not cause the image to be blurred or jammed, and the quality of the second bit stream has been consistent with the quality of the first bit stream, so in the resolution switch Flicker will not occur at the time, the resolution is switched without flicker, the subjective quality of the image is improved, and the user experience is improved.
  • the second code stream can be considered to have reached the quality of the first code stream. So judging whether the second code stream reaches the quality of the first code stream can also be the following:
  • the code switching step can be performed.
  • the threshold may be determined according to the index of the first code stream.
  • Yet another embodiment of the present disclosure provides an unmanned aerial vehicle including: the image sending device of any of the above embodiments.
  • control device including: the image receiving device described in any of the foregoing embodiments.
  • the control device is, for example, a remote control of a drone.
  • Yet another embodiment of the present disclosure provides an unmanned aerial vehicle system, including: the image transmission device described in any of the foregoing embodiments.
  • Yet another embodiment of the present disclosure provides an unmanned aerial vehicle system, including the unmanned aerial vehicle and the control device.

Landscapes

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

Abstract

一种图像发送方法、图像接收方法、图像传输方法及装置,通过并行编码步骤提前发送具有第二分辨率的第二码流的关键帧,即在并行编码步骤中发送,而不是分辨率切换时发送。分辨率切换时通信信道发送的是预测帧而非关键帧,不会导致图像模糊或卡顿的情况出现,并且第二码流的质量已经与第一码流的质量一致,所以在分辨率切换时不会发生闪烁现象,实现了分辨率无闪烁切换,提高了图像的主观质量,提升了用户体验。

Description

一种图像发送方法、图像接收方法、图像传输方法及装置 技术领域
本公开涉及图像传输技术领域,尤其涉及一种图像发送方法、图像接收方法、图像传输方法及装置。
背景技术
无人机一般携带有摄像机等拍摄设备。当无人机执行飞行任务时,常常需要将摄像机拍摄的图像传输给地面。图像传输时,由于无人机所处的环境常常变化剧烈,通信信道的信道容量发生变化,从而会影响图像的传输质量。
当通信信道的信道容量发生变化时,可采用改变图像分辨率的方式来匹配信道容量。现有的图像传输技术,在变更图像分辨率时,容易造成图像卡顿、模糊,导致图像出现闪烁,影响图像的主观质量。
公开内容
本公开提供了一种图像发送方法,其中,包括:
以第一分辨率对图像进行第一编码以生成第一码流,通过一通信信道发送所述第一码流;
响应于所述通信信道的信道容量变化,判断所述第一码流与所述信道容量是否匹配;如果否,执行并行编码步骤:继续对所述图像进行第一编码的同时,以第二分辨率对所述图像进行第二编码以生成第二码流,通过所述通信信道同时发送所述第一码流和所述第二码流;
判断所述第二码流是否达到所述第一码流的质量;如果是,执行编码切换步骤:停止对所述图像进行所述第一编码,继续以所述第二分辨率对所述图像进行所述第二编码以生成所述第二码流,所述第二码流与所述信道容量匹配,并通过所述通信信道发送所述第二码流。
本公开还提供了一种图像接收方法,其中,包括:
通过一通信信道接收第一码流,所述第一码流是以第一分辨率对图像进行第一编码而生成,对所述第一码流进行解码并以所述第一分辨率显示所述第一码流;
执行并行接收步骤:同时接收所述第一码流和第二码流,所述第二码 流是以第二分辨率对所述图像进行第二编码而生成,对所述第一码流和所述第二码流进行解码,并继续以所述第一分辨率显示所述第一码流;
执行显示切换步骤:接收所述第二码流,所述第二码流是以所述第二分辨率继续对所述图像进行所述第二编码而生成,所述第二码流与所述信道容量匹配,对所述第二码流进行解码并以所述第二分辨率显示所述第二码流。
本公开还提供了一种图像传输方法,其中,包括:
以第一分辨率对图像进行第一编码以生成第一码流,并通过一通信信道传输所述第一码流,对所述第一码流进行解码并以所述第一分辨率显示所述第一码流;
响应于所述通信信道的信道容量变化,判断所述第一码流与所述信道容量是否匹配;如果否,执行并行传输步骤:继续对所述图像进行第一编码的同时,以第二分辨率对所述图像进行第二编码以生成第二码流,并通过所述通信信道同时传输所述第一码流和所述第二码流,对所述第一码流和所述第二码流进行解码,并继续以所述第一分辨率显示所述第一码流;
判断所述第二码流是否达到所述第一码流的质量;如果是,执行切换步骤:停止对所述图像进行所述第一编码,继续以所述第二分辨率对所述图像进行所述第二编码以生成所述第二码流,所述第二码流与所述信道容量匹配,并通过所述通信信道传输所述第二码流,对所述第二码流进行解码,并以所述第二分辨率显示所述第二码流。
本公开还提供了一种图像发送装置,其中,包括:
存储器,用于存储可执行指令;
处理器,用于读取所述可执行指令以执行以下操作:
以第一分辨率对图像进行第一编码以生成第一码流,通过一通信信道发送所述第一码流;
响应于所述通信信道的信道容量变化,判断所述第一码流与所述信道容量是否匹配;如果否,执行并行编码操作:继续对所述图像进行第一编码的同时,以第二分辨率对所述图像进行第二编码以生成第二码流,通过所述通信信道同时发送所述第一码流和所述第二码流;
判断所述第二码流是否达到所述第一码流的质量;如果是,执行编码 切换操作:停止对所述图像进行所述第一编码,继续以所述第二分辨率对所述图像进行所述第二编码以生成所述第二码流,所述第二码流与所述信道容量匹配,并通过所述通信信道发送所述第二码流。
本公开还提供了一种图像接收装置,其中,包括:
存储器,用于存储可执行指令;
处理器,用于读取所述可执行指令以执行以下操作:
通过一通信信道接收第一码流,所述第一码流是以第一分辨率对图像进行第一编码而生成,对所述第一码流进行解码,并将所述第一码流提供给显示器以所述第一分辨率显示;
执行并行接收操作:同时接收所述第一码流和第二码流,所述第二码流是以第二分辨率对所述图像进行第二编码而生成,对所述第一码流和所述第二码流进行解码,并继续将所述第一码流提供给显示器以所述第一分辨率显示;
执行显示切换操作:接收所述第二码流,所述第二码流是以所述第二分辨率继续对所述图像进行所述第二编码而生成,所述第二码流与所述信道容量匹配,对所述第二码流进行解码,并将所述第二码流提供给显示器以所述第二分辨率显示。
本公开还提供了一种图像传输装置,其中,包括:图像发送装置与图像接收装置;
所述图像发送装置用于以第一分辨率对图像进行第一编码以生成第一码流,并通过一通信信道将所述第一码流传输至图像接收装置,所述图像接收装置对所述第一码流进行解码,并以所述第一分辨率显示所述第一码流;
响应于所述通信信道的信道容量变化,所述图像发送装置判断所述第一码流与所述信道容量是否匹配;如果否,执行并行传输操作:所述图像发送装置用于继续对所述图像进行第一编码的同时,以第二分辨率对所述图像进行第二编码以生成第二码流,并通过所述通信信道同时将所述第一码流和所述第二码流传输至所述图像接收装置,所述图像接收装置对所述第一码流和所述第二码流进行解码,并继续以所述第一分辨率显示所述第一码流;
所述图像发送装置判断所述第二码流是否达到所述第一码流的质量;如果是,执行切换操作:所述图像发送装置所述停止对所述图像进行所述第一编码,继续以所述第二分辨率对所述图像进行所述第二编码以生成所述第二码流,所述第二码流与所述信道容量匹配,并通过所述通信信道将所述第二码流传输至所述图像接收装置,所述图像接收装置对所述第二码流进行解码,并以所述第二分辨率显示所述第二码流。
本公开还提供了一种无人机,包括:上述图像发送装置。
本公开还提供了一种控制设备,包括:上述图像接收装置。
本公开还提供了一种无人机系统,包括:上述图像传输装置。
本公开还提供了一种无人机系统,包括:上述无人机和上述控制设备。
从上述技术方案可以看出,本公开至少具有以下有益效果:
通过并行编码步骤提前发送具有第二分辨率的第二码流的关键帧,即在并行编码步骤中发送,而不是分辨率切换时发送。分辨率切换时通信信道发送的是预测帧而非关键帧,不会导致图像模糊或卡顿的情况出现,并且第二码流的质量已经与第一码流的质量一致,所以在分辨率切换时不会发生闪烁现象,实现了分辨率无闪烁切换,提高了图像的主观质量,提升了用户体验。
附图说明
附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:
图1为本公开实施例图像发送方法的流程图。
图2为图1所述图像发送方法的时序图。
图3为图1所述图像发送方法的负荷容量的变化曲线图。
图4为图1所述图像发送方法的负荷容量的另一变化曲线图。
图5为现有分辨率切换方法的时序图。
图6为本公开实施例图像接收方法的流程图。
图7为图6所述图像接收方法的时序图。
图8为本公开实施例图像传输方法的流程图。
图9为本公开实施例图像传输方法的第二码流的时序图。
图10为本公开实施例图像发送装置的结构示意图。
图11为本公开实施例图像接收装置的结构示意图。
图12为本公开实施例图像传输装置的结构示意图。
具体实施方式
本公开提供了一种图像发送方法、图像接收方法和图像传输方法,以及分别执行上述方法的图像发送装置、图像接收装置和图像传输装置,其适用于任何需要对包括图片、视频在内的图像进行传输的系统。为描述方便,以下实施例以无人机系统为例对本公开进行说明,但本领域技术人员应当知道,本公开提供的上述方法和装置同样适用于其他系统。对于无人机系统,本公开的图像发送装置位于无人机上,图像接收装置位于无人机的控制设备上,该控制设备例如是遥控器。图像发送装置和图像接收装置组成图像传输装置。无人机拍摄的图像经图像发送装置发送,控制设备的图像接收装置接收图像并显示,以实现无人机的实时图像传输。
下面将结合实施例和实施例中的附图,对本公开技术方案进行清楚、完整的描述。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
本公开一实施例提供了一种图像发送方法,参见图1所示,其包括以下步骤:
S101:以第一分辨率对图像进行第一编码以生成第一码流,通过一通信信道发送第一码流。
无人机一般携带有摄像机等拍摄设备。当无人机执行飞行任务时,摄像机会对视线内的景象进行拍摄。无人机对摄像机拍摄的图像进行编码,并将编码后的图像发送给遥控器。图像的分辨率、帧率是图像编码的重要参数,其直接决定了图像传输的码率,同时也是影响图像主观质量的主要因素。
在本步骤中,如图2所示,无人机采用第一分辨率和帧率对图像进行第一编码,第一编码后的图像生成第一码流。该帧率采用能保证图像主观质量的常用帧率即可。该第一分辨率例如可以是720P、1080P等。可通过多种方式确定该第一分辨率,本实施例并不加以限制。例如,第一分辨率 可以由用户通过遥控器设置。遥控器将用户设置的分辨率发送至无人机,无人机用该分辨率作为第一分辨率对图像进行第一编码。该第一分辨率也可以采用无人机设置的默认分辨率。
本实施例中,对第一编码采用的协议也不加以限制,其可以是各种标准或私有的编码协议。标准编码协议例如但不限于H.263、H.264、H.265、MPEG-4等。无论采用标准编码协议还是私有编码协议,第一编码生成的第一码流均包括关键帧(I帧)以及预测帧(P帧、B帧),每个关键帧及其对应的多个预测帧组成一个图像组(Group Of Picture,GOP)。
在本步骤中,无人机利用无线网络的通信信道发送第一码流。本实施例对无线网络的种类不加以限制,无线网络可以采用标准无线网络或私有无线网络。标准无线网络例如是WI-FI,私有无线网络例如是OcuSync、Light Bridge等。无线网络可使用2.4GHz或5.8GHz的频段传输第一码流。
以上是针对无人机的情况,当本实施例的图像发送方法应用于其他系统时,也可以采用有线网络的通信信道发送第一码流。
S102:响应于通信信道的信道容量变化,判断第一码流与信道容量是否匹配;如果否,执行并行编码步骤:继续对图像进行第一编码的同时,以第二分辨率对图像进行第二编码以生成第二码流,通过通信信道同时发送第一码流和第二码流。
无人机在飞行过程中,由于所处的环境常常变化剧烈、距离遥控器的距离不断变化等因素,传输第一码流的通信信道会发生变化,通信信道的信道容量随之发生变化,这种变化常常非常剧烈,从而会影响图像的传输质量。如果不对这种变化做出反应和调整,将会影响图像的传输效果和用户体验。
基于此,本步骤不断检测信道容量是否发生了变化,当信道容量变化时,判断第一码流与信道容量是否匹配。本实施例对信道容量检测的具体方式不做限定,可以采用各种成熟的手段进行检测。
本实施例中,所述是否匹配是指第一码流的码率与信道容量是否匹配,其包括两层含义:当信道容量变小时,第一码流的码率相对于信道容量过大而不匹配;当信道容量变大时,第一码流的码率相对于信道容量过小而不匹配。上述第一种情况会导致第一码流产生传输延时,造成图像传输不 流畅。上述第二种情况表示通信信道状况好,可采用更高的码率进行第一编码。但是,当采用更高码率时,在同一分辨率下,图像的编码质量趋于平稳,提升不多。因此可以通过增大第一分辨率,以描述图像更多的细节信息,使得图像更为清晰,以获得更好的观看效果。
对于通信信道来说,其会专门留出部分信道容量用来传输第一码流,通信信道分配给第一码流的信道容量称为负荷容量。本实施例判断第一码流与通信信道的信道容量是否匹配包括:
当负荷容量大于第一阈值或小于第二阈值时,认为第一码流与信道容量不匹配;否则,当负荷容量不小于第二阈值且不大于第一阈值时,认为第一码流与信道容量匹配;其中第一阈值大于第二阈值,第一阈值和第二阈值应根据第一码流的码率来确定。
图3为负荷容量的变化曲线。上述判断条件意味着,只要负荷容量位于第一阈值与第二阈值之外,则认为第一码流与信道容量不匹配,不匹配对应图3中的粗体线。
由此,如图2所示,当第一码流与信道容量不匹配时,执行并行编码步骤:继续对图像进行第一编码的同时,以第二分辨率对图像进行第二编码以生成第二码流,通过通信信道同时发送第一码流和第二码流。
当第一码流与信道容量不匹配时,分为两种情况:当负荷容量大于第一阈值时,第二分辨率大于第一分辨率,可充分利用信道容量,呈现给用户更高分辨率的图像,以提升图传体验。当负荷容量小于第二阈值时,第二分辨率小于第一分辨率,可避免第一码流传输延时、图像传输不流畅,改善用户体验。
第一码流只占用通信信道的一部分信道容量,当通信信道同时发送第一码流和第二码流时,第二码流是利用通信信道的这部分信道容量之外的剩余信道容量发送。基于此,在本步骤中,采用自适应帧率对图像进行第二编码。该自适应帧率的具体数值根据剩余信道容量来确定。也就是说,以第二分辨率、以及该自适应帧率对图像进行第二编码时,要确保第二码流的帧率不超过剩余信道容量。这样,如图2所示,并行编码步骤相当于形成了一个分辨率切换过渡带,在不影响第一码流传输和显示的情况下,同时发送第二码流。第二码流与第一码流类似,也包括一个关键帧以及至 少一个预测帧。
在本实施例中,还可以通过以下方式判断第一码流与通信信道的信道容量是否匹配:判断负荷容量是否经历一变化区间,如果是,认为第一码流与信道容量不匹配;否则,认为第一码流与信道容量匹配。
变化区间包括:上升区间和下降区间。如图4所示,上升区间是指负荷容量由小于第一阈值上升至大于第一阈值的区间;这种情况下,第二分辨率大于第一分辨率。下降区间是指负荷容量由大于所述第二阈值下降至小于所述第二阈值的区间,这种情况下,第二分辨率小于第一分辨率。即只有负荷容量经历了上述变化区间时,才认为第一码流与信道容量不匹配,才执行并行编码步骤。对于其他情况,如图4所示的AB、CD区间,虽然这两个区间中负荷容量大于第一阈值,但认为第一码流与信道容量仍是匹配的。同样,对于EF、GH区间,虽然这两个区间中负荷容量小于第二阈值,但也认为第一码流与信道容量仍是匹配的。相对于图3所示的方式,可以减小不必要的分辨率切换,降低分辨率的切换频率,可以提高图像的主观质量,提升用户的体验。
S103:判断第二码流是否达到第一码流的质量;如果是,执行编码切换步骤:停止对图像进行第一编码,继续以第二分辨率对图像进行第二编码以生成第二码流,第二码流与信道容量匹配,并通过通信信道发送第二码流。
本步骤中,当第二码流的质量与第一码流的质量一致时,执行编码切换步骤。所述质量可通过多种指标进行衡量,例如但不限于均方根误差(Root Mean Square Error,RMSE)、峰值信噪比(Peak Signal-to-Noise Ratio,PSNR)、结构相似性(Structural Similarity Index,SSIM)、梯度幅相似性偏差(Gradient Magnitude Similarity Deviation,GMSD),或者上述至少任意两项的组合。
在编码切换步骤中,参见图2所示,不再对图像进行第一编码,也就不再生成和发送第一码流,但继续以第二分辨率对图像进行第二编码,通信信道只发送第二码流。其中,第二编码的帧率发生变化,在并行编码步骤中第二编码采用自适应帧率,但在编码切换步骤中,第二编码的帧率等于第一编码的帧率。即在并行编码步骤中,第二编码由自适应帧率变为第 一编码的帧率。
常见的分辨率切换方式如图5所示,当由于信道容量变化的原因需要切换分辨率时,需要对图像进行以新的分辨率编码。由于分辨率切换前后的两帧分辨率不同,所以切换后的码流无法参考切换前的码流。以新的分辨率编码时,就必须生成一个关键帧。通信信道先传输切换后码流的关键帧,再传输预测帧。但由于关键帧极难压缩,因此当分辨率切换时,图像会出现模糊或卡顿的情况,造成分辨率切换时会有明显的闪烁,在分辨率切换频繁时,图像的主观质量尤其不佳。
参见图2所示,在本实施例中,由于在并行编码步骤中,第二码流已经生成了关键帧和预测帧,并已经通过通信信道发送。在编码切换步骤中,其生成的第二码流就只包括预测帧,没有关键帧。通信信道发送的也只是预测帧,没有关键帧。也就是说,本实施例通过并行编码步骤,提前发送具有第二分辨率的第二码流的关键帧,即在并行编码步骤中发送,而不是分辨率切换时,即编码切换步骤中发送。分辨率切换时通信信道发送的是预测帧而非关键帧,不会导致图像模糊或卡顿的情况出现,并且第二码流的质量已经与第一码流的质量一致,所以在分辨率切换时不会发生闪烁现象,实现了分辨率无闪烁切换,提高了图像的主观质量,提升了用户体验。
本步骤中,只要第一码流和第二码流的质量差异很小,即可认为第二码流达到了第一码流的质量。所以判断第二码流是否达到第一码流的质量还可以是以下情况:
当第二码流的指标与第一码流的指标的差值大于一阈值时,认为第二码流未达到第一码流的质量;当第二码流的指标与第一码流的指标的差值小于或等于阈值时,认为第二码流达到第一码流的质量。这样只要第一码流的质量与第二码流的质量足够接近,即可执行编码切换步骤。该阈值可以根据第一码流的指标而定。
本公开另一实施例提供了一种图像接收方法,参见图6所示,其包括以下步骤:
步骤S601:通过一通信信道接收第一码流,第一码流是以第一分辨率对图像进行第一编码而生成,对第一码流进行解码并以第一分辨率显示第一码流。
如图7所示,本步骤对应图像发送方法的第一步,接收通信信道发送的第一分辨率的第一码流,并对第一码流解码并显示。此时显示的是第一分辨率的第一码流。
步骤S602:执行并行接收步骤:同时接收第一码流和第二码流,第二码流是以第二分辨率对图像进行第二编码而生成,对第一码流和第二码流进行解码,并继续以第一分辨率显示第一码流。
本步骤对应图像发送方法的第二步,当通信信道同时发送第一码流和第二码流时,如图7所示,本步骤同时接收第一码流和第二码流,并对第一码流和第二码流进行解码,但不显示第二码流,而是仍然显示第一分辨率的第一码流。
步骤S603:执行显示切换步骤:接收第二码流,第二码流是以第二分辨率继续对图像进行第二编码而生成,第二码流与信道容量匹配,对第二码流进行解码并以第二分辨率显示第二码流。
本步骤对应图像发送方法的第三步,当通信信道只发送第二码流时,接收并解码第二码流,显示第二分辨率的第二码流。
由此可见,参见图2所示,在本实施例中,由于在并行接收步骤中,已经接收了第二码流的关键帧和预测帧,并显示第一码流。在显示切换步骤中,只接收第二码流的预测帧。本实施例通过并行接收步骤提前接收具有第二分辨率的第二码流的关键帧,分辨率切换时不会导致图像模糊或卡顿的情况出现,并且第二码流的质量已经与第一码流的质量一致,所以在分辨率切换时不会发生闪烁现象,实现了分辨率无闪烁切换,提高了图像的主观质量,提升了用户体验。
本公开又一实施例提供了一种图像传输方法,参见图8所示,其包括以下步骤:
步骤S801:以第一分辨率对图像进行第一编码以生成第一码流,并通过一通信信道传输第一码流,对第一码流进行解码并以第一分辨率显示第一码流。
在本步骤中,如图2所示,无人机采用第一分辨率和帧率对图像进行第一编码,第一编码后的图像生成第一码流。该帧率采用能保证图像主观质量的常用帧率即可。该第一分辨率例如可以是720P、1080P等。可通过 多种方式确定该第一分辨率,本实施例并不加以限制。例如,第一分辨率可以由用户通过遥控器设置。遥控器将用户设置的分辨率发送至无人机,无人机用该分辨率作为第一分辨率对图像进行第一编码。该第一分辨率也可以采用无人机设置的默认分辨率。
本实施例中,对第一编码采用的协议也不加以限制,其可以是各种标准或私有的编码协议。标准编码协议例如但不限于H.263、H.264、H.265、MPEG-4等。无论采用标准编码协议还是私有编码协议,第一编码生成的第一码流均包括关键帧(I帧)以及预测帧(P帧、B帧),每个关键帧及其对应的多个预测帧组成一个图像组(Group Of Picture,GOP)。
在本步骤中,无人机利用无线网络的通信信道传输第一码流,并对第一码流解码并显示。此时显示的是第一分辨率的第一码流。
本实施例对无线网络的种类不加以限制,无线网络可以采用标准无线网络或私有无线网络。标准无线网络例如是WI-FI,私有无线网络例如是OcuSync、Light Bridge等。无线网络可使用2.4GHz或5.8GHz的频段传输第一码流。
以上是针对无人机的情况,当本实施例的图像传输方法应用于其他系统时,也可以采用有线网络的通信信道发送第一码流。
步骤S802:响应于通信信道的信道容量变化,判断第一码流与信道容量是否匹配;如果否,执行并行传输步骤:继续对图像进行第一编码的同时,以第二分辨率对图像进行第二编码以生成第二码流,并通过通信信道同时传输第一码流和第二码流,对第一码流和第二码流进行解码,并继续以第一分辨率显示第一码流。
本步骤不断检测信道容量是否发生了变化,当信道容量变化时,判断第一码流与信道容量是否匹配。本实施例对信道容量检测的具体方式不做限定,可以采用各种成熟的手段进行检测。
本实施例中,所述是否匹配是指第一码流的码率与信道容量是否匹配,其包括两层含义:当信道容量变小时,第一码流的码率相对于信道容量过大而不匹配;当信道容量变大时,第一码流的码率相对于信道容量过小而不匹配。上述第一种情况会导致第一码流产生传输延时,造成图像传输不流畅。上述第二种情况表示通信信道状况好,可采用更高的码率进行第一 编码。但是,当采用更高码率时,在同一分辨率下,图像的编码质量趋于平稳,提升不多。因此可以通过增大第一分辨率,以描述图像更多的细节信息,使得图像更为清晰,以获得更好的观看效果。
对于通信信道来说,其会专门留出部分信道容量用来传输第一码流,通信信道分配给第一码流的信道容量称为负荷容量。本实施例判断第一码流与通信信道的信道容量是否匹配包括:
当负荷容量大于第一阈值或小于第二阈值时,认为第一码流与信道容量不匹配;否则,当负荷容量不小于第二阈值且不大于第一阈值时,认为第一码流与信道容量匹配;其中第一阈值大于第二阈值,第一阈值和第二阈值应根据第一码流的码率来确定。
图3为负荷容量的变化曲线。上述判断条件意味着,只要负荷容量位于第一阈值与第二阈值之外,则认为第一码流与信道容量不匹配,不匹配对应图3中的粗体线。
由此,如图2所示,当第一码流与信道容量不匹配时,执行并行编码步骤:继续对图像进行第一编码的同时,以第二分辨率对图像进行第二编码以生成第二码流,通过通信信道同时传输第一码流和第二码流,并对第一码流和第二码流进行解码,但不显示第二码流,而是仍然显示第一分辨率的第一码流。
当第一码流与信道容量不匹配时,分为两种情况:当负荷容量大于第一阈值时,第二分辨率大于第一分辨率,可充分利用信道容量,呈现给用户更高分辨率的图像,以提升图传体验。当负荷容量小于第二阈值时,第二分辨率小于第一分辨率,可避免第一码流传输延时、图像传输不流畅,改善用户体验。
第一码流只占红通信信道的一部分信道容量,当通信信道同时传输第一码流和第二码流时,第二码流是利用通信信道的这部分信道容量之外的剩余信道容量传输。基于此,在本步骤中,采用自适应帧率对图像进行第二编码。该自适应帧率的具体数值根据剩余信道容量来确定。也就是说,以第二分辨率、以及该自适应帧率对图像进行第二编码时,要确保第二码流的帧率不超过剩余信道容量。这样,如图2所示,并行传输步骤相当于形成了一个分辨率切换过渡带,在不影响第一码流传输和显示的情况下, 同时发送第二码流。第二码流与第一码流类似,也包括一个关键帧以及至少一个预测帧。
在本实施例中,还可以通过以下方式判断第一码流与通信信道的信道容量是否匹配:判断负荷容量是否经历一变化区间,如果是,认为第一码流与信道容量不匹配;否则,认为第一码流与信道容量匹配。
变化区间包括:上升区间和下降区间。如图4所示,上升区间是指负荷容量由小于第一阈值上升至大于第一阈值的区间;这种情况下,第二分辨率大于第一分辨率。下降区间是指负荷容量由大于所述第二阈值下降至小于所述第二阈值的区间,这种情况下,第二分辨率小于第一分辨率。即只有负荷容量经历了上述变化区间时,才认为第一码流与信道容量不匹配,才执行并行编码步骤。对于其他情况,如图4所示的AB、CD区间,虽然这两个区间中负荷容量大于第一阈值,但认为第一码流与信道容量仍是匹配的。同样,对于EF、GH区间,虽然这两个区间中负荷容量小于第二阈值,但也认为第一码流与信道容量仍是匹配的。相对于图3所示的方式,可以减小不必要的分辨率切换,降低分辨率的切换频率,可以提高图像的主观质量,提升用户的体验。
步骤S803:判断第二码流是否达到第一码流的质量;如果是,执行切换步骤:停止对图像进行第一编码,继续以第二分辨率对图像进行第二编码以生成第二码流,第二码流与信道容量匹配,并通过通信信道传输第二码流,对第二码流进行解码,并以第二分辨率显示所述第二码流。
本步骤中,当第二码流的质量与第一码流的质量一致时,执行切换步骤。所述质量可通过多种指标进行衡量,例如但不限于均方根误差(Root Mean Square Error,RMSE)、峰值信噪比(Peak Signal-to-Noise Ratio,PSNR)、结构相似性(Structural Similarity Index,SSIM)、梯度幅相似性偏差(Gradient Magnitude Similarity Deviation,GMSD),或者上述至少任意两项的组合。
在切换步骤中,参见图2所示,不再对图像进行第一编码,也就不再生成和发送第一码流,但继续以第二分辨率对图像进行第二编码,通信信道只发送第二码流,并解码第二码流,显示第二分辨率的第二码流。其中,第二编码的帧率发生变化,在并行传输步骤中第二编码采用自适应帧率, 但在切换步骤中,第二编码的帧率等于第一编码的帧率。即在并行传输步骤中,第二编码由自适应帧率变为第一编码的帧率。
常见的分辨率切换方式如图5所示,当由于信道容量变化的原因需要切换分辨率时,需要对图像进行以新的分辨率编码。由于分辨率切换前后的两帧分辨率不同,所以切换后的码流无法参考切换前的码流。以新的分辨率编码时,就必须生成一个关键帧。通信信道先传输切换后码流的关键帧,再传输预测帧。但由于关键帧极难压缩,因此当分辨率切换时,图像会出现模糊或卡顿的情况,造成分辨率切换时会有明显的闪烁,在分辨率切换频繁时,图像的主观质量尤其不佳。
参见图2所示,在本实施例中,由于在并行传输步骤中,第二码流已经生成了关键帧和预测帧,并已经通过通信信道发送。在切换步骤中,其生成的第二码流就只包括预测帧,没有关键帧。通信信道传输的也只是预测帧,没有关键帧。也就是说,本实施例通过并行传输步骤,提前发送具有第二分辨率的第二码流的关键帧,即在并行传输步骤中传输,而不是分辨率切换时,即切换步骤中传输。分辨率切换时通信信道传输的是预测帧而非关键帧,不会导致图像模糊或卡顿的情况出现,并且第二码流的质量已经与第一码流的质量一致,所以在分辨率切换时不会发生闪烁现象,实现了分辨率无闪烁切换,提高了图像的主观质量,提升了用户体验。
本步骤中,只要第一码流和第二码流的质量差异很小,即可认为第二码流达到了第一码流的质量。所以判断第二码流是否达到第一码流的质量还可以是以下情况:
当第二码流的指标与第一码流的指标的差值大于一阈值时,认为第二码流未达到第一码流的质量;当第二码流的指标与第一码流的指标的差值小于或等于阈值时,认为第二码流达到第一码流的质量。这样只要第一码流的质量与第二码流的质量足够接近,即可执行编码切换步骤。该阈值可以根据第一码流的指标而定。
本公开另一实施例的图像发送方法,为简要描述,与上述实施例相同或相似的内容不再赘述,以下仅描述其不同于上一实施例的内容。
本实施例的图像发送方法,在步骤S102的并行编码步骤中,通信信道发送第一码流和第二码流的同时,判断第一码流是否出现错误,如果是, 则执行编码切换步骤。
无人机在飞行过程中,由于通信信道常常发生剧烈变化,会导致码流出错的情况发生,包括:丢帧、错帧、数据错误等多种情况。如果不对出错的情况进行处理,会影响图像的质量以及用户的体验。本实施例的图像发送方法,如果检测到第一码流出现了错误,则不再判断第二码流是否达到第一码流的质量,而是直接执行步骤S103的编码切换步骤,即直接进行分辨率切换,停止对图像进行第一编码,继续进行第二编码,通信信道只发送第二码流。
这样,针对出错的情况而直接进行分辨率切换,可快速对第一码流出错进行处理,避免出错的第一码流对图像质量造成影响,实现图像的快速纠错,提高图像的质量,提升用户的体验。
本公开另一实施例的图像传输方法,为简要描述,与上述实施例相同或相似的内容不再赘述,以下仅描述其不同于上一实施例的内容。
本实施例的图像传输方法,在步骤S802的并行传输步骤中,通信信道传输第一码流和第二码流的同时,判断第一码流是否出现错误,如果是,则执行切换步骤。
无人机在飞行过程中,由于通信信道常常发生剧烈变化,会导致码流出错的情况发生,包括:丢帧、错帧、数据错误等多种情况。如果不对出错的情况进行处理,会影响图像的质量以及用户的体验。本实施例的图像传输方法,如果检测到第一码流出现了错误,则不再判断第二码流是否达到第一码流的质量,而是直接执行步骤S803的切换步骤,即直接进行分辨率切换,停止对图像进行第一编码,继续进行第二编码,通信信道只传输第二码流。
这样,针对出错的情况而直接进行分辨率切换,可快速对第一码流出错进行处理,避免出错的第一码流对图像质量造成影响,实现图像的快速纠错,提高图像的质量,提升用户的体验。
本公开另一实施例的图像发送方法,为简要描述,与上述实施例相同或相似的内容不再赘述,以下仅描述其不同于上一实施例的内容。
本实施例的图像发送方法,在步骤S103的编码切换步骤中,基于反馈机制对第二码流进行错误恢复。反馈机制利用图像接收装置的反馈信息 来对码流进行错误恢复,具体来说,如图9所示,如果图像接收装置发现第二码流的P4帧出现错误,可以将该信息反馈给图像发送装置,使得图像发送装置对P5帧编码时,使用P4帧之前、已经被图像接收装置接收的正确帧(P1至P3帧的任一帧)作为参考帧。通过上述反馈机制即可保证P5帧一旦被图像接收装置接收就可以将错误恢复,且P5后的帧将P5帧作为参考帧生成。
本实施例中,对图像进行第二编码生成的第二码流,第二码流的帧编有帧序号,帧序号为全局序号,每个帧的帧序号是唯一的。通信信道发送第二码流时,将帧序号连同帧一并发送。
反馈机制包括:
获取第二码流的当前帧,该当前帧为需要进行编码的帧。
接收图像接收装置发送的反馈信息,反馈信息包括:图像接收装置接收到的第二码流的正确帧的帧序号。该正确帧可以是发送反馈信息之前,图像接收装置接收到的第二码流的最后一个正确帧。
然后根据反馈信息确定当前帧的参考帧。本实施例中,图像发送装置创建一参照帧队列,参照帧队列用于保存图像接收装置接收到的第二码流的正确帧及其帧序号。当接收到图像接收装置发送的反馈信息后,将帧序号及其对应的正确帧保存至该参照帧队列中,并将接收到的该正确帧作为参考帧队列的第一帧。将参考帧队列的第一帧作为参考帧,当前帧参照该参考帧编码。
通过上述手段,图像发送装置总是参考图像接收装置接收到的第二码流的正确帧对当前帧进行编码,即使第二码流中出现了错误帧,也可以将错误恢复。由此可见,本实施例的反馈机制,无需发送关键帧即可确保恢复错误,大大减小了对通信信道容量的压力,改善图像传输质量,提升用户体验。
当然本实施例并不限于此,当将帧序号及其对应的正确帧保存至该参照帧队列中,并将接收到的该正确帧作为参考帧队列的第一帧后,可以不直接将参考帧队列的第一帧作为参考帧,而是将在当前帧之前发送的最后一帧作为参考帧。判断正确帧的帧序号与最后一帧的帧序号是否相等,如果不相等,将参考帧队列的第一帧作为参考帧。如图9所示,依次发送P3 帧、P4帧,其中P3帧正确,P4帧错误。当对P5帧编码时,图像接收装置可能尚未返回反馈信息,因此图像发送装置并不知道P4帧是否被正确接收。此时可以继续参考P4帧对P5帧编码,因为P5参考最近的帧(P4帧)编码,所以编码效率更高。当图像接收装置返回的正确帧为P3帧时,发现正确帧并非P4帧,这时再将参考帧队列的第一帧(P3帧)作为参考帧对P5重新编码。采用上述方式可以提高编码效率,有利于降低码率,降低通信信道的压力。
本公开另一实施例的图像接收方法,为简要描述,与上述实施例相同或相似的内容不再赘述,以下仅描述其不同于上一实施例的内容。
本实施例的图像接收方法,在步骤S603的显示切换步骤中,基于反馈机制对第二码流进行错误恢复。
在本实施例中,图像接收装置建立有参考帧队列,其在接收第二码流的同时,仅将第二码流的正确帧及其帧序号保存到参考帧队列。反馈机制包括:按照预定时间间隔向图像发送装置发送反馈信息,反馈信息包括:在发送反馈信息之前,参照帧队列中保存的、接收到的第二码流的最后一个正确帧的帧序号。
反馈机制也可以不按预定时间间隔发送反馈信息,而是当第二码流出现错误帧后,才向图像发送装置发送反馈信息。
通过上述手段,图像发送装置总是参考图像接收装置接收到的第二码流的正确帧对当前帧进行编码,即使第二码流中出现了错误帧,也可以将错误恢复。由此可见,本实施例的反馈机制,无需发送关键帧即可确保恢复错误,大大减小了对通信信道容量的压力,改善图像传输质量,提升用户体验。
本公开另一实施例的图像传输方法,为简要描述,与上述实施例相同或相似的内容不再赘述,以下仅描述其不同于上一实施例的内容。
本实施例的图像传输方法,在步骤S803的切换步骤中,基于反馈机制对第二码流进行错误恢复。
反馈机制包括:
图像发送装置获取第二码流的当前帧;
图像接收装置向图像发送装置发送反馈信息;
图像发送装置接收反馈信息,根据反馈信息确定当前帧的参考帧,并根据参考帧对当前帧进行第二编码。
其中,图像接收装置可按照预定时间间隔、或者响应于接收到第二码流的错误帧而向图像发送装置发送反馈信息。反馈信息包括:所述图像接收装置在发送反馈信息之前、或者在接收到错误帧之前,接收到的第二码流的最后一个正确帧的帧序号。
根据反馈信息确定当前帧的参考帧包括:
将帧序号及其对应的正确帧保存至一参照帧队列,并将正确帧作为参考帧队列的第一帧;将参考帧队列的第一帧作为参考帧;
或者,
将帧序号及其对应的正确帧保存至一参照帧队列,并将正确帧作为参考帧队列的第一帧;
将在当前帧之前发送的最后一帧作为参考帧;
判断正确帧的帧序号与最后一帧的帧序号是否相等,如果否,将参考帧队列的第一帧作为参考帧。
通过上述手段,图像发送装置总是参考图像接收装置接收到的第二码流的正确帧对当前帧进行编码,即使第二码流中出现了错误帧,也可以将错误恢复。由此可见,本实施例的反馈机制,无需发送关键帧即可确保恢复错误,大大减小了对通信信道容量的压力,改善图像传输质量,提升用户体验。
本公开再一实施例提供了一种图像发送装置,参见图10所示,其包括:存储器、处理器和发送器。
存储器,用于存储可执行指令。
处理器,用于读取所述可执行指令以执行以下操作:以第一分辨率对图像进行第一编码以生成第一码流。
发送器通过一通信信道发送所述第一码流。
处理器响应于通信信道的信道容量变化,判断第一码流与信道容量是否匹配;如果否,执行并行编码操作:继续对图像进行第一编码的同时,以第二分辨率对图像进行第二编码以生成第二码流,发送器通过通信信道同时发送第一码流和第二码流。
处理器判断第二码流是否达到第一码流的质量;如果是,执行编码切换操作:停止对图像进行第一编码,继续以第二分辨率对图像进行第二编码以生成第二码流,第二码流与信道容量匹配,发送器通过通信信道所述第二码流。
图像发送装置采用第一分辨率和帧率对图像进行第一编码,第一编码后的图像生成第一码流。该帧率采用能保证图像主观质量的常用帧率即可。
本实施例中,对第一编码采用的协议也不加以限制,其可以是各种标准或私有的编码协议。
在本步骤中,发送器利用无线网络的通信信道发送第一码流。本实施例对无线网络的种类不加以限制,无线网络可以采用标准无线网络或私有无线网络。
以上是针对无人机的情况,当本实施例的图像发送装置应用于其他系统时,也可以采用有线网络的通信信道发送第一码流。
处理器不断检测信道容量是否发生了变化,当信道容量变化时,判断第一码流与信道容量是否匹配。本实施例对信道容量检测的具体方式不做限定,可以采用各种成熟的手段进行检测。
本实施例中,所述是否匹配是指第一码流的码率与信道容量是否匹配,其包括两层含义:当信道容量变小时,第一码流的码率相对于信道容量过大而不匹配;当信道容量变大时,第一码流的码率相对于信道容量过小而不匹配。上述第一种情况会导致第一码流产生传输延时,造成图像传输不流畅。上述第二种情况表示通信信道状况好,可采用更高的码率进行第一编码。但是,当采用更高码率时,在同一分辨率下,图像的编码质量趋于平稳,提升不多。因此可以通过增大第一分辨率,以描述图像更多的细节信息,使得图像更为清晰,以获得更好的观看效果。
对于通信信道来说,其会专门留出部分信道容量用来传输第一码流,通信信道分配给第一码流的信道容量称为负荷容量。本实施例判断第一码流与通信信道的信道容量是否匹配包括:
当负荷容量大于第一阈值或小于第二阈值时,认为第一码流与信道容量不匹配;否则,当负荷容量不小于第二阈值且不大于第一阈值时,认为第一码流与信道容量匹配;其中第一阈值大于第二阈值,第一阈值和第二 阈值应根据第一码流的码率来确定。
当第一码流与信道容量不匹配时,执行并行编码操作:继续对图像进行第一编码的同时,以第二分辨率对图像进行第二编码以生成第二码流,通过通信信道同时发送第一码流和第二码流。
当第一码流与信道容量不匹配时,分为两种情况:当负荷容量大于第一阈值时,第二分辨率大于第一分辨率,可充分利用信道容量,呈现给用户更高分辨率的图像,以提升图传体验。当负荷容量小于第二阈值时,第二分辨率小于第一分辨率,可避免第一码流传输延时、图像传输不流畅,改善用户体验。
第一码流只占红通信信道的一部分信道容量,当通信信道同时发送第一码流和第二码流时,第二码流是利用通信信道的这部分信道容量之外的剩余信道容量发送。基于此,处理器采用自适应帧率对图像进行第二编码。该自适应帧率的具体数值根据剩余信道容量来确定。也就是说,以第二分辨率、以及该自适应帧率对图像进行第二编码时,要确保第二码流的帧率不超过剩余信道容量。这样,并行编码操作相当于形成了一个分辨率切换过渡带,在不影响第一码流传输和显示的情况下,同时发送第二码流。第二码流与第一码流类似,也包括一个关键帧以及至少一个预测帧。
在本实施例中,还可以通过以下方式判断第一码流与通信信道的信道容量是否匹配:判断负荷容量是否经历一变化区间,如果是,认为第一码流与信道容量不匹配;否则,认为第一码流与信道容量匹配。
变化区间包括:上升区间和下降区间。上升区间是指负荷容量由小于第一阈值上升至大于第一阈值的区间;这种情况下,第二分辨率大于第一分辨率。下降区间是指负荷容量由大于所述第二阈值下降至小于所述第二阈值的区间,这种情况下,第二分辨率小于第一分辨率。即只有负荷容量经历了上述变化区间时,才认为第一码流与信道容量不匹配,才执行并行编码步骤,可以减小不必要的分辨率切换,降低分辨率的切换频率,可以提高图像的主观质量,提升用户的体验。
当第二码流的质量与第一码流的质量一致时,执行编码切换操作。所述质量可通过多种指标进行衡量,
在编码切换操作中,不再对图像进行第一编码,也就不再生成和发送 第一码流,但继续以第二分辨率对图像进行第二编码,通信信道只发送第二码流。其中,第二编码的帧率发生变化,在并行编码步骤中第二编码采用自适应帧率,但在编码切换步骤中,第二编码的帧率等于第一编码的帧率。
本实施例中,由于在并行编码操作中,第二码流已经生成了关键帧和预测帧,并已经通过通信信道发送。在编码切换操作中,其生成的第二码流就只包括预测帧,没有关键帧。通信信道发送的也只是预测帧,没有关键帧。也就是说,本实施例通过并行编码操作,提前发送具有第二分辨率的第二码流的关键帧,即在并行编码操作中发送,而不是分辨率切换时,即编码切换操作中发送。分辨率切换时通信信道发送的是预测帧而非关键帧,不会导致图像模糊或卡顿的情况出现,并且第二码流的质量已经与第一码流的质量一致,所以在分辨率切换时不会发生闪烁现象,实现了分辨率无闪烁切换,提高了图像的主观质量,提升了用户体验。
只要第一码流和第二码流的质量差异很小,即可认为第二码流达到了第一码流的质量。所以判断第二码流是否达到第一码流的质量还可以是以下情况:
当第二码流的指标与第一码流的指标的差值大于一阈值时,认为第二码流未达到第一码流的质量;当第二码流的指标与第一码流的指标的差值小于或等于阈值时,认为第二码流达到第一码流的质量。这样只要第一码流的质量与第二码流的质量足够接近,即可执行编码切换步骤。该阈值可以根据第一码流的指标而定。
本公开再一实施例提供了一种图像接收装置,参见图11所示,其包括:存储器、处理器、接收器和显示器。
存储器,用于存储可执行指令;
接收器通过一通信信道接收第一码流,第一码流是以第一分辨率对图像进行第一编码而生成。
处理器,用于读取可执行指令以执行以下操作:对第一码流进行解码,并将第一码流提供给显示器以第一分辨率显示。
显示器以第一分辨率显示第一码流。
执行并行接收操作:接收器同时接收第一码流和第二码流,第二码流 是以第二分辨率对图像进行第二编码而生成,处理器对第一码流和第二码流进行解码,并继续将第一码流提供给显示器以第一分辨率显示;显示器以第一分辨率显示第一码流。
执行显示切换操作:接收器接收第二码流,第二码流是以第二分辨率继续对图像进行第二编码而生成,第二码流与信道容量匹配,处理器对第二码流进行解码,并将第二码流提供给显示器以第二分辨率显示。显示器以第二分辨率显示第二码流。
图像接收装置接收通信信道发送的第一分辨率的第一码流,并对第一码流解码并显示。此时显示的是第一分辨率的第一码流。
当通信信道同时发送第一码流和第二码流时,图像接收装置同时接收第一码流和第二码流,并对第一码流和第二码流进行解码,但不显示第二码流,而是仍然显示第一分辨率的第一码流。
当通信信道只发送第二码流时,图像接收装置接收并解码第二码流,显示第二分辨率的第二码流。
由此可见,由于在并行接收操作中,已经接收了第二码流的关键帧和预测帧,并显示第一码流。在显示切换操作中,只接收第二码流的预测帧。本实施例通过并行接收操作提前接收具有第二分辨率的第二码流的关键帧,分辨率切换时不会导致图像模糊或卡顿的情况出现,并且第二码流的质量已经与第一码流的质量一致,所以在分辨率切换时不会发生闪烁现象,实现了分辨率无闪烁切换,提高了图像的主观质量,提升了用户体验。
本公开又一实施例提供了一种图像传输装置,参见图12所示,其包括:图像发送装置与图像接收装置;
图像发送装置用于以第一分辨率对图像进行第一编码以生成第一码流,并通过一通信信道将第一码流传输至图像接收装置,图像接收装置对第一码流进行解码,并以第一分辨率显示第一码流。
响应于通信信道的信道容量变化,图像发送装置判断第一码流与信道容量是否匹配;如果否,执行并行传输操作:图像发送装置用于继续对图像进行第一编码的同时,以第二分辨率对图像进行第二编码以生成第二码流,并通过通信信道同时将第一码流和第二码流传输至图像接收装置,图像接收装置对第一码流和第二码流进行解码,并继续以第一分辨率显示第 一码流。
图像发送装置判断第二码流是否达到第一码流的质量;如果是,执行切换操作:图像发送装置停止对图像进行第一编码,继续以第二分辨率对图像进行第二编码以生成第二码流,第二码流与信道容量匹配,并通过通信信道将第二码流传输至图像接收装置,图像接收装置对第二码流进行解码,并以第二分辨率显示第二码流。
图像发送装置采用第一分辨率和帧率对图像进行第一编码,第一编码后的图像生成第一码流。该帧率采用能保证图像主观质量的常用帧率即可。对第一编码采用的协议也不加以限制,其可以是各种标准或私有的编码协议。图像发送装置利用无线网络的通信信道传输第一码流,并对第一码流解码并显示。此时显示的是第一分辨率的第一码流。本实施例对无线网络的种类不加以限制,无线网络可以采用标准无线网络或私有无线网络。
以上是针对无人机的情况,当本实施例的图像传输装置应用于其他系统时,也可以采用有线网络的通信信道发送第一码流。
图像发送装置不断检测信道容量是否发生了变化,当信道容量变化时,判断第一码流与信道容量是否匹配。本实施例对信道容量检测的具体方式不做限定,可以采用各种成熟的手段进行检测。
本实施例中,所述是否匹配是指第一码流的码率与信道容量是否匹配,其包括两层含义:当信道容量变小时,第一码流的码率相对于信道容量过大而不匹配;当信道容量变大时,第一码流的码率相对于信道容量过小而不匹配。上述第一种情况会导致第一码流产生传输延时,造成图像传输不流畅。上述第二种情况表示通信信道状况好,可采用更高的码率进行第一编码。但是,当采用更高码率时,在同一分辨率下,图像的编码质量趋于平稳,提升不多。因此可以通过增大第一分辨率,以描述图像更多的细节信息,使得图像更为清晰,以获得更好的观看效果。
对于通信信道来说,其会专门留出部分信道容量用来传输第一码流,通信信道分配给第一码流的信道容量称为负荷容量。本实施例判断第一码流与通信信道的信道容量是否匹配包括:
当负荷容量大于第一阈值或小于第二阈值时,认为第一码流与信道容量不匹配;否则,当负荷容量不小于第二阈值且不大于第一阈值时,认为 第一码流与信道容量匹配;其中第一阈值大于第二阈值,第一阈值和第二阈值应根据第一码流的码率来确定。
当第一码流与信道容量不匹配时,执行并行编码操作:继续对图像进行第一编码的同时,以第二分辨率对图像进行第二编码以生成第二码流,通过通信信道同时传输第一码流和第二码流,并对第一码流和第二码流进行解码,但不显示第二码流,而是仍然显示第一分辨率的第一码流。
当第一码流与信道容量不匹配时,分为两种情况:当负荷容量大于第一阈值时,第二分辨率大于第一分辨率,可充分利用信道容量,呈现给用户更高分辨率的图像,以提升图传体验。当负荷容量小于第二阈值时,第二分辨率小于第一分辨率,可避免第一码流传输延时、图像传输不流畅,改善用户体验。
第一码流只占红通信信道的一部分信道容量,当通信信道同时传输第一码流和第二码流时,第二码流是利用通信信道的这部分信道容量之外的剩余信道容量传输。基于此,采用自适应帧率对图像进行第二编码。该自适应帧率的具体数值根据剩余信道容量来确定。也就是说,以第二分辨率、以及该自适应帧率对图像进行第二编码时,要确保第二码流的帧率不超过剩余信道容量。并行传输操作相当于形成了一个分辨率切换过渡带,在不影响第一码流传输和显示的情况下,同时发送第二码流。第二码流与第一码流类似,也包括一个关键帧以及至少一个预测帧。
在本实施例中,还可以通过以下方式判断第一码流与通信信道的信道容量是否匹配:判断负荷容量是否经历一变化区间,如果是,认为第一码流与信道容量不匹配;否则,认为第一码流与信道容量匹配。
变化区间包括:上升区间和下降区间。上升区间是指负荷容量由小于第一阈值上升至大于第一阈值的区间;这种情况下,第二分辨率大于第一分辨率。下降区间是指负荷容量由大于所述第二阈值下降至小于所述第二阈值的区间,这种情况下,第二分辨率小于第一分辨率。即只有负荷容量经历了上述变化区间时,才认为第一码流与信道容量不匹配,才执行并行编码步骤。
当第二码流的质量与第一码流的质量一致时,执行切换操作。在切换步骤中,不再对图像进行第一编码,也就不再生成和发送第一码流,但继 续以第二分辨率对图像进行第二编码,通信信道只发送第二码流,并解码第二码流,显示第二分辨率的第二码流。其中,第二编码的帧率发生变化,在并行传输操作中第二编码采用自适应帧率,但在切换操作中,第二编码的帧率等于第一编码的帧率。即在并行传输操作中,第二编码由自适应帧率变为第一编码的帧率。
在本实施例中,由于在并行传输操作中,第二码流已经生成了关键帧和预测帧,并已经通过通信信道发送。在切换操作中,其生成的第二码流就只包括预测帧,没有关键帧。通信信道传输的也只是预测帧,没有关键帧。也就是说,本实施例通过并行传输操作,提前发送具有第二分辨率的第二码流的关键帧,即在并行传输操作中传输,而不是分辨率切换时,即切换操作中传输。分辨率切换时通信信道传输的是预测帧而非关键帧,不会导致图像模糊或卡顿的情况出现,并且第二码流的质量已经与第一码流的质量一致,所以在分辨率切换时不会发生闪烁现象,实现了分辨率无闪烁切换,提高了图像的主观质量,提升了用户体验。
只要第一码流和第二码流的质量差异很小,即可认为第二码流达到了第一码流的质量。所以判断第二码流是否达到第一码流的质量还可以是以下情况:
当第二码流的指标与第一码流的指标的差值大于一阈值时,认为第二码流未达到第一码流的质量;当第二码流的指标与第一码流的指标的差值小于或等于阈值时,认为第二码流达到第一码流的质量。这样只要第一码流的质量与第二码流的质量足够接近,即可执行编码切换步骤。该阈值可以根据第一码流的指标而定。
本公开再一实施例提供了一种无人机,包括:上述任一实施例的图像发送装置。
本公开再一实施例提供了一种控制设备,包括:上述任一实施例所述的图像接收装置。所说控制设备例如是无人机的遥控器。
本公开再一实施例提供了一种无人机系统,包括:上述任一实施例所述的图像传输装置。
本公开再一实施例提供了一种无人机系统,包括所述无人机和所述控制设备。
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
最后应说明的是:以上各实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述各实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;在不冲突的情况下,本公开实施例中的特征可以任意组合;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的范围。

Claims (112)

  1. 一种图像发送方法,其中,包括:
    以第一分辨率对图像进行第一编码以生成第一码流,通过一通信信道发送所述第一码流;
    响应于所述通信信道的信道容量变化,判断所述第一码流与所述信道容量是否匹配;如果否,执行并行编码步骤:继续对所述图像进行第一编码的同时,以第二分辨率对所述图像进行第二编码以生成第二码流,通过所述通信信道同时发送所述第一码流和所述第二码流;
    判断所述第二码流是否达到所述第一码流的质量;如果是,执行编码切换步骤:停止对所述图像进行所述第一编码,继续以所述第二分辨率对所述图像进行所述第二编码以生成所述第二码流,所述第二码流与所述信道容量匹配,并通过所述通信信道发送所述第二码流。
  2. 如权利要求1所述的图像发送方法,其中,所述并行编码步骤的所述第二码流包括一个I帧、以及至少一个P帧;
    所述编码切换步骤的所述第二码流包括多个P帧;所述多个P帧中的首个P帧以所述至少一个P帧的最后一个P帧为参考帧而生成。
  3. 如权利要求2所述的图像发送方法,其中,在所述编码切换步骤中,所述第二编码的帧率等于所述第一编码的帧率。
  4. 如权利要求2所述的图像发送方法,其中,在所述并行编码步骤中,所述第二编码的帧率为自适应帧率。
  5. 如权利要求1至4任一项所述的图像发送方法,其中,在所述并行编码步骤中,所述第一码流占用所述通信信道的部分信道容量,所述第二码流利用所述部分信道容量之外的剩余信道容量发送。
  6. 如权利要求1至4任一项所述的图像发送方法,其中,所述信道容量至少包括:负荷容量,所述负荷容量为所述通信信道分配给所述第一码流的信道容量。
  7. 如权利要求6所述的图像发送方法,其中,所述判断所述第一码流与所述通信信道的信道容量是否匹配包括:
    当所述负荷容量大于第一阈值或小于第二阈值时,所述第一码流与所述信道容量不匹配;
    当所述负荷容量不小于所述第二阈值且不大于所述第一阈值时,所述第一码流与所述信道容量匹配;
    其中所述第一阈值大于所述第二阈值。
  8. 如权利要求7所述的图像发送方法,其中,
    当所述负荷容量大于所述第一阈值时,所述第二分辨率大于所述第一分辨率;
    当所述负荷容量小于所述第二阈值时,所述第二分辨率小于所述第一分辨率。
  9. 如权利要求6所述的图像发送方法,其中,所述判断所述第一码流与所述通信信道的信道容量是否匹配包括:
    判断所述负荷容量是否经历一变化区间,如果是,则所述第一码流与所述信道容量不匹配;否则,所述第一码流与所述信道容量匹配。
  10. 如权利要求9所述的图像发送方法,其中,所述变化区间包括:
    上升区间:由小于第一阈值上升至大于第一阈值;
    下降区间:由大于所述第二阈值下降至小于所述第二阈值;
    其中所述第一阈值大于所述第二阈值。
  11. 如权利要求10所述的图像发送方法,其中,
    当所述负荷容量经历所述上升区间,所述第二分辨率大于所述第一分辨率;
    当所述负荷容量经历所述下降区间,所述第二分辨率小于所述第一分辨率。
  12. 如权利要求7或10所述的图像发送方法,其中,所述第一阈值和所述第二阈值的至少其中之一根据所述第一码流的码率确定。
  13. 如权利要求5所述的图像发送方法,其中,在所述并行编码步骤中,所述第二编码的帧率根据所述剩余信道容量确定。
  14. 如权利要求1至4任一项所述的图像发送方法,其中,所述质量采用如下的至少一种指标进行评价:均方根误差、峰值信噪比、结构相似性、梯度幅相似性偏差。
  15. 如权利要求14项所述的图像发送方法,其中,所述判断所述第二码流是否达到所述第一码流的质量包括:
    当所述第二码流的所述指标与所述第一码流的所述指标的差值大于一阈值时,所述第二码流未达到所述第一码流的质量;
    当所述第二码流的所述指标与所述第一码流的所述指标的差值小于或等于所述阈值时,所述第二码流达到所述第一码流的质量。
  16. 如权利要求1至4任一项所述的图像发送方法,其中,在所述并行编码步骤中,判断所述第一码流是否出现错误,如果是,则执行编码切换步骤。
  17. 如权利要求16所述的图像发送方法,其中,所述错误包括如下的至少一种:丢帧、错帧、数据错误。
  18. 如权利要求1至4任一项所述的图像发送方法,其中,所述编码切换步骤还包括:基于反馈机制对所述第二码流进行错误恢复。
  19. 如权利要求18所述的图像发送方法,其中,所述反馈机制包括:
    获取所述第二码流的当前帧;
    接收图像接收装置发送的反馈信息,根据所述反馈信息确定所述当前帧的参考帧;
    根据所述参考帧对所述当前帧进行所述第二编码。
  20. 如权利要求19所述的图像发送方法,其中,所述反馈信息包括:所述图像接收装置接收到的所述第二码流的正确帧的帧序号;
    所述根据所述反馈信息确定所述当前帧的参考帧包括:
    将所述帧序号及其对应的正确帧保存至一参照帧队列,并将所述正确帧作为所述参考帧队列的第一帧;
    将所述参考帧队列的所述第一帧作为所述参考帧。
  21. 如权利要求19所述的图像发送方法,其中,所述反馈信息包括:所述图像接收装置接收到的所述第二码流的正确帧的帧序号;
    所述根据所述反馈信息确定所述当前帧的参考帧包括:
    将所述帧序号及其对应的正确帧保存至一参照帧队列,并将所述正确帧作为所述参考帧队列的第一帧;
    将在所述当前帧之前发送的最后一帧作为参考帧;
    判断所述正确帧的帧序号与所述最后一帧的帧序号是否相等,如果否,将所述参考帧队列的所述第一帧作为所述参考帧。
  22. 如权利要求20或21所述的图像发送方法,其中,所述正确帧为在发送所述反馈信息之前,所述图像接收装置接收到的所述第二码流的最后一个正确帧。
  23. 一种图像接收方法,其中,包括:
    通过一通信信道接收第一码流,所述第一码流是以第一分辨率对图像进行第一编码而生成,对所述第一码流进行解码并以所述第一分辨率显示所述第一码流;
    执行并行接收步骤:同时接收所述第一码流和第二码流,所述第二码流是以第二分辨率对所述图像进行第二编码而生成,对所述第一码流和所述第二码流进行解码,并继续以所述第一分辨率显示所述第一码流;
    执行显示切换步骤:接收所述第二码流,所述第二码流是以所述第二分辨率继续对所述图像进行所述第二编码而生成,所述第二码流与所述信道容量匹配,对所述第二码流进行解码并以所述第二分辨率显示所述第二码流。
  24. 如权利要求23所述的图像接收方法,其中,所述并行接收步骤的所述第二码流包括一个I帧、以及至少一个P帧;
    所述显示切换步骤的所述第二码流包括多个P帧,所述多个P帧中的首个P帧以所述至少一个P帧的最后一个P帧为参考帧而生成。
  25. 如权利要求24所述的图像接收方法,其中,在所述显示切换步骤中,所述第二编码的帧率等于所述第一编码的帧率。
  26. 如权利要求24所述的图像接收方法,其中,在所述并行接收步骤中,所述第二编码的帧率为自适应帧率。
  27. 如权利要求23至26任一项所述的图像接收方法,其中,所述显示切换步骤还包括:基于反馈机制对所述第二码流进行错误恢复。
  28. 如权利要求27所述的图像接收方法,其中,所述反馈机制包括:按照预定时间间隔向图像发送装置发送反馈信息。
  29. 如权利要求28所述的图像接收方法,其中,所述反馈信息至少包括:在发送所述反馈信息之前,接收到的所述第二码流的最后一个正确帧的帧序号。
  30. 如权利要求27所述的图像接收方法,其中,所述反馈机制包括: 响应于接收到所述第二码流的错误帧而向图像发送装置发送反馈信息。
  31. 如权利要求30所述的图像接收方法,其中,所述反馈信息至少包括:在接收到所述错误帧之前接收到的所述第二码流的最后一个正确帧的帧序号。
  32. 一种图像传输方法,其中,包括:
    以第一分辨率对图像进行第一编码以生成第一码流,并通过一通信信道传输所述第一码流,对所述第一码流进行解码并以所述第一分辨率显示所述第一码流;
    响应于所述通信信道的信道容量变化,判断所述第一码流与所述信道容量是否匹配;如果否,执行并行传输步骤:继续对所述图像进行第一编码的同时,以第二分辨率对所述图像进行第二编码以生成第二码流,并通过所述通信信道同时传输所述第一码流和所述第二码流,对所述第一码流和所述第二码流进行解码,并继续以所述第一分辨率显示所述第一码流;
    判断所述第二码流是否达到所述第一码流的质量;如果是,执行切换步骤:停止对所述图像进行所述第一编码,继续以所述第二分辨率对所述图像进行所述第二编码以生成所述第二码流,所述第二码流与所述信道容量匹配,并通过所述通信信道传输所述第二码流,对所述第二码流进行解码,并以所述第二分辨率显示所述第二码流。
  33. 如强烈要求32所述的图像传输方法,其中,所述并行传输步骤的所述第二码流包括一个I帧、以及至少一个P帧;
    所述切换步骤的所述第二码流包括多个P帧;所述多个P帧中的首个P帧以所述至少一个P帧的最后一个P帧为参考帧而生成。
  34. 如权利要求33所述的图像传输方法,其中,在所述切换步骤中,所述第二编码的帧率等于所述第一编码的帧率。
  35. 如权利要求33所述的图像传输方法,其中,在所述并行传输步骤中,所述第二编码的帧率为自适应帧率。
  36. 如权利要求32至35任一项所述的图像传输方法,其中,在所述并行传输步骤中,所述第一码流占用所述通信信道的部分信道容量,所述第二码流利用所述部分信道容量之外的剩余信道容量发送。
  37. 如权利要求32至35任一项所述的图像传输方法,其中,所述信 道容量至少包括:负荷容量,所述负荷容量为所述通信信道分配给所述第一码流的信道容量。
  38. 如权利要求37所述的图像传输方法,其中,判断所述第一码流与所述通信信道的信道容量是否匹配包括:
    当所述负荷容量大于第一阈值或小于第二阈值时,所述第一码流与所述信道容量不匹配;
    当所述负荷容量不小于所述第二阈值且不大于所述第一阈值时,所述第一码流与所述信道容量匹配;
    其中所述第一阈值大于所述第二阈值。
  39. 如权利要求38所述的图像传输方法,其中,
    当所述负荷容量大于所述第一阈值时,所述第二分辨率大于所述第一分辨率;
    当所述负荷容量小于所述第二阈值时,所述第二分辨率小于所述第一分辨率。
  40. 如权利要求37所述的图像传输方法,其中,所述判断所述第一码流与所述通信信道的信道容量是否匹配包括:
    判断所述负荷容量是否经历一变化区间,如果是,则所述第一码流与所述信道容量不匹配;否则,所述第一码流与所述信道容量匹配。
  41. 如权利要求40所述的图像传输方法,其中,所述变化区间包括:
    上升区间:由小于第一阈值上升至大于第一阈值;
    下降区间:由大于所述第二阈值下降至小于所述第二阈值;
    其中所述第一阈值大于所述第二阈值。
  42. 如权利要求41所述的图像传输方法,其中,
    当所述负荷容量经历所述上升区间,所述第二分辨率大于所述第一分辨率;
    当所述负荷容量经历所述下降区间,所述第二分辨率小于所述第一分辨率。
  43. 如权利要求38或41所述的图像传输方法,其中,所述第一阈值和所述第二阈值的至少其中之一根据所述第一码流的码率确定。
  44. 如权利要求36所述的图像传输方法,其中,在所述并行传输步 骤中,所述第二编码的帧率根据所述剩余信道容量确定。
  45. 如权利要求32至35任一项所述的图像传输方法,其中,
    所述质量采用如下的至少一种指标进行评价:均方根误差、峰值信噪比、结构相似性、梯度幅相似性偏差。
  46. 如权利要求45所述的图像传输方法,其中,所述判断所述第二码流是否达到所述第一码流的质量包括:
    当所述第二码流的所述指标与所述第一码流的所述指标的差值大于一阈值时,所述第二码流未达到所述第一码流的质量;
    当所述第二码流的所述指标与所述第一码流的所述指标的差值小于或等于所述阈值时,所述第二码流达到所述第一码流的质量。
  47. 如权利要求32至35任一项所述的图像传输方法,其中,在所述并行传输步骤中,判断所述第一码流是否出现错误,如果是,则执行切换步骤。
  48. 如权利要求47所述的图像发送方法,其中,所述错误包括如下的至少一种:丢帧、错帧、数据错误。
  49. 如权利要求32至35任一项所述的图像传输方法,其中,所述切换步骤还包括:基于反馈机制对所述第二码流进行错误恢复。
  50. 如权利要求49所述的图像传输方法,其中,所述反馈机制包括:
    图像发送装置获取所述第二码流的当前帧;
    图像接收装置向所述图像发送装置发送反馈信息;
    所述图像发送装置接收所述反馈信息,根据所述反馈信息确定所述当前帧的参考帧,并根据所述参考帧对所述当前帧进行所述第二编码。
  51. 如权利要求50所述的图像传输方法,其中,所述图像接收装置按照预定时间间隔、或者响应于接收到所述第二码流的错误帧而向所述图像发送装置发送反馈信息。
  52. 如权利要求51所述的图像传输方法,其中,所述反馈信息至少包括:所述图像接收装置在发送所述反馈信息之前、或者在接收到所述错误帧之前,接收到的所述第二码流的最后一个正确帧的帧序号。
  53. 如权利要求52所述的图像传输方法,其中,所述根据所述反馈信息确定所述当前帧的参考帧包括:
    将所述帧序号及其对应的正确帧保存至一参照帧队列,并将所述正确帧作为所述参考帧队列的第一帧;
    将所述参考帧队列的所述第一帧作为所述参考帧。
  54. 如权利要求52所述的图像传输方法,其中,所述根据所述反馈信息确定所述当前帧的参考帧包括:
    将所述帧序号及其对应的正确帧保存至一参照帧队列,并将所述正确帧作为所述参考帧队列的第一帧;
    将在所述当前帧之前发送的最后一帧作为参考帧;
    判断所述正确帧的帧序号与所述最后一帧的帧序号是否相等,如果否,将所述参考帧队列的所述第一帧作为所述参考帧。
  55. 一种图像发送装置,其中,包括:
    存储器,用于存储可执行指令;
    处理器,用于读取所述可执行指令以执行以下操作:
    以第一分辨率对图像进行第一编码以生成第一码流,通过一通信信道发送所述第一码流;
    响应于所述通信信道的信道容量变化,判断所述第一码流与所述信道容量是否匹配;如果否,执行并行编码操作:继续对所述图像进行第一编码的同时,以第二分辨率对所述图像进行第二编码以生成第二码流,通过所述通信信道同时发送所述第一码流和所述第二码流;
    判断所述第二码流是否达到所述第一码流的质量;如果是,执行编码切换操作:停止对所述图像进行所述第一编码,继续以所述第二分辨率对所述图像进行所述第二编码以生成所述第二码流,所述第二码流与所述信道容量匹配,并通过所述通信信道发送所述第二码流。
  56. 如权利要求55所述的图像发送装置,其中,所述并行编码操作的所述第二码流包括一个I帧、以及至少一个P帧;
    所述编码切换操作的所述第二码流包括多个P帧;所述多个P帧中的首个P帧以所述至少一个P帧的最后一个P帧为参考帧而生成。
  57. 如权利要求56所述的图像发送装置,其中,在所述编码切换操作中,所述第二编码的帧率等于所述第一编码的帧率。
  58. 如权利要求56所述的图像发送装置,其中,在所述并行编码操 作中,所述第二编码的帧率为自适应帧率。
  59. 如权利要求55至58任一项所述的图像发送装置,其中,在所述并行编码操作中,所述第一码流占用所述通信信道的部分信道容量,所述第二码流利用所述部分信道容量之外的剩余信道容量发送。
  60. 如权利要求55至58任一项所述的图像发送装置,其中,所述信道容量至少包括:负荷容量,所述负荷容量为所述通信信道分配给所述第一码流的信道容量。
  61. 如权利要求60所述的图像发送装置,其中,所述判断所述第一码流与所述通信信道的信道容量是否匹配包括:
    当所述负荷容量大于第一阈值或小于第二阈值时,所述第一码流与所述信道容量不匹配;
    当所述负荷容量不小于所述第二阈值且不大于所述第一阈值时,所述第一码流与所述信道容量匹配;
    其中所述第一阈值大于所述第二阈值。
  62. 如权利要求61所述的图像发送装置,其中,
    当所述负荷容量大于所述第一阈值时,所述第二分辨率大于所述第一分辨率;
    当所述负荷容量小于所述第二阈值时,所述第二分辨率小于所述第一分辨率。
  63. 如权利要求60所述的图像发送装置,其中,所述判断所述第一码流与所述通信信道的信道容量是否匹配包括:
    判断所述负荷容量是否经历一变化区间,如果是,则所述第一码流与所述信道容量不匹配;否则,所述第一码流与所述信道容量匹配。
  64. 如权利要求63所述的图像发送装置,其中,所述变化区间包括:
    上升区间:由小于第一阈值上升至大于第一阈值;
    下降区间:由大于所述第二阈值下降至小于所述第二阈值;
    其中所述第一阈值大于所述第二阈值。
  65. 如权利要求64所述的图像发送装置,其中,
    当所述负荷容量经历所述上升区间,所述第二分辨率大于所述第一分辨率;
    当所述负荷容量经历所述下降区间,所述第二分辨率小于所述第一分辨率。
  66. 如权利要求61或64所述的图像发送装置,其中,所述第一阈值和所述第二阈值的至少其中之一根据所述第一码流的码率确定。
  67. 如权利要求59所述的图像发送装置,其中,在所述并行编码操作中,所述第二编码的帧率根据所述剩余信道容量确定。
  68. 如权利要求55至58任一项所述的图像发送装置,其中,所述质量采用如下的至少一种指标进行评价:均方根误差、峰值信噪比、结构相似性、梯度幅相似性偏差。
  69. 如权利要求68项所述的图像发送装置,其中,所述判断所述第二码流是否达到所述第一码流的质量包括:
    当所述第二码流的所述指标与所述第一码流的所述指标的差值大于一阈值时,所述第二码流未达到所述第一码流的质量;
    当所述第二码流的所述指标与所述第一码流的所述指标的差值小于或等于所述阈值时,所述第二码流达到所述第一码流的质量。
  70. 如权利要求55至58任一项所述的图像发送装置,其中,在所述并行编码操作中,判断所述第一码流是否出现错误,如果是,则执行编码切换步骤。
  71. 如权利要求70所述的图像发送装置,其中,所述错误包括如下的至少一种:丢帧、错帧、数据错误。
  72. 如权利要求55至58任一项所述的图像发送装置,其中,所述处理器还进行:基于反馈机制对所述第二码流进行错误恢复的操作。
  73. 如权利要求72所述的图像发送装置,其中,所述反馈机制包括:
    获取所述第二码流的当前帧;
    接收图像接收装置发送的反馈信息,根据所述反馈信息确定所述当前帧的参考帧;
    根据所述参考帧对所述当前帧进行所述第二编码。
  74. 如权利要求73所述的图像发送装置,其中,所述反馈信息包括:所述图像接收装置接收到的所述第二码流的正确帧的帧序号;
    所述根据所述反馈信息确定所述当前帧的参考帧包括:
    将所述帧序号及其对应的正确帧保存至一参照帧队列,并将所述正确帧作为所述参考帧队列的第一帧;
    将所述参考帧队列的所述第一帧作为所述参考帧。
  75. 如权利要求73所述的图像发送装置,其中,所述反馈信息包括:所述图像接收装置接收到的所述第二码流的正确帧的帧序号;
    所述根据所述反馈信息确定所述当前帧的参考帧包括:
    将所述帧序号及其对应的正确帧保存至一参照帧队列,并将所述正确帧作为所述参考帧队列的第一帧;
    将在所述当前帧之前发送的最后一帧作为参考帧;
    判断所述正确帧的帧序号与所述最后一帧的帧序号是否相等,如果否,将所述参考帧队列的所述第一帧作为所述参考帧。
  76. 如权利要求74或75所述的图像发送装置,其中,所述正确帧为在发送所述反馈信息之前,所述图像接收装置接收到的所述第二码流的最后一个正确帧。
  77. 一种图像接收装置,其中,包括:
    存储器,用于存储可执行指令;
    处理器,用于读取所述可执行指令以执行以下操作:
    通过一通信信道接收第一码流,所述第一码流是以第一分辨率对图像进行第一编码而生成,对所述第一码流进行解码,并将所述第一码流提供给显示器以所述第一分辨率显示;
    执行并行接收操作:同时接收所述第一码流和第二码流,所述第二码流是以第二分辨率对所述图像进行第二编码而生成,对所述第一码流和所述第二码流进行解码,并继续将所述第一码流提供给显示器以所述第一分辨率显示;
    执行显示切换操作:接收所述第二码流,所述第二码流是以所述第二分辨率继续对所述图像进行所述第二编码而生成,所述第二码流与所述信道容量匹配,对所述第二码流进行解码,并将所述第二码流提供给显示器以所述第二分辨率显示。
  78. 如权利要求77所述的图像接收装置,其中,所述并行接收操作的所述第二码流包括一个I帧、以及至少一个P帧;
    所述显示切换操作的所述第二码流包括多个P帧,所述多个P帧中的首个P帧以所述至少一个P帧的最后一个P帧为参考帧而生成。
  79. 如权利要求78所述的图像接收装置,其中,在所述显示切换操作中,所述第二编码的帧率等于所述第一编码的帧率。
  80. 如权利要求78所述的图像接收装置,其中,在所述并行接收操作中,所述第二编码的帧率为自适应帧率。
  81. 如权利要求77至80任一项所述的图像接收装置,其中,所述处理器还进行:基于反馈机制对所述第二码流进行错误恢复的操作。
  82. 如权利要求81所述的图像接收装置,其中,所述反馈机制包括:按照预定时间间隔向图像发送装置发送反馈信息。
  83. 如权利要求82所述的图像接收装置,其中,所述反馈信息至少包括:在发送所述反馈信息之前,接收到的所述第二码流的最后一个正确帧的帧序号。
  84. 如权利要求81所述的图像接收装置,其中,所述反馈机制包括:响应于接收到所述第二码流的错误帧而向图像发送装置发送反馈信息。
  85. 如权利要求84所述的图像接收装置,其中,所述反馈信息至少包括:在接收到所述错误帧之前接收到的所述第二码流的最后一个正确帧的帧序号。
  86. 一种图像传输装置,其中,包括:图像发送装置与图像接收装置;
    所述图像发送装置用于以第一分辨率对图像进行第一编码以生成第一码流,并通过一通信信道将所述第一码流传输至图像接收装置,所述图像接收装置对所述第一码流进行解码,并以所述第一分辨率显示所述第一码流;
    响应于所述通信信道的信道容量变化,所述图像发送装置判断所述第一码流与所述信道容量是否匹配;如果否,执行并行传输操作:所述图像发送装置用于继续对所述图像进行第一编码的同时,以第二分辨率对所述图像进行第二编码以生成第二码流,并通过所述通信信道同时将所述第一码流和所述第二码流传输至所述图像接收装置,所述图像接收装置对所述第一码流和所述第二码流进行解码,并继续以所述第一分辨率显示所述第一码流;
    所述图像发送装置判断所述第二码流是否达到所述第一码流的质量;如果是,执行切换操作:所述图像发送装置所述停止对所述图像进行所述第一编码,继续以所述第二分辨率对所述图像进行所述第二编码以生成所述第二码流,所述第二码流与所述信道容量匹配,并通过所述通信信道将所述第二码流传输至所述图像接收装置,所述图像接收装置对所述第二码流进行解码,并以所述第二分辨率显示所述第二码流。
  87. 如强烈要求86所述的图像传输装置,其中,所述并行传输操作的所述第二码流包括一个I帧、以及至少一个P帧;
    所述切换操作的所述第二码流包括多个P帧;所述多个P帧中的首个P帧以所述至少一个P帧的最后一个P帧为参考帧而生成。
  88. 如权利要求87所述的图像传输装置,其中,在所述切换操作中,所述第二编码的帧率等于所述第一编码的帧率。
  89. 如权利要求87所述的图像传输装置,其中,在所述并行传输操作中,所述第二编码的帧率为自适应帧率。
  90. 如权利要求86至89任一项所述的图像传输装置,其中,在所述并行传输操作中,所述第一码流占用所述通信信道的部分信道容量,所述第二码流利用所述部分信道容量之外的剩余信道容量发送。
  91. 如权利要求86至89任一项所述的图像传输装置,其中,所述信道容量至少包括:负荷容量,所述负荷容量为所述通信信道分配给所述第一码流的信道容量。
  92. 如权利要求91所述的图像传输装置,其中,所述图像发送装置判断所述第一码流与所述通信信道的信道容量是否匹配包括:
    当所述负荷容量大于第一阈值或小于第二阈值时,所述第一码流与所述信道容量不匹配;
    当所述负荷容量不小于所述第二阈值且不大于所述第一阈值时,所述第一码流与所述信道容量匹配;
    其中所述第一阈值大于所述第二阈值。
  93. 如权利要求92所述的图像传输装置,其中,
    当所述负荷容量大于所述第一阈值时,所述第二分辨率大于所述第一分辨率;
    当所述负荷容量小于所述第二阈值时,所述第二分辨率小于所述第一分辨率。
  94. 如权利要求91所述的图像传输装置,其中,所述判断所述第一码流与所述通信信道的信道容量是否匹配包括:
    判断所述负荷容量是否经历一变化区间,如果是,则所述第一码流与所述信道容量不匹配;否则,所述第一码流与所述信道容量匹配。
  95. 如权利要求94所述的图像传输装置,其中,所述变化区间包括:
    上升区间:由小于第一阈值上升至大于第一阈值;
    下降区间:由大于所述第二阈值下降至小于所述第二阈值;
    其中所述第一阈值大于所述第二阈值。
  96. 如权利要求95所述的图像传输装置,其中,
    当所述负荷容量经历所述上升区间,所述第二分辨率大于所述第一分辨率;
    当所述负荷容量经历所述下降区间,所述第二分辨率小于所述第一分辨率。
  97. 如权利要求92或95所述的图像传输装置,其中,所述第一阈值和所述第二阈值的至少其中之一根据所述第一码流的码率确定。
  98. 如权利要求90所述的图像传输装置,其中,在所述并行传输操作中,所述第二编码的帧率根据所述剩余信道容量确定。
  99. 如权利要求86至89任一项所述的图像传输装置,其中,所述质量采用如下的至少一种指标进行评价:均方根误差、峰值信噪比、结构相似性、梯度幅相似性偏差。
  100. 如权利要求99所述的图像传输装置,其中,所述判断所述第二码流是否达到所述第一码流的质量包括:
    当所述第二码流的所述指标与所述第一码流的所述指标的差值大于一阈值时,所述第二码流未达到所述第一码流的质量;
    当所述第二码流的所述指标与所述第一码流的所述指标的差值小于或等于所述阈值时,所述第二码流达到所述第一码流的质量。
  101. 如权利要求86至89任一项所述的图像传输装置,其中,在所述并行传输操作中,判断所述第一码流是否出现错误,如果是,则执行切 换步骤。
  102. 如权利要求101所述的图像传输装置,其中,所述错误包括如下的至少一种:丢帧、错帧、数据错误。
  103. 如权利要求86至89任一项所述的图像传输装置,其中,所述切换操作还基于反馈机制对所述第二码流进行错误恢复。
  104. 如权利要求103所述的图像传输装置,其中,所述反馈机制包括:
    所述图像发送装置获取所述第二码流的当前帧;
    所述图像接收装置向所述图像发送装置发送反馈信息;
    所述图像发送装置接收所述反馈信息,根据所述反馈信息确定所述当前帧的参考帧,并根据所述参考帧对所述当前帧进行所述第二编码。
  105. 如权利要求104所述的图像传输装置,其中,所述图像接收装置按照预定时间间隔、或者响应于接收到所述第二码流的错误帧而向所述图像发送装置发送反馈信息。
  106. 如权利要求105所述的图像传输装置,其中,所述反馈信息至少包括:所述图像接收装置在发送所述反馈信息之前、或者在接收到所述错误帧之前,接收到的所述第二码流的最后一个正确帧的帧序号。
  107. 如权利要求106所述的图像传输装置,其中,所述根据所述反馈信息确定所述当前帧的参考帧包括:
    将所述帧序号及其对应的正确帧保存至一参照帧队列,并将所述正确帧作为所述参考帧队列的第一帧;
    将所述参考帧队列的所述第一帧作为所述参考帧。
  108. 如权利要求106所述的图像传输装置,其中,所述根据所述反馈信息确定所述当前帧的参考帧包括:
    将所述帧序号及其对应的正确帧保存至一参照帧队列,并将所述正确帧作为所述参考帧队列的第一帧;
    将在所述当前帧之前发送的最后一帧作为参考帧;
    判断所述正确帧的帧序号与所述最后一帧的帧序号是否相等,如果否,将所述参考帧队列的所述第一帧作为所述参考帧。
  109. 一种无人机,其中,包括:权利要求55至76任一项所述的图 像发送装置。
  110. 一种控制设备,其中,包括:权利要求77至85任一项所述的图像接收装置。
  111. 一种无人机系统,其中,包括:权利要求86至108任一项所述的图像传输装置。
  112. 一种无人机系统,其中,包括:权利要求109所述的无人机和权利要求110所述的控制设备。
PCT/CN2019/087045 2019-05-15 2019-05-15 一种图像发送方法、图像接收方法、图像传输方法及装置 WO2020227973A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980008816.XA CN111602398A (zh) 2019-05-15 2019-05-15 一种图像发送方法、图像接收方法、图像传输方法及装置
PCT/CN2019/087045 WO2020227973A1 (zh) 2019-05-15 2019-05-15 一种图像发送方法、图像接收方法、图像传输方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/087045 WO2020227973A1 (zh) 2019-05-15 2019-05-15 一种图像发送方法、图像接收方法、图像传输方法及装置

Publications (1)

Publication Number Publication Date
WO2020227973A1 true WO2020227973A1 (zh) 2020-11-19

Family

ID=72189566

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/087045 WO2020227973A1 (zh) 2019-05-15 2019-05-15 一种图像发送方法、图像接收方法、图像传输方法及装置

Country Status (2)

Country Link
CN (1) CN111602398A (zh)
WO (1) WO2020227973A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845596A (zh) * 2005-04-06 2006-10-11 上海迪比特实业有限公司 视频传输系统及其自适应调节视频图像的方法
WO2007058470A1 (en) * 2005-11-15 2007-05-24 Electronics And Telecommunications Research Institute A method of scalable video coding for varying spatial scalability of bitstream in real time and a codec using the same
CN102075741A (zh) * 2010-12-14 2011-05-25 北京华环电子股份有限公司 一种图像传输方法、终端及系统
CN106375836A (zh) * 2016-09-27 2017-02-01 广东小天才科技有限公司 一种视频的分辨率切换方法及装置
CN107666593A (zh) * 2017-08-28 2018-02-06 中国电子科技集团公司第二十八研究所 一种波动网络环境下的视频实时传输方法
CN207283720U (zh) * 2017-05-09 2018-04-27 北京航天泰坦科技股份有限公司 一种基于卫星通信的无人机航拍视频图传系统
US10194188B1 (en) * 2014-02-14 2019-01-29 Google Llc Bitrate selection for video streaming

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845596A (zh) * 2005-04-06 2006-10-11 上海迪比特实业有限公司 视频传输系统及其自适应调节视频图像的方法
WO2007058470A1 (en) * 2005-11-15 2007-05-24 Electronics And Telecommunications Research Institute A method of scalable video coding for varying spatial scalability of bitstream in real time and a codec using the same
CN102075741A (zh) * 2010-12-14 2011-05-25 北京华环电子股份有限公司 一种图像传输方法、终端及系统
US10194188B1 (en) * 2014-02-14 2019-01-29 Google Llc Bitrate selection for video streaming
CN106375836A (zh) * 2016-09-27 2017-02-01 广东小天才科技有限公司 一种视频的分辨率切换方法及装置
CN207283720U (zh) * 2017-05-09 2018-04-27 北京航天泰坦科技股份有限公司 一种基于卫星通信的无人机航拍视频图传系统
CN107666593A (zh) * 2017-08-28 2018-02-06 中国电子科技集团公司第二十八研究所 一种波动网络环境下的视频实时传输方法

Also Published As

Publication number Publication date
CN111602398A (zh) 2020-08-28

Similar Documents

Publication Publication Date Title
KR102324326B1 (ko) 상이한 인코딩 파라미터를 이용해 인코딩되는 복수의 인코딩 스트리밍
US10911763B2 (en) System and method for electronic data communication
US9762939B2 (en) Enhanced user experience for miracast devices
US20150373075A1 (en) Multiple network transport sessions to provide context adaptive video streaming
US9781477B2 (en) System and method for low-latency multimedia streaming
US8355434B2 (en) Digital video line-by-line dynamic rate adaptation
US9106787B1 (en) Apparatus and method for media transmission bandwidth control using bandwidth estimation
US10009628B2 (en) Tuning video compression for high frame rate and variable frame rate capture
KR101809306B1 (ko) 낮은 레이턴시 레이트 제어 시스템 및 방법
US20080084927A1 (en) Real-time network adaptive digital video encoding/decoding
US20080259796A1 (en) Method and apparatus for network-adaptive video coding
US20110090957A1 (en) Video codec method, video encoding device and video decoding device using the same
US10602139B2 (en) Embedded multimedia systems with adaptive rate control for power efficient video streaming
EP3016395B1 (en) Video encoding device and video encoding method
KR102326312B1 (ko) 비디오 송신 방법 및 데이터 송신기
EP3300378B1 (en) Method for transmitting video and data transmitter
CN101742289B (zh) 视频码流压缩方法、系统及装置
US10021402B2 (en) Estimation of video quality of experience on media servers
KR102473678B1 (ko) 비디오 송신 방법 및 데이터 송신기
CN105812710A (zh) 视频通话过程中优化图像质量的方法及系统
KR20160068657A (ko) 실시간 인코딩을 위한 방법 및 디바이스
WO2020227973A1 (zh) 一种图像发送方法、图像接收方法、图像传输方法及装置
US9363574B1 (en) Video throttling based on individual client delay
US11949858B2 (en) Video throughput improvement using long term referencing, deep learning, and load balancing
US20080122862A1 (en) Method and apparatus for transmitting and receiving moving pictures based on rgb codec

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19928828

Country of ref document: EP

Kind code of ref document: A1