Image processing apparatus, method, circuit, electronic device, and storage medium
By acquiring and utilizing multiple signals from the image to determine the adjustment parameters, the problem of low accuracy in image processing devices is solved, and higher image adjustment accuracy is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HAINING ESWIN IC DESIGN CO LTD
- Filing Date
- 2022-11-09
- Publication Date
- 2026-07-10
AI Technical Summary
Existing image processing devices have low accuracy.
By acquiring the original Y signal, original U signal, original V signal, and target Y signal of the image, the adjustment parameters of the image are determined based on these signals, and the image is adjusted according to the adjustment parameters.
The accuracy of the adjustment parameters has been improved, thereby improving the accuracy of image adjustment.
Smart Images

Figure CN115829863B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and more particularly to an image processing apparatus, method, circuit, electronic device, and storage medium. Background Technology
[0002] Image processing is now widely used in people's daily lives. For example, images can be processed to obtain pictures that meet work standards or to create more aesthetically pleasing images. However, image processing devices in related technologies suffer from low accuracy. Summary of the Invention
[0003] This application aims to at least partially address one of the technical problems of low accuracy in image processing devices in the related art.
[0004] Therefore, the first aspect of this application proposes an image processing apparatus that acquires the original Y signal, original U signal, original V signal, and target Y signal of an image, determines adjustment parameters of the image based on the original Y signal, original U signal, original V signal, and target Y signal, and adjusts the image according to the adjustment parameters. Thus, the adjustment parameters of the image can be determined by comprehensively considering the original Y signal, original U signal, original V signal, and target Y signal, improving the accuracy of the adjustment parameters and consequently improving the accuracy of image adjustment.
[0005] The second aspect of this application provides an image processing method.
[0006] A third aspect of this application provides an image processing circuit.
[0007] The fourth aspect of this application provides an electronic device.
[0008] The fifth aspect of this application provides a computer-readable storage medium.
[0009] The first aspect of this application provides an image processing apparatus, comprising: an acquisition module for acquiring an original Y signal, an original U signal, an original V signal, and a target Y signal of an image; a determination module for determining adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal, and the target Y signal; and an adjustment module for adjusting the image according to the adjustment parameters.
[0010] The image processing apparatus according to embodiments of this application acquires the original Y signal, original U signal, original V signal, and target Y signal of an image. Based on the original Y signal, original U signal, original V signal, and target Y signal, it determines adjustment parameters for the image and adjusts the image according to the adjustment parameters. Therefore, by comprehensively considering the original Y signal, original U signal, original V signal, and target Y signal, the adjustment parameters for the image can be determined, improving the accuracy of the adjustment parameters and thus improving the accuracy of image adjustment.
[0011] A second aspect of this application provides an image processing method, comprising: acquiring an original Y signal, an original U signal, an original V signal, and a target Y signal of an image; determining adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal, and the target Y signal; and adjusting the image according to the adjustment parameters.
[0012] A third aspect of this application provides an image processing circuit, comprising: a generator and a first regulator; wherein the generator includes a first input terminal, a second input terminal, a third input terminal, and a fourth input terminal, the inputs of the first input terminal, the second input terminal, the third input terminal, and the fourth input terminal being the original Y signal, the original U signal, the original V signal, and the target Y signal of an image, respectively; the generator is configured to output adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal, and the target Y signal, wherein the output terminal of the generator is connected to the input terminal of the first regulator; the first regulator is configured to adjust the image according to the adjustment parameters.
[0013] A fourth aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the image processing method as described above.
[0014] A fifth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image processing method as described above.
[0015] Additional aspects and advantages of this application 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 this application. Attached Figure Description
[0016] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0017] Figure 1 This is a schematic diagram of the structure of an image processing apparatus according to an embodiment of this application;
[0018] Figure 2 This is a schematic flowchart of an image processing method according to an embodiment of this application;
[0019] Figure 3 This is a schematic flowchart of an image processing method according to another embodiment of this application;
[0020] Figure 4 This is a schematic flowchart of an image processing method according to another embodiment of this application;
[0021] Figure 5 This is a schematic diagram of the structure of an image processing circuit according to an embodiment of this application;
[0022] Figure 6 This is a schematic diagram of the structure of an image processing circuit according to another embodiment of this application;
[0023] Figure 7 This is a schematic diagram of the structure of an image processing circuit according to another embodiment of this application;
[0024] Figure 8 This is a schematic diagram of the structure of an image processing circuit according to another embodiment of this application;
[0025] Figure 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0026] Embodiments of this application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0027] The image processing methods, apparatus, circuits, electronic devices, and storage media of this application are described below with reference to the accompanying drawings.
[0028] Figure 1 This is a schematic diagram of the structure of an image processing apparatus according to an embodiment of the present application.
[0029] like Figure 1 As shown, the image processing apparatus 100 of this application embodiment may include: an acquisition module 110, a determination module 120, and an adjustment module 130.
[0030] The acquisition module 110 is used to acquire the original Y signal, original U signal, original V signal and target Y signal of the image;
[0031] The determining module 120 is used to determine the adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal and the target Y signal;
[0032] The adjustment module 130 is used to adjust the image according to the adjustment parameters.
[0033] In one embodiment of this application, the determining module 120 is further configured to: determine the target parameters of the image based on the original U signal and the original V signal; and determine the adjustment parameters based on the original Y signal, the target Y signal, and the target parameters.
[0034] In one embodiment of this application, the determining module 120 is further configured to: determine the saturation gain of the image based on the target saturation and the original saturation of the image; and determine the adjustment parameter based on the original Y signal, the target Y signal, the target parameter, and the saturation gain.
[0035] In one embodiment of this application, the determining module 120 is further configured to: obtain a first product of the saturation gain and the target Y signal; obtain a second product based on the saturation gain and the target parameter; obtain a first sum of the original Y signal and the second product; and determine the ratio of the first product to the first sum as the adjustment parameter.
[0036] In one embodiment of this application, the determining module 120 is further configured to: identify whether the target setting conditions are met based on the original U signal and the original V signal, and determine the target parameter based on the original U signal; or, identify whether the target setting conditions are not met based on the original U signal and the original V signal, and determine the target parameter based on the original U signal and the original V signal.
[0037] In one embodiment of this application, the determining module 120 is further configured to: identify that the target setting condition is met in response to the original U signal being less than a first set value and the original V signal being greater than the product of a second set value and the original U signal; or, identify that the target setting condition is met in response to the original U signal being greater than or equal to the first set value and the original V signal being greater than the product of a third set value and the original U signal; wherein the second set value is greater than or equal to the third set value.
[0038] In one embodiment of this application, the determining module 120 is further configured to: determine the product of a fourth set value and the original U signal as the target parameter when the original U signal is less than the first set value and the original V signal is greater than the product of the second set value and the original U signal; or, determine the product of a fifth set value and the original U signal as the target parameter when the original U signal is greater than or equal to the first set value and the original V signal is greater than the product of the third set value and the original U signal; wherein the fourth set value is less than or equal to the fifth set value.
[0039] In one embodiment of this application, the determining module 120 is further configured to: perform a weighted summation on the original U signal and the original V signal to obtain a second sum value, and determine the second sum value as the target parameter.
[0040] In one embodiment of this application, the adjustment module 130 is further configured to: adjust the U signal of the image from the original U signal to the target U signal according to the adjustment parameters, and adjust the V signal of the image from the original V signal to the target V signal, so as to adjust the saturation of the image.
[0041] In one embodiment of this application, the adjustment module 130 is further configured to: determine the target U signal by multiplying the adjustment parameter by the original U signal, and determine the target V signal by multiplying the adjustment parameter by the original V signal; adjust the U signal of the image from the original U signal to the target U signal, and adjust the V signal of the image from the original V signal to the target V signal.
[0042] In one embodiment of this application, the adjustment module 130 is further configured to: adjust the Y signal of the image from the original Y signal to the target Y signal, so as to adjust the brightness of the image.
[0043] In one embodiment of this application, the acquisition module 110 is further configured to: determine the brightness gain of the image based on the target brightness and the original brightness of the image; and determine the target Y signal by multiplying the brightness gain by the original Y signal.
[0044] It should be noted that, because the image processing apparatus provided in this application embodiment is similar to the following... Figures 2 to 4 The image processing method provided in the embodiments corresponds to the image processing apparatus provided in the embodiments of this application, and will not be described in detail in the embodiments of this application.
[0045] In summary, the image processing apparatus of this application acquires the original Y signal, original U signal, original V signal, and target Y signal of an image, determines adjustment parameters of the image based on the original Y signal, original U signal, original V signal, and target Y signal, and adjusts the image according to the adjustment parameters. Therefore, by comprehensively considering the original Y signal, original U signal, original V signal, and target Y signal, the adjustment parameters of the image can be determined, improving the accuracy of the adjustment parameters and thus improving the accuracy of image adjustment.
[0046] Figure 2 This is a schematic flowchart of an image processing method according to an embodiment of the present application.
[0047] like Figure 2 As shown, the image processing method of this application embodiment includes:
[0048] S101, acquire the original Y signal, original U signal, original V signal and target Y signal of the image.
[0049] It should be noted that the image processing method in this application embodiment is executed by an image processing device. The image processing device in this application embodiment can be configured in any electronic device so that the electronic device can execute the image processing method in this application embodiment. The electronic device can be a database, a PC (Personal Computer), a cloud device, a mobile device, etc. Mobile devices can be, for example, mobile phones, tablets, personal digital assistants, wearable devices, in-vehicle devices, etc., hardware devices with various operating systems, touchscreens, and / or displays.
[0050] It should be noted that the Y signal of an image is used to characterize the image's brightness, while the U and V signals are used to characterize the image's chromaticity. The original Y signal, original U signal, and original V signal refer to the Y signal, U signal, and V signal of the image before adjustment, respectively, while the target Y signal refers to the Y signal of the image after adjustment.
[0051] In one embodiment, acquiring the original Y signal, original U signal, and original V signal of an image includes acquiring the original R signal, original G signal, and original B signal of the image, and performing signal conversion on the original R signal, original G signal, and original B signal to obtain the original Y signal, original U signal, and original V signal. Here, the R signal, G signal, and B signal refer to the signals on the red channel, green channel, and blue channel, respectively.
[0052] In one embodiment, acquiring the original Y signal, original U signal, and original V signal of an image includes acquiring signals from the Y channel, U channel, and V channel of the image before adjustment, determining the acquired signal on the Y channel as the original Y signal, the acquired signal on the U channel as the original U signal, and the acquired signal on the V channel as the original V signal.
[0053] In one implementation, acquiring the target Y signal includes acquiring the signal of the Y channel of the adjusted image and determining the acquired signal of the Y channel as the target Y signal.
[0054] In one embodiment, the method further includes adjusting the Y signal of the image from the original Y signal to the target Y signal to adjust the brightness of the image, thereby enabling brightness adjustment of the image.
[0055] In one implementation, acquiring the target Y signal includes determining the image's brightness gain based on the target brightness and the original brightness, and then determining the target Y signal by multiplying the brightness gain by the original Y signal. It should be noted that the target brightness, original brightness, and brightness gain are not subject to excessive limitations; for example, the target brightness can be set by the user, and the brightness gain can be 1, 3, 5, etc. Therefore, this method can determine the target Y signal based on the brightness gain and the original Y signal.
[0056] In some examples, the brightness gain of an image is determined based on the target brightness and the original brightness of the image. This includes obtaining the ratio of the target brightness to the original brightness and determining the brightness gain based on the ratio. For example, the ratio can be used to determine the brightness gain, or the brightness gain can be determined based on the ratio and a set coefficient. For instance, the product of the ratio and the set coefficient can be used to determine the brightness gain.
[0057] As another possible implementation, the brightness gain of the image can be obtained directly. For example, the brightness gain can be set by the user, and a configuration command for the brightness gain of the image can be received, from which the brightness gain can be extracted.
[0058] S102 determines the adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal, and the target Y signal.
[0059] In one implementation, determining image adjustment parameters based on the original Y signal, original U signal, original V signal, and target Y signal includes obtaining a first setting algorithm by inputting the original Y signal, original U signal, original V signal, and target Y signal into the first setting algorithm to obtain the adjustment parameters. It should be noted that the first setting algorithm is not overly limited; for example, it can be a pre-trained algorithm or a real-time trained algorithm.
[0060] In one implementation, the original Y signal, original U signal, original V signal, and target Y signal can be directly input into the first preset algorithm. Alternatively, at least one preprocessing step can be performed on the original Y signal, original U signal, original V signal, and target Y signal, and the preprocessed data can be input into the first preset algorithm. No further limitations are imposed here. Preprocessing is not strictly limited; for example, preprocessing includes, but is not limited to, median filtering, high-pass filtering, moving average, standardization, extremum removal, and missing value imputation.
[0061] S103, adjust the image according to the adjustment parameters.
[0062] It should be noted that there are no strict limitations on the image attributes that the adjustment parameters are used to adjust. For example, image attributes include, but are not limited to, saturation, brightness, contrast, highlights, shadows, warmth, size, etc.
[0063] In one embodiment, adjusting an image according to adjustment parameters includes adjusting the image's U signal from an original U signal to a target U signal, and adjusting the image's V signal from an original V signal to a target V signal, thereby adjusting the image's saturation. It should be noted that the target U signal refers to the adjusted U signal of the image, and the target V signal refers to the adjusted V signal of the image. Thus, this method can adjust the U and V signals of an image according to adjustment parameters to achieve image saturation adjustment.
[0064] In one embodiment, adjusting the U signal of an image from a raw U signal to a target U signal, and adjusting the V signal of an image from a raw V signal to a target V signal, according to adjustment parameters, includes determining the target U signal by multiplying the adjustment parameters by the raw U signal and the target V signal by multiplying the adjustment parameters by the raw V signal, adjusting the U signal of the image from the raw U signal to the target U signal, and adjusting the V signal of the image from the raw V signal to the target V signal. Thus, this method can determine the target U signal based on the adjustment parameters and the raw U signal, and determine the target V signal based on the adjustment parameters and the raw V signal, thereby achieving image saturation adjustment.
[0065] It should be noted that the adjustment of other image attributes besides saturation can refer to the saturation adjustment in the above implementation, and will not be repeated here.
[0066] In summary, the image processing method according to the embodiments of this application acquires the original Y signal, original U signal, original V signal, and target Y signal of an image. Based on the original Y signal, original U signal, original V signal, and target Y signal, adjustment parameters for the image are determined, and the image is adjusted according to the adjustment parameters. Therefore, the adjustment parameters for the image can be determined by comprehensively considering the original Y signal, original U signal, original V signal, and target Y signal, improving the accuracy of the adjustment parameters and thus improving the accuracy of image adjustment.
[0067] Figure 3 This is a schematic flowchart of an image processing method according to another embodiment of this application.
[0068] like Figure 3 As shown, the image processing method of this application embodiment includes:
[0069] S201, acquire the original Y signal, original U signal, original V signal and target Y signal of the image.
[0070] It should be noted that the relevant content of step S201 can be found in the above embodiments, and will not be repeated here.
[0071] S202, based on the original U signal and the original V signal, determines the target parameters of the image.
[0072] In one implementation, the target parameters of the image are determined based on the original U signal and the original V signal. This includes performing a weighted summation of the original U signal and the original V signal to obtain a sum value, and then determining the sum value as the target parameters of the image. It should be noted that the weights corresponding to the original U signal and the original V signal are not subject to excessive limitations and can be set by the user.
[0073] In one implementation, determining target parameters of an image based on the original U signal and the original V signal includes obtaining a second setting algorithm by inputting the original U signal and the original V signal into the second setting algorithm to obtain the target parameters. It should be noted that the second setting algorithm is not overly limited; for example, the second setting algorithm can be a pre-trained algorithm or a real-time trained algorithm.
[0074] S203 determines the adjustment parameters based on the original Y signal, the target Y signal, and the target parameters.
[0075] In one implementation, the adjustment parameters are determined based on the original Y signal, the target Y signal, and the target parameters. This includes obtaining a third setting algorithm by inputting the original Y signal, the target Y signal, and the target parameters into the third setting algorithm to obtain the adjustment parameters. It should be noted that the third setting algorithm is not overly limited; for example, it can be a pre-trained algorithm or a real-time trained algorithm.
[0076] In one implementation, adjustment parameters are determined based on the original Y signal, the target Y signal, and target parameters. This includes determining the image saturation gain based on the target saturation and the original saturation, and determining the adjustment parameters based on the original Y signal, the target Y signal, the target parameters, and the saturation gain. It should be noted that the target saturation, the original saturation, and the saturation gain are not subject to excessive limitations; for example, the target saturation can be set by the user, and the saturation gain can be 1, 3, 5, etc. Therefore, this method comprehensively considers the original Y signal, the target Y signal, the target parameters, and the saturation gain to determine the adjustment parameters, improving the accuracy of the adjustment parameters.
[0077] In some examples, the saturation gain of an image is determined based on the target saturation and the original saturation. This includes obtaining the ratio of the target saturation to the original saturation and determining the saturation gain based on the ratio. For example, the ratio can be used to determine the saturation gain, or the saturation gain can be determined based on the ratio and a set coefficient. For instance, the product of the ratio and the set coefficient can be used to determine the saturation gain.
[0078] In some examples, the adjustment parameters are determined based on the original Y signal, the target Y signal, the target parameters, and the saturation gain. This includes obtaining a fourth setting algorithm by inputting the original Y signal, the target Y signal, the target parameters, and the saturation gain into the fourth setting algorithm to obtain the adjustment parameters. It should be noted that there are no strict limitations on the fourth setting algorithm. For example, the third setting algorithm can be a pre-trained algorithm or a real-time trained algorithm.
[0079] In some examples, the adjustment parameter is determined based on the original Y signal, the target Y signal, the target parameter, and the saturation gain. This includes obtaining a first product of the saturation gain and the target Y signal, obtaining a second product based on the saturation gain and the target parameter, obtaining a first sum of the original Y signal and the second product, and determining the ratio of the first product to the first sum as the adjustment parameter.
[0080] In a specific example, based on the saturation gain and the target parameter, the second product is obtained, which includes obtaining the difference between 1 and the saturation gain, and obtaining the second product of the difference and the target parameter.
[0081] For example, the adjustment parameters can be determined based on the original Y signal, the target Y signal, the target parameters, and the saturation gain, using the following formula:
[0082]
[0083] Where k is the adjustment parameter, G is the saturation gain, Y1 is the target Y signal, Y0 is the original Y signal, and M is the target parameter.
[0084] Based on the above formula, if the saturation gain G is 1, that is, when the target saturation is equal to the original saturation, the adjustment parameter k = Y1 / Y0, and the brightness gain r = target brightness / original brightness = Y1 / Y0. That is, at this time, the adjustment parameter k and the brightness gain r are equal. Specifically, the U signal and V signal of the image can be adjusted according to the adjustment parameter k, and the Y signal of the image can also be adjusted according to the brightness gain r. At this time, only the brightness of the image is adjusted, and the saturation of the image is not adjusted.
[0085] If the saturation gain G is not 1, that is, the target saturation is not equal to the original saturation, then the adjustment parameter k is not equal to the brightness gain r. Specifically, the U signal and V signal of the image can be adjusted according to the adjustment parameter k, and the Y signal of the image can be adjusted according to the brightness gain r. At this time, the brightness and saturation of the image can be adjusted simultaneously.
[0086] It should be noted that the relevant content on adjusting the U signal, V signal, and Y signal of the image can be found in the above embodiments, and will not be repeated here.
[0087] S204, adjust the image according to the adjustment parameters.
[0088] It should be noted that the relevant content of step S204 can be found in the above embodiments, and will not be repeated here.
[0089] In summary, the image processing method according to the embodiments of this application determines the target parameters of the image based on the original U signal and the original V signal, and determines the adjustment parameters based on the original Y signal, the target Y signal and the target parameters, so as to obtain the adjustment parameters.
[0090] Figure 4 This is a schematic flowchart of an image processing method according to another embodiment of this application.
[0091] like Figure 4 As shown, the image processing method of this application embodiment includes:
[0092] S301, acquire the original Y signal, original U signal, original V signal and target Y signal of the image.
[0093] It should be noted that the relevant content of step S301 can be found in the above embodiments, and will not be repeated here.
[0094] S302 identifies the conditions that meet the target setting based on the original U signal and the original V signal, and determines the target parameters based on the original U signal.
[0095] It should be noted that the target setting conditions are not subject to excessive restrictions. For example, target setting conditions include, but are not limited to, the original U signal being in a first setting interval, the original V signal being in a second setting interval, and the result of the operation of the original U signal and the original V signal being in a third setting interval. The first to third setting intervals and the operation method are not subject to excessive restrictions.
[0096] In one implementation, identifying whether a target setting condition is met based on the original U signal and the original V signal includes identifying whether the target setting condition is met in response to the original U signal being less than a first set value and the original V signal being greater than the product of a second set value and the original U signal; or identifying whether the target setting condition is met in response to the original U signal being greater than or equal to the first set value and the original V signal being greater than the product of a third set value and the original U signal. Wherein, the second set value is greater than or equal to the third set value.
[0097] It should be noted that there are no restrictions on the first to third set values. For example, the first to third set values are 0, -3.76, and -4.36, respectively.
[0098] In one implementation, determining the target parameter based on the original U signal includes determining the target parameter based on the original U signal and a set coefficient. For example, the target parameter can be determined by multiplying the original U signal by the set coefficient.
[0099] In one implementation, a target parameter is determined based on the original U signal. This includes determining the product of a fourth set value and the original U signal as the target parameter when the original U signal is less than a first set value and the original V signal is greater than the product of a second set value and the original U signal; or determining the product of a fifth set value and the original U signal as the target parameter when the original U signal is greater than or equal to the first set value and the original V signal is greater than the product of a third set value and the original U signal. The fourth set value is less than or equal to the fifth set value.
[0100] It should be noted that there are no strict restrictions on the fourth and fifth set values. For example, the fourth and fifth set values are 1.5748 and 1.8556, respectively.
[0101] S303 identifies unmet target setting conditions based on the original U signal and the original V signal, and determines the target parameters based on the original U signal and the original V signal.
[0102] It should be noted that, for identifying content that does not meet the target setting conditions, the identification of content that meets the target setting conditions can be referred to in the above embodiments, and will not be repeated here.
[0103] In one implementation, the target parameters are determined based on the original U signal and the original V signal, including obtaining a fifth setting algorithm by inputting the original U signal and the original V signal into the fifth setting algorithm to obtain the target parameters. It should be noted that the fifth setting algorithm is not overly limited; for example, it can be a pre-trained algorithm or a real-time trained algorithm.
[0104] In one implementation, the target parameter is determined based on the original U signal and the original V signal, including performing a weighted summation of the original U signal and the original V signal to obtain a second sum value, and then determining the second sum value as the target parameter. It should be noted that the weights corresponding to the original U signal and the original V signal are not subject to excessive limitations.
[0105] For example, the target parameters can be determined based on the original U signal and the original V signal using the following formula:
[0106] M = 0.1873U0 + 0.4681V0
[0107] Where M is the target parameter, U0 is the original U signal, and V0 is the original V signal.
[0108] S304 determines the adjustment parameters based on the original Y signal, the target Y signal, and the target parameters.
[0109] S305, adjust the image according to the adjustment parameters.
[0110] It should be noted that the relevant content of steps S304-S305 can be found in the above embodiments, and will not be repeated here.
[0111] In summary, the image processing method according to the embodiments of this application can identify whether the target setting conditions are met based on the original U signal and the original V signal. If the target setting conditions are met, the target parameters are determined based on the original U signal. If the target setting conditions are not met, the target parameters are determined based on the original U signal and the original V signal, so as to obtain the target parameters.
[0112] Based on any of the above embodiments, the saturation gain in different regions of the image may be different or the same, and the brightness gain in different regions of the image may be different or the same. Obtaining the saturation gain and brightness gain of the image may include the following possible implementation methods:
[0113] Method 1: Obtain the overall saturation gain of the image, as well as the local brightness gain of the target area in the image.
[0114] It should be noted that in this embodiment, the saturation gain is the same in each region of the image, which is the overall saturation gain. The brightness gain is different in different regions of the image. For example, the target region refers to the region in the image that needs to be adjusted for brightness, that is, the local brightness gain of the target region is not 1.
[0115] Therefore, this method can determine the adjustment parameters based on the overall saturation gain to adjust the saturation of the entire image, and adjust the brightness of the target area in the image based on the local brightness gain, thus achieving overall adjustment of image saturation and local adjustment of image brightness.
[0116] Method 2: Obtain the overall saturation gain and overall brightness gain of the image.
[0117] It should be noted that in this embodiment, the saturation gain in each region of the image is the same, which is the overall saturation gain, and the brightness gain in each region of the image is the same, which is the overall brightness gain.
[0118] Therefore, this method can determine the adjustment parameters based on the overall saturation gain to adjust the saturation of the entire image, and adjust the brightness of the entire image based on the overall brightness gain, thus achieving overall adjustment of the image's saturation and brightness.
[0119] Method 3: Obtain the local saturation gain of the target region in the image, as well as the overall brightness gain of the image.
[0120] It should be noted that in this embodiment, the saturation gain is different in different regions of the image. For example, the target region refers to the area in the image that needs saturation adjustment, meaning the local saturation gain of the target region is not 1. The brightness gain is the same in each region of the image, which is the overall brightness gain.
[0121] Therefore, this method can adjust the saturation of the target region in the image based on the local saturation gain and adjust the brightness of the entire image based on the overall brightness gain, thus achieving overall brightness adjustment and local saturation adjustment of the image.
[0122] In one embodiment, obtaining the saturation gain and brightness gain of an image includes establishing a mapping relationship or mapping table between region identifiers, saturation gain, and brightness gain in the image. After obtaining the region identifiers in the image, the above mapping relationship or mapping table is queried to determine the saturation gain mapped by the region identifier as the saturation gain corresponding to the region identified by the region identifier, and the brightness gain mapped by the region identifier as the brightness gain corresponding to the region identified by the region identifier.
[0123] To achieve the above embodiments, such as Figure 5As shown, this application also proposes an image processing circuit 200, including a generator 210 and a first regulator 220.
[0124] The generator 210 includes a first input terminal 1, a second input terminal 2, a third input terminal 3, and a fourth input terminal 4. The inputs of the first input terminal 1, the second input terminal 2, the third input terminal 3, and the fourth input terminal 4 are the original Y signal, the original U signal, the original V signal, and the target Y signal of the image, respectively.
[0125] Generator 210 is used to output adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal and the target Y signal, wherein the output of the generator is connected to the input of the first regulator 220.
[0126] The first regulator 220 is used to adjust the image according to the adjustment parameters.
[0127] It should be noted that no restrictions are imposed on generator 210 or first regulator 220.
[0128] In summary, the image processing circuit of this application embodiment includes a generator and a first regulator. The generator can determine the adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal, and the target Y signal. The first regulator can adjust the image according to the adjustment parameters. Therefore, the adjustment parameters of the image can be determined by comprehensively considering the original Y signal, the original U signal, the original V signal, and the target Y signal, improving the accuracy of the adjustment parameters and thus improving the accuracy of image adjustment.
[0129] Based on any of the above embodiments, such as Figure 6 As shown, generator 210 includes a first determining unit 21 and a second determining unit 22. The first determining unit 21 has two input terminals: a second input terminal 2 and a third input terminal 3. Its output is the target parameters of the image, and it is connected to a fifth input terminal 5. The second determining unit 22 has three input terminals: a first input terminal 1, a fourth input terminal 4, and a fifth input terminal 5. Its output is an adjustment parameter, and it is connected to the input of the first adjuster 220.
[0130] In one implementation, such as Figure 7 As shown, the second determining unit 22 includes a first acquiring subunit 221, a first multiplier 222, a second multiplier 223, a subtractor 224, a first adder 225, and a divider 226.
[0131] The output of the first acquisition subunit 221 is the saturation gain of the image. The output of the first acquisition subunit 221 is connected to the sixth input terminal 6 and the input terminal of the subtractor 224, respectively.
[0132] The input terminals of the first multiplier 222 include the fourth input terminal 4 and the sixth input terminal 6. The output terminal of the first multiplier 222 is the first product of the saturation gain and the target Y signal. The output terminal of the first multiplier 222 is connected to the seventh input terminal 7.
[0133] The output of subtractor 224 is the difference between 1 and the saturation gain. The output of subtractor 224 is connected to the eighth input terminal 8.
[0134] The input terminals of the second multiplier 223 include the fifth input terminal 5 and the eighth input terminal 8. The output terminal of the second multiplier 223 is the second product of the difference and the target parameter. The output terminal of the second multiplier 223 is connected to the ninth input terminal 9.
[0135] The input terminals of the first adder 225 include a first input terminal 1 and a ninth input terminal 9. The output terminal of the first adder 225 is the first sum of the original Y signal and the second product. The output terminal of the first adder 225 is connected to the tenth input terminal 10.
[0136] The input terminals of the divider 226 include a seventh input terminal 7 and a tenth input terminal 10. The output terminal of the divider 226 is an adjustment parameter, which is the ratio of the first product to the first sum. The output terminal of the divider 226 is connected to the input terminal of the first regulator 220.
[0137] In one implementation, such as Figure 8 As shown, the first determining unit 21 includes a judge 211 and a third multiplier 212.
[0138] The input terminals of the judge 211 include a second input terminal 2 and a third input terminal 3. The judge 211 is used to identify that the target setting condition is met in response to the original U signal being less than a first set value and the original V signal being greater than the product of the second set value and the original U signal.
[0139] The judge 211 is also used to identify that the target setting condition is met in response to the original U signal being greater than or equal to the first set value and the original V signal being greater than the product of the third set value and the original U signal.
[0140] The input terminals of the third multiplier 212 include the second input terminal 2, and the output terminal of the third multiplier 212 is connected to the fifth input terminal 5.
[0141] When the original U signal is less than the first preset value and the original V signal is greater than the product of the second preset value and the original U signal, the output of the third multiplier 212 is the target parameter, which is the product of the fourth preset value and the original U signal; or,
[0142] When the original U signal is greater than or equal to the first set value and the original V signal is greater than the product of the third set value and the original U signal, the output of the third multiplier 212 is the target parameter, which is the product of the fifth set value and the original U signal.
[0143] The second set value is greater than or equal to the third set value, and the fourth set value is less than or equal to the fifth set value.
[0144] In one implementation, such as Figure 8 As shown, the first determining unit 21 also includes a fourth multiplier 213, a fifth multiplier 214, and a second adder 215.
[0145] The judge 211 is also used to identify cases where the target setting conditions are not met based on the original U signal and the original V signal.
[0146] The input terminal of the fourth multiplier 213 includes the second input terminal 2. If the target setting condition is not met, the output terminal of the fourth multiplier 213 is the third product of the sixth set value and the original U signal. The output terminal of the fourth multiplier 213 is connected to the eleventh input terminal 11.
[0147] The input terminal of the fifth multiplier 214 includes the third input terminal 3. If the target setting condition is not met, the output terminal of the fifth multiplier 214 is the fourth product of the seventh setting value and the original V signal. The output terminal of the fifth multiplier 214 is connected to the twelfth input terminal 12.
[0148] The input terminals of the second adder 215 include the eleventh input terminal 11 and the twelfth input terminal 12. The output terminal of the second adder 215 is the target parameter, which is the sum of the third product and the fourth product. The output terminal of the second adder 215 is connected to the fifth input terminal 5.
[0149] In one implementation, such as Figure 6 As shown, the first regulator 220 includes a sixth multiplier 23 and a seventh multiplier 24.
[0150] The output of generator 210 is connected to the thirteenth input terminal 13 and the fourteenth input terminal 14, respectively.
[0151] The input terminals of the sixth multiplier 23 include the second input terminal 2 and the thirteenth input terminal 13. The output terminal of the sixth multiplier 23 is the target U signal, which is the product of the adjustment parameter and the original U signal.
[0152] The input terminals of the seventh multiplier 24 include the third input terminal 3 and the fourteenth input terminal 14. The output terminal of the seventh multiplier 24 is the target V signal, which is the product of the adjustment parameter and the original V signal.
[0153] In one implementation, such as Figure 6 As shown, the image processing circuit 200 further includes a second regulator 230, the input terminal of the second regulator 230 includes a first input terminal 1, the output terminal of the second regulator 230 is a target Y signal, and the output terminal of the second regulator 230 is connected to a fourth input terminal 4.
[0154] In one implementation, such as Figure 8 As shown, the second regulator 230 includes a second acquisition subunit 25 and an eighth multiplier 26.
[0155] The output of the second acquisition subunit 25 is the brightness gain of the image, and the output of the second acquisition subunit 25 is connected to the fifteenth input terminal 15.
[0156] The input terminals of the eighth multiplier 26 include the first input terminal 1 and the fifteenth input terminal 15. The output terminal of the eighth multiplier 26 is the target Y signal, which is the product of the brightness gain and the original Y signal. The output terminal of the eighth multiplier 26 is connected to the fourth input terminal 4.
[0157] It should be noted that the relevant content of the image processing circuit in the embodiments of this application can be found in the relevant content of the image processing method in the above embodiments, and will not be repeated here.
[0158] To achieve the above embodiments, such as Figure 9 As shown, this application also proposes an electronic device 300, including: a memory 310, a processor 320, and a computer program stored on the memory 310 and executable on the processor 320. When the processor 320 executes the program, it implements the image processing method proposed in the foregoing embodiments of this application.
[0159] The electronic device of this application embodiment executes a computer program stored in a memory through a processor to acquire the original Y signal, original U signal, original V signal, and target Y signal of an image. Based on the original Y signal, original U signal, original V signal, and target Y signal, it determines the adjustment parameters of the image and adjusts the image according to the adjustment parameters. Therefore, the adjustment parameters of the image can be determined by comprehensively considering the original Y signal, original U signal, original V signal, and target Y signal, improving the accuracy of the adjustment parameters and thus improving the accuracy of image adjustment.
[0160] To implement the above embodiments, this application also proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the image processing method proposed in the foregoing embodiments of this application.
[0161] The computer-readable storage medium of this application embodiment stores a computer program, which is executed by a processor, to acquire the original Y signal, original U signal, original V signal, and target Y signal of an image. Based on the original Y signal, original U signal, original V signal, and target Y signal, adjustment parameters for the image are determined, and the image is adjusted according to the adjustment parameters. Therefore, the adjustment parameters for the image can be determined by comprehensively considering the original Y signal, original U signal, original V signal, and target Y signal, improving the accuracy of the adjustment parameters and thus improving the accuracy of image adjustment.
[0162] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0163] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. An image processing apparatus, characterized in that, include: The acquisition module is used to acquire the original Y signal, original U signal, original V signal and target Y signal of the image; The determining module is used to determine the adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal, and the target Y signal; An adjustment module is used to adjust the image according to the adjustment parameters; The determining module is further configured to: Based on the original U signal and the original V signal, the target parameters of the image are determined; The adjustment parameters are determined based on the original Y signal, the target Y signal, and the target parameters; The determining module is further configured to: Based on the original U signal and the original V signal, identify conditions that meet the target setting, and determine the target parameters based on the original U signal; or, Based on the original U signal and the original V signal, identify cases where the target setting conditions are not met, and determine the target parameters based on the original U signal and the original V signal.
2. The apparatus according to claim 1, characterized in that, The determining module is further configured to: Based on the target saturation and original saturation of the image, determine the saturation gain of the image; The adjustment parameters are determined based on the original Y signal, the target Y signal, the target parameters, and the saturation gain.
3. The apparatus according to claim 2, characterized in that, The determining module is further configured to: Obtain the first product of the saturation gain and the target Y signal; The second product is obtained based on the saturation gain and the target parameter; Obtain the first sum of the product of the original Y signal and the second product; The ratio of the first product to the first sum is determined as the adjustment parameter.
4. The apparatus according to claim 1, characterized in that, The determining module is further configured to: In response to the original U signal being less than a first preset value and the original V signal being greater than the product of a second preset value and the original U signal, the target preset condition is identified as being met. or, In response to the original U signal being greater than or equal to the first preset value, and the original V signal being greater than the product of the third preset value and the original U signal, the target preset condition is identified as satisfied. Wherein, the second set value is greater than or equal to the third set value.
5. The apparatus according to claim 4, characterized in that, The determining module is further configured to: If the original U signal is less than the first preset value, and the original V signal is greater than the product of the second preset value and the original U signal, then the product of the fourth preset value and the original U signal is determined as the target parameter; or, If the original U signal is greater than or equal to the first set value, and the original V signal is greater than the product of the third set value and the original U signal, then the product of the fifth set value and the original U signal is determined as the target parameter. Wherein, the fourth set value is less than or equal to the fifth set value.
6. The apparatus according to claim 1, characterized in that, The determining module is further configured to: The original U signal and the original V signal are weighted and summed to obtain a second sum value, which is then determined as the target parameter.
7. The apparatus according to claim 1, characterized in that, The adjustment module is also used for: The product of the adjustment parameter and the original U signal is determined as the target U signal, and the product of the adjustment parameter and the original V signal is determined as the target V signal; The U signal of the image is adjusted from the original U signal to the target U signal, and the V signal of the image is adjusted from the original V signal to the target V signal.
8. The apparatus according to any one of claims 1-7, characterized in that, The acquisition module is also used for: Based on the target brightness and the original brightness of the image, determine the brightness gain of the image; The product of the brightness gain and the original Y signal is determined as the target Y signal.
9. An image processing method, characterized in that, include: Acquire the raw Y signal, raw U signal, raw V signal, and target Y signal of the image; Based on the original Y signal, the original U signal, the original V signal, and the target Y signal, the adjustment parameters of the image are determined; The image is adjusted according to the adjustment parameters. The step of determining the adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal, and the target Y signal includes: Based on the original U signal and the original V signal, the target parameters of the image are determined; The adjustment parameters are determined based on the original Y signal, the target Y signal, and the target parameters; Determining the target parameters of the image based on the original U signal and the original V signal includes: Based on the original U signal and the original V signal, identify conditions that meet the target setting, and determine the target parameters based on the original U signal; or, Based on the original U signal and the original V signal, identify cases where the target setting conditions are not met, and determine the target parameters based on the original U signal and the original V signal.
10. An image processing circuit, characterized in that, include: Generator and first regulator; wherein, The generator includes a first input terminal, a second input terminal, a third input terminal, and a fourth input terminal. The inputs of the first input terminal, the second input terminal, the third input terminal, and the fourth input terminal are the original Y signal, the original U signal, the original V signal, and the target Y signal of the image, respectively. The generator is used to output adjustment parameters of the image based on the original Y signal, the original U signal, the original V signal and the target Y signal, wherein the output terminal of the generator is connected to the input terminal of the first adjuster; The first adjuster is used to adjust the image according to the adjustment parameters; The generator includes a first determining unit and a second determining unit; wherein, The input terminal of the first determining unit includes the second input terminal and the third input terminal, the output terminal of the first determining unit is the target parameter of the image, and the output terminal of the first determining unit is connected to the fifth input terminal; The input terminals of the second determining unit include the first input terminal, the fourth input terminal, and the fifth input terminal. The output of the second determining unit is the adjustment parameter. The output terminal of the second determining unit is connected to the input terminal of the first regulator. The first determining unit is further configured to identify conditions that satisfy the target setting based on the original U signal and the original V signal, and determine the target parameters based on the original U signal; or, The first determining unit identifies that the target setting conditions are not met based on the original U signal and the original V signal, and determines the target parameters based on the original U signal and the original V signal.
11. The circuit according to claim 10, characterized in that, The first regulator includes a sixth multiplier and a seventh multiplier; wherein, The output of the generator is connected to the thirteenth input and the fourteenth input, respectively. The input terminals of the sixth multiplier include the second input terminal and the thirteenth input terminal, and the output terminal of the sixth multiplier is the target U signal, which is the product of the adjustment parameter and the original U signal; The input terminals of the seventh multiplier include the third input terminal and the fourteenth input terminal, and the output terminal of the seventh multiplier is the target V signal, which is the product of the adjustment parameter and the original V signal.
12. The circuit according to claim 10 or 11, characterized in that, Also includes: The second regulator has the first input terminal as its input terminal, and the output terminal of the second regulator is the target Y signal. The output terminal of the second regulator is connected to the fourth input terminal.
13. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the image processing method as described in claim 9.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the image processing method as described in claim 9.