Image processing method and apparatus, device, and medium

By automatically identifying the center of the light source and performing radial blurring through image post-processing technology, the problem of shooting devices being unable to capture radial light effects is solved, and the image effect with radial light effects is generated efficiently.

WO2026066965A1PCT designated stage Publication Date: 2026-04-02BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing shooting equipment struggles to capture realistic radial light effects due to limitations in lens optical design and sensor hardware performance, resulting in image quality that fails to meet user needs.

Method used

By acquiring pixel information from an image, the center of the target light source is automatically identified and radially blurred to generate a target image, achieving a radial light effect.

Benefits of technology

It is not limited by the hardware performance of the shooting equipment, and can easily generate images with radial light effects through image post-processing to meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025119045_02042026_PF_FP_ABST
    Figure CN2025119045_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure relate to an image processing method and apparatus, a device, and a medium. The image processing method comprises: acquiring a first image to be processed; determining a target light source center from the first image on the basis of pixel point information of the first image; performing radial blur processing on the basis of the target light source center and a preset blur radius to obtain a blur processing result; and generating a target image according to the first image and the blur processing result. The embodiments of the present disclosure can conveniently and quickly achieve a radial light effect, thereby better meeting user requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing method, device, equipment and medium

[0001] Cross-reference to Related Applications

[0002] This application claims priority to Chinese Patent Application No. 202411355179.2, filed on September 26, 2024, the disclosure of which is incorporated herein in its entirety as part of the present application. TECHNICAL FIELD

[0003] The present disclosure relates to an image processing method, device, equipment and medium. BACKGROUND

[0004] Generally, the light emitted by high-light sources such as street lamps appears to the naked eye as a radial halo effect, but some photographing devices such as mobile phones are limited by hardware performance such as lens optical design and photosensitive element design, and it is basically difficult to take a real radial light effect, and the image obtained by shooting is difficult to meet the user's demand. SUMMARY

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image processing method, device, equipment and medium.

[0006] The present disclosure provides an image processing method, which comprises: acquiring a first image to be processed; determining a target light source center from the first image based on pixel point information of the first image; performing radial blur processing based on the target light source center and a preset blur radius to obtain a blur processing result; and generating a target image according to the first image and the blur processing result.

[0007] Optionally, the pixel point information of the first image comprises a value corresponding to a specified channel of a pixel point in the first image; the target light source center is determined from the first image based on the pixel point information of the first image, comprising: acquiring a first threshold value corresponding to the specified channel; based on a comparison result of the value corresponding to the specified channel of the pixel point in the first image and the first threshold value, high-light pixel points are screened out from the first image; wherein the value of the specified channel corresponding to the high-light pixel point is higher than the first threshold value corresponding to the specified channel; and the target light source center is determined based on the high-light pixel points.

[0008] Optionally, the target light source center is determined based on the high-light pixel points, comprising: acquiring a target connected domain corresponding to the high-light pixel points; wherein the size of the target connected domain is within a preset size range, and the number of the target connected domain is one or more; and the target light source center is obtained based on the center of the target connected domain.

[0009] Optionally, the obtaining the target connected domain corresponding to the highlight pixel point comprises: obtaining a highlight region formed by the highlight pixel point; processing the highlight region by using an image morphological algorithm to obtain a candidate connected domain; and filtering the target connected domain from the candidate connected domain based on a pixel point number of the candidate connected domain and a preset size range.

[0010] Optionally, the radial blur processing based on the target light source center and a preset blur radius to obtain a blur processing result comprises: determining a target pixel point to be involved in the blur processing from the first image based on pixel point information of the first image; and performing radial blur processing based on the target pixel point, the target light source center, and the preset blur radius to obtain the blur processing result.

[0011] Optionally, the pixel point information of the first image comprises a value corresponding to a designated channel of a pixel point in the first image; the determining the target pixel point to be involved in the blur processing from the first image based on the pixel point information of the first image comprises: obtaining a second threshold value corresponding to the designated channel; and filtering the target pixel point to be involved in the blur processing from the first image based on a comparison result of the value corresponding to the designated channel of the pixel point in the first image and the second threshold value; and wherein the value corresponding to the designated channel of the target pixel point is higher than the second threshold value corresponding to the designated channel.

[0012] Optionally, the blur processing result comprises a target blur value corresponding to the target pixel point; and the radial blur processing based on the target pixel point, the target light source center, and the preset blur radius to obtain the blur processing result comprises: determining an associated light source center corresponding to the target pixel point; wherein the associated light source center corresponding to the target pixel point is a target light source center having a distance from the target pixel point less than the blur radius; performing radial blur processing on the target pixel point, the target light source center, and the preset blur radius to obtain a radial blur value of the target pixel point relative to the associated light source center; and obtaining the target blur value corresponding to the target pixel point based on the radial blur value of the target pixel point relative to the associated light source center.

[0013] Optionally, the obtaining the target blur value corresponding to the target pixel point based on the radial blur value of the target pixel point relative to the associated light source center comprises: in a case where the associated light source center corresponding to the target pixel point is multiple, superimposing the radial blur value of the target pixel point relative to each of the associated light source centers, and obtaining the target blur value corresponding to the target pixel point based on a superimposition processing result.

[0014] The embodiment of the present disclosure further provides an image processing device, comprising: an image acquisition module, configured to acquire a first image to be processed; a center determination module, configured to determine a target light source center from the first image based on pixel point information of the first image; a blur processing module, configured to perform radial blur processing based on the target light source center and a preset blur radius to obtain a blur processing result; and an image generation module, configured to generate a target image according to the first image and the blur processing result.

[0015] The embodiment of the present disclosure further provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; and the processor is configured to read the executable instructions from the memory and execute the instructions to implement the image processing method provided by the embodiment of the present disclosure.

[0016] The embodiment of the present disclosure further provides a computer readable storage medium, which stores a computer program, and the computer program is used to execute the image processing method provided by the embodiment of the present disclosure.

[0017] It should be understood that the contents described in this part are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the embodiment description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0020] FIG. 1 is a flow diagram of an image processing method provided by an embodiment of the present disclosure;

[0021] FIG. 2 is a flow diagram of an image processing method provided by an embodiment of the present disclosure;

[0022] FIG. 3 is a diagram illustrating an image processing effect provided by an embodiment of the present disclosure;

[0023] FIG. 4 is a diagram illustrating a structure of an image processing device provided by an embodiment of the present disclosure; and

[0024] FIG. 5 is a diagram illustrating a structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to enable a more clear understanding of the above-mentioned objects, features and advantages of the present disclosure, the schemes of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0026] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure, but the present disclosure can also be implemented in other different manners from those described herein; obviously, the embodiments described in the specification are only a part of the embodiments of the present disclosure, and not all the embodiments.

[0027] FIG. 1 is a flow diagram of an image processing method provided by an embodiment of the present disclosure, which can be executed by an image processing apparatus. The apparatus can be implemented by software and / or hardware, and can be integrated in an electronic device in general. As shown in FIG. 1, the method mainly includes the following steps S102-S108:

[0028] In step S102, a first image to be processed is acquired. The first image is an image for which a radial light effect is to be generated. The first image usually contains one or more light sources, such as street lamps, ceiling lamps, decorative lamps, etc., which are not limited herein.

[0029] In step S104, a target light source center is determined from the first image based on pixel point information of the first image. The pixel point information of the first image may, for example, include a value corresponding to a specified channel of a pixel point in the first image, such as a value corresponding to a red channel, a green channel, a blue channel, a luminance channel, etc. The pixel point information of the first image helps to conveniently and efficiently identify the light source center in the first image. Generally, the value corresponding to the specified channel of the pixel point as the light source center is higher than the values corresponding to the specified channels of the surrounding pixel points.

[0030] In step S106, radial blur processing is performed based on the target light source center and a preset blur radius to obtain a blur processing result. In actual applications, the radial blur processing can be performed with the target light source center as the center point, and the blur range can be limited by the blur radius. The inventors have found through research that in the related art, the radial blur processing usually requires a user to specify a center point in an image, and then performs radial blur in the full image range based on the center point. If this approach is still used, not only does the user need to manually specify the light source center, but also the number of light source centers needs to be limited to one, which has a large limitation. In the embodiments of the present disclosure, the light source center can be automatically identified based on the pixel point information, and the number of light source centers does not need to be limited, i.e., the number of target light source centers can be one or more. By limiting the blur radius, each light source center can perform radial blur processing within the corresponding blur radius range, so that a radial light effect can be presented for multiple light sources in one image.

[0031] Step S108, generating a target image according to the first image and the blur processing result.

[0032] In actual applications, the first image and the blur processing result can be fused to obtain the target image. For details, refer to related fusion techniques, which are not limited herein.

[0033] The above method does not need to be limited by the hardware performance of the shooting device, and the radial light effect can be achieved through image post-processing. Moreover, the user does not need to manually specify the light source center, and the number of light source centers does not need to be limited. The light source center can be automatically identified from the image based on the pixel point information within a certain range and subjected to radial blur processing, which helps to present the light source center in the image with a radial halo effect, and better meets the user demand.

[0034] In some embodiments, the pixel point information of the first image includes a value corresponding to a pixel point in the first image in a specified channel; and the step S104, i.e., determining the target light source center from the first image based on the pixel point information of the first image, can be performed by referring to the following steps A to C:

[0035] Step A, obtaining a first threshold value corresponding to the specified channel. The specified channel can be one or more of the red channel (R channel), the green channel (G channel), the blue channel (B channel), and the brightness channel, which can be flexibly set according to the demand, and is not limited herein. It should be noted that the first threshold value corresponding to different specified channels can be the same or different, and the first threshold value corresponding to each channel can be set according to the demand.

[0036] Step B, based on the comparison result of the value corresponding to the pixel point in the specified channel in the first image and the first threshold value, screening out highlight pixel points from the first image; wherein the value of the specified channel corresponding to the highlight pixel point is higher than the first threshold value corresponding to the specified channel. Generally, the light source center has a highlight feature, so the pixel points with the value of the specified channel higher than the first threshold value can be first screened out as highlight pixel points. Considering that the light can have various colors, such as red light, green light, white light, etc., the threshold values of different specified channels can be used for screening to avoid missing the light source as much as possible.

[0037] Step C, determining the target light source center based on the highlight pixel points. In some embodiments, step C can be performed by referring to the following steps C1 to C2:

[0038] Step C1, obtaining a target connected domain corresponding to the highlight pixel point; wherein the size of the target connected domain is within a preset size range, and the number of the target connected domains is one or more. In some specific embodiments, step C1 can be performed by referring to the following steps C1.1 to C1.3:

[0039] Step C1.1, obtaining a highlight area formed by highlight pixels; a pixel cluster composed of multiple adjacent highlight pixels is a highlight area.

[0040] Step C1.2, processing the highlight area by using an image morphological algorithm to obtain a candidate connected domain. Exemplarily, the image morphological algorithm includes an erosion algorithm and / or an expansion algorithm. By processing the highlight area by using the image morphological algorithm, such as processing the highlight area by using the erosion algorithm, the highlight area that is too fine can be removed; or such as processing the highlight area by using the expansion algorithm, the shape of the highlight area can be smoothed to facilitate subsequent processing. By the above manner, one or more candidate connected domains can be obtained, and each candidate connected domain can represent a light source.

[0041] Step C1.3, screening a target connected domain from the candidate connected domains based on the number of pixels of the candidate connected domain and a preset size range. In actual application, considering that the connected domain can be irregular, the size of the candidate connected domain can be conveniently and quickly measured by the number of pixels of the candidate connected domain. The disclosure embodiment can pre-set a size range, such as setting a minimum light source size and a maximum light source size, and the preset size range is the range between the minimum light source size and the maximum light source size. The size range can also be represented by the number of pixels. It can be understood that a candidate connected domain that is too small can be noise or other interference signals, and therefore the candidate connected domain that is too small can be filtered by setting the minimum light source size; a candidate connected domain that is too large can be a surface light source, which usually does not produce radial light effect, and therefore the candidate connected domain that is too large can be filtered by setting the maximum light source size. By the above manner, it can be effectively guaranteed that the target connected domain obtained finally can reasonably and reliably represent the radial light source.

[0042] Step C2, obtaining a target light source center based on the center of the target connected domain. In actual application, the center of the target connected domain can be determined based on the pixel coordinates in the target connected domain. Exemplarily, the horizontal coordinates and the vertical coordinates of the pixels in the target connected domain can be averaged respectively to obtain the center coordinates of the target connected domain, so as to accurately and reliably determine the target light source center. In addition, it should be noted that the manner of obtaining the number of pixels, coordinates and other information of each connected domain can refer to related technologies, such as using a breadth-first search algorithm, which is not limited herein.

[0043] In some embodiments, the aforementioned step S106, i.e., performing radial blur processing based on the target light source center and a preset blur radius to obtain a blur processing result, can be performed by referring to the following steps a-b:

[0044] Step a, determining target pixel points to be involved in the blur processing from the first image based on pixel point information of the first image. The target pixel points are pixel points that present light in the radial light effect, i.e., the target pixel points are pixel points involved in light emission.

[0045] Exemplarily, the pixel point information of the first image includes values of pixel points in the first image corresponding to a specified channel; and step a can be performed with reference to steps a1-a2 as follows:

[0046] Step a1, obtaining a second threshold value corresponding to the specified channel; and the second threshold value corresponding to each channel can be flexibly set according to requirements, and the second threshold value is lower than the first threshold value.

[0047] Step a2, screening target pixel points to be involved in the blur processing from the first image based on a comparison result of the values of the pixel points in the first image corresponding to the specified channel and the second threshold value; and the value of the specified channel corresponding to the target pixel points is higher than the second threshold value corresponding to the specified channel. It can be understood that the first threshold value is used to finally determine the target light source center, and thus the first threshold value is usually set to be high; and the second threshold value is used to screen pixel points involved in light emission, such as pixel points around the target light source center, and thus the second threshold value needs to be lower than the first threshold value.

[0048] Step b, performing radial blur processing based on the target pixel points, the target light source center, and a preset blur radius to obtain a blur processing result. On the basis of the known target pixel points, the radial blur processing is performed again to obtain a more realistic and reasonable blur processing result. For non-target pixel points, the non-target pixel points can not be involved in the radial blur processing, or the pixel values of the non-target pixel points are uniformly modified to 0, and then the radial blur processing is uniformly performed within the blur radius range of the target light source center, which not only helps to reduce the processing amount, but also can ensure the realistic effect of the radial light effect. Exemplarily, the blur processing result includes a target blur value corresponding to the target pixel points; and step b can be performed with reference to steps b1-b3 as follows:

[0049] Step b1, determining an associated light source center corresponding to the target pixel points; and the associated light source center corresponding to the target pixel points is a target light source center with a distance from the target pixel points less than the blur radius. In actual application, for each pixel point, it is searched whether there is a target light source center within the blur radius range with the pixel point as the center, and the searched target light source center is the associated light source center corresponding to the pixel point.

[0050] Step b2, performing radial blur processing based on the target pixel points, the target light source center, and the preset blur radius to obtain a radial blur value of the target pixel points relative to the associated light source center.

[0051] In actual application, the pixel values of the pixel points other than the target pixel points (i.e. non-target pixel points) in the first image can be all set to 0 to obtain a second image, and then all the pixel points within the blur radius range of the target light source center in the second image are uniformly subjected to radial blur processing. Since the pixel values of the non-target pixel points have been set to 0, the non-target pixel points are not affected by the radial blur processing or will not affect the radial blur processing result. The above-mentioned method can conveniently and quickly perform radial blur processing on all the pixel points within the blur radius range of the target light source center, but in essence only acts on the target pixel points within the blur radius range, and then the radial blur value of the target pixel point relative to the associated light source center can be obtained.

[0052] In addition, it should be noted that in addition to the blur radius, other parameters related to the radial blur processing can be further combined for blur processing, such as blur intensity, attenuation coefficient, brightness control, etc. which are not limited herein.

[0053] In step b3, the target blur value corresponding to the target pixel point is obtained based on the radial blur value of the target pixel point relative to the associated light source center.

[0054] In actual application, the target pixel point can have one or more associated light source centers. In the case where the associated light source center corresponding to the target pixel point is one, the radial blur value of the target pixel point relative to the associated light source center is taken as the target blur value corresponding to the target pixel point. In the case where the associated light source center corresponding to the target pixel point is multiple, the radial blur values of the target pixel point relative to each associated light source center are superimposed, and the target blur value corresponding to the target pixel point is obtained based on the superimposition result. The superimposition method is not limited in the embodiments of the present disclosure, such as the weight corresponding to the radial blur value of the target pixel point relative to each associated light source center can be obtained based on the distance between the target pixel point and each associated light source center, the closer the distance, the greater the weight, and then the superimposition processing is performed through a weighting algorithm to obtain the target blur value corresponding to the target pixel point.

[0055] Based on the target blur value corresponding to the target pixel point, the target image with radial light effect can be obtained in combination with the first image. In actual application, the pixel values of the non-target pixel points in the first image can be all set to 0 to obtain a second image, then all the pixel points within the blur radius range of the target light source center in the second image are uniformly subjected to radial blur processing to obtain a third image, and then the third image and the first image are superimposed to obtain the target image.

[0056] For the convenience of understanding the foregoing, referring to an image processing schematic diagram shown in FIG. 2, mainly including the following key steps: light source center identification and target pixel point identification participating in light emission are performed on the first image, then based on the identified light source center and target pixel point, radial blur processing is performed in combination with a preset blur radius to obtain a blur processing result, the blur processing result is fused with the original image to obtain a target image with a radial light effect. Further referring to an image processing effect schematic diagram shown in FIG. 3, it is illustrated that through the image processing method provided by the embodiment of the present disclosure, the lamp can present a better radial light effect.

[0057] Through the image processing method provided by the embodiment of the present disclosure, without being subject to the physical devices of the shooting device, the image with the local radial light effect can be efficiently and conveniently generated through the image post-processing mode, and without manually specifying the light source, the blur processing is not required for the whole image, and the traditional radial blur processing mode for the whole image is modified to the radial blur processing mode within a certain range, so that the multi-center radial light effect is realized.

[0058] The embodiment of the present disclosure further provides an image processing device, and FIG. 4 is a structural schematic diagram of an image processing device provided by the embodiment of the present disclosure. The device can be realized by software and / or hardware, and can be integrated in an electronic device. As shown in FIG. 4, the image processing device includes:

[0059] The image acquisition module 402 is configured to acquire a first image to be processed.

[0060] The center determination module 404 is configured to determine a target light source center from the first image based on pixel point information of the first image.

[0061] The blur processing module 406 is configured to perform radial blur processing based on the target light source center and a preset blur radius to obtain a blur processing result.

[0062] The image generation module 408 is configured to generate a target image according to the first image and the blur processing result.

[0063] The above-mentioned method does not need to be limited by the hardware performance of the shooting device, and the radial light effect can be achieved through the image post-processing mode; and without manually specifying the light source center by the user, the light source center can be automatically identified from the image based on the pixel point information and the radial blur processing is performed within a certain range, which helps the light source center in the image to present the radial halo effect, and better meets the user demand.

[0064] In some embodiments, the pixel information of the first image includes a value corresponding to a specified channel of a pixel in the first image; the center determination module 404 is specifically configured to: obtain a first threshold value corresponding to the specified channel; based on a comparison result of the value corresponding to the specified channel of the pixel in the first image and the first threshold value, filter out highlight pixels from the first image; wherein the value of the specified channel corresponding to the highlight pixel is higher than the first threshold value corresponding to the specified channel; and determine the target light source center based on the highlight pixels.

[0065] In some embodiments, the center determination module 404 is specifically configured to: obtain a target connected domain corresponding to the highlight pixels; wherein the size of the target connected domain is within a preset size range, and the number of the target connected domains is one or more; and obtain the target light source center based on the center of the target connected domain.

[0066] In some embodiments, the center determination module 404 is specifically configured to: obtain a highlight region formed by the highlight pixels; process the highlight region by using an image morphological algorithm to obtain a candidate connected domain; and filter out the target connected domain from the candidate connected domain based on the number of pixels of the candidate connected domain and the preset size range.

[0067] In some embodiments, the blur processing module 406 is specifically configured to: determine target pixels to be involved in blur processing from the first image based on the pixel information of the first image; and perform radial blur processing based on the target pixels, the target light source center, and a preset blur radius to obtain a blur processing result.

[0068] In some embodiments, the pixel information of the first image includes a value corresponding to a specified channel of a pixel in the first image; the blur processing module 406 is specifically configured to: obtain a second threshold value corresponding to the specified channel; based on a comparison result of the value corresponding to the specified channel of the pixel in the first image and the second threshold value, filter out target pixels to be involved in blur processing from the first image; wherein the value of the specified channel corresponding to the target pixel is higher than the second threshold value corresponding to the specified channel.

[0069] In some embodiments, the blur processing result includes a target blur value corresponding to the target pixel point; the blur processing module 406 is specifically configured to: determine a target light source center corresponding to the target pixel point; wherein the target light source center corresponding to the target pixel point is a target light source center with a distance to the target pixel point less than the blur radius; perform radial blur processing based on the target pixel point, the target light source center, and a preset blur radius, to obtain a radial blur value of the target pixel point relative to the target light source center; and obtain the target blur value corresponding to the target pixel point based on the radial blur value of the target pixel point relative to the target light source center.

[0070] In some embodiments, the blur processing module 406 is specifically configured to: in a case where the target light source center corresponding to the target pixel point is multiple, superimpose the radial blur values of the target pixel point relative to each of the target light source centers, and obtain the target blur value corresponding to the target pixel point based on a superimposition result.

[0071] The image processing apparatus provided in the embodiments of the present disclosure can perform the image processing method provided in any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of performing the method.

[0072] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the apparatus embodiments described above can refer to the corresponding process in the method embodiments, which will not be described here.

[0073] The embodiments of the present disclosure provide an electronic device, which includes a storage device having a computer program stored thereon, and a processing device configured to execute the computer program in the storage device to implement the steps of any of the methods in the present disclosure.

[0074] Reference is made to FIG. 5, which shows a structural schematic diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in FIG. 5 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.

[0075] As shown in FIG. 5, the electronic device 500 can include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501 that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 502 or loaded into a random access memory (RAM) 503 from a storage device 508. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0076] In general, the following devices can be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 can allow the electronic device 500 to communicate wirelessly or wired with other devices to exchange data. Although FIG. 5 shows the electronic device 500 with various devices, it should be understood that all of the shown devices are not required to be implemented or possessed. More or less devices can be alternatively implemented or possessed.

[0077] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 509, or installed from the storage devices 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-described functions defined in the methods of embodiments of the present disclosure are performed.

[0078] In addition to the method and device described above, the embodiments of the present disclosure can also be a computer program product, which includes computer program instructions that make the processor execute the image processing method provided by the embodiments of the present disclosure when the processor is running. The computer program product can be written in any combination of one or more programming languages to execute the program code of the embodiments of the present disclosure, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on a user computing device, partially on a user device, as an independent software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0079] In addition, the embodiments of the present disclosure can also be a computer readable storage medium, which stores computer program instructions, and the computer program instructions make the processor execute the image processing method provided by the embodiments of the present disclosure when the processor is running.

[0080] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples (non-exhaustive list) of readable storage medium include: electrical connection with one or more conductive wires, portable disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.

[0081] The embodiments of the present disclosure also provide a computer program product, which includes computer programs / instructions that are executed by a processor to implement the image processing method in the embodiments of the present disclosure.

[0082] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained according to relevant laws and regulations.

[0083] For example, in response to receiving an active request of a user, a prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed by the user will need to acquire and use personal information of the user. Thus, the user can autonomously select whether to provide the personal information to the software or hardware such as an electronic device, an application program, a server or a storage medium performing the operation of the technical solution of the present disclosure according to the prompt information.

[0084] As an optional but non-limiting implementation, in response to receiving an active request of a user, the manner of sending a prompt information to the user may, for example, be a pop-up window manner, and the prompt information may be presented in the pop-up window in the form of text. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0085] It can be understood that the above notification and acquisition of user authorization process is only illustrative and does not limit the implementation of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0086] It should be noted that in this document, relational terms such as "first" and "second", and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.

[0087] The above description is merely one specific implementation of the present disclosure, which enables those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be apparent 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 conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

An image processing method comprises: obtaining a first image to be processed; determining a target light source center from the first image based on pixel point information of the first image; performing radial blur processing based on the target light source center and a preset blur radius to obtain a blur processing result; generating a target image according to the first image and the blur processing result. The method of claim 1, wherein, The pixel point information of the first image comprises a value corresponding to a specified channel of a pixel point in the first image; and the target light source center is determined from the first image based on the pixel point information of the first image, comprising: obtaining a first threshold value corresponding to the specified channel; screening out highlight pixel points from the first image based on a comparison result of the value corresponding to the specified channel of the pixel point in the first image and the first threshold value; wherein the value corresponding to the specified channel of the highlight pixel points is higher than the first threshold value corresponding to the specified channel; determining the target light source center based on the highlight pixel points. The method of claim 2, wherein, The target light source center is determined based on the highlight pixel points, comprising: obtaining a target connected domain corresponding to the highlight pixel points; wherein the size of the target connected domain is within a preset size range, and the number of the target connected domain is one or more; obtaining the target light source center based on the center of the target connected domain. The method of claim 3, wherein, The target connected domain corresponding to the highlight pixel points is obtained, comprising: obtaining a highlight area formed by the highlight pixel points; processing the highlight area by using an image morphological algorithm to obtain a candidate connected domain; screening out the target connected domain from the candidate connected domain based on the number of pixel points of the candidate connected domain and the preset size range. The method according to any one of claims 1 to 4, wherein The radial blur processing is performed based on the target light source center and the preset blur radius to obtain the blur processing result, comprising: determining target pixel points to be involved in the blur processing from the first image based on the pixel point information of the first image; performing radial blur processing based on the target pixel points, the target light source center and the preset blur radius to obtain the blur processing result. The method of claim 5, wherein, The pixel point information of the first image comprises a value corresponding to a specified channel of a pixel point in the first image; and the target pixel points to be involved in the blur processing are determined from the first image based on the pixel point information of the first image, comprising: obtaining a second threshold value corresponding to the specified channel; screening out the target pixel points to be involved in the blur processing from the first image based on a comparison result of the value corresponding to the specified channel of the pixel point in the first image and the second threshold value; wherein the value corresponding to the specified channel of the target pixel points is higher than the second threshold value corresponding to the specified channel. The method according to claim 5 or 6, wherein The blur processing result comprises a target blur value corresponding to the target pixel points; The radial blur processing is performed based on the target pixel points, the target light source center and the preset blur radius to obtain the blur processing result, comprising: determining an associated light source center corresponding to the target pixel points; wherein the associated light source center corresponding to the target pixel points is a target light source center with a distance from the target pixel points less than the blur radius. perform radial blur processing based on the target pixel point, the target light source center, and a preset blur radius to obtain a radial blur value of the target pixel point relative to the associated light source center; obtain a target blur value corresponding to the target pixel point based on the radial blur value of the target pixel point relative to the associated light source center. The method of claim 7, wherein, The obtaining of the target blur value corresponding to the target pixel point based on the radial blur value of the target pixel point relative to the associated light source center includes: In a case where the associated light source center corresponding to the target pixel point is multiple, the radial blur values of the target pixel point relative to each of the associated light source centers are superimposed, and a target blur value corresponding to the target pixel point is obtained based on a superimposition result. An image processing apparatus includes: an image acquisition module configured to acquire a first image to be processed; a center determination module configured to determine a target light source center from the first image based on pixel point information of the first image; a blur processing module configured to perform radial blur processing based on the target light source center and a preset blur radius to obtain a blur processing result; an image generation module configured to generate a target image according to the first image and the blur processing result. An electronic device includes: a storage device having a computer program stored thereon; a processing device configured to execute the computer program in the storage device to implement the image processing method of any one of claims 1-8. A computer-readable storage medium storing a computer program, wherein, The computer program is used to execute the image processing method of any one of claims 1-8. A computer program product comprising a computer program, wherein, The computer program, when executed by a processor, implements the image processing method of any one of claims 1-8.

Citation Information

Patent Citations

  • Method for tracking and identifying headlight and taillight of automobile under visual perception

    CN106934808A

  • Image processing method and device, computer equipment and storage medium

    CN114626978A

  • Image processing method for forming Tyndall lighting effect and electronic equipment

    CN115131419A

  • Image generation method and device, electronic equipment and readable storage medium

    CN117372555A

  • Method and system for modeling light scattering in a participating medium

    US20180018813A1