Image processing method and device, electronic equipment and storage medium

By using the detection template in image processing to determine the high-frequency feature components, and dynamically adjusting the image processing algorithm, the poor visual effects problems caused by different frame types in image display are solved, and better picture quality and visual effects are achieved.

CN119854501APending Publication Date: 2025-04-18BEIJING ESWIN COMPUTING TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411865367.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In image display, the information content of different frame types is inconsistent due to different compression ratios. After image quality processing, the sharpness difference becomes larger, resulting in poor visual effects.

Method used

By obtaining the current picture frame, multiple detection templates of preset size are determined, high-frequency feature components are determined based on these templates, and frame types are determined based on the high-frequency feature components of the previous n picture frames, and image processing algorithms are dynamically adjusted.

Benefits of technology

Accurately distinguish different frame types, reduce the adverse visual effects brought by image processing algorithms, and improve picture quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854501A_ABST
    Figure CN119854501A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a current picture frame to be processed; determining a plurality of detection templates with preset sizes of the current picture frame; determining a high-frequency characteristic component of the current picture frame according to each detection template; determining the frame type of the current picture frame according to the high-frequency feature component of the current picture frame and the high-frequency feature components of the first n picture frames of the current picture frame; wherein n is a positive integer; and adjusting an image processing algorithm based on the frame type, and processing the current picture frame through the adjusted image processing algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to an image processing method and device, an electronic device, and a storage medium. Background Art

[0002] Image compression is widely used in the field of video transmission because it utilizes the temporal and spatial correlations of images to remove a large amount of redundant information in the image, greatly saving transmission bandwidth.

[0003] Image compression can be achieved through video coding. The decodable data frame types in the video coding standard can be divided into intra-frame coded frames, also known as I-Frames (Intra coded frames), unidirectional predictive coded frames, also known as P-Frames (Predicted frames), and bidirectional predictive coded frames, also known as B-Frames (Bi-directionalpredicted frames). Among them, I-frames, as the start of decodability, are the first frame of a frame group and retain all the information of a scene. P-frames are often used as reference frames for other inter-frame coding. They record the difference between the current frame and the previous key frame and are less important than I-frames. B-frames are bidirectional predictive frames. In addition to referring to the previously decompressed picture, they also refer to the information of the next frame. They have the highest compression ratio and the least scene information.

[0004] However, in many scenes of image display, due to the influence of image compression, different frame types have different information contents due to different compression ratios. After being uniformly processed by some image quality processing algorithms (such as sharpening and denoising) on ​​the display end, the sharpness difference of different frames becomes larger, resulting in undesirable visual effects (such as flickering in high-frequency areas). Therefore, it is very important to distinguish different frame types of images in image display applications. Summary of the invention

[0005] In view of this, embodiments of the present application provide an image processing method and device, an electronic device, and a storage medium.

[0006] On the one hand, an embodiment of the present application provides an image processing method, including:

[0007] Get the current frame to be processed;

[0008] Determining a plurality of detection templates of preset sizes for the current picture frame;

[0009] Determining the high-frequency feature components of the current picture frame according to each of the detection templates;

[0010] Determining the frame type of the current picture frame according to the high-frequency characteristic components of the current picture frame and the high-frequency characteristic components of the previous n picture frames of the current picture frame; wherein n is a positive integer;

[0011] Based on the frame type, an image processing algorithm is adjusted, and the current picture frame is processed by the adjusted image processing algorithm.

[0012] In some embodiments, determining the high-frequency feature component of the current picture frame according to each of the detection templates includes: for each of the detection templates, taking each group of multiple continuous pixel points located in a preset direction as a determination combination;

[0013] Determining whether the determination combination satisfies a preset gradient change condition according to the pixel value of each pixel point in each group of the determination combination;

[0014] Determine whether each of the determination combinations satisfying the gradient change condition contains a local extreme point;

[0015] Determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template;

[0016] The high-frequency feature components of the current picture frame are determined according to the high-frequency feature values ​​of each of the detection templates of the current picture frame.

[0017] In some embodiments, determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template includes:

[0018] Determining the number of the local extreme value points in the detection template;

[0019] Determine a second difference between the number of the local extreme value points and a preset second threshold;

[0020] The high frequency feature value is determined according to a ratio of the second difference to the second threshold.

[0021] In some embodiments, determining the high-frequency feature component of the current picture frame according to the high-frequency feature values ​​of each of the detection templates of the current picture frame includes:

[0022] Determine the number of pixels in the target detection area in the current picture frame;

[0023] Summing the high-frequency feature value of each detection template in the target detection area to obtain a first summed value;

[0024] The high-frequency characteristic component of the picture frame is determined according to the ratio of the first sum value to the number of pixel points.

[0025] In some embodiments, determining the frame type of the current picture frame according to the high-frequency characteristic components of the current picture frame and the high-frequency characteristic components of the previous n picture frames of the current picture frame includes:

[0026] Determining a final high-frequency feature component of the current picture frame according to the high-frequency feature component of the current picture frame and a final high-frequency feature component of a previous picture frame;

[0027] The frame type of the current picture frame is determined according to the final high-frequency characteristic components of the current picture frame and the final high-frequency characteristic components of the previous n picture frames of the current picture frame.

[0028] In some embodiments, determining the frame type of the current picture frame according to the final high-frequency feature component of the current picture frame and the final high-frequency feature components of the first n picture frames of the current picture frame comprises:

[0029] Determine the difference between the final high-frequency characteristic component of the current picture frame to be processed and the final high-frequency characteristic component of the picture frame before the current picture frame as a third difference;

[0030] Determining a difference between the final high-frequency characteristic components of the two picture frames preceding the current picture frame as a fourth difference;

[0031] The frame type of the current picture frame is determined according to the third difference and the fourth difference.

[0032] In some embodiments, determining the frame type of the current picture frame according to the third difference and the fourth difference includes:

[0033] If the fourth difference is greater than the first multiple of the fourth difference and greater than a preset third threshold, determining that the frame type of the current picture frame is an intra-frame coding frame;

[0034] If the fourth difference is greater than a second multiple of the fourth difference and greater than a preset fourth threshold, determining that the frame type of the current picture frame is a unidirectional predictive coding frame; wherein the second multiple is less than the first multiple, and the fourth threshold is less than the third threshold;

[0035] If the fourth difference is smaller than a third multiple of the fourth difference, it is determined that the frame type of the current picture frame is a bidirectional predictive coding frame; wherein the third multiple is smaller than the second multiple.

[0036] In some embodiments, determining a plurality of detection templates of preset sizes of the current picture frame includes:

[0037] A plurality of detection templates are determined by taking a plurality of pixels in the target detection area in the current picture frame as center pixels respectively; wherein the center pixel is located at the center position of the detection template.

[0038] In some embodiments, the method further comprises:

[0039] Determine the target detection area in the picture frame; wherein the target detection area includes part or all of the pixels in the picture frame; and the size of the target detection area is larger than the preset size of the detection template.

[0040] On the other hand, an embodiment of the present application further provides an image processing device, including:

[0041] An acquisition module, used for acquiring the current picture frame to be processed;

[0042] A processing module, used to determine a plurality of detection templates of preset sizes of the current picture frame; determine a high-frequency feature component of the current picture frame according to each of the detection templates; determine a frame type of the current picture frame according to the high-frequency feature component of the current picture frame and the high-frequency feature components of n picture frames before the current picture frame; wherein n is a positive integer;

[0043] The adjustment module is used to adjust the image processing algorithm based on the frame type, and process the current picture frame by using the adjusted image processing algorithm.

[0044] In some embodiments, the processing module is specifically used to:

[0045] For each of the detection templates, each group of multiple continuous pixel points located in a preset direction is used as a determination combination;

[0046] Determining whether the determination combination satisfies a preset gradient change condition according to the pixel value of each pixel point in each group of the determination combination;

[0047] Determine whether each of the determination combinations satisfying the gradient change condition contains a local extreme point;

[0048] Determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template;

[0049] The high-frequency feature components of the current picture frame are determined according to the high-frequency feature values ​​of each of the detection templates of the current picture frame.

[0050] In some embodiments, the processing module is specifically used to:

[0051] Determine the final high-frequency feature component of the current picture frame according to the high-frequency feature component of the current picture frame and the final high-frequency feature component of the previous picture frame;

[0052] The frame type of the current picture frame is determined according to the final high-frequency characteristic components of the current picture frame and the final high-frequency characteristic components of the previous n picture frames of the current picture frame.

[0053] In yet another aspect, an embodiment of the present application further provides an electronic device, comprising: a display panel, a processor, and a memory for storing a computer program that can be run on the processor;

[0054] Wherein, when the processor is used to run the computer program, it executes the steps of any of the above methods to obtain a processed picture frame, and controls the display panel to display the processed picture frame.

[0055] On the other hand, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0056] The embodiment of the present application selects multiple detection templates for each picture frame, and determines the high-frequency feature components of the entire picture frame based on the detection templates. The frame type of the current picture frame is determined by comprehensively comparing the statistical values ​​of the high-frequency feature components of several adjacent picture frames. On the one hand, the statistics of the high-frequency feature components can accurately reflect the characteristics of different picture frames, thereby facilitating the distinction of frame types. On the other hand, the accuracy of frame type detection can be improved by determining the frame type of the current frame with reference to several adjacent frames. In this way, the image processing algorithm can be dynamically adjusted according to the determined frame type, thereby improving the image quality and reducing the adverse visual effects caused by the image processing algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A flowchart of an image processing method provided in an embodiment of the present application;

[0058] Figure 2 A schematic diagram of a detection template in an image processing method provided in an embodiment of the present application;

[0059] Figure 3 A flowchart of determining high-frequency feature values ​​of a detection template in an image processing method provided in an embodiment of the present application;

[0060] Figure 4 A schematic diagram of determining high-frequency feature values ​​of a detection template in an image processing method provided in an embodiment of the present application;

[0061] Figure 5 A flowchart of determining high-frequency feature components of a picture frame in an image processing method provided in an embodiment of the present application;

[0062] Figure 6 A flowchart of determining the frame type of a picture frame in the image processing method provided in an embodiment of the present application;

[0063] Figure 7 A graph showing changes in high-frequency characteristic components of each frame in the image processing method provided in an embodiment of the present application;

[0064] Figure 8 A structural block diagram of an image processing device provided in an embodiment of the present application;

[0065] Fig. 9 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] The following will be combined with the embodiments of the present application and the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0067] In the following description, a large number of specific details are given to provide a more thorough understanding of the present application. However, it is obvious to those skilled in the art that the present application can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present application, some technical features known in the art are not described; that is, all features of the actual embodiments are not described here, and well-known functions and structures are not described in detail.

[0068] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present application. When used herein, the singular forms "one", "an" and "said / the" are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "consisting of" and / or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.

[0069] In order to thoroughly understand the present application, detailed steps and detailed structures will be presented in the following description to illustrate the technical solution of the present application. The preferred embodiments of the present application are described in detail below, but in addition to these detailed descriptions, the present application may also have other implementation methods.

[0070] like Figure 1 As shown, the embodiment of the present application provides an image processing method, comprising the following steps:

[0071] Step S101, obtaining the current picture frame to be processed;

[0072] Step S102: determining a plurality of detection templates of preset sizes for the current picture frame;

[0073] Step S103, determining the high-frequency feature components of the current picture frame according to each detection template;

[0074] Step S104, determining the frame type of the current picture frame according to the high-frequency characteristic components of the current picture frame and the high-frequency characteristic components of the n picture frames before the current picture frame; wherein n is a positive integer;

[0075] Step S105 : adjusting the image processing algorithm based on the frame type, and processing the current picture frame by using the adjusted image processing algorithm.

[0076] In the embodiment of the present application, the above-mentioned picture frame is the data of a frame of the video data received by the image processing end. In order to facilitate transmission and storage, the video data can be data after complex encoding. Therefore, the data of a frame of the picture may contain the pixel value data of all pixels, or may only contain the pixel value data of some pixels and the relationship between other pixels and the previous and next frames. Therefore, the amount of information in different picture frames is different.

[0077] For a picture frame with all pixel values, since it contains the pixel value data of each pixel, there are more changes between pixels, so the high-frequency feature components are more significant. Relatively speaking, for a picture frame containing only the pixel value data of some pixels, since a large number of pixels do not have specific pixel value data, there are fewer changes in details between pixels, so the high-frequency feature components are lower. It should be noted that in an embodiment of the present application, the high-frequency feature components can be used to represent the degree of pixel change or the richness of details of the entire image. Therefore, based on the high-frequency feature components of the picture frame, it can be distinguished whether the frame type belongs to a picture frame containing all pixel data or a picture frame containing only part of the pixel data.

[0078] It should be noted that the "current picture frame" in the embodiment of the present application refers to a picture frame that has not been processed and is about to be processed, or a picture frame that is being processed. The previous n picture frames and the current picture frame are processed in the same manner, so the high-frequency feature components of the previous n picture frames have the same physical meaning as the high-frequency feature components of the current picture frame. The processing of each picture frame refers to the processing results of the previous n picture frames.

[0079] In some embodiments, in the above step 102: determining a plurality of detection templates of preset sizes of the current picture frame includes:

[0080] A plurality of detection templates are determined by taking a plurality of pixels in the target detection area in the current picture frame as the central pixels respectively; wherein the central pixel is located at the central position of the detection template.

[0081] Here, the set detection template can be used to detect the high-frequency feature components of the picture frame.

[0082] It should be noted that the detection template is an area delineated according to a preset size by taking multiple pixels in the target detection area as the center point. The multiple pixels can be all pixels in the target detection area or part of the pixels. Taking all pixels as an example, each pixel in the target detection area is taken as the center point to delineate the detection template. The size of the detection template can be M*N, where M and N are positive integers. Calculations are performed separately in each detection template, so that the high-frequency feature value corresponding to each pixel in the target detection area can be obtained in the end.

[0083] Taking some pixels as an example, for example, pixels are selected at intervals as center points to define the detection template. Only one of any two adjacent pixels is used as the center pixel to define the detection template, but the other pixel is also included in the detection template. Therefore, the high-frequency characteristics of the picture can also be reflected, and the amount of calculation can be reduced by half, but the calculation results of some high-frequency characteristics may be lost. For example, if the high-frequency feature value is determined by calculating the local extreme point in the detection template, if the value of the middle pixel is the largest among three consecutive pixels, it is determined as the local extreme point. However, the defined detection template is only for some pixels, so there is a possibility of missing the local extreme point, which reduces the detection accuracy of the high-frequency characteristics. Therefore, the selection of the center pixel for delimiting the detection template can also be set according to the requirements of detection accuracy and calculation amount.

[0084] The high-frequency feature value calculated for a detection template can reflect the picture change characteristics or detail richness of the central pixel and its surrounding small range. In order to reduce the amount of calculation as much as possible, a smaller preset size can be set, for example, Figure 2 As shown, the size of the above detection template is M*N=5*5, which has a total of 25 pixels, that is, two pixels are taken as references in each direction around the central pixel S0 for calculation. However, if the size is set too small, the calculated high-frequency feature value is difficult to reflect the actual high-frequency features, or the calculation cannot be completed. For example, if M*N=2*3, there are only 6 pixels, and only 2 in the direction of M, which is difficult to reflect the actual changes.

[0085] In practical applications, if the amount of calculation allows, it can be set larger, but because multiple pixels will correspond to a detection template, there are repeated pixels between adjacent templates, so if a larger detection template is set, more redundant calculations will be generated. Therefore, the setting of the above detection template size can also consider the amount of calculation and accuracy, and set a reasonable range.

[0086] In addition, for each picture frame, an object detection area of ​​interest may be selected. Specifically, in some embodiments, the image processing method further includes:

[0087] Determine a target detection area in the current picture frame; wherein the target detection area includes part or all of the pixels in the current picture frame; and the size of the target detection area is larger than a preset size of the detection template.

[0088] Generally, the entire picture frame can be selected as the target detection area, and detection templates are selected for detection of multiple pixels in the entire picture in turn. The high-frequency feature values ​​of all detection templates are counted, and the high-frequency feature components of the entire picture are determined based on the average high-frequency feature value.

[0089] For video images with certain characteristics, some areas can be selected as target detection areas. For example, for a set of data frames with fixed background areas or fixed content in a video, these fixed content areas are the same or similar in each frame. Comparing the high-frequency characteristics of the pixel values ​​in these areas may not be helpful for determining the frame type, that is, the high-frequency characteristics of these areas may be similar for each frame. Therefore, when selecting the target detection area, other screen areas other than these fixed content areas can be selected. This can reduce the amount of calculation on the one hand, and eliminate the interference of redundant data on the calculation results on the other hand, thereby improving the accuracy of determining the frame type.

[0090] In addition, in the above step S103 of the embodiment of the present application, the high-frequency feature components of the picture frame can be obtained by statistics based on the high-frequency feature values ​​of each detection template in the entire picture frame. For example, the high-frequency feature values ​​of each detection template can be summed, or the average value of the high-frequency feature values ​​of each detection template can be calculated to determine the high-frequency feature components of the frame. Specifically, these high-frequency feature values ​​can be averaged according to the number of detection templates.

[0091] For the above-mentioned step S104, the embodiment of the present application utilizes the high-frequency characteristic components of the current picture frame to be processed and the high-frequency characteristic components of one or more previous picture frames to determine the frame type of the current picture frame. That is to say, the present application not only considers the high-frequency characteristics of the current picture frame, but also considers the changing relationship between its high-frequency characteristics and those of several previous frames, and then determines the frame type.

[0092] It is understandable that if only the high-frequency characteristics of the current picture frame are considered and the size of the high-frequency characteristic components is used to determine the frame type, the following situations may occur: First, since the picture itself has many lines, the high-frequency characteristic components are relatively high, resulting in the current picture frame being determined as an I frame. However, the image overlap with the adjacent picture frame is actually high, and other pixel information except these line information is referenced to the previous picture, so it may not actually be an I frame, resulting in a judgment error. Second, the current picture is flat and has few detailed lines, so the high-frequency characteristic components are low, and it is determined to be a B frame. But in fact, the previous frame is completely different from the current frame, and the current frame belongs to the first frame in a group of picture frames and belongs to an I frame, which also leads to a judgment error. In other words, only considering the high-frequency characteristics of the current picture frame is not enough to accurately distinguish the frame type, so the embodiment of the present application comprehensively determines the frame type of the current picture frame by the high-frequency characteristic components of the current picture frame and at least one previous picture frame, so that it can be accurately judged, which is convenient for subsequent adjustment of image processing algorithms and related processing such as decoding.

[0093] Finally, for the above step S105, the embodiment of the present application adjusts the image processing algorithm based on the frame type determined by the above method, and adjusts the relevant parameters in the image processing algorithm that are easily affected by different frame types for different types of picture frames. For example, the intensity of sharpening in the image processing algorithm is adjusted so that the effects of different pictures are more uniform, thereby improving the visual experience of the pictures.

[0094] In some embodiments, Figure 3 As shown, in the above step S103: determining the high-frequency feature components of the current picture frame according to each detection template includes:

[0095] Step S21, for each of the detection templates, taking each group of multiple continuous pixel points located in a preset direction as a determination combination;

[0096] Step S22, determining whether the determination combination satisfies a preset gradient change condition according to the pixel value of each pixel point in each group of the determination combination;

[0097] Step S23, determining whether each of the determination combinations satisfying the gradient change condition contains a local extreme point;

[0098] Step S24, determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template;

[0099] Step S25: Determine the high-frequency feature components of the current picture frame according to the high-frequency feature values ​​of each detection template of the current picture frame.

[0100] In an embodiment of the present application, a detection template is set to calculate the high-frequency feature values ​​of pixels in the detection template, and then the high-frequency feature values ​​of all detection templates in the target detection area of ​​the picture frame are counted to determine the high-frequency feature components of the entire picture.

[0101] In the embodiment of the present application, the gradient and local extreme value points can be determined by the pixel value change trend of a plurality of consecutive pixel points in one direction, and then the high-frequency feature value of the detection template can be determined by the gradient and the local extreme value points.

[0102] Here, the preset direction may include one or more directions, for example, the horizontal direction, vertical direction, and diagonal direction of the picture. The number of pixels in the determination combination may be greater than or equal to 3 pixels, so as to facilitate the detection of gradient changes and local extreme points. It is understood that in the embodiment of the present application, the gradient change refers to the change in pixel value between adjacent pixels in the determination combination, and the local extreme point refers to a pixel point whose pixel value is an extreme value in the determination combination, that is, the pixel value of the extreme point is greater than the pixel values ​​on both sides of it.

[0103] Gradient changes and local extreme points can reflect the high-frequency characteristics of the judgment combination. Each judgment combination in the detection template is traversed, and the high-frequency characteristics of the detection template can be determined based on statistical data. Specifically, in an embodiment of the present application, it is possible to first determine whether the gradient change of each judgment combination satisfies the preset gradient change condition. For example, the change in the pixel value of at least two adjacent pixels contained in the judgment combination is greater than a preset threshold. In this way, it is indicated that the judgment combination has high-frequency change pixel characteristics. Then, for the judgment combination that meets the gradient change condition, determine whether it contains local extreme points. Finally, the number of judgment combinations containing local extreme points in the detection template is used, or the number of local extreme points is directly counted to determine the high-frequency feature value of the detection template.

[0104] It should be noted that since each detection template is defined based on each central pixel, the high-frequency feature value can also be understood as the high-frequency feature value corresponding to the central pixel. In this way, if a detection template is determined for each pixel in the target detection area, a high-frequency feature value corresponding to each pixel can be obtained here.

[0105] Thus, by traversing and detecting the determination combination in the detection template, the high-frequency feature value of the detection template is determined, and the high-frequency characteristics within each region can be accurately obtained, which is convenient for the subsequent statistics of the high-frequency characteristics of the entire picture.

[0106] In some embodiments, in the above step S22: determining whether the determination combination satisfies a preset gradient change condition according to the pixel value of each pixel point in each determination combination includes:

[0107] Determine the absolute value of the first difference between the pixel values ​​of every two adjacent pixels according to the pixel value of each pixel point in each determination combination;

[0108] If the maximum value of the absolute value of the first difference obtained in the determination combination is greater than a preset first threshold, it is determined that the determination combination satisfies the gradient change condition.

[0109] Taking the case where the determination combination includes 3 pixels as an example, the detection of gradient change can be determined by the following formula (1):

[0110] Max(abs(Y0-Y1),abs(Y1-Y2))>THR1(1)

[0111] Wherein, Y0, Y1 and Y2 represent the pixel values ​​of three consecutive pixels respectively, and THR1 represents the first threshold. If the largest one of the absolute value of the difference between Y0 and Y1 and the absolute value of the difference between Y1 and Y2 is greater than the first threshold, it is considered that the gradient change condition is met, that is, if at least one of the absolute values ​​of the two differences is greater than the first threshold, it means that there is a large change between at least two adjacent pixel values, and at this time, it is considered that the condition is met.

[0112] In some embodiments, in the above step S23: determining whether each determination combination that satisfies the gradient change condition contains a local extreme point includes:

[0113] If, among a plurality of continuous pixel points of the determination combination that satisfy the gradient change condition, at least one pixel point located at a non-edge position has the largest pixel value, it is determined that the determination combination contains a local extreme point.

[0114] For the case where the above gradient change conditions are met, it can be further determined whether the determination combination contains local extreme value points. Relatively speaking, for the case where the above gradient change conditions are not met, it means that the determination combination does not contain adjacent pixel values ​​with large changes, that is, the changes between several pixel points in the determination combination are small and do not have high-frequency characteristics, so the determination combination is not included in the scope of detecting local extreme value points.

[0115] Taking the determination combination of three pixels satisfying the above formula (1) as an example, here, it is determined whether the pixel value of the middle pixel among the three pixels is the maximum value or the minimum value, so as to determine whether the middle pixel is a local extreme point, referring to the following formula (2):

[0116] (Y0 <Y1)&(Y2<Y1)||(Y0> Y1)&(Y2>Y1)(2)

[0117] It is understandable that, for the case where the number of pixel points in the determination combination is greater than 3 points, the total number of extreme value points therein can be counted or it can be determined whether the determination combination contains at least one extreme value point. It should be noted that the determination of extreme value points does not consider the two points located at the edge of the determination combination, but only considers one or more points located in the middle. The determination method is: if the pixel value is greater than its two adjacent pixel points or less than its two adjacent pixel points, then the pixel point is a local extreme value point.

[0118] In some embodiments, in the above step S24: determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template includes:

[0119] Determine the number of local extreme points in the detection template;

[0120] Determine a second difference between the number of local extreme value points and a preset second threshold;

[0121] The high frequency feature value is determined according to the ratio of the second difference to the second threshold.

[0122] In the embodiment of the present application, each judgment combination in each detection template can be traversed and calculated to determine whether each judgment combination contains a local extreme point, or the number of local extreme points contained in each judgment combination. Then, the number of local extreme points in the entire detection template is determined. The number of local extreme points in the detection template can reflect the high-frequency characteristics of the detection template.

[0123] Here, the number of local extreme value points in the detection template can also be normalized to obtain a proportional value as the high-frequency feature value. Specifically, the following formula (3) can be referred to:

[0124]

[0125] Wherein, i represents the i-th detection template in the target detection area, K(i) represents the high-frequency feature value of the i-th detection template, N(i) represents the number of local extreme points in the i-th detection template, and THR2 is the second threshold.

[0126] In some embodiments, determining the high-frequency feature value according to the ratio of the second difference to the second threshold value includes:

[0127] If the ratio of the second difference to the second threshold is greater than or equal to 1, determining that the high frequency feature value is 1;

[0128] If the ratio of the second difference to the second threshold is greater than 0 and less than 1, determining that the high-frequency feature value is equal to the ratio of the second difference to the second threshold;

[0129] If the ratio of the second difference to the second threshold is less than or equal to 0, the high-frequency feature value is determined to be 0.

[0130] That is, the above K(i) is a value converted from 0 to 1 for the local extreme point.

[0131] When the value calculated by the above formula (3) is greater than or equal to 1, K(i) = 1. If the calculated K(i) is 0 or a negative number, K(i) = 0. If the value calculated by the above formula is a value between 0 and 1, K(i) is the value. Figure 4 As shown, according to the high-frequency feature value between 0 and 1, it is convenient to perform statistics on the entire target detection area of ​​the picture frame.

[0132] In some embodiments, Figure 5 As shown, in the above step S25: determining the high-frequency feature components of the current picture frame according to the high-frequency feature values ​​of each detection template of the current picture frame includes:

[0133] Step S31, determining the number of pixels in the target detection area;

[0134] Step S32, summing the high-frequency feature values ​​of each detection template in the target detection area to obtain a first sum value;

[0135] Step S33: determine the high-frequency characteristic component of the picture frame according to the ratio of the first sum value to the number of pixels.

[0136] The above steps provide an implementation method for determining the high-frequency feature components of a picture frame based on the high-frequency feature values ​​of each detection template, that is, taking the average value of the high-frequency feature values ​​of the detection template corresponding to each pixel in the entire picture, and using the average value as the high-frequency feature component of the picture frame.

[0137] It can be understood that here, a corresponding detection template is taken for each pixel in the target detection area as an example, that is, the number of pixels in the target detection area is counted, and then the high-frequency feature values ​​of each detection template are summed to obtain the above first sum value. The above average value is calculated by using the sum of the pixel points and the sum of the corresponding high-frequency feature values ​​to obtain the high-frequency feature component, as shown in the following formula (4):

[0138]

[0139] Among them, X(j) is the high-frequency feature component of the j-th picture frame, A(j) is the total number of pixels in the target detection area in the j-th picture frame, K(i) is the high-frequency feature value of the i-th detection template, where 1≤i≤n, n is the total number of detection templates in a picture frame.

[0140] In this way, the obtained high-frequency feature component is a value between 0 and 1, which is convenient for comparison and calculation with other frames, and further for determining the frame type of the currently processed picture frame.

[0141] In some embodiments, Figure 6 As shown, in the above step S105, the frame type of the current picture frame is determined according to the high-frequency characteristic components of the current picture frame and the high-frequency characteristic components of the previous n picture frames of the current picture frame, including:

[0142] Step S41, determining the final high-frequency feature component of the current picture frame according to the high-frequency feature component of the current picture frame and the final high-frequency feature component of the previous picture frame;

[0143] Step S42: Determine the frame type of the current picture frame to be processed according to the final high-frequency characteristic components of the current picture frame and the final high-frequency characteristic components of the previous n picture frames of the current picture frame.

[0144] The above steps provide an implementation method for determining the frame type based on the high-frequency feature components of the picture frame, and the high-frequency feature components of the current picture frame and the previous picture frame are used for calculation to obtain the final high-frequency feature components of the current picture frame. The processing process is shown in the following formula (5):

[0145] Y(j)=F(Y(j-1),X(j)),j>0(5)

[0146] Among them, F represents the calculation function, j represents the j-th picture frame, X(j) is the high-frequency feature component of the j-th picture frame, Y(j) is the final high-frequency feature component after processing the j-th picture frame, and Y(j-1) is the final high-frequency feature component after processing the j-1-th picture frame.

[0147] Exemplarily, the above calculation can be implemented by an IIR (Infinite Impulse Response) filter. An IIR filter is a digital filter characterized by having an infinite impulse response. The output of the IIR filter depends not only on the current input, but also on the previous input and output. Therefore, it has a feedback path and can be used for image smoothing and removal of high-frequency noise or detail information. It should be noted that the input signal of the above IIR filtering process includes the high-frequency feature component of the current picture frame and the final high-frequency feature component obtained after processing the previous picture frame, and the output signal is the final high-frequency feature component of the current picture frame. The processing process can refer to the following formula (6) or formula (7):

[0148] Y(j)=F(Y(j-1),X(j))=b 0 X(j)-a 1Y(j-1),j>0(6)Y(j)=

[0149] F(Y(j-1),X(j))=b 0 X(j)+b 1 X(j-1)-a 1 Y(j-1),j>0(7)

[0150] Among them, b 0 、b 1 represents the feedforward coefficient, a 0 Represents the feedback coefficient. That is, the final high-frequency feature component of the current picture frame is obtained by weighting the high-frequency feature component of the current picture frame and the final high-frequency feature component of the previous frame, or the final high-frequency feature component of the current picture frame is obtained by weighting the high-frequency feature component of the current picture frame, the high-frequency feature component of the previous frame, and the final high-frequency feature component of the previous frame.

[0151] In some embodiments, in the above step S42: determining the frame type of the current picture frame according to the final high-frequency feature component of the current picture frame and the final high-frequency feature components of the n picture frames before the current picture frame includes:

[0152] Determine the difference between the final high-frequency characteristic component of the current picture frame to be processed and the final high-frequency characteristic component of the picture frame before the current picture frame as a third difference;

[0153] Determine the difference between the final high-frequency feature components of the two picture frames before the current picture frame as a fourth difference;

[0154] The frame type of the current picture frame is determined according to the third difference and the fourth difference.

[0155] In the embodiment of the present application, after the current frame is processed by the IIR filter, the second difference of the final high-frequency characteristic components between the two frames can be further calculated, and the third difference of the final high-frequency characteristic components between the first two frames can be calculated as a comparison parameter for comparing the high-frequency characteristic change characteristics of the current frame. As shown in the following formula (8):

[0156]

[0157] Wherein, S(j) represents a judgment parameter for judging the frame type of the j-th picture frame. This parameter is the ratio of the above-mentioned second difference to the third difference. In the embodiment of the present application, the above-mentioned ratio can be used to judge the degree of change of the high-frequency characteristics between the three adjacent picture frames, and thus can be used to determine the frame type of the current frame. Since the above-mentioned final high-frequency feature component Y(j) itself is related to the high-frequency feature component of the current frame and the high-frequency feature component of the previous frame, and S(j) further compares the change relationship of the high-frequency characteristics between the frames, it is possible to more accurately judge the reference relationship between the current frame and the adjacent frames, and thus more accurately judge the frame type.

[0158] In some embodiments, determining the frame type of the current picture frame according to the third difference and the fourth difference includes:

[0159] If the third difference is greater than the first multiple of the fourth difference and greater than a preset third threshold, determining that the frame type of the current picture frame to be processed is an intra-frame coding frame;

[0160] If the third difference is greater than the second multiple of the fourth difference and greater than a preset fourth threshold, it is determined that the frame type of the current picture frame to be processed is a unidirectional predictive coding frame; wherein the second multiple is less than the first multiple, and the fourth threshold is less than the third threshold;

[0161] If the third difference is smaller than a third multiple of the fourth difference, it is determined that the frame type of the current picture frame to be processed is a bidirectional predictive coding frame; wherein the third multiple is smaller than the second multiple.

[0162] As shown in the following formula (9):

[0163]

[0164] The above B1 represents the first multiple, B2 represents the second multiple, B3 represents the third multiple, THR3 represents the third threshold, and THR4 represents the fourth threshold. I represents an intra-frame coded frame, that is, the frame type is an I frame; P represents a unidirectional predictive coded frame, that is, the frame type is a P frame; B represents a bidirectional predictive coded frame, that is, the frame type is a B frame.

[0165] It should be noted that the first multiple, the second multiple and the third multiple as well as the third threshold and the fourth threshold can be set according to empirical values ​​or experimental values. It can be understood that the larger the third difference is, the larger the difference between the high-frequency characteristics of the current frame and the previous frame is, that is, the larger the change is, then the frame is likely to be an I frame, on the contrary, the smaller the third difference is, the more likely the frame is to be a B frame. The frame between the two may be a P frame. However, judging only by the third difference may be inaccurate. Because the third difference and the fourth difference are calculated by the difference of the high-frequency characteristic components between the two frames, the larger the multiple relationship between the two differences is, the greater the change degree of the current frame is than that of the previous frame, but it is possible that the previous frame has a small change (no change) and the difference is very small, and the multiple of the difference of the current frame with a little change will be large, but in fact the difference of the current frame is very small, and it may not be an I frame. Therefore, a third threshold is added here for hard judgment. In this way, when the third difference and the fourth difference satisfy a sufficiently large multiple relationship and are greater than the third threshold, it means that the change of the final high-frequency characteristic component of the current frame is large enough, which meets the characteristics of the I frame. On the contrary, if only the threshold is used for judgment, if the high-frequency characteristics of the current frame and the previous frame change greatly, the third difference is large and greater than the above third threshold, however, the high-frequency characteristics of the previous frame also change greatly, but the difference between the two is close, for example, the change of the high-frequency characteristics between the three adjacent frames is close to a linear change, which does not meet the characteristics of the I frame. Therefore, the multiple relationship between the third difference and the fourth difference is also needed for judgment. For the judgment of the B frame, the change of the high-frequency characteristics needs to be small enough. Therefore, it is only necessary to compare the multiple relationship between the third difference and the fourth difference.

[0166] Of course, the above multiple relationship combined with the threshold judgment method is only a specific implementation method. In practical applications, it is not limited to the above method, and other methods can also be used. For example, according to the final high-frequency feature component change curve between adjacent frames, Figure 7 As shown, a judgment is made to determine whether it satisfies the variation law of the corresponding frame type, or a neural network is used to make a judgment, and the final high-frequency feature components of each frame are input into the corresponding neural network model for judgment, etc. The embodiments of the present application will not give examples one by one.

[0167] Through the technical solution of the embodiment of the present application, the high-frequency characteristics of the picture can be counted by utilizing the features such as the gradient change of the pixel value of the pixel point in the local area and the local extreme point in the image, and then the frame type can be judged according to the change relationship of the high-frequency characteristics between multiple adjacent frames. The frame type of each frame can be judged in real time through the data of the video stream, and the image processing algorithm can be dynamically adjusted based on the frame type when performing image processing, so that the adjusted processing algorithm is more suitable for the frame type of the current frame, thereby dynamically optimizing the video display effect.

[0168] Based on the same inventive concept, Figure 8 As shown, the embodiment of the present application further provides an image processing device 800, including:

[0169] The acquisition module 801 is used to acquire the current picture frame to be processed;

[0170] The processing module 802 is used to determine a plurality of detection templates of preset sizes of the current picture frame; determine the high-frequency feature components of the current picture frame according to each of the detection templates; determine the frame type of the current picture frame according to the high-frequency feature components of the current picture frame and the high-frequency feature components of the previous n picture frames of the current picture frame; wherein n is a positive integer;

[0171] The adjustment module 803 is used to adjust the image processing algorithm based on the frame type, and process the current picture frame by using the adjusted image processing algorithm.

[0172] In some embodiments, the processing module is specifically used to:

[0173] For each of the detection templates, each group of multiple continuous pixel points located in a preset direction is used as a determination combination;

[0174] Determining whether the determination combination satisfies a preset gradient change condition according to the pixel value of each pixel point in each group of the determination combination;

[0175] Determine whether each of the determination combinations satisfying the gradient change condition contains a local extreme point;

[0176] Determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template;

[0177] The high-frequency feature components of the current picture frame are determined according to the high-frequency feature values ​​of each of the detection templates of the current picture frame.

[0178] In some embodiments, the processing module is specifically used to:

[0179] Determining a final high-frequency feature component of the current picture frame according to the high-frequency feature component of the current picture frame and a final high-frequency feature component of a previous picture frame;

[0180] The frame type of the current picture frame is determined according to the final high-frequency characteristic components of the current picture frame and the final high-frequency characteristic components of the previous n picture frames of the current picture frame.

[0181] In some embodiments, the processing module performs: determining whether the determination combination satisfies a preset gradient change condition according to the pixel value of each pixel point in each group of the determination combination, specifically including:

[0182] Determine the absolute value of the first difference between the pixel values ​​of every two adjacent pixels according to the pixel values ​​of each pixel point in each group of the determination combination;

[0183] If the maximum value of the absolute value of the first difference obtained in the determination combination is greater than a preset first threshold, it is determined that the determination combination satisfies the gradient change condition.

[0184] In some embodiments, the processing module performs: determining whether each of the determination combinations satisfying the gradient change condition contains a local extreme point, specifically including:

[0185] If, among the multiple continuous pixel points of the determination combination that satisfy the gradient change condition, at least one pixel point located at a non-edge position has the largest pixel value, it is determined that the determination combination contains the local extreme point.

[0186] In some embodiments, the processing module performs: determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template, specifically including:

[0187] Determining the number of the local extreme value points in the detection template;

[0188] Determine a second difference between the number of the local extreme value points and a preset second threshold;

[0189] The high frequency feature value is determined according to a ratio of the second difference to the second threshold.

[0190] In some embodiments, the processing module performs: determining the high-frequency feature value according to the ratio of the second difference value to the second threshold value, specifically including:

[0191] If the ratio of the second difference to the second threshold is greater than or equal to 1, determining that the high frequency feature value is 1;

[0192] If the ratio of the second difference to the second threshold is greater than 0 and less than 1, determining that the high-frequency feature value is equal to the ratio of the second difference to the second threshold;

[0193] If the ratio of the second difference to the second threshold is less than or equal to 0, the high-frequency feature value is determined to be 0.

[0194] The step of determining the high-frequency feature component of the current picture frame according to the high-frequency feature values ​​of each of the detection templates of the current picture frame comprises:

[0195] Determining the number of pixels within the target detection area;

[0196] Summing the high-frequency feature value of each detection template in the target detection area to obtain a first summed value;

[0197] The high-frequency characteristic component of the picture frame is determined according to the ratio of the first sum value to the number of pixel points.

[0198] In some embodiments, the processing module performs: determining the frame type of the current picture frame according to the high-frequency characteristic components of the current picture frame and the high-frequency characteristic components of the previous n picture frames of the current picture frame, specifically including:

[0199] Determining a final high-frequency feature component of the current picture frame according to the high-frequency feature component of the current picture frame and a final high-frequency feature component of a previous picture frame;

[0200] The frame type of the current picture frame is determined according to the final high-frequency characteristic component of the current picture frame and the final high-frequency characteristic components of the previous n picture frames of the current picture frame.

[0201] In some embodiments, the processing module performs: determining the frame type of the current picture frame according to the final high-frequency feature component of the current picture frame and the final high-frequency feature components of the first n picture frames of the current picture frame, including:

[0202] Determine the difference between the final high-frequency characteristic component of the current picture frame to be processed and the final high-frequency characteristic component of the picture frame before the current picture frame as a third difference;

[0203] Determining a difference between the final high-frequency characteristic components of the two picture frames preceding the current picture frame as a fourth difference;

[0204] The frame type of the current picture frame is determined according to the third difference and the fourth difference.

[0205] In some embodiments, the processing module performs: determining the frame type of the current picture frame according to the third difference and the fourth difference, including:

[0206] If the third difference is greater than the first multiple of the fourth difference and greater than a preset third threshold, determining that the frame type of the current picture frame to be processed is an intra-frame coding frame;

[0207] If the third difference is greater than a second multiple of the fourth difference and greater than a preset fourth threshold, determining that the frame type of the current picture frame to be processed is a unidirectional predictive coding frame; wherein the second multiple is less than the first multiple, and the fourth threshold is less than the third threshold;

[0208] If the third difference is smaller than a third multiple of the fourth difference, it is determined that the frame type of the current picture frame to be processed is a bidirectional predictive coding frame; wherein the third multiple is smaller than the second multiple.

[0209] In some embodiments, the processing module performs: determining a plurality of detection templates of preset sizes of the current picture frame includes:

[0210] A plurality of detection templates are determined by taking a plurality of pixels in the target detection area in the current picture frame as center pixels respectively; wherein the center pixel is located at the center position of the detection template.

[0211] In some embodiments, the apparatus further comprises:

[0212] A determination module is used to determine a target detection area in the current picture frame; wherein the target detection area includes part or all of the pixels in the current picture frame; and the size of the target detection area is larger than the preset size of the detection template.

[0213] The above-mentioned image processing device and the image processing method have completely corresponding and consistent technical concepts. The specific implementation method refers to the description in the relevant embodiments of the image processing method, which will not be repeated here.

[0214] Based on the same inventive concept, Fig. 9 As shown, an embodiment of the present application further provides an electronic device 900, comprising: a processor 901 and a memory 902 for storing a computer program 9021 that can be run on the processor 901; in addition, the electronic device 900 also includes a display panel 903;

[0215] The processor 901 is used to execute the steps of any of the above methods to obtain a processed picture frame when running the computer program, and control the display panel 903 to display the processed picture frame.

[0216] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0217] Based on the same inventive concept, an embodiment of the present application also provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.

[0218] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0219] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium includes: a mobile storage device, ROM, a disk or an optical disk, and other media that can store program codes.

[0220] The various embodiments / implementations provided in this application can be combined with each other without causing any contradiction.

[0221] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An image processing method, characterized in that: include: Get the current frame to be processed; Determining a plurality of detection templates of preset sizes for the current picture frame; Determining the high-frequency feature components of the current picture frame according to each of the detection templates; Determining the frame type of the current picture frame according to the high-frequency characteristic components of the current picture frame and the high-frequency characteristic components of the previous n picture frames of the current picture frame; wherein n is a positive integer; Based on the frame type, an image processing algorithm is adjusted, and the current picture frame is processed by the adjusted image processing algorithm.

2. The image processing method according to claim 1, characterized in that: Determining the high-frequency feature components of the current picture frame according to each of the detection templates includes: for each of the detection templates, taking each group of multiple continuous pixel points located in a preset direction as a determination combination; Determining whether the determination combination satisfies a preset gradient change condition according to the pixel value of each pixel point in each group of the determination combination; Determine whether each of the determination combinations satisfying the gradient change condition contains a local extreme point; Determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template; The high-frequency feature components of the current picture frame are determined according to the high-frequency feature values ​​of each of the detection templates of the current picture frame.

3. The image processing method according to claim 2, characterized in that: The step of determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template comprises: Determining the number of the local extreme value points in the detection template; Determine a second difference between the number of the local extreme value points and a preset second threshold; The high frequency feature value is determined according to a ratio of the second difference to the second threshold.

4. The image processing method according to claim 2, characterized in that: Determining the high-frequency feature components of the current picture frame according to each of the detection templates includes: Determine the number of pixels in the target detection area in the current picture frame; Summing the high-frequency feature value of each detection template in the target detection area to obtain a first summed value; The high-frequency characteristic component of the picture frame is determined according to the ratio of the first sum value to the number of pixel points.

5. The image processing method according to claim 1, characterized in that: Determining the frame type of the current picture frame according to the high-frequency characteristic components of the current picture frame and the high-frequency characteristic components of the previous n picture frames of the current picture frame includes: Determining a final high-frequency feature component of the current picture frame according to the high-frequency feature component of the current picture frame and a final high-frequency feature component of a previous picture frame; The frame type of the current picture frame is determined according to the final high-frequency characteristic component of the current picture frame and the final high-frequency characteristic components of the previous n picture frames of the current picture frame.

6. The image processing method according to claim 5, characterized in that: The determining the frame type of the current picture frame according to the final high-frequency characteristic component of the current picture frame and the final high-frequency characteristic components of the first n picture frames of the current picture frame comprises: Determine the difference between the final high-frequency characteristic component of the current picture frame to be processed and the final high-frequency characteristic component of the picture frame before the current picture frame as a third difference; Determining a difference between the final high-frequency characteristic components of the two picture frames preceding the current picture frame as a fourth difference; The frame type of the current picture frame is determined according to the third difference and the fourth difference.

7. The image processing method according to claim 6, characterized in that: The step of determining the frame type of the current picture frame according to the third difference and the fourth difference includes: If the third difference is greater than the first multiple of the fourth difference and greater than a preset third threshold, determining that the frame type of the current picture frame is an intra-frame coding frame; If the third difference is greater than a second multiple of the fourth difference and greater than a preset fourth threshold, determining that the frame type of the current picture frame is a unidirectional predictive coding frame; wherein the second multiple is less than the first multiple, and the fourth threshold is less than the third threshold; If the third difference is smaller than a third multiple of the fourth difference, it is determined that the frame type of the current picture frame is a bidirectional predictive coding frame; wherein the third multiple is smaller than the second multiple.

8. The image processing method according to any one of claims 1 to 7, characterized in that: The step of determining a plurality of detection templates of preset sizes of the current picture frame comprises: A plurality of detection templates are determined by taking a plurality of pixels in the target detection area in the current picture frame as center pixels respectively; wherein the center pixel is located at the center position of the detection template.

9. The image processing method according to claim 8, characterized in that: The method further comprises: Determine the target detection area in the current picture frame; wherein the target detection area includes part or all of the pixels in the current picture frame; and the size of the target detection area is larger than the preset size of the detection template.

10. An image processing device, characterized in that: include: An acquisition module, used for acquiring the current picture frame to be processed; A processing module, used for determining a plurality of detection templates of preset sizes for the current picture frame; Determining the high-frequency feature components of the current picture frame according to each of the detection templates; Determining the frame type of the current picture frame according to the high-frequency characteristic components of the current picture frame and the high-frequency characteristic components of the previous n picture frames of the current picture frame; wherein n is a positive integer; The adjustment module is used to adjust the image processing algorithm based on the frame type, and process the current picture frame by using the adjusted image processing algorithm.

11. The image processing device according to claim 10, characterized in that: The processing module is specifically used for: For each of the detection templates, each group of multiple continuous pixel points located in a preset direction is used as a determination combination; Determining whether the determination combination satisfies a preset gradient change condition according to the pixel value of each pixel point in each group of the determination combination; Determine whether each of the determination combinations satisfying the gradient change condition contains a local extreme point; Determining the high-frequency feature value of the detection template according to the number of local extreme value points in the detection template; The high-frequency feature components of the current picture frame are determined according to the high-frequency feature values ​​of each of the detection templates of the current picture frame.

12. The image processing device according to claim 10, characterized in that: The processing module is specifically used for: Determining a final high-frequency feature component of the current picture frame according to the high-frequency feature component of the current picture frame and a final high-frequency feature component of a previous picture frame; The frame type of the current picture frame is determined according to the final high-frequency characteristic components of the current picture frame and the final high-frequency characteristic components of the previous n picture frames of the current picture frame.

13. An electronic device, characterized in that: include: A display panel, a processor and a memory for storing a computer program capable of running on said processor; Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 9 to obtain a processed picture frame, and controls the display panel to display the processed picture frame.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.