WO2020019180A1 - 图像的编码控制方法、装置、存储介质及无人机 - Google Patents

图像的编码控制方法、装置、存储介质及无人机 Download PDF

Info

Publication number
WO2020019180A1
WO2020019180A1 PCT/CN2018/096957 CN2018096957W WO2020019180A1 WO 2020019180 A1 WO2020019180 A1 WO 2020019180A1 CN 2018096957 W CN2018096957 W CN 2018096957W WO 2020019180 A1 WO2020019180 A1 WO 2020019180A1
Authority
WO
WIPO (PCT)
Prior art keywords
encoding
image data
quality
target
image
Prior art date
Application number
PCT/CN2018/096957
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 CN201880032519.4A priority Critical patent/CN112204970A/zh
Priority to PCT/CN2018/096957 priority patent/WO2020019180A1/zh
Publication of WO2020019180A1 publication Critical patent/WO2020019180A1/zh
Priority to US17/133,399 priority patent/US20210120230A1/en

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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • 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/136Incoming video signal characteristics or properties
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field

Definitions

  • the present invention relates to the field of information processing technology, and in particular, to an image coding control method, device, storage medium, and unmanned aerial vehicle.
  • the video compression module is implemented by encoding control to achieve video compression under a given storage or communication bandwidth.
  • storage Scene-like scenarios have a stronger demand for high-quality stored video; traditional coding control algorithms generally take the bit rate accuracy over a given period of time as the sole control target.
  • the invention provides an image coding control method, device, storage medium, and unmanned aerial vehicle, which are used to solve the problems in the prior art that are likely to cause waste of bit rate resources or insufficient bit rate resources.
  • a first aspect of the present invention is to provide an image encoding control method, including:
  • a second aspect of the present invention is to provide an image encoding control device, including:
  • a processor configured to run a computer program stored in the memory to implement: acquiring a frame of image data in a group of image sequences; performing first encoding on the image data, and obtaining a first encoding of the encoded image data Quality; iteratively encode the image data according to a first encoding quality and a preset target encoding quality.
  • a third aspect of the present invention is to provide an image encoding control device, including:
  • An acquisition module configured to acquire one frame of image data in a group of image sequences
  • a processing module configured to perform first encoding on the image data to obtain a first encoding quality of the encoded image data
  • An encoding module configured to iteratively encode the image data according to the first encoding quality and a preset target encoding quality.
  • a fourth aspect of the present invention is to provide a computer-readable storage medium, which stores program instructions, the program instructions being used to implement the image encoding control method according to the first aspect.
  • a fifth aspect of the present invention is to provide a drone, including:
  • the coding control device is disposed on the rack.
  • the image encoding control method, device, storage medium and unmanned aerial vehicle obtained by the present invention obtain a first encoding quality by acquiring one frame of image data in an image sequence and encoding the image data for the first time, further based on the first Encoding quality and target encoding are used to encode and control image data, enabling single or multiple encodings to be adaptively selected based on specific usage scenarios, effectively solving the existing technology that easily causes waste of code rate resources or The problem of insufficient bit rate resources ensures the encoding quality of the image and satisfies the user's needs, which further improves the practicability of the method and is conducive to market promotion and application.
  • FIG. 1 is a schematic flowchart of an image encoding control method according to an embodiment of the present invention
  • FIG. 2 is a first schematic flowchart of an iterative encoding process for the image data according to the first encoding quality and a preset target encoding quality according to an embodiment of the present invention
  • FIG. 3 is a second schematic flowchart of an iterative encoding process for the image data according to the first encoding quality and a preset target encoding quality according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of controlling iterative encoding of the image data according to the target bit rate, the first bit rate, and the proportion information according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of another image coding control method according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of iterative encoding of the image data according to the second encoding quality and the target encoding quality according to an embodiment of the present invention
  • FIG. 7 is a schematic flowchart of still another image coding control method according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an image encoding control device according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of another image encoding control apparatus according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a drone provided by an embodiment of the present invention.
  • connection may be a fixed connection, a detachable connection, or an integral connection.
  • connection may be a fixed connection, a detachable connection, or an integral connection.
  • first and second are only used to conveniently describe different components, and cannot be understood as indicating or implying a sequential relationship, relative importance, or implicit indication.
  • FIG. 1 is a schematic flowchart of an image encoding control method according to an embodiment of the present invention.
  • this embodiment provides an image encoding control method, which can effectively solve the problems in the prior art. Existing problems are likely to cause waste of bit rate resources or insufficient bit rate resources, and can also ensure the encoding quality of images.
  • the method may include:
  • a group of image sequences may include multiple frames of image data, and one frame of image data may be extracted from the image sequence.
  • This embodiment does not limit the specific implementation of obtaining one frame of image data, and those skilled in the art may use
  • one frame of image data is acquired. For example, time information may be acquired first, and one frame of image data corresponding to the time information may be extracted from the multi-frame image data according to the time information.
  • S102 Perform first encoding on the image data to obtain a first encoding quality of the encoded image data
  • S103 Iteratively encode image data according to a first encoding quality and a preset target encoding quality.
  • the target encoding quality may be a preset default value, or may be preset by the user. More preferably, before iteratively encoding the image data according to the first encoding quality and the preset target encoding quality, Obtain the image quality of the image sequence; and then determine the target encoding quality based on the image quality.
  • One of the achievable ways is to obtain the image quality of the image sequence; determine the image quality as the target encoding quality.
  • the image sequence includes N frames of image data, and the image quality of the image sequence is Q, which is the preset target encoding quality; extract the Kth frame of image data from the N frames of image data and encode the frame of image data To obtain the first encoding quality Q1, and then control the iterative encoding of the image data according to the first encoding quality Q1 and the target encoding quality Q; for example, the relationship between Q1 and Q can be compared.
  • another achievable way is: obtaining the image quality of the image sequence; determining an image quality interval range according to the image quality, and determining the image quality interval range as the target encoding quality.
  • the relationship between Q1 and Q can be compared.
  • Q1 is within the range of Q, that is, Q1 is closer to Q, then It indicates that the encoded image data can meet the user's usage requirements, so the image data can be controlled to stop the encoding operation; when Q1 is not in the range of Q, it means that the encoded image data cannot meet the user's usage requirements, so the image can be controlled
  • the data continues to be encoded; of course, those skilled in the art can also use other analysis and processing methods, for example, the ratio of Q1 to Q can be obtained, if the ratio is within a preset standard ratio range, that is, Q1 is compared with Q If it is close, you can control the image data to stop the encoding operation; if the ratio of Q1 to Q is not within the preset standard ratio range, you can control the image data to continue the encoding operation.
  • the image encoding control method provided in this embodiment obtains a frame of image data in an image sequence and encodes the image data for the first time to obtain a first encoding quality.
  • the image data is further based on the first encoding quality and the target encoding.
  • Encoding control is implemented to enable single or multiple encodings to be adaptively selected based on specific usage scenarios, effectively solving the problems in the prior art that are likely to cause waste of code rate resources or insufficient code rate resources. It improves the coding quality of the image, meets the user's needs, and improves the practicability of the method, which is conducive to the promotion and application of the market.
  • FIG. 2 is a first schematic flowchart of iteratively encoding image data according to a first encoding quality and a preset target encoding quality according to an embodiment of the present invention
  • FIG. 3 is an embodiment of the present invention according to the first encoding quality and a preset Schematic diagram 2 of the process of iteratively encoding image data with target encoding quality
  • FIG. 4 is a schematic diagram of the process of iteratively encoding image data according to the target code rate, the first code rate, and the proportion information according to an embodiment of the present invention
  • the size of the first encoding quality and the target encoding quality can be compared.
  • the first encoding quality is greater than the target encoding quality, it means that the image data after encoding does not satisfy the user's Therefore, in order to meet the needs of users, it is necessary to control the image data to continue encoding.
  • the quantization parameters The increase granularity can be any one of 1 to 51; and this embodiment does not limit the increase granularity of the quantization parameter.
  • Granularity to increase the quantization parameter can be: 1, 2, 3, 4, 5, 6, 7, 8, or other custom values.
  • S1032 Control the image data for second encoding based on the quantization parameter.
  • the image data can be controlled to perform a second encoding operation based on the increased quantization parameter to meet the user's usage requirements.
  • iteratively encoding the image data according to the first encoding quality and a preset target encoding quality may further include:
  • S1033 If the first encoding quality is less than the target encoding quality, obtain the target bit rate of the image sequence, the historical bit rate of the encoded image data in the image sequence before the first encoding of the image data, and the first bit rate of the encoded image data. A bit rate and the proportion of image data in the image sequence;
  • the target code can be obtained Rate, historical code rate, first code rate, and proportion information, and analyze and process the image data based on the analysis results of the above-mentioned parameters.
  • S1034 Control the iterative encoding of the image data according to the target bit rate, the historical bit rate, the first bit rate, and the proportion information.
  • the control of the iterative encoding of image data by the historical bit rate, the first bit rate, and the proportion information may include:
  • the target code rate is R
  • the historical code rate of the encoded image data in the image sequence before the first encoding of the image data is Rn
  • the first code rate is RK1
  • the proportion information is K / N.
  • the image data can be controlled to perform the second encoding operation based on the reduced quantization parameter to meet the user's usage requirements.
  • controlling the iterative encoding of the image data according to the target bit rate, the historical bit rate, the first bit rate, and the proportion information may further include:
  • iteratively encoding the image data according to the first encoding quality and a preset target encoding quality further includes:
  • the image data at this time can already meet the needs of the user, and therefore, the image data can be controlled to stop encoding.
  • the above method is used to control the encoding operation of the image data according to the first encoding quality and the target encoding quality. While satisfying the needs of users, it ensures the stability and reliability of the image data encoding and further improves the practicability of the method. .
  • FIG. 5 is a schematic flowchart of another image encoding control method according to an embodiment of the present invention
  • FIG. 6 is a schematic flowchart of iterative encoding of image data according to a second encoding quality and a target encoding quality according to an embodiment of the present invention
  • the second encoding quality of the image data after the second encoding can be obtained.
  • S202 Iteratively encode the image data according to the second encoding quality and the target encoding quality.
  • the second encoding quality and the target encoding quality obtained in advance may be used to analyze and process the image data.
  • iteratively encoding the image data according to the second encoding quality and the target encoding quality may include: :
  • the quality threshold value is set in advance, and those skilled in the art can set the quality threshold value according to specific design requirements. It should be noted that the value or range of the quality threshold value is relatively small, and the target encoding quality and the second encoding When the difference in quality is less than or equal to a preset quality threshold, it means that the second encoding quality is close to the target encoding quality. At this time, the image data can meet the user's use requirements, so the image data can be controlled to stop the encoding operation.
  • the difference between the target encoding quality and the second encoding quality is greater than a preset quality threshold, it means that the second encoding quality is far from the target encoding quality, and the image data at this time cannot meet the user's needs, so the image can be controlled
  • the data continues the encoding operation, and the number of encoding operations can be determined according to the actual scene requirements.
  • FIG. 7 is a schematic flowchart of still another image coding control method according to an embodiment of the present invention. based on the above embodiment, continuing to refer to FIG. 7, in order to improve the practicability of the method, in this embodiment, After iteratively encoding the image data according to the first encoding quality and a preset target encoding quality, the method further includes:
  • S302 Write code stream data to a preset storage device.
  • the preset storage device may include a memory, a hard disk, a floppy disk, a magnetic disk, a U disk, an optical memory, etc.
  • the memory may include a random access memory RAM or a read-only memory ROM, etc.
  • the optical memory may include a CD or a DVD, etc. ;
  • this embodiment of the application provides an image encoding control method.
  • the target code rate of an N-frame image sequence in a given time period is R
  • the target encoding quality is Q.
  • the K-th frame of image data where K ⁇ N, after the first encoding of the frame of image data, obtain the code stream size and encoding quality of the encoded image data, that is, the first code rate R1 and the first encoding
  • the quality Q1 is then analyzed and processed by the target code rate R, the target code quality Q, the first code rate R1, and the first code quality Q1.
  • the specific analysis and processing steps include:
  • Specific application scenarios include: When a shooting device (camera, a terminal with a camera function, etc.) performs shooting, each time the shooting device collects a frame of image, encoding and storage operations are required, and each encoding operation of the shooting device is Corresponding processing time and processing power need to be paid. Therefore, it is necessary to comprehensively consider the processing time, processing power, and acquired image quality to determine whether the image data can meet the needs of the user, that is, the processing cost
  • the time and processing power are within the range that the user can receive to obtain higher quality image data. Specifically, the number of repeated encodings can be determined according to the actual scene requirements.
  • the adjustment of the quantization parameter in this application embodiment mainly adjusts the quantization parameter for re-encoding according to the quantization parameter used for the first encoding, the first bit rate, and the first encoding quality.
  • the granularity of the quantization parameter adjustment is not limited.
  • the quantization parameters of the encoding protocols H264 and H265 are defined as: for each scene video image, each increase of 6 quantization parameters reduces the code rate by 2 and the objective quality PSNR decreases by 3dB; Yes, for the implementation of different scenes, different motion videos, and different specific encoding algorithms, the above theoretical experience is just reference data.
  • This embodiment adopts an encoding control method based on adaptive selection of single or multiple encodings.
  • the goal is to optimize the video quality. It can solve the video quality jitter and breathing caused by the traditional bit rate control algorithm.
  • the problem of the effect is to pursue smoothness of quality instead of the stability of the bit rate; thus, under the given bit rate, the goal of optimal quality can be achieved, which meets the needs of users and further improves the method's Practicality is conducive to market promotion and application.
  • FIG. 8 is a schematic structural diagram of an image encoding control device according to an embodiment of the present invention. referring to FIG. 8, this embodiment provides an image encoding control device, and the encoding control device can perform the foregoing encoding control.
  • the encoding control device may include:
  • a memory 302 configured to store a computer program
  • the processor 301 is configured to run a computer program stored in the memory 302 to implement: obtaining a frame of image data in a group of image sequences; performing first encoding on the image data to obtain a first encoding quality of the encoded image data; Iteratively encode image data according to a first encoding quality and a preset target encoding quality.
  • the processor 301 Before the processor 301 iteratively encodes the image data according to the first encoding quality and a preset target encoding quality, the processor 301 is configured to: obtain the image quality of the image sequence; and determine the image quality as the target encoding quality.
  • the processor 301 when the processor 301 iteratively encodes image data according to a first encoding quality and a preset target encoding quality, the processor 301 is configured to:
  • the quantization parameter of the image data for encoding is increased; the image data is controlled for the second encoding based on the quantization parameter.
  • the processor 301 when the processor 301 iteratively encodes image data according to a first encoding quality and a preset target encoding quality, the processor 301 is configured to:
  • the target code rate of the image sequence, the historical code rate of the encoded image data in the image sequence before the first encoding of the image data, and the first code of the encoded image data are obtained Rate and the proportion information of the image data in the image sequence; iterative encoding of the image data is controlled according to the target bit rate, the historical bit rate, the first bit rate, and the proportion information.
  • the processor 301 controls the iterative encoding of the image data according to the target bit rate, the historical bit rate, the first bit rate, and the proportion information
  • the processor 301 is configured to:
  • the quantization parameter for encoding the image data is reduced; the image data is controlled for second encoding based on the quantization parameter.
  • the processor 301 controls the iterative encoding of the image data according to the target bit rate, the historical bit rate, the first bit rate, and the proportion information
  • the processor 301 is configured to:
  • the image data is controlled to stop encoding.
  • the processor 301 controls the image data for second encoding based on the quantization parameter, the processor 301 is configured to:
  • the processor 301 when the processor 301 iteratively encodes image data according to the second encoding quality and the target encoding quality, the processor 301 is configured to:
  • the processor 301 when the processor 301 iteratively encodes image data according to a first encoding quality and a preset target encoding quality, the processor 301 is configured to:
  • the image data is controlled to stop encoding.
  • the processor 301 After the processor 301 iteratively encodes the image data according to the first encoding quality and a preset target encoding quality, the processor 301 is configured to:
  • the image encoding control device in this embodiment may be used to execute the technical solutions of the embodiments shown in FIG. 1-7 in the foregoing method.
  • the implementation principles and technical effects are similar, and details are not described herein again.
  • FIG. 9 is a schematic structural diagram of another image encoding control apparatus according to an embodiment of the present invention. referring to FIG. 9, this embodiment provides another image encoding control apparatus, and the encoding control apparatus may execute the foregoing An encoding control method.
  • the encoding control device may include:
  • An acquisition module 1 for acquiring one frame of image data in a group of image sequences
  • a processing module 2 configured to perform first encoding on the image data to obtain a first encoding quality of the encoded image data
  • the encoding module 3 is configured to iteratively encode image data according to a first encoding quality and a preset target encoding quality.
  • the acquisition module 1, the processing module 2, and the encoding module 3 in the image encoding control device in this embodiment may be used to execute the technical solution of the embodiment shown in FIG. 1-7 in the foregoing method.
  • the implementation principles and technical effects are similar. I will not repeat them here.
  • Another aspect of this embodiment provides a computer-readable storage medium.
  • the computer-readable storage medium stores program instructions, and the program instructions are used to implement an image encoding control method in any one of the foregoing embodiments.
  • FIG. 10 is a schematic structural diagram of a drone provided by an embodiment of the present invention. Referring to FIG. 10, this embodiment provides a drone 400 including:
  • the drone 400 includes a fuselage, a power system, and a coded control device 302.
  • the power system includes at least one of the following: a motor 407, a propeller 406, and an electronic governor 417.
  • the power system is installed in the fuselage and is used to provide flight power.
  • the coding control device 302 can be set on the fuselage, and the implementation and specific principles of the coding control device 302 are consistent with the control device of the above embodiment, and will not be repeated here.
  • the drone 400 further includes: a sensing system 408, a communication system 410, a supporting device 402, and a photographing device 404.
  • the supporting device 402 may be a gimbal, and the communication system 410 is specifically configured to communicate with a control terminal on the ground.
  • the encoding control device 302 may specifically be an image processor, and the image processor may be communicatively connected to the photographing device 404 for processing image data captured by the photographing device 404.
  • the related apparatuses and methods disclosed may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the modules or units is only a logical function division.
  • multiple units or components may be divided.
  • the combination can either be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present invention essentially or part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium , Including a number of instructions to cause the computer processor 101 (processor) to perform all or part of the steps of the method described in various embodiments of the present invention.
  • the foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes.

Landscapes

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

Abstract

本发明公开了一种图像的编码控制方法、装置、存储介质及无人机,其中,方法包括:获取一组图像序列中的一帧图像数据;对所述图像数据进行第一次编码,获取编码后所述图像数据的第一编码质量;根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码。本发明提供的图像的编码控制方法、装置、存储介质及无人机,通过获取图像序列中的一帧图像数据,并对图像数据进行第一次编码,获取第一编码质量,进一步基于第一编码质量和目标编码对图像数据进行编码控制,有效地解决了现有技术中存在的容易造成码率资源浪费或者码率资源不足的问题,保证了图像的编码质量,满足了用户的使用需求,进而提高了该方法的实用性。

Description

图像的编码控制方法、装置、存储介质及无人机 技术领域
本发明涉及信息处理技术领域,尤其涉及一种图像的编码控制方法、装置、存储介质及无人机。
背景技术
现有技术中,不管是视频存储,还是视频通信,都是通过编码控制作用于视频压缩模块,来实现给定存储或者通信带宽下的视频压缩的;通常情况下,相比于通信场景,存储类场景对存储视频的高质量需求更强烈;而传统的编码控制算法,一般是以给定一段时间内的码率精确性作为唯一的控制目标。
另外,在进行视频存储或者视频通信时,每一帧视频的时间变化复杂度,空间变化的复杂度,都会和编码这一帧产生的码率大小有直接关系,也就是说,实际上为了保证编码质量不变,每帧对码率的需求并不一样;综上可知,对于高质量的存储场景来说,传统以恒定码率作为控制目标的编码控制算法,并不高效,它存在两类问题:
(1)在当前帧的时间变化和空间变化复杂度较低时,保证给定质量,实际需要的码率低于给定码率时,传统的编码控制算法倾向于保持给定码率进行编码,导致多给了这一帧码率预算,获得这部分预算,实际对于保证给定质量是多余的,从而造成了码率资源的浪费。
(2)在当前帧的时间变化和空间变化复杂度较高时,保证给定质量,实际需要的码率高于给定码率时,传统的编码控制算法倾向于保持给定码率进行编码,导致少给了这一帧码率预算,缺少这部分预算,实际对于保证给定质量是不够的,从而造成了码率资源的不足。
发明内容
本发明提供了一种图像的编码控制方法、装置、存储介质及无人机,用 于解决现有技术中存在的容易造成码率资源浪费或者码率资源不足的问题。
本发明的第一方面是为了提供一种图像的编码控制方法,包括:
获取一组图像序列中的一帧图像数据;
对所述图像数据进行第一次编码,获取编码后图像数据的第一编码质量;
根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码。
本发明的第二方面是为了提供一种图像的编码控制装置,包括:
存储器,用于存储计算机程序;
处理器,用于运行所述存储器中存储的计算机程序以实现:获取一组图像序列中的一帧图像数据;对所述图像数据进行第一次编码,获取编码后图像数据的第一编码质量;根据第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码。
本发明的第三方面是为了提供一种图像的编码控制装置,包括:
获取模块,用于获取一组图像序列中的一帧图像数据;
处理模块,用于对所述图像数据进行第一次编码,获取编码后图像数据的第一编码质量;
编码模块,用于根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码。
本发明的第四方面是为了提供一种计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于实现上述第一方面所述的图像的编码控制方法。
本发明的第五方面是为了提供一种无人机,包括:
机架;
上述第二方面所述的编码控制装置,所述编码控制装置设置于所述机架上。
本发明提供的图像的编码控制方法、装置、存储介质及无人机,通过获取图像序列中的一帧图像数据,并对图像数据进行第一次编码,获取第一编码质量,进一步基于第一编码质量和目标编码对图像数据进行编码控制,实现了可以基于具体的使用场景而进行自适应地选择单次或者多次编码,有效地解决了现有技术中存在的容易造成码率资源浪费或者码率资源不足的问题,保证了图像的编码质量,满足了用户的使用需求,进而提高了该方法的实用性,有利于市场的推广与应用。
附图说明
图1为本发明实施例提供的一种图像的编码控制方法的流程示意图;
图2为本发明实施例提供的根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码的流程示意图一;
图3为本发明实施例提供的根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码的流程示意图二;
图4为本发明实施例提供的根据所述目标码率、第一码率和占比信息对所述图像数据的迭代编码进行控制的流程示意图;
图5为本发明实施例提供的又一种图像的编码控制方法的流程示意图;
图6为本发明实施例提供的根据所述第二编码质量和所述目标编码质量对所述图像数据进行迭代编码的流程示意图;
图7为本发明实施例提供的再一种图像的编码控制方法的流程示意图;
图8为本发明实施例提供的一种图像的编码控制装置的结构示意图;
图9为本发明实施例提供的另一种图像的编码控制装置的结构示意图;
图10为本发明实施例提供的一种无人机的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例,都属于本发明保护的范围。
在本发明中,术语“安装”、“连接”、“固定”等术语均应广义理解,例如,“连接”可以是固定连接,也可以是可拆卸连接,或一体地连接。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。
需要说明的是,在本发明的描述中,术语“第一”、“第二”仅用于方便描述不同的部件,而不能理解为指示或暗示顺序关系、相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。
下面结合附图,对本发明的一些实施方式作详细说明。在各实施例之间不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
图1为本发明实施例提供的一种图像的编码控制方法的流程示意图;参考附图1所示,本实施例提供了一种图像的编码控制方法,该方法可以有效地解决现有技术中存在的容易造成码率资源浪费或者码率资源不足的问题,并且还可以保证图像的编码质量,具体的,该方法可以包括:
S101:获取一组图像序列中的一帧图像数据;
其中,一组图像序列中可以包括多帧图像数据,进而可以在图像序列中提取一帧图像数据,本实施例对于获取一帧图像数据的具体实现方式不做限定,本领域技术人员可以采用现有技术来获取一帧图像数据,例如:可以先获取一时间信息,依据时间信息在多帧图像数据中提取一帧与时间信息相对应的图像数据。
S102:对图像数据进行第一次编码,获取编码后图像数据的第一编码质量;
S103:根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码。
其中,目标编码质量可以为预先设置的默认值,或者,也可以为用户预先设置的,较为优选的,在根据第一编码质量和预设的目标编码质量对图像 数据进行迭代编码之前,可以先获取图像序列的图像质量;而后根据图像质量确定目标编码质量,其中,一种可实现的方式为:获取图像序列的图像质量;将图像质量确定为目标编码质量。
假设图像序列包括N帧图像数据,图像序列的图像质量为Q,该图像质量即为预设的目标编码质量;在N帧图像数据中提取第K帧图像数据,并对该帧图像数据进行编码,获得第一编码质量为Q1,而后,可以根据第一编码质量Q1和目标编码质量Q对图像数据的迭代编码进行控制;例如,可以比较Q1与Q的关系,当Q1与Q的差值小于预设的阈值时,也即,Q1与Q比较接近,说明图像数据可以满足用户的使用需求,因此可以控制图像数据停止编码操作;当Q1与Q的差值大于预设的阈值时,此时,说明进行编码后的图像数据还无法满足用户的使用需求,因此可以控制图像数据继续进行编码操作。
此外,对于目标编码质量而言,另一种可实现的方式为:获取图像序列的图像质量;根据图像质量确定一图像质量区间范围,将该图像质量区间范围确定为目标编码质量。
此时,在根据第一编码质量Q1和目标编码质量Q对图像数据进行迭代编码时,可以比较Q1与Q的关系,当Q1在Q的区间范围内,也即,Q1与Q比较接近,则说明编码后的图像数据可以满足用户的使用需求,因此可以控制图像数据停止编码操作;当Q1不在Q的区间范围内,则说明编码后的图像数据还无法满足用户的使用需求,因此可以控制图像数据继续进行编码操作;当然的,本领域技术人员还可以采用其他的分析处理方式,例如:可以获取Q1与Q的比值,若比值在预设的标准比值范围内,也即,Q1与Q比较接近,则可以控制图像数据停止编码操作;若Q1与Q的比值不在预设的标准比值范围内,则可以控制图像数据继续进行编码操作。
本实施例提供的图像的编码控制方法,通过获取图像序列中的一帧图像数据,并对图像数据进行第一次编码,获取第一编码质量,进一步基于第一编码质量和目标编码对图像数据进行编码控制,实现了可以基于具体的使用场景而进行自适应地选择单次或者多次编码,有效地解决了现有技术中存在的容易造成码率资源浪费或者码率资源不足的问题,保证了图像的编码质量,满足了用户的使用需求,进而提高了该方法的实用性,有利于市场的推广与 应用。
图2为本发明实施例提供的根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码的流程示意图一;图3为本发明实施例提供的根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码的流程示意图二;图4为本发明实施例提供的根据目标码率、第一码率和占比信息对图像数据的迭代编码进行控制的流程示意图;在上述实施例的基础上,继续参考附图2-4可知,本实施例中的根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码可以包括:
S1031:若第一编码质量大于目标编码质量,则加大图像数据进行编码的量化参数;
在获取到第一编码质量和目标编码质量之后,可以比较第一编码质量和目标编码质量的大小,当第一编码质量大于目标编码质量时,则说明进行编码后的图像数据并未满足用户的需求,因此,为了满足用户的使用需求,需要控制图像数据继续进行编码,此时,需要加大图像数据进行编码的量化参数,以利用增大后的量化参数再次进行编码操作;其中,量化参数的加大粒度可以为1到51中任意一个;而本实施例对于量化参数的加大粒度不做限定,本领域技术人员可以根据具体的设计需求进行设置,例如:可以按照预设的加大粒度来增加量化参数,其中,预设的加大粒度可以为:1、2、3、4、5、6、7、8或者其他自定义数值等等。
需要了解的是,在增大量化参数时,会降低图像数据的码率,同时也会降低图像质量;相反的,减小量化参数时,会提高图像数据的码率,同时也会提升图像质量。
S1032:基于量化参数控制图像数据进行第二次编码。
在对量化参数进行增大处理后,可以基于增大后的量化参数控制图像数据进行第二次编码操作,以满足用户的使用需求。
另外,根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码还可以包括:
S1033:若第一编码质量小于目标编码质量,则获取图像序列的目标码率、在对图像数据进行第一次编码之前的图像序列中已编码图像数据的历史码率、 编码后图像数据的第一码率以及图像数据在图像序列中的占比信息;
当第一编码质量小于目标编码质量时,此时无法准确判断编码后的图像数据是否满足用户的使用需求,因此,为了能够准确判断编码后的图像数据是否满足用户的使用需求,可以获取目标码率、历史码率、第一码率以及占比信息,并基于上述各个参数的分析结果对图像数据进行分析处理。
S1034:根据目标码率、历史码率、第一码率和占比信息对图像数据的迭代编码进行控制。
在获取到目标码率、历史码率、第一码率以及占比信息之后,可以对上述各个参数进行分析处理,以判断编码后的图像数据是否满足用户的需求;其中,根据目标码率、历史码率、第一码率和占比信息对图像数据的迭代编码进行控制可以包括:
S10341:若历史码率与第一码率的和小于占比信息与目标码率的乘积,则减小图像数据进行编码的量化参数;
具体的,假设目标码率为R,在对图像数据进行第一次编码之前的图像序列中已编码图像数据的历史码率为Rn,第一码率为RK1,占比信息为K/N,则在Rn+RK1<(R/N)*K时,此时进行编码后的图像数据并未满足用户的需求,因此,为了满足用户的使用需求,需要控制图像数据继续进行编码,进而需要减小图像数据进行编码的量化参数,以利用减小后的量化参数再次进行编码操作;其中,量化参数的减小粒度可以为1到51中任意一个,本领域技术人员可以根据具体的设计需求进行设置,在此不再赘述。
S10342:基于量化参数控制图像数据进行第二次编码。
在对量化参数进行减小处理后,可以基于减小后的量化参数控制图像数据进行第二次编码操作,以满足用户的使用需求。
进一步的,根据目标码率、历史码率、第一码率和占比信息对图像数据的迭代编码进行控制还可以包括:
S10343:若历史码率与第一码率的和等于占比信息与目标码率的乘积,则控制图像数据停止编码。
在Rn+RK1=(R/N)*K时,可以确定此时的图像数据已经可以满足用户的需求,因此,可以控制图像数据停止编码。
进一步的,根据第一编码质量和预设的目标编码质量对图像数据进行迭 代编码,还包括:
S1035:若第一编码质量等于目标编码质量,则控制图像数据停止编码。
在第一编码质量等于目标编码质量时,可以确定此时的图像数据已经可以满足用户的需求,因此,可以控制图像数据停止编码。
通过上述方式来实现根据第一编码质量和目标编码质量对图像数据的编码操作进行控制,在可以满足用户需求的同时,保证了图像数据进行编码的稳定可靠性,进一步提高了该方法的实用性。
图5为本发明实施例提供的又一种图像的编码控制方法的流程示意图;图6为本发明实施例提供的根据第二编码质量和目标编码质量对图像数据进行迭代编码的流程示意图;在上述实施例的基础上,继续参考附图5-6可知,本实施例中,在基于量化参数控制图像数据进行第二次编码之后,该方法还包括:
S201:获取编码后图像数据的第二编码质量;
在对图像数据进行第二次编码之后,需要判断进行第二次编码后的图像数据是否满足用户的使用需求,因此,可以获取进行第二次编码后的图像数据的第二编码质量。
S202:根据第二编码质量和目标编码质量对图像数据进行迭代编码。
在获取到第二编码质量之后,可以利用第二编码质量和预先获取的目标编码质量来对图像数据进行分析处理,具体的,根据第二编码质量和目标编码质量对图像数据进行迭代编码可以包括:
S2021:获取目标编码质量与第二编码质量的差值;
S2022:若差值小于或等于预设的质量阈值,则控制图像数据停止编码;或者,
其中,质量阈值为预先设置的,本领域技术人员可以根据具体的设计需求来设置质量阈值,需要说明的是,该质量阈值的数值或者数值范围会比较小,而在目标编码质量与第二编码质量的差值小于或等于预设的质量阈值时,则说明第二编码质量与目标编码质量较接近,此时的图像数据可以满足用户的使用需求,因此可以控制图像数据停止编码操作。
S2023:若差值大于预设的质量阈值,则控制图像数据继续编码。
在目标编码质量与第二编码质量的差值大于预设的质量阈值时,则说明第二编码质量与目标编码质量差距较大,此时的图像数据无法满足用户的使用需求,因此可以控制图像数据继续编码操作,并可以根据实际的场景需求决定编码操作的次数。
图7为本发明实施例提供的再一种图像的编码控制方法的流程示意图;在上述实施例的基础上,继续参考附图7所示,为了提高该方法的实用性,本实施例中,在根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码之后,方法还包括,
S301:获取图像数据经过编码后的码流数据;
S302:将码流数据写入预设的存储设备。
其中,预设的存储设备可以包括存储器、硬盘、软盘、磁盘、U盘、光学存储器等等,存储器可以包括:随机存取存储器RAM或者只读内存ROM等,光学存储器可以包括:CD或者DVD等;通过将满足用户需求的图像数据写入到存储设备中,方便用户对图像数据的调取、管理和存放,进而提高了用户使用的方便程度。
具体应用时,本应用实施例提供了一种图像的编码控制方法,具体的,假设给定一端时间内N帧图像序列的目标码率为R,目标编码质量为Q,获取N帧图像序列中的第K帧图像数据,其中,K<N,在对该帧图像数据进行第一次编码之后,获取编码后的图像数据的码流大小和编码质量,即第一码率R1和第一编码质量Q1,而后通过目标码率R、目标编码质量Q、第一码率R1和第一编码质量Q1进行分析处理,具体的分析处理步骤包括:
(1)若Q1>Q,则加大编码的量化参数,进行再次编码,以使得Q2~Q,即:进行第二次编码操作之后的第二编码质量无限接近于目标编码质量;此时,第一码率R1也会跟着下降为第二码率R2,具体的,可以根据实际场景需求决定重复次数,使得最终Q[k]无限逼近Q。
具体的应用场景包括:在拍摄装置(摄像机、具有摄像功能的终端等)进行摄像时,每当拍摄装置采集一帧图像时,都需要进行编码和存储操作,而拍摄装置的每次编码操作是需要付出相应的处理时间和处理功耗,因此, 需要综合考虑所付出的处理时间、处理功耗以及所获取的图像质量来确定图像数据是否可以满足用户的需求,也即需要在所付出的处理时间和处理功耗在用户可以接收的范围内,获取较高质量的图像数据,具体的可以根据实际场景需求决定重复的编码次数。
(2)在Q1<Q时,则进行下述具体分析过程:
(a)若Rn+R1<(R/N)*K,则减小编码的量化参数,进行再次编码,使得Q2~Q,第一码率R1也会跟着上升为第二码率R2,具体的,可以根据实际场景需求决定重复次数,并且,在Rn<R–R[k]的前提下,使得最终的Q[k]无限逼近Q,其中,R[k]为对图像数据经过K次编码后的码率,Q[k]为对图像数据经过K次编码后的编码质量。
(b)若Rn+R1=(R/N)*K,则停止编码操作。
(3)在Q1=Q时,则停止编码操作。
其中,需要注意的是,在对图像数据进行编码操作时,进行编码后的图像序列的码率是根据编码操作进行变化的,也即:Rn=Rn+R[k],其中,Rn为在对图像数据进行第K次编码之前的图像序列中已编码图像数据的历史码率,R[k]为对图像数据进行第K次编码之后的码率。
另外,本应用实施例中的调整量化参数,主要是根据第一次编码使用的量化参数、第一码率和第一编码质量对再次编码进行的量化参数进行调整。而对于量化参数调整的粒度不做限定,通常对于编码协议H264、H265的量化参数定义为:相同场景视频图像,量化参数每增加6,码率下降一倍,客观质量PSNR下降3dB;可以理解的是,对于不同场景、不同运动的视频、不同的具体编码算法的实现而言,上述理论经验仅为参考数据。此外,在实际使用的大多数场景中,对于图像数据而言,基本上是可以在进行第二次编码之后一步调整到位,即使略有偏差,也是在用户或者产品的可接受范围内,进而不需要再进行第三次编码。
本实施例采用基于自适应选择单次或者多次编码的编码控制方法,在给定码率的情况下,以优化视频质量为目标,可以解决传统码率控制算法而导致的视频质量抖动和呼吸效应的问题,追求质量的平滑程度smooth,而非码率的平稳性;从而可以在给定码率的情况下,达到质量最优的目标,满足了用户的使用需求,进一步提高了该方法的实用性,有利于市场的推广与应用。
图8为本发明实施例提供的一种图像的编码控制装置的结构示意图;参考附图8所示,本实施例提供了一种图像的编码控制装置,该编码控制装置可以执行上述的编码控制方法,具体的,该编码控制装置可以包括:
存储器302,用于存储计算机程序;
处理器301,用于运行存储器302中存储的计算机程序以实现:获取一组图像序列中的一帧图像数据;对图像数据进行第一次编码,获取编码后图像数据的第一编码质量;根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码。
其中,在处理器301根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码之前,处理器301被配置为:获取图像序列的图像质量;将图像质量确定为目标编码质量。
进一步的,在处理器301根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码时,处理器301被配置为:
若第一编码质量大于目标编码质量,则加大图像数据进行编码的量化参数;基于量化参数控制图像数据进行第二次编码。
另外,在处理器301根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码时,处理器301被配置为:
若第一编码质量小于目标编码质量,则获取图像序列的目标码率、在对图像数据进行第一次编码之前的图像序列中已编码图像数据的历史码率、编码后图像数据的第一码率以及图像数据在图像序列中的占比信息;根据目标码率、历史码率、第一码率和占比信息对图像数据的迭代编码进行控制。
具体的,在处理器301根据目标码率、历史码率、第一码率和占比信息对图像数据的迭代编码进行控制时,处理器301被配置为:
若历史码率与第一码率的和小于占比信息与目标码率的乘积,则减小图像数据进行编码的量化参数;基于量化参数控制图像数据进行第二次编码。
其中,在处理器301根据目标码率、历史码率、第一码率和占比信息对图像数据的迭代编码进行控制时,处理器301被配置为:
若历史码率与第一码率的和等于占比信息与目标码率的乘积,则控制图像数据停止编码。
进一步的,在处理器301基于量化参数控制图像数据进行第二次编码之后,处理器301被配置为:
获取编码后图像数据的第二编码质量;根据第二编码质量和目标编码质量对图像数据进行迭代编码。
其中,在处理器301根据第二编码质量和目标编码质量对图像数据进行迭代编码时,处理器301被配置为:
获取目标编码质量与第二编码质量的差值;若差值小于或等于预设的质量阈值,则控制图像数据停止编码;或者,若差值大于预设的质量阈值,则控制图像数据继续编码。
此外,在处理器301根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码时,处理器301被配置为:
若第一编码质量等于目标编码质量,则控制图像数据停止编码。
进一步的,在处理器301根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码之后,处理器301被配置为:
获取图像数据经过编码后的码流数据;将码流数据写入预设的存储设备。
本实施例中的图像的编码控制装置可用于执行上述方法中图1-7所示实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图9为本发明实施例提供的另一种图像的编码控制装置的结构示意图;参考附图9所示,本实施例提供了另一种图像的编码控制装置,该编码控制装置可以执行上述的编码控制方法,具体的,该编码控制装置可以包括:
获取模块1,用于获取一组图像序列中的一帧图像数据;
处理模块2,用于对图像数据进行第一次编码,获取编码后图像数据的第一编码质量;
编码模块3,用于根据第一编码质量和预设的目标编码质量对图像数据进行迭代编码。
本实施例中的图像的编码控制装置中的获取模块1、处理模块2和编码模块3可用于执行上述方法中图1-7所示实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
本实施例的另一方面提供了一种计算机可读存储介质,该计算机可读存储介质中存储有程序指令,程序指令用于实现上述任意一个实施例中的图像的编码控制方法。
图10为本发明实施例提供的一种无人机的结构示意图,参考附图10所示,本实施例提供了一种无人机400,包括:
机架;
上述任意一个实施例中的编码控制装置302,编码控制装置302设置于机架上。
该无人机400包括:机身、动力系统和编码控制装置302,动力系统包括如下至少一种:电机407、螺旋桨406和电子调速器417,动力系统安装在机身,用于提供飞行动力;编码控制装置302可以设置于机身上,并且该编码控制装置302的实现方式和具体原理与上述实施例的控制装置一致,此处不再赘述。
另外,无人机400还包括:传感系统408、通信系统410、支撑装置402、拍摄装置404,其中,支撑装置402具体可以是云台,通信系统410具体用于与地面的控制终端通信。
在一些实施例中,编码控制装置302具体可以是图像处理器,该图像处理器可以与拍摄装置404通讯连接,用于对拍摄装置404所拍摄的图像数据进行处理。
以上各个实施例中的技术方案、技术特征在与本相冲突的情况下均可以单独,或者进行组合,只要未超出本领域技术人员的认知范围,均属于本申请保护范围内的等同实施例。
在本发明所提供的几个实施例中,应该理解到,所揭露的相关装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接 耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得计算机处理器101(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或者光盘等各种可以存储程序代码的介质。
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (22)

  1. 一种图像的编码控制方法,其特征在于,包括:
    获取一组图像序列中的一帧图像数据;
    对所述图像数据进行第一次编码,获取编码后所述图像数据的第一编码质量;
    根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码。
  2. 根据权利要求1所述的方法,其特征在于,在根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码之前,所述方法还包括:
    获取所述图像序列的图像质量;
    将所述图像质量确定为所述目标编码质量。
  3. 根据权利要求2所述的方法,其特征在于,根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码,包括:
    若所述第一编码质量大于所述目标编码质量,则加大所述图像数据进行编码的量化参数;
    基于所述量化参数控制所述图像数据进行第二次编码。
  4. 根据权利要求2所述的方法,其特征在于,根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码,包括:
    若所述第一编码质量小于所述目标编码质量,则获取所述图像序列的目标码率、在对所述图像数据进行第一次编码之前的图像序列中已编码图像数据的历史码率、编码后所述图像数据的第一码率以及所述图像数据在所述图像序列中的占比信息;
    根据所述目标码率、历史码率、第一码率和占比信息对所述图像数据的迭代编码进行控制。
  5. 根据权利要求4所述的方法,其特征在于,根据所述目标码率、历史码率、第一码率和占比信息对所述图像数据的迭代编码进行控制,包括:
    若所述历史码率与所述第一码率的和小于所述占比信息与所述目标码率的乘积,则减小所述图像数据进行编码的量化参数;
    基于所述量化参数控制所述图像数据进行第二次编码。
  6. 根据权利要求4所述的方法,其特征在于,根据所述目标码率、历史码率、第一码率和占比信息对所述图像数据的迭代编码进行控制,包括:
    若所述历史码率与所述第一码率的和等于所述占比信息与所述目标码率的乘积,则控制所述图像数据停止编码。
  7. 根据权利要求3或5所述的方法,其特征在于,在基于所述量化参数控制所述图像数据进行第二次编码之后,所述方法还包括:
    获取编码后所述图像数据的第二编码质量;
    根据所述第二编码质量和所述目标编码质量对所述图像数据进行迭代编码。
  8. 根据权利要求7所述的方法,其特征在于,根据所述第二编码质量和所述目标编码质量对所述图像数据进行迭代编码,包括:
    获取所述目标编码质量与所述第二编码质量的差值;
    若所述差值小于或等于预设的质量阈值,则控制所述图像数据停止编码;或者,
    若所述差值大于预设的质量阈值,则控制所述图像数据继续编码。
  9. 根据权利要求2所述的方法,其特征在于,根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码,还包括:
    若所述第一编码质量等于所述目标编码质量,则控制所述图像数据停止编码。
  10. 根据权利要求1-6中任意一项所述的方法,其特征在于,在根据第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码之后,所述方法还包括,
    获取所述图像数据经过编码后的码流数据;
    将所述码流数据写入预设的存储设备。
  11. 一种图像的编码控制装置,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于运行所述存储器中存储的计算机程序以实现:获取一组图像序列中的一帧图像数据;对所述图像数据进行第一次编码,获取编码后所述图像数据的第一编码质量;根据第一编码质量和预设的目标编码质量对所 述图像数据进行迭代编码。
  12. 根据权利要求11所述的装置,其特征在于,在所述处理器根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码之前,所述处理器被配置为:
    获取所述图像序列的图像质量;
    将所述图像质量确定为所述目标编码质量。
  13. 根据权利要求12所述的装置,其特征在于,在所述处理器根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码时,所述处理器被配置为:
    若所述第一编码质量大于所述目标编码质量,则加大所述图像数据进行编码的量化参数;
    基于所述量化参数控制所述图像数据进行第二次编码。
  14. 根据权利要求12所述的装置,其特征在于,在所述处理器根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码时,所述处理器被配置为:
    若所述第一编码质量小于所述目标编码质量,则获取所述图像序列的目标码率、在对所述图像数据进行第一次编码之前的图像序列中已编码图像数据的历史码率、编码后所述图像数据的第一码率以及所述图像数据在所述图像序列中的占比信息;
    根据所述目标码率、历史码率、第一码率和占比信息对所述图像数据的迭代编码进行控制。
  15. 根据权利要求14所述的装置,其特征在于,在所述处理器根据所述目标码率、历史码率、第一码率和占比信息对所述图像数据的迭代编码进行控制时,所述处理器被配置为:
    若所述历史码率与所述第一码率的和小于所述占比信息与所述目标码率的乘积,则减小所述图像数据进行编码的量化参数;
    基于所述量化参数控制所述图像数据进行第二次编码。
  16. 根据权利要求14所述的装置,其特征在于,在所述处理器根据所述目标码率、历史码率、第一码率和占比信息对所述图像数据的迭代编码进行控制时,所述处理器被配置为:
    若所述历史码率与所述第一码率的和等于所述占比信息与所述目标码率的乘积,则控制所述图像数据停止编码。
  17. 根据权利要求13或15所述的装置,其特征在于,在所述处理器基于所述量化参数控制所述图像数据进行第二次编码之后,所述处理器被配置为:
    获取编码后所述图像数据的第二编码质量;
    根据所述第二编码质量和所述目标编码质量对所述图像数据进行迭代编码。
  18. 根据权利要求17所述的装置,其特征在于,在所述处理器根据所述第二编码质量和所述目标编码质量对所述图像数据进行迭代编码时,所述处理器被配置为:
    获取所述目标编码质量与所述第二编码质量的差值;
    若所述差值小于或等于预设的质量阈值,则控制所述图像数据停止编码;或者,
    若所述差值大于预设的质量阈值,则控制所述图像数据继续编码。
  19. 根据权利要求12所述的装置,其特征在于,在所述处理器根据所述第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码时,所述处理器被配置为:
    若所述第一编码质量等于所述目标编码质量,则控制所述图像数据停止编码。
  20. 根据权利要求11-16中任意一项所述的装置,其特征在于,在所述处理器根据第一编码质量和预设的目标编码质量对所述图像数据进行迭代编码之后,所述处理器被配置为:
    获取所述图像数据经过编码后的码流数据;
    将所述码流数据写入预设的存储设备。
  21. 一种计算机可读存储介质,其特征在于,该计算机可读存储介质中存储有程序指令,所述程序指令用于实现权利要求1-10中任意一项所述的图像的编码控制方法。
  22. 一种无人机,其特征在于,包括:
    机架;
    权利要求11-20中任意一项所述的编码控制装置,所述编码控制装置设置于所述机架上。
PCT/CN2018/096957 2018-07-25 2018-07-25 图像的编码控制方法、装置、存储介质及无人机 WO2020019180A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201880032519.4A CN112204970A (zh) 2018-07-25 2018-07-25 图像的编码控制方法、装置、存储介质及无人机
PCT/CN2018/096957 WO2020019180A1 (zh) 2018-07-25 2018-07-25 图像的编码控制方法、装置、存储介质及无人机
US17/133,399 US20210120230A1 (en) 2018-07-25 2020-12-23 Image encoding control method and apparatus, storage medium, and unmanned aerial vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/096957 WO2020019180A1 (zh) 2018-07-25 2018-07-25 图像的编码控制方法、装置、存储介质及无人机

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/133,399 Continuation US20210120230A1 (en) 2018-07-25 2020-12-23 Image encoding control method and apparatus, storage medium, and unmanned aerial vehicle

Publications (1)

Publication Number Publication Date
WO2020019180A1 true WO2020019180A1 (zh) 2020-01-30

Family

ID=69181116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096957 WO2020019180A1 (zh) 2018-07-25 2018-07-25 图像的编码控制方法、装置、存储介质及无人机

Country Status (3)

Country Link
US (1) US20210120230A1 (zh)
CN (1) CN112204970A (zh)
WO (1) WO2020019180A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113784209A (zh) * 2021-09-03 2021-12-10 上海哔哩哔哩科技有限公司 多媒体数据流处理方法及装置
CN114845119A (zh) * 2022-07-04 2022-08-02 光谷技术有限公司 一种物联网关验证及压缩系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038130B (zh) * 2021-03-17 2024-06-04 百果园技术(新加坡)有限公司 一种视频编码方法、装置、电子设备及可读存储介质
CN113132757B (zh) * 2021-04-21 2022-07-05 北京汇钧科技有限公司 数据处理方法和装置
CN116800967A (zh) * 2022-03-15 2023-09-22 华为技术有限公司 一种图像编码方法、装置及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1393109A (zh) * 2000-10-10 2003-01-22 皇家菲利浦电子有限公司 用于数字视频记录的视频比特率控制方法和设备
US20040017850A1 (en) * 2002-07-27 2004-01-29 Samsung Electronics Co., Ltd Advanced method for rate control and apparatus thereof
CN102685472A (zh) * 2011-03-08 2012-09-19 华为技术有限公司 数据传输的方法、装置和系统
US8743954B1 (en) * 2008-02-01 2014-06-03 Zenverge, Inc. Architecture for adjusting bit rate based on measured quality

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1393109A (zh) * 2000-10-10 2003-01-22 皇家菲利浦电子有限公司 用于数字视频记录的视频比特率控制方法和设备
US20040017850A1 (en) * 2002-07-27 2004-01-29 Samsung Electronics Co., Ltd Advanced method for rate control and apparatus thereof
US8743954B1 (en) * 2008-02-01 2014-06-03 Zenverge, Inc. Architecture for adjusting bit rate based on measured quality
CN102685472A (zh) * 2011-03-08 2012-09-19 华为技术有限公司 数据传输的方法、装置和系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113784209A (zh) * 2021-09-03 2021-12-10 上海哔哩哔哩科技有限公司 多媒体数据流处理方法及装置
CN113784209B (zh) * 2021-09-03 2023-11-21 上海哔哩哔哩科技有限公司 多媒体数据流处理方法及装置
CN114845119A (zh) * 2022-07-04 2022-08-02 光谷技术有限公司 一种物联网关验证及压缩系统

Also Published As

Publication number Publication date
US20210120230A1 (en) 2021-04-22
CN112204970A (zh) 2021-01-08

Similar Documents

Publication Publication Date Title
WO2020019180A1 (zh) 图像的编码控制方法、装置、存储介质及无人机
JP6019189B2 (ja) ビデオ記述長によって導かれるビデオ符号化のレート−歪み−複雑性の最適化
WO2021244341A1 (zh) 图像编码方法及装置、电子设备及计算机可读存储介质
JP6134650B2 (ja) シーンに基づく適用性のあるビットレート制御
US20120057629A1 (en) Rho-domain Metrics
WO2018113191A1 (zh) 一种码率控制方法及装置
EP3545677A1 (en) Methods and apparatuses for encoding and decoding video based on perceptual metric classification
CN111787322B (zh) 视频编码的方法、装置、电子设备及计算机可读存储介质
KR20150046655A (ko) 적응적 실시간 트랜스코딩 방법 및 이를 위한 스트리밍 서버
US11677797B2 (en) Techniques for encoding a media title while constraining quality variations
WO2022000298A1 (en) Reinforcement learning based rate control
WO2020112697A1 (en) Techniques for encoding a media title while constraining bitrate variations
WO2019001283A1 (zh) 编码分辨率控制方法及装置
US20230045884A1 (en) Rio-based video coding method and deivice
CN104125460A (zh) 用于控制视频比特率的方法和设备
Ren et al. Reinforcement learning based ROI bit allocation for gaming video coding in VVC
CN114513664B (zh) 视频帧编码方法、装置、智能终端及计算机可读存储介质
Deng et al. Complexity control of HEVC based on region-of-interest attention model
US20170127088A1 (en) Method of reducing noise of video signal
WO2024082971A1 (zh) 一种视频处理方法及相关装置
US11546597B2 (en) Block-based spatial activity measures for pictures
CN112004082B (zh) 一种双帧作为控制单元的码率控制的优化方法
US20230412807A1 (en) Bit allocation for neural network feature channel compression
US20220245449A1 (en) Method for training a single non-symmetric decoder for learning-based codecs
Duanmu Fast Screen Content Coding and Two Tier 360 Degree Video Streaming

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

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

Country of ref document: EP

Kind code of ref document: A1