Image processing method and device, electronic equipment, chip and medium
By adaptive correction based on gradient value statistical information in the image processing method, green channel imbalance and artifact problems are solved, efficient image correction is achieved and edge details are protected.
Patent Information
- Application Number
- CN202310600140.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, the green channel imbalance correction effect is poor, and the artifacts formed by process differences cannot be effectively eliminated, and edge details may be lost.
In the image processing method, adaptive correction is performed based on the gradient value statistical information in the to-process area, and whether the statistical value meets the preset conditions, if it is satisfied, the pixel value is adjusted, and the weight coefficient is used to perform weighting processing to realize the green channel Balance correction.
It effectively eliminates artifacts caused by process differences, ensures image correction without losing edge details, and improves correction efficiency.
Smart Images

Figure CN119067892A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image processing method, device, electronic device, chip and medium. Background Art
[0002] In the related art, the general process of a terminal acquiring video or image data is: using a CMOS image sensor to collect image data, then converting the Bayer data into RGB data through a series of image processing operations, and finally outputting video / image data that meets the requirements. Summary of the invention
[0003] The present disclosure provides an image processing method, device, electronic device, chip and medium to solve the problem of poor green channel imbalance correction effect in the related art, realize adaptive correction of the image based on the statistical information of the gradient value in the area to be processed, eliminate the artifacts formed on the image due to process differences, improve the correction efficiency, and ensure that the image is corrected without losing the details of the edge area.
[0004] The first aspect of the present disclosure proposes an image processing method, which includes: determining the statistical value of multiple gradient values in a to-be-processed area of an input image; judging whether the statistical value meets a preset condition; if the statistical value meets the preset condition, adjusting the first pixel value of a first pixel point to a second pixel value.
[0005] In some embodiments of the present disclosure, the multiple gradient values include multiple first gradient values and multiple second gradient values, and the method also includes: determining a first pixel point and multiple second pixel points in the input image in the area to be processed, the first pixel point being adjacent to the multiple second pixel points; based on the first pixel point and the multiple second pixel points, determining multiple first gradient values and multiple second gradient values, the multiple first gradient values being the absolute values of the difference in pixel values between the multiple second pixel points and the first pixel point, and the multiple second gradient values being the absolute values of the difference in pixel values between the multiple second pixel points.
[0006] In some embodiments of the present disclosure, determining a statistical value of a plurality of gradient values of an input image in a region to be processed includes: summing a plurality of first gradient values and a plurality of second gradient values to determine a statistical value.
[0007] In some embodiments of the present disclosure, the method further includes: if the statistical value does not meet a preset condition, using the first pixel value of the first pixel point as the second pixel value.
[0008] In some embodiments of the present disclosure, the preset condition includes that the statistical value is less than the ratio of the first pixel value to the preset value.
[0009] In some embodiments of the present disclosure, if the statistical value satisfies a preset condition, adjusting the first pixel value of the first pixel point to a second pixel value includes: determining a plurality of weight coefficients corresponding to a plurality of second pixel points based on a plurality of first gradient values; and weighting the first pixel value of the first pixel point and the third pixel values of the plurality of second pixel points based on the plurality of weight coefficients to obtain the second pixel value of the first pixel point.
[0010] A second aspect embodiment of the present disclosure proposes an image processing device, which includes: a determination unit, used to determine the statistical value of multiple gradient values in a to-be-processed area of an input image; a judgment unit, used to judge whether the statistical value meets a preset condition; and an adjustment unit, used to adjust a first pixel value of a first pixel point to a second pixel value if the statistical value meets the preset condition.
[0011] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect embodiment of the present disclosure.
[0012] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.
[0013] The fifth aspect embodiment of the present disclosure proposes a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from a memory of an electronic device and send signals to the processor, the signals including computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the method described in the first aspect embodiment of the present disclosure.
[0014] In summary, according to the image processing method proposed in the present invention, the statistical values of multiple gradient values in the area to be processed of the input image are determined; it is judged whether the statistical values meet the preset conditions; if the statistical values meet the preset conditions, the first pixel value of the first pixel point is adjusted to the second pixel value, which solves the problem of imbalance in the green channel, and realizes adaptive correction of the image based on the statistical values of the gradient values in the area to be processed, eliminating artifacts formed on the image due to process differences, and at the same time, through the judgment of the statistical values, it is ensured that the image is corrected without losing the details of the edge area, thereby improving the correction efficiency.
[0015] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0017] Figure 1 A schematic diagram of a Bayer image array provided in an embodiment of the present disclosure;
[0018] Figure 2 A flowchart of an image processing method provided by an embodiment of the present disclosure;
[0019] Figure 3 A flowchart of an image processing method provided by an embodiment of the present disclosure;
[0020] Figure 4 A schematic diagram of a 3*3 matrix-sized area to be processed provided in an embodiment of the present disclosure;
[0021] Figure 5 A schematic diagram of G pixels and corresponding weight distribution in a 3*3 matrix-sized area to be processed provided in an embodiment of the present disclosure;
[0022] Figure 6 A schematic diagram of the correction capability of a GIC for G channel imbalance provided by an embodiment of the present disclosure;
[0023] Figure 7 A schematic diagram of the detail retention capability of a GIC provided in an embodiment of the present disclosure;
[0024] Figure 8 A schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure;
[0025] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0027] like Figure 1The Bayer format image array shown in the figure has a green channel divided into a Gr channel and a Gb channel for Bayer format image data. Due to differences in the manufacturing process, the arrangement of the chips and the adjacent pixels, the two green channel signals of the collected electrical signals are unbalanced. In addition to the green channel imbalance in signal acquisition, the image processing algorithm in the Bayer domain will also cause green channel imbalance. Therefore, green channel imbalance correction is usually required in the Bayer domain.
[0028] The purpose of green channel imbalance correction is mainly to eliminate the photosensitivity difference between Gr and Gb pixels, but at the same time it will also have a certain effect of reducing the difference for edge pixels that already have differences, so as to ensure edge details.
[0029] However, in the related art, the correction of the green channel imbalance phenomenon is mostly performed by directly correcting the input image through the gradient value, and the correction effect is not fine enough and the edge details cannot be well guaranteed.
[0030] In order to solve the problems existing in image processing technology, the present disclosure proposes an image processing solution, which adaptively corrects the image based on the gradient statistical information in the area to be processed, and uses the statistical information to judge the flat area to ensure that the flat area is corrected without losing the details of the edge area.
[0031] The method proposed in the present disclosure can be applied to the field of Bayer domain image data, and can also be applied to the fields of terminal photography, video recording, and industrial camera imaging. It can also be used in other scenarios and is not limited in the embodiments of the present disclosure.
[0032] The image processing method provided in this application is described in detail below with reference to the accompanying drawings.
[0033] Figure 2 This is a flowchart of an image processing method provided by an embodiment of the present disclosure. The solution of the present disclosure can be applied to terminals such as mobile phones and tablet computers, and can be stored in a storable medium in the form of software. When the software is executed, the technical solution of the present disclosure is implemented. Figure 2 As shown, the image processing method includes steps 101-103.
[0034] Step 101, determining statistical values of a plurality of gradient values in a region to be processed of an input image.
[0035] In the embodiments of the present disclosure, the input image includes a Bayer format image acquired by an image sensor. The Bayer format is the original image format inside the camera, and the suffix is .raw. The area to be processed of the input image refers to a pre-set matrix size. In the present disclosure, a 3*3 matrix size is taken as an example, and 5*5, 7*7, etc. can also be selected, without specific limitation.
[0036] The gradient value refers to the amount of change in the pixel value in the input image. In the present disclosure, it refers to the absolute value of the difference between the pixel values of two pixels in the area to be processed. For example, the gradient value can be the absolute value of the difference between the pixel values of a first pixel and a plurality of second pixels, or the absolute value of the difference between the pixel values of a plurality of second pixels. The statistical value can refer to the sum of multiple gradient values in the area to be processed.
[0037] Step 102: determine whether the statistical value meets a preset condition.
[0038] In an embodiment of the present disclosure, the preset condition includes a preset numerical relationship between the statistical value and the first pixel value, wherein the first pixel value refers to the pixel value of the first pixel point.
[0039] The purpose of judging whether the statistical value meets the preset condition is to judge the flat area in the input image. The flat area refers to an area where the gradient directions are different but the gradient amplitude does not change much. In the present disclosure, it refers to an area where the gradient value is less than the ratio of the first pixel value to the preset value.
[0040] Step 103: If the statistical value meets a preset condition, the first pixel value of the first pixel point is adjusted to a second pixel value.
[0041] In an embodiment of the present disclosure, the first pixel point includes a pixel point located at a central position in the area to be processed. Based on the above judgment result, a weighting coefficient for adjusting the pixel value is determined; the first pixel value is adjusted to a second pixel value by the weighting coefficient. Finally, the adjusted image is output to obtain an output image after green channel imbalance correction.
[0042] In summary, according to the image processing method proposed in the present invention, the statistical values of multiple gradient values of the input image in the area to be processed are determined; it is judged whether the statistical values meet the preset conditions; if the statistical values meet the preset conditions, the first pixel value of the first pixel point is adjusted to the second pixel value, which solves the problem of imbalance in the green channel, and realizes adaptive correction of the image based on the statistical values of the gradient values in the area to be processed, eliminating artifacts formed on the image due to process differences, and at the same time, through the judgment of the statistical values, it is ensured that the image is corrected without losing the details of the edge area, thereby improving the correction efficiency.
[0043] based on Figure 2 The embodiment shown, Figure 3 The following further illustrates a flow chart of an image processing method proposed in the present disclosure. Figure 3 based on Figure 2 In the embodiment shown, step 101 and step 103 are further defined. Figure 3In the embodiment shown, step 101 includes step 201, step 202 and step 203; step 101 includes step 204; step 103 includes step 205 and step 206. Figure 3 As shown, the method comprises the following steps:
[0044] Step 201: determine a first pixel point and a plurality of second pixel points in a region to be processed of an input image.
[0045] In the present disclosure, a first pixel point is adjacent to a plurality of second pixel points.
[0046] In the embodiments of the present disclosure, Figure 4 As shown, the first pixel point is a pixel point located at the center position of the to-be-processed area of 3*3 matrix size, and the second pixel point is a pixel point diagonally adjacent to the first pixel point.
[0047] It can be understood that the first pixel point and the second pixel point are used to distinguish the pixel points at different positions in the area to be processed, and will not change due to the movement of the window position of the area to be processed.
[0048] Step 202: Determine a plurality of first gradient values and a plurality of second gradient values based on the first pixel point and the plurality of second pixel points.
[0049] In the present disclosure, the plurality of gradient values include a plurality of first gradient values and a plurality of second gradient values. The plurality of first gradient values include the absolute values of the differences in pixel values between the plurality of second pixel points and the first pixel point, and the plurality of second gradient values include the absolute values of the differences in pixel values between the plurality of second pixel points.
[0050] In the embodiments of the present disclosure, Figure 4 As shown in the figure, in the 3*3 matrix size to be processed area, the gradient value between two G pixels in the green channel (G channel) is calculated respectively. Assuming that the G pixels in the to-be-processed area are numbered G0 to G4, there are a total of 10 groups of gradient values of pixel pairs, namely |G1-G0|, |G2-G0|, |G3-G0|, |G4-G0|, |G1-G2|, |G1-G3|, |G1-G4|, |G2-G3|, |G2-G4|, |G3-G4|, recorded as diff i , where i = 0, 1,…, 9.
[0051] It can be understood that in the present disclosure, the gradient value specifically refers to the absolute value of the difference between the pixel values of the first pixel point and the second pixel point, and the absolute value of the difference between the pixel values of the two second pixel points.
[0052] It should be noted that the number of gradient values in the present disclosure is dynamically determined according to the size of the area to be processed and is not limited in the embodiments of the present disclosure.
[0053] Step 203: sum the multiple first gradient values and the multiple second gradient values to determine a statistical value.
[0054] In an embodiment of the present disclosure, the multiple gradient values obtained in step 202 are summed, that is, the multiple first gradient values are added to the multiple second gradient values to calculate a statistical value.
[0055] In an optional embodiment of the present disclosure, as shown in Formula 1, 10 groups of gradient values of pixel pairs are traversed, and the 10 groups of gradient values are added and summed, and the result is recorded as a statistical value, namely, sum.
[0056]
[0057] Among them, diff i It refers to the gradient value calculated in the above step 202.
[0058] Step 204: determine whether the statistical value meets a preset condition.
[0059] In an embodiment of the present disclosure, the preset condition includes that the statistical value is less than the ratio of the first pixel value to the preset value. The preset value refers to the mean difference between the flat area and the uneven area preset based on actual experience. In the present disclosure, the preset value is 3 as an example. The preset value is a fixed value and can be set to other values according to actual conditions. It is not limited in the embodiment of the present disclosure.
[0060] It should be noted that if the statistical value does not meet the preset condition, the first pixel value of the first pixel point is used as the second pixel value. In other words, the first pixel value of the first pixel point is directly output without adjusting the first pixel value.
[0061] In an optional embodiment of the present disclosure, the magnitude relationship between the statistical value sum of the plurality of gradient values and the central pixel point G0 is determined.
[0062] like Then, the process goes to step 205 to execute the G channel imbalance correction logic, otherwise, G0 is directly output, ie, G0'=G0.
[0063] It can be understood that, through the above judgment of the statistical value, it can be determined whether the first pixel value of the first pixel point needs to be adjusted, which improves the efficiency of the G channel non-smoothness correction and ensures the edge details.
[0064] Step 205: If the statistical value meets the preset condition, multiple weight coefficients corresponding to multiple second pixel points are determined based on multiple first gradient values.
[0065] In an embodiment of the present disclosure, when the statistical value is less than the ratio of the first pixel value to the preset value, a weight coefficient for adjusting the first pixel value to the second pixel value is calculated through multiple first gradient values.
[0066] In an optional embodiment of the present disclosure, based on the multiple gradient values adjacent to the central G pixel point in the area to be processed obtained in step 202, namely the first gradient values, diff_0, diff_1, diff_2, and diff_3, the pixel value of the central G pixel point in the area to be processed is corrected by using the multiple first gradient values.
[0067] Calculate the weight coefficients corresponding to G1~G4 respectively. The weight calculation formula is as follows:
[0068]
[0069] It is understandable that the calculation method for the weight coefficient is not limited to the above calculation process, and other calculation methods can also be used, which is not limited in the embodiments of the present disclosure. The present disclosure performs normalization processing by a shift operation method. Compared with the traditional weight calculation formula, the division calculation process is omitted, the calculation steps are simplified, and the correction efficiency is improved.
[0070] Step 206 : weighting the first pixel value of the first pixel and the third pixel values of the second pixels based on the multiple weight coefficients to obtain the second pixel value of the first pixel.
[0071] In the embodiment of the present disclosure, the weight coefficient is calculated in step 205, and the first pixel value and the third pixel values corresponding to the plurality of second pixel points are weighted to obtain an adjusted second pixel value.
[0072] In an optional embodiment of the present disclosure, Figure 5 As shown, the distribution of G pixels and corresponding weights in the area to be processed with a size of 3*3 matrix.
[0073] Based on the weight coefficient calculated by formula 2, the pixel value of the central G pixel point in the 3*3 area to be processed is weighted, and the value G0' after the G channel imbalance correction is obtained by formula 3.
[0074]
[0075] Wherein, G0' is the adjusted second pixel value.
[0076] It can be understood that the adjustment of the first pixel value of the first pixel point in the present disclosure can be an adaptive adjustment, and the size of the weight coefficient can be dynamically adjusted according to the severity of the green channel imbalance problem of the input image to achieve the effect of adaptive adjustment.
[0077] In summary, through the method provided by the present invention, a first pixel point and multiple second pixel points in the area to be processed of the input image are determined, multiple first gradient values and multiple second gradient values are determined based on the first pixel point and the multiple second pixel points, the multiple first gradient values are summed with the multiple second gradient values, a statistical value is determined, and it is judged whether the statistical value meets the preset condition. If the statistical value meets the preset condition, multiple weight coefficients corresponding to the multiple second pixel points are determined based on the multiple first gradient values, and the first pixel value of the first pixel point and the third pixel value of the multiple second pixel points are weighted based on the multiple weight coefficients to obtain the second pixel value of the first pixel point, so as to realize adaptive correction of the image based on the statistical value of the gradient value in the area to be processed, eliminate artifacts formed on the image due to process differences, and adjust the first pixel value by judging the statistical value at the same time, to ensure that the flat area of the image is corrected without losing the details of the edge area, protect weak texture information, and improve correction efficiency.
[0078] To facilitate the display of image differences, such as Figure 6 , Figure 7 As shown, the present disclosure provides a schematic diagram of the correction capability of a GIC for G channel imbalance, and a schematic diagram of the detail retention capability of a GIC.
[0079] Among them, GIC (Green imbalance correction) is green balance correction. Figure 6 (a) Figure 7 (a) is the output image of Bayer data without GIC processing; Figure 6 (b) Figure 7 (b) is the output image of the Bayer data after only the processing of step 205 and step 206 in the present disclosure; Figure 6 (c) Figure 7 (c) is the output image of the Bayer data processed by the complete scheme of the present disclosure.
[0080] In this disclosure, compared to Figure 6 (a) Figure 6 (b) and Figure 6 (c) The artifact suppression effect on flat areas is significant. Figure 7 The lines in Figure 7 The weak texture and Figure 7 (a) are almost identical, and Figure 7 (c) Compared to Figure 7 (b) Line clarity is significantly improved.
[0081] Figure 8 FIG. 8 is a schematic diagram of the structure of an image processing device 800 provided in an embodiment of the present disclosure. Figure 8 As shown, the image processing device comprises:
[0082] A determination unit 810, configured to determine a statistical value of a plurality of gradient values in a region to be processed of an input image;
[0083] A judging unit 820 is used to judge whether the statistical value meets a preset condition;
[0084] The adjusting unit 830 is configured to adjust the first pixel value of the first pixel point to a second pixel value if the statistical value meets a preset condition.
[0085] In some embodiments, the multiple gradient values include multiple first gradient values and multiple second gradient values, and the determination unit is also used to: determine a first pixel point and multiple second pixel points in the input image in the area to be processed, where the first pixel point is adjacent to the multiple second pixel points; based on the first pixel point and the multiple second pixel points, determine multiple first gradient values and multiple second gradient values, the multiple first gradient values are the absolute values of the difference in pixel values between the multiple second pixel points and the first pixel point, and the multiple second gradient values are the absolute values of the difference in pixel values between the multiple second pixel points.
[0086] In some embodiments, the determination unit 810 is used to: sum the multiple first gradient values and the multiple second gradient values to determine the statistical value.
[0087] In some embodiments, the adjustment unit 830 is further configured to: if the statistical value does not satisfy a preset condition, use the first pixel value of the first pixel point as the second pixel value.
[0088] In some embodiments, the preset condition includes the statistical value being smaller than a ratio of the first pixel value to a preset value.
[0089] In some embodiments, the adjustment unit 830 is used to: determine multiple weight coefficients corresponding to multiple second pixel points based on multiple first gradient values; and weight the first pixel value of the first pixel point and the third pixel values of the multiple second pixel points based on the multiple weight coefficients to obtain the second pixel value of the first pixel point.
[0090] In summary, through the image processing device, the statistical values of multiple gradient values in the area to be processed of the input image are determined; it is judged whether the statistical values meet the preset conditions; if the statistical values meet the preset conditions, the first pixel value of the first pixel point is adjusted to the second pixel value, which solves the problem of imbalance in the green channel, and realizes adaptive correction of the image based on the statistical values of the gradient values in the area to be processed, eliminating artifacts formed on the image due to process differences, and at the same time, through the judgment of the statistical values, it is ensured that the image is corrected without losing the details of the edge area, thereby improving the correction efficiency.
[0091] Corresponding to the methods provided in the above-mentioned embodiments, the present disclosure also provides an image processing device. Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation method of the method is also applicable to the device provided in this embodiment and will not be described in detail in this embodiment.
[0092] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.
[0093] Fig. 9 1 is a block diagram of an electronic device 900 for implementing the above-mentioned image processing method according to an exemplary embodiment. For example, the electronic device 900 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0094] Reference Fig. 9 , the electronic device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0095] The processing component 902 generally controls the overall operation of the electronic device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0096] The memory 904 is configured to store various types of data to support operations on the electronic device 900. Examples of such data include instructions for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0097] The power supply component 906 provides power to the various components of the electronic device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 900.
[0098] The multimedia component 908 includes a screen that provides an output interface between the electronic device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the electronic device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0099] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the electronic device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0100] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0101] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the electronic device 900. For example, the sensor assembly 914 can detect the open / closed state of the electronic device 900, the relative positioning of components, such as the display and keypad of the electronic device 900, and the sensor assembly 914 can also detect the position change of the electronic device 900 or a component of the electronic device 900, the presence or absence of user contact with the electronic device 900, the orientation or acceleration / deceleration of the electronic device 900, and the temperature change of the electronic device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0102] The communication component 916 is configured to facilitate wired or wireless communication between the electronic device 900 and other devices. The electronic device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio) or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0103] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0104] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the electronic device 900 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0105] An embodiment of the present disclosure further proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the image processing method described in the above embodiment of the present disclosure.
[0106] An embodiment of the present disclosure further provides a computer program product, including a computer program, which executes the image processing method described in the above embodiment of the present disclosure when a processor is used.
[0107] An embodiment of the present disclosure also proposes a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from a memory of an electronic device and send signals to the processor, the signals include computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the image processing method described in the above embodiments of the present disclosure.
[0108] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0109] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0110] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0111] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0112] It should be understood that the various parts of the embodiments of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0113] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0114] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0115] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. An image processing method, characterized in that: The method comprises: Determine the statistical value of multiple gradient values in the region to be processed of the input image; Determining whether the statistical value meets a preset condition; If the statistical value meets the preset condition, the first pixel value of the first pixel point is adjusted to a second pixel value.
2. The method according to claim 1, characterized in that The plurality of gradient values include a plurality of first gradient values and a plurality of second gradient values, and the method further includes: Determine a first pixel point and a plurality of second pixel points of the input image in a to-be-processed area, wherein the first pixel point is adjacent to the plurality of second pixel points; Based on the first pixel point and the multiple second pixel points, multiple first gradient values and multiple second gradient values are determined, the multiple first gradient values are the absolute values of the difference in pixel values between the multiple second pixel points and the first pixel point, and the multiple second gradient values are the absolute values of the difference in pixel values between the multiple second pixel points.
3. The method according to claim 2, characterized in that The step of determining the statistical values of a plurality of gradient values of the input image in the area to be processed comprises: The plurality of first gradient values and the plurality of second gradient values are summed to determine the statistical value.
4. The method according to claim 1, characterized in that: The method further comprises: If the statistical value does not satisfy the preset condition, the first pixel value of the first pixel point is used as the second pixel value.
5. The method according to claim 4, characterized in that The preset condition includes that the statistical value is smaller than a ratio of the first pixel value to a preset value.
6. The method according to claim 4, characterized in that If the statistical value satisfies a preset condition, adjusting the first pixel value of the first pixel point to a second pixel value includes: Based on the multiple first gradient values, determining multiple weight coefficients corresponding to the multiple second pixel points; Based on the multiple weight coefficients, the first pixel value of the first pixel point and the third pixel values of the multiple second pixel points are weighted to obtain the second pixel value of the first pixel point.
7. An image processing device, characterized in that: The device comprises: A determination unit, used to determine the statistical values of a plurality of gradient values in the region to be processed of the input image; A judging unit, used to judge whether the statistical value meets a preset condition; An adjustment unit is used to adjust the first pixel value of the first pixel point to a second pixel value if the statistical value meets the preset condition.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.
10. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal includes a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
System and method for demosaicing image data using weighted gradients
CN102640499A
Image correction method for green channel imbalance of Bayer domain, and image correction system thereof
CN110248169A
Image green channel balancing method and device
CN112689141A
Image processing method and device, computer equipment and storage medium
CN116091405A
Image processing apparatus and method
EP2574034A2
