WO2023185351A1 - 图像处理方法、智能终端及存储介质 - Google Patents

图像处理方法、智能终端及存储介质 Download PDF

Info

Publication number
WO2023185351A1
WO2023185351A1 PCT/CN2023/078559 CN2023078559W WO2023185351A1 WO 2023185351 A1 WO2023185351 A1 WO 2023185351A1 CN 2023078559 W CN2023078559 W CN 2023078559W WO 2023185351 A1 WO2023185351 A1 WO 2023185351A1
Authority
WO
WIPO (PCT)
Prior art keywords
angle
index
mapping table
parameter
partition
Prior art date
Application number
PCT/CN2023/078559
Other languages
English (en)
French (fr)
Inventor
刘雨田
Original Assignee
深圳传音控股股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳传音控股股份有限公司 filed Critical 深圳传音控股股份有限公司
Publication of WO2023185351A1 publication Critical patent/WO2023185351A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Definitions

  • the present application relates to the field of image processing technology, and in particular, to an image processing method, an intelligent terminal and a storage medium.
  • a division mode can be used, for example, the next generation video compression standard (Versatile Video Coding, VVC)
  • VVC Very Video Coding
  • the proposed geometric partitioning mode uses the dividing lines included in the partitioning mode to fit the boundaries of moving objects, which can make the boundaries of moving objects in the image more flexible and precise.
  • this application provides an image processing method, an intelligent terminal and a storage medium, which can effectively improve the matching degree between the division mode parameters and the target image blocks, thereby improving the accuracy of the prediction results.
  • this application provides an image processing method, which can be applied to smart terminals, including:
  • S1 Determine the target division mode parameters of the target image block based on the first division mode parameter set
  • This application also provides an image processing device, including:
  • a determination module configured to determine the target division mode parameters of the target image block based on the first division mode parameter set
  • the determination module is also configured to determine the prediction result of the target image block based on the target division mode parameter.
  • the first dividing mode parameter set includes dividing mode parameters corresponding to one or more dividing lines.
  • the division mode parameters include at least one of a division index, an angle index, a distance index and a prediction type.
  • the first partition mode parameter set is adjusted based on usage of the first partition mode parameter set.
  • At least one element in the first partition mode parameter set is adjusted to form a new parameter mapping table for representing the first partition mode parameter set.
  • the new parameter mapping table is formed by adding, deleting, reordering, or changing at least one element of the parameter mapping table.
  • the dividing mode parameter is determined based on the use of the dividing line by the encoded image; the size of the angle formed between adjacent dividing lines among the plurality of dividing lines does not vary. equal.
  • the dividing mode parameter is determined by adjusting the angle interval between the dividing line in the target direction and adjacent dividing lines of the dividing line in the target direction based on the usage of the dividing line in the encoded image. of.
  • the angular interval between the dividing line in the target direction and the adjacent dividing line is smaller than the angular interval between the dividing line in the reference direction and the adjacent dividing line; and/or, the angular interval between the dividing line in the target direction
  • the application probability is greater than the application probability of the dividing line in the reference direction.
  • the dividing mode parameters include at least one of the dividing index, angle index and distance index corresponding to the dividing line; the first dividing mode parameter set represents the dividing index, A parameter mapping table of the mapping relationship between the angle index and the distance index.
  • the image processing device further includes an acquisition module and an update module.
  • the acquisition module is used to acquire the usage of the dividing line by the encoded image
  • the determination module is used to determine the application probability of the dividing line based on the usage situation
  • the update module is used to update the parameter mapping table based on the application probability.
  • the determining module is further configured to: in response to the number of encoded images reaching a preset threshold, obtain the first division mode Number of uses; determine the application probability of each dividing line based on the usage record parameters and the number of uses.
  • the update module is further configured to: update the angle mapping table based on the application probability of each dividing line to obtain an updated angle mapping table; update the angle mapping table based on the updated angle mapping table Angle index and/or distance index in the parameter map.
  • the angle mapping table is used to represent the mapping relationship between the query index and the angle parameter.
  • the query index includes the segmentation index or the angle index, and there is a relationship between the angle index and the angle parameter. connection relation.
  • the update module is further configured to: update the angle mapping table based on the angle parameter corresponding to the first query index and/or the angle parameter corresponding to the second query index, to obtain an updated angle mapping table .
  • the first query index is the query index corresponding to the dividing line with the highest application probability
  • the second query index is the query index corresponding to the dividing line with the second highest application probability, or is the query index of the first query index Adjacent query index.
  • the update module is further configured to: determine a target angle parameter based on the angle parameter corresponding to the first query index and the angle parameter corresponding to the second query index; and calculate the angle parameter based on the target angle parameter.
  • the mapping table is updated to obtain the updated angle mapping table.
  • the second query index is an adjacent query index of the first query index
  • the update module is further configured to: adjust the second query in the angle mapping table according to the preset adjustment rules. Index the corresponding angle parameter to obtain the updated angle mapping table.
  • the update module is further configured to: in response to the angle parameter corresponding to the adjacent query index being greater than the angle parameter corresponding to the first query index, reduce the angle corresponding to the adjacent query index. parameters to obtain the updated angle mapping table; and/or, in response to the angle parameter corresponding to the adjacent query index being smaller than the angle parameter corresponding to the first query index, increasing the angle parameter corresponding to the adjacent query index , get the updated angle mapping table.
  • the difference between the adjusted angle parameter corresponding to the adjacent query index and the angle parameter corresponding to the first query index is within a preset range; and/or the preset range is based on The application probability of the dividing line corresponding to the first query index is determined.
  • the image processing device further includes a sending module, the sending module being configured to: send a bit stream to the decoding end, the bit stream including indication information of the updated parameter mapping table, the indication information Used to instruct the decoder to use the updated parameter mapping table to determine the prediction result of the target image block.
  • the determination module is further configured to: use at least one prediction mode to perform predictive encoding on the target image block based on parameters of the target image block, and determine the rate distortion cost corresponding to each prediction mode; when When the prediction mode with the smallest rate distortion cost is the first division mode, the step of determining the target division mode parameters of the target image block based on the first division mode parameter set is performed.
  • the first division mode includes at least one division mode
  • the determining module is further configured to: determine a rate at which each division mode included in the first division mode is applied to the target image block. Distortion cost; determine the division mode with the smallest rate distortion cost as the target division mode of the target image block; determine the mode parameters corresponding to the target division mode from the first division mode parameter set, and divide the target The mode parameter corresponding to the mode is determined as the target division mode parameter of the target image block.
  • the target image block includes a first partition and a second partition, and the first partition and the second partition are two image areas obtained by dividing the target image block by a dividing line, so
  • the determination module is further configured to: determine the partition weight based on the target partition mode parameter; determine the first partition based on at least one of the partition weight, the first prediction result set and the second prediction result set.
  • the prediction result and the prediction result of the second partition; the prediction result of the first partition and the prediction result of the second partition are determined as the prediction result of the target image block.
  • the partition weight includes a first weight corresponding to the first partition and a second weight corresponding to the second partition, and the first weight or the second weight is based on the target image.
  • the distance between the pixel points included in the block and the dividing line is determined, and the determining module is further configured to: based on the first weight, the second weight, and the pixel points included in the target image block, the first prediction result set is Determine the prediction result of the pixel point by at least one of the first prediction result in the second prediction result set and the second prediction result of the pixel point in the second prediction result set.
  • This application also provides an intelligent terminal, including: a memory and a processor, wherein an image processing program is stored on the memory, and when the image processing program is executed by the processor, the steps of any of the above methods are implemented.
  • This application also provides a computer storage medium, the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
  • the image processing method of the present application can be applied to smart terminals, including the following steps: determining the target division mode parameters of the target image block based on the first division mode parameter set; determining the target image based on the target division mode parameters Block prediction results.
  • the division mode parameters that closely match the target image block can be determined from the first division mode parameter set.
  • a more accurate prediction result of the target image block can be obtained, and the division mode parameters and the image Block height matching, a function that improves the encoding effect and solves the problem of the division mode parameters corresponding to the division mode and the image blocks
  • the problem of low matching degree improves the user experience.
  • Figure 1 is a schematic diagram of the hardware structure of an intelligent terminal that implements various embodiments of the present application
  • FIG. 2 is a communication network system architecture diagram provided by an embodiment of the present application.
  • Figure 3a is a schematic diagram of angle quantification provided by an embodiment of the present application.
  • Figure 3b is a schematic diagram of various offsets corresponding to angle ⁇ i provided by the embodiment of the present application.
  • Figure 3c is a schematic diagram of a division mode provided by an embodiment of the present application.
  • Figure 4 is a schematic flowchart of an image processing method according to the first embodiment
  • Figure 5 is a schematic diagram of an adjusted dividing line according to the first embodiment
  • Figure 6a is a schematic flowchart of an image processing method according to the second embodiment
  • Figure 6b is a schematic diagram showing the effect of applying different dividing lines to image blocks according to the second embodiment
  • Figure 7 is a schematic flowchart of an image processing method according to a third embodiment
  • Figure 8a is a schematic diagram illustrating distance analysis between pixel points and dividing lines according to the third embodiment
  • Figure 8b is a schematic flowchart of an image processing method according to the fourth embodiment.
  • Figure 8c is a schematic diagram of adjacent block positions of a spatial merging candidate list according to the fourth embodiment.
  • Figure 8d is a schematic diagram of a merge candidate list according to the fourth embodiment.
  • Figure 9 is a schematic diagram of an image processing device according to an embodiment of the present application.
  • Figure 10 is a schematic diagram of the hardware structure of the controller according to the first embodiment
  • Figure 11 is a schematic diagram of the hardware structure of a network node according to the first embodiment.
  • first, second, third, etc. may be used herein to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other.
  • first information may also be called second information, and similarly, the second information may also be called first information.
  • word “if” as used herein may be interpreted as “when” or “when” or “in response to determining.”
  • singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context indicates otherwise.
  • A, B, C means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C"; another example is, “ A, B or C” or "A, B and/or C” means "any of the following: A; B; C; A and B; A and C; B and C; A and B and C". Exceptions to this definition occur only when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some manner.
  • each step in the flow chart in the embodiment of the present application is displayed in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least some of the steps in the figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and their execution order is not necessarily sequential. may be performed in turn or alternately with other steps or sub-steps of other steps or at least part of stages.
  • the words “if” or “if” as used herein may be interpreted as “when” or “when” or “in response to determination” or “in response to detection.”
  • the phrase “if determined” or “if (stated condition or event) is detected” may be interpreted as “when determined” or “in response to determining” or “when (stated condition or event) is detected )” or “in response to detecting (a stated condition or event)”.
  • step codes such as S401 and S402 are used for the purpose of describing the corresponding content more clearly and concisely, and do not constitute a substantial restriction on the sequence. Those skilled in the art may S402 will be executed first and then S401, etc., but these should be within the protection scope of this application.
  • Smart terminals can be implemented in various forms.
  • the smart terminals described in this application may include mobile phones, tablet computers, notebook computers, PDAs, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, Smart terminals such as wearable devices, smart bracelets, and pedometers, as well as fixed terminals such as digital TVs and desktop computers.
  • PDA Personal Digital Assistant
  • PMP portable media players
  • navigation devices Smart terminals such as wearable devices, smart bracelets, and pedometers
  • Smart terminals such as wearable devices, smart bracelets, and pedometers
  • fixed terminals such as digital TVs and desktop computers.
  • a mobile terminal will be taken as an example.
  • the structure according to the embodiments of the present application can also be applied to fixed-type terminals.
  • the mobile terminal 100 may include: an RF (Radio Frequency, radio frequency) unit 101, a WiFi module 102, an audio output unit 103, and a /V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111 and other components.
  • RF Radio Frequency, radio frequency
  • the radio frequency unit 101 can be used to receive and send information or signals during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 110; in addition, the uplink data is sent to the base station.
  • the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, transceiver, coupler, low noise amplifier, duplexer, etc.
  • the radio frequency unit 101 can also communicate with the network and other devices through wireless communication.
  • the above wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, Global Mobile Communications System), GPRS (General Packet Radio Service, General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000 , Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, Time Division Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division) Duplexing-Long Term Evolution, Frequency Division Duplex Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution, Time Division Duplex Long Term Evolution) and 5G, etc.
  • GSM Global System of Mobile communication, Global Mobile Communications System
  • GPRS General Packet Radio Service
  • CDMA2000 Code Division Multiple Access 2000
  • WCDMA Wideband Code Division Multiple Access
  • TD-SCDMA Time Division-Synchronous Code Division Multiple Access, Time Division Synchronous Code
  • WiFi is a short-distance wireless transmission technology.
  • the mobile terminal can help users send and receive emails, browse web pages, access streaming media, etc. through the WiFi module 102. It provides users with wireless broadband Internet access.
  • FIG. 1 shows the WiFi module 102, it can be understood that it is not a necessary component of the mobile terminal and can be omitted as needed without changing the essence of the invention.
  • the audio output unit 103 may, when the mobile terminal 100 is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast receiving mode, etc., receive the audio signal received by the radio frequency unit 101 or the WiFi module 102 or store it in the memory 109 The audio data is converted into audio signals and output as sound. Furthermore, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, or the like.
  • the A/V input unit 104 is used to receive audio or video signals.
  • the A/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042.
  • the graphics processor 1041 can process still pictures or images obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. Video image data is processed.
  • the processed image frames may be displayed on the display unit 106.
  • the image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage media) or sent via the radio frequency unit 101 or WiFi module 102.
  • the microphone 1042 can receive sounds (audio data) via the microphone 1042 in operating modes such as a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sounds into audio data.
  • the processed audio (voice) data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 101 for output in a phone call mode.
  • Microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated in the process of receiving and transmitting audio signals.
  • the mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor includes an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light.
  • the proximity sensor can turn off the display when the mobile terminal 100 moves to the ear. Panel 1061 and/or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes). It can detect the magnitude and direction of gravity when stationary.
  • It can be used to identify applications of mobile phone posture (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone, it can also be configured with fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, Other sensors such as thermometers and infrared sensors will not be described in detail here.
  • the display unit 106 is used to display information input by the user or information provided to the user.
  • the display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • the user input unit 107 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile terminal.
  • the user input unit 107 may include a touch panel 1071 and other input devices 1072.
  • the touch panel 1071 also known as a touch screen, can collect the user's touch operations on or near the touch panel 1071 (for example, the user uses a finger, stylus, or any suitable object or accessory on or near the touch panel 1071 operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 1071 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into contact point coordinates , and then sent to the processor 110, and can receive the commands sent by the processor 110 and execute them.
  • the touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the user input unit 107 may also include other input devices 1072.
  • other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as Such as volume control buttons, switch buttons, etc.), trackball, mouse, joystick, etc., one or more of them, the specifics are not limited here.
  • the touch panel 1071 can cover the display panel 1061.
  • the touch panel 1071 detects a touch operation on or near it, it is transmitted to the processor 110 to determine the type of the touch event, and then the processor 110 determines the type of the touch event according to the touch event.
  • the type provides corresponding visual output on the display panel 1061.
  • the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated. The implementation of the input and output functions of the mobile terminal is not limited here.
  • the interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100 .
  • external devices may include a wired or wireless headphone port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc.
  • the interface unit 108 may be used to receive input (eg, data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to connect between the mobile terminal 100 and an external device. Transfer data between devices.
  • Memory 109 may be used to store software programs as well as various data.
  • the memory 109 may mainly include a storage program area and a storage data area.
  • the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.;
  • the storage data area may Store data created based on the use of the mobile phone (such as audio data, phone book, etc.), etc.
  • memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • the processor 110 is the control center of the mobile terminal, using various interfaces and lines to connect various parts of the entire mobile terminal, by running or executing software programs and/or modules stored in the memory 109, and calling data stored in the memory 109 , execute various functions of the mobile terminal and process data, thereby overall monitoring the mobile terminal.
  • the processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor.
  • the application processor mainly processes the operating system, user interface, application programs, etc., and modulation
  • the demodulation processor mainly handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 110 .
  • the mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components.
  • a power supply 111 such as a battery
  • the power supply 111 may be logically connected to the processor 110 through a power management system, thereby managing charging, discharging, and power consumption management through the power management system. and other functions.
  • the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described again here.
  • FIG. 2 is an architecture diagram of a communication network system provided by an embodiment of the present application.
  • the communication network system is an LTE system of universal mobile communication technology.
  • the LTE system includes UEs (User Equipment, User Equipment) connected in sequence. )201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, Evolved UMTS Terrestrial Radio Access Network) 202, EPC (Evolved Packet Core, Evolved Packet Core Network) 203 and the operator's IP business 204.
  • UEs User Equipment, User Equipment
  • E-UTRAN Evolved UMTS Terrestrial Radio Access Network
  • EPC Evolved Packet Core, Evolved Packet Core Network
  • UE 201 may be the above-mentioned terminal 100, which will not be described again here.
  • E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc.
  • eNodeB2021 can be connected to other eNodeB2022 through backhaul (for example, X2 interface), eNodeB2021 is connected to EPC203, and eNodeB2021 can provide access from UE201 to EPC203.
  • backhaul for example, X2 interface
  • EPC 203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home user server) 2032, other MME 2033, SGW (Serving Gate Way, service gateway) 2034, PGW (PDN Gate Way, packet data Network Gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and charging functional entity) 2036, etc.
  • MME2031 is a control node that processes signaling between UE201 and EPC203, and provides bearer and connection management.
  • HSS2032 is used to provide some registers to manage functions such as the home location register (not shown in the figure), and to save some user-specific information about service characteristics, data rates, etc. All user data can be sent through SGW2034.
  • PGW2035 can provide IP address allocation and other functions for UE 201.
  • PCRF2036 is the policy and charging control policy decision point for business data flows and IP bearer resources. It is the policy and charging execution function. The unit (not shown) selects and provides available policy and charging control decisions.
  • IP services 204 may include the Internet, Intranet, IMS (IP Multimedia Subsystem, IP Multimedia Subsystem) or other IP services.
  • IMS IP Multimedia Subsystem, IP Multimedia Subsystem
  • prediction of image blocks is an essential step.
  • prediction blocks are obtained, residual blocks with smaller energy are constructed, and transmission bits are reduced.
  • Prediction of image blocks can be achieved through some preset prediction modes, which can include inter prediction modes and intra prediction modes.
  • inter prediction mode uses the correlation between pixels to remove temporal redundancy, and is a prediction mode with higher coding efficiency.
  • GPM mode for short is the prediction mode used by the next generation video compression standard (Versatile Video Coding, VVC) for the boundary parts of moving objects in images.
  • VVC Very Video Coding
  • the GPM mode can divide the boundaries of moving objects in the image more finely.
  • the edge coding units (Code units) of the moving objects are divided into non-coding units.
  • the rectangular sub-coding unit performs unidirectional prediction to obtain the predicted value of the entire coding unit.
  • a total of 64 division modes can be combined, as shown in Figure 3c.
  • Figure 3c is a schematic diagram of a division mode provided by an embodiment of the present application. The division mode includes at least one division method composed of different angle and offset combinations.
  • the positions of the dividing lines are different, and the number of dividing lines that can be used for image blocks is also different. Any one of all the dividing lines is an implementation of GPM mode applied to image blocks.
  • the offset ⁇ j and the angle ⁇ i can be determined according to the GPM mode index.
  • Figure 4 is a schematic flow chart of an image processing method according to the first embodiment.
  • the execution subject in this embodiment can be a computer device or a cluster composed of multiple computer devices.
  • the computer device can It may be an intelligent terminal (such as the aforementioned mobile terminal 100), or it may be a server.
  • the execution subject in this embodiment is an intelligent terminal as an example for explanation.
  • the input video frame is usually divided into multiple image blocks for processing.
  • Each image block can be subtracted from the prediction block predicted by the prediction mode to obtain the residual block, and then the residual block is obtained.
  • the residual block undergoes a series of processes to obtain the encoded bitstream.
  • the image processing solution provided by the embodiment of the present application can be applied to the prediction stage of the video encoding process, that is, using the corresponding prediction mode to predict the image block to obtain the scene of the predicted block.
  • the target image block refers to the image block currently being encoded in the input video image (ie, video frame), which can be referred to as the current block or the current image block.
  • the target image block can be a Coding Tree Unit (CTU) or a Coding Unit (Code Unit, CU) in the input video image, and there is no restriction here.
  • CTU Coding Tree Unit
  • CU Coding Unit
  • the first partition mode parameter set refers to a set of partition mode parameters corresponding to the first partition mode.
  • the first division mode is a prediction mode that can use division lines to divide image blocks into different image areas for prediction.
  • the first division mode is a geometric division mode.
  • image blocks can be divided into rectangular areas, triangular areas, or rectangular areas.
  • the first dividing mode parameter set includes dividing mode parameters corresponding to one or more dividing lines.
  • a dividing line is a line used to divide image blocks into regions, such as a straight line.
  • a dividing line applied to an image block corresponds to a dividing mode, and each dividing mode corresponds to a dividing mode parameter.
  • the first dividing mode includes at least one dividing mode
  • the first dividing mode parameter set includes The dividing mode parameters respectively corresponding to at least one dividing mode.
  • the target division mode parameter is a division mode parameter corresponding to the target division line in the first division mode parameter set.
  • the target image block is encoded using the target division line with a minimum rate distortion cost.
  • the dividing mode parameter is the mode parameter corresponding to the dividing line applied to the image block.
  • the division mode parameters include at least one of division index, angle index, distance index and prediction type corresponding to the division line. That is, the dividing mode parameters may include any one of the dividing index, angle index, distance index and prediction type corresponding to the dividing line, or may include any one of the dividing index, angle index, distance index and prediction type corresponding to the dividing line. Two items may also include the segmentation index, angle index, distance index and prediction type corresponding to the segmentation line.
  • the prediction type is the prediction type used by the corresponding partition in the partition mode. Prediction types include intra prediction mode and/or inter prediction mode.
  • the partition mode parameter set may also include other parameters (for example, the prediction type adopted by the first partition and/or the second partition in the partition mode, etc.).
  • the first partition and the second partition are located in the image block.
  • the first partition and the second partition form an image block.
  • the division index corresponding to the division line can be used to mark different division lines. Since different division lines correspond to different division modes, the division index can also be called the division mode index, which is used to uniquely identify a division mode (that is, uniquely identify a division line). ;
  • the angle index corresponding to the dividing line can be used to indicate the direction of the dividing line;
  • the distance index corresponding to the dividing line can be used to indicate the offset position of the dividing line.
  • the position of the dividing line in the image block can be determined according to the angle index and distance index corresponding to the dividing line.
  • the segmentation index, angle index and distance index may be numbers, other characters, or other distinguishable markers, which are not limited here.
  • the division index corresponding to each division line can be set to be different and unique (the same is true for the angle index).
  • its corresponding angle index and/or distance index may be partially the same as the angle index and/or distance index corresponding to other segmentation indexes.
  • the partition index merge_gpm_partition_idx is represented by a unique number.
  • the value of the partition index merge_gpm_partition_idx is 0 to 64.
  • the angle index angleIdx is represented by ⁇ i.
  • the value of i is 0 ⁇ 30.
  • the distance index distanceIdx is represented by ⁇ j.
  • the value of j is 0 ⁇ 3.
  • the partition index merge_gpm_partition_idx is 0, the angle index angleIdx is 0, and the distance index distanceIdx is 1; and/or, if the partition index merge_gpm_partition_idx is 1, the angle index angleIdx is 0, and the distance index distanceIdx is 3. For segmentation index 0 and segmentation index 1, their corresponding angle indexes are the same. If the partition index merge_gpm_partition_idx is 0, the angle index angleIdx is 0, and the distance index distanceIdx is 1; and/or, if the partition index merge_gpm_partition_idx is 3, the angle index angleIdx is 2, and the distance index distanceIdx is 1. For split index 0 and split index 3, their corresponding distance indexes are the same.
  • the first division mode parameter set is a parameter mapping table representing a mapping relationship between the division index, the angle index and the distance index.
  • the adjustment of the partition mode parameters can be realized by updating the parameter mapping table. Please refer to the corresponding introduction in the second embodiment, which will not be described in detail here.
  • the dividing line in the first dividing mode can be used to fit the boundary curve, and the image block to be encoded can be divided into two parts for prediction to obtain a prediction block.
  • the first dividing mode for example, geometric dividing mode
  • the usage of dividing lines is inconsistent.
  • the division mode parameters corresponding to each division line in the first division mode parameter set can be adaptively set based on the usage of the division line, thereby improving the fit. , making the prediction results more accurate.
  • the first partition mode parameter set is adjusted based on usage of the first partition mode parameter set.
  • at least one element in the first partition mode parameter set is adjusted to form a new parameter mapping table for representing the first partition mode parameter set.
  • the new parameter mapping table is formed by adding, deleting, reordering, or changing at least one element of the parameter mapping table.
  • At least one element may be at least one of a segmentation index, an angle index, a distance index, and a prediction type in the parameter mapping table.
  • the first partition mode set is a parameter mapping table representing a mapping relationship between at least two of the partition index, the angle index, the distance index, and the prediction type adopted by the first partition and/or the second partition.
  • the prediction type can be represented by a prediction mode index.
  • merge_gpm_partition_idx is the GPM partition index
  • angleIdx is the angle index
  • distanceIdx is the distance index
  • intra_pred_mode1_Idx is the partition 1 prediction mode index
  • intra_pred_mode2_Idx is the partition 2 prediction mode index.
  • One or more elements in the parameter mapping table (eg, segmentation index, angle index, distance index, prediction type) may be repeated, partially identical, or completely different in the parameter mapping table.
  • the corresponding partition 1 prediction mode indexes are M11 to M15.
  • the corresponding partition 1 prediction mode indexes are M11 to M15. They are repeated.
  • the partition 2 prediction mode indexes corresponding to GPM segmentation indexes 0-63 are M21 ⁇ M25,...,M31 ⁇ M35, which are different from each other.
  • the values M11 to M15, M21 to M25, and M31 to M35 of the prediction mode index correspond to the intra prediction mode adopted by the partition or the inter prediction mode adopted by the partition.
  • a parameter mapping table For example, one or more split indexes, angle indexes, distance indexes, and prediction types adopted by the first partition and/or the second partition in the first partition mode parameter set can be adjusted according to the usage of the split line. one. For example, based on the usage of parameter mapping table 1, adjust the value or distribution of at least one of the segmentation index, angle index, distance index, and prediction type to obtain a new parameter mapping table (parameter mapping table 2) to represent the first Partition mode parameter set.
  • the new parameter mapping table is shown in Table b below.
  • a new parameter mapping table can be formed to represent the first division mode parameters by adding, deleting, reordering or changing at least one of the split index, the angle index, the distance index, and the prediction type. gather.
  • a new parameter mapping table (parameter mapping table 3) as shown in Table c is formed by reordering to represent the first partition mode parameter set.
  • the new parameter mapping table is shown in Table c below.
  • the column corresponding to merge_gpm_partition_idx is 2 is located on the right side of the column corresponding to merge_gpm_partition_idx is 1.
  • Parameter mapping table 3 is obtained by exchanging the positions of the columns corresponding to merge_gpm_partition_idx is 2 and merge_gpm_partition_idx is 1, and parameter mapping table 3 is used as the third column.
  • a collection of partitioning patterns if the positions of the partition index merge_gpm_partition_idx, angle index angleIdx, distance index distanceIdx, and prediction type (partition 1 prediction mode index intra_pred_mode1_Idx, partition 2 prediction mode index intra_pred_mode2_Idx) in the parameter mapping table are adjusted (for example, reordered) , it means that the storage order, storage location, or priority of use of these elements in the mapping table has changed.
  • the position in the parameter mapping table represents the priority used by the elements in the parameter mapping table.
  • the elements on the left side of the parameter mapping table have a higher priority than the elements on the right side in the subsequent encoding and decoding process.
  • a parameter mapping table sorted by usage priority can be formed. Search efficiency can be improved by looking for different areas in the parameter mapping table in different scenarios. For example, when there are sufficient calculation examples, all areas of the parameter mapping table can be searched. When computing power is limited, only the previous part of the area can be searched to obtain appropriate GPM division parameters.
  • a new parameter mapping table can be formed by adding or deleting at least one of the segmentation index, the angle index, the distance index, and the prediction type to represent the first division mode parameter set.
  • a new parameter mapping table (parameter mapping table 4) as shown in Table d is formed by adding at least one of a division index, an angle index, a distance index, and a prediction type to represent the first division mode parameter set; or deleting the division At least one of index, angle index, distance index, and prediction type is used to form a new parameter mapping table (parameter mapping table 5) as shown in Table e to represent the first partition mode parameter set.
  • the new parameter mapping table is shown in Table d and Table e below.
  • parameter mapping table 4 in table d has only 61 entries (for example, 61 columns); compared with parameter mapping table 1 in table a, parameter mapping table 4 in table e Parameter map 5 has only 66 entries (eg, 66 columns). In this way, the parameter mapping table containing different numbers of entries can be set or updated according to the usage of elements in the parameter mapping table.
  • a new parameter mapping table can be formed by changing the value of at least one of the division index, the angle index, the distance index, and the prediction type to represent the first division mode parameter set. For example, change the value of any element (segmentation index, angle index, distance index, prediction type) in parameter mapping table 1 in table a to update the parameter mapping table.
  • the dividing mode parameter is determined based on the usage of the dividing line by the encoded image.
  • An encoded image refers to an image (or frame) that has been encoded before the image where the target image block is located.
  • the dividing line used by the encoded image can be the division indicated by each division mode parameter in the latest first division mode parameter set. Wire. Since the video encoding process includes multiple prediction modes, the image blocks in the encoded image may use other prediction modes other than the first division mode when encoding, such as intra prediction mode. Therefore, the use of dividing lines in a coded image refers to the use of dividing lines by some or all image blocks in the coded image, and the dividing lines used by each image block may be the same or different. The dividing lines can be calculated in the coded image by counting the dividing lines. The usage in determines the partition mode parameters.
  • the latest first partition mode parameter set is not updated before the update condition is met.
  • the geometric division mode defined in the VVC standard may be determined based on the usage of a preset number of encoded images. After the partition mode parameters are determined, the partition mode parameters will not be updated until the update condition is established.
  • the update condition may be that after the update flag is received, the first division mode parameter set is updated according to the division situation of the image that has been encoded before the update flag is received. For example, before the update flag is received, the encoded image is encoded using the first partition mode parameter set S1. After receiving the update flag, the first partition mode parameter set S1 is updated based on the statistical partitioning situation before the time when the update flag is received to obtain the first partition mode parameter set S2. Next, subsequent images are encoded using the first partition mode parameter set S2.
  • the predetermined condition may be that after receiving the update flag, the first division mode parameter set is updated according to the division situation of a preset number of images to be encoded after receiving the update flag. For example, if the preset number is 3, before receiving the update flag, the image is encoded using the first partition mode parameter set S1. After receiving the update flag, the first division mode parameter set S1 is updated based on the division status of three consecutive images starting from the time when the update flag is received to obtain the first division mode parameter set S2. Next, subsequent images are encoded using the first partition mode parameter set S2. Based on the above solution, the first partition mode parameters can be adjusted according to the update flag to achieve a balance between saving computing resources and enhancing the applicability of the first partition mode in different scenarios.
  • the division mode parameters in the latest first division mode parameter set can be dynamically adjusted based on the usage of a preset number of encoded images, that is, whenever the preset number of encoded images is encoded.
  • the division mode parameters can be determined based on the usage of the preset number of encoded images, and the latest first division mode parameter set can be updated.
  • the image where the target image block is located is the seventh image, and the preset number is 3.
  • the first to third images are used in the encoding process, and the first division mode parameter set S1 is used, and based on the first three images
  • the first division mode parameter set S2 is obtained from the use of dividing lines in the encoded image.
  • the first division mode parameter set S2 is used in the encoding process for the 4th to 5th images, and based on the 4th to 5th encoded images
  • the first division mode parameter set S3 is obtained based on the usage of the dividing line.
  • the division mode parameters in the first division mode parameter S3 are used for the target image block, and in subsequent encoding, the image where the target image block is located is also used as
  • new division mode parameters are determined based on the use of dividing lines in the 6th to 8th encoded images, and the parameters of the first division mode can be dynamically adjusted based on the currently encoded image.
  • the division mode parameters used in the encoding process of each video frame indirectly refer to the usage of the encoded image.
  • the division mode parameters may also be determined in units of image blocks, that is, the division mode parameters are determined based on the usage of the division line by the encoded image blocks.
  • the target image block is a later-coded image block in the image
  • the usage of dividing lines by all previous image blocks can be counted, and the statistical scope of the usage of dividing lines can be further broadened to the area where the current block is located.
  • image which can improve the applicability of the division mode parameters used in the target image block, improve the accuracy of the prediction results, thereby reducing the distortion of video coding.
  • the first division mode may include at least one division mode, and each division mode corresponds to a division line.
  • Different image blocks in the encoded image may use different division lines, or the same division line may be reused.
  • the usage of the same dividing line in each image block is different, for example, the number of uses or the frequency of use are different. Assume that there are two dividing lines, namely dividing line L1 and dividing line L2.
  • the dividing line L1 may not be included in the encoded image. is used by any image block, while the dividing line L2 is used 10 times by image blocks in the encoded image. Since different dividing lines are used differently in the encoded image, the application of the dividing mode parameters in the target image block is also different.
  • the division mode parameters can be determined based on the use of the dividing line in the encoded image, and the division mode parameters can be used for the target image block. encoding.
  • the frequency of use is different, there are dividing lines with high frequency of use and dividing lines with low frequency of use.
  • For the dividing line with higher frequency of use it is used by more image blocks in the encoded image, indicating that the dividing line in the encoded image is attached to There are many boundaries between objects of the same type, and the corresponding division mode parameters are highly likely to be applied in the target image blocks.
  • the division lines with low frequency of use are used by fewer image blocks in the encoded image, indicating that there is segmentation in the image. The class of objects to which the lines fit has few boundaries, and the corresponding division mode parameters are less likely to be applied in the target image block.
  • the dividing mode parameters of the dividing lines used in the encoded image can be set or adjusted to obtain the first dividing mode set. If the boundary part of the object is between the most frequently used dividing line and the dividing line of the adjacent dividing line, you can further subdivide the angle where the more frequently used dividing line is located, for example, set more dividing lines to divide the angle. It needs to be more fine-grained to provide more options to filter out dividing lines that are more consistent with the object boundaries. This is because the most frequently used dividing line in an encoded image is not necessarily the most suitable for the currently encoded image block, but the dividing lines distributed around the dividing line can be found to be more closely aligned with the boundary by finely adjusting the angle. In addition, you can also adjust the original fitting dividing line to make it fit more closely with the boundary. These adjustments may involve the generation of new partition mode parameters or the adjustment of original partition mode parameters.
  • the angles formed between adjacent dividing lines in the at least one dividing line are not equal in size.
  • the size of the angle formed between any two adjacent dividing lines may be unequal.
  • the included angle formed between the dividing line L1 and the left adjacent dividing line of the dividing line L1 is greater than the included angle formed between the dividing line L1 and the right adjacent dividing line of the dividing line L1.
  • Adjacent dividing lines are relative.
  • the dividing line L1 and the dividing line L2 are adjacent dividing lines.
  • the angles between any two dividing lines are unequal in size, which can cause uneven distribution of the positions of each dividing line. Since this uneven distribution characteristic is related to the characteristics of the object boundary in the image block, it improves the fit between the segmentation line and the boundary to a certain extent.
  • the dividing mode parameter is based on the use of the dividing line in the encoded image, and the angular interval between the dividing line in the target direction and the adjacent dividing line of the dividing line in the target direction. Adjustment is confirmed.
  • the dividing lines corresponding to each dividing mode included in the first dividing mode may be dividing lines in different directions, such as dividing lines in the horizontal/vertical direction and dividing lines in the positive/negative 45-degree direction.
  • the dividing line in the target direction may be determined by the usage of the dividing line in the encoded image.
  • the dividing line in the target direction is the most frequently used dividing line in the horizontal direction (90 degrees) in the encoded image.
  • the dividing line adjacent to a certain dividing line is simply called an adjacent dividing line.
  • the dividing line adjacent to the dividing line in the target direction refers to the dividing line adjacent to the dividing line in the target direction.
  • an angular interval can be formed between the dividing line in the target direction and the adjacent dividing line, that is, the angle between two straight lines with intersection points.
  • a new dividing line can be added or the position of an existing dividing line can be adjusted based on the usage of the dividing line in the encoded image.
  • the position of the existing dividing line is adjusted, and then the dividing mode parameters can be determined.
  • adjusting the angle between the dividing line based on the target direction and the adjacent dividing line by adding a new dividing line may be: adding a dividing line based on the average value, that is, the dividing line in the target direction and The angles corresponding to adjacent dividing lines are averaged to obtain a new angle.
  • the dividing line corresponding to the new angle is used as a new dividing line and added between the dividing line in the target direction and the adjacent dividing lines.
  • the angle corresponding to the dividing line in the target direction is ⁇ 11
  • the angle corresponding to the adjacent dividing line is ⁇ 12.
  • the rule followed for the angular interval between the dividing line in the target direction and the adjacent dividing line may be: the angular interval between the dividing line in the target direction and the adjacent dividing line is smaller than the dividing line in the reference direction.
  • the angular interval between the dividing line and the adjacent dividing line; and/or the application probability of the dividing line in the target direction is greater than the application probability of the dividing line in the reference direction.
  • the dividing line in the reference direction and the dividing line in the target direction are two dividing lines in different directions.
  • the adjacent dividing lines of the dividing line in the target direction and the adjacent dividing lines of the dividing line in the reference direction may be the same dividing line, or they may be are different dividing lines.
  • the dividing lines around the dividing line in the reference direction are denser.
  • the dense dividing lines can divide the area centered on the dividing line in the target direction more finely, thus improving the boundary with the objects in the image when applying the dividing lines. degree of fit.
  • FIG. 5 is a schematic diagram of an adjusted dividing line provided by an embodiment of the present application.
  • the angular interval between the dividing line in the horizontal direction and its adjacent dividing lines is smaller than the angular interval between the dividing line in the +/-45 degree direction and its adjacent dividing lines, and the dividing line in the vertical direction is adjacent to it.
  • the angular interval between adjacent dividing lines is smaller than the angular interval between the dividing line in the +/-45 degree direction and its adjacent dividing lines.
  • the angular interval between the dividing line ⁇ 8 and the adjacent dividing line ⁇ 6 is smaller than the angular interval between the dividing line ⁇ 4 and the adjacent dividing line ⁇ 6 (part of the dividing lines is not shown in FIG. 5 ). Therefore, the dividing lines around the vertical dividing line and the horizontal dividing line are denser, while the dividing lines in the +/-45 degree direction are sparse.
  • a lookup table for searching the mapping between the index i and the angle-related parameter cos( ⁇ ) may be set.
  • i is the index
  • i ranges from 0 to n.
  • a 1 ⁇ a n are the values of cos( ⁇ ) corresponding to different split indexes.
  • the index i may correspond to the segmentation index and cos( ⁇ ) may correspond to the angle index.
  • cos( ⁇ ) may correspond to the angle index.
  • the adjustment of the partition mode parameters can actually be achieved. It should be noted that this implementation method is suitable for scenarios where there are many approximately horizontal boundaries and approximately vertical boundaries.
  • the angle index and distance index corresponding to each dividing line are preset and will not be dynamically adjusted during this encoding and decoding process.
  • a ia takes a value of 1.
  • the values of ia, ib, and ic are 0 ⁇ n. In other words, there are cosine values of the angles corresponding to the dividing lines in the horizontal direction, the vertical direction, and the 45-degree direction respectively.
  • the difference between the angle corresponding to index ia and the angle corresponding to index ia+1 adjacent to index ia can be smaller than that corresponding to index ic
  • the difference between the angle corresponding to index ic and the angle corresponding to index ic+1 adjacent to index ic, the difference between the angle corresponding to index ia and the angle corresponding to index ia-1 adjacent to index ia is smaller than that corresponding to index ic
  • the difference between the angle corresponding to index ib and the angle corresponding to index ib+1 adjacent to index ib is smaller than the difference between the angle corresponding to index ic and the angle corresponding to index ic+1 adjacent to index ic. value.
  • the difference between the angle corresponding to index ib and the angle corresponding to index ib-1 adjacent to index ib is smaller than the difference between the angle corresponding to index ic and the angle corresponding to index ic-1 adjacent to index ic.
  • the application probability of the dividing line refers to the possibility that the dividing line in the target direction is used in the image block.
  • the application probability of the dividing line in the target direction is greater than the application probability of the dividing line in the reference direction.
  • the boundaries of objects contained in videos are mostly in approximately horizontal and approximately vertical directions. Therefore, the probability of using dividing lines close to the horizontal/vertical direction is higher than dividing lines with other directions (for example, + /-45 degree dividing line) is more likely to be used.
  • the angle between the dividing line with the smallest application probability and the adjacent dividing line is larger than the angle between the dividing line with the largest application probability and the adjacent dividing line.
  • the method for determining the application probability of the dividing line in the target direction may be: counting in advance the number of uses of each dividing line in a preset number of encoded images, and determining the application probability of the dividing line based on the number of uses.
  • the dividing line in the target direction and the dividing line in the reference direction can be divided by applying the probability threshold as the basis.
  • the dividing line in the target direction is the dividing line in the dividing line in all directions whose application probability is greater than the application probability threshold, and the dividing line in the reference direction
  • the dividing line is the dividing line whose application probability is less than the application probability threshold among the dividing lines in all directions.
  • the dividing line in the target direction may include dividing lines in multiple directions (at least two), for example, including a dividing line in the horizontal direction and a dividing line in the vertical direction.
  • the dividing line in the reference direction such as a dividing line in the 45-degree direction, 60 degree dividing line.
  • the angular intervals between the dividing lines in each target direction and the dividing lines in each reference direction and adjacent dividing lines can be set according to the above rules, and then the dividing lines in the target directions with a high probability of application are set more densely, and the reference lines with a small application probability are set more densely.
  • the dividing lines in the direction are set more sparsely to improve the effect of using the division mode parameters in the first division mode parameter set when encoding subsequent image blocks.
  • the dividing lines may be distributed in the angular range around the horizontal and/or vertical lines, but there are no dividing lines in the +/-45 degree direction. This can speed up the adjustment of existing dividing lines, and for videos in some specific scenes, for example, the boundaries of most objects in the video belong to the target direction, and the dividing lines in the target direction are directly used to fit the boundaries of the objects in the image block, instead of omitting
  • the dividing line in the reference direction can be encoded more efficiently.
  • S402 Determine the prediction result of the target image block based on the target division mode parameter.
  • the target division mode parameters include any one or more of the division index, angle index and distance index corresponding to the target division line, and the rate distortion cost obtained by applying the target division line to the target image block is minimal.
  • Each index included in the target division mode parameter is a mode parameter using which the target division line is applied to the target image block.
  • the target division mode parameters include an angle index and a distance index. The process of predicting the target image block based on the target division mode parameters can be roughly as follows: using the angle index and the distance index to determine whether the target image block is divided by the division line. The prediction result in the image area is then used as the prediction result of the target image block.
  • the weight of each pixel in the target image block can be determined according to the angle index and the distance index, and then the weight and the corresponding pixel value are weighted and summed to obtain a weighted predicted pixel value, which can be used as the target image block. prediction results.
  • Each pixel in the prediction block of the target image block uses the prediction result.
  • the division mode parameters corresponding to the first division mode can be binarized and packed into a bit stream and transmitted to the decoding end.
  • the division index can be packed into the bit stream.
  • the decoder After the decoder receives the bit stream, it parses the bit stream to obtain the division mode parameters of the first division mode: the division index.
  • the angle index and distance index corresponding to the division index can be determined by searching the parameter mapping table, and then according to The angle index and segmentation index determine the corresponding prediction results of the target image block in different image areas divided by the segmentation lines.
  • the above parameter mapping table needs to be set in the decoder in advance.
  • step codes such as S401 and S402 are used for the purpose of describing the corresponding content more clearly and concisely, and do not constitute a substantial restriction on the sequence. Those skilled in the art may S402 will be executed first and then S401, etc., but these should be within the protection scope of this application. The same applies to the following embodiments.
  • the image processing solution provided by the embodiment of the present application determines the target division mode parameter that matches the target image block from the first division mode parameter set including the division mode parameter corresponding to the first or at least one division line, and based on the target division
  • the mode parameters can obtain the prediction results of the target image block.
  • the division mode parameters included in the first division mode parameter set are determined based on the use of the dividing line by the encoded image, which can provide a better reference for the use of the dividing line by the target image block.
  • Adjusting the angular interval between the target direction and adjacent dividing lines according to certain rules can make the dividing lines around the dividing lines in the target direction set more densely, so as to improve the separation line used by the target image block and the target image block.
  • the fit of the boundaries of the objects contained in the object reduces the error of the prediction results.
  • Figure 6a is a schematic flowchart of an image processing method according to a second embodiment.
  • the execution subject in this embodiment can be a computer device or a cluster composed of multiple computer devices.
  • the computer device can It may be an intelligent terminal (such as the aforementioned mobile terminal 100), or it may be a server.
  • the execution subject in this embodiment is an intelligent terminal as an example for explanation.
  • the division mode parameters included in the first division mode parameter set can be determined based on the use of each division line by the encoded image, and the first division mode parameter set can represent the division index, the angle index and the distance
  • the parameter mapping table of the mapping relationship between indexes can be dynamically adjusted during the encoding process, thereby updating the parameters of the partition mode to improve the adaptability of the first partition mode to different scenarios.
  • the adjustment method of the first division mode parameter set will be introduced in detail below. For details, please refer to the following steps S601 to S603.
  • the coded image refers to the image that was coded before the image where the target image block is located, that is, the coded frame. Since the coded image can be processed using any one of multiple prediction modes, the first division mode is in the coded image.
  • the usage in specifically refers to the usage of the dividing line corresponding to each dividing mode in the first dividing mode in the encoded image, for example, the number of times the dividing line corresponding to a certain dividing mode is used in the encoded image. In this way, the usage status of all division lines corresponding to the first division mode in the encoded image can be obtained, and then the division mode parameters in the first division mode parameter set can be determined based on the usage status (see steps S602 and S603).
  • the use of dividing lines in the encoded image is important for the encoding of subsequent images. It is a reference. It adjusts the dividing mode parameters in real time according to the usage of dividing lines in the encoded image. It can adaptively match the dividing lines and the boundaries of objects in the image to improve the fit between the two. .
  • the dividing line used in the encoded image is the dividing line corresponding to the dividing mode parameter in the first dividing mode parameter set.
  • the first dividing mode parameter set here represents the dividing index, the angle index and A parameter mapping table of the mapping relationship between the distance indexes.
  • the parameter mapping table is preset and never changes, or the parameter mapping table is adjusted once after encoding a preset number of images, or the parameter mapping table is adjusted after receiving an update flag. ;
  • the parameter mapping table is the latest parameter mapping table. Every time the encoded image reaches a preset number, for example, after each frame is encoded, it will be adjusted to the latest parameter mapping table based on the current parameter mapping table. , is a dynamic adjustment method.
  • S602 Determine the application probability of the dividing line based on the usage situation.
  • the application probability of the dividing line refers to the possibility of being used in the encoding process of the image. That is, the probability that each dividing line appears in the encoded image.
  • the determination method of the application probability in one embodiment, it is possible to: in response to the number of encoded images reaching a preset threshold, obtain the number of uses of the first division mode; determine based on the usage record parameters and the number of uses The application probability of each dividing line.
  • the first partitioning mode may be used or other prediction modes may be used to perform prediction processing on the image blocks.
  • the first partitioning mode may be used or other prediction modes may be used to perform prediction processing on the image blocks.
  • the number of times the first division mode is used refers to the total number of times the first division mode is used by encoded images.
  • the first dividing mode includes at least one dividing mode, and each dividing mode corresponds to a usage recording parameter, which is used to record the total number of times that the dividing line corresponding to the dividing mode is used by the encoded image.
  • the number of times the first division mode is used can be determined based on the usage record parameters, that is, the total number of times the encoded image uses the first division mode is obtained by summing the usage record parameters corresponding to each division mode. Then, the ratio of the usage record parameters corresponding to each dividing line and the number of uses can be used as the application probability of the corresponding dividing line.
  • the encoding end can set the historical record parameters corresponding to the use of the dividing line for each index (such as the dividing index) included in the first dividing mode parameter set, that is, the usage record parameters in this dividing mode.
  • the corresponding history record parameter can be increased by 1, so that when the number of encoded images reaches the preset threshold, statistics The number of times each division mode has been used is obtained, and the total number of times the first division mode is used can be obtained.
  • Table 1 below shows the usage record parameters obtained by applying the geometric division mode to image block statistics
  • Table 2 shows the application probability of each division line in the geometric division mode.
  • bi represents the usage record parameter of the i-th dividing line
  • ci represents the application probability of the i-th dividing line.
  • the parameter mapping table is a look-up table (LUT) that represents the mapping relationship between the segmentation index, the angle index and the distance index.
  • the corresponding parameter can be found through any index.
  • the corresponding index for example, if the division index is determined, the corresponding angle index and distance index can be found in the parameter mapping table according to the division index.
  • Table 3 is a lookup table representing the mapping relationship between the GPM partition index merge_gpm_partition_idx, the angle index angleIdx, and the distance index distanceIdx in the geometric partition mode.
  • the distance index has duplicate data, while the segmentation index and angle index are different.
  • the angle index angleIdx corresponds to the sine value or cosine value of the angle
  • the dividing line with the highest application probability can be determined, or the area with high application probability of the dividing line can be determined based on the application probability, and then the interpolation method can be used to set a new dividing line , optionally, determine according to the newly set dividing line that the newly set dividing line corresponds to the new angle index and the new distance index, and then adjust the relationship between the dividing index and the angle index and the distance index according to the new angle index and the new distance index. mapping relationship to construct a dynamically adjusted parameter mapping table.
  • dividing lines there can be a variety of dividing lines ⁇ 0, ⁇ 1, ⁇ 2, ⁇ 3... ⁇ i, ⁇ j... ⁇ n. These dividing lines are used to match the boundaries of objects in the image block, and can be based on rate-distortion optimization (RDO). Determine the best dividing line used for the image block, and the corresponding dividing mode parameters are the target dividing mode parameters.
  • RDO rate-distortion optimization
  • Figure 6b is a schematic diagram of the effect of applying different dividing lines to image blocks according to an embodiment of the present application.
  • the effect of applying two dividing lines (including ⁇ i, ⁇ j, and the rest not shown) to different image blocks is shown, where the dotted line indicates that they are not used in the corresponding image blocks according to the RDO process.
  • the dividing line of , the solid line represents the dividing line finally adopted according to the RDO process.
  • ⁇ i is adopted 2 times and ⁇ j is adopted 3 times.
  • ⁇ i, ⁇ j are dividing lines that appear frequently within a period of time, it means that the boundary of the object in the image block (as shown by the curve in Figure 6b) is more likely to use an angle within [ ⁇ i, ⁇ j], so that The dividing line in the first dividing mode is closer to the boundary of the object in the image.
  • the angles within [ ⁇ i, ⁇ j] can be further subdivided by adding more dividing lines to make the dividing line fit the object boundary. degree better. For example, after adding a new dividing line ⁇ new , there are more dividing lines to choose from at the edges of objects that appear with high probability in the image. Obviously, after adding the new dividing line ⁇ new , the fitting degree is better for the corresponding image blocks in columns 2, 3, and 4 in (1) and (2) in Figure 6b.
  • step S603 since the most critical update of the division mode parameters corresponding to the division line is the update of the angle, by introducing an angle mapping table containing angle parameters describing angle information, the parameter mapping table can be updated quickly and accurately . Based on this, the implementation of step S603 includes the following steps S6031 and S6032.
  • the angle mapping table is used to represent the mapping relationship between the query index and the angle parameter.
  • the query index includes the segmentation index or the angle index, and there is a relationship between the angle index and the angle parameter. connection relation.
  • the angle mapping table is a lookup table that represents the mapping relationship between the query index and the angle parameters.
  • the query index is used to establish the association between the angle mapping table and the parameter mapping table. Since the split index and angle index in the parameter mapping table are unique , so the query index in the angle mapping table can be set to a split index or an angle index.
  • the angle parameters in the angle mapping table can be used to describe the angle information of the dividing line in the image block, so there is a correlation between the angle parameters and the angle index: the corresponding angle index in the parameter mapping table can be set to the angle parameter, or is a function of the angle parameter. Assume that the query index is recorded as i and the angle parameter is recorded as cos( ⁇ ).
  • the specific angle mapping table can be as shown in Table 4.
  • This table includes the angle parameters corresponding to n+1 division modes, the angle parameter cos( ⁇ ) and the angle index angleIdx.
  • the application probability based on the dividing line first updates the angle mapping table, mainly updating the angle parameters in the angle mapping table.
  • the association between them can update the parameter mapping table based on the updated angle mapping table, including the angle index and distance index in the parameter mapping table.
  • step S6031 includes: updating the angle mapping table based on the angle parameter corresponding to the first query index and/or the angle parameter corresponding to the second query index, to obtain an updated angle mapping table.
  • the first query index and/or the second query index may be determined based on the application probability of the dividing line: the first query index is the query index corresponding to the dividing line with the highest application probability; the second query index is the application probability times The query index corresponding to the high dividing line, or the adjacent query index of the first query index.
  • the first query index and the second query index are two different query indexes in the angle mapping table. It is assumed that the query index in the angle mapping table is a split index, and the application probability can correspond to the split line through the split index. Therefore, based on the application probability, The first query index and/or the second query index are determined from the angle mapping table. For example, the query index with the highest application probability can be used as the first query index, and the query index with the second highest application probability can be used as the second query index. Then, according to the preset update rules, update based on the angle parameters corresponding to the first query index and/or the second query index, for example, insert a new angle parameter between the angle parameters corresponding to the two query indexes, or adjust the query index respectively. The size of the corresponding angle parameters, etc. For more details, please refer to the two implementation modes introduced next.
  • the target angle parameter can be determined based on the angle parameter corresponding to the first query index and the angle parameter corresponding to the second query index; the angle mapping table is updated based on the target angle parameter to obtain the update The final angle mapping table.
  • the target angle parameter is a new angle parameter.
  • the size of the target angle parameter can be between the angle parameter corresponding to the first query index and the angle parameter corresponding to the second query index.
  • the angle mapping table can be updated according to the target angle parameter. , the updated angle mapping table is obtained. In this implementation, the following methods 1 and 2 are included.
  • the first query index is the query index with the highest application probability
  • the second query index is the adjacent query index of the first query index.
  • the adjacent query index includes the query index left adjacent to the first query index and/or
  • the target angle parameter of the query index adjacent to the right of the first query index is a new angle parameter set between the angle parameters corresponding to the first query index and the second query index respectively. It can be understood as a new angle parameter in the angle mapping table.
  • Added angle parameter The angle indicated by the angle parameter is between the angles indicated by the angle parameters corresponding to the two query indexes. Therefore, the target angle parameter includes an angle parameter that is adjacent to the left and/or an angle parameter that is adjacent to the right of the angle parameter corresponding to the first query index in the angle mapping table.
  • the corresponding angle parameter needs to be deleted in the angle mapping table to add the target angle parameter to the angle mapping table. For example, if the target angle parameter includes a new angle parameter, then an angle parameter with the lowest application probability is correspondingly deleted.
  • the first query index is recorded as index M below, and the two adjacent indexes included in the second query index are recorded as index MN1 and index MN2 respectively.
  • the angle parameter cos( ⁇ M corresponding to index M and index MN1 can be ) and cos( ⁇ MN1 ), insert new cos( ⁇ New ), which is the target angle parameter.
  • the angle of ⁇ New is located between the angles corresponding to the indices M and MN1 respectively.
  • the values of i' and cos( ⁇ ') can be inserted into the angle mapping table shown in Table 4, and the index with the lowest application probability is deleted from Table 4 to obtain the updated angle mapping table. It should be noted that inserting i' will not affect the number of query indexes. For example, based on the angle mapping table shown in Table 4, if the cos( ⁇ ) value a 2 corresponding to index 1 has the highest application probability, then interpolation is performed between the angle parameters a 1 and a 2 to obtain a new1 , and/or, interpolate between a 2 and a 3 to obtain a new2 , and then insert a new1 and/or a new2 into the angle mapping table.
  • the angle parameters that need to be deleted can be filtered out based on the application probability. If two new angle parameters are to be inserted into the angle mapping table, the two deleted angle parameters are filtered out. For example, if the application probability of the dividing line corresponding to the query index n is the lowest, then the cos( ⁇ ) value corresponding to the index n, that is, a n is deleted from the table. If the application probability of the dividing line corresponding to the query index n-1 is the second lowest, Then the cos( ⁇ ) value corresponding to the index n, that is, a n-1, is deleted from the angle mapping table. Optionally, reorder the angle mapping table to obtain Table 5 as shown below.
  • angleIdx in the parameter mapping table may be updated based on the updated angle mapping table as shown in Table 5.
  • Method 2 The first query index and the second query index are respectively the query index with the highest application probability and the query index with the second highest application probability.
  • the angle formed by the angle indicated by the angle parameters corresponding to the first query index and the second query index Between regions, the dividing lines can be interpolated or adjusted to update the parameter mapping table.
  • the first query index is marked as M1 and the second query index is marked as M2. That is to say, if the angles indicated by the first query index M1 and the second query index M2 are ⁇ 1 and ⁇ 2 , And it is believed that the probability of applying the dividing line within the corresponding angle range [ ⁇ 1 , ⁇ 2 ] is high, then a new dividing line is inserted between the first query index and the second query index.
  • the insertion of dividing lines can be one or more.
  • the probability of applying a dividing line is high within the angle interval range [ ⁇ 1 , ⁇ 2 ], and the angle interval range corresponds to cos( ⁇ ) equal to a 2 and a 3 If the angle range is between a 2 and a 3, insert a new between a 2 and a 3 .
  • the application probability of the dividing line corresponding to an is low, then an is deleted from the angle mapping table.
  • the angle parameters corresponding to the undeleted dividing lines are rearranged, and the angle parameters corresponding to these dividing lines are corresponding to the query index i.
  • Table 6 it is an updated angle mapping table obtained by updating the angle mapping table shown in Table 4 according to the above example content.
  • At least one dividing line can be inserted between the query index with the highest probability and the query index with the second highest probability. At least one dividing line will be inserted in the corresponding angle area corresponding to the angle ⁇ .
  • This can form at least one angle parameter.
  • a 2 and a 5 are the angle parameters corresponding to the first query index and the second query index respectively.
  • An angle parameter that does not overlap with a 3 or a 4 can be randomly added between a 2 and a 5.
  • This angle parameter corresponds to the segmentation Line, this can make the dividing lines with higher application probability distributed more densely around the dividing lines, so as to divide the angles in the area where the boundary of the applying dividing lines with higher application probability is located in the image block in a more fine-grained manner, as much as possible Fit to the boundary of the object.
  • the second query index is an adjacent query index of the first query index, and may: adjust the angle parameter corresponding to the second query index in the angle mapping table according to the preset adjustment rules, Get the updated angle mapping table.
  • the first query index may be the split index corresponding to the split line with the highest application probability
  • the second query index may be left adjacent to the first query index, and/or right adjacent to the first query index.
  • the adjustment goal of the preset adjustment rules is to make the dividing lines around the dividing lines with the highest probability of application as dense as possible.
  • the angle parameter corresponding to the second query index can be adjusted so that the difference in the angle parameter between the first query index and the second query index is further reduced, and an updated angle mapping table is obtained.
  • query index 1 and query index 3 can be The corresponding cos( ⁇ ) values are adjusted to a'1 and a'3 , so that the difference between the cos( ⁇ ) values corresponding to query index 1 and query index 3 and the cos( ⁇ ) value corresponding to query index 2 is reduced. Small, as shown in Table 7 below.
  • the corresponding angle index angleIdx in the parameter mapping table can be updated according to the updated angle mapping table as shown in Table 7.
  • the way to update the angle mapping table according to the preset adjustment rules may be: in response to the angle parameter corresponding to the adjacent query index being greater than the angle parameter corresponding to the first query index, reducing the angle parameter corresponding to the adjacent query index. Query the angle parameter corresponding to the index to obtain the updated angle mapping table; and/or, in response to the angle parameter corresponding to the adjacent query index being smaller than the angle parameter corresponding to the first query index, increase the angle parameter corresponding to the adjacent query index Index the corresponding angle parameter to obtain the updated angle mapping table.
  • the goal of adjustment is to reduce the difference between the first query index and the adjacent query index as much as possible. Therefore, when the angle parameter of the adjacent query index is greater than the angle parameter corresponding to the first query index, you can Adjust the angle parameter corresponding to the adjacent query index closer to the angle parameter corresponding to the first query index, that is, reduce the angle parameter corresponding to the adjacent query index; when the angle parameter of the adjacent query index is smaller than the angle parameter corresponding to the first query index. When changing the angle parameter, the angle parameter corresponding to the adjacent query index is also adjusted closer to the angle parameter corresponding to the first query index, that is, the angle parameter corresponding to the adjacent index is increased. No matter whether one or both of the above adjustment rules are executed, the updated angle mapping table can be obtained.
  • the angle parameters corresponding to the adjacent query indexes after adjustment are also larger (or smaller) than the angle parameters corresponding to the first query index, but the difference between the two is the same. It is smaller than before adjustment.
  • a preset adjustment limit for the angle parameter adjustment of adjacent indexes that is, the difference between the adjusted angle parameter corresponding to the adjacent query index and the angle parameter corresponding to the first query index.
  • the value is within a preset range; and/or the preset range is determined based on the application probability of the dividing line corresponding to the first query index.
  • the preset range is used to control the adjustment limit of the angle parameter corresponding to the adjacent query index.
  • the difference between the adjusted angle parameter corresponding to the adjacent query index and the first query index is controlled within the preset range, so that The angle parameters corresponding to the adjacent query index are adjusted within a reasonable range.
  • the preset range can be determined based on the application probability of the dividing line corresponding to the first query index.
  • the application probability of the dividing line corresponding to the first query index and the preset range can be realized by setting a corresponding association relationship. , for example, set a mapping function between the application probability and the preset range. The greater the application probability of the first query index, the smaller the preset range.
  • the adjustment limit of the angle parameter corresponding to the adjacent query index is related to the application probability of the dividing line corresponding to the first query index. Since the greater the application probability of the dividing line corresponding to the first query index, the target image block uses the dividing line. The higher the possibility, the adjustment of the angle parameters corresponding to the adjacent query index can make a finer division of the area around the dividing line corresponding to the first query index. If the adjacent dividing line is applied to the target image block, the area can be more finely pasted. Combined with the object boundary, thereby improving the coincidence with the object boundary to a certain extent.
  • the parameter mapping table can be updated in real time before encoding the current block. After the encoding of the target image where the target image block is located is completed, the latest parameter mapping can also be based on the use of the dividing line by the target image. The table is updated for subsequent use of image blocks.
  • a bit stream may also be sent to the decoding end, where the bit stream includes indication information of the updated parameter mapping table.
  • the angle mapping table is updated based on the application probability of the dividing line, and after the parameter mapping table is updated based on the updated angle mapping table, the indication information of the updated parameter mapping table can be sent to the bit stream. middle.
  • the indication information is used to instruct the decoder to use the updated parameter mapping table to determine the prediction result of the target image block.
  • the encoded bit stream corresponding to the target image block is decoded at the decoding end, and the same parameter mapping table as that at the encoding end can be used in the prediction stage to determine the corresponding prediction result.
  • the division index regarding the division mode parameters can be obtained through the received bit stream.
  • the angle index and distance index corresponding to the division index can be determined. , and further determine the prediction results corresponding to different image areas in the target image block according to the angle index and distance index.
  • the mapping relationship between the segmentation index, the angle index, and the distance index is dynamically adjusted during the entire encoding process, and the adaptability to different scenarios can be effectively improved.
  • the image processing solution provided by the embodiment of the present application introduces an angle mapping table used to represent the mapping relationship between the query index and the angle parameter, and separates the angle index corresponding to the dividing line from the dividing mode parameter for adjustment.
  • Update the angle mapping table to update the parameter mapping table, so that the dividing mode parameters can be determined more efficiently; by referring to the use of dividing lines in the encoded image to determine the application probability of the dividing lines, the dividing lines can be used for the encoded images
  • Quantitatively evaluate the situation so as to determine the query index that needs to adjust or add angle parameters based on the application probability, provide a more scientific update basis, and update the angle mapping table; in addition, since every time the preset coded image is reached, Usage statistics can update the parameter mapping table by updating the angle mapping table, so that the parameter mapping table can be continuously updated during the encoding process to achieve dynamic adjustment of the parameter mapping table, thereby obtaining different division modes at different stages. parameters to cover more diverse scenarios to improve the adaptability of the first division mode to different scenarios.
  • Figure 7 is a schematic flow chart of an image processing method according to a third embodiment.
  • the execution subject in this embodiment can be a computer device or a cluster composed of multiple computer devices.
  • the computer device can It may be an intelligent terminal (such as the aforementioned mobile terminal 100), or it may be a server.
  • the execution subject in this embodiment is an intelligent terminal as an example for explanation.
  • the image processing solution provided by the embodiment of the present application may have prerequisites for implementation, that is: based on the target image block Parameters: Use at least one prediction mode to perform predictive encoding on the target image block, and determine the rate distortion cost corresponding to each prediction mode; when the prediction mode with the smallest rate distortion cost is the first division mode, perform step S701.
  • the encoder may determine the color component of the target image block, which color component includes the luminance component and/or the chrominance component, and then use at least one prediction mode based on the parameters of the target image block (the parameters are parameters used for predictive encoding) Predictively encode the color component of the target image block, and then determine the rate distortion cost corresponding to each prediction mode, where at least one prediction mode includes an intra prediction mode and/or an inter prediction mode. If multiple ( At least two) prediction modes, the color components of the target image block can be predictively encoded respectively, and the rate-distortion cost corresponding to each prediction mode can be calculated. Then the minimum rate distortion cost can be determined from the rate distortion costs corresponding to multiple prediction modes, the prediction mode corresponding to the minimum rate distortion cost is determined as the target prediction mode of the target image block, and the corresponding mode parameters are determined as the target image block prediction model parameters.
  • the parameters are parameters used for predictive encoding
  • the first division mode can be used as the target prediction mode adopted by the target image block, and based on the first division mode parameter set Determine the target partition mode parameters of the target image block.
  • the solution provided by the embodiment of the present application can be implemented, and when it is determined that the prediction mode with the smallest rate distortion cost is the first division mode, the solution can be
  • the division mode parameters corresponding to the first division mode are directly determined as the prediction mode parameters of the target image block, and the prediction results obtained in the embodiments of the present application are directly used.
  • the target division mode parameters of the target image block are division mode parameters that meet certain conditions in the first division mode parameter set.
  • the first division mode includes at least one division mode.
  • the implementation of step S701 includes the following steps:
  • S7011 Determine the rate distortion cost applied to the target image block for each division mode included in the first division mode
  • S7012 Determine the division mode with the smallest rate distortion cost as the target division mode of the target image block
  • S7013 Determine the mode parameter corresponding to the target division mode from the first division mode parameter set, and determine the mode parameter corresponding to the target division mode as the target division mode parameter of the target image block.
  • all division modes included in the first division mode can be traversed to determine the rate distortion cost required for the target image block to adopt various division modes respectively.
  • the rate distortion costs corresponding to each division mode can be compared, and the division mode with the minimum rate distortion cost can be determined and the rate distortion cost can be minimized.
  • the division mode is used as the target division mode of the target image block, which can achieve the optimal encoding of the target image block.
  • the mode parameters corresponding to the target division mode can be queried from the first division mode parameter set, and the mode parameters are used as the target division mode parameters to be used for the target image blocks. Subsequent divisions can be performed according to the target division mode parameters.
  • the target image block is predicted and the prediction result of the target image block is obtained.
  • the following takes the first division mode as the GPM mode, the division mode as any one of the 64 division modes corresponding to the GPM mode, and the first division mode as the GPM mapping table as an example to illustrate the above process:
  • the 64 division modes corresponding to the GPM mode can determine the division mode with the minimum rate distortion cost, and use the division mode with the minimum rate distortion cost as the target division mode of the current block.
  • the target GPM partition index merge_gpm_partition_idxT, the target angle index angleIdxT, and the target distance index distanceIdxT corresponding to the target partition mode are determined through the mapping table of the GPM partition index merge_gpm_partition_idx, the angle index angleIdx, and the distance index distanceIdx.
  • the parameter mapping table of the GPM segmentation index, angle index, and distance index reference may be made to the description of the foregoing embodiments, and no detailed description will be given here.
  • angle index angleIdx takes different values, it corresponds to different angles ⁇ (as shown in the aforementioned Figure 3a), and when the distance index distanceIdx takes different values, it corresponds to different distances ⁇ (as shown in the aforementioned Figure 3b).
  • the combinations of different values of the angle index angleIdx and the distance index distanceIdx respectively constitute different partitioning methods (as shown in Figure 3c).
  • a lookup table can be used to represent the GPM partition index merge_gpm_partition_idx and the angle index angleIdx and the distance index.
  • the relationship between distanceIdx For example, take the parameter mapping table introduced previously (shown in Table 3).
  • the target image block includes a first partition and a second partition, and the first partition and the second partition are two image areas obtained by dividing the target image block by a dividing line.
  • the dividing line is the dividing line indicated by the target division mode parameter of the target image block.
  • the first partition and the second partition here are relative terms.
  • a horizontal dividing line is used to divide the target image block, and the image area above the horizontal dividing line can be called the first partition.
  • the image area below the dividing line can be called the second partition.
  • the image area below the horizontal dividing line may be called the first partition
  • the image area above the horizontal dividing line may be called the second partition.
  • the dividing line in the horizontal direction is fully or partially aligned with the boundary area in the target image block.
  • the partition weight is determined based on the angle index and the distance index included in the target partition mode parameters.
  • Partition weight refers to the two partitions included in the image block. The weight corresponding to the area. The partition weight is used to weight each pixel in the corresponding partition to obtain the weighted predicted pixel value, which is recorded as predSamples. The weighted predicted pixel value of the corresponding partition can be used as the prediction result.
  • the straight line equation of the dividing line can be obtained according to the angle index angleIdx and the distance index distanceIdx.
  • the cos( ⁇ ) and sin( ⁇ ) in the straight line equation can be determined according to the angle index angleIdx
  • the straight line equation in the straight line equation can be determined according to the distance index distanceIdx. ⁇ .
  • the expression for the equation of a straight line is as follows:
  • (x c , y c ) is the coordinate of a pixel point at a continuous position relative to the center position of the target image block.
  • Figure 8a is a schematic diagram of distance analysis between pixel points and dividing lines provided by an embodiment of the present application. If the pixel point (x c , y c ) is a pixel in the current block, based on the above straight line equation, the distance from the pixel point (x c , y c ) to the dividing line can be obtained as:
  • the angle index and distance index included in the target division mode parameters can determine the distance between each pixel point in the target image block and the dividing line, and the weight corresponding to each pixel value of the target image block can be determined based on this distance. .
  • set different weights according to the distance of the pixel point (x c , y c ) relative to the dividing line For example, if the distance between the pixel point (x c , y c ) and the dividing line is greater than or equal to the set distance threshold , then the weight corresponding to the pixel point (x c , y c ) is set to K1, otherwise, the weight corresponding to the pixel point (x c , y c ) is set to K2. It is obvious that the pixel points smaller than the set distance threshold are located near the dividing line, and the pixel points larger than the set distance threshold are far away from the dividing line.
  • the above rules are used to set the weights to obtain the partition weights.
  • different fixed weights can be set. It can be seen that the weight of each pixel value is not only related to the distance from the dividing line, but also to the location of each pixel. Partition related.
  • the partition weight By setting the partition weight in this way, different degrees of attention can be given to the pixels in the two image areas bounded by the dividing line in the target image block, and the pixels corresponding to the pixels close to the dividing line and those not close to the dividing line can
  • the weights can also be different.
  • the pixels closer to the dividing line have greater weights. In this way, the two partitions of the target image block can be better fused along the edge of the dividing line to obtain the prediction result.
  • S703 Determine the prediction result of the first partition and the prediction result of the second partition based on at least one of the partition weight, the first prediction result set and the second prediction result set.
  • the first prediction result set and the second prediction result set are obtained by referring to motion vectors of different reference frames.
  • the first prediction result set includes multiple prediction results, which may be unidirectional prediction of the target image block to obtain unidirectional prediction motion.
  • the predicted value obtained by motion compensation after the vector The same applies to the second prediction result.
  • the specific process of determining the first prediction result set and the second prediction result set please refer to the introduction of the following embodiments, which will not be described in detail here.
  • the partition weight includes a first weight corresponding to the first partition and a second weight corresponding to the second partition, and the first weight or the second weight is based on the target
  • the distance between the pixels included in the image block and the dividing line is determined.
  • the first weight is determined based on the distance between the pixels in the first partition in the target image block and the segmentation line
  • the second weight is determined based on the distance between the pixels in the second partition in the target image block and the segmentation line.
  • the distance between lines is determined. The method of determining distance can be found in the above introduction and will not be described in detail here.
  • step S703 includes: based on the first weight, the second weight, the first prediction result of the pixel point included in the target image block in the first prediction result set, and the first prediction result of the pixel point in the first prediction result set. At least one of the second prediction results in the two prediction result sets determines the prediction result of the pixel point.
  • the first partition it may be: based on the first weight, the first prediction result of the pixel point included in the target image block in the first prediction result set, and the second prediction result of the pixel point in the second prediction result set. At least one of the prediction results determines the prediction result of the pixels in the first partition included in the target image block.
  • the first weight may be a weight set corresponding to the first partition, which may be called the first weight set, including ⁇ w 11 , w 12 ⁇ .
  • the rule for determining the weight is determined based on the distance between the pixel point and the dividing line, which respectively represents the close proximity in the first partition.
  • the weight corresponding to the dividing line and the weight corresponding to the distance from the dividing line are divided by the distance threshold.
  • Using the first weight perform a weighted summation process on the first prediction result corresponding to the pixel point in the first partition included in the target image block in the first prediction result set, and the corresponding second prediction result in the second prediction result set. , to obtain the predicted value after fusion, that is, the prediction result of the pixels in the first partition.
  • the specific expression is as follows:
  • (x c1 , y c1 ) represents the pixel point in the first partition
  • P 11 represents the first prediction result of the pixel point in the first partition in the first prediction result set
  • P 12 represents the pixel point in the first partition in the first prediction result set.
  • the sum of w 11 and w 11 is 1.
  • w 11 can be set to K1, and w 12 corresponds to (1-K1); or w 11 is set is K2, w 12 corresponds to (1-K2).
  • For the second partition it may be: based on the second weight, the first prediction result of the pixel point included in the target image block in the first prediction result set, and the second prediction result of the pixel point in the second prediction result set. At least one of the prediction results determines the prediction result of the pixels in the second partition included in the target image block.
  • the second weight is the weight set corresponding to the second partition, which can be called the second weight set, including ⁇ w 21 , w 22 ⁇ , which respectively represent the weight corresponding to the dividing line in the second partition and the weight corresponding to far away from the dividing line.
  • the distance threshold can be the same as the distance threshold used in the first partition, or it can be different.
  • the pixels in the second partition included in the target image block have corresponding prediction results in both the first prediction result set and the second prediction result set. Therefore, the second weight can be used to include the target image block.
  • the first prediction result corresponding to the pixel in the second partition in the first prediction result set and the second prediction result corresponding to the second prediction result set are weighted and summed to obtain the fused prediction value, that is, the Prediction results of pixels in the binary partition.
  • the specific expression is as follows:
  • (x c2 , y c2 ) represents the pixels in the second partition
  • P 21 represents the first prediction result
  • P 22 represents the second prediction result.
  • w 21 can be set to K1, w 22 Corresponds to (1-K1); or w 21 is set to K2, w 22 corresponds to (1-K2); or w 21 can be set to a weight different from K1 or K2, but the sum of w 21 and w 21 is 1.
  • the corresponding prediction result can be determined in the above manner, and then the prediction result of the first partition and the prediction result of the second partition are obtained.
  • the prediction results include the prediction results of all pixels in the first partition, and the prediction results of the second partition include the prediction results of all pixels in the second partition.
  • S704 Determine the prediction result of the first partition and the prediction result of the second partition as the prediction result of the target image block.
  • the target image block can use any one of the first division modes to obtain the prediction block, such as the geometric division mode. If the first division mode is an inter-frame prediction mode, the prediction result of the target image block Refers to the inter-frame prediction result, which can be an inter-frame prediction value.
  • the target division mode parameters of the target image block can be obtained by parsing the received bit stream.
  • the prediction mode parameters may be parsed from the received bitstream. If the prediction mode parameter indicates using the first partitioning mode (eg, geometric partitioning mode GPM), determine the partitioning mode parameters of the current block. For example, the GPM partition index merge_gpm_partition_idx on the GPM parameter.
  • the corresponding angle index angleIdx and distance index distanceIdx (also called step index) can be determined through the GPM partition index merge_gpm_partition_idx.
  • index information of motion vector (MV) information of the first partition may also be included, for example, index information of motion vector (MV) information of the first partition and index information of mv information of the second partition.
  • the index of the partitioning mode may be signaled in the coding unit level syntax element, for example in the merged data.
  • the GPM partition index merge_gpm_partition_idx is signaled in the coding unit layer syntax element. Specifically, the GPM partition index merge_gpm_partition_idx is sent to the merge_data().
  • merge_gpm_idx0[x0][y0] and merge_gpm_idx1[x0][y0] are also sent in the merge data merge_data().
  • the division mode parameters used in the currently encoded image block can be selected from the division mode parameters corresponding to multiple division modes according to the rate-distortion cost, so as to reduce the coding process as much as possible.
  • the resulting distortion; for the two partitions divided by the dividing line into the target image block, the appropriate partition weight can be determined for the pixels of each partition in the target image block based on the target partition mode parameters, by using different partition weights and prediction result sets. Determine the prediction results of the corresponding partitions. Since the partition weights pay different attention to pixels in different partitions and/or different positions in the partitions, the prediction results of the target image block are more accurate.
  • Figure 8b is a schematic flowchart of an image processing method according to the fourth embodiment.
  • the execution subject in this embodiment can be a computer device or a cluster composed of multiple computer devices.
  • the computer device can It may be an intelligent terminal (such as the aforementioned mobile terminal 100), or it may be a server.
  • the execution subject in this embodiment is an intelligent terminal as an example for explanation.
  • step S701 in the aforementioned third embodiment, which will not be described again here.
  • S802 Determine the first prediction result set and the second prediction result set of the target image block.
  • the unidirectional prediction candidate list may be a merge candidate list
  • the first motion vector is a unidirectional prediction motion vector related to the first prediction result set (for example, the unidirectional prediction motion vector 1 below)
  • the second motion vector is related to the first prediction result set.
  • the unidirectional motion vector prediction of the two prediction result sets for example, the unidirectional motion prediction vector 2 below).
  • the first prediction result set and the second prediction result set are obtained by referring to motion vectors of different reference frames.
  • the first prediction result set includes multiple prediction results, which may be unidirectional prediction of the target image block to obtain unidirectional prediction motion.
  • the second prediction result can be obtained in the same way.
  • the unidirectional predicted motion vector of the corresponding partition may be determined based on the positions of the motion vector of the first partition and the motion vector of the second partition in the merge candidate list.
  • merge_gpm_idx0[x0][y0] represents the position of the motion vector of the first partition (i.e., partition A) in the merge candidate list
  • merge_gpm_idx1[x0][y0] represents the position of the second partition (i.e., partition B).
  • the unidirectional predicted motion vector of the corresponding partition can be determined through merge_gpm_idx0[x0][y0] and merge_gpm_idx1[x0][y0].
  • prediction candidates of the target image block need to be constructed first.
  • the construction process of the unidirectional prediction candidate list is first introduced below.
  • FIG. 8c it is a schematic diagram of adjacent block positions of a spatial merging candidate list provided in this embodiment.
  • the spatial merging candidate list can select up to 4 candidate motion vectors.
  • the construction order is: left adjacent block A1, upper adjacent block B1, upper right adjacent block B0, lower left adjacent block A0, upper left adjacent block Block B2, the motion vector information of the adjacent blocks corresponding to the reference frame position block co1 is arranged in sequence. It should be noted that B2 will only be considered if other locations are not available. After adding the lower left adjacent block A0, redundancy detection is required to ensure that there are no candidates with the same motion information in the list.
  • the historical reference block his, the average motion vector avg of the first candidate motion vector, the second candidate motion vector, and the zero motion vector 0 can also be added to the merge candidate list.
  • Figure 8d is a schematic diagram of a merge candidate list provided in this embodiment.
  • the merge candidate list includes the motion information of the five adjacent blocks shown in Figure 8d, with sequence numbers 0, 1, 2, 3, and 4 respectively.
  • Each adjacent block contains bidirectional prediction motion vector information, that is, list 0list0 and list 0 1list1 corresponds to the motion vector information respectively.
  • For GPM prediction mode only one-way prediction mode is used for each partition. Since each item in the merge candidate list may be bidirectionally predicted motion vector information, a unidirectionally predicted motion vector needs to be obtained from it for use.
  • merge_gpm_idx0[x0][y0] indicates the position of the motion vector of the first partition in the merge candidate list.
  • & is a bitwise AND operation, that is, taking out the last bit of m (similar to parity check).
  • the acquisition process is as follows:
  • the first prediction result set and the second prediction result set may be sets of prediction values. Therefore, the first prediction result set and the second prediction result set may also be called the first prediction value set and the second prediction value set respectively.
  • the motion vector of the first prediction value set can be obtained first, and then the motion vector of the second prediction value set can be obtained.
  • merge_gpm_idx0[xCb][yCb] represents the position of the motion vector of the first prediction value set in the merge candidate list. Therefore, m represents the position of the motion vector of the first prediction value set in the merge candidate list.
  • merge_gpm_idx1[x0][y0] represents the position of the motion vector of the second prediction value set in the merge candidate list. The position of the motion vector of the second prediction value set in the merge candidate list may be due to the motion vector of the first prediction value set. First select the option in the front position and decrease it by 1.
  • n represents the motion vector of the second prediction value set in the merge candidate list actual location.
  • M mergeCandList[m]
  • M mergeCandList[m]
  • mvA[0] mvLXM[0]
  • mvA[1] mvLXM[1]
  • refIdxA refIdxLXM
  • predListFlagA X.
  • mvLXM represents the motion vector of the merge candidate at position m in the merge candidate list.
  • mvA is the motion vector in the two directions corresponding to the first prediction value set
  • refIdxA is the reference frame corresponding to the motion vector
  • predListFlagA indicates which component of the list of the motion vector alternative is currently selected.
  • N mergeCandList[n]
  • N mergeCandList[n]
  • mvB[0] mvLXN[0]
  • mvB[1] mvLXN[1]
  • refIdxB refIdxLXN
  • predListFlagB X.
  • mvLXN represents the motion vector of the merge candidate at position n in the merge candidate list.
  • mvB is the second prediction value set and the corresponding motion vectors in two directions.
  • refIdxB is the reference frame corresponding to the motion vector
  • motion compensation is performed according to the unidirectional motion vector 1 to obtain the first prediction result set, and motion compensation is performed according to the unidirectional motion vector 2 to obtain The second set of prediction results.
  • S804 Determine the prediction result of the first partition and the prediction result of the second partition based on at least one of the partition weight, the first prediction result set, and the second prediction result set.
  • S805 Determine the prediction result of the first partition and the prediction result of the second partition as the prediction result of the target image block.
  • steps S803 to S805 please refer to the corresponding contents introduced in steps S702 to S704 in the corresponding embodiment of FIG. 7 , and will not be described again here.
  • the division mode parameters used in the currently encoded image block can be selected from the division mode parameters corresponding to multiple division modes according to the rate-distortion cost, so as to reduce the coding process as much as possible.
  • the distortion produced; for the two partitions divided by the dividing line into the target image block, the unidirectional prediction motion vector of the target image block can be estimated by merging the candidate list, thereby obtaining an accurate combination of prediction results.
  • Appropriate partition weights can be determined for pixels in each partition in the target image block. Based on scientifically set partition weights and accurate prediction result sets, the prediction results of the corresponding partitions can be accurately determined, so that the prediction results of the target image block are more accurate.
  • Figure 9 is a schematic structural diagram of an image processing device according to an embodiment of the present application.
  • the image processing device can be a computer program (including program code) running in a server.
  • the image processing device is an application.
  • Software this device can be used to execute corresponding steps in the method provided by the embodiments of this application.
  • the image processing device 900 includes: a determination module 901, an acquisition module 902, an update module 903 and a sending module 904.
  • Determining module 901 configured to determine the target division mode parameters of the target image block based on the first division mode parameter set
  • the determination module 901 is also configured to determine the prediction result of the target image block based on the target division mode parameter.
  • the first dividing mode parameter set includes dividing mode parameters corresponding to one or more dividing lines.
  • the dividing mode parameter is determined based on the use of the dividing line by the encoded image; the size of the angle formed between adjacent dividing lines among the plurality of dividing lines does not vary. equal.
  • the dividing mode parameter is determined by adjusting the angle interval between the dividing line in the target direction and adjacent dividing lines of the dividing line in the target direction based on the usage of the dividing line in the encoded image. of.
  • the angular interval between the dividing line in the target direction and the adjacent dividing line is smaller than the angular interval between the dividing line in the reference direction and the adjacent dividing line; and/or, the angular interval between the dividing line in the target direction
  • the application probability is greater than the application probability of the dividing line in the reference direction.
  • the dividing mode parameters include at least one of the dividing index, the angle index and the distance index corresponding to the dividing line;
  • the first dividing mode parameter set represents the dividing index, the A parameter mapping table of the mapping relationship between the angle index and the distance index.
  • the obtaining module 902 is used to obtain the usage of the dividing line by the encoded image; the determining module 901 is used to determine the application probability of the dividing line based on the usage; The update module 903 is configured to update the parameter mapping table based on the application probability.
  • the determination module 901 is configured to: in response to the number of encoded images reaching a preset threshold, obtain the number of uses of the first division mode; determine based on the usage record parameters and the number of uses The application probability of each dividing line.
  • the update module 903 is specifically configured to: update the angle mapping table based on the application probability of each dividing line to obtain an updated angle mapping table; update the angle mapping table based on the updated angle mapping table angle index and/or distance index in the parameter mapping table.
  • the angle mapping table is used to represent the mapping relationship between the query index and the angle parameter.
  • the query index includes the segmentation index or the angle index, and there is a relationship between the angle index and the angle parameter. connection relation.
  • the update module 903 is specifically configured to: update the angle mapping table based on the angle parameter corresponding to the first query index and/or the angle parameter corresponding to the second query index, to obtain the updated angle mapping. surface.
  • the first query index is the query index corresponding to the dividing line with the highest application probability
  • the second query index is the query index corresponding to the dividing line with the second highest application probability, or is the query index of the first query index Adjacent query index.
  • the update module 903 is specifically configured to: determine a target angle parameter based on the angle parameter corresponding to the first query index and the angle parameter corresponding to the second query index; The angle mapping table is updated to obtain the updated angle mapping table.
  • the second query index is an adjacent query index of the first query index
  • the update module 903 is specifically configured to: adjust the second query index in the angle mapping table according to the preset adjustment rules. Query the angle parameter corresponding to the index and obtain the updated angle mapping table.
  • the update module 903 is specifically configured to: in response to the angle parameter corresponding to the adjacent query index being greater than the angle parameter corresponding to the first query index, reduce the angle parameter corresponding to the adjacent query index. angle parameter to obtain an updated angle mapping table; and/or, in response to the angle parameter corresponding to the adjacent query index being smaller than the angle parameter corresponding to the first query index, increasing the angle corresponding to the adjacent query index parameters to get the updated angle mapping table.
  • the difference between the adjusted angle parameter corresponding to the adjacent query index and the angle parameter corresponding to the first query index is within a preset range; and/or the preset range is based on The application probability of the dividing line corresponding to the first query index is determined.
  • the sending module 904 is configured to: send a bit stream to the decoding end, where the bit stream includes indication information of the updated parameter mapping table, and the indication information is used to instruct the decoding end to use the The updated parameter mapping table determines the prediction result of the target image block.
  • the determination module 901 is further configured to: use at least one prediction mode to perform predictive encoding on the target image block based on the parameters of the target image block, and determine the rate distortion cost corresponding to each prediction mode; When the prediction mode with the smallest rate distortion cost is the first division mode, the step of determining the target division mode parameters of the target image block based on the first division mode parameter set is performed.
  • the first division mode includes at least one division mode
  • the determination module 901 is specifically configured to: determine whether each division mode included in the first division mode is applied to the target image block. rate distortion cost; determine the division mode with the smallest rate distortion cost as the target division mode of the target image block; determine the mode parameters corresponding to the target division mode from the first division mode parameter set, and set the target The mode parameter corresponding to the division mode is determined as the target division mode parameter of the target image block.
  • the target image block includes a first partition and a second partition, and the first partition and the second partition are two image areas obtained by dividing the target image block by a dividing line, so
  • the determination module 901 is specifically further configured to: determine the partition weight based on the target partition mode parameter; determine the first prediction result set based on at least one of the partition weight, the first prediction result set and the second prediction result set.
  • the prediction result of the partition and the prediction result of the second partition; the prediction result of the first partition and the prediction result of the second partition are determined as the prediction result of the target image block.
  • the partition weight includes a first weight corresponding to the first partition and a second weight corresponding to the second partition, and the first weight or the second weight is based on the target image.
  • the determination module 901 is further configured to: based on the first weight, the second weight, and the pixel points included in the target image block, determine the distance between the pixel points included in the block and the dividing line in the first prediction result. At least one of the first prediction result in the set and the second prediction result of the pixel in the second prediction result set determines the prediction result of the pixel.
  • An embodiment of the present application also provides an image processing method, which can be applied to smart terminals.
  • the method includes the following steps:
  • S10 Determine the first division mode according to the first preset strategy
  • S20 Determine the target division mode parameters of the target image block based on the second preset strategy related to the first division mode
  • the step S10 includes: based on the parameters of the target image block, using at least one prediction mode to perform predictive encoding on the target image block, determining the rate distortion cost corresponding to each prediction mode, and dividing the rate distortion cost into The smallest prediction mode is determined as the first division mode.
  • the step S20 includes: determining the mode parameters corresponding to the target division mode from the first division mode parameter set, and determining the mode parameters corresponding to the target division mode as the target image.
  • the target partitioning mode parameter for the block is determining the mode parameters corresponding to the target division mode from the first division mode parameter set, and determining the mode parameters corresponding to the target division mode as the target image.
  • the target image block includes a first partition and a second partition
  • the first partition and the second partition are two image areas obtained by dividing the target image block by a dividing line
  • the step S30 includes: determining the first prediction result set and the second prediction result set of the target image block based on the target partition mode parameter; based on the partition weight, the first prediction result set and the second prediction result At least one item in the set, determining the prediction result of the first partition and the prediction result of the second partition; determining the prediction result of the first partition and the prediction result of the second partition as the target image Block prediction results.
  • the partition weight includes a first weight corresponding to the first partition and a second weight corresponding to the second partition, and the first weight or the second weight is based on the target image.
  • the method further includes: based on the first weight, the second weight, and the position of the pixels included in the target image block in the first prediction result set.
  • the prediction result of the pixel is determined by at least one of the first prediction result and the second prediction result of the pixel in the second prediction result set.
  • the first dividing parameter set includes dividing mode parameters corresponding to one or more dividing lines.
  • the dividing mode parameter is determined based on the usage of the dividing line by the encoded image.
  • angles formed between adjacent dividing lines among the plurality of dividing lines are not equal in size.
  • the dividing mode parameter is determined by adjusting the angle interval between the dividing line in the target direction and adjacent dividing lines of the dividing line in the target direction based on the usage of the dividing line in the encoded image. of.
  • the angular interval between the dividing line in the target direction and the adjacent dividing lines is smaller than the angular interval between the dividing line in the reference direction and the adjacent dividing lines.
  • the application probability of the dividing line in the target direction is greater than the application probability of the dividing line in the reference direction.
  • the dividing mode parameters include at least one of a dividing index, an angle index and a distance index corresponding to the dividing line.
  • the first division mode parameter set is a parameter mapping table representing the mapping relationship between the division index, the angle index and the distance index.
  • the method further includes: obtaining the usage of the dividing line by the encoded image; determining the application probability of the dividing line based on the usage; updating the parameter mapping table based on the application probability .
  • determining the application probability of the dividing line based on the usage includes: in response to the number of encoded images reaching a preset threshold, obtaining the number of uses of the first dividing mode; based on The application probability of each dividing line is determined using the recording parameters and the number of uses.
  • updating the parameter mapping table based on the application probability includes: updating the angle mapping table based on the application probability of each dividing line to obtain an updated angle mapping table; based on the updated The angle mapping table updates the angle index and/or distance index in the parameter mapping table.
  • the angle mapping table is updated based on the application probability of each dividing line to obtain an updated angle mapping table, including: angle parameters corresponding to the first query index and/or corresponding angle parameters to the second query index.
  • the angle parameter is updated, and the angle mapping table is updated to obtain the updated angle mapping table.
  • updating the angle mapping table based on the angle parameter corresponding to the first query index and/or the angle parameter corresponding to the second query index to obtain the updated angle mapping table includes: based on the third query index The angle parameter corresponding to a query index and the angle parameter corresponding to the second query index determine the target angle parameter; the angle mapping table is updated based on the target angle parameter to obtain an updated angle mapping table.
  • the second query index is an adjacent query index of the first query index
  • the angle parameter is based on the angle parameter corresponding to the first query index and/or the angle parameter corresponding to the second query index.
  • the mapping table is updated to obtain an updated angle mapping table, including: adjusting the angle parameters corresponding to the second query index in the angle mapping table according to the preset adjustment rules to obtain an updated angle mapping table.
  • adjusting the angle parameter corresponding to the second query index in the angle mapping table according to the preset adjustment rules to obtain the updated angle mapping table includes: responding to the angle corresponding to the adjacent query index If the parameter is greater than the angle parameter corresponding to the first query index, reduce the angle parameter corresponding to the adjacent query index to obtain an updated angle mapping table; and/or, in response to the angle parameter corresponding to the adjacent query index If the angle parameter is smaller than the angle parameter corresponding to the first query index, increase the angle parameter corresponding to the adjacent query index to obtain an updated angle mapping table.
  • the difference between the adjusted angle parameter corresponding to the adjacent query index and the angle parameter corresponding to the first query index is within a preset range; and/or the preset range is based on The application probability of the dividing line corresponding to the first query index is determined.
  • the method further includes:
  • An embodiment of the present application also provides an image processing method, which can be applied to smart terminals.
  • the method includes the following steps:
  • S100 Determine the first division mode according to the first preset strategy and determine the target division mode parameters of the target image block based on the second preset strategy;
  • the step S100 includes: based on the parameters of the target image block, using at least one prediction mode to perform predictive encoding on the target image block, determining the rate distortion cost corresponding to each prediction mode, and dividing the rate distortion cost into The smallest prediction mode is determined as the first division mode.
  • the mode parameters corresponding to the target division mode are determined from the first division mode parameter set, and the mode parameters corresponding to the target division mode are determined as the target division mode parameters of the target image block.
  • the target image block includes a first partition and a second partition
  • the first partition and the second partition are two image areas obtained by dividing the target image block by a dividing line
  • the step S200 includes: determining the first prediction result set and the second prediction result set of the target image block based on the target partition mode parameter; based on the partition weight, the first prediction result set and the second prediction result At least one item in the set, determining the prediction result of the first partition and the prediction result of the second partition; determining the prediction result of the first partition and the prediction result of the second partition as the target image Block prediction results.
  • the partition weight includes a first weight corresponding to the first partition and a second weight corresponding to the second partition, and the first weight or the second weight is based on the target image.
  • the method further includes: based on the first weight, the second weight, and the position of the pixels included in the target image block in the first prediction result set.
  • the prediction result of the pixel is determined by at least one of the first prediction result and the second prediction result of the pixel in the second prediction result set.
  • the first dividing parameter set includes dividing mode parameters corresponding to one or more dividing lines.
  • the dividing mode parameter is determined based on the usage of the dividing line by the encoded image.
  • angles formed between adjacent dividing lines among the plurality of dividing lines are not equal in size.
  • the dividing mode parameter is determined by adjusting the angle interval between the dividing line in the target direction and adjacent dividing lines of the dividing line in the target direction based on the usage of the dividing line in the encoded image. of.
  • the angular interval between the dividing line in the target direction and the adjacent dividing lines is smaller than the angular interval between the dividing line in the reference direction and the adjacent dividing lines.
  • the application probability of the dividing line in the target direction is greater than the application probability of the dividing line in the reference direction.
  • the dividing mode parameters include at least one of a dividing index, an angle index and a distance index corresponding to the dividing line.
  • the first division mode parameter set is a parameter mapping table representing the mapping relationship between the division index, the angle index and the distance index.
  • the method further includes: obtaining the usage of the dividing line by the encoded image; determining the dividing line based on the usage application probability; update the parameter mapping table based on the application probability.
  • determining the application probability of the dividing line based on the usage includes: in response to the number of encoded images reaching a preset threshold, obtaining the number of uses of the first dividing mode; based on The application probability of each dividing line is determined using the recording parameters and the number of uses.
  • updating the parameter mapping table based on the application probability includes: updating the angle mapping table based on the application probability of each dividing line to obtain an updated angle mapping table; based on the updated The angle mapping table updates the angle index and/or distance index in the parameter mapping table.
  • the angle mapping table is updated based on the application probability of each dividing line to obtain an updated angle mapping table, including: angle parameters corresponding to the first query index and/or corresponding angle parameters to the second query index.
  • the angle parameter is updated, and the angle mapping table is updated to obtain the updated angle mapping table.
  • updating the angle mapping table based on the angle parameter corresponding to the first query index and/or the angle parameter corresponding to the second query index to obtain the updated angle mapping table includes: based on the third query index The angle parameter corresponding to a query index and the angle parameter corresponding to the second query index determine the target angle parameter; the angle mapping table is updated based on the target angle parameter to obtain an updated angle mapping table.
  • the second query index is an adjacent query index of the first query index
  • the angle parameter is based on the angle parameter corresponding to the first query index and/or the angle parameter corresponding to the second query index.
  • the mapping table is updated to obtain an updated angle mapping table, including: adjusting the angle parameters corresponding to the second query index in the angle mapping table according to the preset adjustment rules to obtain an updated angle mapping table.
  • adjusting the angle parameter corresponding to the second query index in the angle mapping table according to the preset adjustment rules to obtain the updated angle mapping table includes: responding to the angle corresponding to the adjacent query index If the parameter is greater than the angle parameter corresponding to the first query index, reduce the angle parameter corresponding to the adjacent query index to obtain an updated angle mapping table; and/or, in response to the angle parameter corresponding to the adjacent query index If the angle parameter is smaller than the angle parameter corresponding to the first query index, increase the angle parameter corresponding to the adjacent query index to obtain an updated angle mapping table.
  • the difference between the adjusted angle parameter corresponding to the adjacent query index and the angle parameter corresponding to the first query index is within a preset range; and/or the preset range is based on The application probability of the dividing line corresponding to the first query index is determined.
  • the method further includes:
  • An embodiment of the present application also provides an intelligent terminal.
  • the intelligent terminal includes a memory and a processor.
  • An image processing program is stored on the memory. When the image processing program is executed by the processor, the steps of the image processing method in any of the above embodiments are implemented.
  • the smart terminal may be the mobile terminal 100 as shown in FIG. 1 .
  • the processor 110 of the mobile terminal 100 as shown in Figure 1 can be used to call the image processing program stored in the memory 109 to perform the following operations: S1: Determine the target based on the first division mode parameter set Target division mode parameters of the image block; S2: Determine the prediction result of the target image block based on the target division mode parameters.
  • the first dividing mode parameter set includes dividing mode parameters corresponding to one or more dividing lines.
  • the dividing mode parameter is determined based on the use of the dividing line by the encoded image; the size of the angle formed between adjacent dividing lines among the plurality of dividing lines does not vary. equal.
  • the dividing mode parameter is determined by adjusting the angle interval between the dividing line in the target direction and adjacent dividing lines of the dividing line in the target direction based on the usage of the dividing line in the encoded image. of.
  • the angular interval between the dividing line in the target direction and the adjacent dividing line is smaller than the angular interval between the dividing line in the reference direction and the adjacent dividing line; and/or, the angular interval between the dividing line in the target direction
  • the application probability is greater than the application probability of the dividing line in the reference direction.
  • the dividing mode parameters include at least one of the dividing index, the angle index and the distance index corresponding to the dividing line;
  • the first dividing mode parameter set represents the dividing index, the A parameter mapping table of the mapping relationship between the angle index and the distance index.
  • the processor 110 is configured to obtain the usage of the dividing line by the encoded image; determine the application probability of the dividing line based on the usage; and update the parameters based on the application probability. Mapping table.
  • the processor 110 is configured to: in response to the number of encoded images reaching a preset threshold, obtain the number of uses of the first division mode; determine based on the usage record parameters and the number of uses The application probability of each dividing line.
  • the processor 110 is specifically configured to: update the angle mapping table based on the application probability of each dividing line to obtain an updated angle mapping table; update the angle mapping table based on the updated angle mapping table angle index and/or distance index in the parameter mapping table.
  • the angle mapping table is used to represent the mapping relationship between the query index and the angle parameter.
  • the query index includes the segmentation index or the angle index, and there is a relationship between the angle index and the angle parameter. connection relation.
  • the processor 110 is specifically configured to: update the angle mapping table based on the angle parameter corresponding to the first query index and/or the angle parameter corresponding to the second query index, to obtain the updated angle mapping. surface.
  • the first query index is the query index corresponding to the dividing line with the highest application probability
  • the second query index is the query index corresponding to the dividing line with the second highest application probability, or is the query index of the first query index Adjacent query index.
  • the processor 110 is specifically configured to: determine a target angle parameter based on the angle parameter corresponding to the first query index and the angle parameter corresponding to the second query index;
  • the angle mapping table is updated to obtain the updated angle mapping table.
  • the second query index is an adjacent query index of the first query index
  • the processor 110 is specifically configured to: adjust the second query index in the angle mapping table according to a preset adjustment rule. Query the angle parameter corresponding to the index and obtain the updated angle mapping table.
  • the processor 110 is specifically configured to: in response to the angle parameter corresponding to the adjacent query index being greater than the angle parameter corresponding to the first query index, reduce the angle parameter corresponding to the adjacent query index. angle parameter to obtain an updated angle mapping table; and/or, in response to the angle parameter corresponding to the adjacent query index being smaller than the angle parameter corresponding to the first query index, increasing the angle corresponding to the adjacent query index parameters to get the updated angle mapping table.
  • the difference between the adjusted angle parameter corresponding to the adjacent query index and the angle parameter corresponding to the first query index is within a preset range; and/or the preset range is based on The application probability of the dividing line corresponding to the first query index is determined.
  • the processor 110 is further configured to: send a bit stream to the decoding end, where the bit stream includes indication information of the updated parameter mapping table. Information, the indication information is used to instruct the decoder to use the updated parameter mapping table to determine the prediction result of the target image block.
  • the processor 110 is further configured to: use at least one prediction mode to perform predictive encoding on the target image block based on the parameters of the target image block, and determine the rate distortion cost corresponding to each prediction mode; When the prediction mode with the smallest rate distortion cost is the first division mode, step S1 is performed.
  • the first division mode includes at least one division mode
  • the processor 110 is specifically configured to: determine whether each division mode included in the first division mode is applied to the target image block. rate distortion cost; determine the division mode with the smallest rate distortion cost as the target division mode of the target image block; determine the mode parameters corresponding to the target division mode from the first division mode parameter set, and set the target The mode parameter corresponding to the division mode is determined as the target division mode parameter of the target image block.
  • the target image block includes a first partition and a second partition, and the first partition and the second partition are two image areas obtained by dividing the target image block by a dividing line, so
  • the processor 110 is specifically further configured to: based on the target partition mode parameter, partition weight; based on at least one of the partition weight, the first prediction result set and the second prediction result set, determine the first partition
  • the prediction result of the first partition and the prediction result of the second partition are determined as the prediction result of the target image block.
  • the partition weight includes a first weight corresponding to the first partition and a second weight corresponding to the second partition, and the first weight or the second weight is based on the target image.
  • the processor 110 is further configured to: based on the first weight, the second weight, and the pixel points included in the target image block, determine the distance between the pixel points included in the block and the dividing line in the first prediction result. At least one of the first prediction result in the set and the second prediction result of the pixel in the second prediction result set determines the prediction result of the pixel.
  • An embodiment of the present application also provides an intelligent terminal.
  • the intelligent terminal includes a memory and a processor.
  • An image processing program is stored on the memory. When the image processing program is executed by the processor, the steps of the image processing method in any of the above embodiments are implemented.
  • Embodiments of the present application also provide a computer storage medium.
  • a computer program is stored on the computer storage medium.
  • the computer program is executed by a processor, the steps of the image processing method in any of the above embodiments are implemented.
  • the embodiments of smart terminals and computer storage media provided by the embodiments of this application may include all technical features of any of the above image processing method embodiments.
  • the expanded and explanatory content of the description is basically the same as that of each embodiment of the above method. Herein No further details will be given.
  • FIG 10 is a schematic diagram of the hardware structure of a controller 140 provided by this application.
  • the controller 140 includes: a memory 1401 and a processor 1402.
  • the memory 1401 is used to store program instructions.
  • the processor 1402 is used to call the program instructions in the memory 1401 to execute the steps performed by the controller in the first method embodiment. Its implementation principle The beneficial effects are similar and will not be repeated here.
  • the above-mentioned controller also includes a communication interface 1403, which can be connected to the processor 1402 through a bus 1404.
  • the processor 1402 can control the communication interface 1403 to implement the receiving and sending functions of the controller 140.
  • FIG 11 is a schematic diagram of the hardware structure of a network node 150 provided by this application.
  • the network node 150 includes: a memory 1501 and a processor 1502.
  • the memory 1501 is used to store program instructions.
  • the processor 1502 is used to call the program instructions in the memory 1501 to execute the steps performed in the first method embodiment. Its implementation principles and benefits The effects are similar and will not be described again here.
  • the above-mentioned controller also includes a communication interface 1503, which can be connected to the processor 1502 through a bus 1504.
  • the processor 1502 can control the communication interface 1503 to implement the receiving and transmitting functions of the network node 150 .
  • the above integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium.
  • the above-mentioned software function modules are stored in a storage medium and include a number of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute the methods of various embodiments of the present application. Some steps.
  • a computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored in or transmitted from one computer storage medium to another computer storage medium, e.g., computer instructions may be transmitted from a website, computer, server, or data center over wires (e.g., coaxial cables, fiber optics, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website, computer, server or data center.
  • Computer storage media can be any available media that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk, SSD), etc.
  • Embodiments of the present application also provide a computer program product.
  • the computer program product includes computer program code.
  • the computer program code When the computer program code is run on a computer, it causes the computer to execute the methods in the above various possible implementations.
  • Embodiments of the present application also provide a chip, which includes a memory and a processor.
  • the memory is used to store a computer program.
  • the processor is used to call and run the computer program from the memory, so that the device equipped with the chip executes the above various possible implementations. Methods.
  • the units in the equipment of the embodiments of this application can be merged, divided, and deleted according to actual needs.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology.
  • the computer software product is stored in one of the above storage media (such as ROM/RAM, magnetic disk, optical disk), including several instructions to cause a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present application.
  • a computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored in or transmitted from one computer storage medium to another computer storage medium, e.g., computer instructions may be transmitted from a website, computer, server, or data center over wires (e.g., coaxial cables, fiber optics, Digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website, computer, server or data center.
  • Computer storage media can be any available media that can be accessed by the computer or data storage devices such as servers and data centers integrated with one or more available media. Available media may be magnetic media (eg, floppy disks, storage disks, tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.

Landscapes

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

Abstract

本申请公开了一种图像处理方法、智能终端及存储介质,该图像处理方法包括以下步骤:基于第一划分模式参数集合确定目标图像块的目标划分模式参数;基于所述目标划分模式参数确定所述目标图像块的预测结果。通过本申请实施例,可以有效提高划分模式参数与目标图像块的匹配度,进而提升预测结果的准确性。

Description

图像处理方法、智能终端及存储介质
相关申请
本申请要求于2022年03月29日提交中国专利局、申请号为202210317793.4、发明名称为“图像处理方法、智能终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及图像处理技术领域,尤其涉及一种图像处理方法、智能终端及存储介质。
背景技术
在视频编码技术的发展过程中,各种视频编码标准所做出的改进都在致力于从不同方面提升视频的编码效果。对视频或图像中运动物体的边界部分编码也是当前研究的热点问题,针对图像中运动物体的边界部分的编码,可以通过一种划分模式,例如,下一代视频压缩标准(Versatile Video Coding,VVC)提出的几何划分模式(Geometricpartitioning mode,GPM),使用划分模式中包括的分割线和运动物体的边界进行贴合,可以使得图像中运动物体的边界得到更为灵活及精细的表示。
在构思及实现本申请过程中,发明人发现至少存在如下问题:针对不同的图像或者图像块所使用的划分模式与图像或者图像块之间匹配度还有待进一步提升。
前面的叙述在于提供一般的背景信息,并不一定构成现有技术。
技术解决方案
针对上述技术问题,本申请提供一种图像处理方法、智能终端及存储介质,可以有效提高划分模式参数与目标图像块的匹配度,进而提升预测结果的准确性。
为解决上述技术问题,本申请提供一种图像处理方法,可应用于智能终端,包括:
S1:基于第一划分模式参数集合确定目标图像块的目标划分模式参数;
S2:基于所述目标划分模式参数确定所述目标图像块的预测结果。
本申请还提供一种图像处理装置,包括:
确定模块,用于基于第一划分模式参数集合确定目标图像块的目标划分模式参数;
所述确定模块,还用于基于所述目标划分模式参数确定所述目标图像块的预测结果。
可选地,所述第一划分模式参数集合包括对应于一条或多条分割线的划分模式参数。
可选地,所述划分模式参数包括分割索引、角度索引、距离索引以及预测类型中的至少一个。
可选地,所述第一划分模式参数集合是基于所述第一划分模式参数集合的使用情况来调整的。
可选地,所述第一划分模式参数集合中的至少一个元素被调整以形成新的参数映射表以用于表示所述第一划分模式参数集合。
可选地,通过增加、删除、重排序、或改变参数映射表的至少一个元素来形成所述新的参数映射表。
可选地,包括以下至少一种:所述划分模式参数基于已编码图像对所述分割线的使用情况确定;所述多条分割线中的相邻分割线之间形成的夹角的大小不相等。
可选地,所述划分模式参数是基于已编码图像对所述分割线的使用情况,对目标方向的分割线与所述目标方向的分割线的相邻分割线之间的角度间隔进行调整确定的。
可选地,所述目标方向的分割线与相邻分割线之间的角度间隔小于参考方向的分割线与相邻分割线之间的角度间隔;和/或,所述目标方向的分割线的应用概率大于所述参考方向的分割线的应用概率。
可选地,还包括以下至少一种:所述划分模式参数包括分割线对应的分割索引、角度索引以及距离索引中的至少一项;所述第一划分模式参数集合为表示所述分割索引、所述角度索引以及所述距离索引之间映射关系的参数映射表。
在一个实施例中,所述图像处理装置还包括获取模块和更新模块。
所述获取模块,用于获取已编码图像对所述分割线的使用情况;
所述确定模块,用于基于所述使用情况确定所述分割线的应用概率;
所述更新模块,用于基于所述应用概率更新所述参数映射表。
在一个实施例中,所述确定模块,还用于:响应于所述已编码图像的数量达到预设阈值,获取所述第一划分模式的 使用次数;基于使用记录参数以及所述使用次数确定各条分割线的应用概率。
在一个实施例中,所述更新模块,还用于:基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表;基于所述更新后的角度映射表更新所述参数映射表中的角度索引和/或距离索引。
可选地,所述角度映射表用于表示查询索引和角度参数之间的映射关系,所述查询索引包括所述分割索引或所述角度索引,所述角度索引与所述角度参数之间存在关联关系。
在一个实施例中,所述更新模块,还用于:基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表。
可选地,所述第一查询索引为应用概率最高的分割线对应的查询索引;所述第二查询索引为应用概率次高的分割线对应的查询索引,或者为所述第一查询索引的相邻查询索引。
在一个实施例中,所述更新模块,还用于:基于所述第一查询索引对应的角度参数和所述第二查询索引对应的角度参数确定目标角度参数;基于所述目标角度参数对角度映射表进行更新,得到更新后的角度映射表。
在另一个实施例中,所述第二查询索引为所述第一查询索引的相邻查询索引,所述更新模块,还用于:按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表。
在一个实施例中,所述更新模块,还用于:响应于所述相邻查询索引对应的角度参数大于所述第一查询索引对应的角度参数,减小所述相邻查询索引对应的角度参数,得到更新后的角度映射表;和/或,响应于所述相邻查询索引对应的角度参数小于所述第一查询索引对应的角度参数,增大所述相邻查询索引对应的角度参数,得到更新后的角度映射表。
可选地,所述相邻查询索引对应的调整后的角度参数与所述第一查询索引对应的角度参数之间的差值在预设范围内;和/或,所述预设范围是基于所述第一查询索引对应的分割线的应用概率确定的。
在一个实施例中,所述图像处理装置还包括发送模块,所述发送模块,用于:向解码端发送比特流,所述比特流包括更新后的参数映射表的指示信息,所述指示信息用于指示所述解码端利用所述更新后的参数映射表确定所述目标图像块的预测结果。
在一个实施例中,所述确定模块,还用于:基于目标图像块的参数,利用至少一种预测模式对所述目标图像块进行预测编码,确定每种预测模式对应的率失真代价;当率失真代价最小的预测模式为第一划分模式时,执行所述基于第一划分模式参数集合确定目标图像块的目标划分模式参数的步骤。
在一个实施例中,所述第一划分模式包括至少一种划分模式,所述确定模块,还用于:确定所述第一划分模式包括的每种划分模式应用于所述目标图像块的率失真代价;将率失真代价最小的划分模式确定为所述目标图像块的目标划分模式;从所述第一划分模式参数集合中确定所述目标划分模式对应的模式参数,并将所述目标划分模式对应的模式参数确定为所述目标图像块的目标划分模式参数。
在一个实施例中,所述目标图像块包括第一分区和第二分区,所述第一分区和所述第二分区是由分割线对所述目标图像块划分得到的两个图像区域,所述确定模块,还用于:基于所述目标划分模式参数,确定分区权重;基于所述分区权重、第一预测结果集合以及第二预测结果集合中的至少一项,确定所述第一分区的预测结果和所述第二分区的预测结果;将所述第一分区的预测结果和所述第二分区的预测结果确定为所述目标图像块的预测结果。可选地,在基于目标划分模式参数,确定分区权重之前,还可以:确定所述目标图像块的第一预测结果集合和第二预测结果集合。
在一个实施例中,所述分区权重包括所述第一分区对应的第一权重和所述第二分区对应的第二权重,所述第一权重或者所述第二权重是基于所述目标图像块包括的像素点与分割线之间的距离确定的,确定模块,还用于:基于所述第一权重、所述第二权重、所述目标图像块包括的像素点在第一预测结果集合中的第一预测结果以及所述像素点在第二预测结果集合中的第二预测结果中的至少一项,确定所述像素点的预测结果。
本申请还提供一种智能终端,包括:存储器、处理器,其中,所述存储器上存储有图像处理程序,所述图像处理程序被所述处理器执行时实现如上任一所述方法的步骤。
本申请还提供一种计算机存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上任一所述方法的步骤。
如上所述,本申请的图像处理方法,可应用于智能终端,包括以下步骤:基于第一划分模式参数集合确定目标图像块的目标划分模式参数;基于所述目标划分模式参数确定所述目标图像块的预测结果。通过上述技术方案,可以从第一划分模式参数集合中确定出与目标图像块匹配高的划分模式参数,基于该划分模式参数能够得到更加准确的目标图像块的预测结果,实现划分模式参数与图像块高度匹配,提升编码效果的功能,解决划分模式对应的划分模式参数与图像块 匹配度不高的问题,进而提升了用户体验。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为实现本申请各个实施例的一种智能终端的硬件结构示意图;
图2为本申请实施例提供的一种通信网络系统架构图;
图3a是本申请实施例提供的一种角度量化示意图;
图3b是本申请实施例提供的一种在角度φi下对应的多种偏移的示意图;
图3c是本申请实施例提供的一种划分模式的示意图;
图4是根据第一实施例示出的图像处理方法的流程示意图;
图5是根据第一实施例示出的一种调整后的分割线的示意图;
图6a是根据第二实施例示出的一种图像处理方法的流程示意图;
图6b是根据第二实施例示出的一种不同分割线应用于图像块的效果示意图;
图7是根据第三实施例示出的一种图像处理方法的流程示意图;
图8a是根据第三实施例示出的一种像素点和分割线的距离分析的示意图;
图8b是根据第四实施例示出的一种图像处理方法的流程示意图;
图8c是根据第四实施例示出的一种空域合并候选列表的相邻块位置示意图;
图8d是根据第四实施例示出的一种合并候选列表的示意图;
图9是本申请实施例示出的一种图像处理装置的示意图;
图10是根据第一实施例示出的控制器的硬件结构示意图;
图11是根据第一实施例示出的网络节点的硬件结构示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。
本申请的实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素,此外,本申请不同实施例中具有同样命名的部件、特征、要素可能具有相同含义,也可能具有不同含义,其具体含义需以其在该具体实施例中的解释或者进一步结合该具体实施例中上下文进行确定。
应当理解,尽管在本文可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本文范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语"如果"可以被解释成为"在……时"或"当……时"或"响应于确定"。再者,如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示。应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加。本申请使用的术语“或”、“和/或”、“包括以下至少一个”等可被解释为包括性的,或意味着任一个或任何组合。例如,“包括以下至少一个:A、B、C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A和B和C”,再如,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A和B和C”。仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。
应该理解的是,虽然本申请实施例中的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
需要说明的是,在本文中,采用了诸如S401、S402等步骤代号,其目的是为了更清楚简要地表述相应内容,不构成顺序上的实质性限制,本领域技术人员在具体实施时,可能会先执行S402后执行S401等,但这些均应在本申请的保护范围之内。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或者“单元”的后缀仅为了有利于本申请的说明,其本身没有特定的意义。因此,“模块”、“部件”或者“单元”可以混合地使用。
智能终端可以以各种形式来实施。例如,本申请中描述的智能终端可以包括诸如手机、平板电脑、笔记本电脑、掌上电脑、个人数字助理(Personal Digital Assistant,PDA)、便捷式媒体播放器(Portable Media Player,PMP)、导航装置、可穿戴设备、智能手环、计步器等智能终端,以及诸如数字TV、台式计算机等固定终端。
后续描述中将以移动终端为例进行说明,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本申请的实施方式的构造也能够应用于固定类型的终端。
请参阅图1,其为实现本申请各个实施例的一种移动终端的硬件结构示意图,该移动终端100可以包括:RF(Radio Frequency,射频)单元101、WiFi模块102、音频输出单元103、A/V(音频/视频)输入单元104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、处理器110、以及电源111等部件。本领域技术人员可以理解,图1中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图1对移动终端的各个部件进行具体的介绍:
射频单元101可用于收发信息或通话过程中,信号的接收和发送,具体的,将基站的下行信息接收后,给处理器110处理;另外,将上行的数据发送给基站。通常,射频单元101包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元101还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA2000(Code Division Multiple Access 2000,码分多址2000)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、TD-SCDMA(Time Division-Synchronous Code Division Multiple Access,时分同步码分多址)、FDD-LTE(Frequency Division Duplexing-Long Term Evolution,频分双工长期演进)、TDD-LTE(Time Division Duplexing-Long Term Evolution,分时双工长期演进)和5G等。
WiFi属于短距离无线传输技术,移动终端通过WiFi模块102可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了WiFi模块102,但是可以理解的是,其并不属于移动终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
音频输出单元103可以在移动终端100处于呼叫信号接收模式、通话模式、记录模式、语音识别模式、广播接收模式等等模式下时,将射频单元101或WiFi模块102接收的或者在存储器109中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元103还可以提供与移动终端100执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元103可以包括扬声器、蜂鸣器等等。
A/V输入单元104用于接收音频或视频信号。A/V输入单元104可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元106上。经图形处理器1041处理后的图像帧可以存储在存储器109(或其它存储介质)中或者经由射频单元101或WiFi模块102进行发送。麦克风1042可以在电话通话模式、记录模式、语音识别模式等等运行模式中经由麦克风1042接收声音(音频数据),并且能够将这样的声音处理为音频数据。处理后的音频(语音)数据可以在电话通话模式的情况下转换为可经由射频单元101发送到移动通信基站的格式输出。麦克风1042可以实施各种类型的噪声消除(或抑制)算法以消除(或抑制)在接收和发送音频信号的过程中产生的噪声或者干扰。
移动终端100还包括至少一种传感器105,比如光传感器、运动传感器以及其他传感器。可选地,光传感器包括环境光传感器及接近传感器,可选地,环境光传感器可根据环境光线的明暗来调节显示面板1061的亮度,接近传感器可在移动终端100移动到耳边时,关闭显示面板1061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
显示单元106用于显示由用户输入的信息或提供给用户的信息。显示单元106可包括显示面板1061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1061。
用户输入单元107可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。可选地,用户输入单元107可包括触控面板1071以及其他输入设备1072。触控面板1071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1071上或在触控面板1071附近的操作),并根据预先设定的程式驱动相应的连接装置。触控面板1071可包括触摸检测装置和触摸控制器两个部分。可选地,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器110,并能接收处理器110发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1071。除了触控面板1071,用户输入单元107还可以包括其他输入设备1072。可选地,其他输入设备1072可以包括但不限于物理键盘、功能键(比 如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种,具体此处不做限定。
可选地,触控面板1071可覆盖显示面板1061,当触控面板1071检测到在其上或附近的触摸操作后,传送给处理器110以确定触摸事件的类型,随后处理器110根据触摸事件的类型在显示面板1061上提供相应的视觉输出。虽然在图1中,触控面板1071与显示面板1061是作为两个独立的部件来实现移动终端的输入和输出功能,但是在某些实施例中,可以将触控面板1071与显示面板1061集成而实现移动终端的输入和输出功能,具体此处不做限定。
接口单元108用作至少一个外部装置与移动终端100连接可以通过的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元108可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端100内的一个或多个元件或者可以用于在移动终端100和外部装置之间传输数据。
存储器109可用于存储软件程序以及各种数据。存储器109可主要包括存储程序区和存储数据区,可选地,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器109可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器110是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器109内的软件程序和/或模块,以及调用存储在存储器109内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器110可包括一个或多个处理单元;优选的,处理器110可集成应用处理器和调制解调处理器,可选地,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。
移动终端100还可以包括给各个部件供电的电源111(比如电池),优选的,电源111可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图1未示出,移动终端100还可以包括蓝牙模块等,在此不再赘述。
为了便于理解本申请实施例,下面对本申请的移动终端所基于的通信网络系统进行描述。
请参阅图2,图2为本申请实施例提供的一种通信网络系统架构图,该通信网络系统为通用移动通信技术的LTE系统,该LTE系统包括依次通讯连接的UE(User Equipment,用户设备)201,E-UTRAN(Evolved UMTS Terrestrial Radio Access Network,演进式UMTS陆地无线接入网)202,EPC(Evolved Packet Core,演进式分组核心网)203和运营商的IP业务204。
可选地,UE201可以是上述终端100,此处不再赘述。
E-UTRAN202包括eNodeB2021和其它eNodeB2022等。可选地,eNodeB2021可以通过回程(backhaul)(例如X2接口)与其它eNodeB2022连接,eNodeB2021连接到EPC203,eNodeB2021可以提供UE201到EPC203的接入。
EPC203可以包括MME(Mobility Management Entity,移动性管理实体)2031,HSS(Home Subscriber Server,归属用户服务器)2032,其它MME2033,SGW(Serving Gate Way,服务网关)2034,PGW(PDN Gate Way,分组数据网络网关)2035和PCRF(Policy and Charging Rules Function,政策和资费功能实体)2036等。可选地,MME2031是处理UE201和EPC203之间信令的控制节点,提供承载和连接管理。HSS2032用于提供一些寄存器来管理诸如归属位置寄存器(图中未示)之类的功能,并且保存有一些有关服务特征、数据速率等用户专用的信息。所有用户数据都可以通过SGW2034进行发送,PGW2035可以提供UE 201的IP地址分配以及其它功能,PCRF2036是业务数据流和IP承载资源的策略与计费控制策略决策点,它为策略与计费执行功能单元(图中未示)选择及提供可用的策略和计费控制决策。
IP业务204可以包括因特网、内联网、IMS(IP Multimedia Subsystem,IP多媒体子系统)或其它IP业务等。
虽然上述以LTE系统为例进行了介绍,但本领域技术人员应当知晓,本申请不仅仅适用于LTE系统,也可以适用于其他无线通信系统,例如GSM、CDMA2000、WCDMA、TD-SCDMA以及未来新的网络系统(如5G)等,此处不做限定。
基于上述移动终端硬件结构以及通信网络系统,提出本申请各个实施例。
为便于理解,下面先对本申请实施例可能涉及到的专业术语进行解释。
一、帧间预测模式
在对图像进行编码的过程中,对图像块进行预测是一个必不可少的步骤,通过对图像块进行预测得到预测块,构造能量较小的残差块,减少传输比特。对图像块的预测可以通过一些预设的预测模式实现,预测模式可以包括帧间预测模式和帧内预测模式。相比于帧内预测模式,帧间预测模式利用像素之间的相关性来去除时间冗余,是一种编码效率更高的预测模式。
二、几何划分模式(Geometric partitioning mode,GPM)
简称GPM模式,是下一代视频压缩标准(Versatile Video Coding,VVC)针对图像中运动物体的边界部分所采用的预测模式。相比于其他预测模式,GPM模式可以对图像中运动物体的边界进行更为精细的划分,通过分割线和运动物体的边界进行贴合,将运动物体的边缘编码单元(Code unit)划分为非矩形的子编码单元进行单向预测,从而得到整个编码单元的预测值。
图3a是一种角度量化示意图,可以发现,并且每条分割线对应的角度是不同的,将角度标记为φi(i=1~24)。图3a未完全示出所有角度。每种角度下最多有4种偏移,如图3b所示。图3b是本申请实施例提供的一种在角度φi下对应的4种偏移的示意图。其中,将偏移标记为ρj(j=0~3)。可选地,可以共组合出64种划分模式,如图3c所示。图3c是本申请实施例提供的一种划分模式的示意图。该划分模式包括不同角度和偏移组合构成的至少一种划分方式。可以发现,在不同的角度以及不同的偏移下,分割线的位置是不同的,并且图像块可以使用的分割线的数量也是不同的。所有分割线中的任一条分割线均是GPM模式应用于图像块的一种实现方式。可选地,根据GPM模式索引可以确定出偏移ρj和角度φi
第一实施例
请参见图4,图4是根据第一实施例示出的一种图像处理方法的流程示意图,该实施例中的执行主体可以是一个计算机设备或者是多个计算机设备构成的集群,该计算机设备可以是智能终端(如前述移动终端100),也可以是服务器,此处,以本实施例中的执行主体为智能终端为例进行说明。
需要说明的是,在视频编码的过程中,通常输入视频帧会被分割为多个图像块进行处理,每个图像块可以与通过预测模式预测得到的预测块相减得到残差块,再对残差块进行一系列处理得到编码的比特流。本申请实施例提供的图像处理方案可应用于视频编码过程的预测阶段,即对图像块采用相应预测模式进行预测,得到预测块的场景。
S401,基于第一划分模式参数集合确定目标图像块的目标划分模式参数。
目标图像块是指输入视频图像(即视频帧)中当前正在编码的图像块,可简称为当前块或者当前图像块,在H.265/高效率视频编码(High Efficiency Video Coding,HEVC)标准下,目标图像块可以是输入视频图像中的一个编码树单元(Coding Tree Units,CTU),或者是编码单元(Code Unit,CU),在此不做限制。
第一划分模式参数集合是指第一划分模式对应的划分模式参数的集合。第一划分模式是一种预测模式,该预测模式可以利用分割线将图像块划分为不同图像区域后进行预测,例如第一划分模式为几何划分模式。当采用几何划分模式时,图像块可以被划分为矩形区域,三角形区域,或矩形区域。可选地,第一划分模式参数集合包括对应于一条或多条分割线的划分模式参数。
分割线是用于对图像块进行区域划分的线,例如直线。一条分割线应用于图像块对应的是一种划分模式,且每种划分模式均对应有划分模式参数,换而言之,第一划分模式包括至少一种划分模式,第一划分模式参数集合包括至少一种划分模式分别对应的划分模式参数。相应地,目标划分模式参数是第一划分模式参数集合中目标分割线对应的划分模式参数,可选地,目标图像块应用该目标分割线进行编码所对应的率失真代价最小。对于目标划分模式参数的详细确定方式可以参见下述实施例的描述,在此先不做详述。
下面着重对第一划分模式参数集合有关的内容进行介绍。
划分模式参数是分割线应用于图像块所对应的模式参数。在一个实施例中,所述划分模式参数包括分割线对应的分割索引、角度索引、距离索引以及预测类型中的至少一项。也即,划分模式参数可以包括分割线对应的分割索引、角度索引、距离索引以及预测类型中的任一项,也可以包括分割线对应的分割索引、角度索引、距离索引以及预测类型中的任意两项,还可以包括分割线对应的分割索引、角度索引、距离索引以及预测类型中的三项。预测类型为划分模式下对应分区采用的预测类型。预测类型包括帧内预测模式和/或帧间预测模式。因此,划分模式参数集合也可以包括其他参数(例如,划分模式下第一分区和/或第二分区采用的预测类型等)。第一分区和第二分区位于图像块中。在一实施例中,第一分区和第二分区组成一图像块。通过将预测类型可以将分割线和选择该分割线对应的预测类型直接联系起来,而不需要利用其他机制来进行选择,简化了分割线下预测类型选择的流程。
需要说明的是,在实际开发或运用中,划分模式参数所包括的内容可以根据实际需要灵活组合,但任一组合均属于本申请的技术方案,也就覆盖在本申请的保护范围之内。分割线对应的分割索引可用于标记不同分割线,由于不同分割线对应不同的划分模式,分割索引也可以称为划分模式索引,用于唯一标识一种划分模式(也即唯一标识一条分割线);分割线对应的角度索引可用于指示分割线的方向;分割线对应的距离索引可用于指示分割线偏移的位置。根据分割线对应的角度索引和距离索引可以确定该分割线在图像块中的位置。
需要说明的是,分割索引、角度索引和距离索引具体可以是数字,或者是其他字符,或者是其他可区分的标记符,在此不做限制。为便于区分不同的划分模式参数,可以设置各个分割线对应的分割索引不同且具备唯一性(角度索引同理)。对于每一个分割索引,其对应的角度索引和/或距离索引可与其他分割索引对应的角度索引和/或距离索引部分相同。例如在GPM模式中,分割索引merge_gpm_partition_idx通过不重复的数字表示。例如,分割索引merge_gpm_partition_idx的取值为0~64。角度索引angleIdx通过φi表示。例如,i的取值为0~30。距离索引distanceIdx通过ρj表示。例如,j的取值为0~3。
在一实施方式中,若分割索引merge_gpm_partition_idx为0,角度索引angleIdx为0,距离索引distanceIdx为1;和/或,若分割索引merge_gpm_partition_idx为1,角度索引angleIdx为0,距离索引distanceIdx为3。对于分割索引0与分割索引1来说,它们对应的角度索引相同。若分割索引merge_gpm_partition_idx为0,角度索引angleIdx为0,距离索引distanceIdx为1;和/或,若分割索引merge_gpm_partition_idx为3,角度索引angleIdx为2,距离索引distanceIdx为1。对于分割索引0与分割索引3来说,它们对应的距离索引相同。
当划分模式参数包括分割索引、角度索引和距离索引时,所述第一划分模式参数集合为表示所述分割索引、所述角度索引以及所述距离索引之间映射关系的参数映射表。对于划分模式参数的调整可以通过参数映射表的更新实现,可参见第二实施例对应介绍的内容,在此先不做详述。
通常在图像或视频中不可避免存在物体边界为曲线的情况。对于此类图像可以采用第一划分模式中的分割线贴合边界曲线,将需要编码的图像块划分为两部分进行预测得到预测块。在不同的场景下,利用第一划分模式(例如几何划分模式)进行划分时,分割线的使用情况是不一致的。为了更好地贴合目标图像块中的物体边界的曲线,对于第一划分模式参数集合中对应各条分割线的划分模式参数可以基于分割线的使用情况适应性地设置,进而提升贴合度,使得预测结果更加准确。
可选地,所述第一划分模式参数集合是基于所述第一划分模式参数集合的使用情况来调整的。例如,所述第一划分模式参数集合中的至少一个元素被调整以形成新的参数映射表以用于表示所述第一划分模式参数集合。在一实施例中,通过增加、删除、重排序、或改变参数映射表的至少一个元素来形成所述新的参数映射表。至少一个元素可以是参数映射表中的分割索引、角度索引、距离索引、预测类型中的至少一个。
在一实施例中,第一划分模式集合为表示分割索引、角度索引、距离索引、以及第一分区和/或第二分区采用的预测类型中的至少两个之间映射关系的参数映射表。预测类型可用预测模式索引表示。如下表表a所示。merge_gpm_partition_idx为GPM分割索引,angleIdx为角度索引,distanceIdx为距离索引,intra_pred_mode1_Idx为分区1预测模式索引,intra_pred_mode2_Idx为分区2预测模式索引。参数映射表中的一个或多个元素(例如,分割索引、角度索引、距离索引、预测类型)可以在参数映射表中重复、或者部分相同、或者完全不同。如表3所示,GPM 分割索引为0-4时对应的分区1预测模式索引为M11~M15,GPM分割索引为59-63时对应的分区1预测模式索引为M11~M15,它们是重复的。GPM分割索引0-63对应的分区2预测模式索引为M21~M25,...,M31~M35,它们互不相同。在一实施例中,预测模式索引的取值M11~M15、M21~M25、M31~M35对应于分区采用的帧内预测模式或者分区采用的帧间预测模式。
表a参数映射表1
接下来,可以针对表a参数映射表进行调整。例如,可以根据分割线的使用情况来调整所述第一划分模式参数集合中的一个或多个分割索引、角度索引、距离索引、以及第一分区和/或第二分区采用的预测类型中的一个。例如,基于参数映射表1的使用情况,调整分割索引、角度索引、距离索引、预测类型中的至少一个的取值或分布得到新的参数映射表(参数映射表2)来表示所述第一划分模式参数集合。新的参数映射表如下表表b所示。在表b中GPM分割索引merge_gpm_partition_idx为59~63时,分区1预测模式索引intra_pred_mode1_Idx的取值被调整为M21~M25。
此外,还可以基于参数映射表的使用情况,通过增加、删除、重排序或改变分割索引、角度索引、距离索引、预测类型中的至少一个来形成新的参数映射表来表示第一划分模式参数集合。例如,通过重排序来形成如表c所示的新的参数映射表(参数映射表3)来表示第一划分模式参数集合。新的参数映射表如下表表c所示。参数映射表1中merge_gpm_partition_idx为2对应的列位于merge_gpm_partition_idx为1对应的列的右侧,通过交换merge_gpm_partition_idx为2和merge_gpm_partition_idx为1对应的列的位置获得参数映射表3,并将参数映射表3作为第一划分模式集合。在实践中,若将分割索引merge_gpm_partition_idx、角度索引angleIdx、距离索引distanceIdx、预测类型(分区1预测模式索引intra_pred_mode1_Idx,分区2预测模式索引intra_pred_mode2_Idx)在参数映射表中的位置进行调整(例如,重排序),则意味着映射表中这些元素存储的先后顺序、存储的位置、或者使用的优先级发生改变。在一实施例中,参数映射表中的位置代表参数映射表中元素使用的优先级。例如,在参数映射表中左侧的元素比右侧的元素在后续的编解码过程中的优先级高。如此一来,可以形成按使用优先级排序的参数映射表。通过在不同场景在参数映射表中查找不同区域,可以提交搜索效率。例如,在算例充足的情况下,可以搜索参数映射表的所有区域,在算力有限的情况下,可以仅搜索前面一部分区域,来获得合适的GPM划分参数。
表b参数映射表2
表c参数映射表3
此外,还可以基于参数映射表的使用情况,通过增加或删除分割索引、角度索引、距离索引、预测类型中的至少一个来形成新的参数映射表来表示第一划分模式参数集合。例如,通过增加分割索引、角度索引、距离索引、预测类型中的至少一个来形成如表d所示的新的参数映射表(参数映射表4)来表示第一划分模式参数集合;或者删除分割索引、角度索引、距离索引、预测类型中的至少一个来形成如表e所示的新的参数映射表(参数映射表5)来表示第一划分模式参数集合。新的参数映射表如下表表d、表e所示。
表d参数映射表4
表e参数映射表5
与表a中的参数映射表1相比,在表d中的参数映射表4仅具有61个条目(例如,61列);与表a中的参数映射表1相比,在表e中的参数映射表5仅具有66个条目(例如,66列)。如此一来,可以针对参数映射表中元素的使用情况来设置或更新出包含不同条目数的参数映射表。
此外,还可以通过改变分割索引、角度索引、距离索引、预测类型中的至少一个的取值来形成新的参数映射表以用于表示所述第一划分模式参数集合。例如,改变表a中的参数映射表1中任意一个元素(分割索引、角度索引、距离索引、预测类型)的取值来更新参数映射表。
可选地,所述划分模式参数基于已编码图像对所述分割线的使用情况确定。已编码图像是指在目标图像块所在的图像之前被编码完成图像(或称为帧),已编码图像使用的分割线可以是最新的第一划分模式参数集合中各个划分模式参数所指示的分割线。由于视频编码过程中包括多种预测模式,已编码图像中的图像块在编码时可能采用除第一划分模式之外的其他预测模式,例如帧内预测模式。因此已编码图像对分割线的使用情况是指已编码图像中部分或者是全部图像块对分割线的使用,并且各个图像块使用的分割线可能相同或者不同,可以通过统计分割线在已编码图像中的使用情况确定划分模式参数。
在一个实施例中,该最新的第一划分模式参数集合在满足更新条件前不进行更新。例如VVC标准中定义的几何划分模式。在另一个实施例中,该最新的第一划分模式参数集合中包括的划分模式参数可以是基于预设数量张已编码图像的使用情况确定的。划分模式参数确定之后,在更新条件成立之前划分模式参数不被更新。
在一实施方式中,更新条件可以是接收到更新标志之后并且在收到更新标志之后根据收到更新标志之前已编码的图像的划分情况进行第一划分模式参数集合的更新。例如,在接收到更新标志之前,对编码图像使用第一划分模式参数集合S1进行编码。在接收到更新标志之后,基于在接收到更新标志的时刻之前统计的划分情况更新第一划分模式参数集合S1得到第一划分模式参数集合S2。接下来,后续图像的编码使用第一划分模式参数集合S2来进行编码。
在另一实施方式中,预定条件可以是接收到更新标志之后根据收到更新标志之后进行编码的预设数量的图像的划分情况进行第一划分模式参数集合的更新。例如,若预设数量为3,在接收到更新标志之前,对图像使用第一划分模式参数集合S1进行编码。在接收到更新标志之后,基于从接收到更新标志的时刻开始的连续3张图像的划分情况更新第一划分模式参数集合S1得到第一划分模式参数集合S2。接下来,后续图像的编码使用第一划分模式参数集合S2来进行编码。基于上述方案,可以依据更新标志对第一划分模式参数进行调整,实现节约计算资源和增强不同场景下第一划分模式的适用性之间的平衡。
在又一实施例中,该最新的第一划分模式参数集合中的划分模式参数可以基于预设数量张已编码图像的使用情况确定进行动态调整的,也即,每当编码至预设数量张图像时,就可以基于该预设数量张已编码图像的使用情况确定划分模式参数,实现对最新的第一划分模式参数集合的更新。示例性地,目标图像块所在的图像是第7张图像,预设数量为3,那么对第1~3张图像在编码过程中使用的是第一划分模式参数集合S1,并且基于前3张已编码图像对分割线的使用情况得到第一划分模式参数集合S2,对第4~5张图像在编码过程中使用的是第一划分模式参数集合S2,并且基于第4~5张已编码图像对分割线的使用情况得到第一划分模式参数集合S3,那么对目标图像块则是使用第一划分模式参数S3中的划分模式参数,并且在后续编码时,该目标图像块所在的图像也作为已编码图像,基于第6~8张已编码图像对分割线的使用情况确定新的划分模式参数,依次循环,可以基于当前编码的图像不断地对第一划分模式参数进行动态调整,在此方式下,各个视频帧在编码过程中使用的划分模式参数间接参考了已编码图像的使用情况,而已编码图像和当前正在编码的图像一定程度上是存在相关性的,通过实时地跟进最近的已编码图像对分割线的使用情况,对不同阶段的预设图像使用不同的划分模式参数集合,至少一种划分模式参数集合可以覆盖同一视频中多种场景图像,从而提升不同场景下第一划分模式的适用性。
可选地,也可以是以图像块为单位确定划分模式参数,即:所述划分模式参数基于已编码图像块对所述分割线的使用情况确定。这一方式当目标图像块是所在图像中编码靠后的图像块时,能够统计到之前所有的图像块对分割线的使用情况,将分割线的使用情况的统计范围进一步拓宽到当前块所在的图像,能够增进目标图像块使用的划分模式参数的适用性,提高预测结果的准确度,从而降低视频编码的失真度。
第一划分模式可以包括至少一种划分模式,每种划分模式对应的是一条分割线,已编码图像中不同图像块可能使用不同的分割线,也可能重复使用相同的分割线,已编码图像中各个图像块中对同一分割线的使用情况是不同的,例如使用次数或者使用频率不同,假设存在两条分割线,分别为分割线L1和分割线L2,分割线L1可能没有被已编码图像中的任何图像块使用,而分割线L2被已编码图像中的图像块使用了10次。由于不同分割线在已编码图像中的使用情况不同,划分模式参数在目标图像块中的应用也有所差别,由于已编码图像和目标图像块所在的目标图像存在相关性,例如已编码图像中存在的物体在该目标图像中也可能存在,物体边界没有改变或者是细微地改变,因此,可以基于已编码图像对分割线的使用情况确定划分模式参数,并将该划分模式参数用于目标图像块的编码。
例如使用频率不同,存在使用频率高的分割线和使用频率低的分割线,对于使用频率较高的分割线被已编码图像中较多的图像块使用,说明已编码图像中该分割线所贴合的一类物体边界比较多,所对应的划分模式参数在目标图像块中应用的可能性高,而使用频率低的分割线被已编码图像中较少的图像块使用,说明图像中存在分割线所贴合的一类物体边界少,所对应的划分模式参数在目标图像块中应用的可能性低。
基于此思路,可以对已编码图所使用的分割线的划分模式参数进行设置或者是调整,得到第一划分模式集合。如果物体边界部分处于使用次数最多的分割线和相邻分割线的分割线之间,可以通过对使用次数较多的分割线所在的角度进行进一步细分,例如设置更多的分割线将角度划分得更加细粒度,以提供更多的选择筛选出和物体边界更贴合的分割线。这是因为已编码图像使用次数最多的分割线不一定最合适当前编码的图像块,但是该分割线周围分布的分割线对于角度的细微调整,可以找出与边界的贴合度更高的。此外,也可以是调整原有贴合的分割线使其与边界更加贴合。这些调整可能涉及新的划分模式参数的产生或者是原有划分模式参数的调整。
可选地,所述至少一条分割线中的相邻分割线之间形成的夹角的大小不相等。在第一划分模式中至少一种划分模式一一对应的至少一条分割线中,任意两条相邻分割线之间所形成的夹角的大小可以是不相等的。例如,分割线L1与分割线L1的左相邻分割线之间所形成的夹角,大于分割线L1与分割线L1的右相邻分割线之间所形成的夹角。相邻分割线是相对而言的,例如分割线L1和分割线L2互为相邻的分割线。任意两条分割线的夹角大小不等可以使得各条分割线的位置分布不均匀。由于这种不均匀的分布特点是与图像块中物体边界的特点相关联的,从而在一定程度上提升分割线与边界的贴合程度。
在一个可行的实施方式中,划分模式参数是基于已编码图像对所述分割线的使用情况,对目标方向的分割线与所述目标方向的分割线的相邻分割线之间的角度间隔进行调整确定的。
第一划分模式包括的各个划分模式所对应的分割线可以是不同方向的分割线,例如水平/垂直方向的分割线,正/负45度方向的分割线。目标方向的分割线可以是分割线在已编码图像中的使用情况确定的,例如目标方向的分割线是已编码图像中使用次数最多的水平方向(90度)的分割线。本申请实施例中,与某一分割线相邻的分割线简称为相邻分割线,例如目标方向的分割线的相邻分割线是指与目标方向的分割线相邻的分割线。对于同一图像块的划分,目标方向的分割线和相邻分割线之间可以形成角度间隔,也即两条存在交叉点的直线存在的夹角。前述提及:对于第一划分模式参数集合中包括的划分模式参数,可以基于已编码图像对分割线的使用情况,添加新的分割线或者是调整已有分割线的位置,在此,即可以通过对目标方向的分割线和目标方向的分割线的相邻分割线之间的角度间隔进行调整,来调整已有分割线的位置,进而能够确定划分模式参数。在一种实现方式中,基于目标方向的分割线和相邻分割线之间的角度调整通过添加新的分割线的实现方式可以是:添加基于平均值的分割线,即将目标方向的分割线和相邻分割线对应的角度进行平均后得到新的角度,将新的角度对应的分割线作为新的分割线,添加至目标方向的分割线和相邻分割线之间。示例性地,目标方向的分割线对应的角度为φ11,相邻分割线对应的角度为φ12,则可以对两个角度进行平均之后得到新的角度,即新的角度φ13=(φ11+φ12)/2,根据新的角度可以确定出新的分割线,并将其添加至目标方向的分割线和相邻分割线之间。
可选地,对于目标方向的分割线和相邻分割线之间的角度间隔所遵循的规则可以为:所述目标方向的分割线与相邻分割线之间的角度间隔小于参考方向的分割线与相邻分割线之间的角度间隔;和/或,所述目标方向的分割线的应用概率大于所述参考方向的分割线的应用概率。
参考方向的分割线和目标方向的分割线是两个不同方向的分割线,目标方向的分割线的相邻分割线和参考方向的分割线的相邻分割线可以是同一条分割线,也可能是不同的分割线。通过将目标方向的分割线与其相邻分割线之间的角度间隔设置成比参考方向的分割线与其相邻分割线之间的角度间隔小,可以使得目标方向的分割线周围的分割线相对于参考方向的分割线周围的分割线更加密集,通过密集的分割线能够对以目标方向的分割线为中心的部分区域,进行更加精细的划分,从而在应用分割线时提高与图像中物体的边界的贴合程度。
请参见图5,是本申请实施例提供的一种调整后的分割线的示意图。如图5所示,水平方向的分割线与其相邻分割线之间的角度间隔比+/-45度方向的分割线与其相邻分割线之间的角度间隔小,垂直方向的分割线与其相邻分割线之间的角度间隔比+/-45度方向的分割线与其相邻分割线之间的角度间隔小。例如分割线φ8与相邻分割线φ6之间的角度间隔小于分割线φ4与相邻分割线φ6的角度间隔(部分分割线未在图5中示出)。因此垂直方向的分割线和水平方向的分割线周围的分割线更加密集,而+/-45度方向的分割线则较为稀疏。
可选地,由于上述调整涉及的是角度间隔的调整,因此可以设置查找索引i和与角度有关的参数cos(φ)之间的映射的查找表。其中,i为索引,i取0~n。a1~an为不同分割索引对应的cos(φ)的值。索引i可以对应于分割索引,cos(φ)可以对应于角度索引。然后通过cos(φ)的调整实则能够实现对划分模式参数的调整。需要说明的是,此实施方式适用于存在较多近似水平边界和近似垂直边界的场景。在此实施方式下,各个分割线对应的角度索引和距离索引都是预先设置的,在这个编解码过程中不会动态调整。
示例性地,若索引i=ia对应于0度,则aia取值为1。和/或,若索引i=ib对应于90度,则aib取值为0或者近似为0;和/或,若索引i=ic对应于45度,则aic取值为cos(45);其中,ia,ib,ic的取值为0~n。也就是说,存在水平方向、垂直方向以及45度方向的分割线分别对应的角度的余弦值。参照上述目标方向的分割线和相邻分割线之间的角度间隔所遵循的规则,索引ia对应的角度与索引ia相邻的索引ia+1对应的角度之间的差值可以小于索引ic对应的角度与索引ic相邻的角度索引ic+1对应的角度之间的差值,索引ia对应的角度与索引ia相邻的索引ia-1对应的角度之间的差值小于索引ic对应的角度与索引ic相邻的索引ic-1对应的角度之间的差值。同理,索引ib对应的角度与索引ib相邻的索引ib+1对应的角度之间的差值小于索引ic对应的角度与索引ic相邻的角度索引ic+1对应的角度之间的差值。索引ib对应的角度与索引ib相邻的索引ib-1对应的角度之间的差值小于索引ic对应的角度与索引ic相邻的索引ic-1对应的角度之间的差值。
分割线的应用概率是指目标方向的分割线在图像块中被使用的可能性,对于一些特定场景的视频,目标方向的分割线的应用概率比参考方向的分割线的应用概率大。示例性地,例如视频包含的物体的边界多是在近似水平和近似垂直方向上的,由此,其靠近水平/垂直方向的分割线被使用的概率比具有其他方向的分割线(例如,+/-45度方向的分割线)被使用的概率要大。在一种实现方式中,应用概率最小的分割线和相邻分割线之间的角度比应用概率最大的分割线和相邻分割线之间的角度大。
可选地,对于目标方向的分割线的应用概率的确定方式可以是:预先统计预设数量张已编码图像中对各个分割线的使用次数,基于使用次数确定该分割线的应用概率。
这样可以在分割线的应用概率大的角度区间内可以设置更加密集的分割线。可选地,可以通过应用概率阈值为基准划分目标方向的分割线和参考方向的分割线,目标方向的分割线是所有方向的分割线中应用概率大于应用概率阈值的分割线,而参考方向的分割线是所有方向的分割线中应用概率小于应用概率阈值的分割线。目标方向的分割线可以包括多个方向(至少两个)的分割线,例如包括水平方向的分割线和垂直方向的分割线,参考方向的分割线同理,例如包括45度方向的分割线、60度方向的分割线。各个目标方向的分割线和各个参考方向的分割线与相邻分割线之间的角度间隔可以按照上述规则进行设置,进而将应用概率大的目标方向的分割线设置更加密集,应用概率小的参考方向的分割线设置的更加稀疏,以提升后续图像块在编码时使用第一划分模式参数集合中的划分模式参数的使用效果。
可以存在目标方向的分割线而不存在参考方向的分割线,示例性地,分割线可以分布在水平线和/或垂直线的周围的角度范围内,而+/-45度方向没有分割线。这样能够加快对已有分割线的调整,并且对于一些特定场景下的视频,例如视频中多数物体的边界属于目标方向,直接利用目标方向的分割线去贴合图像块中物体的边界,而省略参考方向的分割线,能够更加高效地进行编码。
S402,基于所述目标划分模式参数确定所述目标图像块的预测结果。
在一个实施例中,目标划分模式参数包括目标分割线对应的分割索引、角度索引和距离索引中的任一项或多项,目标分割线应用于目标图像块得到的率失真代价是最小的。目标划分模式参数中包括的各个索引是目标分割线应用于目标图像块所使用的模式参数。可选地,目标划分模式参数包括的角度索引和距离索引,基于该目标划分模式参数对目标图像块进行预测的过程大致可以是:利用角度索引和距离索引确定目标图像块被分割线划分出来的图像区域中的预测结果,然后将该预测结果作为目标图像块的预测结果。可选地,可以根据角度索引和距离索引确定目标图像块中各个像素点的权重,再将权重和对应的像素值进行加权求和得到加权预测像素值,该加权预测像素值可以作为目标图像块的预测结果。目标图像块的预测块中的各个像素点即采用的是该预测结果。步骤S402更详细的实施方式可以参见第三实施例对应的介绍,在此先不做详述。
需要说明的是,在编码端第一划分模式对应的划分模式参数可以二值化后打包至比特流中并传输至解码端,例如可以将分割索引打包至比特流中。解码端接收到比特流之后,通过解析比特流得到关于第一划分模式的划分模式参数:分割索引,可选地,可以通过查找参数映射表确定出分割索引对应的角度索引和距离索引,进而根据角度索引和分割索引确定目标图像块在被分割线划分出来的不同图像区域中对应的预测结果。上述参数映射表需要事先设置于解码器中。采用上述方式得到的第一划分模式参数集合,由于划分模式中的分割线与图像块的物体边界的贴合程度得到改善,因此图像块所使用的划分模式参数与图像块匹配度是更高的,无论是在编码端还是解码端都能够得到更准确的预测结果。
需要说明的是,在本文中,采用了诸如S401、S402等步骤代号,其目的是为了更清楚简要地表述相应内容,不构成顺序上的实质性限制,本领域技术人员在具体实施时,可能会先执行S402后执行S401等,但这些均应在本申请的保护范围之内。下述实施例同理。
本申请实施例提供的图像处理方案,从包含对应于第一或至少一条分割线的划分模式参数的第一划分模式参数集合中确定出与目标图像块匹配的目标划分模式参数,基于该目标划分模式参数可以得到目标图像块的预测结果。第一划分模式参数集合中包括的划分模式参数基于已编码图像对分割线的使用情况确定,能够为目标图像块对分割线的使用提供更好的参考,此外,通过已编码图像对分割线的使用情况,按照一定规则调整目标方向和相邻分割线之间的角度间隔,能够使得目标方向的分割线周围的分割线设置得更加密集,以提高目标图像块所使用的分割线与目标图像块中包含物体的边界的贴合度,降低预测结果的误差。
第二实施例
请参见图6a,图6a是根据第二实施例示出的一种图像处理方法的流程示意图,该实施例中的执行主体可以是一个计算机设备或者是多个计算机设备构成的集群,该计算机设备可以是智能终端(如前述移动终端100),也可以是服务器,此处,以本实施例中的执行主体为智能终端为例进行说明。
由于第一划分模式参数集合包括的划分模式参数可基于已编码图像对各条分割线的使用情况确定,而第一划分模式参数集合可以为表示所述分割索引、所述角度索引以及所述距离索引之间映射关系的参数映射表,在此条件下,参数映射表可以在编码过程中动态调整,从而实现对划分模式参数的更新,以提升第一划分模式对不同场景的适应性。下面对第一划分模式参数集合的调整方式进行详细地介绍,具体可参见下述步骤S601~S603。
S601,获取已编码图像对所述分割线的使用情况。
已编码图像是指目标图像块所在的图像之前被编码的图像,也即已编码的帧,由于已编码图像可以采用多种预测模式中的任一种进行处理,第一划分模式在已编码图像中的使用情况具体是指第一划分模式中各个划分模式对应的分割线在已编码图像中的使用情况,例如,某种划分模式对应的分割线在已编码图像中被使用的次数。这样,可以得到第一划分模式对应的所有分割线在已编码图像中的使用情况,进而可以基于该使用情况确定第一划分模式参数集合中的划分模式参数(可参见步骤S602和S603)。由于已编码图像与正在编码的图像之间可能是存在关联的,例如已编码图像中的物体可能重复出现在当前编码的图像中,因此,已编码图像对分割线的使用情况对于后续图像的编码是具备参考性的,根据已编码图像对分割线的使用情况进行实时地调整划分模式参数,可以将分割线和图像中物体的边界进行适应性地匹配,以提升两者之间的贴合度。
需要说明的是,已编码图像所使用的分割线是第一划分模式参数集合中划分模式参数对应的分割线,此处的第一划分模式参数集合是表示所述分割索引、所述角度索引以及所述距离索引之间映射关系的参数映射表。在一个实施例中,该参数映射表是预设的且始终不改变,或者该参数映射表在编码预设数量张图像之后调整了一次,或者该参数映射表在接收到更新标志之后进行了调整;在另一个实施例中,该参数映射表是最新的参数映射表,在编码图像每达到预设数量,例如每一帧编码完成之后,都会基于当前的参数映射表调整为最新的参数映射表,是一种动态调整的方式。
S602,基于所述使用情况确定所述分割线的应用概率。
分割线的应用概率是指在图像的编码过程中被使用的可能性。也即,各个分割线在已编码图像中出现的概率。对于应用概率的确定方式,在一个实施例中,可以:响应于所述已编码图像的数量达到预设阈值,获取所述第一划分模式的使用次数;基于使用记录参数以及所述使用次数确定各条分割线的应用概率。
在已编码图像的编码过程中,可能使用第一划分模式或者使用其他预测模式对图像块进行预测处理。通过统计预设数量张已编码图像对第一划分模式的使用次数,可以得到已编码图像更多的数据支持,进而获取可信度更高的应用概率。
第一划分模式的使用次数是指第一划分模式被已编码图像使用的总次数。第一划分模式中包括至少一种划分模式,每一种划分模式都对应有一个使用记录参数,用于记录该划分模式对应的分割线被已编码图像使用的总次数。基于使用记录参数可以确定第一划分模式的使用次数,即:通过将各个划分模式对应的使用记录参数求和得到已编码图像使用第一划分模式的总次数。接着可以将各个分割线对应的使用记录参数和使用次数的比值作为对应分割线的应用概率。
在实际应用中,可以在编码端对第一划分模式参数集合中包括的每一个索引(例如分割索引),分别设置对应分割线被使用的历史记录参数,即该种划分模式下的使用记录参数。从输入的第一帧F1开始,若对于帧中的一个图像块采用了第一划分模式,则可以将对应的历史记录参数加1,从而能够在已编码图像的数量达到预设阈值时,统计得到各个划分模式分别被使用的次数,同时可以得到第一划分模式被使用的总次数。示例性地,如下表1是几何划分模式应用于图像块统计得到的使用记录参数,表2是几何划分模式中各个分割线的应用概率。
表1使用记录参数统计表
表2应用概率统计表
可以连续记录多个帧中各个图像块采用的划分模式的次数,当记录完预设数量的帧之后,对各个索引对应的历史记录参数进行相加,得到历史总次数(即第一划分模式的使用次数),再将各个索引的历史记录除以历史总次数,得到各索引出现的概率,即各条分割线被应用的概率。具体可以参见下述表达式。
其中,bi表示第i条分割线的使用记录参数,ci表示第i条分割线的应用概率。
S603,基于所述应用概率更新所述参数映射表。
可选地,参数映射表是表示分割索引、角度索引以及距离索引之间映射关系的查找表(Look-Up-Table,LUT),在该参数映射表中可以通过任意一种索引查找到与之对应的索引,例如确定了分割索引,那么可以在该参数映射表中根据该分割索引查找到与之对应的角度索引和距离索引。
对于参数映射表,示例性地,可参见下表3,是几何划分模式下表示GPM分割索引merge_gpm_partition_idx与角度索引angleIdx、距离索引distanceIdx之间的映射关系的查找表。
表3参数映射表
可以发现,如表3所示的参数映射表中,距离索引是有重复数据的,而分割索引和角度索引均是不同的。在一个实施例中,角度索引angleIdx对应于角度的正弦值或者是余弦值,距离索引distanceIdx对应于ρj(j=0,1,2,3)。
通过统计各个分割线在已编码图像中的应用概率,可以确定出应用概率最高的分割线,或者是基于应用概率确定出分割线应用概率高的区域,进而可以采用插值的方法设置新的分割线,可选地,根据新设置的分割线确定新设置的分割线对应新的角度索引和新的距离索引,再根据新的角度索引和新的距离索引调整分割索引与角度索引和距离索引之间的映射关系,从而构建动态调整的参数映射表。
对于图像块,可存在多种分割线φ0,φ1,φ2,φ3…φi,φj…φn,采用这些分割线与图像块中物体边界进行匹配,可以根据率失真优化(Rate-distortion optimization,RDO)确定图像块采用的最佳分割线,对应的划分模式参数即目标划分模式参数。
示例性地,请参见图6b,是本申请实施例提供的一种不同分割线应用于图像块的效果示意图。如图6b中的(1)所示,示出了不同图像块应用两种分割线(包括φi,φj,其余未示出)的效果,其中虚线表示根据RDO过程在对应图像块中未被采用的分割线,实线表示根据RDO过程最终采用的分割线,如图6b中的(1)所示,φi被采用了2次,φj被采用了3次。若φi,φj为一段时间内出现频率较高的分割线,则说明图像块中物体的边界(如图6b中曲线所示)选用[φi,φj]内的角度的可能性较大,为使得第一划分模式中的分割线更贴近于图像中物体的边界,可以对[φi,φj]内的角度做进一步细分,通过添加更多的分割线,以使得分割线对物体边界的贴合程度更好。例如,在添加新的分割线φnew之后,使得在对图像中高概率出现的物体边缘,可供选择的分割线更多。明显地,在添加新的分割线φnew之后,对于图6b中的(1)和(2)中对应的第2、3、4列的图像块,贴合程度是更好的。
在一个实施例中,由于对分割线对应的划分模式参数的更新最关键的是角度的更新,通过引入包含描述角度信息的角度参数的角度映射表,可以快速且准确地对参数映射表的更新。基于此,步骤S603的实现方式包括以下步骤S6031和S6032。
S6031、基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表;S6032、基于所述更新后的角度映射表更新所述参数映射表中的角度索引和/或距离索引。
可选地,所述角度映射表用于表示查询索引和角度参数之间的映射关系,所述查询索引包括所述分割索引或所述角度索引,所述角度索引与所述角度参数之间存在关联关系。
角度映射表是表示查询索引和角度参数之间的映射关系的查找表,查询索引用于建立角度映射表和参数映射表之间的关联,由于参数映射表中分割索引和角度索引是具备唯一性的,因此角度映射表中的查询索引可以设置为分割索引或者是角度索引。角度映射表中的角度参数可以用于描述分割线在图像块中的角度信息,由此角度参数与角度索引之间存在关联关系:参数映射表中的角度索引对应可以设置为该角度参数,或者是有关该角度参数的函数。假设查询索引记为i,角度参数记为cos(φ),角度映射表具体可以如下表4。
表4角度映射表
此表包括n+1种划分模式分别对应的角度参数,角度参数cos(φ)和角度索引angleIdx对应。
由于角度映射表和参数映射表之间的关联关系,基于分割线的应用概率先对角度映射表进行更新,主要是对角度映射表中角度参数的更新,鉴于角度参数和参数映射表中角度索引之间的关联,可以基于更新之后的角度映射表更新参数映射表,包括参数映射表中的角度索引和距离索引。
可选地,步骤S6031的实现方式包括:基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表。
可以基于所述分割线的应用概率确定第一查询索引和/或第二查询索引:所述第一查询索引为应用概率最高的分割线对应的查询索引;所述第二查询索引为应用概率次高的分割线对应的查询索引,或者为所述第一查询索引的相邻查询索引。
第一查询索引和第二查询索引是角度映射表中两个不同的查询索引,假设角度映射表中的查询索引是分割索引,而应用概率可以通过分割索引与分割线对应,因此基于应用概率可以从角度映射表中确定第一查询索引和/或第二查询索引,例如可以将应用概率最高的查询索引作为第一查询索引,将应用概率次高的查询索引作为第二查询索引。接着按照预设的更新规则,基于第一查询索引和/或第二查询索引对应的角度参数进行更新,例如在两个查询索引对应的角度参数之间插入新的角度参数,或者调整查询索引分别对应的角度参数的大小等等。更详细地,可以参见接下来介绍的两种实施方式。
在一种实施方式中,可以基于所述第一查询索引对应的角度参数和所述第二查询索引对应的角度参数确定目标角度参数;基于所述目标角度参数对角度映射表进行更新,得到更新后的角度映射表。
目标角度参数是一个新的角度参数,目标角度参数的大小可以是处于第一查询索引对应的角度参数和第二查询索引对应的角度参数的大小之间,角度映射表可以根据该目标角度参数更新,得到更新后的角度映射表,在此实施方式下,包括下述方式1和方式2。
方式1:第一查询索引是应用概率最高的查询索引,第二查询索引是第一查询索引的相邻查询索引,该相邻查询索引包括与第一查询索引左相邻的查询索引和/或与第一查询索引右相邻的查询索引,目标角度参数是设置在第一查询索引和第二查询索引分别对应的角度参数之间的一个新的角度参数,可以理解为在角度映射表中新添加的角度参数。该角度参数所指示的角度大小是处于两个查询索引分别对应的角度参数所是指的角度之间的。由此,目标角度参数包括在角度映射表中与第一查询索引对应的角度参数左相邻的角度参数和/或右相邻的角度参数。可选地,在角度映射表中需要对应删除相应的角度参数以将目标角度参数添加到角度映射表中,例如目标角度参数包括一个新的角度参数,则对应删除一个应用概率最低的角度参数。
为便于描述,下面将第一查询索引记为索引M,第二查询索引包括的两个相邻索引分别记为索引MN1和索引MN2,可以在索引M和索引MN1对应的角度参数cos(φM)和cos(φMN1)之间插入新的cos(φNew),即目标角度参数。其中,φNew的角度位于索引M和MN1分别对应的角度之间。例如,对cos(φM)和cos(φMN1)求平均值,得到目标角度参数cos(φ'),从而φ'对应的角度位于索引M和索引MN1分别对应的角度之间,也就是分割索引分别对应的分割线的角度之间。同理,可以在索引M和索引MN2对应的角度参数cos(φM)和cos(φMN2)之间插入新的cos(φ'New)。其中,φ'New的角度位于索引M和MN2分别对应的角度之间。
假设φ'对应的索引为i',可以将i'和cos(φ')的值插入如表4所示的角度映射表,并将应用概率最低的索引从表4中删除,以得到更新后的角度映射表。需要说明的是,插入i'并不会影响查询索引的数量。示例性地,基于表4示出的角度映射表为例,若索引1对应的cos(φ)值a2的应用概率最高,则在可以角度参数a1和a2之间进行插值,得到anew1,和/或,在a2和a3之间进行插值得到anew2,之后将anew1和/或anew2插入到角度映射表中。
可选地,可以基于应用概率筛选出需要删除的角度参数,若两个新的角度参数均要插入至角度映射表中,则筛选出两个删除的角度参数。例如,若查询索引n对应的分割线的应用概率最低,则将该索引n对应cos(φ)值,即an从表中删除,若查询索引n-1对应分割线的应用概率次低,则将该索引n对应的cos(φ)值,即an-1从角度映射表中删除。可选地,对角度映射表进行重新排序,得到如下所示的表5。
表5更新后的角度映射表1
可选地,可以基于如表5示出的更新后的角度映射表更新参数映射表中的angleIdx。
方式2:第一查询索引和第二查询索引分别是应用概率最高的查询索引和应用概率次高的查询索引,在第一查询索引和第二查询索引对应的角度参数所指示的角度形成的角度区域之间,可以进行分割线的插值或者调整,进而实现对参数映射表的更新。
为便于描述,本方式中将第一查询索引记为M1,第二查询索引记为M2,也就是说,若第一查询索引M1和第二查询索引M2指示的角度为φ1和φ2,并且认为其对应的角度区间范围内[φ1,φ2]应用分割线的概率较高,则在第一查询索引和第二查询索引之间插入新的分割线,具体的插入方法可以参见方式1中的介绍,在此不做赘述。分割线的插入可以为1条或者是多条。
示例性地,若角度区间范围内[φ1,φ2]应用分割线的概率较高,且该角度区间范围对应于cos(φ)等于a2和a3之 间的角度区间范围,则在a2和a3之间插入anew。可选地,若an对应的分割线的应用概率较低,则在角度映射表中删除an。最后,将未删除的分割线所对应的角度参数重新排列,并将这些分割线对应的角度参数与查询索引i相对应。如下表6所示,是按照上述示例内容,对基于表4所示的角度映射表更新后得到的更新后的角度映射表。
表6更新后的角度映射表2
需要说明的是,可以在概率最高的查询索引和概率次高的查询索引之间插入至少一条分割线,对应角度区域会插入至少一条分割线分别对应有角度φ,这样可以形成至少一个角度参数,例如a2和a5分别为第一查询索引和第二查询索引对应的角度参数,可以在a2和a5之间随机添加不与a3或a4重复的角度参数,该角度参数对应分割线,这样可以使得应用概率较高的分割线周围分布更为密集的分割线,从而对图像块中应用分割线较高的边界所在的区域范围内的角度进行更加细粒度地划分,尽可能地与物体的边界进行贴合。
在另一种实施方式中,所述第二查询索引为所述第一查询索引的相邻查询索引,可以:按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表。
此实施方式下,第一查询索引可以是应用概率最高的分割线对应的分割索引,第二查询索引可以与第一查询索引左相邻,和/或与第一查询索引右相邻。预设调整规则的调整目标是尽可能地使得应用概率最高的分割线周围的分割线更加密集。可以对第二查询索引对应的角度参数进行调整,使得第一查询索引与第二查询索引之间的角度参数的差值进一步减小,得到更新后的角度映射表。
示例性地,仍旧以表4示出的角度映射表为例,若第一查询索引为查询索引2,则第二查询索引为查询索引1和查询索引3,可以将查询索引1和查询索引3对应的cos(φ)值调整为a'1和a'3,使得查询索引1和查询索引3对应的cos(φ)值分别和查询索引2对应的cos(φ)值之间的差值减小,如下表7。
表7更新后的角度映射表3
根据如表7示出的更新后的角度映射表可以更新参数映射表中对应的角度索引angleIdx。
需要说明的是,在此方式下,无需添加新的角度参数以及删除角度映射表中原有的角度参数,而是通过对原有的角度参数进行调整,达到分割线设置得更加密集的目的。
可选地,按照预设调整规则实现对角度映射表更新的方式可以是:响应于所述相邻查询索引对应的角度参数大于所述第一查询索引对应的角度参数,减小所述相邻查询索引对应的角度参数,得到更新后的角度映射表;和/或,响应于所述相邻查询索引对应的角度参数小于所述第一查询索引对应的角度参数,增大所述相邻查询索引对应的角度参数,得到更新后的角度映射表。
由上述介绍可知,调整的目标在于尽可能地缩小第一查询索引与相邻查询索引之间的差值,因此,当相邻查询索引的角度参数大于第一查询索引对应的角度参数时,可以将相邻查询索引对应的角度参数往靠近第一查询索引对应的角度参数的大小调整,即减小相邻查询索引对应的角度参数;当相邻查询索引的角度参数小于第一查询索引对应的角度参数时,同样将相邻查询索引对应的角度参数往靠近第一查询索引对应的角度参数的大小调整,即增大相邻索引对应的角度参数。上述调整规则无论执行一种或者两种,均可以得到更新后的角度映射表。需要说明的是,为了保证角度映射表的有序性,相邻查询索引对应调整之后的角度参数也是大于(或小于)第一查询索引对应的角度参数的,只是两者之间的差值相比未调整之前有所减小。
可选地,对于相邻索引的角度参数调整可以存在一个预设调整限度,即:所述相邻查询索引对应的调整后的角度参数与所述第一查询索引对应的角度参数之间的差值在预设范围内;和/或,所述预设范围是基于所述第一查询索引对应的分割线的应用概率确定的。
预设范围用于把控相邻查询索引对应的角度参数的调整限度,将相邻查询索引对应的调整后的角度参数和第一查询索引之间的差值控制在预设范围内,可以使得相邻查询索引对应的角度参数在合理范围内调整。可选地,该预设范围可以是基于第一查询索引对应的分割线的应用概率确定的,第一查询索引对应的分割线的应用概率和预设范围之间可以通过设置相应的关联关系实现,例如设置一个应用概率和预设范围之间的映射函数,第一查询索引的应用概率越大,那么预设范围越小。在此之下,相邻查询索引对应的调整之后的角度参数和第一查询索引对应的角度参数之间的差值越小,对应分割线之间的角度差越小。这样相邻查询索引对应的角度参数的调整限度就和第一查询索引对应分割线的应用概率之间关联,由于第一查询索引对应分割线的应用概率越大,目标图像块使用该分割线的可能性越高,通过相邻查询索引对应的角度参数的调整能够对第一查询索引对应的分割线周围区域进行更细的划分,若目标图像块应用相邻分割线,能够较为精细地去贴合物体边界,从而在一定程度上提升与物体边界的重合度。
需要说明的是,对于参数映射表的更新可以是在编码当前块之前实时地更新,当目标图像块所在的目标图像编码完成之后,也可以基于目标图像对分割线的使用情况将最新的参数映射表进行更新,以便于后续图像块的使用。
在一个实施例中,基于分割线的应用概率更新参数映射表之后,还可以向解码端发送比特流,所述比特流包括更新后的参数映射表的指示信息。
也就是说,按照上述实施例基于分割线的应用概率对角度映射表进行更新,并基于更新后的角度映射表更新参数映射表之后,可以将更新后的参数映射表的指示信息发送于比特流中。所述指示信息用于指示所述解码端利用所述更新后的参数映射表确定所述目标图像块的预测结果。这样,在解码端对目标图像块对应的编码比特流进行解码处理,在预测阶段可以使用和编码端相同的参数映射表,进而确定出相应的预测结果。
需要说明的是,在解码端,可以通过接收到的比特流,通过比特流得到关于划分模式参数的分割索引,可选地,通过查找参数映射表,可以确定分割索引对应的角度索引和距离索引,并进一步根据角度索引和距离索引确定目标图像块中不同图像区域分别对应的预测结果。上述介绍的实施例中,分割索引与角度索引、距离索引之间的映射关系在整个编码过程中会动态调整,对于不同场景的适应性能够得到有效提高。
本申请实施例提供的图像处理方案,引入用于表示查询索引和角度参数之间的映射关系的角度映射表,将分割线所对应的角度索引从划分模式参数中单独抽离出来进行调整,通过角度映射表的更新来实现参数映射表的更新,从而能够更加高效地确定划分模式参数;通过参考已编码图像对分割线的使用情况,确定分割线的应用概率,可以对已编码图像使用分割线的情况进行量化评估,从而基于应用概率确定需要调整或者新增角度参数的查询索引,提供更加科学的更新依据,实现对角度映射表的更新;此外,由于每当达到预设张已编码图像的使用情况的统计就可以通过更新角度映射表来更新参数映射表,这样可以在编码过程中对参数映射表进行持续性地更新,实现参数映射表的动态调整,从而在不同阶段得到不同的划分模式参数,覆盖更加多样的场景以提升第一划分模式对不同场景的适应性。
第三实施例
请参见图7,图7是根据第三实施例示出的一种图像处理方法的流程示意图,该实施例中的执行主体可以是一个计算机设备或者是多个计算机设备构成的集群,该计算机设备可以是智能终端(如前述移动终端100),也可以是服务器,此处,以本实施例中的执行主体为智能终端为例进行说明。
S701,基于第一划分模式参数集合确定目标图像块的目标划分模式参数。
在一个实施例中,由于目标图像块可以采用帧间预测模式和帧内预测模式中的任一种,本申请实施例提供的图像处理方案可以存在实现的前提条件,即:基于目标图像块的参数,利用至少一种预测模式对所述目标图像块进行预测编码,确定每种预测模式对应的率失真代价;当率失真代价最小的预测模式为第一划分模式时,执行所述S701步骤。
首先编码器可以确定目标图像块的颜色分量,该颜色分量包括亮度分量和/或色度分量,然后基于目标图像块的参数(该参数是预测编码所使用的参数),利用至少一种预测模式对目标图像块的颜色分量进行预测编码,进而能够确定出每种预测模式对应的率失真代价,其中,至少一种预测模式包括帧内预测模式和/或帧间预测模式,若利用多种(至少两种)预测模式,则可以分别对目标图像块的颜色分量进行预测编码,计算每一种预测模式对应的率失真代价。接着可以从多种预测模式分别对应的率失真代价中确定最小率失真代价,将最小率失真代价对应的预测模式确定为目标图像块的目标预测模式,并将对应的模式参数确定为目标图像块的预测模式参数。
在最小率失真代价对应的预测模式为第一划分模式,例如几何划分模式(简称GPM模式)时,可以将第一划分模式作为目标图像块采用的目标预测模式,并基于第一划分模式参数集合确定目标图像块的目标划分模式参数。
需要说明的是,当采用第一划分模式对目标图像块进行预测编码时,可以执行本申请实施例提供的方案,并且当确定出率失真代价最小的预测模式为该第一划分模式时,可以直接将第一划分模式对应的划分模式参数确定为目标图像块的预测模式参数,并直接采用本申请实施例得到的预测结果。
目标图像块的目标划分模式参数是第一划分模式参数集合中满足一定条件的划分模式参数,第一划分模式包括至少一种划分模式,在一个实施例中,步骤S701的实现方式包括以下步骤:
S7011:确定所述第一划分模式包括的每种划分模式应用于所述目标图像块的率失真代价;
S7012:将率失真代价最小的划分模式确定为所述目标图像块的目标划分模式;
S7013:从所述第一划分模式参数集合中确定所述目标划分模式对应的模式参数,并将所述目标划分模式对应的模式参数确定为所述目标图像块的目标划分模式参数。
也就是说,可以遍历第一划分模式包括的所有划分模式,确定出目标图像块分别采用各种划分模式所需要的率失真代价,为了实现最优的编码性能,寻求在一定码率下尽可能地减少视频失真或者是在失真允许的范围内将视频压缩到最小的目标,可以将各个划分模式对应的率失真代价进行比较,将率失真代价最小的划分模式确定出来并将该率失真代价最小的划分模式作为目标图像块的目标划分模式,能够实现目标图像块的最优编码。可选地,有关目标划分模式对应的模式参数可以从第一划分模式参数集合中查询出来,并将该模式参数作为目标图像块所要使用的目标划分模式参数,后续可以按照该目标划分模式参数划分目标图像块并进行预测,得到目标图像块的预测结果。
为便于理解,下面以第一划分模式为GPM模式,划分模式为GPM模式对应的64种划分模式中的任一种,第一划分模式为GPM映射表为例,对上述过程进行说明:通过遍历GPM模式对应的64种划分模式,可以确定出率失真代价最小的划分模式,并将率失真代价最小的划分模式作为当前块的目标划分模式。可选地,依据目标划分模式,通过GPM分割索引merge_gpm_partition_idx、角度索引angleIdx和距离索引distanceIdx的映射表,确定出目标划分模式对应的目标GPM分割索引merge_gpm_partition_idxT、目标角度索引angleIdxT和目标距离索引distanceIdxT。关于GPM分割索引、角度索引以及距离索引的参数映射表的确定,可以参见前述实施例的描述,在此不做详细说明。
需要说明的是,角度索引angleIdx取不同值时,对应的是不同的角度φ(如前述图3a),距离索引distanceIdx取不同值时,对应的是不同的距离ρ(如前述图3b)。角度索引angleIdx,距离索引distanceIdx的不同取值的组合分别构成不同的划分方式(如前述图3c),在一个实施例中,可以利用一查找表来表示GPM分割索引merge_gpm_partition_idx与角度索引angleIdx,距离索引distanceIdx之间的关系。例如,前述介绍的参数映射表(如表3所示)。
在一个实施例中,所述目标图像块包括第一分区和第二分区,所述第一分区和所述第二分区是由分割线对所述目标图像块划分得到的两个图像区域。该分割线是目标图像块的目标划分模式参数所指示的分割线。此处的第一分区和第二分区是相对而言的,例如使用水平方向的分割线划分目标图像块,将在水平方向的分割线上方的图像区域可以称为第一分区,在水平方向的分割线下方的图像区域可以称为第二分区。反之,也可以在水平方向的分割线下方的图像区域可以称为第一分区,在水平方向的分割线上方的图像区域可以称为第二分区。其中,水平方向的分割线是与目标图像块中的边界区域全部贴合或者是部分贴合的。第一实施例中的步骤S402的实现方式可以如下步骤S702~S704。
S702,基于所述目标划分模式参数,确定分区权重。
可选地,基于所述目标划分模式参数包括的角度索引和距离索引确定分区权重。分区权重是指图像块包括的两个分 区所对应的权重,分区权重用于和对应分区中的各个像素点进行加权,得到加权预测像素值,记为predSamples,对应分区的加权预测像素值可以作为预测结果。
根据角度索引angleIdx和距离索引distanceIdx可以得到分割线的直线方程,可选地,根据角度索引angleIdx可以确定直线方程中的cos(φ)和sin(φ),根据距离索引distanceIdx可以确定直线方程中的ρ。对于直线方程的表达式如下:
其中,(xc,yc)为相对于目标图像块的中心位置的一连续位置的像素点的坐标。
如图8a所示,图8a是本申请实施例提供的一种像素点和分割线的距离分析的示意图。若像素点(xc,yc)为当前块中的像素,则基于上述直线方程,可以得到像素点(xc,yc)到分割线的距离为:
当ρ为0时,分割线如前述图3a所示。
为此,目标划分模式参数中包括的角度索引和距离索引可以确定出目标图像块中各个像素点与分割线之间的距离,可以根据该距离确定出对应于目标图像块的各像素值的权重。
可选地,根据像素点(xc,yc)相对于分割线距离的远近设置不同的权重,例如,若像素点(xc,yc)到分割线的距离大于或等于设定距离阈值,则将像素点(xc,yc)对应的权重设置为K1,反之,则将像素点(xc,yc)对应的权重设置为K2。显而易见地是:小于该设定距离阈值的像素点均位于分割线附近,大于设定距离阈值的像素点则远离分割线。对于目标图像块中第一分区和第二分区对应的像素点都采用上述规则进行权重设置,得到分区权重。此外,对于分割线两侧的像素点,即不同分区中包括的像素点,可以设置互不相同的固定权重,可见,各个像素值的权重不仅与距离分割线的远近相关,还与各个像素所在分区相关。
通过这样的方式设置分区权重,可以对目标图像块中以分割线为界限的两个图像区域中的像素点予以不同的关注度,并且,靠近分割线和不靠近分割线的像素点所对应的权重也可以是不同的,分割线两侧的分区中越靠近分割线的像素点对应的权重越大,这样可以更好地沿分割线边缘融合目标图像块的两个分区,得到预测结果。
S703,基于所述分区权重、第一预测结果集合以及第二预测结果集合中的至少一项,确定所述第一分区的预测结果和所述第二分区的预测结果。
第一预测结果集合和第二预测结果集合是参考不同的参考帧的运动矢量得到的,第一预测结果集合包括多个预测结果,可以是对目标图像块进行单向预测,得到单向预测运动矢量之后进行运动补偿得到的预测值。第二预测结果结合同理,对于确定第一预测结果集合以及第二预测结果集合的具体过程可以参见下述实施例的介绍,在此先不做详述。
在一种实施方式中,所述分区权重包括所述第一分区对应的第一权重和所述第二分区对应的第二权重,所述第一权重或者所述第二权重是基于所述目标图像块包括的像素点与分割线之间的距离确定的。详细地说,第一权重是基于目标图像块中的第一分区内的像素点与分割线之间的距离确定的,第二权重是基于目标图像块中的第二分区内的像素点与分割线之间的距离确定的。由距离远近确定的方式可以参见上述介绍的内容,在此不做赘述。
步骤S703的可选实现方式包括:基于所述第一权重、所述第二权重、所述目标图像块包括的像素点在第一预测结果集合中的第一预测结果以及所述像素点在第二预测结果集合中的第二预测结果中的至少一项,确定所述像素点的预测结果。
对于第一分区来说,可以:基于第一权重、所述目标图像块包括的像素点在第一预测结果集合中的第一预测结果以及所述像素点在第二预测结果集合中的第二预测结果中的至少一项,确定所述目标图像块包括的第一分区中的像素点的预测结果。
第一权重可以是第一分区对应的权重集合,可以称为第一权重集合,包括{w11,w12},基于像素点与分割线的距离确定权重的规则确定分别表示第一分区中靠近分割线对应的权重和远离分割线对应的权重,靠近或者远离的区域通过距离阈值来划分。利用第一权重对目标图像块包括的第一分区中的像素点在第一预测结果集合中对应的第一预测结果,及在第二预测结果集合中对应的第二预测结果进行加权求和处理,得到融合后的预测值,即第一分区中像素点的预测结果。具体表达式如下:
P(xc1,yc1)=f(w11*P11+w12*P12)
其中,(xc1,yc1)表示第一分区中的像素点,P11表示第一分区的像素点在第一预测结果集合中的第一预测结果,P12表示第一分区的像素点在第二预测结果集合中的第二预测结果,w11和w11之和为1,依据上述权重的设置规则,w11可以设置为K1,w12对应为(1-K1);或者w11设置为K2,w12对应为(1-K2)。
对于第二分区来说,可以:基于第二权重、所述目标图像块包括的像素点在第一预测结果集合中的第一预测结果以及所述像素点在第二预测结果集合中的第二预测结果中的至少一项,确定所述目标图像块包括的第二分区中的像素点的预测结果。
同理,第二权重是第二分区对应的权重集合,可以称为第二权重集合,包括{w21,w22},分别表示第二分区中靠近分割线对应的权重和远离分割线对应的权重,靠近或者远离的区域通过距离阈值来划分,该距离阈值可以和第一分区使用距离阈值相同,也可以不同。可选地,目标图像块包括的第二分区中的像素点在第一预测结果集合以及在第二预测结果集合中都对应有相应的预测结果,因此,可以利用第二权重对目标图像块包括第二分区中的像素点在第一预测结果集合中对应的第一预测结果,及在第二预测结果集合中对应的第二预测结果进行加权求和处理,得到融合后的预测值,即第二分区中像素点的预测结果。具体表达式如下:
P(xc2,yc2)=f(w21*P21+w22*P22)
其中,(xc2,yc2)表示第二分区中的像素点,P21表示第一预测结果,P22表示第二预测结果,依据上述权重的设置规则,w21可以设置为K1,w22对应为(1-K1);或者w21设置为K2,w22对应为(1-K2);或者w21可设置为不同于K1或者K2的权重,但w21和w21之和为1。
需要说明的是,对于第一分区和第二分区中的各个像素点都可以按照上述方式确定出对应的预测结果,进而得到第一分区的预测结果和第二分区的预测结果,第一分区的预测结果包括第一分区中所有像素点的预测结果,第二分区的预测结果包括第二分区中所有像素点的预测结果。
S704,将所述第一分区的预测结果和所述第二分区的预测结果确定为所述目标图像块的预测结果。
基于上述方式,将目标图像块的第一分区的预测结果和第二分区的预测结果组合,可以得到所有分区的像素点的预测结果,该预测结果就是目标图像块的预测结果。或者将两个分区的预测结果进行边缘融合得到目标图像块的预测结果。本申请实施例中,目标图像块可以采用第一划分模式中的任意一种划分模式得到预测块,例如几何划分模式,若第一划分模式为一种帧间预测模式,目标图像块的预测结果是指帧间预测结果,可以为帧间预测值。
需要说明的是,上述方案可以应用于编码端,当在解码端应用时,可以通过解析接收到的比特流得到目标图像块的目标划分模式参数。在一个实施例中,可以通过接收的比特流,解析预测模式参数。若预测模式参数指示使用第一划分模式(例如几何划分模式GPM),确定当前块的划分模式参数。例如,关于GPM参数的GPM分割索引merge_gpm_partition_idx。可选地,可以通过GPM分割索引merge_gpm_partition_idx确定对应的角度索引angleIdx,距离索引distanceIdx(也称为步长索引)。此外,还可以包括其他参数,例如,第一分区的运动矢量(MotionVector,MV)信息的索引信息和第二分区的mv信息的索引信息。可选地,划分模式的索引可发信于编码单元层语法元素中,例如被发信于合并数据中。示例性地,GPM分割索引merge_gpm_partition_idx被发信于编码单元层语法元素中。具体来说,GPM分割索引merge_gpm_partition_idx被发信于合并数据merge_data()中。除GPM分割索引merge_gpm_partition_idx之外,merge_gpm_idx0[x0][y0]和merge_gpm_idx1[x0][y0]也被发信于合并数据merge_data()中。
本申请实施例提供的图像处理方案,对于当前编码的图像块所使用的划分模式参数,可以依据率失真代价从多个划分模式分别对应的划分模式参数中选取,以尽可能地减少编码过程中产生的失真;对于分割线对目标图像块划分的两个分区,基于目标划分模式参数可为目标图像块中各个分区的像素点确定合适的分区权重,通过使用不同的分区权重以及预测结果集合来确定对应分区的预测结果,由于分区权重对不同分区和/或分区中不同位置的像素点予以不同的关注度,从而目标图像块的预测结果更加准确。
第四实施例
请参见图8b,图8b是根据第四实施例示出的一种图像处理方法的流程示意图,该实施例中的执行主体可以是一个计算机设备或者是多个计算机设备构成的集群,该计算机设备可以是智能终端(如前述移动终端100),也可以是服务器,此处,以本实施例中的执行主体为智能终端为例进行说明。
S801,基于第一划分模式参数集合确定目标图像块的目标划分模式参数。
此步骤具体实现方式可以参见前述第三实施例中的步骤S701,在此不做赘述。
S802,确定所述目标图像块的第一预测结果集合和第二预测结果集合。
在一个实施例中,可以:构建所述目标图像块的单向预测候选列表,基于所述单向预测候选列表获取第一运动矢量和第二运动矢量;基于第一运动矢量确定第一预测结果集合,以及基于所述第二运动矢量确定第二预测结果集合。其中,单向预测候选列表可以是合并候选列表,第一运动矢量是关于第一预测结果集合的单向预测运动矢量(例如下述的单向预测运动矢量1),第二运动矢量是关于第二预测结果集合的单向预测运动矢量(例如下述的单向预测运动矢量2)。
第一预测结果集合和第二预测结果集合是参考不同的参考帧的运动矢量得到的,第一预测结果集合包括多个预测结果,可以是对目标图像块进行单向预测,得到单向预测运动矢量之后进行运动补偿得到的预测值。对于第二预测结果,可采用相同的方式得到。可选地,通过第一分区的运动矢量和第二分区的运动矢量在合并候选列表中的位置可以确定对应分区的单向预测运动矢量。例如在GPM模式中,merge_gpm_idx0[x0][y0]表示第一分区(即,A分区)的运动矢量在合并候选列表中的位置,merge_gpm_idx1[x0][y0]表示第二分区(即,B分区)的运动矢量在合并候选列表中的位置。通过merge_gpm_idx0[x0][y0]和merge_gpm_idx1[x0][y0]可以确定对应分区的单向预测运动矢量。
在确定第一预测结果结合和第二预测结果集合之前,首先需要构建目标图像块的预测候选,下面先对单向预测候选列表的构建过程进行介绍。
如图8c所示,为本实施例提供的一种空域合并候选列表的相邻块位置示意图。空域合并候选列表最多可选出4个候选运动矢量,构造顺序为:左侧相邻块A1,上侧相邻块B1,右上侧相邻块B0,左下侧相邻块A0,左上侧相邻块B2,参考帧对应位置块co1为相邻块的运动矢量信息依次排列。需要说明的是,只有其他位置不可用时才考虑B2。在添加左下侧相邻块A0之后,需要进行冗余检测,以确保列表中不具有相同运动信息的候选。此外,合并候选列表中还可以添加历史参考块his,第一候选运动矢量、第二候选运动矢量的平均运动矢量avg,以及零运动矢量0。
如图8d为本实施例提供的一种合并候选列表的示意图。合并候选列表中包括图8d中所示的5个相邻块的运动信息,序号分别为0、1、2、3、4,每个相邻块包含双向预测运动矢量信息,即列表0list0和列表1list1分别对应的运动矢量信息。对于GPM预测模式来说,每个分区只使用单向预测模式。由于合并候选列表中每一项都可能是双向预测的运动矢量信息,因此需要从中得到单向预测运动矢量来供使用。令变量X=(m&0x01),其中,m=merge_gpm_idx0[xCb][yCb]。merge_gpm_idx0[x0][y0],表示第一分区的运动矢量在合并候选列表中的位置。&为位与运算,即取出m的最后一个比特位(类似于奇偶校验)。这样,优先使用X对应的参考列表中的参考帧对应的运动矢量信息,例如,如图8d中的阴影区域对应的选项。如果X对应的预测列表利用标志predFlagLXM为0,则列表LX(X为0或1)的运动矢量不可用(相邻块的运动矢量本身也可能是单向的)。此时,使用对向位置的运动矢量(与阴影区域水平对应的空白区域中表示的运动矢量),即X=1-X。
接着,获取关于第一预测结果集合和第二预测结果集合的运动矢量,获取过程如下:
第一预测结果集合和第二预测结果集合可以为预测值的集合,因此,第一预测结果集合和第二预测结果集合也可以分别称为第一预测值集合和第二预测值集合。一般来说,可以先获取第一预测值集合的运动矢量,再获取第二预测值集合的运动矢量。具体过程如下:
首先,令m=merge_gpm_idx0[xCb][yCb]。merge_gpm_idx0[xCb][yCb]为表示第一预测值集合的运动矢量在合并候选列表中的位置,因此,m为第一预测值集合的运动矢量在合并候选列表中的位置。merge_gpm_idx1[x0][y0],代表第二预测值集合的运动矢量在合并候选列表中的位置,第二预测值集合的运动矢量在合并候选列表中的位置可能因为第一预测值集合的运动矢量先选去了靠前位置的选项,而减小1。因此,令n=merge_gpm_idx1[xCb][yCb]+((merge_gpm_idxl[xCb][yCb]>=m)?1∶0),n表示的就是第二预测值集合的运动矢量在合并候选列表中的实际位置。
接下来,令M=mergeCandList[m],从合并候选列表中取出第m项用于第一预测值集合的运动矢量构造。具体来说,令mvA[0]=mvLXM[0],mvA[1]=mvLXM[1],refIdxA=refIdxLXM,predListFlagA=X。其中,mvLXM表示合并候选列表中位置m处的合并候选的运动矢量。mvA为第一预测值集合对应两个方向上的运动矢量,refIdxA为该运动矢量对应的参考帧,predListFlagA表示当前选用了该运动矢量备选项的哪个list中的分量。由上述内容可知,通过令predListFlagA=X来确定选取的单向预测运动矢量1(即,从mvA[0]和mvA[1]中确定单向预测运动矢量),其中变量X=(m&0x01)。
同理,令N=mergeCandList[n],从合并候选列表中取出第n项用于第二预测值集合的运动矢量构造。具体来说,令mvB[0]=mvLXN[0],mvB[1]=mvLXN[1],refIdxB=refIdxLXN,predListFlagB=X。其中,mvLXN表示合并候选列表中位置n处的合并候选的运动矢量。mvB为第二预测值集合和对应的两个方向上的运动矢量。
refIdxB为该运动矢量对应的参考帧,predListFlagB表示当前选用了该运动矢量备选项的哪个list中的分量。由上述内容可知,通过令predListFlagB=X来确定选取的单向预测运动矢量2(即,从mvB[0]和mvB[1]中确定单向预测运动矢量),其中变量X=(m&0x01)。在这过程中,同样优先使用如图8d中阴影区域对应的选项,如不可用,才使用对向的运动矢量。
在确定单向预测运动矢量1和单向预测运动矢量2之后,根据单向预测运动矢量1进行运动补偿,可以得到第一预测结果集合,并且根据单向预测运动矢量2进行运动补偿,可以得到第二预测结果集合。
S803,基于目标划分模式参数,确定分区权重。
S804,基于所述分区权重、所述第一预测结果集合以及所述第二预测结果集合中的至少一项,确定所述第一分区的预测结果和所述第二分区的预测结果。
S805,将所述第一分区的预测结果和所述第二分区的预测结果确定为所述目标图像块的预测结果。
上述步骤S803~S805可以参见图7对应的实施例中步骤S702~S704介绍的相应内容,在此不做赘述。
本申请实施例提供的图像处理方案,对于当前编码的图像块所使用的划分模式参数,可以依据率失真代价从多个划分模式分别对应的划分模式参数中选取,以尽可能地减少编码过程中产生的失真;对于分割线对目标图像块划分的两个分区,可以通过合并候选列表对目标图像块的单向预测运动矢量进行估计,进而得到精确地预测结果结合,此外,基于目标划分模式参数可为目标图像块中各个分区的像素点确定合适的分区权重,基于科学设置的分区权重以及精确的预测结果集合,可以准确地确定对应分区的预测结果,从而目标图像块的预测结果更加准确。
请参见图9,图9是本申请实施例示出的一种图像处理装置的结构示意图,该图像处理装置可以是运行于服务器中的一个计算机程序(包括程序代码),例如图像处理装置为一个应用软件;该装置可以用于执行本申请实施例提供的方法中的相应步骤。该图像处理装置900包括:确定模块901、获取模块902、更新模块903以及发送模块904。
确定模块901,用于基于第一划分模式参数集合确定目标图像块的目标划分模式参数;
所述确定模块901,还用于基于所述目标划分模式参数确定所述目标图像块的预测结果。
可选地,所述第一划分模式参数集合包括对应于一条或多条分割线的划分模式参数。
可选地,包括以下至少一种:所述划分模式参数基于已编码图像对所述分割线的使用情况确定;所述多条分割线中的相邻分割线之间形成的夹角的大小不相等。
可选地,所述划分模式参数是基于已编码图像对所述分割线的使用情况,对目标方向的分割线与所述目标方向的分割线的相邻分割线之间的角度间隔进行调整确定的。
可选地,所述目标方向的分割线与相邻分割线之间的角度间隔小于参考方向的分割线与相邻分割线之间的角度间隔;和/或,所述目标方向的分割线的应用概率大于所述参考方向的分割线的应用概率。
可选地,包括以下至少一种:所述划分模式参数包括分割线对应的分割索引、角度索引以及距离索引中的至少一项;所述第一划分模式参数集合为表示所述分割索引、所述角度索引以及所述距离索引之间映射关系的参数映射表。
在一个实施例中,所述获取模块902,用于获取已编码图像对所述分割线的使用情况;所述确定模块901,用于基于所述使用情况确定所述分割线的应用概率;所述更新模块903,用于基于所述应用概率更新所述参数映射表。
在一个实施例中,所述确定模块901,用于:响应于所述已编码图像的数量达到预设阈值,获取所述第一划分模式的使用次数;基于使用记录参数以及所述使用次数确定各条分割线的应用概率。
在一个实施例中,所述更新模块903,具体用于:基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表;基于所述更新后的角度映射表更新所述参数映射表中的角度索引和/或距离索引。
可选地,所述角度映射表用于表示查询索引和角度参数之间的映射关系,所述查询索引包括所述分割索引或所述角度索引,所述角度索引与所述角度参数之间存在关联关系。
在一个实施例中,所述更新模块903,具体用于:基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表。
可选地,所述第一查询索引为应用概率最高的分割线对应的查询索引;所述第二查询索引为应用概率次高的分割线对应的查询索引,或者为所述第一查询索引的相邻查询索引。
在一个实施例中,所述更新模块903,具体用于:基于所述第一查询索引对应的角度参数和所述第二查询索引对应的角度参数确定目标角度参数;基于所述目标角度参数对角度映射表进行更新,得到更新后的角度映射表。
在另一个实施例中,所述第二查询索引为所述第一查询索引的相邻查询索引,所述更新模块903,具体用于:按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表。
在一个实施例中,所述更新模块903,具体用于:响应于所述相邻查询索引对应的角度参数大于所述第一查询索引对应的角度参数,减小所述相邻查询索引对应的角度参数,得到更新后的角度映射表;和/或,响应于所述相邻查询索引对应的角度参数小于所述第一查询索引对应的角度参数,增大所述相邻查询索引对应的角度参数,得到更新后的角度映射表。
可选地,所述相邻查询索引对应的调整后的角度参数与所述第一查询索引对应的角度参数之间的差值在预设范围内;和/或,所述预设范围是基于所述第一查询索引对应的分割线的应用概率确定的。
在一个实施例中,所述发送模块904,用于:向解码端发送比特流,所述比特流包括更新后的参数映射表的指示信息,所述指示信息用于指示所述解码端利用所述更新后的参数映射表确定所述目标图像块的预测结果。
在一个实施例中,所述确定模块901,还用于:基于目标图像块的参数,利用至少一种预测模式对所述目标图像块进行预测编码,确定每种预测模式对应的率失真代价;当率失真代价最小的预测模式为第一划分模式时,执行所述基于第一划分模式参数集合确定目标图像块的目标划分模式参数的步骤。
在一个实施例中,所述第一划分模式包括至少一种划分模式,所述确定模块901,具体用于:确定所述第一划分模式包括的每种划分模式应用于所述目标图像块的率失真代价;将率失真代价最小的划分模式确定为所述目标图像块的目标划分模式;从所述第一划分模式参数集合中确定所述目标划分模式对应的模式参数,并将所述目标划分模式对应的模式参数确定为所述目标图像块的目标划分模式参数。
在一个实施例中,所述目标图像块包括第一分区和第二分区,所述第一分区和所述第二分区是由分割线对所述目标图像块划分得到的两个图像区域,所述确定模块901,具体还用于:基于所述目标划分模式参数,确定分区权重;基于所述分区权重、第一预测结果集合以及第二预测结果集合中的至少一项,确定所述第一分区的预测结果和所述第二分区的预测结果;将所述第一分区的预测结果和所述第二分区的预测结果确定为所述目标图像块的预测结果。可选地,在基于目标划分模式参数,确定分区权重之前,还可以:确定所述目标图像块的第一预测结果集合和第二预测结果集合。
在一个实施例中,所述分区权重包括所述第一分区对应的第一权重和所述第二分区对应的第二权重,所述第一权重或者所述第二权重是基于所述目标图像块包括的像素点与分割线之间的距离确定的,确定模块901,还用于:基于所述第一权重、所述第二权重、所述目标图像块包括的像素点在第一预测结果集合中的第一预测结果以及所述像素点在第二预测结果集合中的第二预测结果中的至少一项,确定所述像素点的预测结果。
可以理解的是,本实施例所描述的图像处理装置的各功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。
本申请实施例还提供一种图像处理方法,可应用于智能终端,所述方法包括以下步骤:
S10:根据第一预设策略确定第一划分模式;
S20:基于与第一划分模式相关的第二预设策略确定目标图像块的目标划分模式参数;
S30:基于所述目标划分模式参数确定所述目标图像块的预测结果。
在一个实施例中,所述S10步骤包括:基于目标图像块的参数,利用至少一种预测模式对所述目标图像块进行预测编码,确定每种预测模式对应的率失真代价,将率失真代价最小的预测模式确定为第一划分模式。
在一个实施例中,所述S20步骤包括:从所述第一划分模式参数集合中确定所述目标划分模式对应的模式参数,并将所述目标划分模式对应的模式参数确定为所述目标图像块的目标划分模式参数。
在一个实施例中,所述目标图像块包括第一分区和第二分区,所述第一分区和所述第二分区是由分割线对所述目标图像块划分得到的两个图像区域,所述S30步骤,包括:基于所述目标划分模式参数确定所述目标图像块的第一预测结果集合和第二预测结果集合;基于分区权重、所述第一预测结果集合以及所述第二预测结果集合中的至少一项,确定所述第一分区的预测结果和所述第二分区的预测结果;将所述第一分区的预测结果和所述第二分区的预测结果确定为所述目标图像块的预测结果。
在一个实施例中,所述分区权重包括所述第一分区对应的第一权重和所述第二分区对应的第二权重,所述第一权重或者所述第二权重是基于所述目标图像块包括的像素点与分割线之间的距离确定的,所述方法还包括:基于所述第一权重、所述第二权重、所述目标图像块包括的像素点在第一预测结果集合中的第一预测结果以及所述像素点在第二预测结果集合中的第二预测结果中的至少一项,确定所述像素点的预测结果。
可选地,所述第一划分参数集合包括对应于一条或多条分割线的划分模式参数。
可选地,所述划分模式参数基于已编码图像对所述分割线的使用情况确定。
可选地,所述多条分割线中的相邻分割线之间形成的夹角的大小不相等。
可选地,所述划分模式参数是基于已编码图像对所述分割线的使用情况,对目标方向的分割线与所述目标方向的分割线的相邻分割线之间的角度间隔进行调整确定的。
可选地,所述目标方向的分割线与相邻分割线之间的角度间隔小于参考方向的分割线与相邻分割线之间的角度间隔。
可选地,所述目标方向的分割线的应用概率大于所述参考方向的分割线的应用概率。
可选地,所述划分模式参数包括分割线对应的分割索引、角度索引以及距离索引中的至少一项。
可选地,所述第一划分模式参数集合为表示所述分割索引、所述角度索引以及所述距离索引之间映射关系的参数映射表。
在一个实施例中,所述方法还包括:获取已编码图像对所述分割线的使用情况;基于所述使用情况确定所述分割线的应用概率;基于所述应用概率更新所述参数映射表。
在一个实施例中,所述基于所述使用情况确定所述分割线的应用概率,包括:响应于所述已编码图像的数量达到预设阈值,获取所述第一划分模式的使用次数;基于使用记录参数以及所述使用次数确定各条分割线的应用概率。
在一个实施例中,所述基于所述应用概率更新所述参数映射表,包括:基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表;基于所述更新后的角度映射表更新所述参数映射表中的角度索引和/或距离索引。
在一个实施例中,所述基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表,包括:基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表。
在一个实施例中,所述基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表,包括:基于所述第一查询索引对应的角度参数和所述第二查询索引对应的角度参数确定目标角度参数;基于所述目标角度参数对角度映射表进行更新,得到更新后的角度映射表。
在一个实施例中,所述第二查询索引为所述第一查询索引的相邻查询索引,所述基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表,包括:按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表。
在一个实施例中,所述按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表,包括:响应于所述相邻查询索引对应的角度参数大于所述第一查询索引对应的角度参数,减小所述相邻查询索引对应的角度参数,得到更新后的角度映射表;和/或,响应于所述相邻查询索引对应的角度参数小于所述第一查询索引对应的角度参数,增大所述相邻查询索引对应的角度参数,得到更新后的角度映射表。
可选地,所述相邻查询索引对应的调整后的角度参数与所述第一查询索引对应的角度参数之间的差值在预设范围内;和/或,所述预设范围是基于所述第一查询索引对应的分割线的应用概率确定的。
在一个实施例中,所述基于所述应用概率更新所述参数映射表之后,所述方法还包括:
向解码端发送比特流,所述比特流包括更新后的参数映射表的指示信息,所述指示信息用于指示所述解码端利用所述更新后的参数映射表确定所述目标图像块的预测结果。
可以理解的是,本实施例所描述的图像处理方法,其具体实现过程可以参照上述其他方法实施例的相关描述,此处不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。
本申请实施例还提供一种图像处理方法,可应用于智能终端,所述方法包括以下步骤:
S100:根据第一预设策略确定第一划分模式及基于第二预设策略确定目标图像块的目标划分模式参数;
S200:基于所述目标划分模式参数确定所述目标图像块的预测结果。
在一个实施例中,所述S100步骤包括:基于目标图像块的参数,利用至少一种预测模式对所述目标图像块进行预测编码,确定每种预测模式对应的率失真代价,将率失真代价最小的预测模式确定为第一划分模式。从所述第一划分模式参数集合中确定所述目标划分模式对应的模式参数,并将所述目标划分模式对应的模式参数确定为所述目标图像块的目标划分模式参数。
在一个实施例中,所述目标图像块包括第一分区和第二分区,所述第一分区和所述第二分区是由分割线对所述目标图像块划分得到的两个图像区域,所述S200步骤,包括:基于所述目标划分模式参数确定所述目标图像块的第一预测结果集合和第二预测结果集合;基于分区权重、所述第一预测结果集合以及所述第二预测结果集合中的至少一项,确定所述第一分区的预测结果和所述第二分区的预测结果;将所述第一分区的预测结果和所述第二分区的预测结果确定为所述目标图像块的预测结果。
在一个实施例中,所述分区权重包括所述第一分区对应的第一权重和所述第二分区对应的第二权重,所述第一权重或者所述第二权重是基于所述目标图像块包括的像素点与分割线之间的距离确定的,所述方法还包括:基于所述第一权重、所述第二权重、所述目标图像块包括的像素点在第一预测结果集合中的第一预测结果以及所述像素点在第二预测结果集合中的第二预测结果中的至少一项,确定所述像素点的预测结果。
可选地,所述第一划分参数集合包括对应于一条或多条分割线的划分模式参数。
可选地,所述划分模式参数基于已编码图像对所述分割线的使用情况确定。
可选地,所述多条分割线中的相邻分割线之间形成的夹角的大小不相等。
可选地,所述划分模式参数是基于已编码图像对所述分割线的使用情况,对目标方向的分割线与所述目标方向的分割线的相邻分割线之间的角度间隔进行调整确定的。
可选地,所述目标方向的分割线与相邻分割线之间的角度间隔小于参考方向的分割线与相邻分割线之间的角度间隔。
可选地,所述目标方向的分割线的应用概率大于所述参考方向的分割线的应用概率。
可选地,所述划分模式参数包括分割线对应的分割索引、角度索引以及距离索引中的至少一项。
可选地,所述第一划分模式参数集合为表示所述分割索引、所述角度索引以及所述距离索引之间映射关系的参数映射表。
在一个实施例中,所述方法还包括:获取已编码图像对所述分割线的使用情况;基于所述使用情况确定所述分割线 的应用概率;基于所述应用概率更新所述参数映射表。
在一个实施例中,所述基于所述使用情况确定所述分割线的应用概率,包括:响应于所述已编码图像的数量达到预设阈值,获取所述第一划分模式的使用次数;基于使用记录参数以及所述使用次数确定各条分割线的应用概率。
在一个实施例中,所述基于所述应用概率更新所述参数映射表,包括:基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表;基于所述更新后的角度映射表更新所述参数映射表中的角度索引和/或距离索引。
在一个实施例中,所述基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表,包括:基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表。
在一个实施例中,所述基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表,包括:基于所述第一查询索引对应的角度参数和所述第二查询索引对应的角度参数确定目标角度参数;基于所述目标角度参数对角度映射表进行更新,得到更新后的角度映射表。
在一个实施例中,所述第二查询索引为所述第一查询索引的相邻查询索引,所述基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表,包括:按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表。
在一个实施例中,所述按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表,包括:响应于所述相邻查询索引对应的角度参数大于所述第一查询索引对应的角度参数,减小所述相邻查询索引对应的角度参数,得到更新后的角度映射表;和/或,响应于所述相邻查询索引对应的角度参数小于所述第一查询索引对应的角度参数,增大所述相邻查询索引对应的角度参数,得到更新后的角度映射表。
可选地,所述相邻查询索引对应的调整后的角度参数与所述第一查询索引对应的角度参数之间的差值在预设范围内;和/或,所述预设范围是基于所述第一查询索引对应的分割线的应用概率确定的。
在一个实施例中,所述基于所述应用概率更新所述参数映射表之后,所述方法还包括:
向解码端发送比特流,所述比特流包括更新后的参数映射表的指示信息,所述指示信息用于指示所述解码端利用所述更新后的参数映射表确定所述目标图像块的预测结果。
可以理解的是,本实施例所描述的图像处理方法,其具体实现过程可以参照上述其他方法实施例的相关描述,此处不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。
本申请实施例还提供一种智能终端,智能终端包括存储器、处理器,存储器上存储有图像处理程序,该图像处理程序被处理器执行时实现上述任一实施例中的图像处理方法的步骤。该智能终端可以是如图1所示的移动终端100。
在一可行的实施例中,如图1所示的移动终端100的处理器110可以用于调用存储器109中存储的图像处理程序,以执行如下操作:S1:基于第一划分模式参数集合确定目标图像块的目标划分模式参数;S2:基于所述目标划分模式参数确定所述目标图像块的预测结果。
可选地,所述第一划分模式参数集合包括对应于一条或多条分割线的划分模式参数。
可选地,包括以下至少一种:所述划分模式参数基于已编码图像对所述分割线的使用情况确定;所述多条分割线中的相邻分割线之间形成的夹角的大小不相等。
可选地,所述划分模式参数是基于已编码图像对所述分割线的使用情况,对目标方向的分割线与所述目标方向的分割线的相邻分割线之间的角度间隔进行调整确定的。
可选地,所述目标方向的分割线与相邻分割线之间的角度间隔小于参考方向的分割线与相邻分割线之间的角度间隔;和/或,所述目标方向的分割线的应用概率大于所述参考方向的分割线的应用概率。
可选地,包括以下至少一种:所述划分模式参数包括分割线对应的分割索引、角度索引以及距离索引中的至少一项;所述第一划分模式参数集合为表示所述分割索引、所述角度索引以及所述距离索引之间映射关系的参数映射表。
在一个实施例中,所述处理器110,用于获取已编码图像对所述分割线的使用情况;基于所述使用情况确定所述分割线的应用概率;基于所述应用概率更新所述参数映射表。
在一个实施例中,所述处理器110,用于:响应于所述已编码图像的数量达到预设阈值,获取所述第一划分模式的使用次数;基于使用记录参数以及所述使用次数确定各条分割线的应用概率。
在一个实施例中,所述处理器110,具体用于:基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表;基于所述更新后的角度映射表更新所述参数映射表中的角度索引和/或距离索引。
可选地,所述角度映射表用于表示查询索引和角度参数之间的映射关系,所述查询索引包括所述分割索引或所述角度索引,所述角度索引与所述角度参数之间存在关联关系。
在一个实施例中,所述处理器110,具体用于:基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表。
可选地,所述第一查询索引为应用概率最高的分割线对应的查询索引;所述第二查询索引为应用概率次高的分割线对应的查询索引,或者为所述第一查询索引的相邻查询索引。
在一个实施例中,所述处理器110,具体用于:基于所述第一查询索引对应的角度参数和所述第二查询索引对应的角度参数确定目标角度参数;基于所述目标角度参数对角度映射表进行更新,得到更新后的角度映射表。
在另一个实施例中,所述第二查询索引为所述第一查询索引的相邻查询索引,所述处理器110,具体用于:按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表。
在一个实施例中,所述处理器110,具体用于:响应于所述相邻查询索引对应的角度参数大于所述第一查询索引对应的角度参数,减小所述相邻查询索引对应的角度参数,得到更新后的角度映射表;和/或,响应于所述相邻查询索引对应的角度参数小于所述第一查询索引对应的角度参数,增大所述相邻查询索引对应的角度参数,得到更新后的角度映射表。
可选地,所述相邻查询索引对应的调整后的角度参数与所述第一查询索引对应的角度参数之间的差值在预设范围内;和/或,所述预设范围是基于所述第一查询索引对应的分割线的应用概率确定的。
在一个实施例中,所述处理器110,还用于:向解码端发送比特流,所述比特流包括更新后的参数映射表的指示信 息,所述指示信息用于指示所述解码端利用所述更新后的参数映射表确定所述目标图像块的预测结果。
在一个实施例中,所述处理器110,还用于:基于目标图像块的参数,利用至少一种预测模式对所述目标图像块进行预测编码,确定每种预测模式对应的率失真代价;当率失真代价最小的预测模式为第一划分模式时,执行所述S1步骤。
在一个实施例中,所述第一划分模式包括至少一种划分模式,所述处理器110,具体用于:确定所述第一划分模式包括的每种划分模式应用于所述目标图像块的率失真代价;将率失真代价最小的划分模式确定为所述目标图像块的目标划分模式;从所述第一划分模式参数集合中确定所述目标划分模式对应的模式参数,并将所述目标划分模式对应的模式参数确定为所述目标图像块的目标划分模式参数。
在一个实施例中,所述目标图像块包括第一分区和第二分区,所述第一分区和所述第二分区是由分割线对所述目标图像块划分得到的两个图像区域,所述处理器110,具体还用于:基于所述目标划分模式参数,分区权重;基于所述分区权重、第一预测结果集合以及第二预测结果集合中的至少一项,确定所述第一分区的预测结果和所述第二分区的预测结果;将所述第一分区的预测结果和所述第二分区的预测结果确定为所述目标图像块的预测结果。可选地,在基于目标划分模式参数,确定分区权重之前,还可以:确定所述目标图像块的第一预测结果集合和第二预测结果集合。
在一个实施例中,所述分区权重包括所述第一分区对应的第一权重和所述第二分区对应的第二权重,所述第一权重或者所述第二权重是基于所述目标图像块包括的像素点与分割线之间的距离确定的,处理器110,还用于:基于所述第一权重、所述第二权重、所述目标图像块包括的像素点在第一预测结果集合中的第一预测结果以及所述像素点在第二预测结果集合中的第二预测结果中的至少一项,确定所述像素点的预测结果。
本申请实施例还提供一种智能终端,智能终端包括存储器、处理器,存储器上存储有图像处理程序,图像处理程序被处理器执行时实现上述任一实施例中的图像处理方法的步骤。
本申请实施例还提供一种计算机存储介质,计算机存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述任一实施例中的图像处理方法的步骤。
在本申请实施例提供的智能终端和计算机存储介质的实施例中,可以包含任一上述图像处理方法实施例的全部技术特征,说明书拓展和解释内容与上述方法的各实施例基本相同,在此不再做赘述。
图10为本申请提供的一种控制器140的硬件结构示意图。该控制器140包括:存储器1401和处理器1402,存储器1401用于存储程序指令,处理器1402用于调用存储器1401中的程序指令执行上述方法实施例一中控制器所执行的步骤,其实现原理以及有益效果类似,此处不再进行赘述。
可选地,上述控制器还包括通信接口1403,该通信接口1403可以通过总线1404与处理器1402连接。处理器1402可以控制通信接口1403来实现控制器140的接收和发送的功能。
图11为本申请提供的一种网络节点150的硬件结构示意图。该网络节点150包括:存储器1501和处理器1502,存储器1501用于存储程序指令,处理器1502用于调用存储器1501中的程序指令执行上述方法实施例一中所执行的步骤,其实现原理以及有益效果类似,此处不再进行赘述。
可选地,上述控制器还包括通信接口1503,该通信接口1503可以通过总线1504与处理器1502连接。处理器1502可以控制通信接口1503来实现网络节点150的接收和发送的功能。
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(英文:processor)执行本申请各个实施例方法的部分步骤。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机存储介质中,或者从一个计算机存储介质向另一个计算机存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘solid state disk,SSD)等。
本申请实施例还提供一种计算机程序产品,计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如上各种可能的实施方式中的方法。
本申请实施例还提供一种芯片,包括存储器和处理器,存储器用于存储计算机程序,处理器用于从存储器中调用并运行计算机程序,使得安装有芯片的设备执行如上各种可能的实施方式中的方法。
可以理解,上述场景仅是作为示例,并不构成对于本申请实施例提供的技术方案的应用场景的限定,本申请的技术方案还可应用于其他场景。例如,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本申请实施例设备中的单元可以根据实际需要进行合并、划分和删减。
在本申请中,对于相同或相似的术语概念、技术方案和/或应用场景描述,一般只在第一次出现时进行详细描述,后面再重复出现时,为了简洁,一般未再重复阐述,在理解本申请技术方案等内容时,对于在后未详细描述的相同或相似的术语概念、技术方案和/或应用场景描述等,可以参考其之前的相关详细描述。
在本申请中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本申请技术方案的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的 组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本申请记载的范围。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,被控终端,或者网络设备等)执行本申请每个实施例的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络,或者其他可编程装置。计算机指令可以存储在计算机存储介质中,或者从一个计算机存储介质向另一个计算机存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、存储盘、磁带)、光介质(例如,DVD),或者半导体介质(例如固态存储盘Solid State Disk(SSD))等。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种图像处理方法,其中,包括以下步骤:
    S1:基于第一划分模式参数集合确定目标图像块的目标划分模式参数;
    S2:基于所述目标划分模式参数确定所述目标图像块的预测结果。
  2. 如权利要求1所述的方法,其中,所述第一划分模式参数集合包括对应于一条或多条分割线的划分模式参数,所述划分模式参数包括分割索引、角度索引、距离索引以及预测类型中的至少一个。
  3. 如权利要求1所述的方法,其中,所述第一划分模式参数集合是基于所述第一划分模式参数集合的使用情况来调整的。
  4. 如权利要求1所述的方法,其中,所述第一划分模式参数集合中的至少一个元素被调整以形成新的参数映射表以用于表示所述第一划分模式参数集合。
  5. 如权利要求4所述的方法,其中,通过增加、删除、重排序、或改变参数映射表的至少一个元素来形成所述新的参数映射表。
  6. 如权利要求1所述的方法,其中,所述方法还包括:
    获取已编码图像对所述分割线的使用情况;
    基于所述使用情况确定所述分割线的应用概率;
    基于所述应用概率更新所述参数映射表。
  7. 如权利要求6所述的方法,其中,所述基于所述使用情况确定所述分割线的应用概率,包括:
    响应于所述已编码图像的数量达到预设阈值,获取第一划分模式的使用次数;
    基于使用记录参数以及所述使用次数确定各条分割线的应用概率;所述使用记录参数用于记录划分模式对应的每条分割线被己编码图像使用的总次数。
  8. 如权利要求6所述的方法,其中,所述基于所述应用概率更新所述参数映射表,包括:
    基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表;
    基于所述更新后的角度映射表更新所述参数映射表中的角度索引和/或距离索引。
  9. 如权利要求8所述的方法,其中,所述基于各条分割线的应用概率对角度映射表进行更新,得到更新后的角度映射表,包括:
    基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表。
  10. 如权利要求9所述的方法,其中,所述基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表,包括:
    基于第一查询索引对应的角度参数和第二查询索引对应的角度参数确定目标角度参数;
    基于所述目标角度参数对角度映射表进行更新,得到更新后的角度映射表。
  11. 如权利要求9所述的方法,其中,所述第二查询索引为所述第一查询索引的相邻查询索引,所述基于第一查询索引对应的角度参数和/或第二查询索引对应的角度参数,对角度映射表进行更新,得到更新后的角度映射表,包括:
    按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表。
  12. 如权利要求11所述的方法,其中,所述按照预设调整规则调整角度映射表中所述第二查询索引对应的角度参数,得到更新后的角度映射表,包括:
    响应于所述相邻查询索引对应的角度参数大于所述第一查询索引对应的角度参数,减小所述相邻查询索引对应的角度参数,得到更新后的角度映射表;和/或,
    响应于所述相邻查询索引对应的角度参数小于所述第一查询索引对应的角度参数,增大所述相邻查询索引对应的角度参数,得到更新后的角度映射表。
  13. 如权利要求12所述的方法,其中,所述相邻查询索引对应的调整后的角度参数与所述第一查询索引对应的角度参数之间的差值在预设范围内;所述预设范围是基于所述第一查询索引对应的分割线的应用概率确定的。
  14. 如权利要求6至13中任一项所述的方法,其中,所述基于所述应用概率更新所述参数映射表之后,所述方法还包括:
    向解码端发送比特流,所述比特流包括更新后的参数映射表的指示信息,所述指示信息用于指示所述解码端利用所 述更新后的参数映射表确定所述目标图像块的预测结果。
  15. 如权利要求1至13中任一项所述的方法,其中,所述S1步骤之前,所述方法还包括:
    基于目标图像块的参数,利用至少一种预测模式对所述目标图像块进行预测编码,确定每种预测模式对应的率失真代价;
    当率失真代价最小的预测模式为第一划分模式时,执行所述S1步骤。
  16. 如权利要求1至13中任一项所述的方法,其中,所述第一划分模式包括至少一种划分模式,所述S1步骤,包括:
    确定所述第一划分模式包括的每种划分模式应用于所述目标图像块的率失真代价;
    将率失真代价最小的划分模式确定为所述目标图像块的目标划分模式;
    从所述第一划分模式参数集合中确定所述目标划分模式对应的模式参数,并将所述目标划分模式对应的模式参数确定为所述目标图像块的目标划分模式参数。
  17. 如权利要求1至13中任一项所述的方法,其中,所述目标图像块包括第一分区和第二分区,所述第一分区和所述第二分区是由分割线对所述目标图像块划分得到的两个图像区域,所述S2步骤,包括:
    基于目标划分模式参数,确定分区权重;
    确定所述目标图像块的第一预测结果集合和第二预测结果集合,所述第一预测结果集合和所述第二预测结果集合是参考不同的参考帧的运动矢量得到的;
    基于所述分区权重、所述第一预测结果集合以及所述第二预测结果集合中的至少一项,确定所述第一分区的预测结果和所述第二分区的预测结果;
    将所述第一分区的预测结果和所述第二分区的预测结果确定为所述目标图像块的预测结果。
  18. 如权利要求17所述的方法,其中,所述分区权重包括所述第一分区对应的第一权重和所述第二分区对应的第二权重,所述第一权重或者所述第二权重是基于所述目标图像块包括的像素点与分割线之间的距离确定的,所述方法还包括:
    基于所述第一权重、所述第二权重、所述目标图像块包括的像素点在所述第一预测结果集合中的第一预测结果以及所述像素点在所述第二预测结果集合中的第二预测结果中的至少一项,确定所述像素点的预测结果。
  19. 一种智能终端,其中,所述智能终端包括:存储器、处理器,其中,所述存储器上存储有图像处理程序,所述图像处理程序被所述处理器执行时实现如权利要求1所述的图像处理方法的步骤。
  20. 一种计算机存储介质,其中,所述存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1所述的图像处理方法的步骤。
PCT/CN2023/078559 2022-03-29 2023-02-27 图像处理方法、智能终端及存储介质 WO2023185351A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210317793.4 2022-03-29
CN202210317793.4A CN114422781B (zh) 2022-03-29 2022-03-29 图像处理方法、智能终端及存储介质

Publications (1)

Publication Number Publication Date
WO2023185351A1 true WO2023185351A1 (zh) 2023-10-05

Family

ID=81263240

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/078559 WO2023185351A1 (zh) 2022-03-29 2023-02-27 图像处理方法、智能终端及存储介质

Country Status (2)

Country Link
CN (1) CN114422781B (zh)
WO (1) WO2023185351A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117176959A (zh) * 2023-11-02 2023-12-05 深圳传音控股股份有限公司 处理方法、处理设备及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422781B (zh) * 2022-03-29 2022-07-12 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质
CN114598880B (zh) * 2022-05-07 2022-09-16 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质
CN115379214B (zh) * 2022-10-26 2023-05-23 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020184979A1 (ko) * 2019-03-11 2020-09-17 주식회사 엑스리스 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2021196235A1 (zh) * 2020-04-03 2021-10-07 Oppo广东移动通信有限公司 帧间预测方法、编码器、解码器及存储介质
WO2022019613A1 (ko) * 2020-07-20 2022-01-27 한국전자통신연구원 기하학적 분할을 사용하는 영상 부호화/복호화를 위한 방법, 장치 및 기록 매체
CN114422781A (zh) * 2022-03-29 2022-04-29 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2464116A1 (en) * 2010-12-13 2012-06-13 Thomson Licensing Method and device for video encoding using geometry adaptive block partitioning
CN102611884B (zh) * 2011-01-19 2014-07-09 华为技术有限公司 图像编解码方法及编解码设备
EP3632106A1 (en) * 2017-06-30 2020-04-08 Huawei Technologies Co., Ltd. Encoder, decoder, computer program and computer program product for processing a frame of a video sequence
CN109905702B (zh) * 2017-12-11 2021-12-21 腾讯科技(深圳)有限公司 一种视频编码中参考信息确定的方法、装置及存储介质
US11570434B2 (en) * 2019-08-23 2023-01-31 Qualcomm Incorporated Geometric partition mode with harmonized motion field storage and motion compensation
EP4022906A4 (en) * 2019-08-30 2022-11-09 Huawei Technologies Co., Ltd. HIGH LEVEL SIGNALING METHOD AND APPARATUS FOR NON-RECTANGULAR PARTITIONING MODES
US11317094B2 (en) * 2019-12-24 2022-04-26 Tencent America LLC Method and apparatus for video coding using geometric partitioning mode
WO2021196228A1 (zh) * 2020-04-03 2021-10-07 Oppo广东移动通信有限公司 帧间预测方法、编码器、解码器以及存储介质
WO2021253373A1 (en) * 2020-06-19 2021-12-23 Alibaba Group Holding Limited Probabilistic geometric partitioning in video coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020184979A1 (ko) * 2019-03-11 2020-09-17 주식회사 엑스리스 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2021196235A1 (zh) * 2020-04-03 2021-10-07 Oppo广东移动通信有限公司 帧间预测方法、编码器、解码器及存储介质
WO2022019613A1 (ko) * 2020-07-20 2022-01-27 한국전자통신연구원 기하학적 분할을 사용하는 영상 부호화/복호화를 위한 방법, 장치 및 기록 매체
CN114422781A (zh) * 2022-03-29 2022-04-29 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117176959A (zh) * 2023-11-02 2023-12-05 深圳传音控股股份有限公司 处理方法、处理设备及存储介质
CN117176959B (zh) * 2023-11-02 2024-04-09 深圳传音控股股份有限公司 处理方法、处理设备及存储介质

Also Published As

Publication number Publication date
CN114422781A (zh) 2022-04-29
CN114422781B (zh) 2022-07-12

Similar Documents

Publication Publication Date Title
WO2023185351A1 (zh) 图像处理方法、智能终端及存储介质
WO2023216866A1 (zh) 图像处理方法、智能终端及存储介质
CN109919087B (zh) 一种视频分类的方法、模型训练的方法及装置
US10986332B2 (en) Prediction mode selection method, video encoding device, and storage medium
WO2024012054A1 (zh) 图像处理方法、智能终端及存储介质
CN111161316A (zh) 目标物体跟踪方法、装置及终端设备
CN108401501A (zh) 数据传输方法、装置及无人机
CN115834897B (zh) 处理方法、处理设备及存储介质
CN115988206B (zh) 图像处理方法、处理设备及存储介质
CN116668704B (zh) 处理方法、处理设备及存储介质
WO2024098873A1 (zh) 处理方法、处理设备及存储介质
WO2024087604A1 (zh) 图像处理方法、智能终端及存储介质
CN116456102B (zh) 图像处理方法、处理设备及存储介质
CN113596231A (zh) 一种投屏显示控制方法、设备及计算机可读存储介质
WO2023108444A1 (zh) 图像处理方法、智能终端及存储介质
EP3618445A1 (en) Method for performing motion estimation, apparatus, device and storage medium
CN114064175A (zh) 智能终端控制方法、智能终端及存储介质
CN114143467A (zh) 一种基于自动对焦变焦的拍摄方法、移动终端及存储介质
CN114723645A (zh) 图像处理方法、智能终端及存储介质
CN116137735A (zh) 终端驻网方法、智能终端及存储介质
CN115955565B (zh) 处理方法、处理设备及存储介质
CN114125151B (zh) 图像处理方法、移动终端及存储介质
CN117176959B (zh) 处理方法、处理设备及存储介质
WO2023019567A1 (zh) 图像处理方法、移动终端及存储介质
WO2023102935A1 (zh) 图像数据处理方法、智能终端及存储介质

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

Country of ref document: EP

Kind code of ref document: A1