CN112752023B - Image adjusting method and device, electronic equipment and storage medium - Google Patents

Image adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112752023B
CN112752023B CN202011596942.2A CN202011596942A CN112752023B CN 112752023 B CN112752023 B CN 112752023B CN 202011596942 A CN202011596942 A CN 202011596942A CN 112752023 B CN112752023 B CN 112752023B
Authority
CN
China
Prior art keywords
image
color
target
abnormal
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011596942.2A
Other languages
Chinese (zh)
Other versions
CN112752023A (en
Inventor
胡佳文
梁选勤
王平
张杰洪
吴初春
林志权
周锋
杨才宝
杨金河
韦洁钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tianshitong Vision Co ltd
Original Assignee
Shenzhen Tianshitong Vision Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tianshitong Vision Co ltd filed Critical Shenzhen Tianshitong Vision Co ltd
Priority to CN202011596942.2A priority Critical patent/CN112752023B/en
Publication of CN112752023A publication Critical patent/CN112752023A/en
Application granted granted Critical
Publication of CN112752023B publication Critical patent/CN112752023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3179Video signal processing therefor
    • H04N9/3182Colour adjustment, e.g. white balance, shading or gamut

Abstract

The invention discloses an image adjusting method, an image adjusting device, electronic equipment and a storage medium, and relates to the technical field of image processing, wherein the image adjusting method comprises the following steps: acquiring an original image, and processing the original image into a plurality of target areas; extracting abnormal regions from the target regions; correcting and adjusting the color components of the abnormal area to obtain a first restored image; acquiring a color component ratio of the first restored image, and calculating a target component coefficient corresponding to the first restored image according to the color component ratio and a preset color correction matrix; and acquiring a preset saturation, processing the first restored image according to the preset saturation and the target component coefficient, and outputting a target image. The image adjusting method can dynamically adjust the color of the image acquired by the camera, and ensure that the image can show the optimal effect in different environments.

Description

Image adjusting method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image adjusting method and apparatus, an electronic device, and a storage medium.
Background
The quality of the picture acquired by a camera may be affected by two factors: scene illumination and sensor reverberations to the light source color spectrum. The images obtained by the camera show different image effects under different brightness and color temperatures, and when the external environment is changed, the images obtained by the camera may not achieve relatively good effects.
At present, a plurality of sets of image parameters of a camera are generally set under different environments to solve the problem of poor image quality effect caused by environment change. The method can solve the color problem to a certain extent, but still has the problem that the image parameters are not matched with the field environment, and the acquired image cannot be stably presented.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the embodiment of the invention provides an image adjusting method, which can dynamically adjust the color of an image acquired by a camera and ensure that the image can show the optimal effect under different environments.
The embodiment of the invention also provides an image adjusting device.
The embodiment of the invention also provides the electronic equipment.
The embodiment of the invention also provides a computer readable storage medium.
An image adjustment method according to an embodiment of a first aspect of the present invention includes:
acquiring an original image, and processing the original image into a plurality of target areas;
extracting abnormal regions from the target regions;
correcting and adjusting the color components of the abnormal area to obtain a first restored image;
acquiring a color component ratio of the first restored image, and calculating a target component coefficient corresponding to the first restored image according to the color component ratio and a preset color correction matrix;
and acquiring a preset saturation, processing the first restored image according to the preset saturation and the target component coefficient, and outputting a target image.
According to the image adjusting method in the embodiment of the first aspect of the invention, at least the following beneficial effects are achieved: the original image is processed into a plurality of target areas, abnormal areas are extracted from the target areas, color components of the abnormal areas are corrected and adjusted to obtain a first restored image, a target component coefficient corresponding to the first restored image is calculated according to a color component ratio of the first restored image and a preset color correction matrix, the first restored image is processed according to a preset saturation and the target component coefficient, the target image is output, the image colors collected by a camera can be dynamically adjusted, and the image can show the optimal effect in different environments.
According to some embodiments of the invention, the extracting the abnormal region from the plurality of target regions comprises: acquiring a color mean value corresponding to the target area; comparing the size relation between the color mean value and a preset threshold value; and if the color mean value is larger than or smaller than the preset threshold value, setting a target area corresponding to the color mean value as an abnormal area.
According to some embodiments of the present invention, the performing rectification adjustment on the color component of the abnormal region to obtain a first restored image includes: acquiring a color component corresponding to the abnormal area; calculating area weights corresponding to the abnormal areas according to the color components, and processing the abnormal areas according to the area weights to obtain a reference white point; and carrying out quantization processing according to the color components and the reference white point to obtain the first restored image.
According to some embodiments of the invention, the processing the abnormal region according to the region weight to obtain a reference white point comprises: obtaining a calculation result obtained by performing interpolation calculation on the region weight; acquiring a preset chromaticity coordinate; and correcting the calculation result according to the preset chromaticity coordinate to obtain the reference white point.
According to some embodiments of the present invention, the calculating a target component coefficient corresponding to the first restored image according to the color component ratio and a preset color correction matrix includes: adjusting the color correction matrix according to the color component ratio; and calculating the target component coefficient based on the adjusted color correction matrix.
According to some embodiments of the invention, the processing the first restored image according to the preset saturation and the target component coefficient, and outputting a target image, includes: performing color reduction calculation on the first reduced image according to the target component coefficient to obtain a second reduced image; and adjusting the second restored image according to the preset saturation, and outputting the target image.
An image adjusting apparatus according to a second aspect embodiment of the present invention includes:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an original image and processing the original image into a plurality of target areas;
the extraction module is used for extracting abnormal areas from the target areas;
the correction module is used for correcting and adjusting the color components of the abnormal area to obtain a first restored image;
the calculation module is used for acquiring a color component ratio of the first restored image and calculating a target component coefficient corresponding to the first restored image according to the color component ratio and a preset color correction matrix;
and the output module is used for acquiring a preset saturation, processing the first restored image according to the preset saturation and the target component coefficient and outputting a target image.
According to the image adjusting device of the embodiment of the second aspect of the invention, at least the following beneficial effects are achieved: by implementing the image adjusting method of the embodiment of the first aspect of the invention, the color of the image collected by the camera can be dynamically adjusted, and the image can be ensured to show the optimal effect under different environments.
An electronic device according to an embodiment of the third aspect of the invention includes: at least one processor, and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions that are executed by the at least one processor to cause the at least one processor to implement the image adjustment method of the first aspect when executing the instructions.
According to the electronic equipment provided by the embodiment of the invention, at least the following beneficial effects are achieved: by implementing the image adjusting method of the embodiment of the first aspect of the invention, the color of the image collected by the camera can be dynamically adjusted, and the image can be ensured to show the optimal effect under different environments.
A computer-readable storage medium according to an embodiment of a fourth aspect of the present invention stores computer-executable instructions for causing a computer to perform an image adjusting method according to the first aspect.
The computer-readable storage medium according to the fourth aspect of the present invention has at least the following advantages: by implementing the image adjusting method of the embodiment of the first aspect of the invention, the color of the image collected by the camera can be dynamically adjusted, and the image can be ensured to show the optimal effect under different environments.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of an image adjustment method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an image adjustment apparatus according to an embodiment of the present invention;
fig. 3 is a functional block diagram of an electronic device according to an embodiment of the invention.
Reference numerals are as follows:
the system comprises an acquisition module 200, an extraction module 210, a correction module 220, a calculation module 230, an output module 240, a processor 300, a memory 310, a data transmission module 320, a camera 330 and a display screen 340.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, unless otherwise specifically limited, terms such as set, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention by combining the specific contents of the technical solutions.
The quality of the picture acquired by a camera may be affected by two factors: scene illumination and sensor reverberations to the light source color spectrum. The images obtained by the camera show different image effects under different brightness and color temperatures, and when the external environment is changed, the images obtained by the camera may not achieve relatively good effects.
At present, a plurality of sets of image parameters of a camera are generally set under different environments to solve the problem of poor image quality effect caused by environment change. The method can solve the color problem to a certain extent, but still has the problem that the image parameters are not matched with the field environment, and the acquired image cannot be stably presented.
Based on this, the embodiment of the invention provides an image adjusting method, an image adjusting device, an electronic device and a storage medium, which can dynamically adjust the color of an image acquired by a camera, and ensure that the image can show the optimal effect in different environments.
Referring to fig. 1, an image adjustment method according to an embodiment of a first aspect of the present invention includes:
step S100, acquiring an original image, and processing the original image into a plurality of target areas.
Wherein the RAW image may be a RAW image (RAW, i.e., a RAW image file containing data processed from an image sensor of a digital camera, scanner, or motion picture film scanner), i.e., image data that has not been processed, printed, or used for editing; the target region may be a partial image region into which the original image is region-divided. Before the image adjustment, the brightness of the lamp panel can be adjusted, the average brightness of an image picture can be kept stable as far as possible, and the subsequent image adjustment is guaranteed. Optionally, taking Image acquisition of the camera as an example, the Image data acquired by the Image sensor of the camera may be analyzed by using an IPS technology (Image Signal Processor, i.e., Image processing, which mainly has a main function of performing post-processing on a Signal output by the front-end Image sensor, and the main functions include linear correction, noise removal, dead pixel removal, interpolation, white balance, automatic exposure control, etc., and can better restore field details under different optical conditions depending on an ISP), so as to generate a RAW Image, i.e., obtain an original Image. To facilitate analysis of the original image, the original image may be processed into a plurality of target regions, for example, by dividing the original image into M × N (M rows and N columns) regions, i.e., M × N target regions.
In step S110, an abnormal region is extracted from the plurality of target regions.
The abnormal region may be a target region where an abnormality occurs in a color component, and the color component may be three components of red (R), green (G), and blue (B). Optionally, after the original image is divided into a plurality of target areas, each target area may be analyzed, and an abnormal target area is extracted, that is, an abnormal area is obtained. Specifically, the R, G, B mean value of each target area may be counted, that is, the mean value of all colors in each target area is obtained, and the color components of which target areas are abnormal are analyzed, for example, the determination may be performed according to an analysis standard preset as required, where the analysis standard may include: a preset threshold or a preset evaluation index, so that the abnormal region can be analyzed and extracted according to the analysis standard.
Step S120, performing correction adjustment on the color component of the abnormal region to obtain a first restored image.
Wherein, the color component can be an RBG component, RGB represents the colors of three channels of red, green and blue, and three components of red (R), green (G) and blue (B); the first restored image may be an image obtained after the preliminary restoration processing. Optionally, when the color component of the target region is abnormal, the color component of the abnormal region may be adjusted, so that the abnormal region can restore the normal color. Alternatively, the color components of the abnormal area may be subjected to white balance adjustment, for example, the brightest point in the abnormal area may be used as a white point reference, the brightest point may be defined as the maximum value of R + G + B, then the pixel of the abnormal area may be calibrated by using the point as a reference, so as to implement the correction of the color components of the abnormal area, and the corrected image may be used as the first restored image.
Step S130, obtaining a color component ratio of the first restored image, and calculating a target component coefficient corresponding to the first restored image according to the color component ratio and a preset color correction matrix.
Wherein, the color component ratio can be the ratio of the RGB components; the Color Correction Matrix may be a Matrix (i.e., CCM, Color Correction Matrix, which is a Matrix formed by at least two matrices) that is set in advance according to needs and is used for correcting colors of the image; the target component coefficient may be a coefficient of a color component of the calculated first restored image. Since the response of the image sensor to the spectrum is usually deviated from the response of the human eye to the spectrum in the RGB components, the first restored image needs to be corrected to improve the color purity of the first restored image and restore the actual effect of the human eye. Optionally, because the values of the color correction matrices are different at different color temperature brightnesses, the preset color correction matrix may be corrected in advance according to the color component ratio of the first restored image, and then the first restored image may be corrected according to the corrected color correction matrix, and the ratio of the color components of the first restored image is adjusted to obtain the target component coefficient corresponding to the first restored image.
Step S140, acquiring a preset saturation, processing the first restored image according to the preset saturation and the target component coefficient, and outputting a target image.
The preset saturation can be the integral saturation of the image preset according to the requirement; the target image may be an optimal image obtained after adjustment and capable of being stably presented. Optionally, the color component of the first restored image may be multiplied by the target component coefficient, so that the effect achieved by the adjusted output target image is consistent with the visual effect of human eyes. Because the situation that the brightness is insufficient or the effect is not ideal may occur in the image adjusting process, the external light intensity or the color temperature can be adjusted in real time according to the preset saturation, and the color of the output target image can be purer by controlling the whole saturation of the image.
According to the image adjusting method, the original image is processed into the plurality of target areas, the abnormal areas are extracted from the plurality of target areas, the color components of the abnormal areas are corrected and adjusted to obtain the first restored image, the target component coefficient corresponding to the first restored image is calculated according to the color component ratio of the first restored image and the preset color correction matrix, the first restored image is processed according to the preset saturation and the target component coefficient, the target image is output, the color of the image collected by the camera can be dynamically adjusted, and the image can be guaranteed to show the optimal effect under different environments.
In some embodiments of the invention, extracting the abnormal region from the plurality of target regions comprises:
and acquiring a color mean value corresponding to the target area. The color mean value may be a mean value of all colors (i.e., three colors of red (R), green (G), and blue (B)) in the target region. Alternatively, R, G, B components of each target region may be counted, the sum of the color components is obtained as R + G + B, and then the color mean c ═ 3 of the target region may be calculated.
And comparing the size relation between the color mean value and a preset threshold value. The preset threshold may be a critical value corresponding to a preset color mean value. Optionally, comparing the size relationship between the color mean value and the preset threshold value may obtain: the color mean value is larger than a preset threshold value, the color mean value is equal to the preset threshold value, and the color mean value is smaller than the preset threshold value.
And if the color mean value is larger than or smaller than a preset threshold value, setting a target area corresponding to the color mean value as an abnormal area. Optionally, if the color mean value of a certain target region is not equal to the preset threshold, the color component of the target region is abnormal, and the target region may be set as an abnormal region. In some specific embodiments, if the color mean of a certain target region is equal to the preset threshold, the color component of the target region is normal, and the target region is not an abnormal region. By comparing the size relationship between the color mean value of the target area and the preset threshold, if the color mean value is greater than or less than the preset threshold, it can be determined that the color component of the target area is abnormal, and the corresponding target area can be set as an abnormal area, so as to accurately extract the abnormal area.
In some embodiments of the present invention, performing rectification adjustment on the color component of the abnormal region to obtain a first restored image includes:
and acquiring the color component corresponding to the abnormal area. Optionally, the color component corresponding to the abnormal region may be three components of red (R), green (G), and blue (B) in the abnormal region. The maximum value of R + G + B can be used as the brightest point of the picture, i.e. the maximum pixel point.
And calculating area weights corresponding to the abnormal areas according to the color components, and processing the abnormal areas according to the area weights to obtain a reference white point. The regional weight can be obtained by performing weighted calculation on pixel points corresponding to a plurality of abnormal regions; the reference white point may be the brightest point of the picture. Optionally, the area weight of each abnormal area may be calculated according to the color components of the different abnormal areas, for example, a threshold TX of a reference white point 10% before each abnormal area is calculated according to the value of R + G + B, then the different abnormal areas are weighted by the number of points greater than the threshold TX, the greater the number, the higher the weight, the area weight is obtained, and then a reference white point may be calculated by performing interpolation according to the area weight.
And carrying out quantization processing according to the color components and the reference white point to obtain a first restored image. Optionally, white balance adjustment may be performed on the abnormal region with a reference white point, that is, the RBG component of the abnormal region is re-corrected according to the reference white point, specifically, the first restored image may be obtained by determining whether the R + G + B value (i.e., the color component) of the abnormal region is greater than the average value of the cumulative sum of the R \ G \ B components of the reference white point, and then performing quantization processing [0, 255] on the RGB channel of the abnormal region. The color components of the abnormal area are obtained, the abnormal area is processed according to the obtained area weight to obtain a reference white point, and finally quantization processing is carried out according to the color components and the reference white point to obtain a first restored image, so that the first restored image can normally restore colors under different color temperatures, and the color restoration accuracy is guaranteed.
In some embodiments of the present invention, processing the abnormal region according to the region weight to obtain a reference white point includes:
and obtaining a calculation result obtained by performing interpolation calculation on the region weight. Optionally, as a calculation result of performing interpolation calculation according to the region weight, an intermediate white point may be calculated by performing interpolation on the region weight by using an interpolation method, that is, an intermediate white point is obtained by performing interpolation calculation according to the region weight, and the intermediate white point may be used to calculate a final reference white point.
And acquiring a preset chromaticity coordinate. The preset chromaticity coordinate may be a coordinate on a preset chromaticity diagram, the chromaticity diagram is a plan diagram expressed by chromaticity coordinates in colorimetry, and the plan diagram is called as a chromaticity diagram, where the functional expression v ═ f (u) of the black body locus represents, and the light color change of the black body at different temperatures forms an arc-shaped locus on the chromaticity diagram, and the locus is called as a Planckian locus (Planckian Curve) or a black body locus. Optionally, the preset chromaticity coordinate may be obtained according to an estimation result of the actual color temperature, that is, a corresponding estimation result is found in the planckian locus according to the actual color temperature, that is, the preset chromaticity coordinate may be obtained.
And correcting the calculation result according to the preset chromaticity coordinates to obtain a reference white point. Optionally, the intermediate white point obtained by calculation may be corrected according to a preset chromaticity coordinate, so that the light source point in the abnormal region is close to Planckian currve, and most light source data points are dynamically adjusted to fall near the Planckian currve Curve, so as to obtain a final reference white point. And finally, correcting the intermediate white point obtained by calculation according to the preset chromaticity coordinate, so that a relatively accurate reference white point can be obtained.
In some embodiments of the present invention, calculating a target component coefficient corresponding to the first restored image according to the color component ratio and a preset color correction matrix includes:
and adjusting the color correction matrix according to the color component ratio. Since the matrix values are different at different color temperature luminances, the color correction matrix can be adjusted according to the actual color component ratio of the first restored image, i.e. according to the difference between the actual color and the standard color. For example, assume that the color correction matrix of 3X3 (i.e., three channel components of RBG) is adjusted, and that the adjusted R ', G ', B ' are as follows:
Figure BDA0002868145760000081
the adjusted color correction matrix can be obtained through the adjustment.
And calculating the target component coefficient based on the adjusted color correction matrix. Optionally, a new component coefficient may be calculated by using the adjusted color correction matrix of 3X3, to obtain a target component coefficient, and a value range of the target component coefficient may be [ -4, 4] since too large a coefficient may cause abnormal color. The color correction matrix is adjusted through the color component wallpaper, the target component coefficient is calculated by using the adjusted color correction matrix, and the optimal target component coefficient can be obtained, so that after the first restored image is processed according to the target component coefficient, the color purity can be improved, the color erasing component (gray component) is reduced, and the color is more in line with the actual aesthetic sense.
In some embodiments of the present invention, processing the first restored image according to the preset saturation and the target component coefficient, and outputting the target image, includes:
and carrying out color reduction calculation on the first reduced image according to the target component coefficient to obtain a second reduced image. The second restored image may be an image obtained by performing secondary restoration on the first restored image. Optionally, the color component of the first restored image may be multiplied by the target component coefficient to obtain a second restored image with a new color component.
And adjusting the second restored image according to the preset saturation, and outputting the target image. In the whole image adjusting process, the situation of insufficient brightness or unsatisfactory effect may occur, so that the external light intensity or color temperature can be adjusted through the preset saturation control, so that the image color of the second restored image is more pure until the state of the second restored image tends to be stable (when the brightest area of the picture is controlled to be less than 80% of the maximum value of the exposure module, the image is considered to tend to be stable), that is, a stable target image can be output. And carrying out color reduction calculation on the first reduced image according to the target component coefficient to obtain a second reduced image, and then adjusting the second reduced image according to the preset saturation, so that the first reduced image can be dynamically adjusted, and the target image can be ensured to show the optimal effect in any environment.
Referring to fig. 2, an image adjusting apparatus according to an embodiment of a second aspect of the present invention includes:
an obtaining module 200, configured to obtain an original image, and process the original image into a plurality of target regions;
an extracting module 210, configured to extract an abnormal region from a plurality of target regions;
the correcting module 220 is configured to correct and adjust the color component of the abnormal region to obtain a first restored image;
the calculating module 230 is configured to obtain a color component ratio of the first restored image, and calculate a target component coefficient corresponding to the first restored image according to the color component ratio and a preset color correction matrix;
and the output module 240 is configured to obtain a preset saturation, process the first restored image according to the preset saturation and the target component coefficient, and output the target image.
By implementing the image adjusting method according to the embodiment of the first aspect of the present invention, the image adjusting apparatus can dynamically adjust the color of the image collected by the camera, and ensure that the image can show the optimal effect in different environments.
Referring to fig. 3, an embodiment of the third aspect of the present invention further provides an internal structure diagram of an electronic device, including: at least one processor 300, and a memory 310 communicatively coupled to the at least one processor 300; the system also comprises a data transmission module 320, a camera 330 and a display screen 340.
The processor 300 is configured to execute an image adjusting method in the first embodiment by calling a computer program stored in the memory 310.
The memory, as a non-transitory storage medium, may be used to store a non-transitory software program and a non-transitory computer-executable program, such as an image adjustment method in an embodiment of the first aspect of the present invention. The processor implements an image adjustment method in the above first embodiment by running a non-transitory software program and instructions stored in the memory.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store an image adjustment method performed in the embodiment of the first aspect described above. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software programs and instructions required to implement an image adjustment method in the above-described first embodiment of the invention are stored in a memory and, when executed by one or more processors, perform an image adjustment method in the above-described first embodiment of the invention.
Embodiments of the fourth aspect of the present invention also provide a computer-readable storage medium storing computer-executable instructions for: an image adjustment method in an embodiment of the first aspect is performed.
In some embodiments, the storage medium stores computer-executable instructions, which are executed by one or more control processors, for example, by one of the processors in the electronic device of the third aspect, and may cause the one or more processors to execute an image adjustment method in the first aspect.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.
The above described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (8)

1. An image adjustment method, comprising:
acquiring an original image, and processing the original image into a plurality of target areas;
extracting abnormal regions from the target regions, wherein the abnormal regions are target regions with abnormal color components in the target regions;
correcting and adjusting the color components of the abnormal area to obtain a first restored image;
acquiring a color component ratio of the first restored image, adjusting a color correction matrix according to the color component ratio, and calculating a target component coefficient based on the adjusted color correction matrix;
and acquiring a preset saturation, processing the first restored image according to the preset saturation and the target component coefficient, and outputting a target image, wherein the preset saturation is used for adjusting the external light intensity or color temperature in real time.
2. The method of claim 1, wherein the extracting the abnormal region from the plurality of target regions comprises:
acquiring a color mean value corresponding to the target area;
comparing the size relation between the color mean value and a preset threshold value;
and if the color mean value is larger than or smaller than the preset threshold value, setting a target area corresponding to the color mean value as an abnormal area.
3. The method according to claim 1, wherein performing rectification adjustment on the color component of the abnormal region to obtain a first restored image comprises:
acquiring a color component corresponding to the abnormal area;
calculating area weights corresponding to the abnormal areas according to the color components, and processing the abnormal areas according to the area weights to obtain a reference white point;
and performing quantization processing according to the color components and the reference white point to obtain the first restored image.
4. The method of claim 3, wherein said processing the anomalous region according to the region weight results in a reference white point, comprising:
obtaining a calculation result obtained by performing interpolation calculation on the region weight;
acquiring a preset chromaticity coordinate;
and correcting the calculation result according to the preset chromaticity coordinates to obtain the reference white point.
5. The method according to any one of claims 1 to 4, wherein the processing the first restored image according to the preset saturation and the target component coefficient to output a target image comprises:
performing color reduction calculation on the first reduced image according to the target component coefficient to obtain a second reduced image;
and adjusting the second restored image according to the preset saturation, and outputting the target image.
6. An image adjusting apparatus, comprising:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an original image and processing the original image into a plurality of target areas;
the extraction module is used for extracting abnormal areas from the target areas, wherein the abnormal areas are the target areas with abnormal color components in the target areas;
the correction module is used for correcting and adjusting the color components of the abnormal area to obtain a first restored image;
the calculation module is used for acquiring a color component ratio of the first restored image, adjusting the color correction matrix according to the color component ratio, and calculating the target component coefficient based on the adjusted color correction matrix;
and the output module is used for acquiring a preset saturation, processing the first restored image according to the preset saturation and the target component coefficient, and outputting a target image, wherein the preset saturation is used for adjusting the external light intensity or color temperature in real time.
7. An electronic device, comprising:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions for execution by the at least one processor to cause the at least one processor, when executing the instructions, to implement an image adjustment method as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform an image adjustment method according to any one of claims 1 to 5.
CN202011596942.2A 2020-12-29 2020-12-29 Image adjusting method and device, electronic equipment and storage medium Active CN112752023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011596942.2A CN112752023B (en) 2020-12-29 2020-12-29 Image adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011596942.2A CN112752023B (en) 2020-12-29 2020-12-29 Image adjusting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112752023A CN112752023A (en) 2021-05-04
CN112752023B true CN112752023B (en) 2022-07-15

Family

ID=75646833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011596942.2A Active CN112752023B (en) 2020-12-29 2020-12-29 Image adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112752023B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113298726A (en) * 2021-05-14 2021-08-24 漳州万利达科技有限公司 Image display adjusting method and device, display equipment and storage medium
CN113223041B (en) * 2021-06-25 2024-01-12 上海添音生物科技有限公司 Method, system and storage medium for automatically extracting target area in image
EP4335106A1 (en) * 2021-06-25 2024-03-13 Zhejiang Dahua Technology Co., Ltd. Systems and methods for image correction
CN113920037B (en) * 2021-12-14 2022-04-12 极限人工智能有限公司 Endoscope picture correction method, device, correction system and storage medium
CN115314617A (en) * 2022-08-03 2022-11-08 Oppo广东移动通信有限公司 Image processing system and method, computer readable medium, and electronic device
CN117376718B (en) * 2023-12-08 2024-03-26 深圳市尊正数字视频有限公司 Real-time color adjustment method and system based on camera output signals

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647958A (en) * 2013-12-23 2014-03-19 联想(北京)有限公司 Image processing method and device and electronic device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005073227A (en) * 2003-08-04 2005-03-17 Sharp Corp Image pickup device
US8306280B2 (en) * 2006-04-11 2012-11-06 Nikon Corporation Electronic camera and image processing apparatus
CN106157869B (en) * 2016-06-30 2019-11-05 京东方科技集团股份有限公司 A kind of colour cast modification method, correcting device and display device showing image
CN107958470A (en) * 2017-12-18 2018-04-24 维沃移动通信有限公司 A kind of color correcting method, mobile terminal
CN109523485B (en) * 2018-11-19 2021-03-02 Oppo广东移动通信有限公司 Image color correction method, device, storage medium and mobile terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647958A (en) * 2013-12-23 2014-03-19 联想(北京)有限公司 Image processing method and device and electronic device

Also Published As

Publication number Publication date
CN112752023A (en) 2021-05-04

Similar Documents

Publication Publication Date Title
CN112752023B (en) Image adjusting method and device, electronic equipment and storage medium
US11375128B2 (en) Method for obtaining exposure compensation values of high dynamic range image, terminal device and non-transitory computer-readable storage medium
KR100983037B1 (en) Method for controlling auto white balance
US20070047803A1 (en) Image processing device with automatic white balance
US20090009525A1 (en) Color Adjustment Device and Method
CN109785240B (en) Low-illumination image enhancement method and device and image processing equipment
CN112669758B (en) Display screen correction method, device, system and computer readable storage medium
CN105120247A (en) White-balance adjusting method and electronic device
WO2021218603A1 (en) Image processing method and projection system
US8400522B2 (en) Method and apparatus for applying tonal correction to images
CN107820069A (en) A kind of video monitoring equipment ISP adjustment methods
CN103841337B (en) The method and apparatus of BLC
CN105898252A (en) Television color adjustment method and device
KR20050094213A (en) Image processing device and method for compensating a picture taken against the light using the same
CN107682611B (en) Focusing method and device, computer readable storage medium and electronic equipment
CN113411554A (en) Underwater image color restoration method and device
CN101873504B (en) Method for correcting automatic white balance
CN113596422B (en) Method for adjusting CCM (color correction matrix) and monitoring equipment
CN110086997B (en) Face image exposure brightness compensation method and device
CN114125317A (en) Exposure control method, device, equipment and storage medium
JP2013115571A (en) Information processing apparatus
CN115035851B (en) Gamma white balance rapid adjustment method and related device
US20080012958A1 (en) White balance system and the method thereof
KR102315200B1 (en) Image processing apparatus for auto white balance and processing method therefor
WO2023011191A1 (en) Day-night switching method, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant