WO2015192718A1 - 一种图像的处理方法及装置 - Google Patents

一种图像的处理方法及装置 Download PDF

Info

Publication number
WO2015192718A1
WO2015192718A1 PCT/CN2015/080836 CN2015080836W WO2015192718A1 WO 2015192718 A1 WO2015192718 A1 WO 2015192718A1 CN 2015080836 W CN2015080836 W CN 2015080836W WO 2015192718 A1 WO2015192718 A1 WO 2015192718A1
Authority
WO
WIPO (PCT)
Prior art keywords
initial image
image
defogged
gray
dark
Prior art date
Application number
PCT/CN2015/080836
Other languages
English (en)
French (fr)
Inventor
卢伟冰
Original Assignee
深圳市金立通信设备有限公司
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
Priority claimed from CN201410272543.9A external-priority patent/CN104123700A/zh
Priority claimed from CN201410272364.5A external-priority patent/CN104077750A/zh
Application filed by 深圳市金立通信设备有限公司 filed Critical 深圳市金立通信设备有限公司
Publication of WO2015192718A1 publication Critical patent/WO2015192718A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • 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

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to an image processing method and apparatus.
  • the features such as the target contrast and color in the image are unclear, interfering with the information to be expressed by the image.
  • the prior art proposes an image defogging method, which selects a pixel point corresponding to the pixel value of the scale neighborhood ⁇ (x) to analyze the dark channel prior information, and then estimates the fog concentration and transmittance through the dark channel prior information. Finally, the image is defogged according to the concentration and transmittance of the fog.
  • the dark channel information is analyzed, the arbitrarily selected corresponding scale neighborhood ⁇ (x) includes dark pixels, and when the image contains a bright pixel region exceeding the area of the corresponding scale neighborhood ⁇ (x), the image is judged.
  • the prior art Not only can the image not be recognized as a fog-free image, but defogging the image based on erroneous parameters can also reduce the image effect, and even damage the image due to excessive de-fogging of the fog-free area of the image; in addition, the prior art is based on darkness.
  • the channel prior information estimates the concentration of the fog and the calculation of the transmittance is huge, and it occupies a large amount of processor resources such as the CPU, memory, and bus of the central processing unit. When processing a large amount of image data such as video data, the phenomenon of jamming occurs, and the terminal power is seriously consumed. .
  • the embodiment of the invention provides an image processing method and device, which can accurately determine whether an image needs to be defogged, occupy less processor resources, shorten the processing time of the image, and save the power of the electronic device.
  • An embodiment of the present invention provides a method for processing an image, including:
  • a gray histogram of the pixels of the non-sky area in the dark channel image of the initial image is determined
  • a defogging operation is performed on the initial image; or when it is determined that the initial image does not need to be defogged, the defogging operation is not performed on the initial image.
  • An embodiment of the present invention further provides an electronic device, including:
  • a determining unit configured to determine a gray histogram of the pixels of the non-sky area in the dark channel image of the initial image
  • a determining unit configured to determine, according to the grayscale histogram, whether the initial image needs to be defogged; and when determining that the initial image needs to be defogged, sending a defogging message to the defogging unit; When the initial image does not need to be defogged, the defogging message is not sent to the defogging unit;
  • the defogging unit is configured to perform a defogging operation on the initial image after receiving the defogging message sent by the determining unit.
  • the embodiment of the invention can improve the image fogging detection scheme, and can accurately determine whether the image needs to be defogged, occupy less processor resources, shorten the processing time of the image, and save the power of the electronic device.
  • FIG. 1 is a schematic flow chart of an image processing method according to an embodiment of the present invention.
  • FIG. 2a is a schematic diagram of a first structure of an electronic device according to an embodiment of the present invention.
  • 2b is a schematic diagram of a second structure of an electronic device according to an embodiment of the present invention.
  • 2c is a schematic diagram of a third structure of an electronic device according to an embodiment of the present invention.
  • 2d is a schematic diagram showing a fourth structure of an electronic device according to an embodiment of the present invention.
  • 2 e is a fifth schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 3 is a schematic flow chart of a first embodiment of an electronic device according to an embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of a second embodiment of an electronic device according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart diagram of a third embodiment of an electronic device according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart diagram of a fourth embodiment of an electronic device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic flowchart diagram of a fifth embodiment of an electronic device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic flow chart of a sixth embodiment of an electronic device according to an embodiment of the present invention.
  • An embodiment of the present invention provides a method for processing an image, which may include: determining a gray histogram of a pixel of a non-sky area in a dark channel image of the initial image; and determining, according to the gray histogram, whether the initial image needs to go Fog; determining that the initial image needs to be defogged, performing a defogging operation on the initial image; or determining that the initial image does not require defogging, performing a defogging operation on the initial image.
  • the method of the embodiment of the invention can accurately determine whether the image needs to be defogged, reduce calculation and resource occupation, and shorten the processing time of the image.
  • the image processing method of the embodiment of the present invention may include the following steps:
  • Step S110 determining a gray histogram of the pixels of the non-sky area in the dark channel image of the initial image.
  • the distribution ratio of the gray value in the gray histogram is usually used to determine whether the image needs to be defogged. In this way, the accuracy of the image fog is not high.
  • the embodiment of the invention introduces the dark channel image data into the judgment basis of the initial image fog feeling, which can enhance the judgment accuracy and avoid excessive fogging of the image.
  • the initial image that needs to be judged by fog can be an RGB image, such as a bitmap, jpeg, png, and the like.
  • the dark channel image J dark of the initial image is determined according to the initial image, and the calculation formula can be:
  • x represents pixel coordinates
  • C represents a color channel
  • c ⁇ R, G, B ⁇ indicates that C belongs to one of three color channels
  • J c (y) is the pixel value of the initial image
  • ⁇ (x) indicates
  • ⁇ (x) can take a square neighborhood of 15 ⁇ 15 pixels
  • ⁇ r, g, b ⁇ is the red value, green value, and blue value of the pixel.
  • the formula for determining the dark channel image of the initial image according to the bayer type image may adopt:
  • ⁇ (x) represents the pixel neighborhood of the selected pixel x
  • ⁇ (x) may take a square neighborhood of 15 ⁇ 15 pixels.
  • the gray histogram H of the dark channel image is determined according to J dark , and the gray histogram H is corrected, and finally the gray histogram H' of the non-sky region is obtained.
  • the correction method for correcting the gray histogram H may be: the gray value in H is close to or higher than the minimum color channel value of the atmospheric light color.
  • the histogram element is cleared to the gray histogram H' of the non-sky region. It can also be obtained by directly determining the histogram of the non-sky area in the image, and the gray histogram of the non-sky area can avoid the interference of the sky area to the determination.
  • Strategy 1 Determine a first gray histogram of a non-sky area pixel in the first dark channel image J 1 dark (x) of the initial image, where Whether the initial image needs to be defogged is determined according to the first grayscale histogram.
  • Strategy 3 (applicable to the initial image being a monochrome bayer type image) determining a third gray histogram of the non-sky area pixel in the third dark channel image J 3 dark (x) of the initial image, wherein Whether the initial image needs to be defogged is determined according to the third grayscale histogram.
  • J 3 dark (x) is equivalent to Z is a subdomain of ⁇ (x).
  • the third dark channel image J 3 dark (x) can also be equivalent to among them, Processing data for the smoothing of the initial image.
  • Strategy 4 (applicable to the initial image being a monochrome bayer type image) determining a fourth gray histogram of the non-sky area pixel in the fourth dark channel image J 4 dark (x) of the initial image, wherein Whether the initial image needs to be defogged is determined according to the fourth grayscale histogram.
  • J 4 dark (x) is equivalent to Z is a subdomain of ⁇ (x).
  • J 4 dark (x) can also be equivalent to among them, Processing data for the smoothing of the initial image.
  • Strategy 5 determining a first gray histogram of the non-sky area pixel in the first dark channel image of the initial image; determining whether the initial image needs to be defogged according to the first gray histogram; determining that the initial image needs to be defogged Performing a defogging operation on the initial image; determining that the initial image does not need to be defogged, and determining a second gray histogram of the non-sky area pixel in the second dark channel image J 2 dark (x) of the initial image;
  • the two grayscale histograms determine whether the initial image needs to be defogged; when it is determined that the initial image needs to be defogged, the defogging operation is performed on the initial image; and when the initial image does not need to be defogged, the defogging operation is not performed on the initial image.
  • the atmospheric light color value A c can be calculated by:
  • Strategy 1 Select one or more pixels according to the preset number or ratio, and select one or more pixels from the initial image according to the gray value from low to high; determine the color average of the selected one or more pixels as A c . For example, look for a small fraction (eg, 0.1%) of pixel coordinates with the highest gray value in J dark . Then, the J c (y) pixel value is read at these coordinates, and the color average of the partial pixels is calculated as A c , where the color channel c ⁇ ⁇ R, G, B ⁇ .
  • Strategy 2 averaging the initial image into at least one region, the divided region includes n levels, each level includes m regions; and the region with the highest average luminance among the m regions is determined step by step from low to high; The average value of the colors of all the pixels in the region with the highest average brightness is taken as A c .
  • the ambient light color value can be estimated using the 4-tree tree method.
  • the J dark image is divided into 4 n regions. Perform a 4-fork tree analysis.
  • the process of estimating the atmospheric light color value can be:
  • the 16 areas are further divided into 4 groups, respectively upper left ⁇ Z15, Z16, Z25, Z26 ⁇ , upper right ⁇ z17, z18, z27, z28 ⁇ , lower left ⁇ z35, z36, z45, z46 ⁇ , right lower ⁇ z37, z38, z47, z48 ⁇ four groups, and calculate the average brightness of each group separately, and finally, select the brightest group for further processing.
  • the selected group with the highest average brightness is the ⁇ Z15, Z16, Z25, Z26 ⁇ group
  • the average brightness of Z15, Z16, Z25, Z26 is further compared.
  • the areas with the highest average brightness among the four regions are selected for further processing.
  • the selected area with the highest average brightness is the area Z15
  • the J c (y) pixel value is read in the area Z15 coordinate, and the color average value of the part of the pixel is calculated, and the average value of the color is the atmospheric light color value A c ,
  • Step S111 determining whether the initial image needs to be defogged according to the determined grayscale histogram. Since the determined grayscale histogram introduces dark channel image data, this step can accurately determine whether the initial image needs to be defogged according to the determined grayscale histogram.
  • the method for determining whether the initial image needs to be defogged may be:
  • Strategy 1 Count the number of pixels whose gray value is lower than the first gray threshold in the gray histogram; determine the first ratio of the number of pixels in the statistics and the total number of pixels in the image of the non-sky region in the dark channel image. When the first ratio is lower than the first ratio threshold, it is confirmed that the initial image needs to be defogged; when the first ratio is higher than the first ratio threshold, it is confirmed that the initial image does not need to be defogged.
  • the first gray threshold may be selected according to the gray value of the atomized portion in the foggy image. For example, 2% of the maximum gray value of the pixel in the initial image may be selected as the first gray threshold; When the number of pixels whose gray level is lower than the first gray level threshold is the first ratio of the total number of pixels in the non-sky area image in the dark channel image, it is determined whether the first ratio is higher than the first ratio threshold, wherein the first ratio
  • the threshold is a proportional threshold set according to the atomization image definition standard, or may be a proportional threshold set by the developer according to environmental conditions; when the first ratio is higher than the first proportional threshold, it is confirmed that the initial image does not need to be defogged.
  • the parameter definition standard of the first proportional threshold is changed according to the actual situation, and the first proportional threshold is adjusted as follows.
  • the embodiment of the present invention may not be initial.
  • the image performs a defogging operation to avoid the problem that the initial image is unclear due to excessive defogging.
  • Strategy 2 Select one or more pixels according to a preset number, and select one or more pixels from the gray histogram according to the brightness value from low to high; obtain the gray value of the selected one or more pixels The highest gray value; when the highest gray value is higher than the second gray threshold, it is confirmed that the initial image needs to be defogged; when the highest gray value is lower than the second gray threshold, it is confirmed that the initial image does not need to be defogged.
  • the number of selected pixels is at least one, which may be selected according to the number, or may be pressed.
  • the ratio selection for example, 50% of the pixels can be selected from the pixels shown in the gray histogram according to the brightness value from low to high, and the maximum gray value is obtained from the pixels; and the maximum gray value obtained is judged. Whether the degree value is higher than the second gray level threshold, wherein the second gray level threshold is selected according to the gray value of the atomized portion in the foggy image; when the obtained maximum gray value is lower than the second gray threshold , to confirm that the initial image does not need to be defogged.
  • the definition of the second grayscale threshold is changed according to the actual situation, and the second grayscale threshold is adjusted as above.
  • the embodiment of the present invention may be incorrect.
  • the initial image performs a defogging operation to avoid the problem that the initial image is unclear due to excessive defogging.
  • step S112 when it is determined that the initial image needs to be defogged, the defogging operation is performed on the initial image; when it is determined that the initial image does not need to be defogged, the defogging operation is not performed on the initial image.
  • the formula for calculating the dark channel image may be various, such as the formula adopted in the foregoing example, which is referred to herein as the first dark channel image calculation formula.
  • J c (y) is the pixel value of the initial image
  • y is the pixel
  • ⁇ (x) is the specified pixel neighborhood of the selected pixel
  • ⁇ r, g, b ⁇ is the red value of the pixel, the green value, Blue prime value
  • J c (y) is the pixel value, green factor value, and blue color value of the initial image
  • a c is the average value of the atmospheric light color
  • the second dark channel image calculation formula for calculating the initial image of the type image may be Where A c is the average value of the atmospheric light color, x represents the pixel coordinate, ⁇ (x) represents the pixel neighborhood of the selected pixel x, and ⁇ (x)
  • the specific implementation may include: determining a first gray histogram of a non-sky area pixel in the first dark channel image J 1 dark (x) of the initial image, Determining whether the initial image needs to be defogged according to the first grayscale histogram; determining that the initial image does not need to be defogged, and after performing the defogging operation on the initial image, determining the second dark channel image of the initial image J 2 dark (x)
  • the second gray histogram of the pixels in the sky region of Central Africa, J 2 dark (x) is Whether the initial image needs to be defogged is determined according to the second grayscale histogram; when it is determined that the initial image does not need to be defogged, the defogging operation is not performed on the initial image.
  • the grayscale histogram may be determined on the initial image.
  • the specific implementation may include: determining a fifth gray histogram of the initial image pixel; and calculating the grayscale in the fifth grayscale histogram. a second ratio of the number of pixels having a value higher than the third gray threshold to a total amount of pixels in the initial image; and when the second ratio is lower than the second ratio threshold, prompting the electronic device to perform the dark channel image determining the initial image.
  • the gray histogram is the first step of preliminary determining whether the initial image needs to be defogged.
  • step S110 When the ratio of the number of pixels exceeding the third gray threshold in the initial image pixel exceeds the second proportional threshold, it represents the majority of the pixel gray of the initial image.
  • the value is too high, the initial image is atomized to a higher degree, and the initial image needs to be defogged; when the ratio of the number of pixels in the initial image pixel that does not exceed the third gray threshold exceeds the second ratio threshold, it represents a preliminary judgment of most pixels of the initial image.
  • the gray value is low, the initial image is not atomized, and the initial image may not need to be defogged. In this case, step S110 needs to be performed to perform further accurate judgment.
  • the value of the third gray-scale threshold may refer to the existing image fogging determination standard, or may be adjusted according to actual conditions, when there is a small portion in the initial image.
  • the embodiment of the present invention may temporarily perform the defogging operation on the initial image and perform further judgment to avoid the initial image The problem of unclear expression is caused by excessive defogging.
  • the embodiment of the invention improves the detection scheme of the image fogging, and uses the dark channel image data as the determination parameter for determining whether the initial image needs to be defogged, and accurately determines whether the image needs to be defogged, compared with the prior art, the invention
  • the embodiment reduces the calculation amount of image defogging judgment during the defogging operation, reduces the occupation of processor resources such as CPU, memory, bus, etc. of the central processing unit, shortens the processing time of the image, and saves the power of the electronic device. effect.
  • an embodiment of the present invention provides an electronic device, which may be a server, a personal computer, a mobile phone, a tablet computer, or the like, and may be used to implement the foregoing method, and may include: a determining unit, configured to determine a darkness of an initial image.
  • a determining unit configured to determine, according to the grayscale histogram, whether the initial image needs to be defogged; and further configured to: when the initial image needs to be defogged, send Defogging message is sent to the defogging unit; and is further configured to: when the initial image does not need to be defogged, the defogging message is not sent to the defogging unit; and the defogging unit is configured to receive the sending by the determining unit After the defogging message, a defogging operation is performed on the initial image.
  • the embodiment of the invention can accurately determine whether the image needs to be defogged, accurately determine whether the image needs to be defogged, reduce calculation and resource occupation, and shorten the processing time of the image.
  • the device of this embodiment can be used to perform the method shown in FIG. 1.
  • the device of the embodiment includes: a determining unit 21, a determining unit 22, and a defogging unit 23.
  • the electronic device of the embodiment of the present invention further includes a second selecting unit 24, a dividing unit 25, and a prompting unit 26.
  • the determining unit 22 may further include a statistical unit 221, a ratio determining unit 222, and a second a selection unit 223 and a highest gray value determination unit 224, wherein:
  • a determining unit 21 configured to determine a gray histogram of the pixels of the non-sky area in the dark channel image of the initial image
  • the determining unit 22 is configured to determine, according to the gray histogram, whether the initial image needs to be defogged, and also to determine that the defogging message is sent to the defogging unit 23 when the initial image needs to be defogged, and is also used to determine that the initial image is not needed. When defogging, no defogging message is sent to the defogging unit 23;
  • the defogging unit 23 is configured to perform a defogging operation on the initial image after receiving the defogging message sent by the determining unit 22.
  • the embodiment of the invention introduces the dark channel image data into the judgment basis of the initial image fog feeling, which can enhance the judgment accuracy and avoid excessive fogging of the image.
  • the method for calculating a dark channel image of the initial image may include calculating by a dark channel image calculation formula, and the calculation formula may not be limited to the range given by the foregoing embodiment; after determining the dark channel image of the initial image, the initial image may be The dark channel image is used to calculate the gray histogram of the non-sky area pixel in the dark channel image.
  • the specific calculation method refer to the method given in the foregoing embodiment, and no further details are provided herein.
  • the determining unit 22 may further implement, by using the statistical unit 221 and the ratio determining unit 222, whether the initial image needs to be defogged according to the gray histogram:
  • the statistics unit 221 is configured to count the number of pixels in the grayscale histogram whose gray value is lower than the first gray threshold;
  • the ratio determining unit 222 is configured to determine a first ratio of the number of statistic pixels to the total number of pixels in the non-sky area image in the dark channel image; and to confirm the initial image when the first ratio is lower than the first ratio threshold Defogging is required; when the first ratio is higher than the first ratio threshold, it is confirmed that the initial image does not need to be defogged.
  • the first gray threshold used by the statistics unit 221 may be selected according to the gray value of the atomized portion in the foggy image. For example, 2% of the maximum gray value of the pixel in the initial image may be selected as the first Gray threshold; when calculating the number of pixels whose gray level is lower than the first gray threshold, it is in the dark channel image When the first ratio of the total number of pixels in the non-sky area image is determined, it is determined whether the first ratio is higher than the first ratio threshold, wherein the first ratio threshold adopted by the ratio determining unit 222 is a proportional threshold set according to the atomization image definition criterion.
  • the parameter definition standard of the first proportional threshold is changed according to the actual situation, and the first proportional threshold is adjusted as follows.
  • the embodiment of the present invention may not be initial. The image performs a defogging operation to avoid the problem that the initial image is unclear due to excessive defogging.
  • the determining unit 22 may further implement, by using the first selecting unit 223 and the highest gray value determining unit 224, whether the initial image needs to be defogged according to the gray histogram:
  • the first selecting unit 223 is configured to select one or more pixels from the gray histogram according to a preset number or ratio, and select one or more pixels according to the brightness value from low to high; Or obtaining the highest gray value in the gray value of the plurality of pixels;
  • the highest gray value determining unit 224 is configured to confirm that the initial image needs to be defogged when the highest gray value is higher than the second gray level threshold, and is also used for confirming when the highest gray value is lower than the second gray threshold.
  • the initial image does not require defogging.
  • the number of pixels selected by the first selecting unit 223 is at least one, which may be selected according to the number, or may be selected according to the ratio.
  • the first selecting unit 223 may select the gray level from the lowest to the highest in the order of the brightness values. 50% of the pixels are selected, the highest gray value determining unit 224 determines the maximum gray value from the pixels; and determines whether the determined maximum gray value is higher than the second gray threshold, wherein The second grayscale threshold is selected according to the grayscale value of the atomized portion in the foggy image; when the maximum grayscale value acquired by the highest grayscale value determining unit 224 is lower than the second grayscale threshold, the initial image may be confirmed not to be confirmed. Need to go to the fog.
  • the definition criterion of the second gray threshold is If the actual situation changes, the second gray threshold is adjusted as above.
  • the embodiment of the present invention may not perform a defogging operation on the initial image to avoid the initial image being excessively defogged. The problem of unclear expression is caused.
  • the determining unit 21 may select a plurality of dark channel image calculation formulas to determine a dark channel image of the initial image, for example, a first dark channel image calculation formula may be selected.
  • a first dark channel image calculation formula may be selected.
  • J c (y) is the pixel value of the initial image
  • y is the pixel
  • ⁇ (x) is the specified pixel neighborhood of the selected pixel
  • ⁇ r, g, b ⁇ is the red value of the pixel, the green value, Blue prime value
  • J c (y) is the pixel value of the initial image
  • y is the pixel
  • ⁇ (x) is the specified pixel neighborhood of the selected pixel
  • ⁇ r, g, b ⁇ is the red value of the pixel, the green value
  • the blue prime value, A c is the average value of the atmospheric light color, and can also be used to calculate the formula for other dark channel images.
  • the electronic device can select any dark channel image calculation formula, or multiple dark channel image calculation formulas can be selected to improve the accuracy of the judgment. For example, when the electronic device chooses to use the first dark channel image calculation formula
  • the determining unit 21 and the determining unit 22 may implement an operation of determining whether the initial image needs to be defogged:
  • the determining unit 21 is further configured to determine a first gray histogram of the non-sky area pixel in the first dark channel image J 1 dark (x) of the initial image, where
  • the determining unit 22 is further configured to determine, according to the first grayscale histogram, whether the initial image needs to be defogged.
  • the determining unit 21 and the determining unit 22 may implement an operation of determining whether the initial image needs to be defogged:
  • the determining unit 21 is further configured to determine a second gray histogram of the non-sky area pixel in the second dark channel image J 2 dark (x) of the initial image, where J 2 dark (x) is
  • the determining unit 22 is further configured to determine, according to the second grayscale histogram, whether the initial image needs to be defogged.
  • the electronic device may select to use the third dark channel image calculation formula. To determine if the initial image needs to be defogged:
  • the determining unit 21 is further configured to determine a third grayscale histogram of the non-sky area pixel in the third dark channel image J 3 dark (x) of the initial image, where
  • the determining unit 22 is further configured to determine, according to the third grayscale histogram, whether the initial image needs to be defogged.
  • J 3 dark (x) is equivalent to Z is a subdomain of ⁇ (x).
  • the third dark channel image J 3 dark (x) can also be equivalent to among them, Processing data for the smoothing of the initial image.
  • the electronic device may select to use the fourth dark channel image calculation formula. To determine if the initial image needs to be defogged:
  • the determining unit 21 is further configured to determine a fourth gray histogram of the non-sky area pixel in the fourth dark channel image J 4 dark (x) of the initial image, where
  • the determining unit 22 is further configured to determine, according to the fourth grayscale histogram, whether the initial image needs to be defogged.
  • J 4 dark (x) is equivalent to Z is a subdomain of ⁇ (x).
  • J 4 dark (x) can also be equivalent to among them, Processing data for the smoothing of the initial image.
  • the electronic device can also use two dark channel image calculation formulas to determine whether the initial image needs to be defogged:
  • a determining unit 21 configured to determine a first grayscale histogram of a non-sky area pixel in the first dark channel image J 1 dark (x) of the initial image;
  • the determining unit 22 is further configured to determine, according to the first grayscale histogram, whether the initial image needs to be defogged; and to determine that the initial image needs to be defogged, send a defogging message to the defogging unit 23; and also used to determine the initial When the image does not need to be defogged, send a continuation determination message to the determining unit 21;
  • the determining unit 21 is further configured to: after receiving the continuation determination message sent by the determining unit 22, determine a second grayscale histogram of the non-sky area pixel in the second dark channel image J 2 dark (x) of the initial image;
  • the determining unit 22 is further configured to determine, according to the second grayscale histogram, whether the initial image needs to be defogged; and to determine that the initial image needs to be defogged, send a defogging message to the defogging unit 23; and also used to determine the initial When the image does not need to be defogged, no defogging message is sent to the defogging unit 23;
  • the defogging unit 23 is further configured to perform a defogging operation on the initial image after receiving the defogging message sent by the determining unit 22.
  • the determining unit 22 determines that the initial image does not need to be defogged.
  • the electronic device continues to calculate the formula according to the second dark channel image
  • further determining whether to perform the defogging operation on the initial image is performed to improve the accuracy of the judgment.
  • the judging unit 22 may refer to the judging scheme mentioned in the foregoing embodiment, and details are not described herein.
  • the embodiment of the present invention also provides an option for selecting the atmospheric light color value A c by the second selecting unit 24, the determining unit, and the dividing unit 25.
  • a second selecting unit 24 configured to select one or more pixels from the initial image according to a preset number or ratio of presets, and in descending order of gray values;
  • the determining unit 21 is further configured to determine a color average value of the selected one or more pixels as A c . For example, look for a small fraction (eg, 0.1%) of pixel coordinates with the highest gray value in J dark . Then, the J c (y) pixel value is read at these coordinates, and the color average of the partial pixels is calculated as A c , where the color channel c ⁇ ⁇ R, G, B ⁇ .
  • a dividing unit 25 configured to divide the initial image into at least one region, wherein the divided region includes n levels, and each level includes m regions;
  • the determining unit 21 is further configured to gradually determine an area with the highest average brightness among the m regions according to a low to high level;
  • the electronic device may further perform the determination by the determining unit 21 and the prompting unit 26 A preliminary judgment of performing a defogging operation on the initial image:
  • the determining unit 21 is further configured to determine a fifth grayscale histogram of the initial image pixel; and is further configured to calculate the number of pixels in the fifth grayscale histogram whose gray value is higher than the third gray threshold, and the initial image a second ratio of the total number of pixels in the middle;
  • the prompting unit 26 is configured to prompt the electronic device to perform an operation of determining a gray histogram of the non-sky area pixels in the dark channel image of the initial image when the second ratio is lower than the second ratio threshold.
  • the gray histogram is the first step of preliminary determining whether the initial image needs to be defogged.
  • the ratio of the number of pixels exceeding the third gray threshold in the initial image pixel exceeds the second proportional threshold, it represents the majority of the pixel gray of the initial image.
  • the value is too high, the initial image is atomized to a higher degree, and the initial image needs to be defogged; when the ratio of the number of pixels in the initial image pixel that does not exceed the third gray threshold exceeds the second ratio threshold, it represents a preliminary judgment of most pixels of the initial image.
  • the gray value is low, the initial image is not atomized, and the initial image may not need to be defogged. At this time, further accurate judgment is needed.
  • the value of the third gray-scale threshold may refer to the existing image fogging determination standard, or may be adjusted according to actual conditions, when there is a small portion in the initial image.
  • the embodiment of the present invention may temporarily perform the defogging operation on the initial image and perform further judgment to avoid the problem that the initial image is unclear due to excessive defogging.
  • the electronic device of the embodiment of the invention improves the detection scheme of image fogging, and uses the dark channel image data as a determining parameter for determining whether the initial image needs to be defogged, and accurately determines whether the image needs to be defogged, compared to the prior art.
  • the electronic device of the embodiment of the invention reduces the calculation amount of the image defogging judgment during the defogging operation, reduces the occupation of processor resources such as the CPU, the memory, the bus, and the like, and shortens the processing time of the image, and To save the power of electronic devices.
  • FIG. 3 is a flowchart of an embodiment of an electronic device according to any one of FIG. 2a to FIG. 2e.
  • the flowchart of this embodiment is a specific step of processing an initial image by an electronic device according to an embodiment of the present invention. It can include:
  • step S310 an initial image J is acquired.
  • step S311 the dark channel image J dark of the initial image J is calculated.
  • the calculation method of calculating the dark channel image J dark is not limited to the enumerated first dark channel image calculation formula or the second dark channel image calculation formula.
  • Step S312 the calculating Africa J dark sky region histogram H '.
  • the calculation method is the method mentioned in the aforementioned step S111.
  • Step S313, calculating, according to H', a percentage of pixels in the J dark whose gray value is lower than the threshold T1 as a percentage of the total number of pixels of the image.
  • T1 may take an empirical value, for example, 2% of the maximum gray value may be selected. The user can adjust the experience value according to the visual experience to achieve the adjustment of the calculation result.
  • step S314 whether the percentage a is less than the percentage threshold T2. If it is determined in this step that the percentage a is less than the percentage threshold T2, step S315 is performed; if the step is determined that the percentage a is not less than the percentage threshold T2, then step S316 is continued.
  • the percentage threshold T2 may take an empirical value. For example, 50% may be selected as a percentage threshold. The user can adjust the experience value according to the visual experience to achieve the adjustment of the calculation result.
  • step S315 there is fog.
  • the electronic device can begin performing an operation of defogging the initial image.
  • Step S316 no fog.
  • the electronic device does not need to perform an operation of defogging the initial image.
  • the flow shown in FIG. 3 shows the judgment process of the electronic device to determine whether or not the defogging operation needs to be performed on the initial image, and the influence of the judgment result.
  • the flow of this embodiment improves the detection scheme of image fogging and accurately determines whether the image needs to be defogged.
  • FIG. 4 is a flowchart of an embodiment of an electronic device according to any one of FIG. 2a to FIG. 2e.
  • the flowchart of this embodiment is a specific step of processing an initial image by an electronic device according to an embodiment of the present invention. It can include:
  • step S410 an initial image J is acquired.
  • step S411 the dark channel image J dark of the initial image J is calculated.
  • the calculation method of calculating the dark channel image J dark is not limited to the enumerated first dark channel image calculation formula or the second dark channel image calculation formula.
  • step S412 a gray histogram H' of the non-sky region in J dark is calculated.
  • the calculation method is the method mentioned in the aforementioned step S111.
  • step S413 the C% pixels with the lowest brightness in J dark are selected according to H', and the highest gray value L1 is obtained from these pixels.
  • C% can take the empirical value, for example, 50% can be selected.
  • the user can adjust the experience value according to the visual experience to achieve the adjustment of the calculation result.
  • step S414 whether the highest gray value L1 is greater than the gray level threshold T2. If it is determined in this step that the highest gray value L1 is greater than the gray threshold T2, step S415 is performed; if it is determined in this step that the highest gray value L1 is not greater than the gray threshold T2, step S416 is continued.
  • the gray threshold T2 may take an empirical value. For example, 50% of the highest gray value may be selected as the gray threshold T2. The user can adjust the experience value according to the visual experience to achieve the adjustment of the calculation result.
  • step S415 there is fog.
  • the electronic device can begin performing an operation of defogging the initial image.
  • Step S416, no fog When this step judges the result of no fog, the electronic device does not need to perform an operation of defogging the initial image.
  • the flow shown in FIG. 4 shows the judgment process of the electronic device to determine whether or not the defogging operation needs to be performed on the initial image, and the influence of the judgment result.
  • the flow of this embodiment improves the detection scheme of image fogging and accurately determines whether the image needs to be defogged.
  • FIG. 5 is a flowchart of an embodiment of an electronic device according to any one of FIG. 2a to FIG. 2e.
  • the flowchart of this embodiment is a specific step of processing an initial image by an electronic device according to an embodiment of the present invention. It can include:
  • step S510 an initial image J is acquired.
  • step S511 the dark channel image J 2 dark of the initial image J is calculated.
  • Calculation Method As the method mentioned in the foregoing step S111, the calculation method of calculating the dark channel image J 2 dark can be selected using the second dark channel image calculation formula mentioned in the foregoing examples.
  • step S512 a gray histogram H' of the non-sky region in J 2 dark is calculated.
  • the calculation method is the method mentioned in the aforementioned step S111.
  • Step S513, calculating, according to H', a percentage of pixels in the J 2 dark whose gray value is lower than the threshold T1 as a percentage of the total number of pixels of the image.
  • T1 may take an empirical value, for example, 2% of the maximum gray value may be selected. The user can adjust the experience value according to the visual experience to achieve the adjustment of the calculation result.
  • step S514 whether the percentage a is less than the percentage threshold T2. If it is determined in this step that the percentage a is less than the percentage threshold T2, step S515 is performed; if it is determined in this step that the percentage a is not less than the percentage threshold T2, step S516 is continued.
  • the percentage threshold T2 may take an empirical value. For example, 50% may be selected as a percentage threshold. The user can adjust the experience value according to the visual experience to achieve the adjustment of the calculation result.
  • step S515 there is fog.
  • the electronic device can begin performing an operation of defogging the initial image.
  • Step S516, no fog When this step judges the result of no fog, the electronic device does not need to perform an operation of defogging the initial image.
  • the flow shown in FIG. 5 demonstrates that the electronic device determines whether it is necessary to perform a defogging operation on the initial image. The process of breaking, and the impact of the judgment results.
  • the flow of this embodiment improves the detection scheme of image fogging and accurately determines whether the image needs to be defogged.
  • FIG. 6 is a flow chart of an embodiment of the electronic device according to any one of FIG. 2 a - 2 e.
  • the flowchart of the embodiment is a specific step of processing an initial image by the electronic device according to the embodiment of the present invention. It can include:
  • step S610 an initial image J is acquired.
  • step S611 the dark channel image J 1 dark of the initial image J is calculated.
  • step S612 it is determined whether the initial image is foggy.
  • step S616 is continued; when it is not determined that the initial image is foggy, step S613 is continued.
  • step S613 For the method of determining whether the initial image is foggy, refer to the foregoing step S111 and the electronic device flow shown in FIG. 3 or FIG. 4 .
  • step S613 the dark channel image J 2 dark of the initial image J is calculated.
  • step S614 it is determined whether the initial image is foggy.
  • step S616 is continued; when it is not determined that the initial image is foggy, step S615 is continued.
  • step S616 For the method of determining whether the initial image is foggy, refer to the foregoing step S111 and the electronic device flow shown in FIG. 3 or FIG. 4 .
  • Step S615 no fog.
  • the electronic device does not need to perform an operation of defogging the initial image.
  • Step S616 there is fog.
  • the electronic device can begin performing an operation of defogging the initial image.
  • the flow shown in FIG. 6 is based on the determination result of the first time that the initial image is fog-free, and further judgment is added to make the determination result of whether the initial image needs to be defogged more accurately.
  • the flow of this embodiment improves the detection scheme of image fogging and accurately determines whether the image needs to be defogged.
  • FIG. 7 is a flowchart of an embodiment of an electronic device according to any one of FIG. 2a to FIG. 2e.
  • the flowchart of the embodiment is a specific step of processing an initial image by an electronic device according to an embodiment of the present invention. It can include:
  • step S710 an initial image J is acquired.
  • step S711 a gray histogram of the initial image J is calculated.
  • step S712 it is determined whether the initial image is foggy. This step determines whether it is necessary to perform a defogging operation on the initial image according to the gray value distribution in the gray histogram of the initial image J. When it is determined that the initial image is fogged according to the gray histogram of the initial image J, step S716 is continued. When it is not determined that the initial image is foggy according to the gray histogram of the initial image J, step S713 is continued.
  • the method of determining whether the initial image is foggy may refer to the aforementioned method.
  • step S713 the dark channel image J dark of the initial image J is calculated.
  • step S714 it is determined whether the initial image is foggy.
  • step S716 is continued; when it is not determined that the initial image is foggy, step S715 is continued.
  • step S714 For the method of determining whether the initial image is foggy, refer to the foregoing step S111 and the electronic device flow shown in FIG. 3 or FIG. 4 .
  • Step S715 no fog.
  • the electronic device does not need to perform an operation of defogging the initial image.
  • step S716 there is fog.
  • the electronic device can begin performing an operation of defogging the initial image.
  • FIG. 7 Compared with FIG. 3, FIG. 4, FIG. 5, and FIG. 6, the flow shown in FIG. 7 is increased according to the initial image.
  • the square diagram performs the preliminary judgment step, and the flow of the embodiment improves the detection scheme of the image fogging feeling, and accurately determines whether the image needs to be defogged.
  • FIG. 8 is a flowchart of an embodiment of an electronic device according to any one of FIG. 2 a FIG. 2 e , which is a specific step of processing an initial image by an electronic device according to an embodiment of the present invention. It can include:
  • step S810 an initial image J is acquired.
  • step S811 a gray histogram of the initial image J is calculated.
  • step S812 it is determined whether the initial image is foggy. This step determines whether it is necessary to perform a defogging operation on the initial image according to the gray value distribution in the gray histogram of the initial image J. When it is determined that the initial image is fogged according to the gray histogram of the initial image J, step S818 is continued. When it is not determined that the initial image is foggy based on the gray histogram of the initial image J, step S813 is continued.
  • the method of determining whether the initial image is foggy may refer to the aforementioned method.
  • step S813 the dark channel image J 1 dark of the initial image J is calculated.
  • step S814 it is determined whether the initial image is foggy.
  • step S818 is continued; when it is not determined that the initial image is foggy, step S815 is continued.
  • step S815 For the method of determining whether the initial image is foggy, refer to the foregoing step S111 and the electronic device flow shown in FIG. 3 or FIG. 4 .
  • step S815 the dark channel image J 2 dark of the initial image J is calculated.
  • step S816 it is determined whether the initial image is foggy. When it is determined that the initial image is foggy, step S818 is continued; when it is not determined that the initial image is foggy, step S817 is continued.
  • step S818 For the method of determining whether the initial image is foggy, refer to the foregoing step S111 and the electronic device flow shown in FIG. 3 or FIG. 4 .
  • Step S817 no fog.
  • the electronic device does not need to perform an operation of defogging the initial image.
  • the electronic device can begin performing an operation of defogging the initial image.
  • FIG. 8 The flow shown in FIG. 8 is compared with FIG. 3, FIG. 4, FIG. 5, FIG. 6, and FIG. 7, which is a step of determining whether the electronic device needs to perform a defogging operation on the initial image, and the flow of the embodiment improves the image fogging. Detect the solution and accurately determine if the image needs to be defogged.
  • the units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the unit in the embodiment of the present invention can be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit).
  • a general-purpose integrated circuit such as a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit).
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

一种图像的处理方法,包括:确定出初始图像的暗通道图像中非天空区域像素的灰度直方图(S110);根据所述灰度直方图判断所述初始图像是否需要去雾(S111);判断出所述初始图像需要去雾时,对所述初始图像执行去雾操作;或者,判断出所述初始图像不需要去雾时,不对所述初始图像执行去雾操作(S112)。该方法能够准确地判断出图像是否需要去雾,占用处理器资源少,可缩短图像的处理时间,节省电子设备电量。

Description

一种图像的处理方法及装置
本申请要求于2014年6月18日提交中国专利局,申请号为201410272364.5、发明名称为“一种图像的处理方法”的中国专利申请的优先权,以及申请号为201410272543.9、发明名称为“一种电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及图像处理技术领域,尤其涉及一种图像的处理方法及装置。
背景技术
当拍摄出的图像含雾时,会使图像中目标对比度和颜色等特征不明确,干扰图像所要表达的信息。现有技术提出一种图像去雾的方法,选用一个像素点对应尺度邻域Ω(x)内各像素值分析出暗通道先验信息,然后通过暗通道先验信息估算雾的浓度与透射率,最后根据雾的浓度和透射率对图像进行去雾。现有技术分析暗通道信息时要求任意选用的对应尺度邻域Ω(x)中包含暗色像素,当图像中包含超过对应尺度邻域Ω(x)面积的亮色像素区域时,会将该图像判断为含雾图像,而在实际的应用中,超过对应尺度邻域Ω(x)面积的亮色像素区域往往可以是天空这类景物,当该图像包含大面积的天空一类景物时,现有技术不仅不能识别出该图像是无雾图像,而且基于错误的参数对该图像去雾也会降低图像效果,甚至会因为对图像中无雾区域过度去雾而损坏图像;此外,现有技术根据暗通道先验信息估算雾的浓度与透射率的计算量巨大,占用中央处理器CPU、内存、总线等处理器资源多,处理视频数据等大量图像数据时会出现卡顿现象,并且严重耗费终端电量。
发明内容
本发明实施例提供一种图像的处理方法及装置,能够准确地判断出图像是否需要去雾,占用处理器资源少,可缩短图像的处理时间,节省电子设备电量。
本发明实施例提供了一种图像的处理方法,包括:
确定出初始图像的暗通道图像中非天空区域像素的灰度直方图;
根据所述灰度直方图判断所述初始图像是否需要去雾;
判断出所述初始图像需要去雾时,对所述初始图像执行去雾操作;或者,判断出所述初始图像不需要去雾时,不对所述初始图像执行去雾操作。
本发明实施例还提供了一种电子设备,包括:
确定单元,用于确定出初始图像的暗通道图像中非天空区域像素的灰度直方图;
判断单元,用于根据所述灰度直方图判断所述初始图像是否需要去雾;还用于判断出所述初始图像需要去雾时,发送去雾消息给去雾单元;还用于判断出所述初始图像不需要去雾时,不发送所述去雾消息给所述去雾单元;
去雾单元,用于接收到所述判断单元发送的所述去雾消息后,对所述初始图像执行去雾操作。
本发明实施例通过改进图像雾感的检测方案,可准确地判断出图像是否需要去雾,占用处理器资源少,可缩短图像的处理时间,节省电子设备电量。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种图像的处理方法流程示意图;
图2a是本发明实施例提供的一种电子设备的第一结构示意图;
图2b是本发明实施例提供的一种电子设备的第二结构示意图;
图2c是本发明实施例提供的一种电子设备的第三结构示意图;
图2d是本发明实施例提供的一种电子设备的第四结构示意图;
图2e是本发明实施例提供的一种电子设备的第五结构示意图;
图3是本发明实施例提供的电子设备的第一实施例流程示意图;
图4是本发明实施例提供的电子设备的第二实施例流程示意图;
图5是本发明实施例提供的电子设备的第三实施例流程示意图;
图6是本发明实施例提供的电子设备的第四实施例流程示意图;
图7是本发明实施例提供的电子设备的第五实施例流程示意图;
图8是本发明实施例提供的电子设备的第六实施例流程示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供一种图像的处理方法,其可包括:确定出初始图像的暗通道图像中非天空区域像素的灰度直方图;根据所述灰度直方图判断所述初始图像是否需要去雾;判断出所述初始图像需要去雾时,对所述初始图像执行去雾操作;或者,判断出所述初始图像不需要去雾时,不对所述初始图像执行去雾操作。本发明实施例的方法可准确地判断出图像是否需要去雾,减少计算及资源占用,并缩短图像的处理时间。
下面结合附图及具体实施方式,对本发明实施例的技术方案进行详细说明。
如图1所示,本发明实施例图像的处理方法可以包括以下步骤:
步骤S110,确定出初始图像的暗通道图像中非天空区域像素的灰度直方图。现有技术中通常采用灰度直方图中灰度值的分布比例判断图像是否需要去雾,此类做法判断图像雾感的精度不高,当图像中存在较大比例的天空区域时,可能被判断为有雾,从而导致图像过度去雾,使图像表达内容不清晰或图像质 量变差。本发明实施例将暗通道图像数据引入了初始图像雾感的判断依据,可增强判断准确度,避免将图像过度去雾。
需要进行雾感判断的初始图像可以为RGB图像,例如位图,jpeg,png等格式。首先根据初始图像确定初始图像的暗通道图像Jdark,计算公式可以采用:
Figure PCTCN2015080836-appb-000001
其中x表示像素坐标,C表示颜色通道,c∈{R,G,B}表示C属于三种颜色通道中的一种,Jc(y)为初始图像的像素值,Ω(x)表示选定像素x的像素邻域,Ω(x)可以取15×15像素的正方形邻域,{r,g,b}为像素的红色素值、绿色素值、蓝色素值。
另外,当需要进行雾感判断的初始图像为bayer类型图像时,根据bayer类型图像确定初始图像的暗通道图像的公式可以采用:
Figure PCTCN2015080836-appb-000002
其中x表示像素坐标,Ω(x)表示选定像素x的像素邻域,Ω(x)可以取15×15像素的正方形邻域。
然后根据Jdark确定暗通道图像的灰度直方图H,并对灰度直方图H进行修正,最终得出非天空区域的灰度直方图H’。
修正灰度直方图H的修正方法可以为:将H中灰度值接近或者高于大气光颜色最小颜色通道值
Figure PCTCN2015080836-appb-000003
的直方图元素清零,得出非天空区域的灰度直方图H’。也可以通过直接确定图像中非天空区域的直方图获得,通过非天空区域的灰度直方图可以避免天空区域对判定的干扰。
具体实现中,可以任选上述的公式进行计算:
策略一、确定出初始图像的第一暗通道图像J1 dark(x)中非天空区域像素的第一灰度直方图,其中,
Figure PCTCN2015080836-appb-000004
根据第一灰度直方图判断初始图像是否需要去雾。
策略二、确定出初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图,其中,J2 dark(x)为
Figure PCTCN2015080836-appb-000005
根据第二灰度直方图判断初始图像是否需要去雾。
策略三、(适用于初始图像为单色bayer类型图像)确定出初始图像的第三暗通道图像J3 dark(x)中非天空区域像素的第三灰度直方图,其中,
Figure PCTCN2015080836-appb-000006
根据第三灰度直方图判断初始图像是否需要去雾。
具体的计算过程中,第三暗通道图像J3 dark(x)的Ω(x)范围为Ωp×q(x)时,J3 dark(x)等价于
Figure PCTCN2015080836-appb-000007
Z为Ω(x)的子域。
具体的计算过程中,第三暗通道图像J3 dark(x)还可以等价于
Figure PCTCN2015080836-appb-000008
其中,
Figure PCTCN2015080836-appb-000009
为所述初始图像的平滑处理数据。
策略四、(适用于初始图像为单色bayer类型图像)确定出初始图像的第四暗通道图像J4 dark(x)中非天空区域像素的第四灰度直方图,其中,
Figure PCTCN2015080836-appb-000010
根据第四灰度直方图判断初始图像是否需要去雾。
具体的计算过程中,第四暗通道图像J4 dark(x)的Ω(x)范围为Ωp×q(x)时,J4 dark(x)等价于
Figure PCTCN2015080836-appb-000011
Z为Ω(x)的子域。
具体的计算过程中,第四暗通道图像J4 dark(x)中,J4 dark(x)还可以等价于
Figure PCTCN2015080836-appb-000012
其中,
Figure PCTCN2015080836-appb-000013
为所述初始图像的平滑处理数据。
另外,还可以同时采用两种计算途径:
策略五、确定出的初始图像的第一暗通道图像中非天空区域像素的第一灰度直方图;根据第一灰度直方图判断初始图像是否需要去雾;判断出初始图像需要去雾时,对初始图像执行去雾操作;判断出初始图像不需要去雾时,确定出初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图;根据第二灰度直方图判断初始图像是否需要去雾;判断出初始图像需要去雾时,对初始图像执行去雾操作;判断出初始图像不需要去雾时,不对初始图像执行去雾操作。
具体实施中,大气光颜色值Ac可通过以下方式计算出:
策略1:按照预设的选取个数或比例,并按照灰度值从低到高的顺序从初始图像中选取一个或多个像素;确定出选取的一个或多个像素的颜色平均值作为Ac。例如,查找Jdark中灰度值最高的一少部分(例如0.1%)像素坐标。然后,在这些坐标读取Jc(y)像素值,并计算该部分像素的颜色平均值为Ac,其中,颜色通道c∈{R,G,B}。
策略2:平均划分初始图像成至少一个区域,划分的区域包括n个级别,每个等级均包含m个区域;按照从低到高的级别逐步确定出m个区域中平均亮度最高的区域;确定出平均亮度最高的区域中所有像素的颜色平均值作为 Ac
例如,当m=4时,可使用4叉树的方法估计出大气光颜色值。将Jdark图像划分为4n个区域。进行4叉树分析。如,当采用n=3时,请参照表格1所示的43个区域,估计大气光颜色值的过程可以为:
z11 z12 Z13 Z14 Z15 Z16 Z17 Z18
z21 z22 z23 z24 z25 z26 z27 z28
z31 z32 Z33 Z34 Z35 Z36 Z37 Z38
z41 z42 Z43 Z44 Z45 Z46 Z47 Z48
z51 z52 Z53 Z54 Z55 Z56 Z57 Z58
z61 z62 Z63 Z64 Z65 Z66 Z67 Z68
z71 z72 Z73 Z74 Z75 Z76 Z77 Z78
z81 z82 Z83 Z84 Z85 Z86 Z87 Z88
表格1
计算出各区域的平均亮度。然后计算左上16区域,右上16区域,左下16区域,右下16区域各自的平均亮度,选择亮度最高的进行进一步处理。当选择出的平均亮度最高的区域为右上16区域时,进一步将该16区域分为4组,分别为左上{Z15,Z16,Z25,Z26},右上{z17,z18,z27,z28},左下{z35,z36,z45,z46},右下{z37,z38,z47,z48}四组,并分别计算每组的平均亮度,最后,选择最亮的一组进行进一步处理。当选择出的平均亮度最高的一组为{Z15,Z16,Z25,Z26}组时,进一步比较Z15,Z16,Z25,Z26的平均亮度。最后,选择出这四个区域中平均亮度最高的区域进行进一步处理。当选择出的平均亮度最高的区域为区域Z15时,在区域Z15坐标读取Jc(y)像素值,并计算该部分像素的颜色平均值,这个颜色平均值就是大气光颜色值Ac,其中颜色通 道c∈{R,G,B}。
步骤S111,根据确定出的灰度直方图判断初始图像是否需要去雾。由于确定出的灰度直方图引入了暗通道图像数据,本步骤根据上述确定出的灰度直方图可准确地判断出初始图像是否需要去雾。
具体实施中,判断初始图像是否需要去雾的判断方法可以为:
策略一、统计出灰度直方图中灰度值低于第一灰度阈值的像素的个数;确定统计的像素的个数与暗通道图像中非天空区域图像中像素总量的第一比值;当第一比值低于所述第一比例阈值时,确认初始图像需要去雾;当第一比值高于第一比例阈值时,确认初始图像不需要去雾。
具体实现中,第一灰度阈值可根据有雾图像中雾化部分的灰度值情况选取,例如,可选取初始图像中像素的最大灰度值的2%作为第一灰度阈值;当计算出灰度低于第一灰度阈值的像素个数占暗通道图像中非天空区域图像中像素总量的第一比值时,判断第一比值是否高于第一比例阈值,其中,第一比例阈值是根据雾化图像界定标准设定的比例阈值,也可以是开发者根据环境情况设定的比例阈值;当第一比值高于第一比例阈值时,确认初始图像不需要去雾。本发明实施例中,第一比例阈值的参数界定标准是可以根据实际情况改变的,如下调第一比例阈值,当初始图像中有很小部分的雾化情况时,本发明实施例可以不对初始图像执行去雾操作,以避免初始图像因为被过度去雾而造成表达效果不清晰的问题。
策略二、按照预设的选取个数或比例,并按照亮度值从低到高的顺序从灰度直方图中选取一个或多个像素;从选取的一个或多个像素的灰度值中获取最高灰度值;当最高灰度值高于第二灰度阈值时,确认初始图像需要去雾;当最高灰度值低于第二灰度阈值时,确认初始图像不需要去雾。
具体实现中,选取像素的个数为至少一个,可以按照个数选取,也可以按 照比例选取,如可以按照亮度值从低到高的顺序从灰度直方图所示的像素中选取50%的像素,并从这些像素中获取出最大灰度值;再判断获取到的最大灰度值是否高于第二灰度阈值,其中,第二灰度阈值是根据有雾图像中雾化部分的灰度值情况选取;当获取到的最大灰度值低于第二灰度阈值时,可确认初始图像不需要去雾。本发明实施例中,第二灰度阈值的界定标准是可以根据实际情况改变的,如上调第二灰度阈值,当初始图像中有很小部分的雾化情况时,本发明实施例可以不对初始图像执行去雾操作,以避免初始图像因为被过度去雾而造成表达效果不清晰的问题。
步骤S112,判断出初始图像需要去雾时,对初始图像执行去雾操作;判断出初始图像不需要去雾时,不对初始图像执行去雾操作。
本发明实施例中,计算暗通道图像的公式可以采用多种,如前述举例中采用的公式,这里称为第一暗通道图像计算公式
Figure PCTCN2015080836-appb-000014
其中,Jc(y)为初始图像的像素值,y为像素,Ω(x)为选定像素的指定像素邻域,{r,g,b}为像素的红色素值、绿色素值、蓝色素值;还可以采用第二暗通道图像计算公式
Figure PCTCN2015080836-appb-000015
其中,Jc(y)为初始图像的像素值、绿色素值、蓝色素值,Ac为大气光颜色平均值,并且,当需要进行雾感判断的初始图像为bayer类型图像时,根据bayer类型图像计算初始图像的第二暗通道图像计算公式可以为
Figure PCTCN2015080836-appb-000016
其中,Ac为大气光颜色平均值,x表示像素坐标,Ω(x)表示选定像素x的像素邻域,Ω(x)可以取15×15像素的正方形邻域。
还可以为其他的暗通道计算公式。在实际的计算中,可以根据需要选择其中一种作为判断初始图像是否需要去雾的判断参数,还可以进行组合计算,选 取至少两个公式进行多次计算和判断,以提高判断初始图像是否需要去雾的准确性。具体实施可包括:确定出初始图像的第一暗通道图像J1 dark(x)中非天空区域像素的第一灰度直方图,
Figure PCTCN2015080836-appb-000017
根据第一灰度直方图判断初始图像是否需要去雾;判断出初始图像不需要去雾时,不对初始图像执行去雾操作之后,确定出初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图,J2 dark(x)为
Figure PCTCN2015080836-appb-000018
根据第二灰度直方图判断初始图像是否需要去雾;判断出初始图像不需要去雾时,不对初始图像执行去雾操作。
另外,在步骤S110之前,还可以对初始图像进行基于灰度直方图的判断,具体实施可包括:确定出初始图像像素的第五灰度直方图;计算出第五灰度直方图中灰度值高于第三灰度阈值的像素的个数占初始图像中像素总量的第二比值;当第二比值低于第二比例阈值时,提示电子设备执行确定出初始图像的暗通道图像中非天空区域像素的灰度直方图的操作。其中,灰度直方图为初步判断初时图像是否需要去雾的第一步,初始图像像素中超过第三灰度阈值的像素个数比例超过第二比例阈值时,代表初始图像大部分像素灰度值偏高,初始图像雾化程度较高,初始图像需要去雾;当初始图像像素中不超过第三灰度阈值的像素个数比例超过第二比例阈值时,代表初步判断初始图像大部分像素灰度值偏低,初始图像雾化程度不高,初始图像可能不需要去雾,此时需要实施步骤S110进行进一步精确的判断。在步骤S110之前进行的基于灰度直方图的判断过程中,第三灰度阈值的取值可以参考现有的图像雾化判断标准,也可以根据实际情况调整,当初始图像中有很小部分的雾化情况时,本发明实施例可以暂时不对初始图像执行去雾操作,并执行进一步的判断,以避免初始图像因 为被过度去雾而造成表达效果不清晰的问题。
本发明实施例改进了图像雾感的检测方案,将暗通道图像数据也作为判断初始图像是否需要去雾的判断参数,准确地判断出图像是否需要去雾,相比于现有技术,本发明实施例降低了去雾操作过程中图像去雾判断的计算量,减少了中央处理器CPU、内存、总线等处理器资源的占用,缩短了图像的处理时间,并且,起到了节省电子设备电量的效果。
相应的,本发明实施例提供一种电子设备,该设备可以是服务器、个人计算机、手机、平板电脑等,可用于实施前述的方法,其可包括:确定单元,用于确定出初始图像的暗通道图像中非天空区域像素的灰度直方图;判断单元,用于根据所述灰度直方图判断所述初始图像是否需要去雾;还用于判断出所述初始图像需要去雾时,发送去雾消息给去雾单元;还用于判断出所述初始图像不需要去雾时,不发送所述去雾消息给所述去雾单元;去雾单元,用于接收到所述判断单元发送的所述去雾消息后,对所述初始图像执行去雾操作。本发明实施例可准确地判断出图像是否需要去雾,准确地判断出图像是否需要去雾,减少计算及资源占用,并缩短图像的处理时间。
下面结合附图及具体实施方式,对本发明实施例中装置的技术方案进行详细说明。
图2a为本发明实施例的电子设备的结构组成示意图。该实施例的装置可用于执行图1所示的办法,具体的,该实施例的装置包括:确定单元21、判断单元22和去雾单元23,可一并参照图2b、图2c、图2d、图2e所示的结构组成示意图,本发明实施例的电子设备还包括第二选取单元24、划分单元25和提示单元26,判断单元22还可以进一步包括统计单元221、比值确定单元222、第一选取单元223以及最高灰度值确定单元224,其中:
确定单元21,用于确定出初始图像的暗通道图像中非天空区域像素的灰度直方图;
判断单元22,用于根据灰度直方图判断初始图像是否需要去雾;还用于判断出初始图像需要去雾时,发送去雾消息给去雾单元23;还用于判断出初始图像不需要去雾时,不发送去雾消息给去雾单元23;
去雾单元23,用于接收到判断单元22发送的去雾消息后,对初始图像执行去雾操作。
本发明实施例将暗通道图像数据引入了初始图像雾感的判断依据,可增强判断准确度,避免将图像过度去雾。其中,计算初始图像的暗通道图像的方法可包括通过暗通道图像计算公式计算,计算公式可以不仅限于前述实施例所给出的范围;确定出初始图像的暗通道图像后,可根据初始图像的暗通道图像计算出暗通道图像中非天空区域像素的灰度直方图,具体的计算方法可参照前述实施例给出的方法,在此不作赘述。
进一步可选的,可一并参照图2b,判断单元22可进一步通过统计单元221和比值确定单元222实现根据灰度直方图判断初始图像是否需要去雾的操作:
统计单元221,用于统计灰度直方图中灰度值低于第一灰度阈值的像素的个数;
比值确定单元222,用于确定统计的像素的个数与暗通道图像中非天空区域图像中像素总量的第一比值;还用于第一比值低于第一比例阈值时,确认出初始图像需要去雾;还用于第一比值高于第一比例阈值时,确认出初始图像不需要去雾。
具体实现中,统计单元221所采用的第一灰度阈值可根据有雾图像中雾化部分的灰度值情况选取,例如,可选取初始图像中像素的最大灰度值的2%作为第一灰度阈值;当计算出灰度低于第一灰度阈值的像素个数占暗通道图像中 非天空区域图像中像素总量的第一比值时,判断第一比值是否高于第一比例阈值,其中,比值确定单元222采用的第一比例阈值是根据雾化图像界定标准设定的比例阈值,也可以是开发者根据环境情况设定的比例阈值;当第一比值高于第一比例阈值时,比值确定单元222确认初始图像不需要去雾。本发明实施例中,第一比例阈值的参数界定标准是可以根据实际情况改变的,如下调第一比例阈值,当初始图像中有很小部分的雾化情况时,本发明实施例可以不对初始图像执行去雾操作,以避免初始图像因为被过度去雾而造成表达效果不清晰的问题。
进一步可选的,可一并参照图2c,判断单元22可进一步通过第一选取单元223和最高灰度值确定单元224实现根据灰度直方图判断初始图像是否需要去雾的操作:
第一选取单元223,用于按照预设的选取个数或比例,并按照亮度值从低到高的顺序从所述灰度直方图中选取一个或多个像素;还用于从选取的一个或多个像素的灰度值中获取最高灰度值;
最高灰度值确定单元224,当最高灰度值高于第二灰度阈值时,用于确认出初始图像需要去雾;当最高灰度值低于第二灰度阈值时,还用于确认出初始图像不需要去雾。
具体实现中,第一选取单元223选取像素的个数为至少一个,可以按照个数选取,也可以按照比例选取,如第一选取单元223可以按照亮度值从低到高的顺序从灰度直方图所示的像素中选取50%的像素,最高灰度值确定单元224从这些像素中确定出最大灰度值;再判断确定出的最大灰度值是否高于第二灰度阈值,其中,第二灰度阈值是根据有雾图像中雾化部分的灰度值情况选取;当最高灰度值确定单元224获取到的最大灰度值低于第二灰度阈值时,可确认初始图像不需要去雾。本发明实施例中,第二灰度阈值的界定标准是可以根据 实际情况改变的,如上调第二灰度阈值,当初始图像中有很小部分的雾化情况时,本发明实施例可以不对初始图像执行去雾操作,以避免初始图像因为被过度去雾而造成表达效果不清晰的问题。
进一步可选的,确定单元21可以选用多种暗通道图像计算公式确定出初始图像的暗通道图像,如可以选用第一暗通道图像计算公式
Figure PCTCN2015080836-appb-000019
其中,Jc(y)为初始图像的像素值,y为像素,Ω(x)为选定像素的指定像素邻域,{r,g,b}为像素的红色素值、绿色素值、蓝色素值;还可以采用第二暗通道图像计算公式
Figure PCTCN2015080836-appb-000020
其中,Jc(y)为初始图像的像素值,y为像素,Ω(x)为选定像素的指定像素邻域,{r,g,b}为像素的红色素值、绿色素值、蓝色素值,Ac为大气光颜色平均值,还可以为其他的暗通道图像计算公式。电子设备可以选用任一种暗通道图像计算公式,也可以选用多个暗通道图像计算公式,以提高判断的准确性。例如,当电子设备选择使用第一暗通道图像计算公式
Figure PCTCN2015080836-appb-000021
来判断初始图像是否需要去雾时,可以通过确定单元21、判断单元22实现判断初始图像是否需要去雾的操作:
确定单元21,还用于确定出初始图像的第一暗通道图像J1 dark(x)中非天空区域像素的第一灰度直方图,其中,
Figure PCTCN2015080836-appb-000022
判断单元22,还用于根据第一灰度直方图判断初始图像是否需要去雾。
进一步可选的,当电子设备选择使用第二暗通道图像计算公式
Figure PCTCN2015080836-appb-000023
来判断初始图像是否需要去雾时,可以通过确定单元21、判断单元22实现判断初始图像是否需要去雾的操作:
确定单元21,还用于确定出初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图,其中,J2 dark(x)为
Figure PCTCN2015080836-appb-000024
判断单元22,还用于根据第二灰度直方图判断初始图像是否需要去雾。
当需要判断的初始图像为单色bayer类型图像时,电子设备可选择使用第三暗通道图像计算公式
Figure PCTCN2015080836-appb-000025
来判断初始图像是否需要去雾:
确定单元21,还用于确定出初始图像的第三暗通道图像J3 dark(x)中非天空区域像素的第三灰度直方图,其中,
Figure PCTCN2015080836-appb-000026
判断单元22,还用于根据第三灰度直方图判断初始图像是否需要去雾。
具体的计算过程中,第三暗通道图像J3 dark(x)的Ω(x)范围为Ωp×q(x)时,J3 dark(x)等价于
Figure PCTCN2015080836-appb-000027
Z为Ω(x)的子域。
具体的计算过程中,第三暗通道图像J3 dark(x)还可以等价于
Figure PCTCN2015080836-appb-000028
其中,
Figure PCTCN2015080836-appb-000029
为所述初始图像的平滑处理数据。
当需要判断的初始图像为单色bayer类型图像时,电子设备可选择使用第四暗通道图像计算公式
Figure PCTCN2015080836-appb-000030
来判断初始图像是否需要去雾:
确定单元21,还用于确定出初始图像的第四暗通道图像J4 dark(x)中非天空区域像素的第四灰度直方图,其中,
Figure PCTCN2015080836-appb-000031
判断单元22,还用于根据第四灰度直方图判断初始图像是否需要去雾。
具体的计算过程中,第四暗通道图像J4 dark(x)的Ω(x)范围为Ωp×q(x)时,J4 dark(x)等价于
Figure PCTCN2015080836-appb-000032
Z为Ω(x)的子域。
具体的计算过程中,第四暗通道图像J4 dark(x)中,J4 dark(x)还可以等价于
Figure PCTCN2015080836-appb-000033
其中,
Figure PCTCN2015080836-appb-000034
为所述初始图像的平滑处理数据。
电子设备也可以采用两个暗通道图像计算公式来判断初始图像是否需要去雾:
确定单元21,用于确定出初始图像的第一暗通道图像J1 dark(x)中非天空区域像素的第一灰度直方图;
判断单元22,还用于根据第一灰度直方图判断初始图像是否需要去雾;还用于判断出初始图像需要去雾时,发送去雾消息给去雾单元23;还用于判断出初始图像不需要去雾时,发送继续判断消息给确定单元21;
确定单元21,还用于接收到所述判断单元22发送的继续判断消息后,确定出初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图;
判断单元22,还用于根据第二灰度直方图判断初始图像是否需要去雾;还用于判断出初始图像需要去雾时,发送去雾消息给去雾单元23;还用于判断出初始图像不需要去雾时,不发送去雾消息给去雾单元23;
去雾单元23,还用于接收到判断单元22发送的去雾消息后,对初始图像执行去雾操作。
可知,确定单元21根据第一暗通道图像计算公式计算第一暗通道图像,并进一步计算出第一暗通道图像非天空区域的灰度直方图后,判断单元22判断出初始图像不需要去雾时,电子设备将继续根据第二暗通道图像计算公式计 算第二暗通道图像,并进一步计算出第二暗通道图像非天空区域的灰度直方图后,进行是否对初始图像执行去雾操作的进一步判断,以提高判断的准确性。其中,判断单元22判断是否需要对初始图像执行去雾操作的方法可参照前述实施例所提及的判断方案,在此不作赘述。
进一步可选的,可以一并参照图2d,本发明实施例通过第二选取单元24、确定单元以及划分单元25对于大气光颜色值Ac的选用也给出了选用方案:
第二选取单元24,用于按照预设的选取个数或比例,并按照灰度值从低到高的顺序从初始图像中选取一个或多个像素;
确定单元21,还用于确定出选取的一个或多个像素的颜色平均值作为Ac。例如,查找Jdark中灰度值最高的一少部分(例如0.1%)像素坐标。然后,在这些坐标读取Jc(y)像素值,并计算该部分像素的颜色平均值为Ac,其中,颜色通道c∈{R,G,B}。
或者,
划分单元25,用于平均划分所述初始图像成至少一个区域,其中,划分的区域包括n个级别,每个等级均包含m个区域;
确定单元21,还用于按照从低到高的级别逐步确定出m个区域中平均亮度最高的区域;
确定单元21,还用于确定出平均亮度最高的区域中所有像素的颜色平均值作为Ac。例如,当m=4时,可使用4叉树的方法估计出大气光颜色值。
进一步可选的,可一并参照图2e,在第一计算单元21计算初始图像的暗通道图像中非天空区域的灰度直方图之前,电子设备还可以通过确定单元21和提示单元26进行是否对初始图像执行去雾操作的初步判断:
确定单元21,还用于确定出初始图像像素的第五灰度直方图;还用于计算出第五灰度直方图中灰度值高于第三灰度阈值的像素的个数占初始图像中像素总量的第二比值;
提示单元26,第二比值低于第二比例阈值时,用于提示电子设备执行确定出初始图像的暗通道图像中非天空区域像素的灰度直方图的操作。
其中,灰度直方图为初步判断初时图像是否需要去雾的第一步,初始图像像素中超过第三灰度阈值的像素个数比例超过第二比例阈值时,代表初始图像大部分像素灰度值偏高,初始图像雾化程度较高,初始图像需要去雾;当初始图像像素中不超过第三灰度阈值的像素个数比例超过第二比例阈值时,代表初步判断初始图像大部分像素灰度值偏低,初始图像雾化程度不高,初始图像可能不需要去雾,此时需要实施进行进一步精确的判断。在步骤S110之前进行的基于灰度直方图的判断过程中,第三灰度阈值的取值可以参考现有的图像雾化判断标准,也可以根据实际情况调整,当初始图像中有很小部分的雾化情况时,本发明实施例可以暂时不对初始图像执行去雾操作,并执行进一步的判断,以避免初始图像因为被过度去雾而造成表达效果不清晰的问题。
本发明实施例的电子设备改进了图像雾感的检测方案,将暗通道图像数据也作为判断初始图像是否需要去雾的判断参数,准确地判断出图像是否需要去雾,相比于现有技术,本发明实施例的电子设备降低了去雾操作过程中图像去雾判断的计算量,减少了中央处理器CPU、内存、总线等处理器资源的占用,缩短了图像的处理时间,并且,起到了节省电子设备电量的效果。
请一并参照图3,图3为图2a-图2e中任一所述的电子设备的一实施例流程图,该实施例流程图为本发明实施例的电子设备处理初始图像的具体步骤, 其可包括:
步骤S310,采集初始图像J。
步骤S311,计算初始图像J的暗通道图像Jdark。计算方法如前述步骤S111所提及的方法,计算暗通道图像Jdark的计算方法不仅限于列举的第一暗通道图像计算公式或第二暗通道图像计算公式。
步骤S312,计算Jdark中非天空区域灰度直方图H’。计算方法如前述步骤S111所提及的方法。
步骤S313,根据H’计算Jdark中灰度值低于阈值T1的像素占整个图像像素个数的百分比a。具体实现中,T1可取经验值,例如,可以选取最大灰度值的2%。用户可以根据视觉体验调整经验值,从而实现对计算结果的调整。
步骤S314,是否百分比a小于百分比阈值T2。若本步骤判断出百分比a小于百分比阈值T2,则执行步骤S315;若本步骤判断出百分比a不小于百分比阈值T2,则继续执行步骤S316。其中,百分比阈值T2可取经验值,例如,可以选取50%作为百分比阈值。用户可以根据视觉体验调整经验值,从而实现对计算结果的调整。
步骤S315,有雾。当本步骤判断出有雾的结果时,电子设备可以开始执行对初始图像去雾的操作。
步骤S316,无雾。当本步骤判断出无雾的结果时,电子设备无需执行对初始图像去雾的操作。
图3所示流程展示了电子设备判断是否需要对初始图像执行去雾操作的判断过程,以及判断结果的影响。该实施例流程改进了图像雾感的检测方案,并准确地判断出图像是否需要去雾。
请一并参照图4,图4为图2a-图2e中任一所述的电子设备的一实施例流程图,该实施例流程图为本发明实施例的电子设备处理初始图像的具体步骤,其可包括:
步骤S410,采集初始图像J。
步骤S411,计算初始图像J的暗通道图像Jdark。计算方法如前述步骤S111所提及的方法,计算暗通道图像Jdark的计算方法不仅限于列举的第一暗通道图像计算公式或第二暗通道图像计算公式。
步骤S412,计算Jdark中非天空区域灰度直方图H’。计算方法如前述步骤S111所提及的方法。
步骤S413,根据H’选取出Jdark中亮度最低的C%的像素,并从这些像素中获取最高灰度值L1。具体实现中,C%可取经验值,例如,可以选取50%。用户可以根据视觉体验调整经验值,从而实现对计算结果的调整。
步骤S414,是否最高灰度值L1大于灰度阈值T2。若本步骤判断出最高灰度值L1大于灰度阈值T2,则执行步骤S415;若本步骤判断出最高灰度值L1不大于灰度阈值T2,则继续执行步骤S416。其中,灰度阈值T2可取经验值,例如,可以选取最高灰度值的50%作为灰度阈值T2。用户可以根据视觉体验调整经验值,从而实现对计算结果的调整。
步骤S415,有雾。当本步骤判断出有雾的结果时,电子设备可以开始执行对初始图像去雾的操作。
步骤S416,无雾。当本步骤判断出无雾的结果时,电子设备无需执行对初始图像去雾的操作。
图4所示流程展示了电子设备判断是否需要对初始图像执行去雾操作的判断过程,以及判断结果的影响。该实施例流程改进了图像雾感的检测方案,并准确地判断出图像是否需要去雾。
请一并参照图5,图5为图2a-图2e中任一所述的电子设备的一实施例流程图,该实施例流程图为本发明实施例的电子设备处理初始图像的具体步骤,其可包括:
步骤S510,采集初始图像J。
步骤S511,计算初始图像J的暗通道图像J2 dark。计算方法如前述步骤S111所提及的方法,计算暗通道图像J2 dark的计算方法可选用前述举例中提及的第二暗通道图像计算公式。
步骤S512,计算J2 dark中非天空区域灰度直方图H’。计算方法如前述步骤S111所提及的方法。
步骤S513,根据H’计算J2 dark中灰度值低于阈值T1的像素占整个图像像素个数的百分比a。具体实现中,T1可取经验值,例如,可以选取最大灰度值的2%。用户可以根据视觉体验调整经验值,从而实现对计算结果的调整。
步骤S514,是否百分比a小于百分比阈值T2。若本步骤判断出百分比a小于百分比阈值T2,则执行步骤S515;若本步骤判断出百分比a不小于百分比阈值T2,则继续执行步骤S516。其中,百分比阈值T2可取经验值,例如,可以选取50%作为百分比阈值。用户可以根据视觉体验调整经验值,从而实现对计算结果的调整。
步骤S515,有雾。当本步骤判断出有雾的结果时,电子设备可以开始执行对初始图像去雾的操作。
步骤S516,无雾。当本步骤判断出无雾的结果时,电子设备无需执行对初始图像去雾的操作。
图5所示流程展示了电子设备判断是否需要对初始图像执行去雾操作的判 断过程,以及判断结果的影响。该实施例流程改进了图像雾感的检测方案,并准确地判断出图像是否需要去雾。
请一并参照图6,图6为图2a-图2e中任一所述的电子设备的一实施例流程图,该实施例流程图为本发明实施例的电子设备处理初始图像的具体步骤,其可包括:
步骤S610,采集初始图像J。
步骤S611,计算初始图像J的暗通道图像J1 dark
步骤S612,是否判断出初始图像有雾。当判断出初始图像有雾时,继续执行步骤S616;当未判断出初始图像有雾时,继续执行步骤S613。其中,判断初始图像是否有雾的方法可以参照前述步骤S111、以及图3或图4所示的电子设备流程。
步骤S613,计算初始图像J的暗通道图像J2 dark
步骤S614,是否判断出初始图像有雾。当判断出初始图像有雾时,继续执行步骤S616;当未判断出初始图像有雾时,继续执行步骤S615。其中,判断初始图像是否有雾的方法可以参照前述步骤S111、以及图3或图4所示的电子设备流程。
步骤S615,无雾。当本步骤判断出无雾的结果时,电子设备无需执行对初始图像去雾的操作。
步骤S616,有雾。当本步骤判断出有雾的结果时,电子设备可以开始执行对初始图像去雾的操作。
图6所示流程相比于图3、图4、图5,基于第一次判断出初始图像无雾的判断结果,增添了进一步的判断,使初始图像是否需要去雾的判断结果更加准确。 该实施例流程改进了图像雾感的检测方案,并准确地判断出图像是否需要去雾。
请一并参照图7,图7为图2a-图2e中任一所述的电子设备的一实施例流程图,该实施例流程图为本发明实施例的电子设备处理初始图像的具体步骤,其可包括:
步骤S710,采集初始图像J。
步骤S711,计算初始图像J的灰度直方图。
步骤S712,是否判断出初始图像有雾。本步骤根据初始图像J的灰度直方图中灰度值分布情况判断是否需要对初始图像执行去雾操作,当根据初始图像J的灰度直方图判断出初始图像有雾时,继续执行步骤S716;当未能根据初始图像J的灰度直方图判断出初始图像有雾时,继续执行步骤S713。其中,判断初始图像是否有雾的方法可以参照前述提及的方法。
步骤S713,计算初始图像J的暗通道图像Jdark
步骤S714,是否判断出初始图像有雾。当判断出初始图像有雾时,继续执行步骤S716;当未判断出初始图像有雾时,继续执行步骤S715。其中,判断初始图像是否有雾的方法可以参照前述步骤S111、以及图3或图4所示的电子设备流程。
步骤S715,无雾。当本步骤判断出无雾的结果时,电子设备无需执行对初始图像去雾的操作。
步骤S716,有雾。当本步骤判断出有雾的结果时,电子设备可以开始执行对初始图像去雾的操作。
图7所示流程相比于图3、图4、图5、图6,增加了根据初始图像的灰度直 方图进行初步判断的步骤,该实施例流程改进了图像雾感的检测方案,并准确地判断出图像是否需要去雾。
请一并参照图8,图8为图2a-图2e中任一所述的电子设备的一实施例流程图,该实施例流程图为本发明实施例的电子设备处理初始图像的具体步骤,其可包括:
步骤S810,采集初始图像J。
步骤S811,计算初始图像J的灰度直方图。
步骤S812,是否判断出初始图像有雾。本步骤根据初始图像J的灰度直方图中灰度值分布情况判断是否需要对初始图像执行去雾操作,当根据初始图像J的灰度直方图判断出初始图像有雾时,继续执行步骤S818;当未能根据初始图像J的灰度直方图判断出初始图像有雾时,继续执行步骤S813。其中,判断初始图像是否有雾的方法可以参照前述提及的方法。
步骤S813,计算初始图像J的暗通道图像J1 dark
步骤S814,是否判断出初始图像有雾。当判断出初始图像有雾时,继续执行步骤S818;当未判断出初始图像有雾时,继续执行步骤S815。其中,判断初始图像是否有雾的方法可以参照前述步骤S111、以及图3或图4所示的电子设备流程。
步骤S815,计算初始图像J的暗通道图像J2 dark
步骤S816,是否判断出初始图像有雾。当判断出初始图像有雾时,继续执行步骤S818;当未判断出初始图像有雾时,继续执行步骤S817。其中,判断初始图像是否有雾的方法可以参照前述步骤S111、以及图3或图4所示的电子设备流程。
步骤S817,无雾。当本步骤判断出无雾的结果时,电子设备无需执行对初始图像去雾的操作。
步骤S818,有雾。当本步骤判断出有雾的结果时,电子设备可以开始执行对初始图像去雾的操作。
图8所示流程相比于图3、图4、图5、图6以及图7,完善了电子设备判断是否需要对初始图像执行去雾操作的步骤,该实施例流程改进了图像雾感的检测方案,并准确地判断出图像是否需要去雾。
需要说明的是,在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述的部分,可以参见其他实施例的相关描述。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和单元并不一定是本发明实施例所必须的。
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本发明实施例装置中的单元可以根据实际需要进行合并、划分和删减。
本发明实施例中单元,可以通过通用集成电路,例如CPU(Central Processing Unit,中央处理器),或通过ASIC(Application Specific Integrated Circuit,专用集成电路)来实现。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (20)

  1. 一种图像的处理方法,其特征在于,包括:
    确定出初始图像的暗通道图像中非天空区域像素的灰度直方图;
    根据所述灰度直方图判断所述初始图像是否需要去雾;
    判断出所述初始图像需要去雾时,对所述初始图像执行去雾操作;或者,判断出所述初始图像不需要去雾时,不对所述初始图像执行去雾操作。
  2. 如权利要求1所述的方法,其特征在于,根据所述灰度直方图判断所述初始图像是否需要去雾包括:
    统计所述灰度直方图中灰度值低于第一灰度阈值的像素的个数;
    确定所述统计的像素的个数与所述暗通道图像中非天空区域图像中像素总量的第一比值;
    当所述第一比值低于所述第一比例阈值时,确认所述初始图像需要去雾;或者,
    当所述第一比值高于所述第一比例阈值时,确认所述初始图像不需要去雾。
  3. 如权利要求1所述的方法,其特征在于,根据所述灰度直方图判断所述初始图像是否需要去雾包括:
    按照预设的选取个数或比例,并按照亮度值从低到高的顺序从所述灰度直方图中选取一个或多个像素;
    从所述选取的一个或多个像素的灰度值中获取最高灰度值;
    当所述最高灰度值高于第二灰度阈值时,确认所述初始图像需要去雾;或 者,
    当所述最高灰度值低于第二灰度阈值时,确认所述初始图像不需要去雾。
  4. 如权利要求1所述的方法,其特征在于,
    确定出初始图像的暗通道图像中非天空区域像素的灰度直方图包括:
    确定出所述初始图像的第一暗通道图像J1 dark(x)中非天空区域像素的第一灰度直方图,所述
    Figure PCTCN2015080836-appb-100001
    其中,所述Jc(y)为所述初始图像的像素值,所述y为像素,所述Ω(x)为选定像素的指定像素邻域,所述{r,g,b}为像素的红色素值、绿色素值、蓝色素值;
    根据所述灰度直方图判断所述初始图像是否需要去雾包括:
    根据所述第一灰度直方图判断所述初始图像是否需要去雾;或者,
    确定出初始图像的暗通道图像中非天空区域像素的灰度直方图包括:
    确定出所述初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图,所述J2 dark(x)为
    Figure PCTCN2015080836-appb-100002
    其中,所述Jc(y)为所述初始图像的像素值,所述y为像素,所述Ω(x)为选定像素的指定像素邻域,所述{r,g,b}为像素的红色素值、绿色素值、蓝色素值,所述Ac为大气光颜色平均值;
    根据所述灰度直方图判断所述初始图像是否需要去雾包括:
    根据所述第二灰度直方图判断所述初始图像是否需要去雾。
  5. 如权利要求4所述的方法,确定出初始图像的暗通道图像中非天空区 域像素的灰度直方图之前,还包括:
    按照预设的选取个数或比例,并按照灰度值从低到高的顺序从所述初始图像中选取一个或多个像素;
    确定出所述选取的一个或多个像素的颜色平均值作为所述Ac;或者,
    平均划分所述初始图像成至少一个区域,所述区域包括n个级别,每个等级均包含m个区域;
    按照从低到高的级别逐步确定出所述m个区域中平均亮度最高的区域;
    确定出所述平均亮度最高的区域中所有像素的颜色平均值作为所述Ac
  6. 如权利要求1所述的方法,其特征在于,所述初始图像为单色bayer类型图像时,
    确定出初始图像的暗通道图像中非天空区域像素的灰度直方图包括:
    确定出所述初始图像的第三暗通道图像J3 dark(x)中非天空区域像素的第三灰度直方图,所述
    Figure PCTCN2015080836-appb-100003
    其中,所述Ω(x)为选定像素的指定像素邻域;
    根据所述灰度直方图判断所述初始图像是否需要去雾包括:
    根据所述第三灰度直方图判断所述初始图像是否需要去雾;或者,
    确定出初始图像的暗通道图像中非天空区域像素的灰度直方图包括:
    确定出所述初始图像的第四暗通道图像J4 dark(x)中非天空区域像素的第四灰度直方图,所述
    Figure PCTCN2015080836-appb-100004
    其中,所述Ω(x)为选定像素的指定像素邻域,所述Ac为大气光颜色平均值;
    根据所述灰度直方图判断所述初始图像是否需要去雾包括:
    根据所述第四灰度直方图判断所述初始图像是否需要去雾。
  7. 如权利要求6所述的方法,其特征在于,
    所述第三暗通道图像J3 dark(x)中,所述Ω(x)范围为Ωp×q(x)时,J3 dark(x)等价于
    Figure PCTCN2015080836-appb-100005
    所述Z为所述Ω(x)的子域;或者
    所述第四暗通道图像J4 dark(x)中,所述Ω(x)范围为Ωp×q(x)时,J4 dark(x)等价于
    Figure PCTCN2015080836-appb-100006
    所述Z为所述Ω(x)的子域。
  8. 如权利要求6所述的方法,其特征在于,
    所述第三暗通道图像
    Figure PCTCN2015080836-appb-100007
    等价于
    Figure PCTCN2015080836-appb-100008
    所述
    Figure PCTCN2015080836-appb-100009
    为所述初始图像的平滑处理数据;
    所述第四暗通道图像J4 dark(x)中,
    Figure PCTCN2015080836-appb-100010
    等价于
    Figure PCTCN2015080836-appb-100011
    所述
    Figure PCTCN2015080836-appb-100012
    为所述初始图像的平滑处理数据。
  9. 如权利要求4所述的方法,其特征在于,
    确定出的初始图像的暗通道图像中非天空区域像素的灰度直方图为所述第一灰度直方图时,
    判断出所述初始图像不需要去雾时,不对所述初始图像执行去雾操作之后,还包括:
    确定出所述初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图;
    根据所述第二灰度直方图判断所述初始图像是否需要去雾;
    判断出所述初始图像需要去雾时,对所述初始图像执行去雾操作;或者,判断出所述初始图像不需要去雾时,不对所述初始图像执行去雾操作。
  10. 如权利要求1所述的方法,其特征在于,确定出初始图像的暗通道图像中非天空区域像素的灰度直方图之前,还包括:
    确定出所述初始图像像素的第五灰度直方图;
    确定出所述第五灰度直方图中灰度值高于第三灰度阈值的像素的个数占所述初始图像中像素总量的第二比值;
    当所述第二比值低于第二比例阈值时,提示电子设备执行所述确定出初始图像的暗通道图像中非天空区域像素的灰度直方图的操作。
  11. 一种电子设备,其特征在于,包括:
    确定单元,用于确定出初始图像的暗通道图像中非天空区域像素的灰度直方图;
    判断单元,用于根据所述灰度直方图判断所述初始图像是否需要去雾;还用于判断出所述初始图像需要去雾时,发送去雾消息给去雾单元;还用于判断出所述初始图像不需要去雾时,不发送所述去雾消息给所述去雾单元;
    去雾单元,用于接收到所述判断单元发送的所述去雾消息后,对所述初始图像执行去雾操作。
  12. 如权利要求11所述的电子设备,其特征在于,所述判断单元包括:
    统计单元,用于统计所述灰度直方图中灰度值低于第一灰度阈值的像素的个数;
    比值确定单元,用于确定所述统计的像素的个数与所述暗通道图像中非天空区域图像中像素总量的第一比值;还用于所述第一比值低于所述第一比例阈值时,确认出所述初始图像需要去雾;还用于所述第一比值高于所述第一比例阈值时,确认出所述初始图像不需要去雾。
  13. 如权利要求11所述的电子设备,其特征在于,所述判断单元包括:
    第一选取单元,用于按照预设的选取个数或比例,并按照亮度值从低到高的顺序从所述灰度直方图中选取一个或多个像素;
    所述第一选取单元,还用于从所述选取的一个或多个像素的灰度值中获取最高灰度值;
    最高灰度值确定单元,当所述最高灰度值高于第二灰度阈值时,用于确认出所述初始图像需要去雾;当所述最高灰度值低于第二灰度阈值时,还用于确认出所述初始图像不需要去雾。
  14. 如权利要求11所述的电子设备,其特征在于,
    所述确定单元,还用于确定出所述初始图像的第一暗通道图像J1 dark(x)中非天空区域像素的第一灰度直方图,所述
    Figure PCTCN2015080836-appb-100013
    其中,所述Jc(y)为所述初始图像的像素值,所述y为像素,所述Ω(x)为选定像素的指定像素邻域,所述{r,g,b}为像素的红色素值、绿色素值、蓝色素值;
    所述判断单元,还用于根据所述第一灰度直方图判断所述初始图像是否需要去雾;或者,
    所述确定单元,还用于确定出所述初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图,所述
    Figure PCTCN2015080836-appb-100014
    Figure PCTCN2015080836-appb-100015
    其中,所述Jc(y)为所述初始图像的像素值,所述y为像素,所述Ω(x)为选定像素的指定像素邻域,所述{r,g,b}为像素的红色素值、绿色素值、蓝色素值,所述Ac为大气光颜色平均值;
    所述判断单元,还用于根据所述第二灰度直方图判断所述初始图像是否需要去雾。
  15. 如权利要求14所述的电子设备,还包括:
    第二选取单元,用于按照预设的选取个数或比例,并按照灰度值从低到高的顺序从所述初始图像中选取一个或多个像素;
    所述确定单元,还用于确定出所述选取的一个或多个像素的颜色平均值作为所述Ac
    划分单元,用于平均划分所述初始图像成至少一个区域,所述区域包括n个级别,每个等级均包含m个区域;
    所述确定单元,还用于按照从低到高的级别逐步确定出所述m个区域中平均亮度最高的区域;
    所述确定单元,还用于确定出所述平均亮度最高的区域中所有像素的颜色平均值作为所述Ac
  16. 如权利要求11所述的电子设备,其特征在于,所述初始图像为单色 bayer类型图像时,
    所述确定单元,还用于确定出所述初始图像的第三暗通道图像J3 dark(x)中非天空区域像素的第三灰度直方图,所述
    Figure PCTCN2015080836-appb-100016
    其中,所述Ω(x)为选定像素的指定像素邻域;
    所述判断单元,还用于根据所述第三灰度直方图判断所述初始图像是否需要去雾;或者,
    所述确定单元,还用于确定出所述初始图像的第四暗通道图像J4 dark(x)中非天空区域像素的第四灰度直方图,所述
    Figure PCTCN2015080836-appb-100017
    其中,所述Ω(x)为选定像素的指定像素邻域,所述Ac为大气光颜色平均值;
    所述判断单元,还用于根据所述第四灰度直方图判断所述初始图像是否需要去雾。
  17. 如权利要求16所述的电子设备,其特征在于,
    所述第三暗通道图像J3 dark(x)中,所述Ω(x)范围为Ωp×q(x)时,J3 dark(x)等价于
    Figure PCTCN2015080836-appb-100018
    所述Z为所述Ω(x)的子域;或者
    所述第四暗通道图像J4 dark(x)中,所述Ω(x)范围为Ωp×q(x)时,J4 dark(x)等价于
    Figure PCTCN2015080836-appb-100019
    所述Z为所述Ω(x)的子域。
  18. 如权利要求16所述的电子设备,其特征在于,
    所述第三暗通道图像
    Figure PCTCN2015080836-appb-100020
    等价于
    Figure PCTCN2015080836-appb-100021
    所述
    Figure PCTCN2015080836-appb-100022
    为所述初始图像的平滑处理数据;
    所述第四暗通道图像J4 dark(x)中,所述Ω(x)范围为Ωp×q(x)时,J4 dark(x)等价于
    Figure PCTCN2015080836-appb-100023
    所述
    Figure PCTCN2015080836-appb-100024
    为所述初始图像的平滑处理数据。
  19. 如权利要求14所述的电子设备,其特征在于,
    所述确定单元确定出的初始图像的暗通道图像中非天空区域像素的灰度直方图为所述第一灰度直方图时,
    所述确定单元,还用于确定出所述初始图像的第二暗通道图像J2 dark(x)中非天空区域像素的第二灰度直方图;
    所述判断单元,还用于根据所述第二灰度直方图判断所述初始图像是否需要去雾;还用于判断出所述初始图像需要去雾时,发送所述去雾消息给所述去雾单元;还用于判断出所述初始图像不需要去雾时,不发送所述去雾消息给所述去雾单元;
    所述去雾单元,还用于接收到所述判断单元发送的所述去雾消息后,对所述初始图像执行去雾操作。
  20. 如权利要求11所述的电子设备,其特征在于,
    所述确定单元,还用于确定出所述初始图像像素的第五灰度直方图;
    所述确定单元,还用于确定出所述第五灰度直方图中灰度值高于第三灰度阈值的像素的个数占所述初始图像中像素总量的第二比值;
    还包括:
    提示单元,当所述确定单元确定出的所述第二比值低于第二比例阈值时,用于提示电子设备执行所述确定出初始图像的暗通道图像中非天空区域像素的灰度直方图的操作。
PCT/CN2015/080836 2014-06-18 2015-06-05 一种图像的处理方法及装置 WO2015192718A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201410272543.9 2014-06-18
CN201410272543.9A CN104123700A (zh) 2014-06-18 2014-06-18 一种电子设备
CN201410272364.5A CN104077750A (zh) 2014-06-18 2014-06-18 一种图像的处理方法
CN201410272364.5 2014-06-18

Publications (1)

Publication Number Publication Date
WO2015192718A1 true WO2015192718A1 (zh) 2015-12-23

Family

ID=54934853

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/080836 WO2015192718A1 (zh) 2014-06-18 2015-06-05 一种图像的处理方法及装置

Country Status (1)

Country Link
WO (1) WO2015192718A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114565519A (zh) * 2022-01-13 2022-05-31 深圳市文立科技有限公司 一种图像透雾方法、装置和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102938136A (zh) * 2012-07-19 2013-02-20 中国人民解放军国防科学技术大学 基于Bayer格式的单幅图像快速去雾方法
US20130071043A1 (en) * 2011-09-08 2013-03-21 Fujitsu Limited Image defogging method and system
CN103049888A (zh) * 2012-12-07 2013-04-17 西安电子科技大学 基于暗原色结合大气散射光的图像/视频去雾方法
CN103279928A (zh) * 2013-05-23 2013-09-04 北京汉邦高科数字技术股份有限公司 一种基于大气散射模型的图像增强方法
CN104077750A (zh) * 2014-06-18 2014-10-01 深圳市金立通信设备有限公司 一种图像的处理方法
CN104123700A (zh) * 2014-06-18 2014-10-29 深圳市金立通信设备有限公司 一种电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130071043A1 (en) * 2011-09-08 2013-03-21 Fujitsu Limited Image defogging method and system
CN102938136A (zh) * 2012-07-19 2013-02-20 中国人民解放军国防科学技术大学 基于Bayer格式的单幅图像快速去雾方法
CN103049888A (zh) * 2012-12-07 2013-04-17 西安电子科技大学 基于暗原色结合大气散射光的图像/视频去雾方法
CN103279928A (zh) * 2013-05-23 2013-09-04 北京汉邦高科数字技术股份有限公司 一种基于大气散射模型的图像增强方法
CN104077750A (zh) * 2014-06-18 2014-10-01 深圳市金立通信设备有限公司 一种图像的处理方法
CN104123700A (zh) * 2014-06-18 2014-10-29 深圳市金立通信设备有限公司 一种电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114565519A (zh) * 2022-01-13 2022-05-31 深圳市文立科技有限公司 一种图像透雾方法、装置和存储介质

Similar Documents

Publication Publication Date Title
US9483835B2 (en) Depth value restoration method and system
CN109410126B (zh) 一种细节增强与亮度自适应的高动态范围图像的色调映射方法
US9710715B2 (en) Image processing system, image processing device, and image processing method
CN104077750A (zh) 一种图像的处理方法
JP4870618B2 (ja) 画像データの自動マッピング方法及び画像処理デバイス
JP4870617B2 (ja) 画像データの自動マッピング方法及び画像処理デバイス
WO2020038124A1 (zh) 图像对比度增强方法、装置、设备及存储介质
EP1435560A2 (en) Method and apparatus for generating user preference data regarding image colour and method and apparatus for converting image colour preference
US10609303B2 (en) Method and apparatus for rapid improvement of smog/low-light-level image using mapping table
CN103208107B (zh) 终端、图像的修复方法和装置
KR101662407B1 (ko) 영상의 비네팅 보정 방법 및 장치
CN111127337B (zh) 图像局部区域高光调整方法、介质、设备及装置
KR102091072B1 (ko) 컨텐츠 제공 장치, 디스플레이 장치 및 그 제어 방법
WO2015192718A1 (zh) 一种图像的处理方法及装置
Xie et al. Quality assessment of tone-mapped images based on sparse representation
TWI668668B (zh) 影像強化方法及電腦系統
CN104123700A (zh) 一种电子设备
CN112995525A (zh) 自行走设备的摄像曝光方法和装置
CN112166598B (zh) 图像处理方法、***、可移动平台和存储介质
KR20180064028A (ko) 영상 처리 방법 및 장치
CN109118441B (zh) 一种低照度图像及视频增强方法、计算机装置及存储介质
KR101774158B1 (ko) 통계학적 벡터 타원에 기반한 영상의 안개 처리 장치 및 방법
CN112819838B (zh) 图像增强方法、电子装置和存储介质
CN114677393A (zh) 深度图像处理方法、装置、摄像设备、会议***及介质
KR101547059B1 (ko) 영상의 안개 제거 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15809705

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15809705

Country of ref document: EP

Kind code of ref document: A1