WO2020220346A1 - Image processing method and apparatus - Google Patents

Image processing method and apparatus Download PDF

Info

Publication number
WO2020220346A1
WO2020220346A1 PCT/CN2019/085370 CN2019085370W WO2020220346A1 WO 2020220346 A1 WO2020220346 A1 WO 2020220346A1 CN 2019085370 W CN2019085370 W CN 2019085370W WO 2020220346 A1 WO2020220346 A1 WO 2020220346A1
Authority
WO
WIPO (PCT)
Prior art keywords
resolution
display device
super
image
target
Prior art date
Application number
PCT/CN2019/085370
Other languages
French (fr)
Chinese (zh)
Inventor
徐晨剑
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201980095791.1A priority Critical patent/CN113728354A/en
Priority to PCT/CN2019/085370 priority patent/WO2020220346A1/en
Publication of WO2020220346A1 publication Critical patent/WO2020220346A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof

Definitions

  • This application relates to the field of video technology, and in particular to an image processing method and device.
  • images and videos can be generated from low-resolution images or videos that are transmitted or stored on the network to high-resolution images or videos.
  • terminal devices generally adapt to specific super-resolution algorithms to output specific resolutions, and terminal devices may be applied to different business scenarios. Therefore, terminal devices that only output specific resolutions may not meet the requirements of multiple business scenarios.
  • the present application provides an image processing method and device to solve the problem of not being able to meet the requirements of multiple business scenarios.
  • the present application provides an image processing method including the following steps: acquiring display state information; wherein the display state information is used to characterize the display state of the display device; and the second resolution is determined according to the display state information.
  • the second resolution is the target resolution determined for the image displayed by the display device; the received source image with the first resolution is converted into the target image with the second resolution.
  • the method may be executed by an image processing device.
  • the display device may be a part of the image processing device, or two devices that are separately deployed, and the two devices are coupled.
  • the target resolution is determined according to the requirements of the display state of the display device, so that the resolution of the converted image can be adapted to different application scenarios.
  • the solutions provided in the embodiments of this application can be applied to different application scenarios, for example, the resolutions of display devices in different application scenarios are different, and the method provided in this application is adaptive based on the display state of the display device in the current application scenario. Adjust the resolution of the input image accordingly.
  • converting the received source image with the first resolution into the target image with the second resolution includes: determining according to the first resolution and the second resolution of the received source image Target magnification; performing a resolution conversion operation on the source image with the first resolution according to the target magnification to obtain a target image with a second resolution, and the second resolution is obtained by enlarging the target magnification of the first resolution.
  • performing a resolution conversion operation on the source image with the first resolution according to the target magnification includes: selecting the first super-resolution algorithm in the super-resolution algorithm set according to the target magnification, and adopting the first super-resolution algorithm.
  • the super-resolution algorithm converts the source image with the first resolution into the target image with the second resolution.
  • the first super-resolution algorithm is the magnification in the super-resolution algorithm whose concentration is less than or equal to the target magnification.
  • the largest super-resolution algorithm; among them, the super-resolution algorithm sets a variety of super-resolution algorithms including the first super-resolution algorithm, one super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to magnification different.
  • the super-resolution algorithm can be adaptively selected according to the actual needs in the application scenario, so that the image processing device can be applied to different scenarios. Since the existing terminal adapts to a specific super-resolution algorithm to output a specific resolution, if it is changed to another hardware platform, the resolution algorithm needs to be reconfigured to meet the requirements of the hardware platform.
  • the solution provided by the embodiment of this application can reduce Integration workload of different hardware platforms.
  • converting the received source image with the first resolution into the target image with the second resolution includes: performing M resolutions on the source image with the first resolution according to the target magnification
  • the conversion operation obtains a target image with a second resolution, where M is an integer greater than 0; among them, in the M resolution conversion operations, the magnification product of the super-resolution algorithm used in the M resolution conversion is equal to the target magnification;
  • the image obtained by the i resolution conversion operation is the input of the i+1 resolution conversion operation, and i+1 is an integer less than or M and greater than 1.
  • one or more super-resolution algorithms are integrated in the image processing device, and the super-resolution algorithm and the number of executions can be adaptively selected according to the actual needs in the application scenario, so that the image processing device can be applied to different Scene.
  • the display status information includes at least one of the resolution of the display device, the interface type of the display device, or the size of the display device.
  • determining the second resolution according to the display status information includes: determining the resolution of the display device as the second resolution; or, combining the highest resolution supported by the interface type of the display device with the display device
  • the minimum of the resolutions of the display device is determined to be the second resolution; or, the minimum of the highest resolution supported by the size of the display device and the resolution of the display device is determined to be the second resolution; or
  • the minimum value among the highest resolution supported by the size, the highest resolution supported by the interface type of the display device, and the resolution of the display device is determined as the second resolution.
  • it further includes: acquiring stream status information, which is used to characterize the stream status of the video stream to which the source image belongs; and determining the second resolution according to the display status information, and the second resolution meets the requirements of the display device
  • the requirements for the display status include: determining the second resolution according to the stream status information and the display status information, and the second resolution meets the requirements of the stream status of the image stream and the requirements of the display status of the display device.
  • the determination conditions for determining the target resolution are increased or decreased, which not only improves the accuracy of the determined target resolution, but also further increases the applicable scenarios.
  • the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
  • the maximum resolution supported by each parameter included in the display status information and the maximum resolution supported by each parameter included in the stream status information may be combined
  • the minimum value in is used as the second resolution.
  • the method further includes: in the process of performing a resolution conversion operation on the source image with the first resolution according to the target magnification, acquiring resource operating status information; and determining that the resource operating status information meets a preset condition , Continue to perform the resolution conversion operation on the source image with the first resolution according to the target magnification.
  • the resource running status information indicates the running status of the resource on the image processing device for performing the resolution conversion operation.
  • it further includes: when it is determined that the resource operating state information does not meet the preset condition, the target magnification is reduced to obtain the second target magnification, and the source image with the first resolution is determined according to the reduced second target magnification.
  • the resolution conversion operation is performed to obtain a second target image with a third resolution, and the third resolution is obtained by enlarging the second target magnification of the first resolution.
  • the resolution is further adjusted based on the resource operation of the image processing device in the process of performing the resolution conversion operation, so as to improve the accuracy of the determined target resolution and improve the adaptability to the current application environment.
  • the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
  • an embodiment of the present application provides an image processing device that can implement the method provided in the first aspect and any one of the possible designs of the first aspect.
  • the function can be realized by hardware, or by hardware executing corresponding software, or by a combination of software and hardware.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • An image processing device may include a state monitoring module and a super-resolution conversion module; wherein the state monitoring module is used to obtain display state information; wherein the display state information is used to characterize the display state of the display device
  • the super-resolution conversion module is used to determine the second resolution according to the display status information, the second resolution meets the requirements of the display status of the display device, and the second resolution is the target resolution determined for the image displayed by the display device;
  • the received source image with the first resolution is converted into the target image with the second resolution.
  • the super-resolution conversion module is specifically used to: according to the received source image of the received source image when converting the received source image with the first resolution into the target image with the second resolution
  • the first resolution and the second resolution determine the target magnification; according to the target magnification, the resolution conversion operation is performed on the source image with the first resolution to obtain the target image with the second resolution, and the second resolution is the first resolution Magnified target magnification is obtained.
  • the super-resolution conversion module when performing a resolution conversion operation on the source image with the first resolution according to the target magnification, is specifically used to: select the second in the super-resolution algorithm set according to the target magnification.
  • a super-resolution algorithm, and the first super-resolution algorithm is used to convert the source image with the first resolution into the target image with the second resolution.
  • the first super-resolution algorithm is the super-resolution algorithm.
  • the concentration ratio is less than or equal to The super-resolution algorithm with the largest magnification among the super-resolution algorithms of the target magnification; among them, the super-resolution algorithm concentrates on multiple super-resolution algorithms including the first super-resolution algorithm, and one super-resolution algorithm corresponds to one magnification , Different super-resolution algorithms correspond to different magnifications.
  • the super-resolution conversion module when converting the received source image with the first resolution into the target image with the second resolution, is specifically used to:
  • the source image of the resolution performs M resolution conversion operations to obtain the target image with the second resolution.
  • N is an integer greater than
  • M is an integer greater than 0.
  • M resolutions The magnification product of the super-resolution algorithm used in the rate conversion is equal to the target magnification; the image obtained by the i-th resolution conversion operation is the input of the i+1-th resolution conversion operation, i+1 is less than or M and greater than 1 Integer.
  • the display status information includes at least one of the resolution of the display device, the interface type of the display device, or the size of the display device.
  • the super-resolution conversion module when determining the second resolution according to the display status information, is specifically used to: determine the resolution of the display device as the second resolution; or, set the interface of the display device The minimum of the highest resolution supported by the type and the resolution of the display device is determined as the second resolution; alternatively, the minimum of the highest resolution supported by the size of the display device and the resolution of the display device is determined as the second resolution Two resolutions; or, the minimum of the highest resolution supported by the size of the display device, the highest resolution supported by the interface type of the display device, and the resolution of the display device is determined as the second resolution.
  • the status monitoring module is also used to obtain stream status information, which is used to characterize the stream status of the video stream to which the source image belongs;
  • the super-resolution conversion module determines the second Resolution, when the second resolution meets the requirements of the display status of the display device, it is specifically used to: determine the second resolution according to the stream status information and the display status information, and the second resolution meets the requirements of the stream status of the image stream and the display Requirements for the display status of the equipment.
  • the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
  • the status monitoring module is also used to obtain resource operating status information during the process of the super-resolution conversion module performing resolution conversion operations on the source image with the first resolution according to the target magnification.
  • the status information indicates the operating status of the resource on the image processing device used to perform the resolution conversion operation; when it is determined that the resource operating status information meets the preset condition, continue to perform the resolution conversion operation on the source image with the first resolution according to the target magnification .
  • the super-resolution conversion module is also used to reduce the target magnification to obtain the second target magnification when it is determined that the resource operating state information does not meet the preset condition, and the second target magnification is obtained according to the reduced second target magnification.
  • a source image of one resolution performs a resolution conversion operation to obtain a second target image with a third resolution, and the third resolution is obtained by enlarging the first resolution by the second target magnification.
  • the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
  • an embodiment of the present application provides an image processing method, including: a set-top box receives a source image, the source image has a first resolution; the set-top box acquires status information; wherein, the status information includes The display status information of the display performance of the device, the set-top box and the display device transmit image data through a transmission interface; the set-top box determines the first target of magnification for the source image according to the status information and the first resolution Magnification; the set-top box selects at least one super-resolution conversion algorithm according to the first target magnification to enlarge the source image at the first target magnification to obtain a target image with a second resolution, wherein the second The resolution of the target image is adapted to the display performance of the display device.
  • the set-top box determines the target magnification corresponding to the super-resolution algorithm according to the acquired state information.
  • the state information includes the display state information of the display device.
  • the set-top box can determine the matching magnification.
  • the magnification is adapted to the display performance of the display after the magnification. Therefore, the set-top box can independently adapt to display devices of various display specifications.
  • the display specifications of the display device are not limited, and manual settings are not required, which greatly improves the user experience .
  • the state information further includes: stream state information used to characterize the video stream to which the source image belongs.
  • the status information further includes: resource running status information, and the resource running status information indicates the running status of the resource on the set-top box.
  • the set-top box determines the first target magnification according to the state information and the first resolution, including: the set-top box constructs the first state according to the state information and the first resolution Vector, the first state vector includes a parameter value for indicating the state information and a state quantity of the first resolution; the set-top box determines, according to the first state mapping rule, what is mapped by the first state vector The first target magnification.
  • the set-top box selects at least one super-resolution algorithm according to a first target magnification, and amplifies the source image at the first target magnification to obtain a target image with a second resolution, including: The set-top box selects the first super-resolution algorithm in the super-resolution algorithm set according to the first target magnification, and uses the first super-resolution algorithm to convert the source image into the target image; wherein, the first super-resolution algorithm
  • the resolution algorithm is the super-resolution algorithm with the largest magnification among the super-resolution algorithms whose magnification is less than or equal to the first target magnification; the super-resolution algorithm set includes the first super-resolution algorithm
  • the super-resolution algorithm set includes the first super-resolution algorithm
  • the set-top box selects at least one super-resolution algorithm according to a first target magnification, and amplifies the source image at the first target magnification to obtain a target image with a second resolution, including:
  • the set-top box performs M resolution conversion operations on the source image with the first resolution according to the first target magnification to obtain the target image with the second resolution, where M is an integer greater than 0; where In the M resolution conversion operations, the magnification product of the super-resolution algorithm used in the M resolution conversion is equal to the first target magnification; the image obtained by the i-th resolution conversion operation is the i+1th The input of the resolution conversion operation, i+1 is an integer less than or M and greater than 1.
  • the display state information includes at least one of the resolution of the display device, the transmission interface type of the display device, or the size of the display device.
  • the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
  • the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
  • determining the first target magnification for the source image according to the status information and the first resolution includes: determining the second resolution according to the status information, and according to The first resolution and the second resolution determine the first target magnification.
  • the minimum value among the maximum resolutions supported under each parameter included in the status information may be used as the second resolution.
  • the second resolution is the resolution of the display device.
  • the second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device; or,
  • the second resolution is the minimum of the highest resolution supported by the size of the display device and the resolution of the display device; or,
  • the second resolution is the smallest value among the highest resolution supported by the size of the display device, the highest resolution supported by the interface type of the display device, and the resolution of the display device; or,
  • the second resolution is the highest resolution supported by the interface type of the display device under the frame rate of the video stream.
  • the second resolution is the minimum of the highest resolution supported by the interface type of the display device and the resolution of the display device at the frame rate of the video stream; or,
  • the second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the maximum resolution of the display device when the frame rate of the video stream is used.
  • the minimum value in resolution or,
  • the second resolution is the highest resolution supported by the interface type of the display device when the format of the image stream is adopted; or,
  • the second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device when the format of the image stream is adopted; or,
  • the second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the resolution of the display device when the format of the image stream is adopted.
  • the second resolution is the highest resolution supported by the interface type of the display device when the frame rate of the video stream and the format of the image stream are adopted.
  • the method further includes: the set-top box uses the at least one resolution conversion algorithm to perform an operation of enlarging the first target magnification on the source image, acquiring the resource running status Information; when the set-top box determines that the resource operating state information meets a preset condition, it continues to perform a magnification operation of the first target magnification on the source image according to the first target magnification.
  • it also includes:
  • the first target magnification is reduced to obtain a second target magnification, and the source image is enlarged according to the reduced second target magnification to obtain a A three-resolution second target image, where the third resolution is obtained by enlarging the second target magnification of the first resolution.
  • an image processing device which is applied to a set-top box, and includes:
  • a transmission interface for receiving a source image, the source image having a first resolution
  • a status monitoring module configured to obtain status information, the status information including display status information used to characterize the display performance of the display device, and the set-top box and the display device transmit image data through the transmission interface;
  • the display state information is used to characterize the display state of the display device
  • the super-resolution conversion module is configured to receive a source image and determine a first target magnification for the source image according to the state information and the first resolution; the first target magnification selects at least one super-resolution
  • the rate conversion algorithm enlarges the source image at the first target magnification to obtain a target image with a second resolution, wherein the target image with the second resolution is compatible with the display performance of the display device.
  • the transmission interface may include a transmission interface and a reception interface.
  • the transmission interface is used for transmitting image data to the display device, and the receiving interface is used for receiving the source image.
  • the function of the transmission interface may be implemented by the sending unit and the receiving unit.
  • the sending unit is used for sending image data to the display device
  • the receiving unit is used for receiving the source image.
  • the state information further includes: stream state information used to characterize the video stream to which the source image belongs.
  • the status information further includes: resource running status information, and the resource running status information indicates the running status of the resource on the set-top box.
  • the resources can be hardware resources or software resources.
  • the super-resolution conversion module is specifically used for:
  • the state mapping rule determines the first target magnification to which the first state vector is mapped.
  • the super-resolution conversion module selects at least one super-resolution algorithm according to the first target magnification, and enlarges the source image to the first target magnification to obtain a second resolution
  • the target image is specifically used to: select the first super-resolution algorithm in the super-resolution algorithm set according to the first target magnification, and use the first super-resolution algorithm to convert the source image into the target image; wherein ,
  • the first super-resolution algorithm is a super-resolution algorithm with the largest magnification among super-resolution algorithms with a set magnification of less than or equal to the first target magnification; the set of super-resolution algorithms includes the first There are multiple super-resolution algorithms including one super-resolution algorithm.
  • One super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to different magnifications.
  • the super-resolution conversion module selects at least one super-resolution algorithm according to the first target magnification, and enlarges the source image at the first target magnification to obtain a target image with a second resolution
  • M is greater than 0
  • the magnification product of the super-resolution algorithm used in the M resolution conversion is equal to the first target magnification
  • the image obtained by the i-th resolution conversion operation is the first
  • the input of i+1 resolution conversion operations, i+1 is an integer less than or M and greater than 1.
  • the display state information includes at least one of the resolution of the display device, the transmission interface type of the display device, or the size of the display device.
  • the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
  • the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
  • the super-resolution conversion module is specifically configured to determine the first target magnification for the source image according to the state information and the first resolution.
  • the second resolution, and the first target magnification is determined according to the first resolution and the second resolution; wherein the second resolution is the resolution of the display device; or,
  • the second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device; or,
  • the second resolution is the minimum of the highest resolution supported by the size of the display device and the resolution of the display device; or,
  • the second resolution is the smallest value among the highest resolution supported by the size of the display device, the highest resolution supported by the interface type of the display device, and the resolution of the display device; or,
  • the second resolution is the highest resolution supported by the interface type of the display device under the frame rate of the video stream.
  • the second resolution is the minimum of the highest resolution supported by the interface type of the display device and the resolution of the display device at the frame rate of the video stream; or,
  • the second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the maximum resolution of the display device when the frame rate of the video stream is used.
  • the minimum value in resolution or,
  • the second resolution is the highest resolution supported by the interface type of the display device when the format of the image stream is adopted; or,
  • the second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device when the format of the image stream is adopted; or,
  • the second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the resolution of the display device when the format of the image stream is adopted.
  • the second resolution is the highest resolution supported by the interface type of the display device when the frame rate of the video stream and the format of the image stream are adopted.
  • the super-resolution conversion module is further configured to obtain the resource running status during the process of performing the operation of zooming in the first target magnification on the source image by using the at least one resolution conversion algorithm Information; when it is determined that the resource operating state information meets a preset condition, continue to perform an operation of magnifying the first target magnification on the source image according to the first target magnification.
  • the super-resolution conversion module is also used to reduce the first target magnification to obtain the second target magnification when it is determined that the resource operating state information does not meet the preset condition, and according to the reduced all
  • the second target magnification performs an enlargement operation on the source image to obtain a second target image with a third resolution, where the third resolution is obtained by enlarging the second target magnification by the first resolution.
  • an embodiment of the present application provides an image processing device, which includes a processor that invokes instructions in the memory to implement any of the method embodiments and method embodiments of the first or third aspect described above.
  • the functions involved in a possible design are included in a possible design.
  • the image processing apparatus may further include a transmission interface through which the processor receives or transmits image data.
  • the transmission interface may include a transmission interface and a reception interface, the transmission interface is used to transmit image data to the display device, and the reception interface is used to receive the source image.
  • the embodiments of the present application provide a computer program product, including a computer program.
  • the computer program When the computer program is executed on a computer or processor, it will enable the computer or processor to implement the first aspect or the third method described above.
  • the embodiments of the present application provide a computer-readable storage medium for storing programs and instructions.
  • the computer can execute the above-mentioned first or third aspects. The functions involved in the method embodiment and any possible design of the method embodiment are described.
  • the embodiments of the present application provide a chip system, which includes a processor and may also include a memory, for implementing the functions involved in the above method.
  • the chip system can be composed of chips, or can include chips and other discrete devices.
  • FIG. 1A is a schematic structural diagram of an image processing system 100 provided by an embodiment of this application.
  • FIG. 1B is a schematic structural diagram of another image processing system 100 provided by an embodiment of this application.
  • FIG. 2 is a schematic structural diagram of an image processing device 102 provided by an embodiment of the application.
  • FIG. 3 is a flowchart of an image processing method provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of a controlled super-resolution algorithm provided by an embodiment of the application.
  • FIG. 5 is a schematic structural diagram of another image processing apparatus 102 provided by an embodiment of this application.
  • FIG. 6 is a schematic diagram of an image processing method provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of status monitoring information provided by an embodiment of this application.
  • FIG. 8A is a schematic diagram of another image processing apparatus 102 provided by an embodiment of the application.
  • FIG. 8B is a schematic diagram of another image processing apparatus 102 provided by an embodiment of the application.
  • FIG. 8C is a schematic diagram of another image processing apparatus 102 provided by an embodiment of the application.
  • At least one refers to one, or more than one, that includes one, two, three and more; “multiple” refers to two, or more than two, that includes two, Three and more.
  • words such as “first” and “second” are only used for the purpose of distinguishing description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating Or imply the order.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
  • At least one item (a) or similar expressions refers to any combination of these items, including any combination of a single item (a) or plural items (a).
  • at least one item (a) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple .
  • Resolution is a parameter used to measure the amount of data in an image. It is usually expressed as ppi (Pixel per inch).
  • ppi Pixel per inch
  • the 320*180 of the video refers to the effective pixels in the horizontal and vertical directions. The window is small. The ppi value is higher and it looks clearer.
  • Super-resolution technology refers to the use of one or more low-resolution images to obtain a high-resolution image by means of hardware or software, thereby increasing the resolution of the original input image.
  • Super-resolution algorithms are divided into generalized super-resolution algorithms and narrowly-defined super-resolution algorithms.
  • the generalized super-resolution is an image resolution magnification algorithm, and the narrow one generally refers to an image quality enhancement method using machine learning methods.
  • the difference between the super-resolution algorithm and the traditional image magnification algorithm is that the traditional image magnification algorithm is manually designed, which is a fixed method and has a lower computational consumption; the super-resolution algorithm is based on deep learning or machine learning, and requires a training process and complex processing. , The calculation consumes a lot, and the performance requirements of the processor are higher.
  • Super-resolution algorithms include many types, such as BiCubic, and super-resolution algorithms based on deep learning, for example, Super-Resolution Convolutional Neural Network (SRCNN), Another example is the super-resolution algorithm (hisilicon super-resolution, HiSR) of the mobile terminal, and the super-resolution algorithm based on dictionary training.
  • SRCNN Super-Resolution Convolutional Neural Network
  • HiSR super-resolution Convolutional Neural Network
  • the embodiments of this application do not specifically limit the super-resolution algorithm, and all existing super-resolution algorithms are applicable to this application.
  • Magnification refers to the multiple by which the resolution is enlarged.
  • the input resolution name is 1080P
  • the foreign letter P means progressive scan
  • the output resolution name is 2K, which generally refers to a display device or content with a horizontal resolution of about 2000 pixels
  • the resolution ratio is 2. Enlarge the input resolution by 2 times to get the output resolution.
  • different resolution names may correspond to different resolutions.
  • a resolution name may correspond to only one resolution.
  • the same resolution name can correspond to different resolutions.
  • the resolution name is 2K
  • the common resolution corresponding to 2K is 2560 ⁇ 1440
  • magnification factor involved in the embodiments of the present application is not absolutely equal to the ratio of the output resolution to the input resolution, but is approximately equal to the ratio of the output resolution to the input resolution. For example, if the ratio of output resolution to input resolution is equal to 3.5, the resolution magnification is equal to the largest integer less than 3.5, which is 3 times.
  • the embodiments of the application provide an image processing method and device.
  • the resolution of the received image is adjusted according to the state control information of the image processing system, and the state control information of the image processing system in different application scenarios Different, therefore, based on the method of adjusting the resolution through the state control information provided by the embodiment of the present application, the resolution requirement in the business scenario can be met.
  • the image processing system 100 provided by the embodiment of the present application may include a signal source 101 and the image processing apparatus 102 provided by the embodiment of the present application.
  • the signal source 101 is the source of processing content of the image processing device 102, which may be a picture or a video frame.
  • the image source can be the network, mobile storage media, camera, camera equipment, etc.
  • the image processing device 102 is configured to process the image from the signal source 101 according to the image processing method provided in the embodiment of the present application.
  • the image processing device 102 as shown in FIG. 1A may have a display function, and the image processing system 100 provided by the embodiment of the present application may also display images that have undergone image processing.
  • the image is output to a display device.
  • the image processing device 102 may be a display device such as a television or a display with image processing functions.
  • the system 100 further includes a display device 103, where the display device 103 may be a device with a display function, such as a television, The display may also be a display screen, a projector, etc.
  • the display device 103 is used for receiving the image transmitted by the image processing device 102 and displaying the received image.
  • the image processing apparatus 102 here may be a playback device, such as a set-top box.
  • the image processing device 102 provided by the embodiment of the present application may have a structure as shown in FIG. 2. It can be seen that the image processing device 102 may include a processing unit 201, and the processing unit 201 may be used to implement the The steps involved in the image processing method, the specific image processing method provided in the embodiment of the present application will be described in detail later, and the description will not be repeated here.
  • the processing unit 201 may include one or more of the following: a central processing unit (CPU), or other general-purpose processors, image signal processors (image signal processors, ISP), microprocessors, and digital signal processing Digital signal processor (DSP), application specific integrated circuit (ASIC), graphics processing unit (GPU), neural-network processing unit (NPU), field programmable gate Array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the CPU may be a single-CPU processor or a multi-CPU processor; optionally, the CPU may be a processor group composed of multiple processors, between multiple processors Coupled to each other through one or more buses.
  • the image processing device 102 may further include a storage unit 202, which may be used to store computer program instructions, including an operating system (Operation System, OS), various user applications, and program codes for executing the solutions of the present application.
  • the memory can also be used to store video data, image data, etc.; the CPU can be used to execute the computer program code stored in the memory to implement the methods in the embodiments of the present application.
  • the storage unit 202 can be coupled with the processing unit 201 to support the processing unit 201 to call computer programs and instructions in the storage unit 202 to implement the steps involved in the image processing method provided in the embodiments of the present application.
  • the storage unit 202 can also use For storing data.
  • coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices.
  • the memory can be coupled through various interfaces, transmission lines or buses.
  • the memory may be a non-power-down volatile memory, such as an embedded multi-media card (EMMC), universal flash storage (UFS), or read-only memory, ROM), or other types of static storage devices that can store static information and instructions, or volatile memory (volatile memory) such as random access memory (RAM) or can store information and
  • volatile memory volatile memory (volatile memory) such as random access memory (RAM) or can store information and
  • RAM random access memory
  • Other types of dynamic storage devices for instructions can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical discs Storage, optical disc storage (including compact discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store program codes in the form
  • the image processing device 102 may further include a sending unit 203 and/or a receiving unit 204, where the sending unit 203 may be used to output processed images, and the receiving unit 204 may receive images from the signal source 101.
  • the sending unit 203 and/or the receiving unit 204 may be an image output interface, such as a high definition multimedia interface (HDMI), a video graphics array (VGA), and a digital video interface (digital video interface).
  • the image processing apparatus 102 may further include a display unit 205, such as a display screen or a display panel, for displaying the image processed by the processing unit 201.
  • a display unit 205 such as a display screen or a display panel, for displaying the image processed by the processing unit 201.
  • the image processing device 102 may further include a video decoding unit 206 for decoding an image from the signal source 101, so that the processing unit 201 processes the image decoded by the video decoding unit 206.
  • a video decoding unit 206 for decoding an image from the signal source 101, so that the processing unit 201 processes the image decoded by the video decoding unit 206.
  • the image processing device 102 may also include a dedicated video or graphics processor, a microprocessor, and a microcontroller MCU, etc.
  • the dedicated video/graphics processor may be a dedicated ISP.
  • the following describes an image processing method provided by an embodiment of the present application with reference to FIG. 3.
  • the method may be executed by an image processing device, for example, by the image processing device 102.
  • the method includes the following steps:
  • the image processing apparatus receives a source image, where the source image has a first resolution.
  • the image processing apparatus obtains status information.
  • the state information includes display state information used to characterize the display performance of the display device, and the display device and the image processing device are coupled through a transmission interface to transmit image data.
  • the display device may be located inside the image processing device or outside the image processing device.
  • the image processing apparatus may be applied to a set-top box, for example, it may be a processor or a processing chip disposed inside the set-top box.
  • the display device may be a television.
  • the order of receiving the source image and obtaining the display state information is not specifically limited in this application.
  • the display state information may be obtained before the receiving source image, or the display state information may be obtained after the source image is received, or after the source image is received.
  • the operation of acquiring the display status information is performed during the process of the source image, which is not specifically limited in this application.
  • the image processing apparatus determines a first target magnification for the source image according to the state information and the first resolution.
  • the target image obtained by enlarging the source image at the first target magnification can be adapted to the display performance of the display device.
  • the resolution of the target image obtained by enlarging the first target magnification is the second resolution.
  • the image processing device determines the first target magnification for the source image according to the status information and the first resolution, it may first determine the second resolution of the target image according to the status information, and then determine the second resolution of the target image according to the first resolution and the first resolution.
  • the second resolution determines the first target magnification.
  • S304 Select at least one super-resolution conversion algorithm according to the first target magnification to enlarge the source image at the first target magnification to obtain a target image with a second resolution.
  • the target image of the second resolution satisfies the requirement of the state information.
  • the target image with the second resolution is adapted to the display performance of the display device.
  • the information in the state may include: display state information, flow state information, or resource operation state information.
  • the display status information may include one or more of the resolution of the display device, the interface type of the display device, or the size of the display device.
  • the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
  • the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
  • the display status information includes the resolution of the display device, and in performing S302, the image processing device may determine the resolution of the display device as the second resolution.
  • the display status information includes the interface type of the display device, and in performing S302, the image processing device may determine the highest resolution supported by the interface type of the display device as the second resolution.
  • the interface types of the display device may include multiple types, such as VGA, DVI, HDMI, or DP.
  • the resolution name of the highest resolution supported by VGA is 1080P.
  • the resolution name of 1080P is 1920 ⁇ 1080.
  • 1920 ⁇ 1080 can be configured as the second resolution.
  • the resolution that meets a certain resolution name, such as 1920 ⁇ 1080, meets 1080P is called 1080P resolution.
  • DVI generally supports the resolution name of the highest resolution 1080P, and when the interface type of the display device is VGA, 1920 ⁇ 1080 can be configured as the second resolution.
  • HDMI includes multiple transmission protocol versions.
  • the highest resolution supported by HDMI 1.0, HDMI 1.1, and HDMI 1.2 are all 1600 ⁇ 1200, and the highest resolution supported by HDMI 1.3 is 2048 ⁇ 1536.
  • the name of the corresponding resolution is 2K
  • the highest resolution supported by HDMI 1.4 is 4096 ⁇ 2160
  • the corresponding resolution name can be 4K
  • the highest resolution supported by HDMI 2.0 is 4096 ⁇ 2160
  • the corresponding resolution name can be 4K.
  • the same resolution name can correspond to multiple resolutions, such as 2K resolution, which generally refers to a display device or content with a horizontal resolution of about 2000 pixels.
  • the common resolution corresponding to 2K is 2560 ⁇ 1440, and there are derivative resolutions, such as 2048 ⁇ 1536, 1998 ⁇ 1080, 2048 ⁇ 858, etc.
  • 4K the common resolution is 4096 ⁇ 2160, and there are derivative resolutions, such as 4096 ⁇ 3112, 3656 ⁇ 2664, and 3840 ⁇ 2160.
  • the display device can generally be configured with a specific resolution.
  • the display device may also be configured with only the resolution name, or the corresponding relationship between the resolution name and the resolution.
  • the transmission protocol version is determined to be effective.
  • the HDMI standard is backward compatible.
  • DP generally supports the highest resolution resolution name is 4K.
  • the image processing device may determine the highest resolution supported by the size of the display device as the second resolution. Therefore, the output image of the second resolution can meet the size requirement of the display device in the state vector. At this time, the second resolution image is adapted to the display device.
  • the image processing device may compare the highest resolution supported by the interface type of the display device with the interface type of the display device.
  • the minimum value among the resolutions is determined as the second resolution. Therefore, the output image of the second resolution can meet the requirements of the size of the display device and the resolution of the display device in the state vector. At this time, the second resolution image is adapted to the display device.
  • the interface type of the display device is HDMI 2.0
  • the highest resolution supported is 4096 ⁇ 2160
  • the resolution of the display device is 2048 ⁇ 1080
  • the image processing device compares the highest resolution supported by the size of the display device with the resolution of the display device. The minimum value of is determined as the second resolution.
  • the image processing device can set the highest resolution supported by the size of the display device The minimum value among the highest resolution supported by the interface type of the display device and the resolution of the display device is determined as the second resolution.
  • the target resolution (second resolution) based on the display status information of the display device (such as the resolution, size, or interface type of the display device)
  • select the resolution that the display device can support as the target resolution such as When the resolution is higher, the output image with higher resolution is output, which improves the user experience.
  • the resolution of the display device is lower, the output resolution is limited, and the performance requirements and power consumption of super-resolution algorithm execution are reduced.
  • the resolution of the display device is high and the size and interface type are sufficient to support the resolution, then the output image with the higher resolution will be output.
  • the resolution of the display device is low, but the size and interface type are not enough to support the resolution. At the resolution, the output resolution is limited, and the performance requirements and power consumption of the super-resolution algorithm are reduced.
  • the set-top box selects at least one super-resolution conversion algorithm according to the first target magnification to enlarge the source image at the first target magnification to obtain a target image with a second resolution.
  • the embodiments of the present application may also be suitable for reducing the resolution of an image, that is, the second resolution may be lower than or equal to the first resolution.
  • the embodiment of the present application may be configured with a super-resolution conversion algorithm with a magnification ratio of less than 1, equal to 1, and greater than 1.
  • the first resolution is enlarged as an example, that is, the resolution of the input image is enlarged as an example.
  • F(X) AX+B.
  • the target magnification is taken as an example.
  • the image processing apparatus when it determines the first target magnification according to the state information and the first resolution, it may first construct a state vector based on the state information and the first resolution, and the state vector includes parameter values respectively used to indicate that the state information includes And the state quantity of the first resolution; and then the first target magnification mapped by the state vector is determined according to the state mapping rule.
  • the status information includes the resolution, size, and interface type of the display device.
  • the state vector can include 4 state quantities.
  • the controlled super-resolution conversion method provided in this embodiment of the application will have the first resolution.
  • the source image of the resolution is enlarged at the first target magnification to obtain the target image of the second resolution.
  • the controlled super-resolution conversion method is a super-resolution conversion method with a controllable output resolution.
  • the target magnification is used as the basis for selecting the super-resolution algorithm and the number of resolution conversions.
  • the super-resolution algorithm of the target magnification is selected to perform a resolution conversion.
  • a super-resolution algorithm can be selected.
  • the resolution algorithm performs multiple resolution conversions, and the number of executions can be determined according to the target magnification.
  • Another example is to select a super-resolution combination with a combined magnification that reaches the target magnification among the multiple super-resolution algorithm combinations configured.
  • the controlled super-resolution conversion method is exemplarily described as follows.
  • the first method uses a super-resolution algorithm set, which includes super-resolution algorithms with multiple magnifications.
  • the super-resolution algorithm includes multiple super-resolution algorithms, one super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to different magnifications.
  • the super-resolution algorithm set includes ⁇ 2 super-resolution algorithm, ⁇ 3 super-resolution algorithm, and ⁇ 4 super-resolution algorithm.
  • the magnification may also be a non-integer, such as ⁇ 2.25 super-resolution algorithm, ⁇ 3.5 super-resolution algorithm, and ⁇ 4.25 super-resolution algorithm.
  • the image processing apparatus converts the received source image with the first resolution into the target image with the second resolution, it can be implemented in the following manner:
  • the image processing device selects the first super-resolution algorithm in the super-resolution algorithm set according to the target magnification, and uses the first super-resolution algorithm to convert the source image with the first resolution into the target image with the second resolution.
  • the super-resolution algorithm is the super-resolution algorithm with the largest magnification among the super-resolution algorithms whose magnification is less than or equal to the target magnification; among them, the super-resolution algorithm focuses on multiple types including the first super-resolution algorithm Super-resolution algorithm, a super-resolution algorithm corresponds to one magnification, and different kinds of super-resolution algorithms correspond to different magnifications.
  • the image processing device may compare the second resolution with the first resolution when determining the target magnification according to the first resolution and the second resolution.
  • the ratio of a resolution is determined as the target magnification.
  • the magnifications corresponding to the super-resolution algorithms included in the super-resolution algorithm set may also be integers.
  • the ratio of the second resolution to the first resolution may be rounded down to determine the target magnification. For example, if the ratio of the second resolution to the first resolution is 3.5, the rounded down value is 3, and the target magnification is 3.
  • the first super-resolution algorithm is selected in the super-resolution algorithm set, the first super-resolution algorithm corresponding to the target magnification can be selected.
  • the ratio of the second resolution to the first resolution is an integer, in this case, the ratio is the target magnification.
  • the second method is a multi-level super-resolution conversion method.
  • This mode is a controllable conversion mode at the termination time.
  • the magnification can be the same or different each time.
  • the image processing device converts the source image with the first resolution into the target image with the second resolution, it can be implemented in the following ways:
  • the magnification product of the super-resolution algorithm used in M resolution conversion is equal to the target magnification; the image obtained by the i-th resolution conversion operation is the i+1
  • the input of the sub-resolution conversion operation, i+1 is an integer less than or equal to M and greater than 1.
  • the super-resolution algorithm used may be different or the same.
  • the same super-resolution algorithm is executed cyclically, that is, when the super-resolution algorithm is executed multiple times, the magnification is the same each time.
  • N the image A super-resolution algorithm
  • M the multi-level super-resolution conversion method can support the target magnification of ⁇ 2, ⁇ 4, ⁇ 8, ... ,As shown in Figure 4.
  • the target condition may be a target resolution or a target magnification or a target number of times.
  • the ratio of the target magnification to the magnification of the super-resolution algorithm is the target times.
  • the image processing device uses a super-resolution algorithm to perform resolution conversion on the source image with the first resolution as the input image, and counts the number of resolution conversion operations, and determines whether the counting result reaches the target number of times, if the counting result is less than the target.
  • the resolution conversion is performed using the super-resolution algorithm as the input image until the count result reaches the target number of times. When the count result reaches the target number of times, the image obtained by the resolution conversion is The target image.
  • the target resolution is 1280 ⁇ 720
  • the second resolution is 2560 ⁇ 1440
  • the magnification of the first super-resolution algorithm adopted is ⁇ 2
  • the first resolution image is converted using the first super-resolution algorithm
  • the resolution obtained does not meet the second resolution
  • the first super-resolution algorithm is used to perform a resolution conversion to obtain the resolution It is 2560 ⁇ 1440, which meets the second resolution, and stops execution.
  • the image obtained by the second resolution conversion is the target image with the second resolution.
  • each super-resolution algorithm corresponds to a magnification
  • different super-resolution algorithms have different magnifications.
  • the magnification may be different or the same.
  • the target magnification can be used as a condition, and the combined super-resolution algorithm can be selected from multiple super-resolution algorithms.
  • the combined super-resolution algorithm can include one-rate super-resolution algorithm or multiple-rate super-resolution Rate algorithm.
  • the magnification of the combined super-resolution algorithm is equal to the target magnification.
  • the magnification of the combined super-resolution algorithm is the product of the magnifications of each super-resolution algorithm included in the combination.
  • the multiple super-resolution algorithms include ⁇ 2 super-resolution algorithms and ⁇ 3 super-resolution algorithms.
  • the combined super-resolution algorithm includes two ⁇ 2 super-resolution algorithms, and the two ⁇ 2 super-resolution algorithms are the same.
  • the target magnification is ⁇ 6
  • the combined super-resolution algorithm includes ⁇ 2 super-resolution algorithm and ⁇ 3 super-resolution algorithm.
  • the target magnification is ⁇ 9
  • the combined super-resolution algorithm includes 3 ⁇ 3 super-resolution algorithms, and these 3 ⁇ 3 super-resolution algorithms are the same.
  • conditions such as the difference between the magnification of the super-resolution algorithm and the target magnification can be used as the cost to pass the cost function, and then the optimal combination can be searched.
  • a combination strategy table corresponding to different magnifications may be configured in advance, for example, see Table 1.
  • the second resolution when determining the second resolution (target resolution), it can be determined not only based on the display state of the display device, but also based on the stream state of the video stream, that is, in the state information It can also include stream status information of the video stream.
  • the image processing device can also acquire stream status information while acquiring display status information.
  • the stream status information is used to characterize the stream status of the video stream to which the source image with the first resolution belongs; for example, the image processing apparatus may first determine the second resolution of the target image according to the stream status information and the display status information, and then The target magnification is determined according to the first resolution and the second resolution.
  • the target image of the second resolution is adapted to the streaming state of the video stream and the display performance of the display device.
  • the stream state information includes the frame rate of the video stream and/or parameters used to indicate the format of the video stream.
  • the resolution supported by the frame rate of different video streams may be different. Different video stream formats may support different resolutions.
  • HDMI HDMI 1.3 supports 1080P/120FPS (frames per second)
  • HDMI 1.4 supports 4K/30FPS or 2K/60FPS
  • HDMI 2.0 supports 4K/60FPS.
  • the display status information includes the interface type of the display device
  • the stream status information includes the frame rate of the video stream.
  • the image processing device determines the second resolution according to the stream status information and the display status information, it may determine the highest resolution supported by the interface type of the display device at the frame rate of the video stream as the second resolution.
  • the second resolution is determined to be 4K resolution
  • the second resolution is determined to be 2K resolution
  • the second resolution is determined It is 1080P resolution.
  • the second resolution is determined to be 4K resolution, and for 120FPS stream, the second resolution is determined to be 2K resolution;
  • another example is display
  • the interface of the device is DP
  • the second resolution is determined to be 4K resolution
  • the second resolution is determined to be 2K resolution.
  • the code stream frame rate or code stream resolution can match the available resources of the image processing device, a certain multiple of super-resolution algorithm is implemented to increase the output resolution and improve user experience; when the code stream frame rate is too high, image processing The resources may not be enough to support the requirements of the super-resolution algorithm.
  • the target resolution can be reduced, the target magnification can be reduced, the demand for image processing resources can be reduced, and the occurrence of jams and other adverse effects can be prevented.
  • the display status information includes the interface type of the display device and the resolution of the display device
  • the stream status information includes the frame rate of the video stream.
  • the resolution of the display device is 4K resolution
  • the first resolution is 720P resolution
  • the interface of the display device is HDMI 1.4
  • the frame rate of the video stream is 60FPS
  • pre-set memory/processing resource occupancy alert determination conditions may be required, for example, the memory occupancy rate is not more than 80%, the processor occupancy is not more than 80%, or the weighted average of the two is not more than 75 %. Based on this, the embodiment of the present application can determine whether to reduce the target magnification according to the occupancy of storage resources and/or processing resources of the image processing apparatus.
  • the state information used may include one or more parameters in the display state information and the stream state information.
  • the maximum resolution supported by different parameters is different, so that the state information is
  • the second resolution the smallest resolution among the resolutions supported by the multiple parameters is taken as the second resolution.
  • the status information includes two parameters, which are the resolution of the display device and the transmission interface type, and the second resolution is the minimum value of the resolution of the display device and the resolution supported by the transmission interface type.
  • the status information includes the type and frame rate of the transmission interface. At different frame rates, the type of transmission interface supports different resolutions, so the resolution supported by the transmission interface at this frame rate can be used as the second resolution. .
  • the constructed state vector when the state information further includes flow state information, also includes a state quantity used to indicate the parameters included in the flow state information.
  • the status information includes the resolution, size, interface type, frame rate, and image stream format of the display device.
  • the state vector can include 6 state quantities.
  • the first state vector is used as the input of F(X) to obtain the first target resolution. It should be noted that the order of the state variables corresponding to the parameters in the state vector is pre-configured according to the needs of F(X).
  • the image processing device acquires the resource operating status information of the image processing device during the process of performing the resolution conversion operation on the source image with the first resolution according to the target magnification; the resource operating status information is used to indicate the image processing device The running state of the resource; when the image processing device determines that the resource running state information meets the preset condition, it continues to perform the resolution conversion operation on the source image with the first resolution according to the target magnification.
  • the image processing apparatus when determining that the resource operating state information does not meet the preset condition, reduces the target magnification to obtain the second target magnification, and performs a resolution conversion operation on the source image with the first resolution according to the second target magnification, Obtain a second target image with a third resolution at the target magnification after the resolution is enlarged and reduced, and the third resolution is the resolution obtained by enlarging the second target magnification by the first resolution.
  • the resources on the image processing apparatus may include hardware resources and/or software resources.
  • hardware resources such as processor resources and memory resources, are taken as examples.
  • the controlled super-resolution conversion mode is the first mode
  • the second resolution is determined according to the display status of the display device and/or the stream status of the video stream
  • the second resolution is determined according to the first resolution and the second resolution.
  • the super-resolution algorithm corresponding to the target magnification can be tested for a preset time.
  • the target magnification is reduced, and the reduction is selected in the super-resolution algorithm set
  • the third super-resolution algorithm corresponding to the target magnification of uses the third super-resolution algorithm to convert the source image with the first resolution into the second target image with the third resolution. For example, before the reduction, the target magnification is ⁇ 4, and the target magnification after the reduction may be ⁇ 3.
  • the controlled super-resolution conversion method is the second method
  • the algorithm is executed for the preset time, and when the resource running status information does not meet the preset conditions, the number of cycles to execute the same super-resolution algorithm can be reduced, that is, the target magnification is reduced, and the same super-resolution cycle is executed according to the reduced number of times
  • the rate algorithm converts the source image with the first resolution into the second target image with the third resolution.
  • the combined super-resolution algorithm can be executed for a preset time, and when the resource operating status information is monitored that does not meet the preset conditions, the target magnification is reduced, and the combined super-resolution algorithm is re-determined according to the reduced target magnification , And use the newly determined combined super-resolution algorithm to perform resolution conversion operations.
  • the output resolution can be reduced to reduce the demand for device resources and prevent adverse effects such as jams; Or when the memory resources meet the demand, the output resolution can be increased to enhance the user experience.
  • an embodiment of the present application provides an image processing device, which has the function of implementing the image processing method provided by any of the foregoing method embodiments.
  • This function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • An image processing device 102 provided by an embodiment of the present application may have a structure as shown in FIG. 2, wherein the processing unit 201 may be configured to execute steps S301, S302, and S303 shown in the method-side embodiment of the present application.
  • the image processing device may include a state monitoring module 501 and a super-resolution conversion module 502.
  • the state monitoring module 501 may be used to perform the steps described in the method S301 of the embodiment of the present application
  • the controlled super-resolution module 502 may be used to perform the steps described in the method S302 of the embodiment of the present application.
  • the status monitoring module 501 in the image processing device 102 can be used to monitor status control information.
  • the status control information (may be referred to as status information for short) can include the display status information of the display device. If the image to be processed belongs to the frame image in the video stream, the status control information can also include the stream status information and/or resource operation of the video stream. status information.
  • the controlled super-resolution module 502 converts the source image with the first resolution into the target image with the second resolution according to the state control information.
  • the controlled super-resolution module 502 may include a state control module 502A and a resolution conversion module 502B.
  • the state control module 502A is used to determine the target magnification according to the state control information.
  • the state control module 502A determines the second resolution according to the state control information, and determines the target magnification according to the second resolution.
  • the resolution conversion module 502B is configured to perform a resolution conversion operation on the source image with the first resolution according to the target magnification to obtain the target image with the second resolution with the resolution magnification target magnification.
  • the image processing device 102 may further include a preprocessing module 503, which is used to perform image preprocessing on the image from the signal source, and input the image preprocessed into the controlled super-resolution module 502 .
  • a preprocessing module 503 which is used to perform image preprocessing on the image from the signal source, and input the image preprocessed into the controlled super-resolution module 502 .
  • the main purpose of image preprocessing is to eliminate irrelevant information in the image, restore useful real information, enhance the detectability of related information and simplify data to the greatest extent.
  • image preprocessing can include operations such as smoothing and filtering.
  • the image processing device 102 may further include a post-processing module 504 configured to perform post-processing operations on the image output by the controlled super-resolution module 502, such as noise reduction and image enhancement.
  • the post-processing module 504 inputs the image after the post-processing operation to the display device.
  • the image pre-processing operation and post-processing operation in the embodiment of the present application can also be performed by one module, that is, the pre-processing module 503 and the post-processing module 504 can be combined into one module.
  • the functions of the state monitoring module 501, the super-resolution conversion module 502, the pre-processing module 503, and the post-processing module 504 may be implemented by the processing unit 201.
  • the state monitoring module 501, the super-resolution conversion module 502, the pre-processing module 503, and the post-processing module 504 may correspond to the processing unit 201.
  • the image of the signal source is input to the image processing device 102, it is first processed by the preprocessing module 503.
  • the state control module 502A receives The state monitoring module 501 inputs the state control vector (hereinafter referred to as the state vector), and completes the conversion mapping of the state vector to the super-resolution algorithm (referred to as the super-resolution algorithm) control quantity (may be referred to as the super-resolution control quantity); resolution conversion module 502B
  • the super-division control amount generated by the state control module 502A is controlled; the post-processing module 504 performs related image post-processing on the high-resolution image output by the super-resolution algorithm operating.
  • the over-resolution control amount hereinafter referred to as the state vector
  • FIG. 7 shows a selection scheme of the state control information acquired by the state monitoring module 501, the resource operation state information (such as processor occupancy rate, memory occupancy rate, etc.) and input source (I.e. video stream) stream status information (such as bit stream frame rate, bit stream resolution, bit stream format, etc.) and display status information of the display device (such as display device resolution, display device size, display device interface type Etc.) as the basis for super-resolution algorithm regulation.
  • the resource operation state information such as processor occupancy rate, memory occupancy rate, etc.
  • input source I.e. video stream
  • stream status information such as bit stream frame rate, bit stream resolution, bit stream format, etc.
  • display status information of the display device such as display device resolution, display device size, display device interface type Etc.
  • the super-resolution module 502 is controlled based on the state vector X and the input image (image after preprocessing) control, when performing the resolution conversion operation on the input image, the input is set low resolution image P in, P out is the output high-resolution image, X is input from the control state vector, F (X) is a state mapping function, S (P, F) as a function of the controlled super-resolution conversion corresponding manner, the input image P in low resolution and a state control amount X, the output is a high-resolution image P out , then there is
  • determining which super-resolution algorithm or several super-resolution algorithms, or how many super-resolution conversion operations are performed can be determined according to the target magnification output by F(X).
  • F(X) the state mapping function
  • S(P, F) the execution operation corresponding to the S(P, F) function
  • the controlled super-resolution conversion method adopts the first method, that is, the super-resolution algorithm set.
  • the resolution conversion module 502B can directly select which super-resolution algorithm to execute according to the output of the state control module 502A.
  • the controlled super-resolution conversion method adopts the second method, that is, the multi-level super-resolution conversion method.
  • the resolution conversion module 502B can directly determine to perform the resolution based on the output of the state control module 502A. The number of conversion operations.
  • the resolution conversion module 502B can directly select the combined super-resolution algorithm based on the output of the state control module 502A, use the target magnification as the termination condition, and update F( X), judge whether the converted magnification reaches the target magnification.
  • A1 Get the resolution Fps and frame rate Rs of the input code stream
  • the maximum output resolution Rif is determined to be 1080P; when the display device interface is DVI, the maximum output resolution Rif is determined to be 1080P; when the display device interface is HDMI1.3, the maximum output resolution is determined Resolution Rif is 1080P; for HDMI1.4, for 30FPS stream, determine the maximum output resolution Rif is 4K, for 60FPS stream, determine the maximum output resolution Rif is 2K, for 120FPS stream, determine the maximum output resolution Rif is 1080P; when it is HDMI2.0, for 60FPS (or less than 60FPS) stream, determine the maximum output resolution Rif is 4K, for 120FPS stream, determine the maximum output resolution Rif is 2K; when the interface of the display device is DP For a code stream of 60FPS (or less than 60FPS), the maximum output resolution Rif is determined to be 4K, and for a code stream of 120FPS, the maximum output resolution Rif is determined to be 2K.
  • Sraw is a non-integer
  • A4 further determining whether the target magnification needs to be updated based on the memory and/or processor occupation resource alert determination condition.
  • Step 1 Based on A3 to obtain the target magnification Sr, the image processing device 102 may try to run the super-resolution algorithm for a preset duration (for example, 1 s) without outputting to the display device.
  • a preset duration for example, 1 s
  • Step 2 Detect the memory/processor resource occupancy rate of the super-resolution algorithm implementing the target magnification Sr.
  • Step 3 After monitoring the implementation of the target magnification Sr over-dividing algorithm, determine whether to trigger the memory/processor occupation alert.
  • the size of the memory occupancy rate is used as the condition to trigger the occupancy alert. If the condition 1) is not met, the occupancy alert is triggered. For another example, when the processor occupancy rate is used as the condition for triggering the occupation alert, if the condition 2) is not met, the occupation alert is triggered. Another example is to use the processor occupancy rate and memory size as the conditions for triggering the occupancy alert. One way is to trigger the occupancy alert if conditions 1) and 2) are not met; the other way is if condition 3 is not met ), the occupation alert is triggered.
  • Step 4 If the memory/processor occupancy alert is not triggered, the current input target Sr is used as the output Sout; if the memory/processor occupancy alert is triggered, the target multiplier is reduced by one level to obtain Sr'.
  • execute step 1 test run the super-resolution algorithm of Sr' for 1 second, query the memory/processor resources required to implement the super-resolution algorithm under Sr', and query whether the memory occupation alert will be triggered. Based on step 4, the final output magnification Sout is obtained.
  • A5 Sout run using super resolution algorithm, using an input video image P in S (P in, Sout) output high-resolution video image Pout.
  • the memory/processor occupancy resources may be sampled once at a certain interval to determine whether to trigger the memory/processor occupancy alert. If it is triggered, similar to the step 4, reduce the magnification by one level, and update Sout to perform the resolution conversion operation using the updated Sout.
  • the state monitoring module 501 and the controlled super-resolution module 502 in the image processing device 102 shown in FIG. 5 can be composed of a central processing unit, a general-purpose processor, a digital signal processor, an application specific integrated circuit, and field programmable A gate array or other programmable logic devices, transistor logic devices, hardware components or any combination thereof can be implemented, which can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present application.
  • the processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on.
  • the storage module that the image processing apparatus 102 may include may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory.
  • FIG. 8A another possible structure of the image processing apparatus 102 in the embodiment of the present application includes a main processor 801, a memory 802, and a video processor 803.
  • the main processor 801 may be used to support the image processing device 102 to implement monitoring state control information and perform resolution conversion operations.
  • the main processor 801 can be used to monitor status control information, such as the method shown in step S301 that can be executed by the main processor 801, and the main processor 801 can also be used to perform target resolution determination according to the status control information. Adjust the resolution of the input image, for example, the method shown in steps S302 and S303 that can be executed by the main processor 801.
  • the main processor 801 can also perform functions other than the image processing related functions provided by the embodiments of the present application, such as receiving image signals from a signal source, decoding the image signals, and sending the decoded image signals to the video processor 803 .
  • the video processor 803 may be used to support the image processing device 102 to implement related functions of video signal processing.
  • the video processor 803 may be used to perform image preprocessing and postprocessing operations.
  • the main processor 801 may be used to implement related functions of the state monitoring module 501 and the controlled super-resolution module 502 in FIG. 5.
  • the video processor 803 may be used to implement the related functions of the preprocessing module 503 and the postprocessing module 504 in FIG. 5, as shown in 8B.
  • the memory 802 is used to support the main processor 801 and the video processor 803 to call computer programs and instructions in the memory 802 to implement the steps involved in the video processing method provided by the embodiments of the present application.
  • the memory 802 is also used to store data, such as Used to store super-resolution algorithms and related configuration parameters.
  • the memory 802 may include both volatile and non-volatile memory, such as memory and hard disk.
  • the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electronic Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • direct rambus RAM direct rambus RAM
  • the main processor 801 may be used to support the image processing device 102 to implement monitoring state control information, and the resolution conversion operation is performed by the video processor 803.
  • the main processor 801 can be used to monitor state control information, such as the method shown in step S301 that the main processor 801 can execute.
  • the main controller 801 can also perform functions other than the image processing related functions provided by the embodiments of the present application, such as receiving image signals from a signal source, decoding the image signals, and sending the decoded image signals to the video processor 803 .
  • the video processor 803 can be used to support the image processing device 102 to implement related functions of video signal processing.
  • the video processor 803 can be used to determine the target resolution according to the state control information, and adjust the resolution of the input image based on the target resolution, such as video
  • the processor 803 may execute the methods shown in steps S302 and S303.
  • the video processor 803 can also be used to perform image pre-processing and post-processing operations.
  • the main processor 801 may be used to implement related functions of the state monitoring module 501 in FIG. 5.
  • the video processor 803 can be used to implement the related functions of the controlled super-resolution module 502, the pre-processing module 503, and the post-processing module 504 in FIG. 5, as shown in 8C.
  • acquiring the processing resource occupancy rate when the image processing apparatus 102 runs the super-resolution algorithm refers to the processor occupancy rate of the video processor 803.
  • the image processing device 102 shown in FIG. 8A and FIG. 8B only exemplarily embodies the structure required by the image processing device 102 to execute the above-mentioned image processing method involved in the embodiment of the application, and the embodiment of the application does not exclude the image
  • the processing device 102 also has other structures.
  • the image processing device 102 may also include a display device for displaying high-resolution images output by the video processor 1203; for another example, the image processing device 102 may also include necessary interfaces to implement Image input and output of processed images.
  • the main processor 801 and the video processor 803 may be central processing units, general-purpose processors, digital signal processors, application specific integrated circuits, field programmable gate arrays or other programmable logic devices, transistor logic devices, hardware
  • the components or any combination thereof can implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present application.
  • the processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on.
  • all the functions of the video processor 803 can also be implemented through software using the main processor 801.
  • the image processing apparatus 102 provided in the embodiments of the present application can be applied to smart devices such as set-top boxes, televisions, mobile phones, and other display devices with resolution conversion processing functions, and image processing devices to support the above devices to realize the application.
  • the image processing method provided by the embodiment provided by the embodiment.
  • the storage resources on which the function of the controlled super-resolution module 502 depends can be distinguished from the storage resources on which the functions of other modules depend.
  • Programs and instructions for implementing the functions of the controlled super-resolution module 502 may be configured in a dedicated memory, such as dedicated memory resources and dedicated storage resources.
  • the super-resolution algorithm and configuration parameters are stored in a dedicated memory resource, and the operation of the super-resolution algorithm depends on a dedicated memory resource.
  • the occupancy rate of dedicated memory resources when acquiring the memory occupancy rate when the image processing device runs the super-resolution algorithm, what is acquired is the occupancy rate of dedicated memory resources.
  • the embodiments of the present application provide a computer program product, including a computer program.
  • the computer program When the computer program is executed on a computer, the computer will enable the computer to implement any of the above-mentioned image processing method embodiments. Function.
  • the embodiments of the present application provide a computer program, which, when executed on a computer, will enable the computer to implement the functions involved in any of the foregoing image processing method embodiments.
  • the embodiments of the present application provide a computer-readable storage medium for storing programs and instructions.
  • the computer can execute any of the above-mentioned image processing method embodiments. The functions involved in.
  • the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

Abstract

An image processing method and apparatus. For a received image, the resolution of the received image is adjusted according to state control information of an image processing system; under different application scenarios, the state control information of the image processing system is different. Therefore, the mode of adjusting the resolution according to state control information provided by the embodiments of the present application can satisfy requirements of resolution under service scenarios.

Description

一种图像处理方法及装置Image processing method and device 技术领域Technical field
本申请涉及视频技术领域,尤其涉及一种图像处理方法及装置。This application relates to the field of video technology, and in particular to an image processing method and device.
背景技术Background technique
随着人们对终端设备上高质量、高清晰度的图像、视频需求逐渐提高,出现了2K~8K的高分辨率图像、视频和显示屏幕。受在线传输带宽、功耗、性能、设备存储空间等限制,导致用户播放内容分辨率低于设备屏幕分辨率。采用超分辨率技术,可将图像、视频从网络传输或存储的低分辨率图像或视频生成高分辨率的图像或视频。As people's demand for high-quality, high-definition images and videos on terminal devices gradually increases, 2K to 8K high-resolution images, videos and display screens have emerged. Limited by online transmission bandwidth, power consumption, performance, device storage space, etc., the resolution of the content played by users is lower than the device screen resolution. Using super-resolution technology, images and videos can be generated from low-resolution images or videos that are transmitted or stored on the network to high-resolution images or videos.
目前终端设备一般适配特定的超分辨率算法输出特定的分辨率,而终端设备可能应用于不同的业务场景中,因此仅输出特定分辨率的终端设备可能无法满足多种业务场景的需求。At present, terminal devices generally adapt to specific super-resolution algorithms to output specific resolutions, and terminal devices may be applied to different business scenarios. Therefore, terminal devices that only output specific resolutions may not meet the requirements of multiple business scenarios.
发明内容Summary of the invention
本申请提供一种图像处理方法及装置,用以解决无法满足多种业务场景的需求的问题。The present application provides an image processing method and device to solve the problem of not being able to meet the requirements of multiple business scenarios.
第一方面,本申请提供一种图像处理方法,包括以下步骤:获取显示状态信息;其中,显示状态信息用于表征显示装置的显示状态;根据显示状态信息确定第二分辨率,第二分辨率满足显示装置的显示状态的需求,第二分辨率是为显示装置所显示的图像确定的目标分辨率;将接收到的具有第一分辨率的源图像转换为具有第二分辨率的目标图像。In a first aspect, the present application provides an image processing method including the following steps: acquiring display state information; wherein the display state information is used to characterize the display state of the display device; and the second resolution is determined according to the display state information. To meet the requirements of the display state of the display device, the second resolution is the target resolution determined for the image displayed by the display device; the received source image with the first resolution is converted into the target image with the second resolution.
示例性地,该方法可以由图像处理装置执行。其中显示装置可以图像处理装置中的一部分,还可以是分开部署的两个装置,两个装置之间耦合。Exemplarily, the method may be executed by an image processing device. The display device may be a part of the image processing device, or two devices that are separately deployed, and the two devices are coupled.
采用上述方法,根据显示装置的显示状态的需求来确定目标分辨率,从而转换后的图像的分辨率能够适应不同的应用场景。本申请实施例提供的方案可以应用到不同的应用场景下,比如不同的应用场景下的显示装置的分辨率不同,通过本申请提供的方法,基于当前应用场景下的显示装置的显示状态来自适应地调整输入图像的分辨率。Using the above method, the target resolution is determined according to the requirements of the display state of the display device, so that the resolution of the converted image can be adapted to different application scenarios. The solutions provided in the embodiments of this application can be applied to different application scenarios, for example, the resolutions of display devices in different application scenarios are different, and the method provided in this application is adaptive based on the display state of the display device in the current application scenario. Adjust the resolution of the input image accordingly.
在一种可能的设计中,将接收到的具有第一分辨率的源图像转换为具有第二分辨率的目标图像,包括:根据接收到的源图像的第一分辨率和第二分辨率确定目标倍率;根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作,得到具有第二分辨率的目标图像,第二分辨率为第一分辨率放大目标倍率得到。上述设计提供简单易行的转换图像分辨率的方式。In a possible design, converting the received source image with the first resolution into the target image with the second resolution includes: determining according to the first resolution and the second resolution of the received source image Target magnification; performing a resolution conversion operation on the source image with the first resolution according to the target magnification to obtain a target image with a second resolution, and the second resolution is obtained by enlarging the target magnification of the first resolution. The above design provides a simple and easy way to convert image resolution.
在一种可能的设计中,根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作,包括:在根据目标倍率在超分辨率算法集中选择第一超分辨率算法,并采用第一超分辨率算法将具有第一分辨率的源图像转换为具有第二分辨率的目标图像,第一超分辨率算法为超分辨率算法集中倍率小于或者等于目标倍率的超分辨率算法中的倍率最大的超分辨率算法;其中,超分辨率算法集中包括第一超分辨率算法在内的多种超分辨率算法,一种超分辨率算法对应一个倍率,不同的超分辨率算法对应的倍率不同。In a possible design, performing a resolution conversion operation on the source image with the first resolution according to the target magnification includes: selecting the first super-resolution algorithm in the super-resolution algorithm set according to the target magnification, and adopting the first super-resolution algorithm. The super-resolution algorithm converts the source image with the first resolution into the target image with the second resolution. The first super-resolution algorithm is the magnification in the super-resolution algorithm whose concentration is less than or equal to the target magnification. The largest super-resolution algorithm; among them, the super-resolution algorithm sets a variety of super-resolution algorithms including the first super-resolution algorithm, one super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to magnification different.
上述设计中,在图像处理装置内部集成多种超分辨率算法,可以根据应用场景中实际需求来自适应的选择超分辨率算法,进而使得该图像处理装置可以应用到不同的场景下。 由于现有终端适配特定的超分辨率算法输出特定的分辨率,从而若更换到其它硬件平台时,需要重新配置分辨率算法来满足硬件平台的需求,采用本申请实施例提供的方案可以降低不同硬件平台的集成工作量。In the above design, a variety of super-resolution algorithms are integrated inside the image processing device, and the super-resolution algorithm can be adaptively selected according to the actual needs in the application scenario, so that the image processing device can be applied to different scenarios. Since the existing terminal adapts to a specific super-resolution algorithm to output a specific resolution, if it is changed to another hardware platform, the resolution algorithm needs to be reconfigured to meet the requirements of the hardware platform. The solution provided by the embodiment of this application can reduce Integration workload of different hardware platforms.
在一种可能的设计中,将接收到的具有第一分辨率的源图像转换为具有第二分辨率的目标图像,包括:根据目标倍率对具有第一分辨率的源图像执行M次分辨率转换操作,得到具有第二分辨率的目标图像,M为大于0的整数;其中,M次分辨率转换操作中,M次分辨率转换中采用的超分辨率算法的倍率乘积等于目标倍率;第i次分辨率转换操作得到的图像为第i+1次分辨率转换操作的输入,i+1为小于或者M且大于1的整数。In a possible design, converting the received source image with the first resolution into the target image with the second resolution includes: performing M resolutions on the source image with the first resolution according to the target magnification The conversion operation obtains a target image with a second resolution, where M is an integer greater than 0; among them, in the M resolution conversion operations, the magnification product of the super-resolution algorithm used in the M resolution conversion is equal to the target magnification; The image obtained by the i resolution conversion operation is the input of the i+1 resolution conversion operation, and i+1 is an integer less than or M and greater than 1.
上述设计中,在图像处理装置内部集成一种或者多种超分辨率算法,可以根据应用场景中实际需求来自适应的选择超分辨率算法以及执行的次数,进而使得该图像处理装置可以应用到不同的场景下。In the above design, one or more super-resolution algorithms are integrated in the image processing device, and the super-resolution algorithm and the number of executions can be adaptively selected according to the actual needs in the application scenario, so that the image processing device can be applied to different Scene.
在一种可能的设计中,显示状态信息包括显示装置的分辨率、显示装置的接口类型、或者显示装置的尺寸中的至少一项。In a possible design, the display status information includes at least one of the resolution of the display device, the interface type of the display device, or the size of the display device.
在一种可能的设计中,根据显示状态信息确定第二分辨率,包括:将显示装置的分辨率确定为第二分辨率;或者,将显示装置的接口类型所支持的最高分辨率与显示装置的分辨率中的最小值确定为第二分辨率;或者,将显示装置的尺寸所支持的最高分辨率与显示装置的分辨率中的最小值确定为第二分辨率;或者,将显示装置的尺寸所支持的最高分辨率、显示装置的接口类型所支持的最高分辨率、以及显示装置的分辨率中的最小值确定为第二分辨率。上述设计示例性地提供几种简单易行的确定目标分辨率的方式。In a possible design, determining the second resolution according to the display status information includes: determining the resolution of the display device as the second resolution; or, combining the highest resolution supported by the interface type of the display device with the display device The minimum of the resolutions of the display device is determined to be the second resolution; or, the minimum of the highest resolution supported by the size of the display device and the resolution of the display device is determined to be the second resolution; or The minimum value among the highest resolution supported by the size, the highest resolution supported by the interface type of the display device, and the resolution of the display device is determined as the second resolution. The above design exemplarily provides several simple and easy ways to determine the target resolution.
在一种可能的设计中,还包括:获取流状态信息,流状态信息用于表征源图像所属的视频流的流状态;根据显示状态信息确定第二分辨率,第二分辨率满足显示设备的显示状态的需求,包括:根据流状态信息以及显示状态信息确定第二分辨率,第二分辨率满足图像流的流状态的需求以及满足显示设备的显示状态的需求。In a possible design, it further includes: acquiring stream status information, which is used to characterize the stream status of the video stream to which the source image belongs; and determining the second resolution according to the display status information, and the second resolution meets the requirements of the display device The requirements for the display status include: determining the second resolution according to the stream status information and the display status information, and the second resolution meets the requirements of the stream status of the image stream and the requirements of the display status of the display device.
上述设计,在采用显示状态信息作为确定目标分辨率的基础上,增减确定目标分辨率的确定条件,不仅能够提高确定的目标分辨率的准确度,还能进一步增加适用的场景。In the above design, on the basis of using the display status information as the target resolution to be determined, the determination conditions for determining the target resolution are increased or decreased, which not only improves the accuracy of the determined target resolution, but also further increases the applicable scenarios.
在一种可能的设计中,流状态信息包括视频流的帧率和/或用于表示图像流的格式的参数。In a possible design, the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
示例性地,在根据流状态信息以及显示状态信息确定第二分辨率时,可以将显示状态信息中包括的各个参数所支持的最大分辨率和流状态信息包括的各个参数所支持的最大分辨率中的最小值作为第二分辨率。Exemplarily, when the second resolution is determined according to the stream status information and the display status information, the maximum resolution supported by each parameter included in the display status information and the maximum resolution supported by each parameter included in the stream status information may be combined The minimum value in is used as the second resolution.
在一种可能的设计中,方法还包括:在根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作的过程中,获取资源运行状态信息;在确定资源运行状态信息满足预设条件时,继续根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作。资源运行状态信息指示用于执行分辨率转换操作的图像处理装置上资源的运行状态。In a possible design, the method further includes: in the process of performing a resolution conversion operation on the source image with the first resolution according to the target magnification, acquiring resource operating status information; and determining that the resource operating status information meets a preset condition , Continue to perform the resolution conversion operation on the source image with the first resolution according to the target magnification. The resource running status information indicates the running status of the resource on the image processing device for performing the resolution conversion operation.
在一种可能的设计中,还包括:在确定资源运行状态信息不满足预设条件时,缩小目标倍率得到第二目标倍率,根据缩小后的第二目标倍率对具有第一分辨率的源图像执行分辨率转换操作,得到具有第三分辨率的第二目标图像,第三分辨率为第一分辨率放大第二目标倍率得到的。In a possible design, it further includes: when it is determined that the resource operating state information does not meet the preset condition, the target magnification is reduced to obtain the second target magnification, and the source image with the first resolution is determined according to the reduced second target magnification. The resolution conversion operation is performed to obtain a second target image with a third resolution, and the third resolution is obtained by enlarging the second target magnification of the first resolution.
上述设计中,进一步通过图像处理装置在执行分辨率转换操作的过程中的资源的运行情况在进一步调整分辨率,提高确定的目标分辨率的准确度,提高适用当前应用环境的适 应效果。In the above design, the resolution is further adjusted based on the resource operation of the image processing device in the process of performing the resolution conversion operation, so as to improve the accuracy of the determined target resolution and improve the adaptability to the current application environment.
在一种可能的设计中,资源运行状态信息包括处理资源占用率和/或存储资源占用率。In a possible design, the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
基于与第一方面的方法同样的发明构思,第二方面,本申请实施例提供一种图像处理装置,该装置具有实现上述第一方面及第一方面任何一种可能的设计中提供的方法的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现,也可以通过软件和硬件结合实现。硬件或软件包括一个或多个与上述功能相对应的模块。Based on the same inventive concept as the method of the first aspect, in the second aspect, an embodiment of the present application provides an image processing device that can implement the method provided in the first aspect and any one of the possible designs of the first aspect. Features. The function can be realized by hardware, or by hardware executing corresponding software, or by a combination of software and hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
本申请实施例提供的一种图像处理装置,可包括状态监控模块和超分辨率转换模块;其中,状态监控模块,用于获取显示状态信息;其中,显示状态信息用于表征显示装置的显示状态;超分辨率转换模块,用于根据显示状态信息确定第二分辨率,第二分辨率满足显示装置的显示状态的需求,第二分辨率是为显示装置所显示的图像确定的目标分辨率;将接收到的具有第一分辨率的源图像转换为具有第二分辨率的目标图像。An image processing device provided by an embodiment of the present application may include a state monitoring module and a super-resolution conversion module; wherein the state monitoring module is used to obtain display state information; wherein the display state information is used to characterize the display state of the display device The super-resolution conversion module is used to determine the second resolution according to the display status information, the second resolution meets the requirements of the display status of the display device, and the second resolution is the target resolution determined for the image displayed by the display device; The received source image with the first resolution is converted into the target image with the second resolution.
在一种可能的设计中,超分辨率转换模块,在将接收到的具有第一分辨率的源图像转换为具有第二分辨率的目标图像时,具体用于:根据接收到的源图像的第一分辨率和第二分辨率确定目标倍率;根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作,得到具有第二分辨率的目标图像,第二分辨率为第一分辨率放大目标倍率得到。In a possible design, the super-resolution conversion module is specifically used to: according to the received source image of the received source image when converting the received source image with the first resolution into the target image with the second resolution The first resolution and the second resolution determine the target magnification; according to the target magnification, the resolution conversion operation is performed on the source image with the first resolution to obtain the target image with the second resolution, and the second resolution is the first resolution Magnified target magnification is obtained.
在一种可能的设计中,超分辨率转换模块,在根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作时,具体用于:在根据目标倍率在超分辨率算法集中选择第一超分辨率算法,并采用第一超分辨率算法将具有第一分辨率的源图像转换为具有第二分辨率的目标图像,第一超分辨率算法为超分辨率算法集中倍率小于或者等于目标倍率的超分辨率算法中的倍率最大的超分辨率算法;其中,超分辨率算法集中包括第一超分辨率算法在内的多种超分辨率算法,一种超分辨率算法对应一个倍率,不同的超分辨率算法对应的倍率不同。In a possible design, the super-resolution conversion module, when performing a resolution conversion operation on the source image with the first resolution according to the target magnification, is specifically used to: select the second in the super-resolution algorithm set according to the target magnification. A super-resolution algorithm, and the first super-resolution algorithm is used to convert the source image with the first resolution into the target image with the second resolution. The first super-resolution algorithm is the super-resolution algorithm. The concentration ratio is less than or equal to The super-resolution algorithm with the largest magnification among the super-resolution algorithms of the target magnification; among them, the super-resolution algorithm concentrates on multiple super-resolution algorithms including the first super-resolution algorithm, and one super-resolution algorithm corresponds to one magnification , Different super-resolution algorithms correspond to different magnifications.
在一种可能的设计中,超分辨率转换模块,在将接收到的具有第一分辨率的源图像转换为具有第二分辨率的目标图像时,具体用于:根据目标倍率对具有第一分辨率的源图像执行M次分辨率转换操作,得到具有第二分辨率的目标图像,N为大于0的整数,M为大于0的整数;其中,M次分辨率转换操作中,M次分辨率转换中采用的超分辨率算法的倍率乘积等于目标倍率;第i次分辨率转换操作得到的图像为第i+1次分辨率转换操作的输入,i+1为小于或者M且大于1的整数。In a possible design, the super-resolution conversion module, when converting the received source image with the first resolution into the target image with the second resolution, is specifically used to: The source image of the resolution performs M resolution conversion operations to obtain the target image with the second resolution. N is an integer greater than 0, and M is an integer greater than 0. Among them, in the M resolution conversion operations, M resolutions The magnification product of the super-resolution algorithm used in the rate conversion is equal to the target magnification; the image obtained by the i-th resolution conversion operation is the input of the i+1-th resolution conversion operation, i+1 is less than or M and greater than 1 Integer.
在一种可能的设计中,显示状态信息包括显示装置的分辨率、显示装置的接口类型、或者显示装置的尺寸中的至少一项。In a possible design, the display status information includes at least one of the resolution of the display device, the interface type of the display device, or the size of the display device.
在一种可能的设计中,超分辨率转换模块,在根据显示状态信息确定第二分辨率时,具体用于:将显示装置的分辨率确定为第二分辨率;或者,将显示装置的接口类型所支持的最高分辨率与显示装置的分辨率中的最小值确定为第二分辨率;或者,将显示装置的尺寸所支持的最高分辨率与显示装置的分辨率中的最小值确定为第二分辨率;或者,将显示装置的尺寸所支持的最高分辨率、显示装置的接口类型所支持的最高分辨率、以及显示装置的分辨率中的最小值确定为第二分辨率。In a possible design, when determining the second resolution according to the display status information, the super-resolution conversion module is specifically used to: determine the resolution of the display device as the second resolution; or, set the interface of the display device The minimum of the highest resolution supported by the type and the resolution of the display device is determined as the second resolution; alternatively, the minimum of the highest resolution supported by the size of the display device and the resolution of the display device is determined as the second resolution Two resolutions; or, the minimum of the highest resolution supported by the size of the display device, the highest resolution supported by the interface type of the display device, and the resolution of the display device is determined as the second resolution.
在一种可能的设计中,状态监控模块,还用于获取流状态信息,流状态信息用于表征源图像所属的视频流的流状态;超分辨率转换模块,在根据显示状态信息确定第二分辨率,第二分辨率满足显示设备的显示状态的需求时,具体用于:根据流状态信息以及显示状态信息确定第二分辨率,第二分辨率满足图像流的流状态的需求以及满足显示设备的显示状 态的需求。In a possible design, the status monitoring module is also used to obtain stream status information, which is used to characterize the stream status of the video stream to which the source image belongs; the super-resolution conversion module determines the second Resolution, when the second resolution meets the requirements of the display status of the display device, it is specifically used to: determine the second resolution according to the stream status information and the display status information, and the second resolution meets the requirements of the stream status of the image stream and the display Requirements for the display status of the equipment.
在一种可能的设计中,流状态信息包括视频流的帧率和/或用于表示图像流的格式的参数。In a possible design, the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
在一种可能的设计中,状态监控模块,还用于在超分辨率转换模块根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作的过程中,获取资源运行状态信息,资源运行状态信息指示用于执行分辨率转换操作的图像处理装置上资源的运行状态;在确定资源运行状态信息满足预设条件时,继续根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作。In a possible design, the status monitoring module is also used to obtain resource operating status information during the process of the super-resolution conversion module performing resolution conversion operations on the source image with the first resolution according to the target magnification. The status information indicates the operating status of the resource on the image processing device used to perform the resolution conversion operation; when it is determined that the resource operating status information meets the preset condition, continue to perform the resolution conversion operation on the source image with the first resolution according to the target magnification .
在一种可能的设计中,超分辨率转换模块,还用于在确定资源运行状态信息不满足预设条件时,缩小目标倍率得到第二目标倍率,根据缩小后的第二目标倍率对具有第一分辨率的源图像执行分辨率转换操作,得到具有第三分辨率的第二目标图像,第三分辨率为第一分辨率放大第二目标倍率得到的。In a possible design, the super-resolution conversion module is also used to reduce the target magnification to obtain the second target magnification when it is determined that the resource operating state information does not meet the preset condition, and the second target magnification is obtained according to the reduced second target magnification. A source image of one resolution performs a resolution conversion operation to obtain a second target image with a third resolution, and the third resolution is obtained by enlarging the first resolution by the second target magnification.
在一种可能的设计中,资源运行状态信息包括处理资源占用率和/或存储资源占用率。In a possible design, the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
第三方面,本申请实施例提供一种图像处理方法,包括:机顶盒接收源图像,所述源图像具有第一分辨率;所述机顶盒获取状态信息;其中,所述状态信息包括用于表征显示装置的显示性能的显示状态信息,所述机顶盒与所述显示装置通过传输接口传输图像数据;所述机顶盒根据所述状态信息以及所述第一分辨率为所述源图像确定放大的第一目标倍率;所述机顶盒根据所述第一目标倍率选择至少一种超分辨率转换算法将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像,其中,具有所述第二分辨率的所述目标图像与所述显示装置的显示性能相适应。In a third aspect, an embodiment of the present application provides an image processing method, including: a set-top box receives a source image, the source image has a first resolution; the set-top box acquires status information; wherein, the status information includes The display status information of the display performance of the device, the set-top box and the display device transmit image data through a transmission interface; the set-top box determines the first target of magnification for the source image according to the status information and the first resolution Magnification; the set-top box selects at least one super-resolution conversion algorithm according to the first target magnification to enlarge the source image at the first target magnification to obtain a target image with a second resolution, wherein the second The resolution of the target image is adapted to the display performance of the display device.
在本申请实施例中,机顶盒根据获取的状态信息来确定超分辨率算法对应的目标倍率,状态信息包括显示装置的显示状态信息,对于各种显示规格的显示器,该机顶盒都可以确定匹配的放大倍率,并使得放大之后的倍率与显示器的显示性能相适应,因此该机顶盒可以自主适配各种显示规格的显示装置,对显示装置的显示规格无限定,且无需人工设置,大大提升了用户体验。In the embodiment of this application, the set-top box determines the target magnification corresponding to the super-resolution algorithm according to the acquired state information. The state information includes the display state information of the display device. For displays of various display specifications, the set-top box can determine the matching magnification. The magnification is adapted to the display performance of the display after the magnification. Therefore, the set-top box can independently adapt to display devices of various display specifications. The display specifications of the display device are not limited, and manual settings are not required, which greatly improves the user experience .
在一种可能的设计中,所述状态信息还包括:用于表征所述源图像所属的视频流的流状态信息。In a possible design, the state information further includes: stream state information used to characterize the video stream to which the source image belongs.
在一种可能的设计中,所述状态信息还包括:资源运行状态信息,所述资源运行状态信息指示所述机顶盒上资源的运行状态。In a possible design, the status information further includes: resource running status information, and the resource running status information indicates the running status of the resource on the set-top box.
在一种可能的设计中,所述机顶盒根据所述状态信息以及所述第一分辨率确定第一目标倍率,包括:所述机顶盒根据所述状态信息和所述第一分辨率构建第一状态向量,所述第一状态向量包括分别用于指示所述状态信息的参数值和所述第一分辨率的状态量;所述机顶盒根据第一状态映射规则确定所述第一状态向量所映射的所述第一目标倍率。In a possible design, the set-top box determines the first target magnification according to the state information and the first resolution, including: the set-top box constructs the first state according to the state information and the first resolution Vector, the first state vector includes a parameter value for indicating the state information and a state quantity of the first resolution; the set-top box determines, according to the first state mapping rule, what is mapped by the first state vector The first target magnification.
在一种可能的设计中,所述机顶盒根据第一目标倍率选择至少一种超分辨率算法,将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像,包括:所述机顶盒根据所述第一目标倍率在超分辨率算法集中选择第一超分辨率算法,并采用第一超分辨率算法将所述源图像转换为所述目标图像;其中,所述第一超分辨率算法为超分辨率算法集中倍率小于或者等于所述第一目标倍率的超分辨率算法中倍率最大的超分辨率算法;所述超分辨率算法集中包括所述第一超分辨率算法在内的多种超分辨率算法,一种超分辨率算法对应一个倍率,不同的超分辨率算法对应的倍率不同。In a possible design, the set-top box selects at least one super-resolution algorithm according to a first target magnification, and amplifies the source image at the first target magnification to obtain a target image with a second resolution, including: The set-top box selects the first super-resolution algorithm in the super-resolution algorithm set according to the first target magnification, and uses the first super-resolution algorithm to convert the source image into the target image; wherein, the first super-resolution algorithm The resolution algorithm is the super-resolution algorithm with the largest magnification among the super-resolution algorithms whose magnification is less than or equal to the first target magnification; the super-resolution algorithm set includes the first super-resolution algorithm There are a variety of super-resolution algorithms, one super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to different magnifications.
在一种可能的设计中,所述机顶盒根据第一目标倍率选择至少一种超分辨率算法,将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像,包括:所述机顶盒根据所述第一目标倍率对所述具有所述第一分辨率的源图像执行M次分辨率转换操作,得到具有所述第二分辨率的目标图像,M为大于0的整数;其中,所述M次分辨率转换操作中,M次分辨率转换中采用的超分辨率算法的倍率乘积等于所述第一目标倍率;第i次分辨率转换操作得到的图像为第i+1次分辨率转换操作的输入,i+1为小于或者M且大于1的整数。In a possible design, the set-top box selects at least one super-resolution algorithm according to a first target magnification, and amplifies the source image at the first target magnification to obtain a target image with a second resolution, including: The set-top box performs M resolution conversion operations on the source image with the first resolution according to the first target magnification to obtain the target image with the second resolution, where M is an integer greater than 0; where In the M resolution conversion operations, the magnification product of the super-resolution algorithm used in the M resolution conversion is equal to the first target magnification; the image obtained by the i-th resolution conversion operation is the i+1th The input of the resolution conversion operation, i+1 is an integer less than or M and greater than 1.
在一种可能的设计中,所述显示状态信息包括所述显示装置的分辨率、所述显示装置的传输接口类型、或者所述显示装置的尺寸中的至少一项。In a possible design, the display state information includes at least one of the resolution of the display device, the transmission interface type of the display device, or the size of the display device.
在一种可能的设计中,所述流状态信息包括视频流的帧率和/或用于表示图像流的格式的参数。In a possible design, the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
在一种可能的设计中,所述资源运行状态信息包括处理资源占用率和/或存储资源占用率。In a possible design, the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
在一种可能的设计中,根据所述状态信息以及所述第一分辨率为所述源图像确定放大的第一目标倍率,包括:根据所述状态信息确定所述第二分辨率,并根据所述第一分辨率和所述第二分辨率确定所述第一目标倍率。In a possible design, determining the first target magnification for the source image according to the status information and the first resolution includes: determining the second resolution according to the status information, and according to The first resolution and the second resolution determine the first target magnification.
在根据状态信息确定第二分辨率时,可以将状态信息中包括的各个参数下所支持的最大分辨率中的最小值作为第二分辨率。When determining the second resolution according to the status information, the minimum value among the maximum resolutions supported under each parameter included in the status information may be used as the second resolution.
示例性地,如下例举几种:Illustratively, several examples are as follows:
所述第二分辨率为所述显示装置的分辨率;或者,The second resolution is the resolution of the display device; or,
所述第二分辨率为所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device; or,
所述第二分辨率为所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum of the highest resolution supported by the size of the display device and the resolution of the display device; or,
所述第二分辨率为所述显示装置的尺寸所支持的最高分辨率、所述显示装置的接口类型所支持的最高分辨率、以及所述显示装置的分辨率中的最小值;或者,The second resolution is the smallest value among the highest resolution supported by the size of the display device, the highest resolution supported by the interface type of the display device, and the resolution of the display device; or,
所述第二分辨率为在所述视频流的帧率下,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device under the frame rate of the video stream; or,
所述第二分辨率为所述视频流的帧率下,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum of the highest resolution supported by the interface type of the display device and the resolution of the display device at the frame rate of the video stream; or,
所述第二分辨率为在采用所述视频流的帧率时,所述显示装置的接口类型所支持的最高分辨率、所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the maximum resolution of the display device when the frame rate of the video stream is used. The minimum value in resolution; or,
所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device when the format of the image stream is adopted; or,
所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device when the format of the image stream is adopted; or,
所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率、所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the resolution of the display device when the format of the image stream is adopted. The smallest value in; or,
所述第二分辨率为在采用所述视频流的帧率和所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率。The second resolution is the highest resolution supported by the interface type of the display device when the frame rate of the video stream and the format of the image stream are adopted.
在一种可能的设计中,所述方法还包括:所述机顶盒在采用所述至少一种分辨率转换算法对所述源图像执行放大第一目标倍率操作的过程中,获取所述资源运行状态信息;所述机顶盒在确定所述资源运行状态信息满足预设条件时,继续根据所述第一目标倍率对所述源图像执行放大第一目标倍率操作。In a possible design, the method further includes: the set-top box uses the at least one resolution conversion algorithm to perform an operation of enlarging the first target magnification on the source image, acquiring the resource running status Information; when the set-top box determines that the resource operating state information meets a preset condition, it continues to perform a magnification operation of the first target magnification on the source image according to the first target magnification.
在一种可能的设计中,还包括:In one possible design, it also includes:
在确定所述资源运行状态信息不满足预设条件时,缩小所述第一目标倍率得到第二目标倍率,根据缩小后的所述第二目标倍率对所述源图像执行放大操作,得到具有第三分辨率的第二目标图像,所述第三分辨率为所述第一分辨率放大所述第二目标倍率得到的。When it is determined that the resource operating state information does not meet the preset condition, the first target magnification is reduced to obtain a second target magnification, and the source image is enlarged according to the reduced second target magnification to obtain a A three-resolution second target image, where the third resolution is obtained by enlarging the second target magnification of the first resolution.
第四方面,本申请实施例提供一种图像处理方装置,应用于机顶盒,包括:In a fourth aspect, an embodiment of the present application provides an image processing device, which is applied to a set-top box, and includes:
传输接口,用于接收源图像,所述源图像具有第一分辨率;A transmission interface for receiving a source image, the source image having a first resolution;
状态监控模块,用于获取状态信息,所述状态信息包括用于表征显示装置的显示性能的显示状态信息,所述机顶盒与所述显示装置通过所述传输接口传输图像数据;A status monitoring module, configured to obtain status information, the status information including display status information used to characterize the display performance of the display device, and the set-top box and the display device transmit image data through the transmission interface;
其中,所述显示状态信息用于表征显示装置的显示状态;Wherein, the display state information is used to characterize the display state of the display device;
超分辨率转换模块,用于接收源图像,并根据所述状态信息以及所述第一分辨率为所述源图像确定放大的第一目标倍率;所述第一目标倍率选择至少一种超分辨率转换算法将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像,其中,具有所述第二分辨率的所述目标图像与所述显示装置的显示性能相适应。The super-resolution conversion module is configured to receive a source image and determine a first target magnification for the source image according to the state information and the first resolution; the first target magnification selects at least one super-resolution The rate conversion algorithm enlarges the source image at the first target magnification to obtain a target image with a second resolution, wherein the target image with the second resolution is compatible with the display performance of the display device.
示例性的,传输接口可以包括发送接口与接收接口,发送接口用于向显示装置传输图像数据,接收接口用于接收源图像。Exemplarily, the transmission interface may include a transmission interface and a reception interface. The transmission interface is used for transmitting image data to the display device, and the receiving interface is used for receiving the source image.
示例性的,传输接口的功能可以由发送单元和接收单元实现。发送单元用于向显示装置发送图像数据,接收单元用于接收源图像。Exemplarily, the function of the transmission interface may be implemented by the sending unit and the receiving unit. The sending unit is used for sending image data to the display device, and the receiving unit is used for receiving the source image.
在一种可能的设计中,所述状态信息还包括:用于表征所述源图像所属的视频流的流状态信息。In a possible design, the state information further includes: stream state information used to characterize the video stream to which the source image belongs.
在一种可能的设计中,所述状态信息还包括:资源运行状态信息,所述资源运行状态信息指示所述机顶盒上资源的运行状态。其中资源可以硬件资源或者软件资源。In a possible design, the status information further includes: resource running status information, and the resource running status information indicates the running status of the resource on the set-top box. The resources can be hardware resources or software resources.
在一种可能的设计中,所述超分辨率转换模块,具体用于:In a possible design, the super-resolution conversion module is specifically used for:
根据所述状态信息和所述第一分辨率构建第一状态向量,所述第一状态向量包括分别用于指示所述状态信息的参数值和所述第一分辨率的状态量;根据第一状态映射规则确定所述第一状态向量所映射的所述第一目标倍率。Construct a first state vector according to the state information and the first resolution, where the first state vector includes a parameter value indicating the state information and a state quantity of the first resolution; The state mapping rule determines the first target magnification to which the first state vector is mapped.
在一种可能的设计中,所述超分辨率转换模块,在根据第一目标倍率选择至少一种超分辨率算法,将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像时,具体用于:根据所述第一目标倍率在超分辨率算法集中选择第一超分辨率算法,并采用第一超分辨率算法将所述源图像转换为所述目标图像;其中,所述第一超分辨率算法为超分辨率算法集中倍率小于或者等于所述第一目标倍率的超分辨率算法中倍率最大的超分辨率算法;所述超分辨率算法集中包括所述第一超分辨率算法在内的多种超分辨率算法,一种超分辨率算法对应一个倍率,不同的超分辨率算法对应的倍率不同。In a possible design, the super-resolution conversion module selects at least one super-resolution algorithm according to the first target magnification, and enlarges the source image to the first target magnification to obtain a second resolution When the target image is used, it is specifically used to: select the first super-resolution algorithm in the super-resolution algorithm set according to the first target magnification, and use the first super-resolution algorithm to convert the source image into the target image; wherein , The first super-resolution algorithm is a super-resolution algorithm with the largest magnification among super-resolution algorithms with a set magnification of less than or equal to the first target magnification; the set of super-resolution algorithms includes the first There are multiple super-resolution algorithms including one super-resolution algorithm. One super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to different magnifications.
在一种可能的设计中,超分辨率转换模块,在根据第一目标倍率选择至少一种超分辨率算法,将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像时,具体用 于:根据所述第一目标倍率对所述具有所述第一分辨率的源图像执行M次分辨率转换操作,得到具有所述第二分辨率的目标图像,M为大于0的整数;其中,所述M次分辨率转换操作中,M次分辨率转换中采用的超分辨率算法的倍率乘积等于所述第一目标倍率;第i次分辨率转换操作得到的图像为第i+1次分辨率转换操作的输入,i+1为小于或者M且大于1的整数。In a possible design, the super-resolution conversion module selects at least one super-resolution algorithm according to the first target magnification, and enlarges the source image at the first target magnification to obtain a target image with a second resolution When, it is specifically used to: perform M resolution conversion operations on the source image with the first resolution according to the first target magnification to obtain the target image with the second resolution, and M is greater than 0 Wherein, in the M resolution conversion operations, the magnification product of the super-resolution algorithm used in the M resolution conversion is equal to the first target magnification; the image obtained by the i-th resolution conversion operation is the first The input of i+1 resolution conversion operations, i+1 is an integer less than or M and greater than 1.
在一种可能的设计中,所述显示状态信息包括所述显示装置的分辨率、所述显示装置的传输接口类型、或者所述显示装置的尺寸中的至少一项。In a possible design, the display state information includes at least one of the resolution of the display device, the transmission interface type of the display device, or the size of the display device.
在一种可能的设计中,所述流状态信息包括视频流的帧率和/或用于表示图像流的格式的参数。In a possible design, the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
在一种可能的设计中,所述资源运行状态信息包括处理资源占用率和/或存储资源占用率。In a possible design, the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
在一种可能的设计中,超分辨率转换模块,在根据所述状态信息以及所述第一分辨率为所述源图像确定放大的第一目标倍率时,具体用于根据所述状态信息确定所述第二分辨率,并根据所述第一分辨率和所述第二分辨率确定所述第一目标倍率;其中,所述第二分辨率为所述显示装置的分辨率;或者,In a possible design, the super-resolution conversion module is specifically configured to determine the first target magnification for the source image according to the state information and the first resolution. The second resolution, and the first target magnification is determined according to the first resolution and the second resolution; wherein the second resolution is the resolution of the display device; or,
所述第二分辨率为所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device; or,
所述第二分辨率为所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum of the highest resolution supported by the size of the display device and the resolution of the display device; or,
所述第二分辨率为所述显示装置的尺寸所支持的最高分辨率、所述显示装置的接口类型所支持的最高分辨率、以及所述显示装置的分辨率中的最小值;或者,The second resolution is the smallest value among the highest resolution supported by the size of the display device, the highest resolution supported by the interface type of the display device, and the resolution of the display device; or,
所述第二分辨率为在所述视频流的帧率下,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device under the frame rate of the video stream; or,
所述第二分辨率为所述视频流的帧率下,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum of the highest resolution supported by the interface type of the display device and the resolution of the display device at the frame rate of the video stream; or,
所述第二分辨率为在采用所述视频流的帧率时,所述显示装置的接口类型所支持的最高分辨率、所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the maximum resolution of the display device when the frame rate of the video stream is used. The minimum value in resolution; or,
所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device when the format of the image stream is adopted; or,
所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device when the format of the image stream is adopted; or,
所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率、所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the resolution of the display device when the format of the image stream is adopted. The smallest value in; or,
所述第二分辨率为在采用所述视频流的帧率和所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率。The second resolution is the highest resolution supported by the interface type of the display device when the frame rate of the video stream and the format of the image stream are adopted.
在一种可能的设计中,超分辨率转换模块,还用于在采用所述至少一种分辨率转换算法对所述源图像执行放大第一目标倍率操作的过程中,获取所述资源运行状态信息;在确定所述资源运行状态信息满足预设条件时,继续根据所述第一目标倍率对所述源图像执行 放大第一目标倍率操作。In a possible design, the super-resolution conversion module is further configured to obtain the resource running status during the process of performing the operation of zooming in the first target magnification on the source image by using the at least one resolution conversion algorithm Information; when it is determined that the resource operating state information meets a preset condition, continue to perform an operation of magnifying the first target magnification on the source image according to the first target magnification.
在一种可能的设计中,超分辨率转换模块,还用于在确定所述资源运行状态信息不满足预设条件时,缩小所述第一目标倍率得到第二目标倍率,根据缩小后的所述第二目标倍率对所述源图像执行放大操作,得到具有第三分辨率的第二目标图像,所述第三分辨率为所述第一分辨率放大所述第二目标倍率得到的。In a possible design, the super-resolution conversion module is also used to reduce the first target magnification to obtain the second target magnification when it is determined that the resource operating state information does not meet the preset condition, and according to the reduced all The second target magnification performs an enlargement operation on the source image to obtain a second target image with a third resolution, where the third resolution is obtained by enlarging the second target magnification by the first resolution.
第五方面,本申请实施例提供了一种图像处理装置,该装置包括处理器,该处理器调用该存储器中的指令以实现上述第一方面或者第三方面方法实施例、方法实施例的任意一种可能的设计中所涉及的功能。In a fifth aspect, an embodiment of the present application provides an image processing device, which includes a processor that invokes instructions in the memory to implement any of the method embodiments and method embodiments of the first or third aspect described above. The functions involved in a possible design.
示例性地,图像处理装置还可以包括传输接口,处理器通过所述传输接口接收或者发送图像数据。传输接口可以包括发送接口与接收接口,发送接口用于向显示装置传输图像数据,接收接口用于接收源图像。Exemplarily, the image processing apparatus may further include a transmission interface through which the processor receives or transmits image data. The transmission interface may include a transmission interface and a reception interface, the transmission interface is used to transmit image data to the display device, and the reception interface is used to receive the source image.
第六方面,本申请实施例提供了一种计算机程序产品,包括计算机程序,该计算机程序在某一计算机或处理器上执行时,将会使计算机或处理器实现上述第一方面或者第三方法实施例、方法实施例的任意一种可能的设计中所涉及的功能。In the sixth aspect, the embodiments of the present application provide a computer program product, including a computer program. When the computer program is executed on a computer or processor, it will enable the computer or processor to implement the first aspect or the third method described above. The functions involved in any possible design of the embodiment and method embodiment.
第七方面,本申请实施例提供了一种计算机可读存储介质,用于存储程序、指令,这些程序、指令在计算机中被调用执行时,可以使得计算机执行上述第一方面或者第三方面所述方法实施例、方法实施例的任意一种可能的设计中所涉及的功能。In the seventh aspect, the embodiments of the present application provide a computer-readable storage medium for storing programs and instructions. When these programs and instructions are invoked and executed in a computer, the computer can execute the above-mentioned first or third aspects. The functions involved in the method embodiment and any possible design of the method embodiment are described.
第八方面,本申请实施例提供了一种芯片系统,该芯片系统中包括处理器,还可以包括存储器,用于实现上述方法中所涉及的功能。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。In an eighth aspect, the embodiments of the present application provide a chip system, which includes a processor and may also include a memory, for implementing the functions involved in the above method. The chip system can be composed of chips, or can include chips and other discrete devices.
附图说明Description of the drawings
图1A为本申请实施例提供的一种图像处理系统100结构示意图;FIG. 1A is a schematic structural diagram of an image processing system 100 provided by an embodiment of this application;
图1B为本申请实施例提供的另一种图像处理系统100结构示意图;1B is a schematic structural diagram of another image processing system 100 provided by an embodiment of this application;
图2为本申请实施例提供的一种图像处理装置102结构示意图;2 is a schematic structural diagram of an image processing device 102 provided by an embodiment of the application;
图3为本申请实施例提供的图像处理方法流程图;FIG. 3 is a flowchart of an image processing method provided by an embodiment of the application;
图4为本申请实施例提供受控超分辨率算法示意图;4 is a schematic diagram of a controlled super-resolution algorithm provided by an embodiment of the application;
图5为本申请实施例提供的另一种图像处理装置102结构示意图;FIG. 5 is a schematic structural diagram of another image processing apparatus 102 provided by an embodiment of this application;
图6为本申请实施例提供的图像处理方法示意图;FIG. 6 is a schematic diagram of an image processing method provided by an embodiment of the application;
图7为本申请实施例提供的状态监控信息示意图;FIG. 7 is a schematic diagram of status monitoring information provided by an embodiment of this application;
图8A为本申请实施例提供的又一种图像处理装置102示意图;FIG. 8A is a schematic diagram of another image processing apparatus 102 provided by an embodiment of the application;
图8B为本申请实施例提供的又一种图像处理装置102示意图;FIG. 8B is a schematic diagram of another image processing apparatus 102 provided by an embodiment of the application;
图8C为本申请实施例提供的又一种图像处理装置102示意图。FIG. 8C is a schematic diagram of another image processing apparatus 102 provided by an embodiment of the application.
具体实施方式Detailed ways
下面先对本申请涉及的部分术语进行详细说明。Part of the terms involved in this application will be described in detail below.
本申请涉及的术语“至少一个”,是指一个,或一个以上,即包括一个、两个、三个及以上;“多个”,是指两个,或两个以上,即包括两个、三个及以上。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为 指示或暗示相对重要性,也不能理解为指示或暗示顺序。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。The term "at least one" referred to in this application refers to one, or more than one, that includes one, two, three and more; "multiple" refers to two, or more than two, that includes two, Three and more. In addition, it should be understood that in the description of this application, words such as “first” and “second” are only used for the purpose of distinguishing description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating Or imply the order. "And/or" describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the associated objects are in an "or" relationship. "The following at least one item (a)" or similar expressions refers to any combination of these items, including any combination of a single item (a) or plural items (a). For example, at least one item (a) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple .
分辨率,分辨率是用于度量图像内数据量多少的一个参数,通常表示成ppi(每英寸像素Pixel per inch)那个视频的320*180是指它在横向和纵向上的有效像素,窗口小时ppi值较高,看起来更清晰。Resolution. Resolution is a parameter used to measure the amount of data in an image. It is usually expressed as ppi (Pixel per inch). The 320*180 of the video refers to the effective pixels in the horizontal and vertical directions. The window is small. The ppi value is higher and it looks clearer.
超分辨率技术,是指通过硬件或者软件的方法,利用一幅或者多幅低分辨率图像获取一幅高分辨率图像,从而提高原输入图像的分辨率。超分辨率算法分为广义的超分辨率算法和狭义的超分辨率算法,广义的超分辨率就是图像分辨率的放大算法,狭义的一般指使用机器学习方法的图像质量增强方法。超分辨率算法与传统的图像放大算法区别在于,传统的图像放大算法由人工设计,是固定的方法,计算消耗小一点;超分辨率算法基于深度学习或机器学习,需要训练的过程,处理复杂,计算消耗大,对处理器的性能要求较高。Super-resolution technology refers to the use of one or more low-resolution images to obtain a high-resolution image by means of hardware or software, thereby increasing the resolution of the original input image. Super-resolution algorithms are divided into generalized super-resolution algorithms and narrowly-defined super-resolution algorithms. The generalized super-resolution is an image resolution magnification algorithm, and the narrow one generally refers to an image quality enhancement method using machine learning methods. The difference between the super-resolution algorithm and the traditional image magnification algorithm is that the traditional image magnification algorithm is manually designed, which is a fixed method and has a lower computational consumption; the super-resolution algorithm is based on deep learning or machine learning, and requires a training process and complex processing. , The calculation consumes a lot, and the performance requirements of the processor are higher.
超分辨率算法包括很多种类,比如双三次插值(BiCubic),再比如基于深度学习的超分辨率算法,例如,基于卷积神经网络的超分辨率算法(Super-Resolution Convolutional Neural Network,SRCNN),再比如移动端的超分辨率算法(hisilicon super-resolution,HiSR),又比如基于字典训练的超分辨率算法等。本申请实施例对超分辨率算法不作具体限定,目前存在的超分辨率算法均适用于本申请。Super-resolution algorithms include many types, such as BiCubic, and super-resolution algorithms based on deep learning, for example, Super-Resolution Convolutional Neural Network (SRCNN), Another example is the super-resolution algorithm (hisilicon super-resolution, HiSR) of the mobile terminal, and the super-resolution algorithm based on dictionary training. The embodiments of this application do not specifically limit the super-resolution algorithm, and all existing super-resolution algorithms are applicable to this application.
倍率是指分辨率被放大的倍数。比如输入分辨率名称为1080P,外语字母P意为逐行扫描(progressive scan),输出分辨率名称为2K,一般是指水平分辨率具有约2000像素的显示设备或者内容,分辨率倍率为2,将输入分辨率放大2倍得到输出分辨率。示例性地,在不同的应用场景中,不同的分辨率名称可以对应不同分辨率。在某应用场景中,一个分辨率名称可以仅对应一个分辨率。但是在不同的应用场景中,相同的分辨率名称可以对应不同的分辨率。比如分辨率名称为2K,2K对应的常见分辨率是2560×1440,还有衍生分辨率,比如2048×1536、1998×1080、2048×858等。Magnification refers to the multiple by which the resolution is enlarged. For example, the input resolution name is 1080P, the foreign letter P means progressive scan, and the output resolution name is 2K, which generally refers to a display device or content with a horizontal resolution of about 2000 pixels, and the resolution ratio is 2. Enlarge the input resolution by 2 times to get the output resolution. Exemplarily, in different application scenarios, different resolution names may correspond to different resolutions. In a certain application scenario, a resolution name may correspond to only one resolution. However, in different application scenarios, the same resolution name can correspond to different resolutions. For example, the resolution name is 2K, the common resolution corresponding to 2K is 2560×1440, and there are derivative resolutions, such as 2048×1536, 1998×1080, 2048×858, etc.
应理解的是,本申请实施例中涉及到的放大的倍数并非绝对等于输出分辨率与输入分辨率的比值,而是约等于输出分辨率与输入分辨率的比值。比如输出分辨率与输入分辨率的比值等于3.5,则分辨率倍率等于小于3.5的最大整数,即为3倍。It should be understood that the magnification factor involved in the embodiments of the present application is not absolutely equal to the ratio of the output resolution to the input resolution, but is approximately equal to the ratio of the output resolution to the input resolution. For example, if the ratio of output resolution to input resolution is equal to 3.5, the resolution magnification is equal to the largest integer less than 3.5, which is 3 times.
本申请实施例提供了一种图像处理方法及装置,对于接收到的图像,根据图像处理系统的状态控制信息来调整接收到的图像的分辨率,在不同应用场景下图像处理系统的状态控制信息不同,因此,基于本申请实施例提供的通过状态控制信息来调整分辨率的方式,可以满足业务场景下分辨率的需求。The embodiments of the application provide an image processing method and device. For the received image, the resolution of the received image is adjusted according to the state control information of the image processing system, and the state control information of the image processing system in different application scenarios Different, therefore, based on the method of adjusting the resolution through the state control information provided by the embodiment of the present application, the resolution requirement in the business scenario can be met.
下面,结合附图对本申请实施例进行详细说明。Hereinafter, the embodiments of the present application will be described in detail with reference to the drawings.
如图1A所示,本申请实施例提供的图像处理系统100可以包括信号源101以及本申请实施例提供的图像处理装置102。其中,信号源101是图像处理装置102的处理内容来源,可能是图片或者是视频帧。图像来源可以是网络、移动存储介质,摄像头、摄像设备等。图像处理装置102用于对来自信号源101的图像根据本申请实施例提供的图像处理方法进行处理。As shown in FIG. 1A, the image processing system 100 provided by the embodiment of the present application may include a signal source 101 and the image processing apparatus 102 provided by the embodiment of the present application. The signal source 101 is the source of processing content of the image processing device 102, which may be a picture or a video frame. The image source can be the network, mobile storage media, camera, camera equipment, etc. The image processing device 102 is configured to process the image from the signal source 101 according to the image processing method provided in the embodiment of the present application.
在一种示例中,如图1A所示的图像处理装置102可具备显示功能,则本申请实施例提供的图像处理系统100还可将经过图像处理的图像进行显示,此时无须将经过处理的图像输出至显示设备,此时图像处理装置102可以是电视机或具备图像处理功能的显示器等显示设备。In an example, the image processing device 102 as shown in FIG. 1A may have a display function, and the image processing system 100 provided by the embodiment of the present application may also display images that have undergone image processing. The image is output to a display device. In this case, the image processing device 102 may be a display device such as a television or a display with image processing functions.
在另一种示例中,如图1B所示的另一种图像处理系统100的结构中,该系统100还包括显示装置103,这里的显示装置103可以是具备显示功能的设备,例如电视机、显示器,也可以是显示屏、投影仪等,显示装置103用于接收图像处理装置102传输的图像以及对接收的图像进行显示。这里的图像处理装置102可以是播放设备,例如机顶盒等。In another example, in the structure of another image processing system 100 as shown in FIG. 1B, the system 100 further includes a display device 103, where the display device 103 may be a device with a display function, such as a television, The display may also be a display screen, a projector, etc. The display device 103 is used for receiving the image transmitted by the image processing device 102 and displaying the received image. The image processing apparatus 102 here may be a playback device, such as a set-top box.
作为一种示例,本申请实施例提供的图像处理装置102可具备如图2所示的结构,可见,图像处理装置102可包括处理单元201,该处理单元201可以用于实现本申请实施例提供的图像处理方法中涉及的步骤,具体本申请实施例提供的图像处理方法后续会详细描述,此处不再重复描述。As an example, the image processing device 102 provided by the embodiment of the present application may have a structure as shown in FIG. 2. It can be seen that the image processing device 102 may include a processing unit 201, and the processing unit 201 may be used to implement the The steps involved in the image processing method, the specific image processing method provided in the embodiment of the present application will be described in detail later, and the description will not be repeated here.
处理单元201可以包括以下一项或者多项:中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、图像信号处理器(image signal processor,ISP)、微处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、图形处理器(graphics processing unit,GPU),神经网络处理器(neural-network processing unit,NPU)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。可选的,CPU可以是一个单核(single-CPU)处理器或多核(multi-CPU)处理器;可选的,CPU可以是多个处理器构成的处理器组,多个处理器之间通过一个或多个总线彼此耦合。The processing unit 201 may include one or more of the following: a central processing unit (CPU), or other general-purpose processors, image signal processors (image signal processors, ISP), microprocessors, and digital signal processing Digital signal processor (DSP), application specific integrated circuit (ASIC), graphics processing unit (GPU), neural-network processing unit (NPU), field programmable gate Array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like. Optionally, the CPU may be a single-CPU processor or a multi-CPU processor; optionally, the CPU may be a processor group composed of multiple processors, between multiple processors Coupled to each other through one or more buses.
示例性地,图像处理装置102还可以包括存储单元202,可用于存储计算机程序指令,包括操作系统(Operation System,OS)、各种用户应用程序、以及用于执行本申请方案的程序代码在内的各类计算机程序代码;存储器还可以用于存储视频数据、图像数据等;CPU可以用于执行存储器中存储的计算机程序代码,以实现本申请实施例中的方法。存储单元202可以与处理单元201耦合,用于支持处理单元201调用存储单元202中的计算机程序、指令以实现本申请实施例提供的图像处理方法中涉及的步骤,另外,存储单元202还可以用于存储数据。在本申请的各个实施例中,耦合是指通过特定方式的相互联系,包括直接相连或通过其他设备间接相连。例如可以通过各类接口、传输线或总线等耦合。可选的,存储器可以是非掉电易失性存储器,例如是嵌入式多媒体卡(embedded multi-media card,EMMC)、通用闪存存储(universal flash storage,UFS)或只读存储器(read-only memory,ROM),或者是可存储静态信息和指令的其他类型的静态存储设备,还可以是掉电易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的程序代码并能够由计算机存取的任何其他计算机可读存储介质,但不限于此。Exemplarily, the image processing device 102 may further include a storage unit 202, which may be used to store computer program instructions, including an operating system (Operation System, OS), various user applications, and program codes for executing the solutions of the present application. The memory can also be used to store video data, image data, etc.; the CPU can be used to execute the computer program code stored in the memory to implement the methods in the embodiments of the present application. The storage unit 202 can be coupled with the processing unit 201 to support the processing unit 201 to call computer programs and instructions in the storage unit 202 to implement the steps involved in the image processing method provided in the embodiments of the present application. In addition, the storage unit 202 can also use For storing data. In the various embodiments of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices. For example, it can be coupled through various interfaces, transmission lines or buses. Optionally, the memory may be a non-power-down volatile memory, such as an embedded multi-media card (EMMC), universal flash storage (UFS), or read-only memory, ROM), or other types of static storage devices that can store static information and instructions, or volatile memory (volatile memory) such as random access memory (RAM) or can store information and Other types of dynamic storage devices for instructions can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical discs Storage, optical disc storage (including compact discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store program codes in the form of instructions or data structures and can Any other computer-readable storage medium accessed by the computer, but not limited to this.
示例性地,图像处理装置102还可以包括发送单元203和/或接收单元204,其中,发 送单元203可用于输出处理后的图像,接收单元204可以接收来自信号源101的图像。示例性的,发送单元203和/或接收单元204可以为图像输出接口,比如高清晰度多媒体接口(high definition multimedia interface,HDMI)、视频图像阵列(video graphics array,VGA)、数字视频接口(digital video interface,DVI)、显示接口(DisplayPort,DP)。Exemplarily, the image processing device 102 may further include a sending unit 203 and/or a receiving unit 204, where the sending unit 203 may be used to output processed images, and the receiving unit 204 may receive images from the signal source 101. Exemplarily, the sending unit 203 and/or the receiving unit 204 may be an image output interface, such as a high definition multimedia interface (HDMI), a video graphics array (VGA), and a digital video interface (digital video interface). video interface, DVI), display interface (DisplayPort, DP).
示例性地,图像处理装置102还可以包括显示单元205,例如显示屏或显示面板,用于将处理单元201处理后的图像进行显示。Exemplarily, the image processing apparatus 102 may further include a display unit 205, such as a display screen or a display panel, for displaying the image processed by the processing unit 201.
示例性地,图像处理装置102还可以包括视频解码单元206,用于对来自信号源101的图像进行解码,从而处理单元201对经由视频解码单元206解码后的图像进行处理。Exemplarily, the image processing device 102 may further include a video decoding unit 206 for decoding an image from the signal source 101, so that the processing unit 201 processes the image decoded by the video decoding unit 206.
可选的,图像处理装置102还可以包括:专用的视频或图形处理器、微处理器和微控制器MCU等。例如专用视频/图形处理器可以为专用ISP。Optionally, the image processing device 102 may also include a dedicated video or graphics processor, a microprocessor, and a microcontroller MCU, etc. For example, the dedicated video/graphics processor may be a dedicated ISP.
下面结合图3,介绍本申请实施例提供的图像处理方法,该方法可以由图像处理装置执行,比如由图像处理装置102来执行,该方法包括以下步骤:The following describes an image processing method provided by an embodiment of the present application with reference to FIG. 3. The method may be executed by an image processing device, for example, by the image processing device 102. The method includes the following steps:
S301,图像处理装置接收源图像,源图像具有第一分辨率。S301: The image processing apparatus receives a source image, where the source image has a first resolution.
S302,图像处理装置获取状态信息。其中,状态信息包括用于表征显示装置的显示性能的显示状态信息,显示装置与图像处理装置通过传输接口耦合以传输图像数据。示例性地,显示装置可以位于图像处理装置内部,还可以位于图像处理装置外部。S302: The image processing apparatus obtains status information. Wherein, the state information includes display state information used to characterize the display performance of the display device, and the display device and the image processing device are coupled through a transmission interface to transmit image data. Exemplarily, the display device may be located inside the image processing device or outside the image processing device.
示例性地,图像处理装置可以应用于机顶盒,比如可以是配置于机顶盒内部的处理器、或者处理芯片等。在该情况下,显示装置可以是电视机。Exemplarily, the image processing apparatus may be applied to a set-top box, for example, it may be a processor or a processing chip disposed inside the set-top box. In this case, the display device may be a television.
需要说明的是,接收源图像以及获取显示状态信息的先后顺序本申请不作具体限定,比如获取显示状态信息可以先于接收源图像,或者获取显示状态信息是在接收源图像之后执行,或者在接收源图像的过程中执行获取显示状态信息的操作,本申请对此不作具体限定。It should be noted that the order of receiving the source image and obtaining the display state information is not specifically limited in this application. For example, the display state information may be obtained before the receiving source image, or the display state information may be obtained after the source image is received, or after the source image is received. The operation of acquiring the display status information is performed during the process of the source image, which is not specifically limited in this application.
S303,图像处理装置根据状态信息以及第一分辨率为源图像确定放大的第一目标倍率。源图像放大第一目标倍率得到的目标图像能够与显示装置的显示性能相适应。放大第一目标倍率得到的目标图像的分辨率为第二分辨率。S303: The image processing apparatus determines a first target magnification for the source image according to the state information and the first resolution. The target image obtained by enlarging the source image at the first target magnification can be adapted to the display performance of the display device. The resolution of the target image obtained by enlarging the first target magnification is the second resolution.
示例性地,图像处理装置在根据状态信息以及第一分辨率确定为源图像确定放大的第一目标倍率时,可以先根据状态信息确定目标图像的第二分辨率,在根据第一分辨率和第二分辨率确定第一目标倍率。Exemplarily, when the image processing device determines the first target magnification for the source image according to the status information and the first resolution, it may first determine the second resolution of the target image according to the status information, and then determine the second resolution of the target image according to the first resolution and the first resolution. The second resolution determines the first target magnification.
S304,根据所述第一目标倍率选择至少一种超分辨率转换算法将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像。所述第二分辨率的所述目标图像满足所述状态信息的要求。其中,具有所述第二分辨率的所述目标图像与所述显示装置的显示性能相适应。S304: Select at least one super-resolution conversion algorithm according to the first target magnification to enlarge the source image at the first target magnification to obtain a target image with a second resolution. The target image of the second resolution satisfies the requirement of the state information. Wherein, the target image with the second resolution is adapted to the display performance of the display device.
示例性的,该状态下信息可以包括:显示状态信息、流状态信息或资源运行状态信息。Exemplarily, the information in the state may include: display state information, flow state information, or resource operation state information.
示例性地,显示状态信息可以包括显示装置的分辨率、显示装置的接口类型、或者显示装置的尺寸中一项或者多项。Exemplarily, the display status information may include one or more of the resolution of the display device, the interface type of the display device, or the size of the display device.
示例性的,该流状态信息包括视频流的帧率和/或用于表示图像流的格式的参数。Exemplarily, the stream state information includes the frame rate of the video stream and/or parameters used to represent the format of the image stream.
示例性的,资源运行状态信息包括处理资源占用率和/或存储资源占用率。Exemplarily, the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
一种示例中,显示状态信息中包括显示装置的分辨率,则在执行S302中,图像处理装置可以将显示装置的分辨率确定为第二分辨率。In an example, the display status information includes the resolution of the display device, and in performing S302, the image processing device may determine the resolution of the display device as the second resolution.
另一种示例中,显示状态信息中包括显示装置的接口类型,则在执行S302中,图像 处理装置可以将显示装置的接口类型所支持的最高分辨率确定为第二分辨率。In another example, the display status information includes the interface type of the display device, and in performing S302, the image processing device may determine the highest resolution supported by the interface type of the display device as the second resolution.
显示装置的接口类型可以包括多种,比如VGA、DVI、HDMI或者DP等。The interface types of the display device may include multiple types, such as VGA, DVI, HDMI, or DP.
比如,VGA一般支持最高分辨率的分辨率名称是1080P,示例性地,名称为1080P的分辨率为:1920×1080。当显示装置的接口类型为VGA时,则可以配置1920×1080作为第二分辨率。后续在描述时,将满足某种分辨率名称的分辨率,比如1920×1080,满足1080P,称为1080P分辨率。For example, the resolution name of the highest resolution supported by VGA is 1080P. Illustratively, the resolution name of 1080P is 1920×1080. When the interface type of the display device is VGA, 1920×1080 can be configured as the second resolution. In the following description, the resolution that meets a certain resolution name, such as 1920×1080, meets 1080P, is called 1080P resolution.
再比如,DVI一般支持最高分辨率的分辨率名称是1080P,则显示装置的接口类型为VGA时,则可以配置1920×1080作为第二分辨率。For another example, DVI generally supports the resolution name of the highest resolution 1080P, and when the interface type of the display device is VGA, 1920×1080 can be configured as the second resolution.
再比如,HDMI包括多种传输协议版本,HDMI 1.0、HDMI 1.1以及HDMI 1.2支持的最高分辨率均为1600×1200,HDMI 1.3支持的最高分辨率为2048×1536,可以对应到的分辨率名称是2K,HDMI 1.4支持的最高分辨率为4096×2160,对应的分辨率名称可以是4K,HDMI 2.0支持的最高分辨率为4096×2160,对应的分辨率名称可以是4K。For another example, HDMI includes multiple transmission protocol versions. The highest resolution supported by HDMI 1.0, HDMI 1.1, and HDMI 1.2 are all 1600×1200, and the highest resolution supported by HDMI 1.3 is 2048×1536. The name of the corresponding resolution is 2K, the highest resolution supported by HDMI 1.4 is 4096×2160, the corresponding resolution name can be 4K, the highest resolution supported by HDMI 2.0 is 4096×2160, and the corresponding resolution name can be 4K.
应理解的是,同一种分辨率名称可以对应多种分辨率,比如2K分辨率,一般是指水平分辨率具有约2000像素的显示设备或者内容。2K对应的常见分辨率是2560×1440,还有衍生分辨率,比如2048×1536、1998×1080、2048×858等。再比如,4K,常见分辨率是4096×2160,还有衍生分辨率,比如4096×3112、3656×2664以及3840×2160等。It should be understood that the same resolution name can correspond to multiple resolutions, such as 2K resolution, which generally refers to a display device or content with a horizontal resolution of about 2000 pixels. The common resolution corresponding to 2K is 2560×1440, and there are derivative resolutions, such as 2048×1536, 1998×1080, 2048×858, etc. For another example, 4K, the common resolution is 4096×2160, and there are derivative resolutions, such as 4096×3112, 3656×2664, and 3840×2160.
在配置时,可以根据实际情况,确定某种分辨率名称所对应的分辨率。示例性地,显示装置一般可以配置具体的分辨率。当然在显示装置所应用的场景中,一种分辨率名称仅对应一种分辨率时,显示装置也可以仅配置分辨率名称,还可以配置分辨率名称与分辨率的对应关系。When configuring, you can determine the resolution corresponding to a certain resolution name according to the actual situation. Illustratively, the display device can generally be configured with a specific resolution. Of course, in a scenario where a display device is applied, when a resolution name corresponds to only one resolution, the display device may also be configured with only the resolution name, or the corresponding relationship between the resolution name and the resolution.
示例性地,对于HDMI传输协议版本的判定时,需满足外接显示设备硬件、显示设备系统软件和HDMI通信线同时达到某传输协议版本的标准时,才判定该传输协议版本生效。另外,应理解的是HDMI标准向下兼容,当某个环节对应的传输协议版本与其他环节对应的传输协议版本不一致时,取最低的传输协议版本作为本次HDMI传输协议版本。Exemplarily, when determining the version of the HDMI transmission protocol, the external display device hardware, display device system software, and HDMI communication line must meet the standards of a certain transmission protocol version at the same time, then the transmission protocol version is determined to be effective. In addition, it should be understood that the HDMI standard is backward compatible. When the transmission protocol version corresponding to a certain link is inconsistent with the transmission protocol version corresponding to other links, the lowest transmission protocol version is taken as the HDMI transmission protocol version this time.
再比如,DP一般支持最高分辨率的分辨率名称是4K。For another example, DP generally supports the highest resolution resolution name is 4K.
在又一种示例中,显示状态信息包括显示装置的尺寸时,则在执行S302中,图像处理装置可以将显示装置的尺寸所支持的最高分辨率确定为第二分辨率。从而输出的第二分辨率的图像能够满足状态向量中显示装置的尺寸的要求。此时第二分辨率的图像与显示装置相适应。In yet another example, when the display status information includes the size of the display device, in performing S302, the image processing device may determine the highest resolution supported by the size of the display device as the second resolution. Therefore, the output image of the second resolution can meet the size requirement of the display device in the state vector. At this time, the second resolution image is adapted to the display device.
在又一种示例中,显示状态信息包括显示装置的分辨率和显示装置的接口类型时,则在执行S302中,图像处理装置可以将显示装置的接口类型所支持的最高分辨率与显示装置的分辨率中的最小值确定为第二分辨率。从而输出的第二分辨率的图像能够满足状态向量中显示装置的尺寸、显示装置的分辨率的要求。此时第二分辨率的图像与显示装置相适应。In another example, when the display status information includes the resolution of the display device and the interface type of the display device, then in execution S302, the image processing device may compare the highest resolution supported by the interface type of the display device with the interface type of the display device. The minimum value among the resolutions is determined as the second resolution. Therefore, the output image of the second resolution can meet the requirements of the size of the display device and the resolution of the display device in the state vector. At this time, the second resolution image is adapted to the display device.
比如,显示装置的接口类型为HDMI 2.0,支持的最高分辨率为4096×2160,而显示装置的分辨率为2048×1080,则可以确定第二分辨率为2048×1080。For example, if the interface type of the display device is HDMI 2.0, the highest resolution supported is 4096×2160, and the resolution of the display device is 2048×1080, it can be determined that the second resolution is 2048×1080.
在又一种示例中,显示状态信息包括显示装置的尺寸和显示装置的分辨率时,则在执行S302中,图像处理装置将显示装置的尺寸所支持的最高分辨率与显示装置的分辨率中的最小值确定为第二分辨率。In another example, when the display status information includes the size of the display device and the resolution of the display device, then in execution S302, the image processing device compares the highest resolution supported by the size of the display device with the resolution of the display device. The minimum value of is determined as the second resolution.
在又一种示例中,显示状态信息包括显示装置的尺寸、显示装置的接口类型和显示装 置的分辨率时,则在执行S302中,图像处理装置可以将显示装置的尺寸所支持的最高分辨率、显示装置的接口类型所支持的最高分辨率、以及显示装置的分辨率中的最小值确定为第二分辨率。In another example, when the display status information includes the size of the display device, the interface type of the display device, and the resolution of the display device, then in execution S302, the image processing device can set the highest resolution supported by the size of the display device The minimum value among the highest resolution supported by the interface type of the display device and the resolution of the display device is determined as the second resolution.
在基于显示装置的显示状态信息(比如显示装置的分辨率、尺寸或者接口类型)确定目标分辨率(第二分辨率)时,选择显示装置足以支持的分辨率作为目标分辨率,比如显示装置的分辨率较高时,输出分辨率较高的输出图像,提升用户体验,当显示装置的分辨率较低时,限制输出分辨率,降低超分辨率算法执行性能需求和功耗。再比如,显示装置的分辨率较高且尺寸和接口类型均足以支撑该分辨率,则输出分辨率较高的输出图像,当显示装置的分辨率较低,但尺寸和接口类型不足以支撑该分辨率时,限制输出分辨率,降低超分辨率算法执行性能需求和功耗。When determining the target resolution (second resolution) based on the display status information of the display device (such as the resolution, size, or interface type of the display device), select the resolution that the display device can support as the target resolution, such as When the resolution is higher, the output image with higher resolution is output, which improves the user experience. When the resolution of the display device is lower, the output resolution is limited, and the performance requirements and power consumption of super-resolution algorithm execution are reduced. For another example, if the resolution of the display device is high and the size and interface type are sufficient to support the resolution, then the output image with the higher resolution will be output. When the resolution of the display device is low, but the size and interface type are not enough to support the resolution. At the resolution, the output resolution is limited, and the performance requirements and power consumption of the super-resolution algorithm are reduced.
S303,所述机顶盒根据所述第一目标倍率选择至少一种超分辨率转换算法将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像。S303: The set-top box selects at least one super-resolution conversion algorithm according to the first target magnification to enlarge the source image at the first target magnification to obtain a target image with a second resolution.
应理解的是,本申请实施例还可以适用于降低图像的分辨率,即第二分辨率可以低于或者等于第一分辨率。比如,本申请实施例可以配置小于1、等于1、大于1的倍率的超分辨率转换算法。后续描述时,以放大第一分辨率为例进行说明,即以放大输入图像的分辨率为例进行说明。It should be understood that the embodiments of the present application may also be suitable for reducing the resolution of an image, that is, the second resolution may be lower than or equal to the first resolution. For example, the embodiment of the present application may be configured with a super-resolution conversion algorithm with a magnification ratio of less than 1, equal to 1, and greater than 1. In the subsequent description, the first resolution is enlarged as an example, that is, the resolution of the input image is enlarged as an example.
在一种可能的实施方式中,本申请实施例中在根据状态信息确定目标倍率时,可以通过映射的方式,比如针对状态信息中包括的参数x i,确定该输入状态函数f i(x),f i(x)可以包括映射和/或归一化得到状态量;构建输入状态向量X=[x 1,x 2,…x n] T;状态映射规则可以通过状态映射函数F(X)表示,用于输出超分控制量,比如目标倍率。示例性地,F(X)=AX+B。本申请实施例中以目标倍率为例。 In a possible implementation manner, in the embodiment of the present application, when determining the target magnification according to the state information, the input state function f i (x) may be determined by mapping, for example, for the parameter x i included in the state information , F i (x) can include mapping and/or normalization to obtain the state quantity; construct the input state vector X=[x 1 ,x 2 ,...x n ] T ; the state mapping rule can be through the state mapping function F(X) Indicates that it is used to output the over-divided control amount, such as target magnification. Illustratively, F(X)=AX+B. In the embodiments of this application, the target magnification is taken as an example.
示例性地,图像处理装置在根据状态信息以及第一分辨率确定第一目标倍率时,可以先基于状态信息和第一分辨率构建状态向量,状态向量包括分别用于指示状态信息包括的参数值和第一分辨率的状态量;然后在根据状态映射规则确定状态向量所映射的第一目标倍率。以状态信息包括显示装置的分辨率、尺寸以及接口类型。状态向量中可以包括4个状态量。比如状态向量表示为X=[x 1,x 2,x 3,x 4] T,x 1,x 2,x 3,x 4可以分别用于指示第一分辨率、显示装置的分辨率、尺寸以及接口类型。将状态向量作为F(X)的输入得到目标分辨率。 Exemplarily, when the image processing apparatus determines the first target magnification according to the state information and the first resolution, it may first construct a state vector based on the state information and the first resolution, and the state vector includes parameter values respectively used to indicate that the state information includes And the state quantity of the first resolution; and then the first target magnification mapped by the state vector is determined according to the state mapping rule. The status information includes the resolution, size, and interface type of the display device. The state vector can include 4 state quantities. For example, the state vector is expressed as X=[x 1 , x 2 , x 3 , x 4 ] T , x 1 , x 2 , x 3 , x 4 can be used to indicate the first resolution, the resolution and size of the display device, respectively And the type of interface. Use the state vector as the input of F(X) to get the target resolution.
在一种可能的实施方式中,图像处理装置确定第二分辨率后,在执行S303时,图像处理装置确定目标倍率后,采用本申请实施例提供的受控超分辨率转换方式将具有第一分辨率的源图像放大第一目标倍率得到具有第二分辨率的目标图像。受控超分辨率转换方式是输出分辨率可控的超分辨率转换方式。In a possible implementation manner, after the image processing apparatus determines the second resolution, when S303 is performed, after the image processing apparatus determines the target magnification, the controlled super-resolution conversion method provided in this embodiment of the application will have the first resolution. The source image of the resolution is enlarged at the first target magnification to obtain the target image of the second resolution. The controlled super-resolution conversion method is a super-resolution conversion method with a controllable output resolution.
在本申请实施例中,将目标倍率作为选择超分辨率算法的选择依据和执行分辨率转换次数的依据,比如选择目标倍率的超分辨率算法执行一次分辨率转换,再比如可以选择一种超分辨率算法执行多次分辨率转换,执行的次数可以根据目标倍率来确定,再比如在配置的多种超分辨率算法组合中选择组合倍率达到目标倍率的超分辨率组合。In the embodiment of this application, the target magnification is used as the basis for selecting the super-resolution algorithm and the number of resolution conversions. For example, the super-resolution algorithm of the target magnification is selected to perform a resolution conversion. For example, a super-resolution algorithm can be selected. The resolution algorithm performs multiple resolution conversions, and the number of executions can be determined according to the target magnification. Another example is to select a super-resolution combination with a combined magnification that reaches the target magnification among the multiple super-resolution algorithm combinations configured.
如下示例性地描述受控超分辨率转换方式。The controlled super-resolution conversion method is exemplarily described as follows.
第一种方式,采用超分辨率算法集,超分辨率算法集合中包括多种倍率的超分辨率算法。换句话说,超分辨率算法集中包括多种超分辨率算法,一种超分辨率算法对应一个倍率,不同的超分辨率算法对应的倍率不同。比如,参见图4所示,超分辨率算法集中包括×2超分辨率算法、×3超分辨率算法、×4超分辨率算法。可选的,倍率还可以是非整数 的,比如×2.25超分辨率算法、×3.5超分辨率算法和×4.25超分辨率算法。The first method uses a super-resolution algorithm set, which includes super-resolution algorithms with multiple magnifications. In other words, the super-resolution algorithm includes multiple super-resolution algorithms, one super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to different magnifications. For example, referring to Fig. 4, the super-resolution algorithm set includes ×2 super-resolution algorithm, ×3 super-resolution algorithm, and ×4 super-resolution algorithm. Optionally, the magnification may also be a non-integer, such as ×2.25 super-resolution algorithm, ×3.5 super-resolution algorithm, and ×4.25 super-resolution algorithm.
在一种方式下,图像处理装置将接收到的具有第一分辨率的源图像转换为具有第二分辨率的目标图像时,可以通过如下方式实现:In one manner, when the image processing apparatus converts the received source image with the first resolution into the target image with the second resolution, it can be implemented in the following manner:
图像处理装置根据目标倍率在超分辨率算法集中选择第一超分辨率算法,并采用第一超分辨率算法将具有第一分辨率的源图像转换为具有第二分辨率的目标图像,第一超分辨率算法为超分辨率算法集中倍率小于或者等于目标倍率的超分辨率算法中的倍率最大的超分辨率算法;其中,超分辨率算法集中包括第一超分辨率算法在内的多种超分辨率算法,一种超分辨率算法对应一个倍率,不同种的超分辨率算法对应的倍率不同。The image processing device selects the first super-resolution algorithm in the super-resolution algorithm set according to the target magnification, and uses the first super-resolution algorithm to convert the source image with the first resolution into the target image with the second resolution. The super-resolution algorithm is the super-resolution algorithm with the largest magnification among the super-resolution algorithms whose magnification is less than or equal to the target magnification; among them, the super-resolution algorithm focuses on multiple types including the first super-resolution algorithm Super-resolution algorithm, a super-resolution algorithm corresponds to one magnification, and different kinds of super-resolution algorithms correspond to different magnifications.
示例性地,超分辨率算法集中包括的超分辨率算法对应的倍率包括非整数时,图像处理装置在根据第一分辨率和第二分辨率确定目标倍率时,可以将第二分辨率与第一分辨率的比值确定为目标倍率。在超分辨率算法集中选择第一超分辨率算法时,选择小于或者等于目标倍率的超分辨率算法中,倍率最大的超分辨率算法。Exemplarily, when the magnification corresponding to the super-resolution algorithm included in the super-resolution algorithm set includes a non-integer, the image processing device may compare the second resolution with the first resolution when determining the target magnification according to the first resolution and the second resolution. The ratio of a resolution is determined as the target magnification. When selecting the first super-resolution algorithm in the super-resolution algorithm set, select the super-resolution algorithm with the largest magnification among the super-resolution algorithms less than or equal to the target magnification.
超分辨率算法集中包括的超分辨率算法对应的倍率也可以均为整数。图像处理装置在根据第一分辨率和第二分辨率确定目标倍率时,可以将第二分辨率与第一分辨率的比值向下取整后的值确定为目标倍率。比如,第二分辨率与第一分辨率的比值为3.5,则向下取整后的值为3,则目标倍率为3。在超分辨率算法集中选择第一超分辨率算法时,可以选择目标倍率所对应的第一超分辨率算法。当然第二分辨率与第一分辨率的比值为整数的情况,在这种情况下,比值即为目标倍率。The magnifications corresponding to the super-resolution algorithms included in the super-resolution algorithm set may also be integers. When the image processing device determines the target magnification according to the first resolution and the second resolution, the ratio of the second resolution to the first resolution may be rounded down to determine the target magnification. For example, if the ratio of the second resolution to the first resolution is 3.5, the rounded down value is 3, and the target magnification is 3. When the first super-resolution algorithm is selected in the super-resolution algorithm set, the first super-resolution algorithm corresponding to the target magnification can be selected. Of course, when the ratio of the second resolution to the first resolution is an integer, in this case, the ratio is the target magnification.
第二种方式,多阶超分辨率转换方式。该方式为终止时刻可控的转换方式。每次放大倍率可以相同或者不同。The second method is a multi-level super-resolution conversion method. This mode is a controllable conversion mode at the termination time. The magnification can be the same or different each time.
在第二种方式下,图像处理装置将具有第一分辨率的源图像转换为具有第二分辨率的目标图像时,可以通过如下方式实现:In the second way, when the image processing device converts the source image with the first resolution into the target image with the second resolution, it can be implemented in the following ways:
根据目标倍率对具有第一分辨率的源图像执行M次分辨率转换操作,得到具有第二分辨率的目标图像,M为大于0的整数;Performing M resolution conversion operations on the source image with the first resolution according to the target magnification to obtain the target image with the second resolution, where M is an integer greater than 0;
其中,当M大于1时,M次分辨率转换操作中,M次分辨率转换中采用的超分辨率算法的倍率乘积等于目标倍率;第i次分辨率转换操作得到的图像为第i+1次分辨率转换操作的输入,i+1为小于或者等于M且大于1的整数。Among them, when M is greater than 1, in M resolution conversion operations, the magnification product of the super-resolution algorithm used in M resolution conversion is equal to the target magnification; the image obtained by the i-th resolution conversion operation is the i+1 The input of the sub-resolution conversion operation, i+1 is an integer less than or equal to M and greater than 1.
M次分辨率转换操作中,所采用的超分辨率算法可以不同也可以相同。In the M resolution conversion operation, the super-resolution algorithm used may be different or the same.
在第一种可选的情况中,采用循环执行同一超分辨率算法的方式,即循环多次执行超分辨率算法时,每次放大倍率相同,在该第一种情况下,仅需在图像处理装置中配置一种超分辨率算法,即N=1,该超分辨率对应一种倍率即可,复杂度较低。比如每次放大倍率均为×2,执行M次,M为大于0的整数,M取不同值时,多阶超分辨率转换方式可以支持×2、×4、×8、……的目标倍率,如图4所示。每次通过超分辨率算法转换分辨率后,可以判断是否达到目标条件,如果达到,则终止,如果未达到继续执行分辨率转换。目标条件可以是目标分辨率或者目标倍率或者目标次数。In the first optional case, the same super-resolution algorithm is executed cyclically, that is, when the super-resolution algorithm is executed multiple times, the magnification is the same each time. In the first case, only the image A super-resolution algorithm is configured in the processing device, that is, N=1, and the super-resolution corresponds to one magnification, and the complexity is low. For example, each time the magnification is ×2, execute M times, M is an integer greater than 0, and when M takes a different value, the multi-level super-resolution conversion method can support the target magnification of ×2, ×4, ×8, ... ,As shown in Figure 4. Every time after the resolution is converted through the super-resolution algorithm, it can be judged whether the target condition is reached, if it is reached, it will be terminated, and if it is not reached, the resolution conversion will continue. The target condition may be a target resolution or a target magnification or a target number of times.
在该第一种情况下,以目标次数为例,参见图4所示,目标倍率与超分辨率算法的倍率的比值即为目标次数。图像处理装置采用超分辨率算法将具有第一分辨率的源图像作为输入图像执行分辨率转换,并且对分辨率转换操作的次数进行计数,并确定计数结果是否达到目标次数,如果计数结果小于目标次数,将经过分辨率转换得到的图像作为输入图像继续采用超分辨率算法执行分辨率转换,直到计数结果达到目标次数为止;其中,计数结 果达到目标次数时,分辨率转换所得到的图像为所述目标图像。In the first case, taking the target times as an example, as shown in FIG. 4, the ratio of the target magnification to the magnification of the super-resolution algorithm is the target times. The image processing device uses a super-resolution algorithm to perform resolution conversion on the source image with the first resolution as the input image, and counts the number of resolution conversion operations, and determines whether the counting result reaches the target number of times, if the counting result is less than the target The resolution conversion is performed using the super-resolution algorithm as the input image until the count result reaches the target number of times. When the count result reaches the target number of times, the image obtained by the resolution conversion is The target image.
在该第一种情况下,以目标分辨率为例,比如第一分辨率为1280×720,第二分辨率为2560×1440,采用的第一超分辨率算法的倍率为×2,则针对第一分辨率的图像采用第一超分辨率算法执行完一次分辨率转换后,得到的分辨率不满足第二分辨率,再采用第一超分辨率算法执行一次分辨率转换,得到的分辨率为2560×1440,满足第二分辨率,停止执行。则第二次分辨率转换得到的图像为具有第二分辨率的目标图像。In the first case, take the target resolution as an example. For example, the first resolution is 1280×720, the second resolution is 2560×1440, and the magnification of the first super-resolution algorithm adopted is ×2, then After the first resolution image is converted using the first super-resolution algorithm, the resolution obtained does not meet the second resolution, and then the first super-resolution algorithm is used to perform a resolution conversion to obtain the resolution It is 2560×1440, which meets the second resolution, and stops execution. The image obtained by the second resolution conversion is the target image with the second resolution.
在第二种可选的情况下,在图像处理装置中配置多种超分辨率算法,每种超分辨率算法对应一种倍率,不同的超分辨率算法的倍率不同。多次执行超分辨率算法时,放大倍率可能不同或者相同。In the second optional case, multiple super-resolution algorithms are configured in the image processing device, each super-resolution algorithm corresponds to a magnification, and different super-resolution algorithms have different magnifications. When the super-resolution algorithm is executed multiple times, the magnification may be different or the same.
一种示例中,可以将目标倍率作为条件,在多种超分辨率算法中选择组合超分辨率算法,组合超分辨率算法中可以包括一种倍率的超分辨率算法或者多种倍率的超分辨率算法。组合超分辨率算法的倍率等于目标倍率。组合超分辨率算法的倍率为组合中包括的各个超分辨率算法的倍率乘积。In one example, the target magnification can be used as a condition, and the combined super-resolution algorithm can be selected from multiple super-resolution algorithms. The combined super-resolution algorithm can include one-rate super-resolution algorithm or multiple-rate super-resolution Rate algorithm. The magnification of the combined super-resolution algorithm is equal to the target magnification. The magnification of the combined super-resolution algorithm is the product of the magnifications of each super-resolution algorithm included in the combination.
比如,多种超分辨率算法中包括×2超分辨率算法、×3超分辨率算法两种。比如目标倍率为×4时,组合超分辨率算法中包括两个×2超分辨率算法,这两个×2超分辨率算法相同。再比如目标倍率为×6,组合超分辨率算法中包括×2超分辨率算法、×3超分辨率算法。再比如,目标倍率为×9,组合超分辨率算法中包括3个×3超分辨率算法,这3个×3超分辨率算法相同。作为一种示例,在多种超分辨率算法中选择超分辨率算法时,可以通过组合超分辨率算法的倍率与目标倍率的差值等条件作为代价通过代价函数,然后搜索最优组合。For example, the multiple super-resolution algorithms include ×2 super-resolution algorithms and ×3 super-resolution algorithms. For example, when the target magnification is ×4, the combined super-resolution algorithm includes two ×2 super-resolution algorithms, and the two ×2 super-resolution algorithms are the same. For another example, the target magnification is ×6, and the combined super-resolution algorithm includes ×2 super-resolution algorithm and ×3 super-resolution algorithm. For another example, if the target magnification is ×9, the combined super-resolution algorithm includes 3 ×3 super-resolution algorithms, and these 3 ×3 super-resolution algorithms are the same. As an example, when a super-resolution algorithm is selected from a variety of super-resolution algorithms, conditions such as the difference between the magnification of the super-resolution algorithm and the target magnification can be used as the cost to pass the cost function, and then the optimal combination can be searched.
作为另一种示例,可以预先配置不同倍率对应的组合策略表,例如,参见表1所示。As another example, a combination strategy table corresponding to different magnifications may be configured in advance, for example, see Table 1.
表1Table 1
组合倍率Combined magnification 策略Strategy
×2×2 ×2超分辨率算法×2 super resolution algorithm
×3×3 ×3超分辨率算法×3 super resolution algorithm
×4×4 ×2超分辨率算法,2次×2 super resolution algorithm, 2 times
×5×5 ×5超分辨率算法×5 super resolution algorithm
×6×6 ×2超分辨率算法,×3超分辨率算法×2 super-resolution algorithm, ×3 super-resolution algorithm
基于此,在一种可能的实施方式中,在确定第二分辨率(目标分辨率)时,可以不仅仅依据显示装置的显示状态,还可以依据视频流的流状态来确定,即状态信息中还可以包括视频流的流状态信息。图像处理装置在获取显示状态信息的同时,还可以获取流状态信息。流状态信息用于表征具有第一分辨率的源图像所属的视频流的流状态;示例性地,图像处理装置可以先根据流状态信息、显示状态信息确定目标图像的第二分辨率,然后再根据第一分辨率和第二分辨率确定目标倍率。第二分辨率的目标图像与视频流的流状态以及显示设备的显示性能相适应。Based on this, in a possible implementation manner, when determining the second resolution (target resolution), it can be determined not only based on the display state of the display device, but also based on the stream state of the video stream, that is, in the state information It can also include stream status information of the video stream. The image processing device can also acquire stream status information while acquiring display status information. The stream status information is used to characterize the stream status of the video stream to which the source image with the first resolution belongs; for example, the image processing apparatus may first determine the second resolution of the target image according to the stream status information and the display status information, and then The target magnification is determined according to the first resolution and the second resolution. The target image of the second resolution is adapted to the streaming state of the video stream and the display performance of the display device.
示例性地,流状态信息包括视频流的帧率和/或用于表示视频流的格式的参数。不同的视频流的帧率所支持的分辨率可能存在不同。不同的视频流的格式所支持的分辨率可能存在不同。Exemplarily, the stream state information includes the frame rate of the video stream and/or parameters used to indicate the format of the video stream. The resolution supported by the frame rate of different video streams may be different. Different video stream formats may support different resolutions.
不同的显示装置的接口类型,可能在不同的帧率下,支持不同的分辨率。比如,HDMI: HDMI 1.3支持1080P/120FPS(每秒传输帧数,frames per second),HDMI 1.4支持4K/30FPS或者2K/60FPS,HDMI 2.0支持4K/60FPS。The interface types of different display devices may support different resolutions at different frame rates. For example, HDMI: HDMI 1.3 supports 1080P/120FPS (frames per second), HDMI 1.4 supports 4K/30FPS or 2K/60FPS, HDMI 2.0 supports 4K/60FPS.
在一种示例中,显示状态信息中包括显示装置的接口类型,流状态信息中包括视频流的帧率。图像处理装置在根据流状态信息以及显示状态信息确定第二分辨率时,可以将显示装置的接口类型在视频流的帧率下所支持的最高分辨率确定为第二分辨率。In an example, the display status information includes the interface type of the display device, and the stream status information includes the frame rate of the video stream. When the image processing device determines the second resolution according to the stream status information and the display status information, it may determine the highest resolution supported by the interface type of the display device at the frame rate of the video stream as the second resolution.
比如显示装置的接口为HDMI 1.4时,对于30FPS码流,确定第二分辨率为4K分辨率,对于60FPS码流,确定第二分辨率为2K分辨率,对于120FPS码流,确定第二分辨率为1080P分辨率。再比如显示装置的接口为HDMI2.0时,对于60FPS(或小于60FPS)码流,确定第二分辨率为4K分辨率,对于120FPS码流,确定第二分辨率为2K分辨率;又比如显示装置的接口为DP时,对于60FPS(或小于60FPS)码流,确定第二分辨率为4K分辨率,对于120FPS码流,确定第二分辨率为2K分辨率。For example, when the interface of the display device is HDMI 1.4, for a 30FPS stream, the second resolution is determined to be 4K resolution, for a 60FPS stream, the second resolution is determined to be 2K resolution, and for a 120FPS stream, the second resolution is determined It is 1080P resolution. For another example, when the interface of the display device is HDMI2.0, for 60FPS (or less than 60FPS) stream, the second resolution is determined to be 4K resolution, and for 120FPS stream, the second resolution is determined to be 2K resolution; another example is display When the interface of the device is DP, for a 60FPS (or less than 60FPS) code stream, the second resolution is determined to be 4K resolution, and for a 120FPS code stream, the second resolution is determined to be 2K resolution.
当码流帧率或码流分辨率可匹配本图像处理装置的可用资源时,实施一定倍数的超分辨率算法,提高输出分辨率,提升用户体验;当码流帧率过高时,图像处理资源可能不足以支撑超分辨率算法的要求,可降低目标分辨率,降低目标倍率,减少对图像处理资源需求,防止出现卡顿等不良影响。When the code stream frame rate or code stream resolution can match the available resources of the image processing device, a certain multiple of super-resolution algorithm is implemented to increase the output resolution and improve user experience; when the code stream frame rate is too high, image processing The resources may not be enough to support the requirements of the super-resolution algorithm. The target resolution can be reduced, the target magnification can be reduced, the demand for image processing resources can be reduced, and the occurrence of jams and other adverse effects can be prevented.
在另一种示例中,显示状态信息中包括显示装置的接口类型和显示装置的分辨率,流状态信息中包括视频流的帧率。图像处理装置在根据流状态信息以及显示状态信息确定第二分辨率时,可以将显示装置的接口类型在视频流的帧率下所支持的最高分辨率,与显示装置的分辨率中的最小分辨率确定为第二分辨率。In another example, the display status information includes the interface type of the display device and the resolution of the display device, and the stream status information includes the frame rate of the video stream. When the image processing device determines the second resolution according to the stream status information and the display status information, it can distinguish the highest resolution supported by the interface type of the display device at the frame rate of the video stream from the smallest resolution of the display device The rate is determined as the second resolution.
比如,显示装置的分辨率为4K分辨率,第一分辨率为720P分辨率,显示装置的接口为HDMI 1.4,视频流的帧率为60FPS,则可以确定第二分辨率为2K分辨率。For example, if the resolution of the display device is 4K resolution, the first resolution is 720P resolution, the interface of the display device is HDMI 1.4, and the frame rate of the video stream is 60FPS, it can be determined that the second resolution is 2K resolution.
一般性的,倍率越高的超分辨率算法,计算越复杂,运行超分辨率算法所需内存/处理资源占用越多。基于此,可以需提前预置的内存/处理资源占用警戒判定条件(作为预设条件),比如内存占用率不大于80%,处理器占用不大于80%,或者,两者加权平均不大于75%。基于此,本申请实施例可以根据图像处理装置的存储资源和/或处理资源的占用情况来确定是否降低目标倍率。In general, the higher the magnification of the super-resolution algorithm, the more complex the calculation, the more memory/processing resources are required to run the super-resolution algorithm. Based on this, pre-set memory/processing resource occupancy alert determination conditions (as preset conditions) may be required, for example, the memory occupancy rate is not more than 80%, the processor occupancy is not more than 80%, or the weighted average of the two is not more than 75 %. Based on this, the embodiment of the present application can determine whether to reduce the target magnification according to the occupancy of storage resources and/or processing resources of the image processing apparatus.
应理解的是,在确定第一目标倍率时,采用的状态信息可以包括显示状态信息和流状态信息中的一个或者多个参数,不同的参数所支持的最大分辨率不同,从而在状态信息中包括多个参数时,确定第二分辨率时,取多个参数所支持的分辨率中的最小分辨率作为第二分辨率。比如状态信息中包括两个参数,分别为显示装置的分辨率和传输接口类型,则第二分辨率为显示装置的分辨率和传输接口类型所支持的分辨率中的最小值。再比如,状态信息中包括传输接口的类型以及帧率,不同帧率下、传输接口的类型所支持分辨率不同,因此可以将该帧率下,传输接口所支持的分辨率作为第二分辨率。It should be understood that when determining the first target magnification, the state information used may include one or more parameters in the display state information and the stream state information. The maximum resolution supported by different parameters is different, so that the state information is When multiple parameters are included, when determining the second resolution, the smallest resolution among the resolutions supported by the multiple parameters is taken as the second resolution. For example, the status information includes two parameters, which are the resolution of the display device and the transmission interface type, and the second resolution is the minimum value of the resolution of the display device and the resolution supported by the transmission interface type. For another example, the status information includes the type and frame rate of the transmission interface. At different frame rates, the type of transmission interface supports different resolutions, so the resolution supported by the transmission interface at this frame rate can be used as the second resolution. .
在一种可能的实施方式中,状态信息还包括流状态信息时,构建的状态向量中还包括用于指示流状态信息包括的参数的状态量。以状态信息包括显示装置的分辨率、尺寸以及接口类型、帧率以及图像流格式。状态向量中可以包括6个状态量。比如状态向量表示为X=[x 1,x 2,x 3,x 4,x 5,x 6] T,x 1,x 2,x 3,x 4,x 5,x 6可以分别用于指示第一分辨率、显示装置的分辨率、尺寸、接口类型、帧率、图像流的格式。将第一状态向量作为F(X)的输入得到第一目标分辨率。需要说明的是,参数对应的状态量在状态向量中的顺序根据F(X)的需要预先配置好的。 In a possible implementation manner, when the state information further includes flow state information, the constructed state vector also includes a state quantity used to indicate the parameters included in the flow state information. The status information includes the resolution, size, interface type, frame rate, and image stream format of the display device. The state vector can include 6 state quantities. For example, the state vector is expressed as X=[x 1 ,x 2 ,x 3 ,x 4 ,x 5 ,x 6 ] T , x 1 ,x 2 ,x 3 ,x 4 ,x 5 ,x 6 can be used to indicate The first resolution, the resolution, size, interface type, frame rate, and image stream format of the display device. The first state vector is used as the input of F(X) to obtain the first target resolution. It should be noted that the order of the state variables corresponding to the parameters in the state vector is pre-configured according to the needs of F(X).
示例性地,图像处理装置在根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作的过程中,获取图像处理装置的资源运行状态信息;资源运行状态信息用于指示图像处理装置上资源的运行状态;图像处理装置在确定资源运行状态信息满足预设条件时,继续根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作。示例性地,图像处理装置在确定资源运行状态信息不满足预设条件时,缩小目标倍率,得到第二目标倍率,根据第二目标倍率对具有第一分辨率的源图像执行分辨率转换操作,得到分辨率放大缩小后的目标倍率的具有第三分辨率的第二目标图像,该第三分辨率为该第一分辨率放大第二目标倍率得到的分辨率。Exemplarily, the image processing device acquires the resource operating status information of the image processing device during the process of performing the resolution conversion operation on the source image with the first resolution according to the target magnification; the resource operating status information is used to indicate the image processing device The running state of the resource; when the image processing device determines that the resource running state information meets the preset condition, it continues to perform the resolution conversion operation on the source image with the first resolution according to the target magnification. Exemplarily, when determining that the resource operating state information does not meet the preset condition, the image processing apparatus reduces the target magnification to obtain the second target magnification, and performs a resolution conversion operation on the source image with the first resolution according to the second target magnification, Obtain a second target image with a third resolution at the target magnification after the resolution is enlarged and reduced, and the third resolution is the resolution obtained by enlarging the second target magnification by the first resolution.
应理解的是,图像处理装置上资源可以包括硬件资源和/或软件资源,本申请实施例中以硬件资源为例,比如处理器资源和内存资源。It should be understood that the resources on the image processing apparatus may include hardware resources and/or software resources. In the embodiments of the present application, hardware resources, such as processor resources and memory resources, are taken as examples.
示例性地,在受控超分辨率转换方式为第一种方式时,在依据显示装置的显示状态和/或视频流的流状态确定第二分辨率后,并根据第一分辨率和第二分辨率确定目标倍率后,可以将目标倍率对应的超分辨率算法试运行预设时长,在确定资源运行状态信息不满足预设条件时,缩小目标倍率,并在超分辨率算法集中选择缩小后的目标倍率所对应的第三超分辨率算法,采用第三超分辨率算法将具有第一分辨率的源图像转换为具有第三分辨率的第二目标图像。比如,在缩小之前,目标倍率为×4,缩小后的目标倍率可以是×3。Exemplarily, when the controlled super-resolution conversion mode is the first mode, after the second resolution is determined according to the display status of the display device and/or the stream status of the video stream, the second resolution is determined according to the first resolution and the second resolution. After the resolution has determined the target magnification, the super-resolution algorithm corresponding to the target magnification can be tested for a preset time. When it is determined that the resource operating status information does not meet the preset conditions, the target magnification is reduced, and the reduction is selected in the super-resolution algorithm set The third super-resolution algorithm corresponding to the target magnification of, uses the third super-resolution algorithm to convert the source image with the first resolution into the second target image with the third resolution. For example, before the reduction, the target magnification is ×4, and the target magnification after the reduction may be ×3.
示例性地,在受控超分辨率转换方式为第二种方式时,根据第一分辨率和第二分辨率确定目标倍率后,以第一种情况为例,可以将循环执行同一超分辨率算法的方式,执行预设时长,监测到资源运行状态信息不满足预设条件时,可以缩小循环执行同一超分辨率算法的次数,也就是缩小目标倍率,按照缩小后的次数循环执行同一超分辨率算法将具有第一分辨率的源图像转换为具有第三分辨率的第二目标图像。以第二种情况为例,可以将组合超分辨率算法执行预设时长,监测到资源运行状态信息不满足预设条件时,缩小目标倍率,按照缩小后的目标倍率重新确定组合超分辨率算法,并采用重新确定的组合超分辨算法执行分辨率转换操作。Exemplarily, when the controlled super-resolution conversion method is the second method, after the target magnification is determined according to the first resolution and the second resolution, taking the first case as an example, the same super-resolution can be executed repeatedly The algorithm is executed for the preset time, and when the resource running status information does not meet the preset conditions, the number of cycles to execute the same super-resolution algorithm can be reduced, that is, the target magnification is reduced, and the same super-resolution cycle is executed according to the reduced number of times The rate algorithm converts the source image with the first resolution into the second target image with the third resolution. Taking the second case as an example, the combined super-resolution algorithm can be executed for a preset time, and when the resource operating status information is monitored that does not meet the preset conditions, the target magnification is reduced, and the combined super-resolution algorithm is re-determined according to the reduced target magnification , And use the newly determined combined super-resolution algorithm to perform resolution conversion operations.
图像处理装置资源运行状态信息,选择处理器占用率和内存占用率等系统资源运行状态信息。例如,处理器占用率=[0~100%],内存占用率=[0~100%]。当处理器占用率或内存占用率过高时,不足以支撑超分算法对设备资源的要求,可降低输出分辨率以减少对设备资源的需求程度,防止出现卡顿等不良影响;当处理器或内存资源满足需求时,可提高输出分辨率提升用户体验。Image processing device resource operating status information, selecting processor occupancy rate and memory occupancy rate and other system resource operating status information. For example, processor occupancy rate=[0-100%], memory occupancy rate=[0-100%]. When the processor occupancy rate or memory occupancy rate is too high, it is not enough to support the device resource requirements of the super-resolution algorithm. The output resolution can be reduced to reduce the demand for device resources and prevent adverse effects such as jams; Or when the memory resources meet the demand, the output resolution can be increased to enhance the user experience.
基于同一发明构思,本申请实施例提供了一种图像处理装置,该装置具有实现上述任一方法实施例提供的图像处理方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。Based on the same inventive concept, an embodiment of the present application provides an image processing device, which has the function of implementing the image processing method provided by any of the foregoing method embodiments. This function can be realized by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
本申请实施例提供的一种图像处理装置102,可以具有如图2所示的结构,其中,处理单元201可用于执行本申请方法侧实施例所示的步骤S301、S302和S303。An image processing device 102 provided by an embodiment of the present application may have a structure as shown in FIG. 2, wherein the processing unit 201 may be configured to execute steps S301, S302, and S303 shown in the method-side embodiment of the present application.
一种示例中,本申请实施例提供的另一种图像处理装置102的结构如图5所示,该图像处理装置可包括状态监控模块501和超分辨率转换模块502。状态监控模块501可用于执行本申请实施例方法S301所述步骤,受控超分辨率模块502可用于执行申请实施例方法S302所述步骤。In an example, the structure of another image processing device 102 provided in an embodiment of the present application is shown in FIG. 5. The image processing device may include a state monitoring module 501 and a super-resolution conversion module 502. The state monitoring module 501 may be used to perform the steps described in the method S301 of the embodiment of the present application, and the controlled super-resolution module 502 may be used to perform the steps described in the method S302 of the embodiment of the present application.
采用上述结构,图像处理装置102中的状态监控模块501可以用于监控状态控制信息。状态控制信息(可以简称为状态信息)可以包括显示装置的显示状态信息,如果待处理的 图像属于视频流中的帧图像,状态控制信息中还可以包括视频流的流状态信息和/或资源运行状态信息。受控超分辨率模块502根据状态控制信息将具有第一分辨率的源图像转换为具有第二分辨率的目标图像。With the above structure, the status monitoring module 501 in the image processing device 102 can be used to monitor status control information. The status control information (may be referred to as status information for short) can include the display status information of the display device. If the image to be processed belongs to the frame image in the video stream, the status control information can also include the stream status information and/or resource operation of the video stream. status information. The controlled super-resolution module 502 converts the source image with the first resolution into the target image with the second resolution according to the state control information.
示例性地,受控超分辨率模块502中可以包括状态控制模块502A以及分辨率转换模块502B。状态控制模块502A用于根据状态控制信息确定目标倍率。具体的,状态控制模块502A根据状态控制信息确定第二分辨率,并根据第二分辨率确定目标倍率。分辨率转换模块502B用于根据目标倍率对具有第一分辨率的源图像执行分辨率转换操作,得到分辨率放大目标倍率的具有第二分辨率的目标图像。Exemplarily, the controlled super-resolution module 502 may include a state control module 502A and a resolution conversion module 502B. The state control module 502A is used to determine the target magnification according to the state control information. Specifically, the state control module 502A determines the second resolution according to the state control information, and determines the target magnification according to the second resolution. The resolution conversion module 502B is configured to perform a resolution conversion operation on the source image with the first resolution according to the target magnification to obtain the target image with the second resolution with the resolution magnification target magnification.
示例性地,图像处理装置102还可以包括预处理模块503,预处理模块503用于对来自信号源的图像执行图像预处理,并将经过图像预处理的图像输入到受控超分辨率模块502。图像预处理的主要目的是消除图像中无关的信息,恢复有用的真实信息,增强有关信息的可检测性和最大限度地简化数据。比如图像预处理可以包括平滑、滤波等操作。Exemplarily, the image processing device 102 may further include a preprocessing module 503, which is used to perform image preprocessing on the image from the signal source, and input the image preprocessed into the controlled super-resolution module 502 . The main purpose of image preprocessing is to eliminate irrelevant information in the image, restore useful real information, enhance the detectability of related information and simplify data to the greatest extent. For example, image preprocessing can include operations such as smoothing and filtering.
示例性地,图像处理装置102还可以包括后处理模块504,后处理模块504用于对受控超分辨率模块502输出的图像执行后处理操作,比如降噪、图像增强等。后处理模块504将经过后处理操作后的图像输入到显示装置。Exemplarily, the image processing device 102 may further include a post-processing module 504 configured to perform post-processing operations on the image output by the controlled super-resolution module 502, such as noise reduction and image enhancement. The post-processing module 504 inputs the image after the post-processing operation to the display device.
作为一种示例,本申请实施例中的图像预处理操作与后处理操作也可以通过一个模块来执行,也就是说,预处理模块503和后处理模块504可以合并为一个模块。As an example, the image pre-processing operation and post-processing operation in the embodiment of the present application can also be performed by one module, that is, the pre-processing module 503 and the post-processing module 504 can be combined into one module.
示例性的,状态监控模块501、超分辨率转换模块502、预处理模块503以及后处理模块504的功能可以由处理单元201实现。具体的,状态监控模块501、超分辨率转换模块502、预处理模块503以及后处理模块504可以对应于处理单元201。Exemplarily, the functions of the state monitoring module 501, the super-resolution conversion module 502, the pre-processing module 503, and the post-processing module 504 may be implemented by the processing unit 201. Specifically, the state monitoring module 501, the super-resolution conversion module 502, the pre-processing module 503, and the post-processing module 504 may correspond to the processing unit 201.
例如,参见图6所示示例性地描述图像处理装置102包括的各个模块交互流程示意图。信号源的图像在输入到图像处理装置102后,首先经由预处理模块503处理,完成基本的图像预处理后,输入到受控超分辨率模块502的分辨率转换模块502B;状态控制模块502A接收状态监控模块501输入状态控制向量(后简称状态向量),完成状态向量向超分辨率算法(简称为超分算法)控制量(可以简称为超分控制量)的转化映射;分辨率转换模块502B在执行对经预处理模块503处理后的分辨率转换操作时,由状态控制模块502A生成的超分控制量控制;后处理模块504对超分辨率算法输出的高分辨率图像实施相关图像后处理操作。示例性的,超分控制量可以是目标倍率。图6中以受控超分辨率模块502采用第二种方式的第一种情况为例进行说明。For example, referring to FIG. 6 for an exemplary description of the interaction flow diagram of each module included in the image processing apparatus 102. After the image of the signal source is input to the image processing device 102, it is first processed by the preprocessing module 503. After the basic image preprocessing is completed, it is input to the resolution conversion module 502B of the controlled super-resolution module 502; the state control module 502A receives The state monitoring module 501 inputs the state control vector (hereinafter referred to as the state vector), and completes the conversion mapping of the state vector to the super-resolution algorithm (referred to as the super-resolution algorithm) control quantity (may be referred to as the super-resolution control quantity); resolution conversion module 502B When performing the resolution conversion operation processed by the pre-processing module 503, the super-division control amount generated by the state control module 502A is controlled; the post-processing module 504 performs related image post-processing on the high-resolution image output by the super-resolution algorithm operating. Exemplarily, the over-resolution control amount may be the target magnification. In FIG. 6, the first case where the controlled super-resolution module 502 adopts the second method is taken as an example for illustration.
示例性地,为了便于理解,如下通过向量函数关系来描述本申请实施例提供的图像处理方法。状态监控模块501需根据具体业务场景,监控状态控制信息,构建状态控制信息对应的向量x i,i∈{1,2,…n},n为状态信息的总数量;例如,针对状态信息x i,确定该输入状态函数f i(x),f i(x)可以包括映射和/或归一化;构建输入状态控制向量X=[x 1,x 2,…x n] T;构建状态映射函数F(X)用于输出超分控制量,例如,目标倍率。示例性地,F(X)=AX+B。 Exemplarily, for ease of understanding, the image processing method provided in the embodiment of the present application is described by the following vector function relationship. The status monitoring module 501 needs to monitor status control information according to specific business scenarios, and construct a vector x i corresponding to the status control information, i∈{1,2,...n}, where n is the total number of status information; for example, for status information x i , determine the input state function f i (x), f i (x) may include mapping and/or normalization; construct the input state control vector X=[x 1 , x 2 ,...x n ] T ; construct the state The mapping function F(X) is used to output the over-division control amount, for example, the target magnification. Illustratively, F(X)=AX+B.
具体地,参见图7所示为状态监控模块501获取的状态控制信息的一种选择方案,以场景为电视机顶盒选择资源运行状态信息(如处理器占用率、内存占用率等)、输入源(即视频流)的流状态信息(如码流帧率、码流分辨率、码流格式等)和显示装置的显示状态信息(比如显示装置的分辨率、显示装置的尺寸、显示装置的接口类别等),作为超分辨率算法调控依据。Specifically, referring to FIG. 7 shows a selection scheme of the state control information acquired by the state monitoring module 501, the resource operation state information (such as processor occupancy rate, memory occupancy rate, etc.) and input source ( (I.e. video stream) stream status information (such as bit stream frame rate, bit stream resolution, bit stream format, etc.) and display status information of the display device (such as display device resolution, display device size, display device interface type Etc.) as the basis for super-resolution algorithm regulation.
受控超分辨率模块502基于状态控制向量X和输入图像(预处理后的图像),对输入 图像执行分辨率转换操作时,设P in为输入低分辨率图像,P out为输出高分辨率图像,X为输入的状态控制向量,F(X)为状态映射函数,S(P,F)为受控超分辨率转换方式对应的函数,其输入为低分辨率图像P in和状态控制量X,输出为高分辨率图像P out,则有 The super-resolution module 502 is controlled based on the state vector X and the input image (image after preprocessing) control, when performing the resolution conversion operation on the input image, the input is set low resolution image P in, P out is the output high-resolution image, X is input from the control state vector, F (X) is a state mapping function, S (P, F) as a function of the controlled super-resolution conversion corresponding manner, the input image P in low resolution and a state control amount X, the output is a high-resolution image P out , then there is
P out=S(P in,F(X))。 P out =S(P in ,F(X)).
具体的,在确定哪一种或者哪几种超分辨率算法,或者执行多少次超分辨率转换操作,可以根据F(X)输出的目标倍率确定。具体的确定目标倍率的方式可以参见前述对受控超分辨率转换方式的描述,此处不再赘述。F(X)为状态映射函数的状态映射操作有状态控制模块502A来执行,S(P,F)函数对应的执行操作由分辨率转换模块502B来执行。Specifically, determining which super-resolution algorithm or several super-resolution algorithms, or how many super-resolution conversion operations are performed, can be determined according to the target magnification output by F(X). For the specific method of determining the target magnification, refer to the foregoing description of the controlled super-resolution conversion method, which is not repeated here. The state mapping operation where F(X) is the state mapping function is executed by the state control module 502A, and the execution operation corresponding to the S(P, F) function is executed by the resolution conversion module 502B.
比如,受控超分辨率转换方式采用第一种方式,即超分辨率算法集,分辨率转换模块502B可以直接根据状态控制模块502A的输出选择执行哪一个超分算法。再比如,受控超分辨率转换方式采用第二种方式,即多阶超分辨率转换方式,以第一种情况为例,分辨率转换模块502B可以直接根据状态控制模块502A的输出确定执行分辨率转换操作的次数。以第二种情况为例,分辨率转换模块502B可以直接根据状态控制模块502A的输出选择组合超分辨率算法,将目标倍率作为终止条件,每采用一个超分辨率算法执行转换操作后更新F(X),判断转换的倍率是否达到目标倍率。例如:For example, the controlled super-resolution conversion method adopts the first method, that is, the super-resolution algorithm set. The resolution conversion module 502B can directly select which super-resolution algorithm to execute according to the output of the state control module 502A. For another example, the controlled super-resolution conversion method adopts the second method, that is, the multi-level super-resolution conversion method. Taking the first case as an example, the resolution conversion module 502B can directly determine to perform the resolution based on the output of the state control module 502A. The number of conversion operations. Taking the second case as an example, the resolution conversion module 502B can directly select the combined super-resolution algorithm based on the output of the state control module 502A, use the target magnification as the termination condition, and update F( X), judge whether the converted magnification reaches the target magnification. E.g:
Figure PCTCN2019085370-appb-000001
Figure PCTCN2019085370-appb-000001
示例性地,以图7所示的状态控制信息为例,以应用到电视机顶盒显示视频流各个帧图像为例。Illustratively, take the state control information shown in FIG. 7 as an example, and take the application to a TV set-top box to display each frame image of a video stream as an example.
A1:获取输入码流的分辨率Fps和帧率Rs;A1: Get the resolution Fps and frame rate Rs of the input code stream;
A2,获取电视机顶盒的输出的显示装置(电视机)的接口类别T、显示装置的分辨率Rd,确定输出分辨率上限Ro;A2. Obtain the interface category T of the display device (TV) output by the TV set-top box and the resolution Rd of the display device, and determine the upper limit Ro of the output resolution;
示例性的,显示装置接口为VGA时,确定输出最大分辨率Rif为1080P;显示装置接口为DVI时,确定输出最大分辨率Rif为1080P;当显示装置的接口为HDMI1.3时,确定输出最大分辨率Rif为1080P;为HDMI1.4时,对于30FPS码流,确定输出最大分辨率Rif为4K,对于60FPS码流,确定输出最大分辨率Rif为2K,对于120FPS码流,确定输出最大分辨率Rif为1080P;为HDMI2.0时,对于60FPS(或小于60FPS)码流,确定输出最大分辨率Rif为4K,对于120FPS码流,确定输出最大分辨率Rif为2K;显示装置的接口为DP时,对于60FPS(或小于60FPS)码流,确定输出最大分辨率Rif为4K,对于120FPS码流,确定输出最大分辨率Rif为2K。Exemplarily, when the display device interface is VGA, the maximum output resolution Rif is determined to be 1080P; when the display device interface is DVI, the maximum output resolution Rif is determined to be 1080P; when the display device interface is HDMI1.3, the maximum output resolution is determined Resolution Rif is 1080P; for HDMI1.4, for 30FPS stream, determine the maximum output resolution Rif is 4K, for 60FPS stream, determine the maximum output resolution Rif is 2K, for 120FPS stream, determine the maximum output resolution Rif is 1080P; when it is HDMI2.0, for 60FPS (or less than 60FPS) stream, determine the maximum output resolution Rif is 4K, for 120FPS stream, determine the maximum output resolution Rif is 2K; when the interface of the display device is DP For a code stream of 60FPS (or less than 60FPS), the maximum output resolution Rif is determined to be 4K, and for a code stream of 120FPS, the maximum output resolution Rif is determined to be 2K.
结合显示设备的分辨率Rd和输出最大分辨率Rif,取其中较小的值,作为输出分辨率上限Ro。Combine the resolution Rd of the display device and the maximum output resolution Rif, and take the smaller value as the upper limit Ro of the output resolution.
A3,根据输入码流的分辨率Rs和输出分辨率上限Ro,推导出需要目标倍率Sr;A3, according to the resolution Rs of the input code stream and the upper limit Ro of the output resolution, deduce the required target magnification Sr;
Sraw=Ro/Rs;Sraw=Ro/Rs;
示例性地,若Sraw为非整数,可以选择小于Sraw且与Sraw最接近的正整数作为Sr。如Sraw=3.5,受控超分辨率算法支持×2,×3,×4,则Sr等于小于3.5且与3.5最接近的倍率为×3。Exemplarily, if Sraw is a non-integer, a positive integer smaller than Sraw and closest to Sraw can be selected as Sr. If Sraw=3.5, the controlled super-resolution algorithm supports ×2, ×3, ×4, then Sr is equal to less than 3.5 and the magnification closest to 3.5 is ×3.
A4,进一步基于内存和/或处理器占用资源警戒判定条件确定是否需要更新目标倍率。A4, further determining whether the target magnification needs to be updated based on the memory and/or processor occupation resource alert determination condition.
步骤1、基于A3得到目标倍率Sr,图像处理装置102可以试运行预设时长(比如1s) 超分辨率算法,并不向显示装置输出。Step 1. Based on A3 to obtain the target magnification Sr, the image processing device 102 may try to run the super-resolution algorithm for a preset duration (for example, 1 s) without outputting to the display device.
步骤2、检测实施目标倍率Sr的超分辨率算法的内存/处理器资源占用率。比如设置内存和/或处理器占用警戒条件为:1)内存占用率小于或者等于80%,2)处理器占用率小于或者等于80%,3)两者加权平均不大于75%,例如a*Lmem+b*Lpcs<=75%,其中Lmem表示内存占用率,Lpcs表示处理器占用率,a和b为加权系数。Step 2. Detect the memory/processor resource occupancy rate of the super-resolution algorithm implementing the target magnification Sr. For example, setting the memory and/or processor occupancy warning conditions are: 1) the memory occupancy rate is less than or equal to 80%, 2) the processor occupancy rate is less than or equal to 80%, 3) the weighted average of the two is not more than 75%, such as a* Lmem+b*Lpcs<=75%, where Lmem represents memory usage, Lpcs represents processor usage, and a and b are weighting coefficients.
步骤3、监测实施该目标倍率Sr超分算法后,确定是否触发内存/处理器占用警戒。Step 3. After monitoring the implementation of the target magnification Sr over-dividing algorithm, determine whether to trigger the memory/processor occupation alert.
比如以内存占用率的大小作为触发占用警戒的条件,若不满足条件1)时,则触发占用警戒。再比如以处理器占用率大小作为触发占用警戒的条件时,若不满足条件2),则触发占用警戒。再比如以处理器占用率大小和内存大小作为触发占用警戒的条件,一种方式是,若不满足条件1)和条件2)时,触发占用警戒;另一种方式是,若不满足条件3)时,触发占用警戒。For example, the size of the memory occupancy rate is used as the condition to trigger the occupancy alert. If the condition 1) is not met, the occupancy alert is triggered. For another example, when the processor occupancy rate is used as the condition for triggering the occupation alert, if the condition 2) is not met, the occupation alert is triggered. Another example is to use the processor occupancy rate and memory size as the conditions for triggering the occupancy alert. One way is to trigger the occupancy alert if conditions 1) and 2) are not met; the other way is if condition 3 is not met ), the occupation alert is triggered.
步骤4、若未触发内存/处理器占用警戒,则将当前输入目标Sr作为输出Sout;若触发内存/处理器占用警戒,则降低一档目标倍率得到Sr’。作为步骤1的输入执行步骤1,试运行1秒Sr’的超分辨率算法,查询实施该Sr’下超分辨率算法需要占用的内存/处理器资源,查询是否会触发内存占用警戒。基于步骤4得到最终的输出倍率Sout。Step 4. If the memory/processor occupancy alert is not triggered, the current input target Sr is used as the output Sout; if the memory/processor occupancy alert is triggered, the target multiplier is reduced by one level to obtain Sr'. As the input of step 1, execute step 1, test run the super-resolution algorithm of Sr' for 1 second, query the memory/processor resources required to implement the super-resolution algorithm under Sr', and query whether the memory occupation alert will be triggered. Based on step 4, the final output magnification Sout is obtained.
A5,使用Sout运行超分辨率算法,输入视频图像P in使用S(P in,Sout)输出高分辨率视频图像Pout。 A5, Sout run using super resolution algorithm, using an input video image P in S (P in, Sout) output high-resolution video image Pout.
例如,参见表2所示,示例一种不同的状态控制信息所对应的输出图像的输出分辨率。For example, see Table 2 to illustrate the output resolution of the output image corresponding to a different state control information.
表2Table 2
Figure PCTCN2019085370-appb-000002
Figure PCTCN2019085370-appb-000002
示例性地,在视频播放过程中,可间隔一定时长采样一次内存/处理器占用资源,判定是否触发内存/处理器占用警戒。若触发,则类似步骤4的做法,降低一档倍率,更新Sout采用更新后的Sout执行分辨率转换操作。Exemplarily, during the video playback process, the memory/processor occupancy resources may be sampled once at a certain interval to determine whether to trigger the memory/processor occupancy alert. If it is triggered, similar to the step 4, reduce the magnification by one level, and update Sout to perform the resolution conversion operation using the updated Sout.
应理解,上述图5所示的图像处理装置102中的状态监测模块501和受控超分辨率模块502可以由中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合来实现,其可以实现或执行结合本申请实施例公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号 处理器和微处理器的组合等等。另外,图像处理装置102可能包括的存储模块,可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。It should be understood that the state monitoring module 501 and the controlled super-resolution module 502 in the image processing device 102 shown in FIG. 5 can be composed of a central processing unit, a general-purpose processor, a digital signal processor, an application specific integrated circuit, and field programmable A gate array or other programmable logic devices, transistor logic devices, hardware components or any combination thereof can be implemented, which can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on. In addition, the storage module that the image processing apparatus 102 may include may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory.
示例性地,参见图8A所示,本申请实施例示例图像处理装置102的另一种可能的结构,包括主处理器801、存储器802以及视频处理器803。Exemplarily, referring to FIG. 8A, another possible structure of the image processing apparatus 102 in the embodiment of the present application includes a main processor 801, a memory 802, and a video processor 803.
一种示例中,主处理器801可用于支持图像处理装置102实现监控状态控制信息,以及执行分辨率转换操作。例如,主处理器801可用于监测状态控制信息,比如主处理器801可以执行的步骤S301所示的方法,主处理器801还可用于根据状态控制信息执行目标分辨率确定,基于根据目标分辨率调整输入图像的分辨率,比如主处理器801可以执行的步骤S302、S303所示的方法。主处理器801还可以执行本申请实施例提供的图像处理的相关功能以外的功能,比如接收来自信号源的图像信号,对图像信号进行解码操作,将解码后的图像信号发送给视频处理器803。视频处理器803可用于支持图像处理装置102实现视频信号处理的相关功能,例如,视频处理器803可用于执行图像预处理和后处理操作。主处理器801可以用于实现图5中的状态监测模块501、受控超分辨率模块502的相关功能。视频处理器803可以用于实现图5中预处理模块503和后处理模块504的相关功能,参见8B所示。存储器802用于支持主处理器801和视频处理器803调用存储器802中的计算机程序、指令以实现本申请实施例提供的视频处理方法中涉及的步骤,另外,存储器802还用于存储数据,比如用于存储超分辨率算法和相关配置参数。存储器802可以包括易失性和非易失性存储器两种,比如内存和硬盘。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DRRAM)。In an example, the main processor 801 may be used to support the image processing device 102 to implement monitoring state control information and perform resolution conversion operations. For example, the main processor 801 can be used to monitor status control information, such as the method shown in step S301 that can be executed by the main processor 801, and the main processor 801 can also be used to perform target resolution determination according to the status control information. Adjust the resolution of the input image, for example, the method shown in steps S302 and S303 that can be executed by the main processor 801. The main processor 801 can also perform functions other than the image processing related functions provided by the embodiments of the present application, such as receiving image signals from a signal source, decoding the image signals, and sending the decoded image signals to the video processor 803 . The video processor 803 may be used to support the image processing device 102 to implement related functions of video signal processing. For example, the video processor 803 may be used to perform image preprocessing and postprocessing operations. The main processor 801 may be used to implement related functions of the state monitoring module 501 and the controlled super-resolution module 502 in FIG. 5. The video processor 803 may be used to implement the related functions of the preprocessing module 503 and the postprocessing module 504 in FIG. 5, as shown in 8B. The memory 802 is used to support the main processor 801 and the video processor 803 to call computer programs and instructions in the memory 802 to implement the steps involved in the video processing method provided by the embodiments of the present application. In addition, the memory 802 is also used to store data, such as Used to store super-resolution algorithms and related configuration parameters. The memory 802 may include both volatile and non-volatile memory, such as memory and hard disk. Among them, the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electronic Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of exemplary but not restrictive description, many forms of RAM are available, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) ) And direct memory bus random access memory (direct rambus RAM, DRRAM).
另一种示例中,主处理器801可用于支持图像处理装置102实现监控状态控制信息,分辨率转换操作由视频处理器803执行。例如,主处理器801可用于监测状态控制信息,比如主处理器801可以执行的步骤S301所示的方法。主控制器801还可以执行本申请实施例提供的图像处理的相关功能以外的功能,比如接收来自信号源的图像信号,对图像信号进行解码操作,将解码后的图像信号发送给视频处理器803。视频处理器803可用于支持图像处理装置102实现视频信号处理的相关功能,例如视频处理器803可用于根据状态控制信息执行目标分辨率确定,基于根据目标分辨率调整输入图像的分辨率,比如视频处理器803可以执行的步骤S302、S303所示的方法。视频处理器803还可以用于执行图像预处理和后处理操作。主处理器801可以用于实现图5中的状态监测模块501的相关功能。视频处理器803可以用于实现图5中受控超分辨率模块502、预处理模块503和后处理模块504的相关功能,参见8C所示。在示例下,在获取图像处理装置102运行超分辨率算法时的处理资源占用率,是指视频处理器803的处理器占用率。In another example, the main processor 801 may be used to support the image processing device 102 to implement monitoring state control information, and the resolution conversion operation is performed by the video processor 803. For example, the main processor 801 can be used to monitor state control information, such as the method shown in step S301 that the main processor 801 can execute. The main controller 801 can also perform functions other than the image processing related functions provided by the embodiments of the present application, such as receiving image signals from a signal source, decoding the image signals, and sending the decoded image signals to the video processor 803 . The video processor 803 can be used to support the image processing device 102 to implement related functions of video signal processing. For example, the video processor 803 can be used to determine the target resolution according to the state control information, and adjust the resolution of the input image based on the target resolution, such as video The processor 803 may execute the methods shown in steps S302 and S303. The video processor 803 can also be used to perform image pre-processing and post-processing operations. The main processor 801 may be used to implement related functions of the state monitoring module 501 in FIG. 5. The video processor 803 can be used to implement the related functions of the controlled super-resolution module 502, the pre-processing module 503, and the post-processing module 504 in FIG. 5, as shown in 8C. In an example, acquiring the processing resource occupancy rate when the image processing apparatus 102 runs the super-resolution algorithm refers to the processor occupancy rate of the video processor 803.
应理解,如图8A和图8B所示的图像处理装置102仅示例性地体现了图像处理装置 102执行本申请实施例所涉及上述图像处理方法所需的结构,本申请实施例并不排除图像处理装置102还具有其他结构,例如,图像处理装置102还可包括显示装置,用于显示视频处理器1203输出的高分辨率图像;又例如,图像处理装置102还可包括必要的接口,以实现图像输入以及处理后的图像的输出。It should be understood that the image processing device 102 shown in FIG. 8A and FIG. 8B only exemplarily embodies the structure required by the image processing device 102 to execute the above-mentioned image processing method involved in the embodiment of the application, and the embodiment of the application does not exclude the image The processing device 102 also has other structures. For example, the image processing device 102 may also include a display device for displaying high-resolution images output by the video processor 1203; for another example, the image processing device 102 may also include necessary interfaces to implement Image input and output of processed images.
另外应理解,如图8A和图8B所示的图像处理装置102所执行的全部步骤,可以均由主处理器801完成,此时,图像处理装置102可以只包括主处理器801和存储器802。In addition, it should be understood that all steps performed by the image processing apparatus 102 shown in FIGS. 8A and 8B may be completed by the main processor 801. At this time, the image processing apparatus 102 may only include the main processor 801 and the memory 802.
在具体实现中,主处理器801、视频处理器803可以是中央处理器,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合,其可以实现或执行结合本申请实施例公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。另外在一种可能的实施方式中,视频处理器803所具备的功能也可以全部利用主处理器801通过软件实现。In specific implementation, the main processor 801 and the video processor 803 may be central processing units, general-purpose processors, digital signal processors, application specific integrated circuits, field programmable gate arrays or other programmable logic devices, transistor logic devices, hardware The components or any combination thereof can implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on. In addition, in a possible implementation manner, all the functions of the video processor 803 can also be implemented through software using the main processor 801.
示例性的,本申请实施例提供的图像处理装置102可应用于机顶盒、电视、手机等智能设备及具有分辨率转换处理功能的其他显示设备、图像处理设备中,用于支持以上设备实现本申请实施例提供的图像处理方法。Exemplarily, the image processing apparatus 102 provided in the embodiments of the present application can be applied to smart devices such as set-top boxes, televisions, mobile phones, and other display devices with resolution conversion processing functions, and image processing devices to support the above devices to realize the application. The image processing method provided by the embodiment.
示例性地,受控超分辨率模块502的功能所依赖的存储资源可以与其它模块的功能所依赖的存储资源加以区分。用于实现受控超分辨率模块502的功能的程序、指令可以配置在专用存储器,比如,专用内存资源和专用存储资源。超分辨率算法和配置参数存储于专用存储资源中,超分辨率算法的运行依赖专用内存资源。在示例下,在获取图像处理装置运行超分辨率算法时的内存占用率时,获取的是专用内存资源的占用率。Exemplarily, the storage resources on which the function of the controlled super-resolution module 502 depends can be distinguished from the storage resources on which the functions of other modules depend. Programs and instructions for implementing the functions of the controlled super-resolution module 502 may be configured in a dedicated memory, such as dedicated memory resources and dedicated storage resources. The super-resolution algorithm and configuration parameters are stored in a dedicated memory resource, and the operation of the super-resolution algorithm depends on a dedicated memory resource. In the example, when acquiring the memory occupancy rate when the image processing device runs the super-resolution algorithm, what is acquired is the occupancy rate of dedicated memory resources.
基于同一发明构思,本申请实施例提供了一种计算机程序产品,包括计算机程序,该计算机程序在某一计算机上执行时,将会使所述计算机实现上述任一图像处理方法实施例中所涉及的功能。Based on the same inventive concept, the embodiments of the present application provide a computer program product, including a computer program. When the computer program is executed on a computer, the computer will enable the computer to implement any of the above-mentioned image processing method embodiments. Function.
基于同一发明构思,本申请实施例提供了一种计算机程序,该计算机程序在某一计算机上执行时,将会使所述计算机实现上述任一图像处理方法实施例中所涉及的功能。Based on the same inventive concept, the embodiments of the present application provide a computer program, which, when executed on a computer, will enable the computer to implement the functions involved in any of the foregoing image processing method embodiments.
基于同一发明构思,本申请实施例提供了一种计算机可读存储介质,用于存储程序、指令,这些程序、指令在计算机中被调用执行时,可以使得计算机执行上述任一图像处理方法实施例中所涉及的功能。Based on the same inventive concept, the embodiments of the present application provide a computer-readable storage medium for storing programs and instructions. When these programs and instructions are invoked and executed in a computer, the computer can execute any of the above-mentioned image processing method embodiments. The functions involved in.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to the embodiments of this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the scope of the embodiments of the present application. In this way, if these modifications and variations of the embodiments of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.

Claims (27)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized by comprising:
    机顶盒接收源图像,所述源图像具有第一分辨率;The set-top box receives a source image, the source image having a first resolution;
    所述机顶盒获取状态信息;其中,所述状态信息包括用于表征显示装置的显示性能的显示状态信息,所述机顶盒与所述显示装置通过传输接口传输图像数据;The set-top box acquires state information; wherein the state information includes display state information used to characterize the display performance of a display device, and the set-top box and the display device transmit image data through a transmission interface;
    所述机顶盒根据所述状态信息以及所述第一分辨率为所述源图像确定放大的第一目标倍率;Determining, by the set-top box, a first target magnification for the source image according to the status information and the first resolution;
    所述机顶盒根据所述第一目标倍率选择至少一种超分辨率转换算法将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像,其中,具有所述第二分辨率的所述目标图像与所述显示装置的显示性能相适应。The set-top box selects at least one super-resolution conversion algorithm according to the first target magnification to enlarge the source image at the first target magnification to obtain a target image with a second resolution, where the second resolution is The target image is adapted to the display performance of the display device.
  2. 如权利要求1所述的方法,其特征在于,所述状态信息还包括用于表征所述源图像所属的视频流的流状态信息。The method according to claim 1, wherein the state information further includes stream state information used to characterize the video stream to which the source image belongs.
  3. 如权利要求1或2所述的方法,其特征在于,所述状态信息还包括资源运行状态信息,所述资源运行状态信息指示所述机顶盒上资源的运行状态。The method according to claim 1 or 2, wherein the status information further includes resource operating status information, and the resource operating status information indicates the operating status of the resources on the set-top box.
  4. 如权利要求1至3任一项所述的方法,其特征在于,所述机顶盒根据所述状态信息以及所述第一分辨率确定第一目标倍率,包括:The method according to any one of claims 1 to 3, wherein the set-top box determining the first target magnification according to the status information and the first resolution comprises:
    所述机顶盒根据所述状态信息和所述第一分辨率构建状态向量,所述状态向量包括分别用于指示所述状态信息的参数值和所述第一分辨率的状态量;The set-top box constructs a state vector according to the state information and the first resolution, and the state vector includes a parameter value for indicating the state information and a state quantity of the first resolution;
    所述机顶盒根据状态映射规则确定所述状态向量所映射的所述第一目标倍率。The set-top box determines the first target magnification mapped by the state vector according to the state mapping rule.
  5. 如权利要求1-4任一项所述的方法,其特征在于,所述机顶盒根据第一目标倍率选择至少一种超分辨率算法,将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像,包括:The method according to any one of claims 1 to 4, wherein the set-top box selects at least one super-resolution algorithm according to a first target magnification, and enlarges the source image to the first target magnification to obtain a Two-resolution target image, including:
    所述机顶盒根据所述第一目标倍率在超分辨率算法集中选择第一超分辨率算法,并采用第一超分辨率算法将所述源图像转换为所述目标图像;The set-top box selects a first super-resolution algorithm in a super-resolution algorithm set according to the first target magnification, and uses the first super-resolution algorithm to convert the source image into the target image;
    其中,所述第一超分辨率算法为超分辨率算法集中倍率小于或者等于所述第一目标倍率的超分辨率算法中倍率最大的超分辨率算法;所述超分辨率算法集中包括所述第一超分辨率算法在内的多种超分辨率算法,一种超分辨率算法对应一个倍率,不同的超分辨率算法对应的倍率不同。Wherein, the first super-resolution algorithm is a super-resolution algorithm with the largest magnification among super-resolution algorithms whose intensive magnification is less than or equal to the first target magnification; and the super-resolution algorithm includes the There are multiple super-resolution algorithms including the first super-resolution algorithm. One super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to different magnifications.
  6. 如权利要求1-4任一项所述的方法,其特征在于,所述机顶盒根据第一目标倍率选择至少一种超分辨率算法,将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像,包括:The method according to any one of claims 1 to 4, wherein the set-top box selects at least one super-resolution algorithm according to a first target magnification, and enlarges the source image to the first target magnification to obtain a Two-resolution target image, including:
    所述机顶盒根据所述第一目标倍率对所述具有所述第一分辨率的源图像执行M次分辨率转换操作,得到具有所述第二分辨率的目标图像,M为大于0的整数;The set-top box performs M resolution conversion operations on the source image with the first resolution according to the first target magnification to obtain the target image with the second resolution, where M is an integer greater than 0;
    其中,所述M次分辨率转换操作中,M次分辨率转换中采用的超分辨率算法的倍率乘积等于所述第一目标倍率;第i次分辨率转换操作得到的图像为第i+1次分辨率转换操作的输入,i+1为小于或者M且大于1的整数。Wherein, in the M resolution conversion operations, the magnification product of the super-resolution algorithm used in the M resolution conversion is equal to the first target magnification; the image obtained by the i-th resolution conversion operation is the i+1th The input of the sub-resolution conversion operation, i+1 is an integer less than or M and greater than 1.
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述显示状态信息包括所述显示装置的分辨率、所述显示装置的传输接口类型、或者所述显示装置的尺寸中的至少一项。The method according to any one of claims 1-6, wherein the display status information includes the resolution of the display device, the transmission interface type of the display device, or the size of the display device. At least one.
  8. 如权利要求2-7所述的方法,其特征在于,所述流状态信息包括视频流的帧率和/ 或用于表示图像流的格式的参数。8. The method according to claims 2-7, wherein the stream status information includes a frame rate of the video stream and/or a parameter used to represent the format of the image stream.
  9. 如权利要求3-8任一项所述的方法,其特征在于,所述资源运行状态信息包括处理资源占用率和/或存储资源占用率。The method according to any one of claims 3-8, wherein the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
  10. 如权利要求8所述的方法,其特征在于,根据所述状态信息以及所述第一分辨率为所述源图像确定放大的第一目标倍率,包括:The method according to claim 8, wherein determining a first target magnification for the source image according to the state information and the first resolution comprises:
    根据所述状态信息确定所述第二分辨率,并根据所述第一分辨率和所述第二分辨率确定所述第一目标倍率;Determining the second resolution according to the state information, and determining the first target magnification according to the first resolution and the second resolution;
    其中,所述第二分辨率为所述显示装置的分辨率;或者,Wherein, the second resolution is the resolution of the display device; or,
    所述第二分辨率为所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device; or,
    所述第二分辨率为所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum of the highest resolution supported by the size of the display device and the resolution of the display device; or,
    所述第二分辨率为所述显示装置的尺寸所支持的最高分辨率、所述显示装置的接口类型所支持的最高分辨率、以及所述显示装置的分辨率中的最小值;或者,The second resolution is the smallest value among the highest resolution supported by the size of the display device, the highest resolution supported by the interface type of the display device, and the resolution of the display device; or,
    所述第二分辨率为在所述视频流的帧率下,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device under the frame rate of the video stream; or,
    所述第二分辨率为所述视频流的帧率下,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum of the highest resolution supported by the interface type of the display device and the resolution of the display device at the frame rate of the video stream; or,
    所述第二分辨率为在采用所述视频流的帧率时,所述显示装置的接口类型所支持的最高分辨率、所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the maximum resolution of the display device when the frame rate of the video stream is used. The minimum value in resolution; or,
    所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device when the format of the image stream is adopted; or,
    所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device when the format of the image stream is adopted; or,
    所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率、所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the resolution of the display device when the format of the image stream is adopted. The smallest value in; or,
    所述第二分辨率为在采用所述视频流的帧率和所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device when the frame rate of the video stream and the format of the image stream are used; or,
    所述第二分辨率为在采用所述视频流的帧率和所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值。The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device when the frame rate of the video stream and the format of the image stream are used .
  11. 如权利要求3-9任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 3-9, wherein the method further comprises:
    所述机顶盒在采用所述至少一种分辨率转换算法对所述源图像执行放大第一目标倍率操作的过程中,获取所述资源运行状态信息;Acquiring, by the set-top box, the resource operating state information in a process of performing an operation of enlarging the first target magnification on the source image by using the at least one resolution conversion algorithm;
    所述机顶盒在确定所述资源运行状态信息满足预设条件时,继续根据所述第一目标倍率对所述源图像执行放大第一目标倍率操作。When determining that the resource operating state information meets a preset condition, the set-top box continues to perform an operation of zooming in on the source image at the first target magnification according to the first target magnification.
  12. 如权利要求11所述的方法,其特征在于,还包括:The method of claim 11, further comprising:
    在确定所述资源运行状态信息不满足预设条件时,缩小所述第一目标倍率得到第二目标倍率,根据缩小后的所述第二目标倍率对所述源图像执行放大操作,得到具有第三分辨 率的第二目标图像,所述第三分辨率为所述第一分辨率放大所述第二目标倍率得到的。When it is determined that the resource operating state information does not meet the preset condition, the first target magnification is reduced to obtain a second target magnification, and the source image is enlarged according to the reduced second target magnification to obtain a A three-resolution second target image, where the third resolution is obtained by enlarging the second target magnification of the first resolution.
  13. 一种图像处理方装置,其特征在于,应用于机顶盒,包括:An image processing device, characterized in that it is applied to a set-top box, and includes:
    传输接口,用于接收源图像,所述源图像具有第一分辨率;A transmission interface for receiving a source image, the source image having a first resolution;
    状态监控模块,用于获取状态信息,所述状态信息包括用于表征显示装置的显示性能的显示状态信息,所述机顶盒与所述显示装置通过所述传输接口传输图像数据;A status monitoring module, configured to obtain status information, the status information including display status information used to characterize the display performance of the display device, and the set-top box and the display device transmit image data through the transmission interface;
    超分辨率转换模块,用于根据所述状态信息以及所述第一分辨率为所述源图像确定放大的第一目标倍率;A super-resolution conversion module, configured to determine a first target magnification for the source image according to the state information and the first resolution;
    所述超分辨率转换模块,还用于根据所述第一目标倍率选择至少一种超分辨率转换算法将所述源图像放大所述第一目标倍率得到具有第二分辨率的目标图像,其中,具有所述第二分辨率的所述目标图像与所述显示装置的显示性能相适应。The super-resolution conversion module is further configured to select at least one super-resolution conversion algorithm according to the first target magnification to enlarge the source image at the first target magnification to obtain a target image with a second resolution, wherein , The target image with the second resolution is adapted to the display performance of the display device.
  14. 如权利要求13所述的装置,其特征在于,所述状态信息还包括:用于表征所述源图像所属的视频流的流状态信息。The apparatus according to claim 13, wherein the state information further comprises: stream state information used to characterize the video stream to which the source image belongs.
  15. 如权利要求13或14所述的装置,其特征在于,所述状态信息还包括:资源运行状态信息,所述资源运行状态信息指示所述机顶盒上资源的运行状态。The device according to claim 13 or 14, wherein the status information further comprises: resource running status information, and the resource running status information indicates the running status of the resource on the set-top box.
  16. 如权利要求13至15任一项所述的装置,其特征在于,所述超分辨率转换模块,具体用于:The device according to any one of claims 13 to 15, wherein the super-resolution conversion module is specifically configured to:
    根据所述状态信息和所述第一分辨率构建第一状态向量,所述第一状态向量包括分别用于指示所述状态信息的参数值和所述第一分辨率的状态量;根据第一状态映射规则确定所述第一状态向量所映射的所述第一目标倍率。Construct a first state vector according to the state information and the first resolution, where the first state vector includes a parameter value indicating the state information and a state quantity of the first resolution; The state mapping rule determines the first target magnification to which the first state vector is mapped.
  17. 如权利要求13-16任一项所述的装置,其特征在于,所述超分辨率转换模块,具体用于:The device according to any one of claims 13-16, wherein the super-resolution conversion module is specifically configured to:
    根据所述第一目标倍率在超分辨率算法集中选择第一超分辨率算法,并采用第一超分辨率算法将所述源图像转换为所述目标图像;Selecting a first super-resolution algorithm in a super-resolution algorithm set according to the first target magnification, and using the first super-resolution algorithm to convert the source image into the target image;
    其中,所述第一超分辨率算法为超分辨率算法集中倍率小于或者等于所述第一目标倍率的超分辨率算法中倍率最大的超分辨率算法;所述超分辨率算法集中包括所述第一超分辨率算法在内的多种超分辨率算法,一种超分辨率算法对应一个倍率,不同的超分辨率算法对应的倍率不同。Wherein, the first super-resolution algorithm is a super-resolution algorithm with the largest magnification among super-resolution algorithms whose intensive magnification is less than or equal to the first target magnification; and the super-resolution algorithm includes the There are multiple super-resolution algorithms including the first super-resolution algorithm. One super-resolution algorithm corresponds to one magnification, and different super-resolution algorithms correspond to different magnifications.
  18. 如权利要求13-16任一项所述的装置,其特征在于,所述超分辨率转换模块,具体用于:The device according to any one of claims 13-16, wherein the super-resolution conversion module is specifically configured to:
    根据所述第一目标倍率对所述具有所述第一分辨率的源图像执行M次分辨率转换操作,得到具有所述第二分辨率的目标图像,M为大于0的整数;Performing M resolution conversion operations on the source image with the first resolution according to the first target magnification to obtain the target image with the second resolution, where M is an integer greater than 0;
    其中,所述M次分辨率转换操作中,M次分辨率转换中采用的超分辨率算法的倍率乘积等于所述第一目标倍率;第i次分辨率转换操作得到的图像为第i+1次分辨率转换操作的输入,i+1为小于或者M且大于1的整数。Wherein, in the M resolution conversion operations, the magnification product of the super-resolution algorithm used in the M resolution conversion is equal to the first target magnification; the image obtained by the i-th resolution conversion operation is the i+1th The input of the sub-resolution conversion operation, i+1 is an integer less than or M and greater than 1.
  19. 如权利要求13-18任一项所述的方法,其特征在于,所述显示状态信息包括所述显示装置的分辨率、所述显示装置的传输接口类型、或者所述显示装置的尺寸中的至少一项。The method according to any one of claims 13-18, wherein the display status information includes the resolution of the display device, the transmission interface type of the display device, or the size of the display device. At least one.
  20. 如权利要求14-19任一项所述的装置,其特征在于,所述流状态信息包括视频流的帧率和/或用于表示图像流的格式的参数。The device according to any one of claims 14-19, wherein the stream state information comprises a frame rate of the video stream and/or a parameter used to represent the format of the image stream.
  21. 如权利要求15-20任一项所述的装置,其特征在于,所述资源运行状态信息包括 处理资源占用率和/或存储资源占用率。The device according to any one of claims 15-20, wherein the resource operating status information includes processing resource occupancy rate and/or storage resource occupancy rate.
  22. 如权利要求20所述的装置,其特征在于,所述超分辨率转换模块,具体用于根据所述状态信息确定所述第二分辨率,并根据所述第一分辨率和所述第二分辨率确定所述第一目标倍率;The device according to claim 20, wherein the super-resolution conversion module is specifically configured to determine the second resolution according to the state information, and according to the first resolution and the second resolution. The resolution determines the first target magnification;
    其中,所述第二分辨率为所述显示装置的分辨率;或者,Wherein, the second resolution is the resolution of the display device; or,
    所述第二分辨率为所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device; or,
    所述第二分辨率为所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum of the highest resolution supported by the size of the display device and the resolution of the display device; or,
    所述第二分辨率为所述显示装置的尺寸所支持的最高分辨率、所述显示装置的接口类型所支持的最高分辨率、以及所述显示装置的分辨率中的最小值;或者,The second resolution is the smallest value among the highest resolution supported by the size of the display device, the highest resolution supported by the interface type of the display device, and the resolution of the display device; or,
    所述第二分辨率为在所述视频流的帧率下,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device under the frame rate of the video stream; or,
    所述第二分辨率为所述视频流的帧率下,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum of the highest resolution supported by the interface type of the display device and the resolution of the display device at the frame rate of the video stream; or,
    所述第二分辨率为在采用所述视频流的帧率时,所述显示装置的接口类型所支持的最高分辨率、所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the maximum resolution of the display device when the frame rate of the video stream is used. The minimum value in resolution; or,
    所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device when the format of the image stream is adopted; or,
    所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device when the format of the image stream is adopted; or,
    所述第二分辨率为采用所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率、所述显示装置的尺寸所支持的最高分辨率与所述显示装置的分辨率中的最小值;或者,The second resolution is the highest resolution supported by the interface type of the display device, the highest resolution supported by the size of the display device, and the resolution of the display device when the format of the image stream is adopted. The smallest value in; or,
    所述第二分辨率为在采用所述视频流的帧率和所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率;或者,The second resolution is the highest resolution supported by the interface type of the display device when the frame rate of the video stream and the format of the image stream are used; or,
    所述第二分辨率为在采用所述视频流的帧率和所述图像流的格式时,所述显示装置的接口类型所支持的最高分辨率与所述显示装置的分辨率中的最小值。The second resolution is the minimum value of the highest resolution supported by the interface type of the display device and the resolution of the display device when the frame rate of the video stream and the format of the image stream are used .
  23. 如权利要求15-22任一项所述的装置,其特征在于,所述超分辨率转换模块,还用于:The device according to any one of claims 15-22, wherein the super-resolution conversion module is further configured to:
    在采用所述至少一种分辨率转换算法对所述源图像执行放大第一目标倍率操作的过程中,获取所述资源运行状态信息;In the process of performing the operation of magnifying the first target magnification on the source image by using the at least one resolution conversion algorithm, acquiring the resource operating state information;
    在确定所述资源运行状态信息满足预设条件时,继续根据所述第一目标倍率对所述源图像执行放大第一目标倍率操作。When it is determined that the resource operating state information satisfies a preset condition, continue to perform an operation of enlarging the first target magnification on the source image according to the first target magnification.
  24. 如权利要求23所述的装置,其特征在于,所述超分辨率转换模块,还用于:The device of claim 23, wherein the super-resolution conversion module is further configured to:
    在确定所述资源运行状态信息不满足预设条件时,缩小所述第一目标倍率得到第二目标倍率;When it is determined that the resource operating state information does not meet a preset condition, reduce the first target magnification to obtain a second target magnification;
    根据缩小后的所述第二目标倍率对所述源图像执行放大操作,得到具有第三分辨率的第二目标图像,所述第三分辨率为所述第一分辨率放大所述第二目标倍率得到的。Perform an enlargement operation on the source image according to the reduced second target magnification to obtain a second target image with a third resolution, where the third resolution is the first resolution to enlarge the second target The magnification is obtained.
  25. 一种图像处理装置,其特征在于,所述装置包括:处理器和传输接口;An image processing device, characterized in that the device comprises: a processor and a transmission interface;
    所述处理器通过所述传输接口,接收或发送图像数据;The processor receives or sends image data through the transmission interface;
    所述处理器,用于调用存储器中的软件指令,以执行如权利要求1至12任一项所述的方法。The processor is configured to call software instructions in the memory to execute the method according to any one of claims 1 to 12.
  26. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得所述计算机或处理器执行如权利要求1至12任一项所述的方法。A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, which when run on a computer or processor, cause the computer or processor to execute any of claims 1 to 12 The method described in one item.
  27. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机或处理器上运行时,使得所述计算机或处理器执行如权利要求1至12任一项所述的方法。A computer program product containing instructions, wherein when the computer program product runs on a computer or a processor, the computer or the processor is caused to execute the method according to any one of claims 1 to 12.
PCT/CN2019/085370 2019-04-30 2019-04-30 Image processing method and apparatus WO2020220346A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980095791.1A CN113728354A (en) 2019-04-30 2019-04-30 Image processing method and device
PCT/CN2019/085370 WO2020220346A1 (en) 2019-04-30 2019-04-30 Image processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/085370 WO2020220346A1 (en) 2019-04-30 2019-04-30 Image processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2020220346A1 true WO2020220346A1 (en) 2020-11-05

Family

ID=73028752

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/085370 WO2020220346A1 (en) 2019-04-30 2019-04-30 Image processing method and apparatus

Country Status (2)

Country Link
CN (1) CN113728354A (en)
WO (1) WO2020220346A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112492233A (en) * 2020-11-27 2021-03-12 西安万像电子科技有限公司 Method and device for adapting resolution of transmitting end and receiving end of image transmission system
CN114025106A (en) * 2021-12-16 2022-02-08 海宁奕斯伟集成电路设计有限公司 Intelligent processor, image intelligent processing system, method and storage medium
CN116055655A (en) * 2022-05-30 2023-05-02 荣耀终端有限公司 Picture size recommending method and electronic equipment
CN116709016A (en) * 2022-02-24 2023-09-05 荣耀终端有限公司 Multiplying power switching method and multiplying power switching device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227554A (en) * 2008-02-04 2008-07-23 中兴通讯股份有限公司 Method and system for implementing self-adapting display of set-top box on television
US20100026695A1 (en) * 2008-08-04 2010-02-04 Kabushiki Kaisha Toshiba Image Processing Apparatus and Image Processing Method
US20100026685A1 (en) * 2008-08-04 2010-02-04 Kabushiki Kaisha Toshiba Image Processing Apparatus
CN103985085A (en) * 2014-05-26 2014-08-13 三星电子(中国)研发中心 Image super-resolution amplifying method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227554A (en) * 2008-02-04 2008-07-23 中兴通讯股份有限公司 Method and system for implementing self-adapting display of set-top box on television
US20100026695A1 (en) * 2008-08-04 2010-02-04 Kabushiki Kaisha Toshiba Image Processing Apparatus and Image Processing Method
US20100026685A1 (en) * 2008-08-04 2010-02-04 Kabushiki Kaisha Toshiba Image Processing Apparatus
CN103985085A (en) * 2014-05-26 2014-08-13 三星电子(中国)研发中心 Image super-resolution amplifying method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112492233A (en) * 2020-11-27 2021-03-12 西安万像电子科技有限公司 Method and device for adapting resolution of transmitting end and receiving end of image transmission system
CN114025106A (en) * 2021-12-16 2022-02-08 海宁奕斯伟集成电路设计有限公司 Intelligent processor, image intelligent processing system, method and storage medium
CN116709016A (en) * 2022-02-24 2023-09-05 荣耀终端有限公司 Multiplying power switching method and multiplying power switching device
CN116055655A (en) * 2022-05-30 2023-05-02 荣耀终端有限公司 Picture size recommending method and electronic equipment
CN116055655B (en) * 2022-05-30 2023-09-26 荣耀终端有限公司 Picture size recommending method and electronic equipment

Also Published As

Publication number Publication date
CN113728354A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
WO2020220346A1 (en) Image processing method and apparatus
JP6978542B2 (en) Electronic device and its control method
US7945120B2 (en) Apparatus for enhancing resolution using edge detection
US20200267396A1 (en) Human visual system adaptive video coding
EP4036841A1 (en) Image processing method and apparatus
KR20200075045A (en) Displaying applications on a fixed orientation display
WO2018000676A1 (en) Method and device for configuring image mode
EP3828812B1 (en) Electronic apparatus and control method thereof
CN109587561B (en) Video processing method and device, electronic equipment and storage medium
US11893712B2 (en) Electronic device and control method thereof
US20150235621A1 (en) Image Processing Method and Device
WO2019095485A1 (en) Video signal processing method and apparatus, and readable storage medium
WO2020259123A1 (en) Method and device for adjusting image quality, and readable storage medium
CN111405362B (en) Video output method, video output device, video equipment and computer readable storage medium
WO2022261849A1 (en) Method and system of automatic content-dependent image processing algorithm selection
US11436442B2 (en) Electronic apparatus and control method thereof
KR20210108027A (en) Electronic apparatus and control method thereof
EP2475172A2 (en) Video processing apparatus capable of dynamically controlling processed picture quality based on runtime memory bandwidth utilization
US11962859B2 (en) System and method for implementation of region of interest based streaming
US11392521B2 (en) Heterogeneous computing system and heterogeneous computing method using the system
US7982752B2 (en) Multi-format image display apparatus and method
CN112911186B (en) Image storage method and device, electronic equipment and storage medium
TWI597688B (en) Layer processing method and device
CN112312045A (en) Video wall desktop image segmentation processing method and device, storage medium and system
US10846829B1 (en) Image sharpening with edge direction based undershoot and overshoot reduction

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

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

Country of ref document: EP

Kind code of ref document: A1