CN108446705B - Method and apparatus for image processing - Google Patents

Method and apparatus for image processing Download PDF

Info

Publication number
CN108446705B
CN108446705B CN201710082941.8A CN201710082941A CN108446705B CN 108446705 B CN108446705 B CN 108446705B CN 201710082941 A CN201710082941 A CN 201710082941A CN 108446705 B CN108446705 B CN 108446705B
Authority
CN
China
Prior art keywords
brightness
foreground
color system
luminance
target image
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
CN201710082941.8A
Other languages
Chinese (zh)
Other versions
CN108446705A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710082941.8A priority Critical patent/CN108446705B/en
Priority to PCT/CN2018/071783 priority patent/WO2018149253A1/en
Publication of CN108446705A publication Critical patent/CN108446705A/en
Application granted granted Critical
Publication of CN108446705B publication Critical patent/CN108446705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing
    • G06T2207/20012Locally adaptive

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)

Abstract

The application provides a method and equipment for processing an image, which can accurately acquire the brightness of a target object, reduce the color difference of the target object caused by the change of the brightness of the image and further facilitate the retrieval or identification of the target object. The method comprises the following steps: converting a target image from a red, green and blue (RGB) space to a hue saturation brightness (HSV) space, wherein the target image comprises a foreground part and a background part; determining the color system of the foreground part according to the brightness of the background part and the brightness of the foreground part; adjusting the brightness of the foreground part according to the color system of the foreground part; and converting the image from the HSV space to the RGB space according to the adjusted brightness of the foreground part.

Description

Method and apparatus for image processing
Technical Field
The present application relates to the field of image processing, and more particularly, to a method and apparatus for image processing.
Background
In prior art optical based imaging devices, the imaging quality is affected by the illumination. In many applications based on image content analysis, such as face recognition, iris recognition, image retrieval, video monitoring and the like, external illumination often changes the brightness of an image, and further changes the color of the image, which brings great difficulty to target acquisition and affects the effectiveness of a system which depends on color for retrieval or identification.
Therefore, how to accurately acquire the brightness of the target object, reduce the color difference of the target object caused by the change of the brightness of the image, and improve the effectiveness of a system which depends on the color for searching or identifying is a problem to be solved urgently.
Disclosure of Invention
The application provides a method for processing an image, which can accurately acquire the brightness of a target object, reduce the color difference of the target object caused by the change of the brightness of the image and further facilitate the retrieval or identification of the target object.
In a first aspect, a method for processing an image is provided, including: converting a target image from a red, green and blue (RGB) space to a hue saturation brightness (HSV) space, wherein the target image comprises a foreground part and a background part; determining the color system of the foreground part according to the brightness of the background part and the brightness of the foreground part; adjusting the brightness of the foreground part according to the color system of the foreground part; and converting the image from the HSV space to the RGB space according to the adjusted brightness of the foreground part.
Therefore, in the present application, an image processing apparatus determines a color system of a foreground portion of a target image according to luminance of a background portion of the target image and luminance of the foreground portion of the target image by converting the target image from a red, green, blue, RGB space to a hue saturation luminance HSV space; adjusting the brightness of the foreground part according to the color system of the foreground part; and converting the target image with the adjusted brightness of the foreground part from the HSV space to the RGB space. The color system of the foreground part is determined by combining the brightness of the background part, the condition for determining the color system of the foreground part is increased, and the accuracy for determining the color system of the foreground part is improved, so that the brightness of the foreground part is adjusted according to the color system of the foreground part, the target image with the adjusted brightness of the foreground part is converted into the RGB space from the HSV space, the difference of the color of the target object caused by the different brightness of the image under different illumination is reduced, and the retrieval or identification of the target object is facilitated.
Optionally, in an implementation manner of the first aspect, determining a color system of the foreground portion according to the brightness of the background portion and the brightness of the foreground portion includes: determining a brightness correction coefficient of the foreground part according to the brightness of the background part; adjusting the brightness of the foreground part according to the brightness correction coefficient of the foreground part; and determining the color system of the foreground part according to the adjusted brightness of the foreground part.
Optionally, in an implementation manner of the first aspect, the foreground portion is mainly a target pedestrian image in the target image, and the background portion is image content in the target image except for the foreground portion.
Optionally, in one implementation of the first aspect, the background portion may be divided into the entire background portion and the underfoot background portion. The underfoot background portion may be scaled to a portion of the background underlying the target image.
At this time, by dividing the background portion into the underfoot background portion, the illumination level of the underfoot background portion is closer to that of the foreground portion, which is beneficial to obtaining a more accurate brightness correction coefficient.
Optionally, in an implementation manner of the first aspect, determining a luminance correction coefficient of the foreground portion according to the luminance of the background portion includes: determining the interval range of the background brightness of the background part according to the brightness of the background part and the interval range of the background brightness; and determining the brightness correction coefficient corresponding to the interval range of the background brightness of the background part as the brightness correction coefficient of the foreground part.
Optionally, in an implementation manner of the first aspect, a range of a background luminance to which the background portion belongs is determined according to a luminance of the entire background portion; determining the interval range of the background brightness of the whole background part; and determining the brightness correction coefficient corresponding to the interval range of the background brightness of the whole background part as the brightness correction coefficient of the foreground part.
Optionally, in an implementation manner of the first aspect, a range of a background brightness range to which the background portion belongs is determined according to a brightness of the background portion under the foot; determining the interval range of the background brightness of the whole background part; and determining the brightness correction coefficient corresponding to the interval range of the background brightness of the whole background part as the brightness correction coefficient of the foreground part.
At this time, the brightness correction coefficient of the background part is obtained by comparing the ratio of the background brightness under the illumination condition to the background brightness under the normal illumination condition for multiple times, the brightness coefficient reflects the brightness adjustment of the foreground image under the illumination condition, the brightness of the foreground part is adjusted through the brightness correction coefficient corresponding to the background part, so that the brightness of the foreground part is closer to the brightness under the normal illumination, the color system of the foreground part is determined according to the adjusted brightness of the foreground part, and the accuracy of determining the color system of the foreground part is improved.
Optionally, in an implementation manner of the first aspect, an average value of the brightness of the entire background portion and the brightness of the background portion under the feet is calculated, and an interval range of the background brightness to which the background portion belongs is determined according to the average value; determining the interval range of the background brightness of the whole background part; and determining the brightness correction coefficient corresponding to the interval range of the background brightness of the whole background part as the brightness correction coefficient of the foreground part.
Optionally, in an implementation manner of the first aspect, the determining a luminance correction coefficient of the foreground portion according to the luminance of the background portion includes: calculating an average value of luminance of a background portion of a plurality of images in an image storage database, the plurality of images being images in the same capture scene as the image; and determining the ratio of the brightness of the background part of the target image where the foreground part is located to the average value of the brightness of the background parts of the plurality of images in the image storage database as the brightness correction coefficient of the foreground part.
At this time, the brightness correction coefficient is a ratio of the brightness of the background portion to the brightness of the background portion of the plurality of images in the same capture scene, the influence of illumination on the brightness of the foreground portion of the target image is avoided by referring to the brightness of the background portion of the plurality of images in the same capture scene, the brightness of the foreground portion is adjusted by the brightness correction coefficient corresponding to the background portion, so that the brightness of the foreground portion is closer to the brightness in normal illumination, the color system of the foreground portion is determined according to the adjusted brightness of the foreground portion, and the accuracy of determining the color system of the foreground portion is improved.
Optionally, in an implementation manner of the first aspect, determining a color system of the foreground part according to the adjusted luminance of the foreground part includes: and comparing the adjusted brightness of the foreground part with the brightness ranges of a plurality of color systems to determine the color system of the foreground part.
Optionally, in an implementation manner of the first aspect, the comparing the adjusted luminance of the foreground portion with luminance ranges of a plurality of color systems, and determining the color system of the foreground portion includes: when the adjusted brightness of the foreground part belongs to the brightness range of a first color system in a plurality of color systems and the absolute value of the difference value of the adjusted brightness of the foreground part and the critical value of the brightness range of the first color system is smaller than a first threshold value, determining the color system of the foreground part according to the hue and the saturation of the foreground part in the HSV space; or when the adjusted brightness of the foreground part belongs to a brightness range of a first color system in a plurality of color systems and the absolute value of the difference between the adjusted brightness of the foreground part and the threshold value of the brightness range of the first color system is larger than or equal to the first threshold value, determining the first color system as the color system of the foreground part.
At this time, when the adjusted brightness of the foreground part belongs to the brightness range of the first color system in the multiple color systems and the absolute value of the difference value between the adjusted brightness of the foreground part and the critical value of the brightness range of the first color system is smaller than a first threshold value, the color system of the foreground part is determined according to the hue and the saturation of the foreground part in the HSV space, so that the image query failure caused by misjudgment of the color system of the foreground part is avoided.
Optionally, in an implementation manner of the first aspect, the comparing the adjusted luminance of the foreground portion with luminance ranges of a plurality of color systems, and determining the color system of the foreground portion includes: when the adjusted luminance of the foreground portion belongs to a luminance range of a first color system of a plurality of color systems and an absolute value of a difference from a critical value of the luminance range of the first color system is smaller than a first threshold, the foreground portion may be subjected to a second classification process, and the foreground portion may be respectively processed as a first color system and a second color system, where the second color system is adjacent to the first color system.
Optionally, in an implementation manner of the first aspect, the determining the color system of the foreground portion according to the brightness of the background portion and the brightness of the foreground portion includes: dividing the foreground portion into a plurality of foreground sub-portions; adjusting the brightness of each of the plurality of foreground subsections according to the brightness of the background section; determining the color system of each foreground subsection according to the adjusted brightness of each foreground subsection; the determining the color system of the foreground portion according to the adjusted brightness of the foreground portion includes: and adjusting the brightness of each foreground subsection according to the color system of each foreground subsection.
At this time, by dividing the foreground portion into a plurality of foreground sub-portions and performing different processing on each of the plurality of foreground sub-portions, interference between different foreground sub-portions is avoided, which is advantageous for more accurately judging the color system of each of the plurality of foreground sub-portions and adjusting the luminance of each of the plurality of foreground sub-portions according to the color system of each of the plurality of foreground sub-portions.
Optionally, in an implementation manner of the first aspect, the plurality of foreground sub-portions include a first foreground sub-portion and a second foreground sub-portion, the adjusted luminance of the first foreground sub-portion and the adjusted luminance of the second foreground sub-portion belong to a luminance range of a first color system, an absolute value of a difference between the adjusted luminance of the first foreground sub-portion and a critical value of the luminance range of the first color system is greater than or equal to a second threshold, and an absolute value of a difference between the adjusted luminance of the second foreground sub-portion and a critical value of the luminance range of the first color system is less than the second threshold;
determining the color system of each foreground subsection according to the adjusted brightness of each foreground subsection, comprising:
determining a first color system as the color system of the first foreground subsection;
when the absolute value of the difference value between the adjusted brightness of the second foreground subsection and the adjusted brightness of the first foreground subsection is larger than or equal to a third threshold, determining the color system of the second foreground subsection according to the hue and saturation of the second foreground subsection in the HSV space; or, when the absolute value of the difference between the adjusted brightness of the second foreground sub-portion and the adjusted brightness of the first foreground sub-portion is greater than or equal to a third threshold, determining the color system corresponding to the adjacent range of the adjusted brightness of the second foreground sub-portion as the color system of the second foreground sub-portion; or, when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the luminance of the second foreground subsection is smaller than the third threshold, determining the first color system as the color system of the second foreground subsection.
Optionally, in an implementation manner of the first aspect, when the first foreground sub-portion is a plurality of first foreground sub-portions, the adjusted luminance of the first foreground sub-portion may be an average of the adjusted luminance of any one of the first foreground sub-portions or the adjusted luminance of the plurality of first foreground sub-portions.
Optionally, in an implementation manner of the first aspect, determining a color system of the foreground portion according to the brightness of the background portion and the brightness of the foreground portion includes: inputting the hue, saturation and brightness of the foreground part and the brightness of the background image into a parameter model, and acquiring a label value output by the parameter model, wherein the parameter model is used for indicating the corresponding relation between the label values of a plurality of color systems, the hue, saturation and brightness of the foreground part and the brightness of the background part in the capture scene of the target image; and determining the color system of the foreground part according to the output label value of the parameter model.
Optionally, in an implementation manner of the first aspect, before the inputting the hue, the saturation, and the brightness of the foreground part and the brightness of the background part into the parametric model, the method further includes: and performing algorithm training according to the label value set by each color system in the plurality of color systems, the hue, saturation and brightness of a foreground part in a plurality of images in the image storage database and the brightness of a background part in each image, and determining the parameter model, wherein the plurality of images and the target image are images in the same capture scene.
Optionally, the brightness of the foreground portion is adjusted to be the brightness in the brightness set corresponding to the color system of the foreground portion.
Optionally, determining a brightness set corresponding to the color system of the foreground part according to the color system of the foreground part; and adjusting the brightness of the foreground part according to the brightness set.
Optionally, the color system is one of a dark color system, a colored color system and a white-bright color system, and an element in a brightness set corresponding to the dark color system is a; the brightness set corresponding to the color system is a brightness range which is more than or equal to b and less than or equal to c; the white-light color is associated with an element in the luminance set as d,
wherein a, b, c and d satisfy the relation:
0≤a<b≤c<d≤1
a, b, c and d are all constants.
In a second aspect, a method of processing an image is provided, comprising: converting a target image from a red, green and blue (RGB) space to a hue saturation brightness (HSV) space; when the brightness of the target image belongs to the brightness range of a first color system in a plurality of color systems and the absolute value of the difference value of the brightness range of the target image and the critical value of the brightness range of the first color system is smaller than a first threshold value, determining the color system of the foreground part according to the hue and the saturation of the target image in the HSV space; adjusting the brightness of the target image according to the color system of the target image; and converting the target image from the HSV space to the RGB space according to the adjusted brightness of the target image.
In a third aspect, a method for processing an avatar is provided, including: converting a target image from a red, green, blue, RGB, space to a hue saturation luminance, HSV, space, the target image comprising a first portion and a second portion;
determining a first color system as the color system of the first portion, wherein the luminance of the first portion and the luminance of the second portion belong to a luminance range of the first color system, the absolute value of the difference between the luminance of the first portion and the critical value of the luminance range of the first color system is greater than or equal to a first threshold value, and the absolute value of the difference between the luminance of the second portion and the critical value of the luminance range of the first color system is less than the first threshold value;
when the absolute value of the difference value between the brightness of the second part and the brightness of the first part is larger than or equal to a second threshold value, determining the color system of the second part according to the hue and the saturation of the second part in the HSV space; or when the absolute value of the difference value between the brightness of the second part and the brightness of the first part is greater than or equal to a second threshold value, determining the color system corresponding to the adjacent range of the brightness of the second part as the color system of the second part; or, when the absolute value of the difference between the brightness of the second part and the brightness of the second part is smaller than the second threshold, determining the first color system as the color system of the second part;
adjusting the brightness of the first part and the second part according to the color systems of the first part and the second part;
and converting the image from the HSV space to the RGB space according to the adjusted brightness of the target image.
In a fourth aspect, an image processing apparatus is provided, which includes a conversion module, a first processing module, and an adjustment module, and may perform the method of the first aspect or any possible implementation manner of the first aspect.
In a fifth aspect, an image processing apparatus is provided, which includes a conversion module, a first processing module, and an adjustment module, and may perform the method of the second aspect or any possible implementation manner of the second aspect.
A sixth aspect provides an image processing apparatus comprising a conversion module, a first processing module, and an adjustment module, which may perform the method of the third aspect or any possible implementation manner of the third aspect.
In a seventh aspect, an image processing device is provided, which includes a memory, a transceiver and a processor, where the memory stores program codes that can be used to instruct execution of the first or any optional implementation manner, the transceiver is used to perform specific signal transceiving under the driving of the processor, and when the codes are executed, the processor can implement a method in which a terminal device performs various operations.
In an eighth aspect, there is provided an image processing apparatus, including a memory, a transceiver and a processor, where the memory stores program codes that can be used to instruct execution of the second or any optional implementation manner thereof, and the transceiver is used to perform specific signal transceiving under the drive of the processor, and when the codes are executed, the processor can implement a method in which a terminal apparatus performs various operations.
In a ninth aspect, there is provided an image processing apparatus, including a memory, a transceiver and a processor, where the memory stores program codes that can be used to instruct the execution of the third or any optional implementation manner, the transceiver is used to perform specific signal transceiving under the driving of the processor, and when the codes are executed, the processor can implement the method in which the terminal apparatus performs various operations.
A tenth aspect provides a computer readable medium for storing a computer program comprising instructions for performing the method of the first aspect or any of the possible implementations of the first aspect, the second aspect or any of the possible implementations of the second aspect, the third aspect or any of the possible implementations of the third aspect.
Drawings
Fig. 1 is a schematic diagram of an image processing system using the present application.
Fig. 2 is a schematic flow chart of a method of image processing according to the present application.
Fig. 3 is a schematic diagram of a luminance mapping interval according to the present application.
Fig. 4 is a schematic flow chart of a method of image processing according to the present application.
Fig. 5 is a schematic flow chart of a method of image processing according to the present application.
Fig. 6 is a schematic block diagram of an image processing apparatus according to the present application.
Fig. 7 is a schematic block diagram of an image processing apparatus according to the present application.
Fig. 8 is a schematic block diagram of an image processing apparatus according to the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
FIG. 1 is a schematic diagram of an image processing system of a method and apparatus for processing images of the present application. As shown in fig. 1, the image processing system 100 includes a server 110, a client 120, a transmission device 130, an image processing device 140, and a storage device 150. The server 110 stores pictures that need to be processed by image processing, the client 120 is used to send a retrieval request to the image processing device 140, and the transmission device 130 is used for information transfer between the client 120 and the image processing device 140 or between the client 120 and the server 110, and the transmission device may be a switch. The storage device 150 is used to store the image-processed pictures. The image processing device 140 is mainly used for processing the brightness of the image, storing the processed image in the storage device 140, receiving a retrieval request of the client 120, retrieving the processed image in the storage device, and returning the retrieved result to the client 120.
Alternatively, in the present application, the image processing apparatus 140 may be a video content manager.
For a better understanding of the present application, the present application will be described below with reference to fig. 2-8, taking as an example a system identical or similar to the one shown in fig. 1.
FIG. 2 is a schematic flow chart diagram of a method 200 of processing an image according to the present application. As shown in fig. 2, the method 200 includes the following.
In 210, an image processing device converts a target image from a red, green, blue, RGB, space to a hue saturation luminance, HSV, space, wherein the target image includes a foreground portion and a background portion.
It should be understood that the computer color display uses R, G, B additive color mixing principle to generate colors by emitting three electron beams with different intensities to make the red, green and blue phosphor materials covered inside the screen emit light. This color representation is called RGB color space representation, where R represents red, G represents green, and Blue represents Blue. Hue Saturation Value (HSV) color models are more intuitive user-oriented color models, where H represents the Hue of an image, S represents the Saturation of an image, and V represents the brightness of an image.
Optionally, the foreground portion is mainly a target pedestrian image in the target image, and the background portion is image content in the target image except for the foreground portion, such as ground, buildings and other facilities in the target image.
Alternatively, the background portion may be the entire image content of the image except the foreground portion, and the background portion may also be a part of the image content of the image except the foreground portion. The background portion includes information of the illumination intensity of the target image capture scene, and in some cases, the illumination level of the image of the background portion and the foreground portion are closer, e.g., the underfoot background portion may be selected as a reference to adjust the intensity of the foreground portion. The underfoot background portion may proportionally select a portion of the lower portion of the target image, for example, 15% to 20% of the lower portion of the target image as the underfoot background portion of the target image.
At 220, a color system of the foreground portion is determined based on the luminance of the background portion and the luminance of the foreground portion.
Optionally, the color system may be divided according to regular characteristics of hue, saturation and brightness of different colors, and the change rules of hue, saturation and brightness of different colors in the same color system are consistent, so that the brightness of the target object may be adjusted according to the color system. For example, colors are classified into three color systems, a dark color system, a colored color system, and a white-light color system. The dark color system refers to black, black gray, dark blue, dark black and other colors and their similar colors, and one of the main characteristics of the image belonging to the dark color system is that the V variation range is small and the value of V is small, for example, the value of V is from 0.02 to 0.18, under the condition that the H value of the image is kept unchanged or changed very little (or the illumination intensity is not excessive). The color system refers to red, orange, yellow, green, cyan, blue, purple and other colors and their similar colors, and one of the main characteristics of the image belonging to the color system is that the V value of the image changes in a large range under the condition that the H value remains unchanged or changes a little, and the value of V may be smaller or larger, for example, the value of V ranges from 0.2 to 0.8. The white-light color system refers to white or a color close to white, and one of the main characteristics of an image belonging to the white-light color system is that the V component has a small variation range (relative to the color system) but a large V value, for example, V takes a value from 0.7 to 0.9, in the case that the H value of the image is kept unchanged or changes a little.
Optionally, determining a brightness correction coefficient of the foreground part according to the brightness of the background part; adjusting the brightness of the foreground part according to the brightness correction coefficient of the foreground part; and determining the color system of the foreground part according to the adjusted brightness of the foreground part.
Optionally, determining a background brightness interval range to which the background part belongs according to the brightness of the background part and the background brightness interval range; and determining the brightness correction coefficient corresponding to the interval range of the background brightness of the background part as the brightness correction coefficient of the foreground part.
For example, based on the observation of image sample data in the image storage calculation library, the luminance V of the background portion is divided into 5 ranges, dark, normal, bright, and bright, respectively, and each of the 5 ranges corresponds to one luminance correction coefficient, as shown in table 1.
TABLE 1 background V value determination Range and corresponding Brightness correction factor
Figure BDA0001226456410000061
Figure BDA0001226456410000071
The brightness correction coefficient is used for adjusting the brightness of the foreground part of the target image to which the background part belongs so as to enable the brightness to be closer to the V value under the normal illumination condition. For example, if the current background portion V has a value of 0.4, the brightness of the background portion is determined to be darker according to table 1, and the corresponding illumination coefficient is 1.4. If the brightness of the current foreground part is V0Then adjust it to 1.4V0
Optionally, calculating an average value of the brightness of the background portion of a plurality of images in an image storage database, the plurality of images being images of the same capture scene as the target image; and determining the brightness correction coefficient of the foreground part according to the brightness of the background part of the target image where the foreground part is located and the average value of the brightness of the background parts of the plurality of images in the image storage database.
In particular, the same capture scene is unchanged by the physical environment in which the target person is located, e.g., the target person takes multiple pictures under an intersection or the target person takes multiple pictures at a mall doorway. An average value of the background luminance of the plurality of images in the image storage database is calculated, for example, the average value of the background luminance of the plurality of images is 0.491, and then a ratio of the background luminance of the target image to the average value of the background luminance is calculated as a luminance correction coefficient of the target image.
Optionally, the adjusted luminance of the foreground portion is compared to luminance ranges of a plurality of color systems to determine a color system of the foreground portion.
Optionally, when the adjusted brightness of the foreground portion belongs to a brightness range of a first color system in a plurality of color systems, and an absolute value of a difference value from a critical value of the brightness range of the first color system is smaller than a first threshold, determining a color system of the foreground portion according to hue and saturation of the foreground portion in the HSV space; or
And when the adjusted brightness of the foreground part belongs to a brightness range of a first color system in a plurality of color systems and the absolute value of the difference between the adjusted brightness of the foreground part and the threshold value of the brightness range of the first color system is larger than or equal to the first threshold value, determining the first color system as the color system of the foreground part.
Specifically, the color system to which the foreground part belongs is judged according to the adjusted V value of the foreground part. Generally, for dark color systems, under normal lighting, the V value is no greater than 0.18. Under dark or darker lighting, the V value is likely to be less than 0.10. The values of V mentioned here are all values after normalization. For non-black systems, the value of V is typically greater than 0.23 under normal lighting. But may also have a V value of less than 0.16, or even less, less than 0.10 under dark or darker lighting. The following description will be made by taking the judgment of two color systems of blue (colored system) and black (dark system) as an example.
And processing ten photos of the target object under different illumination in the same capture scene. The target object is a foreground part, and the HSV value and the background brightness of the target person are obtained to obtain the data listed in table 2, wherein R, G, B, H, S, V in table 2 respectively represent the R, G, B, H, S and the V value, V, of the foreground part1And V2The brightness of the background part corresponding to the foreground part and the brightness of the underfoot background part corresponding to the foreground part are respectively obtained.
TABLE 2 RGB and HSV parameters for the images
Figure BDA0001226456410000072
Figure BDA0001226456410000081
Optionally, the background portion V is based on each image1The luminance correction coefficient of the foreground portion of each image is determined in accordance with the relationship of table 1.
Optionally, the background portion V is based on each image2According to the relationship of Table 1, determining the brightness correction of the foreground portion of each imageAnd (4) the coefficient.
Optionally, calculating the background portion V of each image1And V2According to V, the luminance correction coefficient of the foreground portion of each image is determined in accordance with the relationship of table 1.
For example, in the present application, to the background portion V according to each image1The brightness correction coefficient of the foreground portion of each image is determined according to the relationship in table 1, for example. According to the background part V of each image1According to the relationship of table 1, the luminance correction coefficient of the foreground portion of each image is determined, and the luminance of the foreground portion of each image is pre-adjusted according to the determined luminance correction coefficient of the foreground portion of each image. The pre-adjusted luminance of the foreground portion of each image is shown in table 3.
TABLE 3 Pre-adjusted luminance values of images
Serial number V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
V 0.224 0.196 0.177 0.192 0.181 0.178 0.176 0.254 0.216 0.198
Optionally, adjusting the brightness of each of the plurality of foreground sub-portions according to the brightness of the background portion; and determining the color system of each foreground subsection according to the adjusted brightness of each foreground subsection.
Optionally, when the adjusted brightness of the foreground portion belongs to a brightness range of a first color system in a plurality of color systems, and an absolute value of a difference value from a critical value of the brightness range of the first color system is smaller than a first threshold, determining a color system of the foreground portion according to hue and saturation of the foreground portion in the HSV space; or
And when the adjusted brightness of the foreground part belongs to a brightness range of a first color system in a plurality of color systems and the absolute value of the difference between the adjusted brightness of the foreground part and the threshold value of the brightness range of the first color system is larger than or equal to the first threshold value, determining the first color system as the color system of the foreground part.
Specifically, the critical value of the brightness of the dark color system is 0.18, the first threshold value is 0.01, and in table 3, the difference between the images V1, V2, V4, V8, V9 and V10 and the critical value of the brightness of the dark color system is greater than 0.01, so that the images V1, V2, V4, V8, V9 and V10 belong to the dark color system, and the difference between the images V3, V5 and V7 and the critical value of the brightness of the dark color system is less than 0.01, and it is necessary to determine the color system of the foreground portion according to the hue and saturation of the foreground portion in the HSV space.
Optionally, dividing the foreground portion into a plurality of foreground sub-portions; adjusting the brightness of each of the plurality of foreground sub-portions according to the brightness of the background portion; determining the color system of each foreground subsection according to the adjusted brightness of each foreground subsection;
the adjusting the brightness of the foreground part according to the color system of the foreground part comprises: and adjusting the brightness of each foreground subsection according to the color system of each foreground subsection.
Alternatively, the foreground portion may be divided into a plurality of sub-foreground portions by an automatically or manually generated semi-structured data (XML) method or the like.
Optionally, the plurality of foreground sub-portions includes a first foreground sub-portion and a second foreground sub-portion, the adjusted luminance of the first foreground sub-portion and the adjusted luminance of the second foreground sub-portion belong to a luminance range of a first color system, an absolute value of a difference between the adjusted luminance of the first foreground sub-portion and a critical value of the luminance range of the first color system is greater than or equal to a second threshold, and an absolute value of a difference between the adjusted luminance of the second foreground sub-portion and a critical value of the luminance range of the first color system is less than the second threshold;
determining the color system of each foreground subsection according to the adjusted brightness of each foreground subsection, comprising:
determining a first color system as the color system of the first foreground subsection;
when the absolute value of the difference value between the adjusted brightness of the second foreground subsection and the adjusted brightness of the first foreground subsection is larger than or equal to a third threshold, determining the color system of the second foreground subsection according to the hue and saturation of the second foreground subsection in the HSV space; or, when the absolute value of the difference between the adjusted brightness of the second foreground sub-portion and the adjusted brightness of the first foreground sub-portion is greater than or equal to a third threshold, determining the color system corresponding to the adjacent range of the adjusted brightness of the second foreground sub-portion as the color system of the second foreground sub-portion; or, when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the luminance of the second foreground subsection is smaller than the third threshold, determining the first color system as the color system of the second foreground subsection.
Specifically, when the absolute value of the difference between the adjusted luminance of the second foreground sub-portion and the adjusted luminance of the first foreground sub-portion is greater than or equal to a third threshold, the color system corresponding to the range adjacent to the adjusted luminance of the second foreground sub-portion is determined as the color system of the second foreground sub-portion. The first color system is adjacent to the second color system, the absolute value of the difference between the adjusted luminance of the second foreground sub-portion and the critical value of the luminance range of the first color system is smaller than the second threshold, and the absolute value of the difference between the adjusted luminance of the second foreground sub-portion and the adjusted luminance of the first foreground sub-portion is greater than or equal to a third threshold, the second foreground sub-portion is determined to be the second color system.
When the first color system is adjacent to the second color system and the third color system respectively, the first color system is located between the second color system and the third color system, wherein the brightness of the second color system is less than the brightness of the first color system, the brightness of the first color system is less than the brightness of the third color system, the first color system has two critical values which are a first critical value and a second critical value respectively, the first critical value is adjacent to the second color system, and the second critical value is adjacent to the third color system. Determining the first color system as the color system of the first foreground subsection when the adjusted brightness of the first foreground subsection and the adjusted brightness of the second foreground subsection belong to the brightness range of the first color system, the absolute value of the difference between the adjusted brightness of the first foreground subsection and the first critical value of the brightness range of the first color system is greater than or equal to a second threshold value, and the absolute value of the difference between the adjusted brightness of the second foreground subsection and the critical value of the brightness range of the first color system is less than the second threshold value; when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the adjusted luminance of the first foreground subsection is greater than or equal to a third threshold, determining a color system corresponding to a range adjacent to the adjusted luminance of the second foreground subsection, that is, a second color system as the color system of the second foreground subsection; or, when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the luminance of the second foreground subsection is smaller than the third threshold, determining the first color system as the color system of the second foreground subsection.
Determining the first color system as the color system of the first foreground subsection when the adjusted brightness of the first foreground subsection and the adjusted brightness of the second foreground subsection belong to the brightness range of the first color system, the absolute value of the difference between the adjusted brightness of the first foreground subsection and the second critical value of the brightness range of the first color system is greater than or equal to the second threshold, and the absolute value of the difference between the adjusted brightness of the second foreground subsection and the critical value of the brightness range of the first color system is less than the second threshold; when the absolute value of the difference between the adjusted luminance of the second foreground sub-portion and the adjusted luminance of the first foreground sub-portion is greater than or equal to a third threshold, determining a color system corresponding to a range adjacent to the adjusted luminance of the second foreground sub-portion, that is, a third color system, as the color system of the second foreground sub-portion; or, when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the luminance of the second foreground subsection is smaller than the third threshold, determining the first color system as the color system of the second foreground subsection.
For example, ten photographs under different lighting of the same target person are processed in the same capture scene. The target person is a foreground part, the target person is divided into an upper body and a lower body, HSV values and background luminance values of the upper body and the lower body of the target person are obtained, data listed in table 4 are obtained, R1, G1, B1, H1, S1, V1, R2, G2, B2, H2, S2 and V2 in table 2 are R, G, B, H, S and V values of the upper body and the lower body of the foreground part, respectively, and V2 is a value of V and V of the upper body and the lower body of the foreground part, respectively1And V2The brightness of the background part corresponding to the foreground part and the brightness of the underfoot background part corresponding to the foreground part are respectively obtained.
TABLE 4 RGB and HSV parameters for the images
Figure BDA0001226456410000101
Optionally, the background portion V is based on each image1The luminance correction coefficients of the upper and lower bodies of the foreground portion of each image are determined in accordance with the relationship in table 1.
Optionally, the background portion V is based on each image2The luminance correction coefficients of the upper and lower bodies of the foreground portion of each image are determined in accordance with the relationship in table 1.
Optionally, calculating the background portion V of each image1And V2The average value V of (2) is obtained by determining the luminance correction coefficients of the upper and lower bodies of the foreground portion of each image in accordance with the relationship in table 1 based on V.
For example, in the present application, to the background portion V according to each image1The luminance of (2) is exemplified by specifying the luminance correction coefficients of the upper and lower bodies of the foreground portion of each image in accordance with the relationship shown in table 1. According to the background part V of each image1The luminance of the upper body and the lower body of the foreground portion of each image is determined according to the relationship in table 1, and the luminance of the upper body and the lower body of the foreground portion of each image is pre-adjusted according to the determined luminance correction coefficients of the upper body and the lower body of the foreground portion of each image. The pre-adjusted brightness of the upper and lower body of the foreground portion of each image is shown in table 5.
TABLE 5 Pre-adjusted luminance values of images
Figure BDA0001226456410000102
Figure BDA0001226456410000111
For example, comparing the pre-adjusted luminance values of the upper and lower bodies of the foreground portion of each image with 0.18, it can be determined that the lower body of 10 images belongs to the dark color system, the upper bodies of the foreground portions of pictures 1, 2, 4, 5, 8, 9, and 10 are in the color system, and the upper body luminance of the foreground portions of pictures 3, 6, and 7 is at the threshold value, which requires further determination. In this case, the judgment can be performed in conjunction with the corresponding lower body. Since the lighting environments of the upper and lower bodies are substantially similar, and the brightness value of the lower body is determined to be in the dark color system and the adjusted brightness value is still small, under the same lighting, the brightness values of the target images in the same color system are unlikely to differ too much, so that it can be determined that the pictures 3, 6, and 7 are not in the dark color system and thus belong to the colored color system. If the color system of the upper half body of the foreground part cannot be determined by combining the lower half body of the foreground part, in order to prevent misjudgment, the upper half body of the foreground part can be classified into two types, namely, the upper half body is judged to be a dark color system and a colored color system, and then the upper half body is processed according to the two color systems respectively, so that the subsequent query or retrieval failure caused by processing errors due to misjudgment is avoided.
Optionally, the absolute value of the difference between the adjusted luminance of the second foreground sub-portion and the critical value of the luminance range of the first color system is smaller than the first threshold, the target image to which the second foreground sub-portion belongs includes a plurality of first foreground sub-portions, the adjusted luminance of the plurality of first foreground sub-portions and the adjusted luminance of the second foreground sub-portion belong to the luminance range of the first color system, the absolute value of the difference between the adjusted luminance of the plurality of first foreground sub-portions and the critical value of the luminance range of the first color system is greater than or equal to the first threshold, and the color system of the second foreground sub-portion can be determined according to the relationship between the difference between the luminance of the plurality of first foreground sub-portions and the luminance of the second foreground sub-portion and the second threshold.
Specifically, the color system of the second foreground subsection is determined according to the relationship between the difference between the adjusted luminance of any one of the plurality of first foreground subsections and the luminance of the second foreground subsection and a second threshold, and when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the adjusted luminance of any one of the plurality of first foreground subsections is greater than or equal to the second threshold, the color system corresponding to the range adjacent to the adjusted luminance of the second foreground subsection is determined as the color system of the second foreground subsection; or, when the absolute value of the luminance difference between the adjusted luminance of the second foreground subsection and the luminance of any foreground subsection in the plurality of first foreground subsections is less than the second threshold, determining the first color system as the color system of the second foreground subsection.
For example, the plurality of first foreground sub-portions are first foreground sub-portion 1, first foreground sub-portion 2 and first foreground sub-portion 3, respectively, and the color system of the second foreground sub-portion may be determined according to the relationship between the adjusted luminance of the first foreground sub-portion 1 and the luminance of the second foreground sub-portion and the second threshold. When the absolute value of the difference between the adjusted luminance of the second foreground subsection and the adjusted luminance of the first foreground subsection 1 is greater than or equal to a second threshold, determining the color system corresponding to the adjacent range of the adjusted luminance of the second foreground subsection as the color system of the second foreground subsection; or, when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the adjusted luminance of the first foreground subsection 1 is less than the second threshold, the first color system is determined as the color system of the second foreground subsection. The color system of the second foreground subsection may also be determined based on the relationship between the difference between the adjusted luminance of the first foreground subsection 2 or the first foreground subsection 3 and the luminance of the second foreground subsection and a second threshold.
Specifically, the color system of the second foreground subsection is determined according to the relation between the average value of the difference between the adjusted brightness of each of the plurality of first foreground subsections and the brightness of the second foreground subsection and a second threshold, and when the absolute value of the average value of the difference between the adjusted brightness of the second foreground subsection and the adjusted brightness of each of the plurality of first foreground subsections is greater than or equal to the second threshold, the color system corresponding to the adjacent range of the adjusted brightness of the second foreground subsection is determined as the color system of the second foreground subsection; or, when the average of the adjusted luminance of the second foreground subsection and the luminance adjusted luminance difference of each of the plurality of first foreground subsections is less than the second threshold, determining the first color system as the color system of the second foreground subsection.
For example, the plurality of first foreground sub-portions are first foreground sub-portion 1, first foreground sub-portion 2 and first foreground sub-portion 3, respectively, and the average of the differences in luminance of the first foreground sub-portion 1, first foreground sub-portion 2 and first foreground sub-portion 3 and the second foreground sub-portion is compared to a second threshold value for the absolute value of the difference to determine the color system of the second foreground sub-portion. When the absolute value of the adjusted brightness of the second foreground subsection and the average value of the difference is greater than or equal to a second threshold value, determining the color system corresponding to the adjacent range of the adjusted brightness of the second foreground subsection as the color system of the second foreground subsection; or, when the average of the adjusted luminance and the difference of the second foreground subsection is smaller than the second threshold, determining the first color system as the color system of the second foreground subsection.
Specifically, the color system of the second foreground subsection is determined according to the relationship between the difference between the average value of the adjusted luminance of the plurality of first foreground subsections and the luminance of the second foreground subsection and a second threshold, and when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the adjusted average luminance of the plurality of first foreground subsections is greater than or equal to the second threshold, the color system corresponding to the range adjacent to the adjusted luminance of the second foreground subsection is determined as the color system of the second foreground subsection; or, when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the adjusted average luminance of the plurality of first foreground subsections is less than the second threshold, determining the first color system as the color system of the second foreground subsection.
For example, the plurality of first foreground sub-portions are first foreground sub-portion 1, first foreground sub-portion 2 and first foreground sub-portion 3, respectively, the average luminance of the first foreground sub-portions are calculated as first foreground sub-portions 1, first foreground sub-portions 2 and first foreground sub-portions 3, respectively, and the color system of the second foreground sub-portion is determined based on the relationship of the difference between the average luminance and the luminance of the second foreground sub-portion to a second threshold.
It will be appreciated that the color system of the second foreground subsection may also be determined based on the luminance of the first foreground subsection of the plurality of first foreground subsections whose adjusted luminance is the smallest, the difference between the average of the adjusted luminance of any of the plurality of first foreground subsections and the luminance of the second foreground subsection, and the relationship of the second threshold.
It should be understood that the foreground subsection may be divided into a plurality of sub-foreground subsections, and the division of the foreground subsection into the first foreground subsection and the second foreground subsection is merely exemplary and not limiting in this application.
Optionally, when the brightness of the adjusted foreground sub-portion is in the vicinity of the threshold value of the brightness of one color system, the color system of the foreground sub-portion whose brightness is in the vicinity of the threshold value of the brightness of one color system may be determined according to the hue and saturation of the foreground sub-portion in the HSV space.
Optionally, the color system of the foreground portion is determined according to the hue H and the saturation S of the foreground portion.
It should be understood that in an actual scene, H and S of different colors have a certain regular combination relationship. Therefore, the color system of the foreground portion can be determined from the hue H and the saturation S of the foreground portion. Red is taken as an example for detailed description in the present application.
For example, the parameters of the red target image in the RGB space and HSV space under different illumination in the color system are listed in table 5. The hue H and saturation S of a red image have a specific rule, i.e. the value of V is different, but H is in the interval of [0.9, 1], and correspondingly S is also in the interval of [0.9, 1 ]. In table 6, the foreground portions of the 6 target images each satisfy the combination relationship of H and S of the red color system, and thus it is determined that the foreground portions of the 6 target images in table 6 belong to the colored color system.
TABLE 6 RGB and HSV parameters for Red target image
Figure BDA0001226456410000121
Figure BDA0001226456410000131
Optionally, calculating an average value of the brightness of the background portion of a plurality of images in the image storage database, the plurality of images being images of the same capture scene as the image; and determining the ratio of the brightness of the background part of the target image where the foreground part is located to the average value of the brightness of the background parts of the plurality of images in the image storage database as the brightness correction coefficient of the foreground part.
Optionally, the hue, saturation, and brightness of the foreground portion and the brightness of the background image are input into a parametric model, and a label value output by the parametric model is obtained, and the color system of the foreground portion is determined according to the output label value of the parametric model.
It should be understood that the parametric model is used to indicate correspondence of label values of a plurality of color systems with hue, saturation and brightness of a foreground portion and brightness of a background portion in a captured scene of the target image.
It should be understood that the brightness of the foreground portion may be the brightness of the foreground portion adjusted according to the brightness correction coefficient or the original brightness of the foreground portion without adjustment.
Optionally, the parameter model is determined by performing algorithm training according to the label value set by each color system in the plurality of color systems, the hue, saturation and brightness of the foreground part in the plurality of images in the image storage database, and the brightness of the background part in each image, and the plurality of images and the target image are images in the same capture scene.
At 230, the brightness of the foreground portion is adjusted based on the color system of the foreground portion.
Optionally, the brightness of the foreground portion is adjusted to be the brightness in the brightness set corresponding to the color system of the foreground portion.
Optionally, determining a brightness set corresponding to the color system of the foreground part according to the color system of the foreground part; and adjusting the brightness of the foreground part according to the brightness set.
Optionally, the color system is one of a dark color system, a colored color system and a white-bright color system, and an element in a brightness set corresponding to the dark color system is a; the brightness set corresponding to the color system is a brightness range which is more than or equal to b and less than or equal to c; the white-light color is associated with an element in the luminance set as d,
wherein a, b, c and d satisfy the relation:
0≤a<b≤c<d≤1
a, b, c and d are all constants.
It should be understood that adjusting the brightness of the foreground portion according to the color system of the foreground portion does not necessarily adjust the brightness of the foreground portion, but determines whether to adjust the brightness of the foreground portion according to the color system corresponding to the foreground portion and the brightness mapping set of the color system corresponding to the foreground portion. If the brightness of the foreground part is in the brightness mapping set interval of the color system corresponding to the foreground part, the brightness of the foreground part is not required to be adjusted.
It is to be understood that the set of luminances may include one element, for example, a set of luminances corresponding to a dark color system of { a }, only an element a, a set of luminances corresponding to a white color system of { d }, only an element d, and may include a plurality of elements, for example, a set of luminances corresponding to a colored color system of { b ≦ x ≦ c }, the set may be discrete, i.e., the elements of the set are integers between b and c, and the set may be continuous, i.e., the elements of the set are real numbers between b and c.
Specifically, fig. 3 shows the corresponding sections of the luminance sets of the dark color system, the colored color system, and the white-light color system, as in fig. 3. For the foreground target image or part of the foreground target image judged as dark color system, V value V is usedHMapped to a fixed, smaller value of V, a, i.e., f (V)H) A; if the V value V of the foreground target image or a part of the foreground target image which is judged to be in the colored color systemYSet of V values [ b, c ] less than or greater than a predetermined value]To make itIs mapped as [ b, c ]]The value nearest to it in the interval, if V is the value VYAt a set of V values b, c]In between, then VYNo adjustment is made. For example, if VY<B, then f (V)Y) B; if VY∈[b,c]Then f (V)Y)=VY(ii) a If VY>C, then f (V)Y) C; for the foreground object image judged to be white and bright or a part of the foreground object image, the V value V is setWMapped to a fixed larger value of V, d, i.e., f (V)W)=d。
It will be appreciated that the choice of this parameter has a significant impact on the experimental results. In practice, the parameters are selected taking into account the following factors: first, the parameters correspond to three different color systems, so the selection of the three parameters should conform to the V value sets corresponding to the three color systems. For example, the first parameter, i.e. the preceding parameter a, corresponds to the dark color system, so that the value of a should satisfy: 0 ═<a<0.18 ± δ, wherein δ>=0,0.18+δ<b*B is the second parameter, and formula (i) means that the parameter a cannot be the same as b, and there should be some difference between them because a and b have physical meaning, a corresponds to a dark color system and b corresponds to a colored color system. Secondly, the quality or the quality of the parameter selection is judged based on experience. Therefore, it is necessary to perform a certain number of tests. Thirdly, the selection of parameters should be combined with the whole application system. For image retrieval or query, it is common practice to quantify features in order to improve the retrieval efficiency and the space required for feature storage. Under the condition of quantizing the features, the selection of the parameters should be considered in combination with the quantization step size, so that the feature values of the same color system are in the same quantization interval as much as possible after quantization.
In the application, for a colored color system, a brightness value interval is designed for the color system, when the brightness value of the foreground part is in a predefined interval, illumination processing is not needed, and the calculation and storage cost caused by processing is reduced; but rather provides a larger set of tolerances to avoid introducing too much noise into the process resulting in severe distortion.
In the application, the brightness value of the image is adjusted to a common smaller set based on the color system of the image after the color system of the image is judged, so that the color difference of different pictures of the same object (such as a pedestrian) caused by illumination is as small as possible, the difference of target color values caused by different illumination is effectively reduced, and the retrieval or identification of the object is facilitated.
At 240, the image is transformed from the HSV space to the RGB space according to the adjusted luminance of the foreground portion. And searching the target image in the storage device according to the processed image.
Optionally, each image in the storage device is processed according to the method in the application, and if an image in the storage device is queried, the query can be directly performed in the database; if an image which is not in the storage device is inquired, because each image in the storage device is processed according to the method in the application, the image which is not in the storage device is processed by the method in the application, and then the image which is not in the storage device is inquired in the storage device. Because each image in the storage device and the image to be inquired are processed according to the method in the application, the brightness of the target image is adjusted according to different color systems, the color difference of the target object caused by illumination is reduced, and the accuracy rate of retrieving the target object is improved.
Therefore, in the present application, an image processing apparatus determines a color system of a foreground portion of a target image according to luminance of a background portion of the target image and luminance of the foreground portion of the target image by converting the target image from a red, green, blue, RGB space to a hue saturation luminance HSV space; adjusting the brightness of the foreground part according to the color system of the foreground part; and converting the target image with the adjusted brightness of the foreground part from the HSV space to the RGB space. The brightness of the foreground part is adjusted according to the brightness of the background part, so that the brightness difference of a target object caused by different illumination is reduced, the color system of the foreground part is determined according to the adjusted brightness of the foreground part, the accuracy of determining the color system of the foreground part is improved, the brightness of the foreground part is adjusted according to the color system of the foreground part, the target image of which the brightness is adjusted is converted into the RGB space from the HSV space, the color difference of the target object caused by the different brightness of the images under different illumination is reduced, and the retrieval or identification of the target object is facilitated.
FIG. 4 is a schematic flow chart diagram of a method 300 of processing an image according to another embodiment of the present application. As shown in fig. 4, the method 300 includes the following.
In 310, the target image is converted from a red, green, blue, RGB space to a hue saturation luminance, HSV, space.
At 320, when the brightness of the target image belongs to the brightness range of the first color system of the plurality of color systems and the absolute value of the difference value with the critical value of the brightness range of the first color system is smaller than a first threshold value, the color system of the foreground portion is determined according to the hue and saturation of the target image in the HSV space.
At 330, the brightness of the target image is adjusted according to the color system of the target image.
In 340, the target image is transformed from the HSV space to the RGB space according to the adjusted luminance of the target image.
Therefore, in the present application, an image processing apparatus converts a target image from a red, green, blue, RGB space to a hue saturation luminance HSV space, and determines a color system of the foreground portion according to hue and saturation of the target image in the HSV space when the luminance of the target image belongs to a luminance range of a first color system among a plurality of color systems and an absolute value of a difference from a critical value of the luminance range of the first color system is less than a first threshold, improves accuracy of determining the color system of the target image according to only luminance, adjusts the luminance of the foreground portion according to the color system of the foreground portion, and converts the target image of which the luminance of the foreground portion is adjusted from the HSV space to the RGB space, reduces a difference in color of the target object caused by a difference in luminance of the images under different illuminations, thereby facilitating retrieval or identification of the target object.
It should be understood that the method 200 may be combined with the method 300 to determine the color system of the foreground portion, that is, when the adjusted luminance of the foreground portion by the method 200 is at the threshold value of the first color system, the color system of the foreground portion may be determined according to the combination relationship between H and S of the foreground portion, and details are not repeated here to avoid repetition.
FIG. 5 is a schematic flow chart diagram of a method 400 of processing an image according to another embodiment of the present application. As shown in fig. 5, the method 400 includes the following.
In 410, a target image is converted from a red, green, blue, RGB space to a hue saturation luminance, HSV space, the target image including a first portion and a second portion, the luminance of the first portion and the luminance of the second portion belong to a luminance range of a first color system, an absolute value of a difference between the luminance of the first portion and a critical value of the luminance range of the first color system is greater than or equal to a first threshold, and an absolute value of a difference between the luminance of the second portion and a critical value of the luminance range of the first color system is less than the first threshold.
Determining a first color family as the color family of the first portion at 420; determining the color system of the second portion according to the hue and saturation of the second portion in the HSV space when the absolute value of the difference between the brightness of the second portion and the brightness of the first portion is greater than or equal to a second threshold, or determining the color system of the second portion according to the hue and saturation of the second portion in the HSV space when the absolute value of the difference between the brightness of the second portion and the brightness of the first portion is greater than or equal to a second threshold; or when the absolute value of the difference value between the brightness of the second part and the brightness of the first part is greater than or equal to a second threshold value, determining the color system corresponding to the adjacent range of the brightness of the second part as the color system of the second part; or, when the absolute value of the difference between the brightness of the second part and the brightness of the second part is smaller than the second threshold, the first color system is determined as the color system of the second part.
At 430, the brightness of the first portion and the second portion is adjusted according to the color system of the first portion and the color system of the second portion.
At 440, the target image is transformed from the HSV space to the RGB space according to the adjusted luminance of the target image.
Therefore, in the present application, the image processing apparatus converts the target image from the red, green, blue, RGB space to the hue saturation luminance HSV space, determines the color systems of the first portion and the second portion according to the first portion and the second portion of the target image, respectively, and adjusts the luminance of the first portion and the second portion, so that the color difference of different pictures of the target object caused by illumination is as small as possible, the difference of the target color caused by different illumination is effectively reduced, and the retrieval or identification of the target object is facilitated.
Fig. 6 is a schematic block diagram of an image processing apparatus 500 according to the present application. As shown in fig. 6, the image processing apparatus 500 includes:
a converting module 510, configured to convert a target image from a red, green, blue, RGB, space to a hue saturation luminance, HSV, space, wherein the target image includes a foreground portion and a background portion.
The first processing module 520 is configured to determine a color system of the foreground portion according to the brightness of the background portion and the brightness of the foreground portion.
An adjusting module 530, configured to adjust the brightness of the foreground portion according to the color system of the foreground portion.
The conversion module 510 is further configured to:
and converting the image from the HSV space to the RGB space according to the adjusted brightness of the foreground part.
Optionally, the first processing module 520 is specifically configured to: determining a brightness correction coefficient of the foreground part according to the brightness of the background part; adjusting the brightness of the foreground part according to the brightness correction coefficient of the foreground part; and determining the color system of the foreground part according to the adjusted brightness of the foreground part.
Optionally, the first processing module 520 is specifically configured to: determining the interval range of the background brightness of the background part according to the brightness of the background part and the interval range of the background brightness; and determining the brightness correction coefficient corresponding to the interval range of the background brightness of the background part as the brightness correction coefficient of the foreground part.
Optionally, the first processing module 520 is specifically configured to: calculating an average value of luminance of a background portion of a plurality of images in an image storage database, the plurality of images being images in the same capture scene as the image; and determining the brightness correction coefficient of the foreground part according to the ratio of the brightness of the background part of the target image where the foreground part is located and the average value of the brightness of the background parts of the plurality of images in the image storage database.
Optionally, the first processing module 520 is specifically configured to: and comparing the adjusted brightness of the foreground part with the brightness ranges of a plurality of color systems to determine the color system of the foreground part.
Optionally, the first processing module 520 is specifically configured to: and when the adjusted brightness of the foreground part belongs to the brightness range of the first color system in the plurality of color systems and the absolute value of the difference value with the critical value of the brightness range of the first color system is smaller than a first threshold value, determining the color system of the foreground part according to the hue and the saturation of the foreground part in the HSV space.
Optionally, the first processing module 520 is specifically configured to: dividing the foreground portion into a plurality of foreground sub-portions; adjusting the brightness of each of the plurality of foreground subsections according to the brightness of the background section; determining the color system of each foreground subsection according to the adjusted brightness of each foreground subsection; the adjusting module 430 is specifically configured to: and adjusting the brightness of each foreground subsection according to the color system of each foreground subsection.
Optionally, the plurality of foreground sub-portions includes a first foreground sub-portion and a second foreground sub-portion, the adjusted luminance of the first foreground sub-portion and the adjusted luminance of the second foreground sub-portion belong to a luminance range of a first color system, an absolute value of a difference between the adjusted luminance of the first foreground sub-portion and a critical value of the luminance range of the first color system is greater than or equal to a first threshold, and an absolute value of a difference between the adjusted luminance of the second foreground sub-portion and a critical value of the luminance range of the first color system is less than the first threshold;
the first processing module 520 is configured to determine a first color system as the color system of the first foreground sub-portion; when the absolute value of the difference value between the adjusted brightness of the second foreground subsection and the adjusted brightness of the first foreground subsection is larger than or equal to a second threshold value, determining the color system of the second foreground subsection according to the hue and saturation of the second foreground subsection in the HSV space; or, when the absolute value of the difference between the adjusted brightness of the second foreground sub-portion and the adjusted brightness of the first foreground sub-portion is greater than or equal to a second threshold, determining the color system corresponding to the adjacent range of the adjusted brightness of the second foreground sub-portion as the color system of the second foreground sub-portion; or, when the absolute value of the difference between the adjusted luminance of the second foreground subsection and the luminance of the second foreground subsection is smaller than the second threshold, determining the first color system as the color system of the second foreground subsection.
Optionally, the first processing module 520 is further configured to input the hue, saturation, and brightness of the foreground portion and the brightness of the background image into a parametric model, and obtain a label value output by the parametric model, where the parametric model is configured to indicate correspondence between label values of multiple color systems, and the hue, saturation, and brightness of the foreground portion and the brightness of the background portion in a captured scene of the target image; and determining the color system of the foreground part according to the output label value of the parameter model.
Optionally, the image processing apparatus further comprises a second processing module 540, as shown in fig. 7. Before the color tone, the saturation, and the brightness of the foreground portion and the brightness of the background portion are input into the parametric model, the second processing module 540 is configured to perform algorithm training according to the label value set by each color system of the plurality of color systems, the color tone, the saturation, and the brightness of the foreground portion and the brightness of the background portion in the plurality of images in the image storage database, and determine the parametric model, where the plurality of images and the target image are images in the same captured scene.
Optionally, the first processing module 520 is configured to determine, according to the color system of the foreground portion, a luminance set corresponding to the color system of the foreground portion; and adjusting the brightness of the foreground part according to the brightness set.
Optionally, the adjusting module 530 is configured to adjust the brightness of the foreground sub-portion according to a color system of the foreground sub-portion, where the color system is one of a dark color system, a colored color system, and a white-bright color system, and an element in a brightness set corresponding to the dark color system is a; the brightness set corresponding to the color system is a brightness range which is more than or equal to b and less than or equal to c; the white-light color is associated with an element in the luminance set as d,
wherein a, b, c and d satisfy the relation:
0≤a<b≤c<d≤1
a, b, c and d are all constants.
Optionally, the image processing apparatus 500 may also be configured to perform the method 300. When the image processing apparatus is used to perform the method 300 described above, the image processing apparatus 500 comprises:
a converting module 510, configured to convert the target image from a red, green, blue, RGB space to a hue saturation luminance, HSV space.
A first processing module 520, configured to determine the color system of the foreground portion according to the hue and saturation of the target image in the HSV space when the brightness of the target image belongs to the brightness range of a first color system of the multiple color systems, and an absolute value of a difference between the brightness of the target image and a critical value of the brightness range of the first color system is smaller than a first threshold.
The adjusting module 530 is configured to adjust the brightness of the target image according to the color system of the target image.
The conversion module 510 is further configured to:
and converting the target image from the HSV space to the RGB space according to the adjusted brightness of the target image.
Optionally, the image processing apparatus 500 may also be configured to perform the method 300. When the image processing apparatus is used to perform the method 300 described above, the image processing apparatus 500 comprises:
a converting module 510, configured to convert a target image from a red, green, blue, RGB space to a hue saturation luminance HSV space, where the target image includes a first portion and a second portion, a luminance of the first portion and a luminance of the second portion belong to a luminance range of a first color system, an absolute value of a difference between the luminance of the first portion and a critical value of the luminance range of the first color system is greater than or equal to a first threshold, an absolute value of a difference between the luminance of the second portion and the critical value of the luminance range of the first color system is less than the first threshold, and the first color system is determined as the color system of the first portion.
A first processing module 520, configured to determine a color system of the second portion according to hue and saturation of the second portion in the HSV space when an absolute value of a difference between the brightness of the second portion and the brightness of the first portion is greater than or equal to a second threshold, or determine a color system corresponding to a range where the brightness of the second portion is adjacent to the brightness of the first portion as the color system of the second portion when the absolute value of a difference between the brightness of the second portion and the brightness of the first portion is greater than or equal to a second threshold; or, when the absolute value of the difference between the brightness of the second part and the brightness of the second part is smaller than the second threshold, the first color system is determined as the color system of the second part.
An adjusting module 530, configured to adjust the brightness of the first portion and the brightness of the second portion according to the color system of the first portion and the color system of the second portion.
The conversion module 510 is further configured to convert the target image from the HSV space to the RGB space according to the adjusted brightness of the target image.
Fig. 8 shows a schematic block diagram of an image processing apparatus 600 provided by the present application, the image processing apparatus 600 comprising:
a memory 610 for storing a program, the program comprising code;
a transceiver 620 for communicating with other devices;
a processor 630 for executing the program code in the memory 610.
Alternatively, when the code is executed, the processor 630 may implement the method 200 or the method 300, and the image processing device executes the operations, and the transceiver 620 is used for performing specific signal transceiving under the driving of the processor 630. For brevity, no further description is provided herein.
It should be understood that, in the embodiment of the present application, the processor 630 may be a Central Processing Unit (CPU), and the processor 630 may also be other general processors, digital signal processors, application specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 610 may include a read-only memory and a random access memory, and provides instructions and data to the processor 630. A portion of the memory 610 may also include non-volatile random access memory. For example, the memory 610 may also store device type information.
The transceiver 620 may be for performing signal transmission and reception functions.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (22)

1. A method of processing an image, comprising:
converting a target image from a red, green, blue, RGB, space to a hue saturation luminance, HSV, space, wherein the target image comprises a foreground portion and a background portion;
determining the color system of the foreground part according to the brightness of the background part and the brightness of the foreground part;
determining a brightness set corresponding to the color system of the foreground part according to the color system of the foreground part;
adjusting the brightness of the foreground part according to the brightness set;
and converting the target image from the HSV space to the RGB space according to the adjusted brightness of the foreground part.
2. The method of claim 1, wherein determining the color system of the foreground portion according to the luminance of the background portion and the luminance of the foreground portion comprises:
determining a brightness correction coefficient of the foreground part according to the brightness of the background part;
adjusting the brightness of the foreground part according to the brightness correction coefficient of the foreground part;
and determining the color system of the foreground part according to the adjusted brightness of the foreground part.
3. The method of claim 2, wherein determining the luminance correction factor for the foreground portion based on the luminance of the background portion comprises:
determining the range of the background brightness of the background part according to the brightness of the background part and the range of the background brightness;
and determining the brightness correction coefficient corresponding to the range of the background brightness of the background part as the brightness correction coefficient of the foreground part.
4. The method of claim 2, wherein determining the luminance correction factor for the foreground portion based on the luminance of the background portion comprises:
calculating an average value of brightness of background portions of a plurality of images in an image storage database, the plurality of images being images in the same capture scene as the target image;
and determining the brightness correction coefficient of the foreground part according to the brightness of the background part of the target image where the foreground part is located and the average value of the brightness of the background parts of the plurality of images in the image storage database.
5. The method according to any one of claims 2 to 4, wherein determining the color system of the foreground portion according to the adjusted luminance of the foreground portion comprises:
and comparing the adjusted brightness of the foreground part with the brightness ranges of a plurality of color systems to determine the color system of the foreground part.
6. The method of claim 5, wherein comparing the adjusted luminance of the foreground portion to luminance ranges of a plurality of color systems to determine the color system of the foreground portion comprises:
when the adjusted brightness of the foreground part belongs to a brightness range of a first color system in the plurality of color systems and the absolute value of the difference value with the critical value of the brightness range of the first color system is smaller than a first threshold value, determining the color system of the foreground part according to the hue and the saturation of the foreground part in the HSV space; or
And when the adjusted brightness of the foreground part belongs to a brightness range of a first color system in the plurality of color systems and the absolute value of the difference between the adjusted brightness of the foreground part and the threshold value of the brightness range of the first color system is larger than or equal to the first threshold value, determining the first color system as the color system of the foreground part.
7. The method according to any one of claims 1 to 4, wherein determining the color system of the foreground portion according to the luminance of the background portion and the luminance of the foreground portion comprises:
inputting the hue, saturation and brightness of the foreground part and the brightness of the background part into a parametric model, and acquiring a label value output by the parametric model,
wherein the parametric model is configured to indicate correspondence between label values of a plurality of color systems, and hue, saturation, and brightness of a foreground portion and brightness of a background portion in a captured scene of the target image;
and determining the color system of the foreground part according to the output label value of the parameter model.
8. The method of claim 7, wherein before inputting the hue, saturation and brightness of the foreground portion and the brightness of the background portion into the parametric model, the method further comprises:
and performing algorithm training according to the label value set by each color system in the plurality of color systems, the hue, saturation and brightness of the foreground part in the plurality of images in the image storage database and the brightness of the background part in the plurality of images, and determining the parameter model, wherein the plurality of images and the target image are images in the same capture scene.
9. The method according to any one of claims 1 to 4, wherein the color system is one of a dark color system, a colored color system and a white-light color system, and the element in the brightness set corresponding to the dark color system is a; the brightness set corresponding to the colored color system is a brightness range which is greater than or equal to b and less than or equal to c; the element in the brightness set corresponding to the white-light system is d,
wherein a, b, c, and d satisfy the relation:
0≤a<b≤c<d≤1
and a, b, c and d are all constants.
10. A method of processing an image, comprising:
converting a target image from a red, green and blue (RGB) space to a hue saturation brightness (HSV) space;
when the brightness of the target image belongs to a brightness range of a first color system in a plurality of color systems and the absolute value of the difference value of the brightness range of the target image and the critical value of the brightness range of the first color system is smaller than a first threshold value, determining the color system of the target image according to the hue and the saturation of the target image in the HSV space; or, when the brightness of the target image belongs to the brightness range of a first color system in the plurality of color systems, and the absolute value of the difference between the brightness of the target image and the critical value of the brightness range of the first color system is greater than or equal to the first threshold, determining the first color system as the color system of the target image;
adjusting the brightness of the target image according to the color system of the target image; and converting the image from the HSV space to the RGB space according to the adjusted brightness of the target image.
11. A method of processing an image, comprising:
converting a target image from a red, green, blue, RGB, space to a hue saturation luminance, HSV, space, the target image comprising a first portion and a second portion;
determining a first color system as the color system of the first portion, wherein the luminance of the first portion and the luminance of the second portion belong to a luminance range of the first color system, the absolute value of the difference between the luminance of the first portion and the critical value of the luminance range of the first color system is greater than or equal to a first threshold value, and the absolute value of the difference between the luminance of the second portion and the critical value of the luminance range of the first color system is less than the first threshold value;
when the absolute value of the difference value between the brightness of the second part and the brightness of the first part is larger than or equal to a second threshold value, determining the color system of the second part according to the hue and the saturation of the second part in the HSV space; or when the absolute value of the difference value between the brightness of the second part and the brightness of the first part is greater than or equal to a second threshold value, determining the color system corresponding to the adjacent range of the brightness of the second part as the color system of the second part; or, when the absolute value of the difference between the brightness of the second part and the brightness of the second part is smaller than the second threshold, determining the first color system as the color system of the second part;
adjusting the brightness of the first part and the second part according to the color systems of the first part and the second part;
and converting the target image from the HSV space to the RGB space according to the adjusted brightness of the target image.
12. An apparatus for processing an image, comprising:
the conversion module is used for converting a target image from a red, green and blue (RGB) space to a hue saturation brightness (HSV) space, wherein the target image comprises a foreground part and a background part;
the first processing module is used for determining the color system of the foreground part according to the brightness of the background part and the brightness of the foreground part;
the first processing module is further configured to determine, according to the color system of the foreground portion, a luminance set corresponding to the color system of the foreground portion;
the adjusting module is used for adjusting the brightness of the foreground part according to the brightness set;
the conversion module is used for:
and converting the target image from the HSV space to the RGB space according to the adjusted brightness of the foreground part.
13. The device of claim 12, wherein the first processing module is specifically configured to:
determining a brightness correction coefficient of the foreground part according to the brightness of the background part;
adjusting the brightness of the foreground part according to the brightness correction coefficient of the foreground part;
and determining the color system of the foreground part according to the adjusted brightness of the foreground part.
14. The device of claim 13, wherein the first processing module is specifically configured to:
determining the interval range of the background brightness of the background part according to the brightness of the background part and the interval range of the background brightness;
and determining the brightness correction coefficient corresponding to the interval range of the background brightness of the background part as the brightness correction coefficient of the foreground part.
15. The device of claim 13, wherein the first processing module is specifically configured to:
calculating an average value of brightness of background portions of a plurality of images in an image storage database, the plurality of images being images in the same capture scene as the target image;
and determining the brightness correction coefficient of the foreground part according to the ratio of the brightness of the background part of the target image where the foreground part is located and the average value of the brightness of the background parts of the plurality of images in the image storage database.
16. The apparatus of any of claims 13-15, wherein the first processing module is further configured to:
and comparing the adjusted brightness of the foreground part with the brightness ranges of a plurality of color systems to determine the color system of the foreground part.
17. The device of claim 16, wherein the first processing module is specifically configured to:
when the adjusted brightness of the foreground part belongs to a brightness range of a first color system in the plurality of color systems and the absolute value of the difference value with the critical value of the brightness range of the first color system is smaller than a first threshold value, determining the color system of the foreground part according to the hue and the saturation of the foreground part in the HSV space; or
And when the adjusted brightness of the foreground part belongs to a brightness range of a first color system in the plurality of color systems and the absolute value of the difference between the adjusted brightness of the foreground part and the threshold value of the brightness range of the first color system is larger than or equal to the first threshold value, determining the first color system as the color system of the foreground part.
18. The device according to any one of claims 12 to 15, wherein the first processing module is specifically configured to:
inputting the hue, saturation and brightness of the foreground part and the brightness of the background part into a parametric model, and acquiring a label value output by the parametric model,
wherein the parametric model is configured to indicate correspondence between label values of a plurality of color systems, and hue, saturation, and brightness of a foreground portion and brightness of a background portion in a captured scene of the target image;
and determining the color system of the foreground part according to the output label value of the parameter model.
19. The apparatus of claim 18, wherein before inputting the hue, saturation and brightness of the foreground portion and the brightness of the background portion into the parametric model, the apparatus further comprises:
and the second processing module is used for carrying out algorithm training according to the label value set by each color system in the plurality of color systems, the hue, the saturation and the brightness of a foreground part in a plurality of images in an image storage database and the brightness of a background part in the plurality of images to determine the parameter model, wherein the plurality of images and the target image are images in the same capture scene.
20. The apparatus according to any one of claims 12 to 15, wherein the color system is one of a dark color system, a colored color system and a white-light color system, and the element in the brightness set corresponding to the dark color system is a; the brightness set corresponding to the colored color system is a brightness range which is greater than or equal to b and less than or equal to c; the element in the brightness set corresponding to the white-light system is d,
wherein a, b, c, and d satisfy the relation:
0≤a<b≤c<d≤1
and a, b, c and d are all constants.
21. An apparatus for processing an image, comprising:
the conversion module is used for converting the target image from a red, green and blue (RGB) space to a hue saturation brightness (HSV) space;
the processing module is used for determining the color system of a foreground part according to the hue and the saturation of the target image in the HSV space when the brightness of the target image belongs to the brightness range of a first color system in a plurality of color systems and the absolute value of the difference value between the brightness of the target image and the critical value of the brightness range of the first color system is smaller than a first threshold value; or, when the brightness of the target image belongs to the brightness range of a first color system in the plurality of color systems, and the absolute value of the difference between the brightness of the target image and the critical value of the brightness range of the first color system is greater than or equal to the first threshold, determining the first color system as the color system of the target image;
the adjusting module is used for adjusting the brightness of the target image according to the color system of the target image;
the conversion module is used for:
and converting the image from the HSV space to the RGB space according to the adjusted brightness of the target image.
22. An apparatus for processing an image, comprising:
the conversion module is used for converting a target image from a red, green and blue (RGB) space to a hue saturation brightness (HSV) space, wherein the target image comprises a first part and a second part;
a processing module, configured to determine a first color system as a color system of the first portion when the luminance of the first portion and the luminance of the second portion belong to a luminance range of the first color system, an absolute value of a difference between the luminance of the first portion and a critical value of the luminance range of the first color system is greater than or equal to a first threshold, and an absolute value of a difference between the luminance of the second portion and a critical value of the luminance range of the first color system is less than the first threshold;
the processing module is used for: when the absolute value of the difference value between the brightness of the second part and the brightness of the first part is larger than or equal to a second threshold value, determining the color system of the second part according to the hue and the saturation of the second part in the HSV space; or when the absolute value of the difference value between the brightness of the second part and the brightness of the first part is greater than or equal to a second threshold value, determining the color system corresponding to the adjacent range of the brightness of the second part as the color system of the second part; or, when the absolute value of the difference between the brightness of the second part and the brightness of the second part is smaller than the second threshold, determining the first color system as the color system of the second part;
the adjusting module is used for adjusting the brightness of the first part and the second part according to the color systems of the first part and the second part;
the conversion module is used for converting the target image from the HSV space to the RGB space according to the adjusted brightness of the target image.
CN201710082941.8A 2017-02-16 2017-02-16 Method and apparatus for image processing Active CN108446705B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710082941.8A CN108446705B (en) 2017-02-16 2017-02-16 Method and apparatus for image processing
PCT/CN2018/071783 WO2018149253A1 (en) 2017-02-16 2018-01-08 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710082941.8A CN108446705B (en) 2017-02-16 2017-02-16 Method and apparatus for image processing

Publications (2)

Publication Number Publication Date
CN108446705A CN108446705A (en) 2018-08-24
CN108446705B true CN108446705B (en) 2021-03-23

Family

ID=63170502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710082941.8A Active CN108446705B (en) 2017-02-16 2017-02-16 Method and apparatus for image processing

Country Status (2)

Country Link
CN (1) CN108446705B (en)
WO (1) WO2018149253A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110865856B (en) 2018-08-27 2022-04-22 华为技术有限公司 Interface element color display method and device
CN109308687A (en) * 2018-09-06 2019-02-05 百度在线网络技术(北京)有限公司 Method and apparatus for adjusting brightness of image
CN109509461B (en) * 2018-12-19 2020-11-06 惠科股份有限公司 Brightness adjusting method and device of display panel
CN109853267B (en) * 2018-12-29 2021-08-20 杭州智数创联科技有限公司 Method for quickly manufacturing digital printing color card
CN109871455B (en) * 2019-01-28 2020-11-10 厦门理工学院 Color separation method and system for carbonized bamboo chips
CN110726725A (en) * 2019-10-23 2020-01-24 许昌许继软件技术有限公司 Transmission line hardware corrosion detection method and device
CN111882493A (en) * 2020-06-22 2020-11-03 浙江大华技术股份有限公司 Image color adjustment method, device, equipment and computer readable storage medium
CN111966933A (en) * 2020-07-10 2020-11-20 口碑(上海)信息技术有限公司 Color data recommendation method and device
CN113223016B (en) * 2021-05-13 2024-08-20 上海西虹桥导航技术有限公司 Image segmentation method and device for plant seedlings, electronic equipment and medium
CN113487700A (en) * 2021-06-22 2021-10-08 维沃移动通信有限公司 Image processing method and device and electronic equipment
US12067549B2 (en) 2022-01-31 2024-08-20 Walmart Apollo, Llc Systems and methods of image processing and shrinkage evaluation
CN114828337B (en) * 2022-07-01 2022-09-27 杭州罗莱迪思科技股份有限公司 Control method and application of outdoor LED dyeing lamp

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4007487A (en) * 1975-09-25 1977-02-08 The Association Of Motion Picture And Television Producers Inc. Electronic composite photography with color control
US5194008A (en) * 1992-03-26 1993-03-16 Spartanics, Ltd. Subliminal image modulation projection and detection system and method
CN1445984A (en) * 2003-04-14 2003-10-01 浙江大学 Method for fast picking up picture with any image as background in digital image process
CN101166226A (en) * 2006-10-17 2008-04-23 三星电子株式会社 Image compensation in regions of low image contrast
CN101304488A (en) * 2008-06-20 2008-11-12 北京中星微电子有限公司 Method and device for capturing image
CN101998063A (en) * 2009-08-20 2011-03-30 财团法人工业技术研究院 Foreground image separation method
CN102013006A (en) * 2009-09-07 2011-04-13 泉州市铁通电子设备有限公司 Method for automatically detecting and identifying face on the basis of backlight environment
CN102075780A (en) * 2011-02-25 2011-05-25 福建华映显示科技有限公司 Stereoscopic image generating device and method
CN102270427A (en) * 2010-06-04 2011-12-07 英华达(上海)电子有限公司 Method and apparatus for enhancing reading effect of electronic book and electronic terminal capable of reading electronic book
CN102881260A (en) * 2009-09-16 2013-01-16 致伸科技股份有限公司 Image processing method and device
CN103123725A (en) * 2011-11-18 2013-05-29 鸿富锦精密工业(深圳)有限公司 Image analyzing device and analyzing method
CN103208126A (en) * 2013-04-17 2013-07-17 同济大学 Method for monitoring moving object in natural environment
CN104899881A (en) * 2015-05-28 2015-09-09 湖南大学 Shadow detection method for moving vehicle in video image
CN105354554A (en) * 2015-11-12 2016-02-24 西安电子科技大学 Color and singular value feature-based face in-vivo detection method
CN105488793A (en) * 2015-11-26 2016-04-13 西安诺瓦电子科技有限公司 Image display method and image processing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005024662A2 (en) * 2003-09-08 2005-03-17 Koninklijke Philips Electronics N.V. Method and apparatus for indexing and searching graphic elements
US7663689B2 (en) * 2004-01-16 2010-02-16 Sony Computer Entertainment Inc. Method and apparatus for optimizing capture device settings through depth information
US20100322513A1 (en) * 2009-06-19 2010-12-23 Sharp Laboratories Of America, Inc. Skin and sky color detection and enhancement system
CN102096911B (en) * 2011-01-31 2012-08-01 格科微电子(上海)有限公司 Luminance raising method
JP5903927B2 (en) * 2012-02-21 2016-04-13 セイコーエプソン株式会社 Image processing apparatus, image processing method, and program
CN106327437B (en) * 2016-08-10 2019-04-05 大连海事大学 A kind of color documents images bearing calibration and system

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4007487A (en) * 1975-09-25 1977-02-08 The Association Of Motion Picture And Television Producers Inc. Electronic composite photography with color control
US5194008A (en) * 1992-03-26 1993-03-16 Spartanics, Ltd. Subliminal image modulation projection and detection system and method
CN1445984A (en) * 2003-04-14 2003-10-01 浙江大学 Method for fast picking up picture with any image as background in digital image process
CN101166226A (en) * 2006-10-17 2008-04-23 三星电子株式会社 Image compensation in regions of low image contrast
CN101304488A (en) * 2008-06-20 2008-11-12 北京中星微电子有限公司 Method and device for capturing image
CN101998063A (en) * 2009-08-20 2011-03-30 财团法人工业技术研究院 Foreground image separation method
CN102013006A (en) * 2009-09-07 2011-04-13 泉州市铁通电子设备有限公司 Method for automatically detecting and identifying face on the basis of backlight environment
CN102881260A (en) * 2009-09-16 2013-01-16 致伸科技股份有限公司 Image processing method and device
CN102270427A (en) * 2010-06-04 2011-12-07 英华达(上海)电子有限公司 Method and apparatus for enhancing reading effect of electronic book and electronic terminal capable of reading electronic book
CN102075780A (en) * 2011-02-25 2011-05-25 福建华映显示科技有限公司 Stereoscopic image generating device and method
CN103123725A (en) * 2011-11-18 2013-05-29 鸿富锦精密工业(深圳)有限公司 Image analyzing device and analyzing method
CN103208126A (en) * 2013-04-17 2013-07-17 同济大学 Method for monitoring moving object in natural environment
CN104899881A (en) * 2015-05-28 2015-09-09 湖南大学 Shadow detection method for moving vehicle in video image
CN105354554A (en) * 2015-11-12 2016-02-24 西安电子科技大学 Color and singular value feature-based face in-vivo detection method
CN105488793A (en) * 2015-11-26 2016-04-13 西安诺瓦电子科技有限公司 Image display method and image processing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Saliency detection combining foreground and background features based on manifold ranking;ZHU Zhengyu等;《journal of computer applications》;20160910;第36卷(第9期);第2560-2565页 *
多源遥感影像配准与融合技术的研究;邢帅;《中国优秀硕士学位论文全文数据库 基础科学辑》;20050615(第2期);第A008-66页 *

Also Published As

Publication number Publication date
WO2018149253A1 (en) 2018-08-23
CN108446705A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
CN108446705B (en) Method and apparatus for image processing
Ma et al. Objective quality assessment for color-to-gray image conversion
JP5635677B2 (en) High dynamic range, visual dynamic range and wide color range image and video quality assessment
CN105915816B (en) Method and apparatus for determining the brightness of given scenario
AU2015201623A1 (en) Choosing optimal images with preference distributions
KR20140058674A (en) System and method for digital image signal compression using intrinsic images
US20230328396A1 (en) White balance correction method and apparatus, device, and storage medium
Mantiuk Practicalities of predicting quality of high dynamic range images and video
Mazin et al. Estimation of illuminants from projections on the planckian locus
Chubarau et al. Perceptual image quality assessment for various viewing conditions and display systems
CN111291778B (en) Training method of depth classification model, exposure anomaly detection method and device
CN112016621B (en) Training method of classification model, color classification method and electronic equipment
WO2022120799A9 (en) Image processing method and apparatus, electronic device, and storage medium
Sari et al. Color correction using improved linear regression algorithm
US20130329056A1 (en) Color calibration of an image capture device in a way that is adaptive to the scene to be captured
Li et al. Contrast enhancement algorithm for outdoor infrared images based on local gradient-grayscale statistical feature
US11543644B2 (en) Digital imaging device and method for generating a digital color image
Lee et al. A perception-based framework for wide color gamut content selection
Guo et al. Color difference matrix index for tone-mapped images quality assessment
CN107533768A (en) Image histogram compression end points based on targeted colorspace scope is to selection
US20030086607A1 (en) Image enhancement
Chandrakanth et al. Analysis of SSIM based quality assessment across color channels of images
Ahar et al. A just noticeable difference subjective test for high dynamic range images
Krasula Quality assessment of post-processed images
Lahoulou et al. Variable selection for image quality assessment using a neural network based approach

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