Image processing method and device, storage medium, electronic equipment and chip
Through edge detection, the color value of the interpolated point is determined, and high-resolution images are generated, which solves the problem of high power consumption of image super-resolution processing in the prior art, realizes high frame rate real-time processing on the client, and improves user experience.
Patent Information
- Application Number
- CN202410659215.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, image super-resolution processing based on deep learning consumes a lot of power on the client, and cannot realize high frame rate real-time processing, affecting the user experience.
By determining the interpolation points in the first resolution image, obtaining its adjacent areas for edge detection, determining the color value of the interpolation points based on the edge detection results, generating a high-resolution second resolution image, and classifying the interpolation points using edge detection to reduce the calculation complexity.
It reduces the calculation amount of image super-resolution processing, reduces power consumption, and realizes high frame rate real-time processing on the client, improving user experience.
Smart Images

Figure CN120374370A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technologies, and particularly to an image processing method, apparatus, storage medium, electronic device, and chip. Background Art
[0002] Image super-resolution technology (Super-Resolution) is a signal processing method aimed at improving the resolution of images or videos, enhancing their detail performance and clarity, and providing users with a more delicate and immersive visual experience.
[0003] Currently, in related technologies, image super-resolution processing is usually based on deep learning, and it is necessary to train a convolutional neural network to learn the mapping relationship between low-resolution and high-resolution images.
[0004] However, in related technologies, image super-resolution processing based on deep learning has a relatively high power consumption and cannot perform high-frame-rate real-time processing on the client side, which affects the user experience. Summary of the Invention
[0005] To overcome the problems existing in related technologies, the present disclosure provides an image processing method, apparatus, storage medium, electronic device, and chip.
[0006] According to a first aspect of an embodiment of the present disclosure, an image processing method is provided, including:
[0007] Determine interpolation points in a first-resolution image;
[0008] Obtain a first neighboring region of the interpolation points;
[0009] Perform edge detection on the interpolation points by using the first neighboring region to obtain an edge detection result of the interpolation points;
[0010] Determine a color value of the interpolation points according to the edge detection result;
[0011] Generate a second-resolution image according to the color value of the interpolation points, where the resolution of the second-resolution image is higher than that of the first-resolution image.
[0012] Optionally, the first neighboring region includes a first preset number of neighboring points adjacent to the interpolation points;
[0013] The performing edge detection on the interpolation points by using the first neighboring region to obtain an edge detection result of the interpolation points includes:
[0014] Perform brightness analysis according to the color values respectively corresponding to the first preset number of neighboring points to obtain the brightness values respectively corresponding to the first preset number of neighboring points;
[0015] Based on the luminance value, obtain the edge detection result of the interpolation point.
[0016] Optionally, the obtaining the edge detection result of the interpolation point based on the luminance value includes:
[0017] Perform edge detection analysis based on the luminance value to determine whether the interpolation point is located in the edge area, and use the determination result as the edge detection result.
[0018] Optionally, the determining the color value of the interpolation point according to the edge detection result includes:
[0019] If the interpolation point is located in the edge area, determine the color value of the interpolation point according to the second adjacent area, where the second adjacent area includes a second preset number of adjacent points adjacent to the interpolation point, and the second preset number is greater than the first preset number;
[0020] If the interpolation point is not located in the edge area, determine the color value of the interpolation point according to the first adjacent area.
[0021] Optionally, the determining the color value of the interpolation point according to the first adjacent area includes:
[0022] Determine the first distances between the first preset number of adjacent points and the interpolation point respectively;
[0023] According to the first distances, select the target adjacent point with the closest distance to the interpolation point from the first preset number of adjacent points;
[0024] Determine the color value of the target adjacent point as the color value of the interpolation point.
[0025] Optionally, the determining the color value of the interpolation point according to the second adjacent area includes:
[0026] Obtain the second distances between the second preset number of adjacent points and the interpolation point respectively;
[0027] Obtain the weights corresponding to the second preset number of adjacent points respectively through a preset model;
[0028] Determine the color value of the interpolation point according to the second distances and the weights corresponding to the second preset number of adjacent points respectively.
[0029] Optionally, the generating the second-resolution image based on the color value of the interpolation point includes:
[0030] According to the color value of the interpolation point and the color values corresponding to the first preset number of adjacent points respectively, determine the target color value of the sharpened interpolation point;
[0031] Generate the second-resolution image according to the target color value.
[0032] According to a second aspect of the embodiments of the present disclosure, there is provided an image processing apparatus, including:
[0033] A determination module configured to determine interpolation points in a first-resolution image;
[0034] An acquisition module configured to acquire a first neighboring region of the interpolation points;
[0035] An acquisition module configured to perform edge detection on the interpolation points by using the first neighboring region to obtain an edge detection result of the interpolation points;
[0036] A determination module configured to determine a color value of the interpolation points according to the edge detection result;
[0037] A generation module configured to generate a second-resolution image according to the color value of the interpolation points, where the resolution of the second-resolution image is higher than that of the first-resolution image.
[0038] According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0039] According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0040] According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, on which a computer program is stored, and characterized in that when the computer program product is executed by a processor, the method described in the first aspect is implemented.
[0041] According to a sixth aspect of the embodiments of the present disclosure, there is provided a chip, including one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, and the signal includes computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to execute the method described in the first aspect.
[0042] With the above technical solution, the present disclosure provides an image processing method, apparatus, storage medium, electronic device and chip. Specifically, first, interpolation points in a first-resolution image are determined; a first adjacent region of the interpolation points is obtained; edge detection is performed on the interpolation points by using the first adjacent region to obtain an edge detection result of the interpolation points; a color value of the interpolation points is determined according to the edge detection result; and a second-resolution image is generated based on the color value of the interpolation points, where the resolution of the second-resolution image is higher than that of the first-resolution image. Compared with the current related technologies, the present disclosure can perform edge detection on the interpolation points in the first-resolution image with low resolution by using the first adjacent region, and then generate the second-resolution image with high resolution according to the edge detection result. Edge detection can classify the interpolation points, and the color value of the interpolation points is determined according to the classification result, reducing the computational complexity of calculating the color value of the interpolation points, thereby reducing the computational amount of image super-resolution processing, further reducing the power consumption of image super-resolution processing, achieving high-frame-rate real-time processing on the client side, and improving the user experience.
[0043] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.
[0045] Figure 1 The flowchart of an image processing method provided by an embodiment of the present disclosure is shown;
[0046] Figure 2 The flowchart of an image processing method provided by an embodiment of the present disclosure is shown;
[0047] Figure 3 The flowchart of an example provided by an embodiment of the present disclosure is shown;
[0048] Figure 4 The flowchart of an example provided by an embodiment of the present disclosure is shown;
[0049] Figure 5 The structural diagram of an image processing apparatus provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0050] Some embodiments of the present disclosure will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Various changes, modifications, and equivalents of the methods, apparatuses, and / or systems described herein will become apparent after understanding the present disclosure. For example, the order of operations described herein is merely exemplary and is not limited to those set forth herein, but may be changed as will be apparent after understanding the present disclosure, except for operations that must be performed in a specific order. Additionally, descriptions of features known in the art may be omitted for the sake of clarity and conciseness. It should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other.
[0051] The embodiments described in some embodiments of the present disclosure below do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0052] Figure 1 is a flowchart of an image processing method shown according to some embodiments of the present disclosure, as Figure 1 shown, this method can be used to be executed on the terminal side such as a terminal, a server, or other electronic devices, and includes the following steps.
[0053] Step 101, determine the interpolation points in the first-resolution image.
[0054] Exemplarily, the first-resolution image can be enlarged to the second-resolution image through upsampling, and new pixel positions will be generated during this process. The new pixel positions can be determined as the interpolation points. Among them, the first-resolution image can include an image with a lower resolution.
[0055] Step 102, obtain the first neighboring region of the interpolation points.
[0056] Exemplarily, the first neighboring region can include the first preset number of neighboring points adjacent to the interpolation points, and sample the color values of the first preset number of neighboring points to facilitate the calculation of the color value of the interpolation points. Specifically, the color value of the interpolation points can be determined by analyzing the color values, brightness, and other characteristics of the first preset number of neighboring points, thereby reducing the computational amount of image super-resolution processing, reducing the power consumption of super-resolution processing, and improving the efficiency of image super-resolution processing.
[0057] Step 103, perform edge detection on the interpolation points using the first neighboring region to obtain the edge detection result of the interpolation points.
[0058] Exemplarily, by using the first neighboring region to perform edge detection on the interpolation points, it is possible to identify whether the interpolation points are in regions where the image brightness, color, or texture changes significantly. These regions usually correspond to the boundaries of objects or the intersections of different regions in the image, thereby obtaining the edge detection results of the interpolation points. Then, based on the edge detection results, the color values of the interpolation points are determined.
[0059] Correspondingly, the edge detection method may include but is not limited to: gray-scale change detection, gradient calculation, threshold processing, etc. Exemplarily, by analyzing the differences between neighboring pixel values in the first neighboring region, it can be identified whether the image gray scale (brightness or color) changes sharply; it is also possible to measure the intensity of the edge by calculating the gradient (local change rate) of the image, and the direction of the gradient also provides information about the edge orientation; it is also possible to set a threshold for significant feature changes to determine the edge.
[0060] Step 104: Determine the color value of the interpolation point according to the edge detection result.
[0061] Exemplarily, if the interpolation point is located in the edge region, several pixels adjacent to the interpolation point can be reselected to form a second neighboring region, and then the color value of the interpolation point is determined according to the second neighboring region; if it is determined according to the edge detection result that the interpolation point is not in the edge region, the color value of the pixel closest to the interpolation point in the first neighboring region can be determined as the color value of the interpolation point. In this way, the interpolation points can be classified, reducing the computational complexity of calculating the color values of the interpolation points, further reducing the computational amount of image super-resolution processing, reducing the power consumption of image super-resolution processing, enabling high-frame-rate real-time processing on the client side, and improving the user experience.
[0062] Step 105: Generate a second-resolution image based on the color value of the interpolation point. The resolution of the second-resolution image is higher than that of the first-resolution image.
[0063] Exemplarily, after determining the color value of the interpolation point, the first-resolution image can be expanded according to the color of the interpolation point and image post-processing can be performed to obtain the second-resolution image. Among them, the second-resolution image can be an image obtained after super-resolution processing with a resolution higher than that of the first-resolution image; the post-processing can include operations such as edge refinement, connecting broken edges, removing pseudo-edges, color correction, and sharpening to further improve the image quality and achieve the desired visual effect.
[0064] Exemplarily, the client may include a mobile phone, etc. The application scenarios for super-resolution processing using this embodiment may include mobile game scenarios, etc. For example, the first-resolution image may be a rendered image with low resolution and low quality in a mobile game. Then, applying the method of this embodiment for super-resolution processing enables the mobile game to run at a low resolution and finally output a high-resolution second-resolution image, reducing the burden on the Graphics Processing Unit (GPU) for rendering high-resolution images, thereby reducing power consumption and extending the battery usage time of the mobile phone. At the same time, the game can run at a higher frame rate, enhancing the visual effect and improving the user experience.
[0065] Compared with the current methods for image super-resolution processing based on deep learning in the related art, this embodiment can utilize the first neighboring region to perform edge detection on the interpolation points in the low-resolution first-resolution image, and then generate the high-resolution second-resolution image according to the edge detection results. By using edge detection, the interpolation points can be classified, and the color values of the interpolation points can be determined according to the classification results, reducing the computational complexity of calculating the color values of the interpolation points, thereby reducing the computational amount of image super-resolution processing, further reducing the power consumption of image super-resolution processing, achieving high-frame-rate real-time processing on the client, and improving the user experience.
[0066] To further illustrate the specific implementation process of the method as Figure 1 shown, this embodiment provides the specific method as Figure 2 shown, and the method includes:
[0067] Step 201, determine the interpolation points in the first-resolution image.
[0068] Step 202, obtain the first neighboring region of the interpolation points. The first neighboring region includes the first preset number of neighboring points that are close to the interpolation points in distance.
[0069] In this embodiment, as Figure 3 shown, the first preset number may be 5. The first neighboring region may include 5 neighboring points that are close to the interpolation point (P) in distance, located on the upper side (point A), lower side (point E), left side (point B), right side (point D), and middle (point C) of the interpolation point respectively. By sampling the color values of these 5 neighboring points, edge detection can be performed on the interpolation points, thereby reducing the computational amount of image super-resolution processing, further reducing the power consumption of image super-resolution processing, achieving high-frame-rate real-time processing on the client, and improving the user experience.
[0070] Step 203, perform brightness analysis according to the color values respectively corresponding to the first preset number of neighboring points to obtain the brightness values respectively corresponding to the first preset number of neighboring points.
[0071] In some embodiments, the RGB color values corresponding to the first preset number of neighboring points may be obtained first, and then, based on the color values corresponding to the first preset number of neighboring points, the brightness values corresponding to the neighboring points may be calculated using a preset brightness calculation formula. For example, taking point A in Figure 3 as an example, the values of the three RGB channels of point A obtained through sampling are: A R , A G , A B . The preset brightness calculation formula can be expressed as A luma =(30*A R +59*A G +11*A B +50) / 100. According to the preset brightness calculation formula, the brightness value A luma of point A can be obtained. Similarly, using this formula, by substituting the RGB color values of points B, C, D, and E respectively, the brightness values B luma , C luma , D luma , and E luma corresponding to points B, C, D, and E can be obtained.
[0072] Step 204: Obtain the edge detection result of the interpolation point based on the brightness value.
[0073] In some embodiments, step 204 may specifically include: performing edge detection analysis based on the brightness value to determine whether the interpolation point is located in the edge region, and using the determination result as the edge detection result.
[0074] In some embodiments, after obtaining the brightness values corresponding to the first preset number of neighboring points, based on the brightness values corresponding to the first preset number of neighboring points, according to the preset edge detection formula, it can be determined whether the interpolation point is located in the edge region, and the determination result is used as the edge detection result of the interpolation point. Through this method, the accuracy of the edge detection result can be improved, and at the same time, the computational amount of edge detection for the interpolation point can be reduced, improving the efficiency of image super-resolution processing.
[0075] Exemplarily, the preset edge detection formula can be expressed as:
[0076] (A luma -E luma ) 2 +(B luma -D luma ) 2 <edgeThreshold
[0077] In the formula, edgeThreshold may represent a preset edge threshold. If the brightness values respectively corresponding to the first preset number of adjacent points satisfy the preset edge detection formula, it can be determined that the interpolation point is not located in the edge area; if the brightness values respectively corresponding to the first preset number of adjacent points do not satisfy the preset edge detection formula, it can be determined that the interpolation point is located in the edge area.
[0078] Step 205: Determine the color value of the interpolation point according to the edge detection result.
[0079] In some embodiments, step 204 may specifically include: if the interpolation point is located in the edge area, determine the color value of the interpolation point according to the second adjacent area, where the second adjacent area includes the second preset number of adjacent points adjacent to the interpolation point, and the second preset number is greater than the first preset number; if the interpolation point is not located in the edge area, determine the color value of the interpolation point according to the first adjacent area.
[0080] Exemplarily, if it is determined according to the edge detection result that the interpolation point is located in the edge area, the second preset number of adjacent points adjacent to the interpolation point can be selected to obtain the second adjacent area, and then the color value of the interpolation point can be determined according to the second adjacent area to improve the accuracy of calculating the color value of the interpolation point; if it is determined according to the edge detection result that the interpolation point is not located in the edge area, the color value of the interpolation point can be determined according to the first adjacent area, thereby reducing the calculation complexity of the color value of the interpolation point, further reducing the calculation amount of the image super-resolution processing, reducing the power consumption of the image super-resolution processing, realizing high-frame-rate real-time processing on the client side, and improving the user experience.
[0081] In some embodiments, determining the color value of the interpolation point according to the first adjacent area may specifically include: determining the first distances between the first preset number of adjacent points and the interpolation point respectively; according to the first distances, select the target adjacent point with the shortest distance to the interpolation point from the first preset number of adjacent points; determine the color value of the target adjacent point as the color value of the interpolation point.
[0082] Exemplarily, if the interpolation point is not located in the edge area, the first distances between the first preset number of adjacent points and the interpolation point can be calculated, and the first distances respectively corresponding to the first preset number of adjacent points can be sorted to determine the target adjacent point with the shortest distance to the interpolation point. As Figure 3 shown, through calculation, it can be determined that the target adjacent point with the shortest distance to point P is point C, then the color value of point C can be determined as the color value of point P. It should be noted that since point P is an interpolation point, its subscript is a decimal, different from the subscripts of points A, B, C, D, and E which are integers. Therefore, the position of the interpolation point is between two pixels, and point C is the nearest integer point to point P. Therefore, point P is within the square corresponding to point C.
[0083] In some embodiments, determining the color value of the interpolation point according to the second adjacent region may specifically include: obtaining the second distances between the second preset number of adjacent points and the interpolation point respectively; obtaining the weights corresponding to the second preset number of adjacent points respectively through a preset model; and determining the color value of the interpolation point according to the second distances and the weights corresponding to the second preset number of adjacent points respectively.
[0084] Exemplarily, as Figure 4 shown, if the interpolation point is located in the edge region, 8 adjacent points (P1, P2, P3, P4, P5, P6, P7, P8) adjacent to the interpolation point may be selected to form the second adjacent region, then the second distances between the 8 adjacent points and the interpolation point are calculated respectively, and the weights corresponding to the 8 adjacent points are obtained respectively through a preset model, and then the color value of the interpolation point is determined by using a preset color value calculation formula. Among them, the preset model may include a neural network model, and the preset color value calculation formula may be expressed as:
[0085]
[0086] In the formula, P is the color value of the interpolation point, P i may represent the i-th adjacent point in the second adjacent region, x i may represent P i to the second distance of the interpolation point, and f(x i ) may represent the weight output by the preset model.
[0087] Step 206, generate a second-resolution image according to the color value of the interpolation point, and the resolution of the second-resolution image is higher than that of the first-resolution image.
[0088] In some embodiments, step 206 may specifically include: determining the target color value of the sharpened interpolation point according to the color value of the interpolation point and the color values corresponding to the first preset number of adjacent points respectively; and generating a second-resolution image according to the target color value.
[0089] Exemplarily, based on the color value of the interpolation point and the color values corresponding to the first preset number of adjacent points respectively, a preset sharpening formula may be used to sharpen the color value of the interpolation point, and then a high-resolution second-resolution image is generated according to the sharpened target color value, so as to further improve the image quality, enhance the visual effect, and improve the user experience. Among them, the preset sharpening formula may be expressed as:
[0090] P sharp = P + w * (P - g(y) * (A + B + E + D))
[0091] In the formula, P sharpThe target color value that can represent the sharpened interpolation point can be used as the final upsampling result. A, B, D, and E can respectively represent the sampled point colors of points A, B, D, and E in the first adjacent region. w can represent the preset sharpness intensity weight, g(y) can represent the sharpness sampling weight, and y can represent the luminance difference calculated based on the luminances of points A, B, D, and E. The calculation formula of y can be expressed as:
[0092] y = (A luma - E luma ) 2 + (B luma - D luma ) 2
[0093] Compared with the prior art, in this embodiment, a calculation method for determining the color value of the interpolation point can be determined according to the edge detection result, and the color value of the interpolation point can be obtained by a method with relatively low computational complexity, thereby reducing the computational amount of image super-resolution processing, further reducing the power consumption of image super-resolution processing, achieving high-frame-rate real-time processing on the client side, improving the user experience, and at the same time being able to perform edge detection based on the color values of the first preset number of adjacent points, improving the accuracy of edge detection, and adopting sharpening processing to improve the image quality and enhance the visual effect.
[0094] Figure 5 is a block diagram of an image processing apparatus shown according to some embodiments of the present disclosure. Referring to Figure 5 , the apparatus includes: a determination module 31, an acquisition module 32, and a generation module 33.
[0095] The determination module 31 is configured to determine the interpolation points in the first-resolution image;
[0096] The acquisition module 32 is configured to acquire the first adjacent region of the interpolation point;
[0097] The acquisition module 32 is configured to perform edge detection on the interpolation point by using the first adjacent region to obtain the edge detection result of the interpolation point;
[0098] The determination module 31 is configured to determine the color value of the interpolation point according to the edge detection result;
[0099] The generation module 33 is configured to generate a second-resolution image based on the color value of the interpolation point, and the resolution of the second-resolution image is higher than the resolution of the first-resolution image.
[0100] In some embodiments, the first adjacent region includes a first preset number of adjacent points adjacent to the interpolation point; the obtaining module 32 is specifically configured to perform brightness analysis based on the color values respectively corresponding to the first preset number of adjacent points to obtain the brightness values respectively corresponding to the first preset number of adjacent points; and based on the brightness values, obtain the edge detection result of the interpolation point.
[0101] In some embodiments, the obtaining module 32 is specifically configured to perform edge detection analysis based on the brightness values to determine whether the interpolation point is located in the edge region, and use the determination result as the edge detection result.
[0102] In some embodiments, the determining module 31 is specifically configured to, if the interpolation point is located in the edge region, determine the color value of the interpolation point according to the second adjacent region, where the second adjacent region includes a second preset number of adjacent points adjacent to the interpolation point, and the second preset number is greater than the first preset number; if the interpolation point is not located in the edge region, determine the color value of the interpolation point according to the first adjacent region.
[0103] In some embodiments, the determining module 31 is specifically configured to obtain the second distances between the second preset number of adjacent points and the interpolation point respectively; obtain the weights respectively corresponding to the second preset number of adjacent points through a preset model; and determine the color value of the interpolation point according to the second distances and the weights respectively corresponding to the second preset number of adjacent points.
[0104] In some embodiments, the generating module 33 is specifically configured to determine the target color value of the sharpened interpolation point according to the color value of the interpolation point and the color values respectively corresponding to the first preset number of adjacent points; and generate a second-resolution image based on the target color value.
[0105] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0106] Based on the above method as Figures 1 to 2 shown, correspondingly, this embodiment also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method as Figures 1 to 2 shown is implemented.
[0107] Based on the above method as Figures 1 to 2 shown, correspondingly, this embodiment also provides a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the above method as Figures 1 to 2 shown is implemented.
[0108] Based on such an understanding, the technical solution of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes several instructions for causing a computer device (such as a personal computer, a server, or a network device, etc.) to execute the methods of various implementation scenarios of the present disclosure.
[0109] Based on the above-mentioned method as Figures 1 to 2 shown, and Figure 5 the virtual device embodiment as shown, for the purpose of achieving the above object, an embodiment of the present disclosure further provides an electronic device, such as a smart phone, a smart watch, a smart bracelet, a tablet computer, a drone, a smart robot, a server, etc. The device includes a storage medium and a processor; the storage medium is used for storing a computer program; the processor is used for executing the computer program to implement the method as Figures 1 to 2 shown.
[0110] Optionally, the above-mentioned physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, sensors, an audio circuit, a WI-FI module, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc. Optionally, the user interface may further include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0111] Those skilled in the art can understand that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine some components, or have different component arrangements.
[0112] The storage medium may further include an operating system and a network communication module. The operating system is a program for managing the hardware and software resources of the above-mentioned physical device, and supports the operation of an information processing program and other software and / or programs. The network communication module is used for implementing communication between components inside the storage medium, and communication between other hardware and software in the information processing physical device.
[0113] Based on the above-mentioned method as Figures 1 to 2 shown, and Figure 5 the virtual device embodiment as shown, this embodiment further provides a chip, including one or more interface circuits and one or more processors; the interface circuit is used for receiving a signal from the memory of the electronic device and sending the signal to the processor, and the signal includes computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to execute the method as Figures 1 to 2 shown.
[0114] Through the description of the above embodiments, those skilled in the art can clearly understand that the present disclosure can be implemented by means of software plus a necessary general hardware platform, or can also be implemented by hardware. By applying the solution of this embodiment, compared with the current existing technologies, this embodiment can determine the calculation method of the color value of the interpolation point according to the edge detection result, obtain the color value of the interpolation point by a method with a relatively low computational complexity, thereby reducing the computational amount of image super-resolution processing, and further reducing the power consumption of image super-resolution processing, achieving high-frame-rate real-time processing on the client side, improving the user experience, and at the same time being able to perform edge detection based on the color values of the first preset number of adjacent points, improving the accuracy of edge detection, and adopting sharpening processing to improve the image quality and enhance the visual effect.
[0115] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or device including the said element.
[0116] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but will be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An image processing method, characterized in that, Including: Determine interpolation points in the first-resolution image; Obtain the first adjacent region of the interpolation points; Perform edge detection on the interpolation points using the first adjacent region to obtain the edge detection result of the interpolation points; Determine the color value of the interpolation points according to the edge detection result; Generate a second-resolution image based on the color value of the interpolation points, where the resolution of the second-resolution image is higher than that of the first-resolution image.
2. The method according to claim 1, characterized in that, The first adjacent region includes the first preset number of adjacent points adjacent to the interpolation points in distance; The performing edge detection on the interpolation points using the first adjacent region to obtain the edge detection result of the interpolation points includes: Perform brightness analysis according to the color values respectively corresponding to the first preset number of adjacent points to obtain the brightness values respectively corresponding to the first preset number of adjacent points; Based on the brightness values, obtain the edge detection result of the interpolation points.
3. The method according to claim 2, wherein The obtaining the edge detection result of the interpolation points based on the brightness values includes: Perform edge detection analysis based on the brightness values to determine whether the interpolation points are located in the edge region, and use the judgment result as the edge detection result.
4. The method according to claim 3, wherein The determining the color value of the interpolation points according to the edge detection result includes: If the interpolation points are located in the edge region, determine the color value of the interpolation points according to the second adjacent region, where the second adjacent region includes the second preset number of adjacent points adjacent to the interpolation points in distance, and the second preset number is greater than the first preset number; If the interpolation points are not located in the edge region, determine the color value of the interpolation points according to the first adjacent region.
5. The method according to claim 4, wherein The determining the color value of the interpolation points according to the first adjacent region includes: Determine the first distances between the first preset number of adjacent points and the interpolation points respectively; According to the first distances, select the target adjacent point with the closest distance to the interpolation point from the first preset number of adjacent points; Determine the color value of the target adjacent point as the color value of the interpolation points.
6. The method according to claim 4, characterized in that, The determining the color value of the interpolation points according to the second adjacent region includes: Obtain the second distances between the second preset number of adjacent points and the interpolation points respectively; Obtain the weights respectively corresponding to the second preset number of adjacent points through a preset model; Determine the color value of the interpolation points according to the second distances and the weights respectively corresponding to the second preset number of adjacent points.
7. The method according to claim 6, characterized in that The generating a second-resolution image based on the color value of the interpolation points includes: Determine the target color value of the sharpened interpolation points according to the color value of the interpolation points and the color values respectively corresponding to the first preset number of adjacent points; Generate the second-resolution image based on the target color value.
8. An image processing apparatus, characterized in that, Including: A determining module configured to determine interpolation points in the first-resolution image; An obtaining module configured to obtain the first adjacent region of the interpolation points; An obtaining module configured to perform edge detection on the interpolation points using the first adjacent region to obtain the edge detection result of the interpolation points; A determination module, configured to determine a color value of the interpolation point according to the edge detection result; A generation module, configured to generate a second-resolution image based on the color value of the interpolation point, where the resolution of the second-resolution image is higher than that of the first-resolution image.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product having a computer program stored thereon, characterized in that, When the computer program product is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
12. A chip, characterized in that, Comprising one or more interface circuits and one or more processors; the interface circuit is configured to receive a signal from a memory of an electronic device and send the signal to the processor, where the signal includes computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to execute the method according to any one of claims 1 to 7.