Image processing method and apparatus therefor
By using double exposure in electronic devices to capture and identify blue-purple areas, and eliminating purple fringing only in the target area, the problem of erroneously removing blue-purple objects is solved, thus improving image quality.
Patent Information
- Application Number
- CN202211718444.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2042-12-29
AI Technical Summary
Existing technology can easily cause the actual blue-purple objects in the image to be mistakenly removed when taking pictures with electronic devices, resulting in purple fringing in the photos.
The target scene is photographed using a first exposure method and a second exposure method to obtain a first image and a second image. The blue-purple area in the first image is determined, and the target area to be removed from the purple edge in the second image is determined based on the area. The purple edge is removed only in this area to avoid accidentally removing blue-purple objects.
It effectively eliminates purple fringing without compromising the removal of blue-purple objects, thus improving the visual quality of the photo.
Smart Images

Figure CN116132822B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic equipment technology, and specifically relates to an image processing method and apparatus. Background Technology
[0002] When taking photos using electronic devices, the resulting images often exhibit "purple fringing," which affects the overall look and feel of the photo. "Purple fringing" typically manifests as a bluish-purple border at the edges of saturated areas in the image.
[0003] In related technologies, the "purple fringing" is usually identified and removed by software algorithms in the image signal processing (ISP) of electronic devices.
[0004] However, using ISP to remove "purple fringing" can easily lead to the accidental removal of actual blue-purple objects in the image. Summary of the Invention
[0005] The purpose of this application is to provide an image processing method and apparatus that can solve the problem of mistakenly removing actual blue-purple objects from an image.
[0006] In a first aspect, embodiments of this application provide an image processing method, including:
[0007] The target scene is photographed using a first exposure method and a second exposure method, respectively, to obtain a first image and a second image;
[0008] Identify the blue-purple region in the first image;
[0009] Based on the blue-purple region, determine the target area in the second image where the purple edge needs to be removed;
[0010] Remove purple fringing from the target area.
[0011] Secondly, embodiments of this application provide an image processing apparatus, including:
[0012] The shooting module is used to capture images of the target scene using a first exposure mode and a second exposure mode respectively, to obtain a first image and a second image;
[0013] The first determining module is used to determine the blue-purple region in the first image;
[0014] The second determining module is used to determine the target area in the second image to be removed from the purple edges based on the blue-purple area in the first image;
[0015] The removal module is used to remove purple fringing from the target area.
[0016] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of the method described in the first aspect.
[0017] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0018] Fifthly, embodiments of this application provide a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the method described in the first aspect.
[0019] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0020] In this embodiment, the target scene is photographed using a first exposure mode and a second exposure mode to obtain a first image and a second image; a blue-purple region is determined in the first image; based on the blue-purple region in the first image, a target region in the second image to have its purple fringing removed is determined; and the purple fringing in the target region is removed. Only the purple fringing in the target region in the second image determined based on the blue-purple region in the first image is removed; the corresponding regions in the second image to the blue-purple region in the first image are not subjected to purple fringing removal processing. This allows for color protection of the corresponding regions in the second image to the blue-purple region in the first image, without mistakenly removing blue-purple objects from the second image. Attached Figure Description
[0021] Figure 1 This is a schematic flowchart of the image processing method provided in the embodiments of this application;
[0022] Figure 2 This is a schematic diagram of the structure of the image processing apparatus provided in the embodiments of this application;
[0023] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0024] Figure 4 This is a schematic diagram of the hardware structure of an electronic device that implements the embodiments of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0026] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0027] The image processing method and apparatus provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0028] Figure 1 This is a schematic flowchart of the image processing method provided in an embodiment of this application. Figure 1 As shown, image processing methods may include:
[0029] Step 101: Take pictures of the target scene using the first exposure mode and the second exposure mode respectively to obtain the first image and the second image;
[0030] Step 102: Identify the blue-purple region in the first image;
[0031] Step 103: Based on the blue-purple area in the first image, determine the target area in the second image where the purple edge needs to be removed;
[0032] Step 104: Remove the purple fringing in the target area.
[0033] The specific implementation methods of the above steps will be described in detail below.
[0034] In this embodiment, the target scene is photographed using a first exposure method and a second exposure method to obtain a first image and a second image; a blue-purple region is determined in the first image; based on the blue-purple region, a target region in the second image to have its purple fringing removed is determined; and the purple fringing in the target region is removed. Only the purple fringing in the target region in the second image determined based on the blue-purple region in the first image is removed; the corresponding regions in the second image to the blue-purple region in the first image are not subjected to purple fringing removal processing. This allows for color preservation of the corresponding regions in the second image to the blue-purple region in the first image, without mistakenly removing blue-purple objects from the second image.
[0035] In some possible implementations of the embodiments of this application, the first exposure method in the embodiments of this application can be a short exposure shooting method, and correspondingly, the first image obtained is a short exposure image.
[0036] In some possible implementations of the embodiments of this application, there are no saturated pixels in the short exposure image, that is, there is no "purple fringing" caused by image sensor blooming in the short exposure image.
[0037] In some possible implementations of the embodiments of this application, step 102 may include: converting the first image from RGB color space to HSV color space; and determining the blue-violet region based on the hue components in the HSV color space.
[0038] The RGB color space is based on three primary colors: red (R), green (G), and blue (B). Various colors are produced by layering these colors to different degrees. In the RGB color space definition, any color can be decomposed into its R, G, and B components. The HSV color space is composed of hue (H), saturation (S), and value (V). In the HSV color space definition, any color can also be decomposed into its H, S, and V components.
[0039] This application does not elaborate on the specific process of converting the first image from RGB color space to HSV color space. The process of color space conversion can be referred to in related technologies.
[0040] In some possible implementations of the embodiments of this application, determining the blue-purple region based on the hue components in the HSV color space may include: determining the region formed by the pixels corresponding to the hue components located between 210° and 330° as the blue-purple region.
[0041] The hue H ranges from 0° to 360°, calculated counter-clockwise starting from red. Standard red is 0°, standard yellow is 60°, standard green is 120°, standard cyan is 180°, standard blue is 240°, and standard magenta is 300°. Based on this, the region formed by the pixels corresponding to the hue components with hue H between 210° and 330° can be defined as the blue-purple region.
[0042] In some possible implementations of the embodiments of this application, the area in the second image other than the area at the same position as the blue-purple area can be determined as the target area.
[0043] In some possible implementations of this application, eliminating purple fringing essentially involves calculating the red and blue components to be subtracted based on the color ratios in the RGB color space, ensuring that the remaining red and blue components are not less than the green component. Based on this, step 104 may include: for the i-th pixel in the target region, determining the target red and target blue components corresponding to the i-th pixel based on its original red, green, and blue components, where the i-th pixel is any pixel in the target region, i is a positive integer, and the target red and target blue components corresponding to the i-th pixel are used to eliminate purple fringing in the target region; and eliminating purple fringing in the target region based on the target red and target blue components corresponding to the i-th pixel.
[0044] In some possible implementations of the embodiments of this application, for the i-th pixel, the target red component and the target blue component corresponding to the i-th pixel can be determined according to formula (1):
[0045]
[0046] In formula (1), The target red component corresponds to the i-th pixel. Let dr be the target blue component corresponding to the i-th pixel. i =max(red) i -green i ,0,mb i =min(bl i ,db i ), max ratio and min ratio These are used to control the relative proportions of the red and blue components being subtracted, respectively. db i =max(blue) i -green i ,0), red igreen i and blue i Let these be the original red component, the original green component, and the original blue component of the i-th pixel, respectively. x The largest blue component in the second image. Let blue be the normalized value of the blue component of the i-th pixel. min is the normalized value of the minimum blue component in the second image, Gaussian represents Gaussian filtering, I is the purple fringing elimination intensity parameter, max() is the maximum value function, and min() is the minimum value function. blue i Let be the blue component of the i-th pixel.
[0047] In some possible implementations of the embodiments of this application, max ratio min ratio The `max` parameter can be matched to different scenarios to achieve the best visual effect in eliminating purple fringing. For example, purple fringing is usually more severe when there is ample light, so `max` can be increased in this case. ratio And I, decrease min ratio To achieve stronger removal power; when the light is insufficient, the probability of "purple fringing" appearing is lower and the intensity is weaker, at which point the maximum value can be reduced. ratio And I, increase min ratio Reduce the removal intensity.
[0048] In some possible implementations of the embodiments of this application, when eliminating the purple edge of the target area based on the target red component and the target blue component corresponding to the i-th pixel, the red component of the i-th pixel can be modified to the difference between the original red component of the i-th pixel and the target red component corresponding to the i-th pixel, and the blue component of the i-th pixel can be modified to the difference between the original blue component of the i-th pixel and the target blue component corresponding to the i-th pixel.
[0049] Right now in, and These are the red and blue components of the i-th pixel after removing the purple fringing, respectively.
[0050] It should be noted that the image processing method provided in this application embodiment can be executed by an image processing device. This application embodiment uses an image processing device executing the image processing method as an example to illustrate the image processing device provided in this application embodiment.
[0051] Figure 2 This is a schematic diagram of the structure of the image processing apparatus provided in the embodiments of this application. Figure 2As shown, the image processing apparatus 200 may include:
[0052] The shooting module 201 is used to capture images of the target scene using a first exposure mode and a second exposure mode respectively, to obtain a first image and a second image;
[0053] The first determining module 202 is used to determine the blue-purple region in the first image;
[0054] The second determining module 203 is used to determine the target area in the second image to be removed from the purple edge based on the blue-purple area in the first image;
[0055] Elimination module 204 is used to eliminate purple fringing in the target area.
[0056] In this embodiment, the target scene is photographed using a first exposure method and a second exposure method to obtain a first image and a second image; a blue-purple region is determined in the first image; based on the blue-purple region in the first image, a target region in the second image to have its purple fringing removed is determined; and the purple fringing in the target region is removed. Only the purple fringing in the target region in the second image determined based on the blue-purple region in the first image is removed; the corresponding regions in the second image are not subjected to purple fringing removal processing. This allows for color preservation of the corresponding regions in the second image and avoids the accidental removal of blue-purple objects from the second image.
[0057] In some possible implementations of embodiments of this application, the elimination module 204 may include:
[0058] The first determining submodule is used to determine the target red component and target blue component corresponding to the i-th pixel in the target area based on the original red component, original green component and original blue component of the i-th pixel. The i-th pixel is any pixel in the target area, i is a positive integer, and the target red component and target blue component corresponding to the i-th pixel are used to eliminate the purple edge of the target area.
[0059] The elimination submodule is used to eliminate the purple edge of the target area based on the target red component and the target blue component corresponding to the i-th pixel.
[0060] In some possible implementations of the embodiments of this application, the first determining submodule may specifically be used for:
[0061] For the i-th pixel, the target red component and target blue component corresponding to the i-th pixel are determined according to the above formula (1).
[0062] In some possible implementations of the embodiments of this application, the elimination submodule can specifically be used for:
[0063] For the i-th pixel, modify the red component of the i-th pixel to the difference between the original red component of the i-th pixel and the target red component corresponding to the i-th pixel, and modify the blue component of the i-th pixel to the difference between the original blue component of the i-th pixel and the target blue component corresponding to the i-th pixel.
[0064] In some possible implementations of embodiments of this application, the first determining module may include:
[0065] The conversion submodule is used to convert the first image from the RGB color space to the HSV color space.
[0066] The second determination submodule is used to determine the blue-violet region based on the hue components in the HSV color space.
[0067] In some possible implementations of the embodiments of this application, the second determining submodule may specifically be used for:
[0068] The region consisting of pixels corresponding to the hue components between 210° and 330° is defined as the blue-purple region.
[0069] In some possible implementations of the embodiments of this application, the second determining module may specifically be used for:
[0070] The region in the second image other than the region in the same position as the blue-purple region is identified as the target region.
[0071] The image processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0072] The image processing device in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.
[0073] The image processing apparatus provided in this application embodiment can achieve... Figure 1 The various processes in the image processing method embodiments are not described again here to avoid repetition.
[0074] Optionally, such as Figure 3 As shown, this application embodiment also provides an electronic device 300, including a processor 301 and a memory 302. The memory 302 stores a program or instructions that can run on the processor 301. When the program or instructions are executed by the processor 301, they implement the various steps of the above-described image processing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0075] In some possible implementations of the embodiments of this application, processor 301 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0076] In some possible implementations of embodiments of this application, memory 302 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory 302 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the image processing method according to embodiments of this application.
[0077] Figure 4 This is a schematic diagram of the hardware structure of an electronic device that implements the embodiments of this application.
[0078] The electronic device 400 includes, but is not limited to, components such as: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, and processor 410.
[0079] Those skilled in the art will understand that the electronic device 400 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 410 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0080] The processor 410 is configured to: capture images of the target scene using a first exposure method and a second exposure method respectively to obtain a first image and a second image; determine the blue-purple region in the first image; determine the target region in the second image to be removed based on the blue-purple region in the first image; and remove the purple edge from the target region.
[0081] In this embodiment, the target scene is photographed using a first exposure method and a second exposure method to obtain a first image and a second image; a blue-purple region is determined in the first image; based on the blue-purple region in the first image, a target region in the second image to have its purple fringing removed is determined; and the purple fringing in the target region is removed. Only the purple fringing in the target region in the second image determined based on the blue-purple region in the first image is removed; the corresponding regions in the second image are not subjected to purple fringing removal processing. This allows for color preservation of the corresponding regions in the second image and avoids the accidental removal of blue-purple objects from the second image.
[0082] In some possible implementations of the embodiments of this application, the processor 410 may specifically be used for:
[0083] For the i-th pixel in the target area, the target red component and target blue component corresponding to the i-th pixel are determined based on the original red component, original green component and original blue component of the i-th pixel. The i-th pixel is any pixel in the target area, i is a positive integer, and the target red component and target blue component corresponding to the i-th pixel are used to eliminate the purple edge of the target area.
[0084] Eliminate the purple fringing in the target area based on the target red component and target blue component corresponding to the i-th pixel.
[0085] In some possible implementations of the embodiments of this application, the processor 410 may specifically be used for:
[0086] For the i-th pixel, the target red component and target blue component corresponding to the i-th pixel are determined according to the above formula (1).
[0087] In some possible implementations of the embodiments of this application, the processor 410 may specifically be used for:
[0088] For the i-th pixel, modify the red component of the i-th pixel to the difference between the original red component of the i-th pixel and the target red component corresponding to the i-th pixel, and modify the blue component of the i-th pixel to the difference between the original blue component of the i-th pixel and the target blue component corresponding to the i-th pixel.
[0089] In some possible implementations of the embodiments of this application, the processor 410 may specifically be used for:
[0090] Convert the first image from the RGB color space to the HSV color space;
[0091] The blue-violet region is determined based on the hue components in the HSV color space.
[0092] In some possible implementations of the embodiments of this application, the processor 410 may specifically be used for:
[0093] The region consisting of pixels corresponding to the hue components between 210° and 330° is defined as the blue-purple region.
[0094] In some possible implementations of the embodiments of this application, the processor 410 may specifically be used for:
[0095] The region in the second image other than the region in the same position as the blue-purple region is identified as the target region.
[0096] It should be understood that, in this embodiment, the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042. The GPU 4041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 407 includes at least one of a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0097] The memory 409 can be used to store software programs and various data. The memory 409 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 409 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 409 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0098] Processor 410 may include one or more processing units; optionally, processor 410 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 410.
[0099] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described image processing method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0100] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer-readable storage medium, and examples of computer-readable storage media include non-transitory computer-readable storage media such as ROM, RAM, magnetic disks, or optical disks.
[0101] This application also provides a chip, including a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described image processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0102] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0103] This application also provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described image processing method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0104] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0106] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An image processing method, characterized by, The method comprises: capturing a target scene by using a first exposure mode and a second exposure mode to obtain a first image and a second image; determining a blue-purple region in the first image; determining a target region to be eliminated from purple edges in the second image according to the blue-purple region; eliminating purple edges of the target region; the elimination of the purple edges of the target region comprises: for an i-th pixel point in the target region, determining target red and blue components corresponding to the i-th pixel point according to original red, green and blue components of the i-th pixel point, wherein the i-th pixel point is any pixel point in the target region, i is a positive integer, and the target red and blue components are used to eliminate the purple edges of the target region; eliminating the purple edges of the target region according to the target red and blue components; the elimination of the purple edges of the target region according to the target red and blue components comprises: for the i-th pixel point, modifying a red component of the i-th pixel point to a difference between the original red component and the target red component, and modifying a blue component of the i-th pixel point to a difference between the original blue component and the target blue component.
2. The method of claim 1, wherein, The determination of the blue-purple region in the first image comprises: converting the first image from an RGB color space to an HSV color space; determining the blue-purple region according to a hue component in the HSV color space.
3. The method of claim 1, wherein, The determination of the target region to be eliminated from purple edges in the second image according to the blue-purple region comprises: determining, as the target region, a region in the second image other than a region having a same position as the blue-purple region.
4. An image processing apparatus characterized by comprising: The device comprises: a capturing module configured to capture a target scene by using a first exposure mode and a second exposure mode to obtain a first image and a second image; a first determining module configured to determine a blue-purple region in the first image; a second determining module configured to determine a target region to be eliminated from purple edges in the second image according to the blue-purple region; an eliminating module configured to eliminate purple edges of the target region; the eliminating module comprises: a first determining sub-module configured to, for an i-th pixel point in the target region, determine target red and blue components corresponding to the i-th pixel point according to original red, green and blue components of the i-th pixel point, wherein the i-th pixel point is any pixel point in the target region, i is a positive integer, and the target red and blue components are used to eliminate the purple edges of the target region; an eliminating sub-module configured to eliminate the purple edges of the target region according to the target red and blue components; the eliminating sub-module is specifically configured to: for the i-th pixel point, modify a red component of the i-th pixel point to a difference between the original red component and the target red component, and modify a blue component of the i-th pixel point to a difference between the original blue component and the target blue component.
5. The apparatus of claim 4, wherein, The first determining module comprises: A conversion submodule, configured to convert the first image from an RGB color space to an HSV color space; A second determining submodule, configured to determine the blue-violet color region according to a hue component in the HSV color space.
6. The apparatus of claim 4, wherein, The second determining module is specifically configured to: Determine, as the target region, a region in the second image except for a region at a same position as the blue-violet color region.
Citation Information
Patent Citations
Image processing method, image processing device, electronic equipment and storage medium
CN113516595A
Image processing method, electronic equipment and computer readable storage medium
CN114511461A