Image processing method and device, electronic equipment and storage medium
By determining the area where the target object is located in image processing and applying a variety of image processing technologies, the problem of image quality decline is solved, and image quality improvement and application value enhancement are achieved.
Patent Information
- Application Number
- CN202311541388.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2025-05-20
AI Technical Summary
The quality decline caused by equipment performance, algorithm design and compression technology during the generation, processing, transmission and display of images affects visual experience and information understanding.
By determining the area where the target object is located in the target image, the target image is processed to improve the image quality. Specific methods include beauty treatment, super-subdivision treatment, defuzzing treatment, noise reduction treatment, brightening treatment and color enhancement treatment.
The image quality of the target image is improved, making it higher than the image quality before processing, and improving the application value and visual experience of the image.
Smart Images

Figure CN120020862A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, electronic device, and storage medium. Background Art
[0002] In today's information age, images, as an important information carrier, are widely used in various fields, such as news media, advertising, science, education, culture, and social media. Images have rich visual expressiveness and can also convey rich information, so they play an increasingly important role in people's lives.
[0003] However, with the wide popularization of image applications, the quality problems of images have become increasingly prominent. During the processes of image generation, processing, transmission, and display, due to the influence of various factors, such as device performance, algorithm design, compression technology, etc., the quality of images may decline. This decline in quality not only affects people's visual experience but may also affect the understanding and use of image information. Therefore, improving image quality has become an urgent problem to be solved. Summary of the Invention
[0004] To solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image processing method, apparatus, electronic device, and storage medium.
[0005] In a first aspect, the present disclosure provides an image processing method, including:
[0006] Obtaining a target image;
[0007] Determining a target object in the target image;
[0008] Processing the target image according to the region where the target object in the target image is located, so that the image quality of the processed target image is higher than that of the target image before processing.
[0009] In a second aspect, the present disclosure further provides an image processing apparatus, including:
[0010] An obtaining module, configured to obtain a target image;
[0011] A determining module, configured to determine a target object in the target image;
[0012] A processing module, configured to process the target image according to the region where the target object in the target image is located, so that the image quality of the processed target image is higher than that of the target image before processing.
[0013] In a third aspect, the present disclosure further provides an electronic device, where the electronic device includes:
[0014] One or more processors;
[0015] A storage device for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described above.
[0017] In a fourth aspect, the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the image processing method as described above is implemented.
[0018] The technical solution provided by the embodiments of the present disclosure has the following advantages compared with the prior art:
[0019] The technical solution provided by the embodiments of the present disclosure determines a target object in a target image; processes the target image according to the region where the target object is located in the target image, so that the image quality of the processed target image is higher than that of the target image before processing. In essence, a method for improving the image quality is given. By using this method, the image quality of the target image can be improved and the application value of the image can be enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure.
[0021] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0022] Figure 1 Is a flowchart of an image processing method provided by an embodiment of the present disclosure;
[0023] Figure 2 And Figure 3 Are two target images provided by an embodiment of the present disclosure;
[0024] Figure 4 Is a flowchart of an image processing method provided by an embodiment of the present disclosure;
[0025] Figure 5 Is a schematic structural diagram of an image processing device in an embodiment of the present disclosure;
[0026] Figure 6 Is a schematic structural diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] In order to more clearly understand the above-mentioned objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0028] Many specific details are set forth in the following description in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all of the embodiments.
[0029] Figure 1 The flowchart of an image processing method provided for an embodiment of the present disclosure. This embodiment is applicable to the case of image processing in a client. This method can be executed by an image processing device, which can be implemented in a software and / or hardware manner, and the device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a personal digital assistant, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one computer, a smart home device, etc. Or, this embodiment is applicable to the case of image processing in a server, and this method can be executed by an image processing device, which can be implemented in a software and / or hardware manner, and the device can be configured in an electronic device, such as a server.
[0030] As Figure 1 shown, the method may specifically include:
[0031] S110. Obtain a target image.
[0032] The target image may be, for example, an image for which the image quality is desired to be improved.
[0033] The present application places no restrictions on the source of the target image. Exemplarily, the target image may be taken by a user or downloaded by the user from the network.
[0034] S120. Determine a target object in the target image.
[0035] The target object may be the main body reflected in the target image, which may specifically be a person, an animal, a building, etc. In some scenarios, the target object is the focus point in the target image. The focus point refers to a point or area that is clearly captured during the shooting process. The focus point is usually the clearest and has the richest details in the target image.
[0036] In practice, the target object in the target image can be determined according to a preset rule. The preset rule can, for example, indicate under what circumstances what kind of thing is regarded as the target object. Exemplarily, the preset rule includes that if the target image includes a person or an animal, the target object is the face of the person and / or the animal; if the target image is a landscape photo that does not include a person or an animal, the target object can be a plant or a building located in the middle area of the image, etc.
[0037] S130. Process the target image according to the area where the target object in the target image is located, so that the image quality of the processed target image is higher than that of the target image before processing.
[0038] There are various implementation methods for this step, and this application does not limit it. Exemplarily, the implementation method of this step includes: determining a candidate area according to the area where the target object in the target image is located; using a first repair strategy to repair the area where the target object in the target image is located to obtain a first image; using a second repair strategy to repair the candidate area of the first image to obtain the repaired target image.
[0039] The first image can be, for example, the result of repairing the area where the target object in the target image is located.
[0040] The candidate area can be, for example, the other areas in the target image except the area where the target object is located. The candidate area reflects the other things in the target image except the target object, such as the background and / or the foreground. Exemplarily, taking an image of a person standing in front of a building as an example, if the target object is determined to be the entire person, then the candidate area includes all things except the person, such as the building, the sky, and the ground, etc.; if the target object is determined to be the face of the person, then the candidate area includes the building, the sky, the ground, the torso and limbs of the person, etc.
[0041] Both the first repair strategy and the second repair strategy can be a series of image processing steps. The first repair strategy and the second repair strategy are used to repair different areas. The reason for such a setting is that the things included in different areas are different, have different characteristics, and play different roles in the target image. By using different repair strategies for repair, the objects in different areas (that is, the things included in different areas) can better play their respective roles and express the meaning of the image. For example, the target object in the target image can better reflect the theme and content, and the background things can better create the atmosphere, environment, etc.
[0042] In practice, the first restoration strategy may include different contents depending on the target object. For example, if the target object is a face, the first restoration strategy is used to restore the target object region in the target image to obtain the first image, including: performing beauty processing on the face in the target image to obtain the first image.
[0043] The first image is an image after the face in the target image is beautified. The beautification process may specifically include at least one of the following: whitening, skin resurfacing, freckle and acne removal, face slimming, enlarging eyes, brightening eyes, removing dark circles, and teeth whitening.
[0044] Furthermore, a second restoration strategy is adopted to restore the candidate area of the first image, including: restoring the first image to obtain a second image; intercepting the candidate area in the second image to obtain a third image; and synthesizing the third image with the first image to obtain a restored target image.
[0045] The second image is the result of repairing the entire screen of the first image. The entire screen of the first image includes the candidate area and the area where the target object is located. The third image is the result of the cutout of the candidate area in the second image, which only includes the candidate area. Paste the third image back to the first image to obtain the repaired target image.
[0046] Furthermore, it can be set to repair the first image according to the global features of the first image to obtain the second image. The global features of the first image include the features of the candidate area and the features of the area where the target object is located. The essence of repairing the first image according to the global features of the first image is to decide how to repair the first image and the degree of repair from the perspective of improving the overall visual effect of the first image; rather than deciding how to repair the first image and the degree of repair based solely on the features of the candidate area in the first image. Exemplarily, assuming that the candidate area needs to be deblurred, the degree of deblurring is decided based on the overall blurriness of the first image. Rather than deciding the degree of deblurring only by the blurriness of the candidate area. In this way, the repaired target image can be made harmonious and aesthetically pleasing as a whole.
[0047] It should also be noted that, since the target object in the first image has been repaired by the first repair strategy, in the process of executing "repairing the first image to obtain the second image", the target object that has been repaired by the first repair strategy may become deformed or blurred. By setting the interception of the candidate area in the second image to obtain the third image; synthesizing the third image with the first image to obtain the repaired target image, the repair result of the target object using the first repair strategy can be kept unchanged.
[0048] Further, it is possible to set the first image to be repaired to obtain a second image, including: determining the resolution of the first image; if the resolution of the first image is less than or equal to a set resolution threshold, performing super-resolution processing on the first image to obtain a second image; if the resolution of the first image is greater than the set resolution threshold, performing deblurring processing on the first image to obtain a second image.
[0049] In practice, a trained deblurring model can be used to perform deblurring processing on the first image.
[0050] The method for training the deblurring model can include: obtaining a first sample image with a resolution higher than a preset resolution and a clarity higher than a preset clarity, deteriorating the first sample image to obtain a second sample image corresponding to the first sample image; using the first sample image and the second sample image to train the deblurring model. Among them, deteriorating the first sample image includes at least one of the following: performing Gaussian filtering on the first sample image; performing mean filtering on the first sample image; compressing the first sample image.
[0051] In practice, a trained super-resolution model can be used to perform super-resolution processing on the first image.
[0052] On the basis of the above technical solution, optionally, after adopting a second repair strategy to repair the candidate area of the first image to obtain a repaired target image, it further includes: performing color enhancement processing on the repaired target image.
[0053] In practice, a trained color enhancement model can be used to repair the non-target area in the first image to obtain a repaired target image.
[0054] The training method of the color enhancement model can include: obtaining a third sample image, deteriorating the third sample image to obtain a fourth sample image corresponding to the third sample image; using the third sample image and the fourth sample image to train the color enhancement model. Among them, deteriorating the third sample image includes at least one of the following: performing brightness change processing, color change processing, compression distortion processing, and mask addition processing on the third sample image.
[0055] The above technical solution determines the target object in the target image; processes the target image according to the area where the target object in the target image is located, so that the image quality of the processed target image is higher than that of the target image before processing. In essence, it gives a method for improving the image quality. By adopting this method, the image quality of the target image can be improved and the application value of the image can be enhanced.
[0056] Further, based on the above technical solution, optionally, if the target image is a night scene image, before using the first restoration strategy to restore the area where the target object is located in the target image to obtain the first image, the method further includes: performing noise reduction processing and / or brightening processing on the target image.
[0057] Due to reasons such as insufficient light and low contrast, night scene images often appear blurred and unclear. Merely relying on beauty processing, super-resolution processing, or de-blurring processing, etc., in many cases, it is not enough to significantly improve the image quality. In view of this, optionally, if the target image is a night scene image, before using the first restoration strategy to restore the area where the target object is located in the target image to obtain the first image, it further includes: performing noise reduction processing and / or brightening processing on the target image.
[0058] If noise reduction processing needs to be performed on the target image, the trained noise reduction model can be used to perform noise reduction processing on the target image.
[0059] The training method of the noise reduction model can include: obtaining a fifth sample image with a clarity higher than a preset clarity; adding noise to the fifth sample image to obtain a sixth sample image corresponding to the fifth sample image; using the fifth sample image and the sixth sample image to train the noise reduction model. Among them, adding noise to the fifth sample image includes adding different forms of noise such as Gaussian noise and Poisson noise to the fifth sample image.
[0060] If brightening processing needs to be performed on the target image, the trained brightening model can be used to perform brightening processing on the target image.
[0061] The training method of the brightening model can include: obtaining a seventh sample image with a brightness higher than a preset brightness threshold; performing a darkening process on the seventh sample image to obtain an eighth sample image corresponding to the seventh sample image; using the seventh sample image and the eighth sample image to train the brightening model.
[0062] In practice, it can be determined whether the target image is a night scene image through an image classification model. The image classification model can be a trained convolutional neural network.
[0063] Figure 2 and Figure 3 are two target images provided by embodiments of the present disclosure. Figure 4 is a flowchart of an image processing method provided by an embodiment of the present disclosure.
[0064] Suppose Figure 2 and Figure 3 The target images in represent a photo of a person in front of a building. Taking the person's face as the target object, the areas where the person's limbs, torso, and background (including the building) are located are all candidate areas. Among them,Figure 2 is a non-night scene image, Figure 3 is a night scene image.
[0065] See Figure 4 , assuming that the target image in Figure 2 is processed. Since it is a non-night scene image, first perform beauty processing on the face in Figure 2 , and then determine whether to perform super-resolution processing or de-blurring processing on it according to the resolution of the Figure 2 image. Perform color enhancement processing on the image after super-resolution processing or de-blurring processing to obtain an image with improved image quality. Assuming that the target image in Figure 3 is processed. Since it is a night scene image, first perform noise reduction processing on Figure 3 , then perform brightening processing on it, then perform beauty processing on the face in the figure, and then determine whether to perform super-resolution processing or de-blurring processing on it according to the resolution of the image. Perform color enhancement processing on the image after super-resolution processing or de-blurring processing to obtain an image with improved image quality.
[0066] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0067] For example, when responding to the user's active request, send a prompt message to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application program, server, or storage medium that executes the operation of the technical solution of the present disclosure according to the prompt message.
[0068] As an optional but non-limiting implementation manner, the way of sending a prompt message to the user in response to receiving the user's active request can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0069] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation manner of the present disclosure. Other ways that meet relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0070] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0071] Figure 5 FIG. is a schematic structural diagram of an image processing device in an embodiment of the present disclosure. The image processing device provided by the embodiments of the present disclosure can be configured in a client or can be configured in a server. Refer to Figure 5 , the image processing device specifically includes:
[0072] An acquisition module 310, configured to acquire a target image;
[0073] A determination module 320, configured to determine a target object in the target image;
[0074] A processing module 330, configured to process the target image according to the area where the target object in the target image is located, so that the image quality of the processed target image is higher than that of the target image before processing.
[0075] Further, the processing module 330 is configured to:
[0076] Determine a candidate area according to the area where the target object in the target image is located;
[0077] Adopt a first repair strategy to repair the area where the target object in the target image is located to obtain a first image;
[0078] Adopt a second repair strategy to repair the candidate area of the first image to obtain a repaired target image.
[0079] Further, the processing module 330 is configured to:
[0080] Repair the first image to obtain a second image;
[0081] Intercept the candidate area in the second image to obtain a third image;
[0082] Synthesize the third image and the first image to obtain a repaired target image.
[0083] Further, the processing module 330 is configured to:
[0084] Repair the first image according to the global feature of the first image to obtain a second image.
[0085] Further, the processing module 330 is configured to:
[0086] Determine the resolution of the first image;
[0087] If the resolution of the first image is less than or equal to a set resolution threshold, perform super-resolution processing on the first image to obtain a second image;
[0088] If the resolution of the first image is greater than the set resolution threshold, perform de-blurring processing on the first image to obtain a second image.
[0089] Further, the processing module 330 is configured to repair the candidate region of the first image to obtain a repaired target image, and then perform color enhancement processing on the repaired target image.
[0090] Further, if the target image is a night scene image, the processing module 330 is configured to perform noise reduction processing and / or brightening processing on the target image before using a first repair strategy to repair the region where the target object is located in the target image to obtain a first image.
[0091] The image processing apparatus provided by the embodiments of the present disclosure can execute the steps executed by the client or the server in the image processing method provided by the method embodiments of the present disclosure, and has the execution steps and beneficial effects, which will not be elaborated here.
[0092] Figure 6 It is a schematic structural diagram of an electronic device in the embodiments of the present disclosure. Specifically, refer to Figure 6 , which shows a schematic structural diagram of the electronic device 1000 suitable for implementing the embodiments of the present disclosure. The electronic device 1000 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage ranges of the embodiments of the present disclosure.
[0093] Such as Figure 6As shown, the electronic device 1000 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1001, which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage device 1008 into the random access memory (RAM) 1003 to implement the image processing method of the embodiments as described in the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. The input / output (I / O) interface 1005 is also connected to the bus 1004.
[0094] Generally, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or wirelesly to exchange information. Although Figure 6 an electronic device 1000 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices may be implemented or had alternatively.
[0095] Particularly, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart, so as to implement the image processing method as described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the method of the embodiment of the present disclosure are executed.
[0096] It should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include an information signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated information signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0097] In some embodiments, the client and the server can communicate using any known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital information in any form or medium (e.g., a communication network). Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any known or future-developed networks.
[0098] The above computer-readable medium can be included in the above electronic device; or it can exist separately and not be assembled into the electronic device.
[0099] The above computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is caused to:
[0100] Obtain a target image;
[0101] Determine the target object in the target image;
[0102] Process the target image according to the area where the target object in the target image is located, so that the image quality of the processed target image is higher than that of the target image before processing.
[0103] Optionally, when one or more of the above programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0104] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The above programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0106] The units described in the embodiments of the present disclosure may be implemented in software or in hardware. Wherein, the name of the unit does not constitute a limitation to the unit itself in some cases.
[0107] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0108] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or Flash Memory), an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0110] One or more processors;
[0111] A memory for storing one or more programs;
[0112] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the image processing methods provided by the present disclosure.
[0113] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements any of the image processing methods provided by the present disclosure.
[0114] The embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the image processing method as described above.
[0115] It should be noted that in this document, 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 actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising 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 the embodiments described herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image processing method, characterized in that: include: Get the target image; determining a target object in the target image; The target image is processed according to the area where the target object in the target image is located, so that the image quality of the processed target image is higher than the image quality of the target image before the processing.
2. The method according to claim 1, characterized in that The processing of the target image according to the area where the target object in the target image is located includes: Determine a candidate region according to a region where a target object in the target image is located; Using a first restoration strategy, the target object region in the target image is restored to obtain a first image; The second restoration strategy is adopted to restore the candidate area of the first image to obtain a restored target image.
3. The method according to claim 2, characterized in that The adopting the second restoration strategy to restore the candidate area of the first image includes: Restoring the first image to obtain a second image; intercepting a candidate area in the second image to obtain a third image; The third image is synthesized with the first image to obtain a restored target image.
4. The method according to claim 3, characterized in that The repairing of the first image to obtain a second image includes: The first image is restored according to the global features of the first image to obtain a second image.
5. The method according to claim 3, characterized in that: The repairing of the first image to obtain a second image includes: determining a resolution of the first image; If the resolution of the first image is less than or equal to a set resolution threshold, super-resolution processing is performed on the first image to obtain a second image; If the resolution of the first image is greater than a set resolution threshold, the first image is deblurred to obtain a second image.
6. The method according to claim 2, characterized in that After the second restoration strategy is adopted to restore the candidate area of the first image to obtain the restored target image, the method further includes: Performing color enhancement processing on the restored target image.
7. The method according to claim 2, characterized in that If the target image is a night scene image, the first restoration strategy is adopted to restore the area where the target object is located in the target image, before obtaining the first image, the method further includes: The target image is subjected to noise reduction and / or brightening processing.
8. An image processing device, characterized in that: include: An acquisition module, used for acquiring a target image; A determination module, used for determining a target object in the target image; The processing module is used to process the target image according to the area where the target object in the target image is located, so that the image quality of the processed target image is higher than the image quality of the target image before processing.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.