WO2018176925A1 - Hdr image generation method and apparatus - Google Patents

Hdr image generation method and apparatus Download PDF

Info

Publication number
WO2018176925A1
WO2018176925A1 PCT/CN2017/117106 CN2017117106W WO2018176925A1 WO 2018176925 A1 WO2018176925 A1 WO 2018176925A1 CN 2017117106 W CN2017117106 W CN 2017117106W WO 2018176925 A1 WO2018176925 A1 WO 2018176925A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference image
image
pixel
value
threshold
Prior art date
Application number
PCT/CN2017/117106
Other languages
French (fr)
Chinese (zh)
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018176925A1 publication Critical patent/WO2018176925A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/50Control of the SSIS exposure
    • H04N25/57Control of the dynamic range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Definitions

  • the present invention relates to the field of image processing, and in particular, to a method and apparatus for generating an HDR image.
  • HDR High-Dynamic Range imaging
  • HDR High-Dynamic Range imaging
  • LDR Low-Dynamic Range
  • High dynamic range imaging was originally only used for purely computer generated images. Later, people developed methods for generating HDR from photos of different exposure ranges. As handheld cameras become more popular and smartphones become easier to use, many amateur photographers can easily generate photos of high dynamic range scenes through some mobile applications.
  • HDR High Technology Computer Corp.
  • HTC High Technology Computer Corp.
  • Nokia Samsung and other mobile phone manufacturers.
  • the more traditional method was proposed by Paul Debevec in 1997.
  • the method uses the exposure time of the image to obtain the response function of the camera, and then uses the response function to inversely map the image from the pixel value back to the scene irradiation field, thereby obtaining the pixel.
  • the irradiance proportional to the actual brightness value of the scene
  • weighted average fusion of multiple images over the irradiation domain and finally tone mapping to obtain the final HDR.
  • the effect of these methods often depends on the solution of the camera response function, and the response function is sensitive to the noise of the image. Therefore, in order to obtain an accurate response function, it is necessary to take a plurality of high-quality images with different exposure times, and sample each. The point where the actual brightness is different makes the operation more complicated.
  • the camera's response function may change, and calibration is required at a time. This requires standardization of the user's operation. If the user does not perform the calibration of the response function well, the effect of HDR synthesis will be greatly reduced. . Therefore, if this method of camera response function calibration is adopted, the user experience will be poor, and in addition, the obtained image quality may also be degraded, which is not suitable for a handheld camera application.
  • Another method is to fuse on the image domain.
  • Mertens proposed the exposure fusion method in 2009 to calculate the saturation, contrast and exposure-exposedness of each pixel of multiple images. That is, to describe whether the object display effect is good, combined with these three coefficients, to obtain the weight of each pixel of each picture, and then use this weight to weight multiple pictures, this method only needs to input the image, and does not need Solving the camera response function does not require a final tone mapping.
  • Both the Debevec method and the Mertens method can only deal with static scenes. If there are objects in the scene moving, it will cause ghosts.
  • the motion of the object in the scene is relatively large, then the picture cannot be included in the picture used for the fusion, resulting in only a few pictures being merged, and since the exposure time of the brighter image is longer, the exposure time of the brighter image is longer.
  • the displacement of the moving object in the brighter image is larger than the reference image, so the brighter image in the moving scene is often discarded, the result of the fusion will be darker, the object recognition will decrease, and No enhancements to the detail area of the scene result in the loss of some detail areas.
  • the present invention provides an HDR image generation method and apparatus, which can detect a large motion area in a target scene, and use the detail area to enhance the detail of the first merged HDR image, and generate the target HDR.
  • the image is rich in detail.
  • an HDR image generating method comprising: acquiring a first motion region and a second motion region of a sequence of images; wherein the sequence of images comprises a reference image, a first non-reference image, and a second a non-reference image, wherein the first non-reference image, the reference image, and the second non-reference image sequentially increase an exposure duration of the target scene, the first motion region being the first non-reference image relative to the
  • the reference image has a region where the gray value differs, the second motion region is a region where the second non-reference image has a gray value difference with respect to the reference image; according to the first ratio and the first threshold Comparing the result and a comparison result between the second ratio and the first threshold, determining a target motion region; wherein the first ratio is a ratio of the first motion region in the first non-reference image, The second ratio is a proportion of the second motion area in the second non-reference image, and the target motion area includes at least one connected area
  • the first threshold it is possible to detect a certain area of the motion area in the target scene, and expand the range of the motion area, that is, the present application can allow a large motion area in the scene, and remove the adjusted first The ghost of the HDR image, resulting in a second HDR image without ghosting.
  • the method further includes: determining an edge of the first non-reference image, the edge includes an edge pixel point; determining a location around each pixel point in the first non-reference image Whether the value of the edge pixel is greater than the second threshold; if the value of the edge pixel is greater than the second threshold, the value of the edge pixel around the pixel in the first non-reference image is greater than the second An area formed by all the pixels of the threshold is determined as a detail area of the first non-reference image; based on the detail area, the first non-reference image and the second HDR image are fused to obtain a target HDR image.
  • the edge of the first non-reference image the detail region is acquired to perform detail enhancement on the second HDR image, and the obtained target HDR image is more rich in detail.
  • the determining, according to a comparison result between the first ratio and the first threshold, and a comparison result between the second ratio and the first threshold, determining a target motion region including: when When the first ratio and the second ratio are not greater than the first threshold, the first motion region and the second motion region are superimposed to determine that the superposed region is the target motion region; or Determining that the first ratio is greater than the first threshold, and when the second ratio is greater than the first threshold, determining that the first motion region is a target motion region; or, when the first ratio is greater than the first a threshold, when the second ratio is not greater than the first threshold, determining that the second motion region is a target motion region.
  • the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and each pixel in the first non-reference image. a sum of a product of saturation, contrast, and exposure degree of the dot; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; or The first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight is a saturation, contrast, and sum of each pixel in the reference image.
  • a product of the degree of exposure comprising: calculating, when the first ratio and the second ratio are not greater than the first threshold, each pixel in the first non-reference image and the second non-reference image, respectively Saturation, contrast and degree of exposure of the point, multiplying the saturation, contrast and exposure degree of each pixel in the first non-reference image to obtain a weight of each pixel in the first non-reference image And multiplying saturation, contrast, and exposure degree of each pixel in the second non-reference image to obtain a weight value of each pixel in the second non-reference image, and the first non-reference Adding a weight value of each pixel in the image to a weight value of each pixel in the second non-reference image to obtain the first weight value; or, when the first ratio is not greater than the first a threshold, when the second ratio is greater than the first threshold, calculating a saturation, a contrast, and an exposure degree of each pixel in the first non-reference image, each pixel in the first non-reference image Multip
  • the first threshold is not less than 7.5%.
  • the obtaining, according to the first weight value and the second weight value, the first HDR image comprising: a first weight value of the first pixel point and a second weight point of the second pixel point Weighting the weighted average to obtain a weighted average value as a weight value of the third pixel point, wherein the first pixel point is any one of all pixel points determining the first weight value,
  • the two pixel points are pixel points corresponding to the first pixel point in the reference image; and the first HDR image is obtained according to the obtained weight values of all the third pixel points.
  • the method further includes: Scanning an image in which the target motion region is located, and when there is a pixel point whose pixel value is equal to a third threshold in the image in which the target motion region is located, marking the pixel point whose pixel value is the third threshold value; The area formed by all the marked pixels is the connected area.
  • the determining the reference image according to the comparison result of the sum of the first weight and the second weight comprises: when the sum of the first weights is not less than the sum of the second weights Determining that the reference image is a reference image; and determining that the first non-reference image is a reference image when a sum of the first weights is less than a sum of the second weights.
  • the performing the brightness adjustment process on the first HDR image by using the reference image to obtain the adjusted first HDR image includes: when the sum of the first weights is not less than Calculating a luminance value of the first HDR image and a luminance value of the reference image when using a sum of the second weights, using a difference between a luminance value of the first HDR image and a luminance value of the reference image, Determining, by the first HDR image, a brightness adjustment process to obtain an adjusted first HDR image; or, when the sum of the first weights is less than a sum of the second weights, calculating a brightness value of the first HDR image and a luminance value of the first non-reference image, using a difference between a luminance value of the first HDR image and a luminance value of the first non-reference image, performing dimming processing on the first HDR image to obtain an adjustment The first HDR image.
  • the difference between the brightness value of the first HDR image and the brightness value of the reference image is utilized.
  • performing a brightness adjustment process on the first HDR image to obtain the adjusted first HDR image including: using a brightness value of the reference image as a reference, and comparing a brightness value of the first HDR image with a preset number Performing a multiplication process on the luminance ratio to obtain a first HDR image having the same luminance value as the reference image; and using the first HDR when the sum of the first weights is smaller than the sum of the second weights
  • dimming the first HDR image to obtain the adjusted first HDR image including: the first non-reference image
  • the luminance value is a reference, and the luminance value of the first HDR image is multiplied by a preset second luminance ratio to obtain a first HDR image that
  • the method further includes: The target HDR image is subjected to guided filtering and exposure correction. Thereby, the respective parts of the target HDR image are more clear.
  • the method further includes: determining an edge of the first non-reference image, the edge includes an edge pixel point; determining a location around each pixel point in the first non-reference image Whether the value of the edge pixel is greater than the second threshold; if the value of the edge pixel is greater than the second threshold, the value of the edge pixel around the pixel in the first non-reference image is greater than the second An area formed by all the pixels of the threshold is determined as a detail area of the first non-reference image; when the first ratio and the second ratio are both greater than the first threshold, the detail area and the reference image are The fusion process is performed to obtain a target HDR image.
  • the determining an edge of the first non-reference image includes: performing edge detection on each pixel of the first non-reference image by using a canny operator; As a result, the edge of the first non-reference image is determined.
  • the present invention provides an apparatus for generating an HDR image, the apparatus comprising: an acquiring unit, configured to acquire a first motion area and a second motion area of a sequence of images; wherein the image sequence includes a reference image, a first non-reference image and a second non-reference image, wherein the first non-reference image, the reference image, and the second non-reference image sequentially increase an exposure duration of the target scene, the first motion region being the a region in which the first non-reference image has a difference in gray value with respect to the reference image, the second motion region being a region in which the second non-reference image has a difference in gray value with respect to the reference image; a determining unit, Determining, according to a comparison result between the first ratio and the first threshold, and a comparison result between the second ratio and the first threshold, determining a target motion region; wherein the first ratio is the first non-reference a ratio of the first motion area in the image, the second ratio is a ratio of
  • the first threshold it is possible to detect a certain area of the motion area in the target scene, and expand the range of the motion area, that is, the present application can allow a large motion area in the scene, and remove the adjusted first The ghost of the HDR image, resulting in a second HDR image without ghosting.
  • the determining unit is further configured to: determine an edge of the first non-reference image, the edge includes an edge pixel point; the apparatus further includes: a determining unit; the determining unit, And determining whether the value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold; the determining unit is further configured to: if the edge pixel value is greater than the first value a second threshold, wherein an area formed by all the pixel points of the edge pixel points around the pixel point in the first non-reference image that are greater than the second threshold is determined as the detail area of the first non-reference image; the fusion unit further And configured to perform fusion processing on the first non-reference image and the second HDR image based on the detail region to obtain a target HDR image.
  • the edge of the first non-reference image the detail region is acquired to perform detail enhancement on the second HDR image, and the obtained target HDR image is more rich in detail.
  • the determining unit is specifically configured to: when the first ratio and the second ratio are not greater than the first threshold, the first motion area and the first The two motion regions are superimposed to determine that the superimposed region is the target motion region; or, when the first ratio is not greater than the first threshold, and the second ratio is greater than the first threshold, determining the first The motion area is the target motion area; or, when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, determining that the second motion area is the target motion area.
  • the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and each pixel in the first non-reference image. a sum of a product of saturation, contrast, and exposure degree of the dot; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; or The first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight is a saturation, contrast, and sum of each pixel in the reference image.
  • a product of the degree of exposure comprising: calculating, when the first ratio and the second ratio are not greater than the first threshold, each pixel in the first non-reference image and the second non-reference image, respectively Saturation, contrast and degree of exposure of the point, multiplying the saturation, contrast and exposure degree of each pixel in the first non-reference image to obtain a weight of each pixel in the first non-reference image a value, and multiplying a saturation, a contrast, and an exposure degree of each pixel in the second non-reference image to obtain a weight value of each pixel in the second non-reference image, the first non- Adding a weight value of each pixel in the reference image and a weight value of each pixel in the second non-reference image to obtain the first weight value; or, when the first ratio is not greater than the first a threshold, when the second ratio is greater than the first threshold, calculating saturation, contrast, and exposure level of each pixel in the first non-reference image, each pixel in the first non-reference image
  • the first threshold is not less than 7.5%.
  • the processing unit is specifically configured to weight average the first weight value of the first pixel and the second weight of the second pixel to obtain a weighted average, the weighted average a value as a weight value of a third pixel point, wherein the first pixel point is any one of all pixel points that determine a first weight value, and the second pixel point is the first pixel in the reference image a pixel corresponding to the point; the first HDR image is obtained according to the obtained weight values of all the third pixel points.
  • the device further includes: a scanning unit; the scanning unit is configured to scan an image where the target motion area is located, and a pixel value exists in an image where the target motion area is located When the pixel is equal to the third threshold, the pixel with the pixel value being the third threshold is marked; the determining unit is further configured to determine that the area formed by all the marked pixels is the connected area.
  • the determining unit is specifically configured to: when the sum of the first weights is not less than a sum of the second weights, determine that the reference image is a reference image; when the first weight is The sum is smaller than the sum of the second weights, and the first non-reference image is determined to be a reference image.
  • the processing unit is specifically configured to: when the sum of the first weights is not less than a sum of the second weights, calculate a brightness value of the first HDR image and the reference a brightness value of the image, using a difference between the brightness value of the first HDR image and the brightness value of the reference image, performing brightness adjustment processing on the first HDR image to obtain an adjusted first HDR image; or, when Calculating a luminance value of the first HDR image and a luminance value of the first non-reference image when the sum of the first weights is smaller than a sum of the second weights, using a luminance value of the first HDR image And performing, by the difference of the brightness values of the first non-reference image, performing dimming processing on the first HDR image to obtain an adjusted first HDR image.
  • the difference between the brightness value of the first HDR image and the brightness value of the reference image is utilized.
  • performing a brightness adjustment process on the first HDR image to obtain the adjusted first HDR image including: using a brightness value of the reference image as a reference, and comparing a brightness value of the first HDR image with a preset number Performing a multiplication process on the luminance ratio to obtain a first HDR image having the same luminance value as the reference image; and using the first HDR when the sum of the first weights is smaller than the sum of the second weights
  • dimming the first HDR image to obtain the adjusted first HDR image including: the first non-reference image
  • the luminance value is a reference, and the luminance value of the first HDR image is multiplied by a preset second luminance ratio to obtain a first HDR image that
  • the apparatus further includes: a guiding filtering and an exposure correcting unit; and the guiding filtering and exposure correcting unit, configured to perform guided filtering and exposure correction on the target HDR image.
  • a guiding filtering and an exposure correcting unit configured to perform guided filtering and exposure correction on the target HDR image.
  • the determining unit is further configured to: determine an edge of the first non-reference image, the edge includes an edge pixel; the determining unit is further configured to determine the first non Whether the value of the edge pixel point around each pixel in the reference image is greater than a second threshold; the determining unit is further configured to: if the value of the edge pixel point is greater than a second threshold, An area formed by all the pixels of the edge pixel around the pixel in the non-reference image having a value greater than the second threshold is determined as the detail area of the first non-reference image; the fusion unit is further configured to: when the first When the ratio and the second ratio are both greater than the first threshold, the detail region and the reference image are merged to obtain a target HDR image.
  • the determining unit is specifically configured to: perform edge detection on each pixel of the first non-reference image by using a canny operator; and determine the first according to a result of the edge detection The edge of a non-reference image.
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions for generating the HDR image, which includes a program designed to execute the first aspect.
  • the present invention provides an apparatus for generating an HDR image, the generating apparatus comprising a processor, a memory, and a computer program stored on the memory and operable on the processor, the processor executing the program:
  • the image sequence includes a reference image, a first non-reference image, and a second non-reference image, the first non-reference image, the reference image, and the second non-reference image pair target
  • the exposure duration of the scene is sequentially increased, the first motion region is a region where the first non-reference image has a gray value difference with respect to the reference image, and the second motion region is a region where the second non-reference image has a gray value difference with respect to the reference image.
  • a target motion region Determining a target motion region according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold; wherein the first ratio is occupied by the first motion region in the first non-reference image Ratio, the second ratio is a proportion of the second motion area in the second non-reference image, and the target motion area includes at least one connected area;
  • first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and the second non-reference image
  • first weight value is the product of the saturation, contrast, and exposure degree of each pixel in the first non-reference image
  • first The weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image
  • second weight is a product of saturation, contrast, and exposure degree of each pixel in the reference image
  • the sum of the first weights is a sum of weight values of pixel points of the region overlapping the connected region in the reference image
  • the second weight is And a sum of weight values of pixels of the region overlapping the connected region in the first non-reference image, wherein the weight of the pixel is a product of saturation, contrast, and exposure of the pixel
  • the adjusted first HDR image is fused with the reference image or the first non-reference image based on the connected region to obtain a second HDR image.
  • the processor is further configured to execute:
  • the edge pixel If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold as the details of the first non-reference image region;
  • the first non-reference image and the second HDR image are merged based on the detail region to obtain a target HDR image.
  • determining a target motion area according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold including:
  • the first ratio and the second ratio are not greater than the first threshold, the first motion region and the second motion region are superimposed to determine that the superposed region is the target motion region;
  • the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and saturation and contrast of each pixel in the first non-reference image. And the sum of the products of the exposure degrees; or, the first weight value is a product of the saturation, contrast, and exposure degree of each pixel in the first non-reference image; or, the first weight value is each of the second non-reference images.
  • the product of the saturation, contrast, and exposure of the pixels; the second weight is the product of the saturation, contrast, and exposure of each pixel in the reference image, including:
  • the first threshold is not less than 7.5%.
  • the first HDR image is obtained according to the first weight value and the second weight value, including:
  • Weighting and averaging the first weight value of the first pixel point and the second weight value of the second pixel point to obtain a weighted average value is used as the weight value of the third pixel point
  • the first pixel point is determined to be the first Any one of all the pixel points of the weight value, the second pixel point being a pixel point corresponding to the first pixel point in the reference image;
  • a first HDR image is obtained based on the obtained weight values of all the third pixel points.
  • the method further includes:
  • determining a reference image according to a comparison result of a sum of the first weight and the second weight including:
  • the brightness adjustment process is performed on the first HDR image by using the reference image to obtain the adjusted first HDR image, including:
  • the first HDR image is dimmed to obtain an adjusted first HDR image.
  • the first HDR image is brightened by using a difference between the luminance values of the first HDR image and the luminance values of the reference image. , getting the adjusted first HDR image, including:
  • the first HDR image is dimmed by using a difference between the luminance values of the first HDR image and the luminance values of the first non-reference image to obtain the adjusted first HDR images, including:
  • the luminance value of the first HDR image is multiplied with the preset second luminance ratio based on the luminance value of the first non-reference image to obtain a first HDR image having the same luminance value as the first non-reference image.
  • the method further includes:
  • the processor is further configured to execute:
  • the edge pixel If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold as the details of the first non-reference image region;
  • the detail region and the reference image are merged to obtain a target HDR image.
  • determining an edge of the first non-reference image includes:
  • the edge of the first non-reference image is determined based on the result of the edge detection.
  • FIG. 1 is a flowchart of a method for generating an HDR image according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of obtaining a final connected area according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of obtaining a second HDR image according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of obtaining a target HDR image according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an apparatus for generating an HDR image according to an embodiment of the present disclosure
  • FIG. 6 is another schematic structural diagram of an apparatus for generating an HDR image according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of still another apparatus for generating an HDR image according to an embodiment of the present invention.
  • the application scenario of the present application is in the field of image processing.
  • the method for generating an HDR image provided by the present application can be applied.
  • FIG. 1 is a flowchart of a method for generating an HDR image according to an embodiment of the present invention. As shown in FIG. 1, the HDR image generation method includes the following steps:
  • Step 101 Acquire a first motion area and a second motion area of the image sequence.
  • the image sequence includes a reference image, a first non-reference image, and a second non-reference image.
  • the first non-reference image, the reference image, and the second non-reference image sequentially increase the exposure duration of the target scene, and the first motion region is first.
  • the non-reference image has a region where the gradation value differs from the reference image, and the second motion region is a region where the second non-reference image has a gradation value difference with respect to the reference image.
  • the present application only uses three images as an example for illustration. It can be understood that the number of images may be three or more.
  • the first non-reference image and the second non- The exposure time of the reference image is closest to the reference image, the exposure time of the first non-reference image is smaller than the reference image, and the exposure time of the second non-reference image is greater than the reference image.
  • an image in which three exposure times of the target scene are gradually increased may be taken by the terminal device, wherein the terminal device may be a device having a camera, including However, it is not limited to a camera (such as a digital camera), a video camera, a mobile phone (such as a smart phone), a tablet (Pad), a personal digital assistant (PDA), a portable device (for example, a portable computer), a wearable device, or the like.
  • a camera such as a digital camera
  • a video camera such as a video camera
  • a mobile phone such as a smart phone
  • a tablet Pad
  • PDA personal digital assistant
  • portable device for example, a portable computer
  • wearable device for example, a portable computer
  • the RGB maps of the original first non-reference image, the original reference image, and the original second non-reference image are respectively converted into grayscale images.
  • HM histogram matching
  • the surf feature point detection algorithm is used to obtain the homography matrix of the original original non-reference image, the original reference image and the dimmed original second non-reference image, and respectively use the homography matrix to the original Mapping the first non-reference image, the original reference image, and the original second non-reference image to align the images, eliminating motion caused by camera shake, and obtaining the first non-reference image, the reference image, and the second non-reference image (see FIG. 2 in 201, 202 and 203).
  • Obtaining the first motion area and the second motion area of the image sequence specifically includes:
  • the RGB maps of the first non-reference image, the reference image, and the second non-reference image are respectively converted into grayscale maps (see 204, 205, and 206 in FIG. 2, respectively).
  • HM perform HM
  • HM perform HM on the grayscale image of the first non-reference image with the grayscale image of the reference image as a standard, and brighten the grayscale image of the first non-reference image (see FIG. 2) 207)
  • performing histogram matching on the grayscale image of the second non-reference image and dimming the grayscale image of the second non-reference image (see 208 in FIG. 2).
  • the gray value of the first pixel in the grayscale image of the second non-reference image after dimming is 200
  • the grayscale image of the reference image is The gray value of one pixel is 100
  • the difference between the gray values is 100.
  • the preset threshold is 50
  • the difference between the gray values is greater than the preset threshold. Therefore, the pixel value of the first pixel is 1.
  • the threshold filtering and the etching expansion operation are performed to obtain the second motion region after de-drying, and the pixel value of the pixel value is 1 (see the white area of 210 in FIG. 2, and the pixel value is The pixel of 0 refers to the black area of 210 in Fig. 2, and the obtained second motion area See in 2210.
  • Step 102 Determine a target motion area according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold.
  • the first ratio is a proportion of the first motion area in the first non-reference image
  • the second ratio is a proportion of the second motion area in the second non-reference image
  • the target motion area includes at least one connected area.
  • a connected component generally refers to an image region in the image that has the same pixel value and is adjacent to the foreground pixel.
  • determining the target motion area according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold including:
  • the first ratio and the second ratio are not greater than the first threshold, the first motion area and the second motion area are superimposed to determine that the superimposed area is the target motion area; or
  • the first ratio and the second ratio are not greater than the first threshold. After the first motion region and the second motion region are superimposed, the obtained target motion region is referred to as 211 in 2.
  • the method further includes: targeting the target motion region The image in which the image is located is scanned, and when there is a pixel point whose pixel value is equal to the third threshold in the image in which the target motion region is located, the pixel point whose pixel value is the third threshold value is marked; and all the marked pixel points are determined.
  • the area formed is the connected area.
  • the third threshold is 1, and the area formed by the pixel points having all pixel values of 1 in the target motion area is the connected area.
  • the third threshold is 0, and an area formed by the pixel points of all the pixel values in the target area is determined, and an area of the image in which the target motion area is located, except for the pixel point whose pixel value is 0, The remaining area is the connected area.
  • the first motion area includes two moving areas, such as the head and the foot
  • the head is a connected area
  • the foot is a connected area.
  • the number of connected areas is 0.
  • the number of connected regions is 1.
  • the reference image is used as the guide image, and the connected area is guided filtered (GF), so that the connected area after the GF is closer to the edge of the object in the actual scene.
  • GF that is, the intelligent expansion of the connected area, so that the connected area after the GF is more like a complete area, so that the connected area is appropriately enlarged. If the GF is not performed, since the hand of the person in the scene is moving, the obtained connected area is obtained. At the edge of the hand, that is, the position of the finger will be missing, and using GF to perform the GF on the connected region of the target moving region will cause the connected region to be expanded in the edge region (ie, the finger position), thereby avoiding the finger position.
  • ghosting after the booting and filtering of the connected area, the obtained connected area is referred to as 211 in FIG.
  • the value of the connected region becomes a small value between 0-1, and the connected region before the GF is superimposed with the connected region after the GF, and the value of the pixel value greater than 1 is set to 1, less than 1.
  • the value remains the same, so that the resulting connected region looks more like an entire moving object than a partially moving object, so the transition is more natural, see 211 and 212 in Figure 2, which will guide the connected region before filtering. 211 and the connected region 212 after the guided filtering are superimposed to obtain a final connected region, denoted 213.
  • the fusion processing is performed based on the connected region, the fusion is performed by using the finally obtained connected region, that is, the fusion processing is performed using 213 in FIG. 2 .
  • the first threshold may be set as needed, and the first threshold is not less than 7.5%. Therefore, the present application can detect a certain area of the motion area in the target scene, and expand the range of the motion area, that is, the present application can allow a larger motion area in the scene.
  • Step 103 Obtain a first HDR image according to the first weight value and the second weight value.
  • the first weight value is a sum of a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image.
  • the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; or, the first weight value is saturation of each pixel in the second non-reference image, The product of the contrast and the degree of exposure; the second weight is the product of the saturation, contrast, and exposure level of each pixel in the reference image.
  • the following describes how to calculate the first weight value and the second weight value.
  • the first ratio and the second ratio are not greater than the first threshold, calculating saturation, contrast, and exposure degree of each pixel in the first non-reference image and the second non-reference image, respectively, Multiplying the saturation, contrast, and exposure levels of each pixel in the first non-reference image to obtain a weight value for each pixel in the first non-reference image, and saturating each pixel in the second non-reference image Multiplying the degree, the contrast, and the degree of exposure to obtain a weight value for each pixel in the second non-reference image, the weight value of each pixel in the first non-reference image and each pixel in the second non-reference image
  • the weight values of the points are added to obtain the first weight value; or,
  • the first ratio is not greater than the first threshold and the second ratio is greater than the first threshold, calculating saturation, contrast, and exposure level of each pixel in the first non-reference image, in the first non-reference image Multiplying the saturation, contrast, and exposure level of each pixel to obtain the first weight value; or,
  • obtaining the first HDR image according to the first weight value and the second weight value comprising: weighting and averaging the first weight value of the first pixel point and the second weight value of the second pixel point, a weighted average value as a weight value of a third pixel point, the first pixel point being any one of all pixel points determining a first weight value, the second pixel point being the a pixel point corresponding to the first pixel point in the reference image; and the first HDR image is obtained according to the obtained weight values of all the third pixel points.
  • Step 104 Determine a reference image according to a comparison result of a sum of the first weight and a second weight.
  • the sum of the first weights is a sum of weight values of pixel points of an area overlapping the connected area in the reference image
  • the sum of the second weights is a sum of the first non-reference image
  • the determining the reference image according to the comparison result of the sum of the first weight and the second weight comprises: determining that the sum of the first weights is not less than a sum of the second weights The reference image is a reference image; and when the sum of the first weights is less than the sum of the second weights, determining that the first non-reference image is a reference image.
  • the reference image is determined to be a reference image.
  • Step 105 Perform brightness adjustment processing on the first HDR image by using the reference image to obtain an adjusted first HDR image.
  • performing brightness adjustment processing on the first HDR image by using the reference image to obtain an adjusted first HDR image includes:
  • the first Performing a brightness adjustment process on the HDR image to obtain the adjusted first HDR image comprising: multiplying a brightness value of the first HDR image by a preset first brightness ratio based on a brightness value of the reference image Processing to obtain a first HDR image having the same brightness value as the reference image;
  • the first HDR Performing a dimming process on the image to obtain the adjusted first HDR image, including: performing, by using a luminance value of the first non-reference image, a luminance value of the first HDR image and a preset second luminance ratio
  • the multiplication processing obtains a first HDR image that is the same as the luminance value of the first non-reference image.
  • the resulting adjusted first HDR image is referenced to 301 in FIG. Since the first HDR image has ghosts, the first HDR image is de-ghosted. In the following step 106, how to remove the ghost of the first HDR image will be described in detail.
  • Step 106 fused the adjusted first HDR image with the reference image or the first non-reference image based on the connected area to obtain a second HDR image.
  • the fusion processing is a Laplacian pyramid fusion, and when the Laplacian pyramid fusion is performed, the adjusted first HDR image is merged with the reference image or the first non-reference image, and the two images are respectively set.
  • the fusion result is c, then some of the c must be taken from a, this part is definitely no information of b, the same, the part taken from b, there will be no information of a Then, how to distinguish which information is taken from a, and which information is taken from b.
  • the connected area is to distinguish which information is taken from a and which information is taken from b.
  • the connected area is only a black and white image, and white represents The adjusted first HDR image is taken, and the black color is taken from the reference image or the first non-reference image, so in a Laplacian pyramid fusion, strictly speaking, three images are required, and two source images (final synthesis)
  • the second HDR image consists of the pixels in the two images) and a mask image indicating how to take the point.
  • the connected region is the mask image (non-black or white, non-zero or 1).
  • the connected area here refers specifically to the final connected area, see 213 in FIG. Thereby, ghosts of the adjusted first HDR image are removed.
  • the method further includes:
  • Step 107 Determine an edge of the first non-reference image, the edge includes an edge pixel point, and determine whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold is determined as the first a detail region of the non-reference image; based on the detail region, the first non-reference image and the second HDR image are merged to obtain a target HDR image. Thereby, the second HDR image is enhanced in detail, and the obtained target HDR image is more detailed.
  • an edge refers to a collection of those pixels whose pixel gradation changes abruptly, which is the most basic feature of an image.
  • the pixels in the edge are customized as edge pixels. If the value of the edge pixel of one pixel is greater than the second threshold, the pixel is rich in detail. In this case, the second threshold may be set according to actual needs.
  • the fusion processing here may also be a Laplacian pyramid fusion process.
  • the role of the detail area is the same as that of the connected area mentioned in step 106, and is used as a mask image.
  • the detail area is used here to indicate which information is taken from the first non-reference image and which information is taken from the second HDR image, and details will not be described again.
  • Determining an edge of the first non-reference image comprising: performing edge detection on each pixel of the first non-reference image by using a canny operator; determining the first non-reference image according to a result of the edge detection the edge of.
  • the method further includes:
  • Step 108 performing guided filtering and exposure correction on the target HDR image.
  • the guiding filtering is to denoise the second fused image, and the purpose of the exposure correction is brightness adjustment.
  • the detail area is referred to as 401 in FIG. 4, and the obtained target HDR image is referred to as 402 in FIG. 4.
  • the image obtained after the guide filtering and exposure correction of the target HDR image is referred to as 403 in FIG.
  • the method for generating the HDR image further includes:
  • Step 109 determining an edge of the first non-reference image, the edge including an edge pixel point
  • determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold is determined as the first non- The detail area of the reference image
  • the detail region and the reference image are merged to obtain a target HDR image.
  • 201, 202, 203 in FIG. 2, 202, 301, and 302 in FIG. 3, and 201, 401, 402, and 403 in FIG. 4 are all RGB images, but in order to meet the requirements of the drawings of the specification, It is shown in Figures 2, 3 and 4 as a grayscale image.
  • the method for generating an HDR image may acquire a motion region of each non-reference image when generating an HDR image, and may use multiple motion regions to display a scene when describing a non-motion scene.
  • the motion of the object in the object can even synthesize the HDR time-frequency.
  • FIG. 5 is a schematic structural diagram of an apparatus for generating an HDR image according to an embodiment of the present invention, for performing the method described in FIG. 1.
  • the HDR image generating apparatus 500 includes: an obtaining unit 510, a determining unit 520, and processing. Unit 530, fusion unit 540.
  • the acquiring unit 510 is configured to acquire a first motion area and a second motion area of the image sequence, where the image sequence includes a reference image, a first non-reference image, and a second non-reference image, the first non-reference image, The exposure time of the reference image and the second non-reference image to the target scene are sequentially incremented, and the first motion area is an area where the first non-reference image has a gray value difference with respect to the reference image, The second motion region is a region where the second non-reference image has a difference in gray value with respect to the reference image.
  • a determining unit 520 configured to determine a target motion region according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold; wherein the first ratio is the a ratio of the first motion area in the first non-reference image, the second ratio is a ratio of the second motion area in the second non-reference image, the target motion area including at least one Connected area.
  • the processing unit 530 is configured to obtain, according to the first weight value and the second weight value, a first HDR image, where the first weight value is a saturation, a contrast, and a saturation of each pixel in the first non-reference image. a product of the degree of exposure; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; or, the first weight value is the first a sum of a product of saturation, contrast, and exposure degree of each pixel in the non-reference image and a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; the second weight value The product of the saturation, contrast, and exposure level of each pixel in the reference image.
  • the determining unit 520 is further configured to: determine, according to a comparison result of the sum of the first weight and the second weight, the sum of the first weights is an area of the reference image that overlaps with the connected area a sum of the weight values of the pixels, the sum of the second weights being a sum of weight values of pixel points of the region of the first non-reference image overlapping with the connected region, wherein the weight of the pixel
  • the value is the product of the saturation, contrast, and exposure level of the pixel.
  • the processing unit 530 is further configured to perform brightness adjustment processing on the first HDR image by using the reference image to obtain an adjusted first HDR image.
  • the merging unit 540 is configured to fuse the adjusted first HDR image with the reference image or the first non-reference image based on the connected area to obtain a second HDR image.
  • the determining unit 520 is further configured to determine an edge of the first non-reference image, where the edge includes an edge pixel point;
  • FIG. 6 is another schematic structural diagram of an HDR image generating apparatus according to an embodiment of the present invention. As shown in FIG. 6, the HDR image generating apparatus 600 further includes a determining unit 610.
  • the determining unit 610 is configured to determine whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold.
  • the determining unit 520 is further configured to: if the value of the edge pixel point is greater than the second threshold, the value of the edge pixel point around the pixel point in the first non-reference image is greater than all pixels of the second threshold The area formed by the dots is determined as the detail area of the first non-reference image.
  • the merging unit 540 is further configured to perform fusion processing on the first non-reference image and the second HDR image based on the detail region to obtain a target HDR image.
  • the determining unit 520 is specifically configured to: when the first ratio and the second ratio are not greater than the first threshold, superimpose the first motion region and the second motion region to determine The superimposed area is the target motion area; or,
  • the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and saturation and contrast of each pixel in the first non-reference image. And a sum of products of exposure degrees; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight value is a product of saturation, contrast, and exposure degree of each pixel in the reference image, including :
  • the first threshold is not less than 7.5%.
  • processing unit 530 is specifically configured to:
  • the device further includes: a scanning unit 620.
  • the scanning unit 620 is configured to scan an image where the target motion area is located, and when there is a pixel point whose pixel value is equal to a third threshold in the image where the target motion area is located, the pixel value is the third value.
  • the pixel points of the threshold are marked.
  • the determining unit 520 is further configured to determine that an area formed by all the marked pixels is the connected area.
  • determining unit 520 is specifically configured to:
  • the reference image is a reference image when a sum of the first weights is not less than a sum of the second weights
  • processing unit 530 is specifically configured to:
  • the first Performing a brightness adjustment process on the HDR image to obtain the adjusted first HDR image comprising: multiplying a brightness value of the first HDR image by a preset first brightness ratio based on a brightness value of the reference image Processing, obtaining a first HDR image that is the same as the luminance value of the reference image.
  • the first HDR Performing a dimming process on the image to obtain the adjusted first HDR image, including: performing, by using a luminance value of the first non-reference image, a luminance value of the first HDR image and a preset second luminance ratio
  • the multiplication processing obtains a first HDR image that is the same as the luminance value of the first non-reference image.
  • the apparatus further includes: a guide filtering and exposure correction unit 630.
  • the guiding filtering and exposure correction unit 630 is configured to perform guided filtering and exposure correction on the target HDR image.
  • the determining unit 520 is further configured to determine an edge of the first non-reference image, where the edge includes an edge pixel point.
  • the determining unit 610 is further configured to determine whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold.
  • the determining unit 520 is further configured to: if the value of the edge pixel point is greater than the second threshold, the value of the edge pixel point around the pixel point in the first non-reference image is greater than all pixels of the second threshold The area formed by the dots is determined as the detail area of the first non-reference image.
  • the merging unit 540 is further configured to: when the first ratio and the second ratio are both greater than the first threshold, perform fusion processing on the detail region and the reference image to obtain a target HDR image.
  • the determining unit 520 is specifically configured to: perform edge detection on each pixel of the first non-reference image by using a canny operator; and determine, according to a result of the edge detection, the first non-reference image. edge.
  • FIG. 7 is still another schematic structural diagram of an apparatus for generating an HDR image according to an embodiment of the present invention, where the apparatus is used to perform the method illustrated in FIG. 1.
  • the system 700 includes a processor 710, a memory 720, a display 730, a receiver 740, a communication interface 750, and a system bus 760; the processor 710, the memory 720, the display 730, the receiver 740, and a communication interface.
  • the 750 establishes a connection through the system bus, one or more programs will be stored in the memory 730 and configured to be executed by the processor 710, and the one or more programs include all instructions in the method of generating the HDR image.
  • the processor 710 can be a central processing unit (English: central processing unit, abbreviation: CPU).
  • the memory 720 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviation: RAM); the memory may also include a non-volatile memory (English: non-volatile memory) , for example, read-only memory (English: read-only memory, abbreviation: ROM), flash memory, hard disk (English: hard disk drive, abbreviation: HDD) or solid state drive (English: solid state drive, abbreviation: SSD); memory 720 may also include a combination of the above types of memory.
  • An exemplary storage medium is coupled to processor 710 to enable processor 710 to read information from, and to write information to, the storage medium.
  • the storage medium can also be an integral part of the processor 710.
  • the processor 710 and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a core network interface device.
  • the processor 710 and the storage medium may also exist as discrete components in the core network interface device.
  • the functions described herein can be implemented in hardware, software, firmware, or any combination thereof.
  • the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium.
  • Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a general purpose or special purpose computer.

Abstract

The present application relates to an HDR image generation method and apparatus. The method comprises: acquiring a first motion region and a second motion region of an image sequence; determining, according to a comparison result of a first ratio and a first threshold value and a comparison result of a second ratio and the first threshold value, a target motion region; obtaining, according to first weight values and second weight values, a first HDR image; determining, according to a comparison result of the sum of the first weight values and the sum of the second weight values, a reference image; performing brightness adjustment processing on the first HDR image by means of the reference image to obtain an adjusted first HDR image; and based on a connected region, fusing the adjusted first HDR image with the reference image or a first non-reference image to obtain a second HDR image. Thus, a motion region, of a certain area, in a target scene can be detected, thereby extending the scope of the motion region, namely, a relatively large motion region may be allowed to exist in the scene. Moreover, a ghost image of the adjusted first HDR image is removed, thereby obtaining the second HDR image without the ghost image.

Description

HDR图像的生成方法及装置HDR image generation method and device 技术领域Technical field
本发明涉及图像处理领域,尤其涉及HDR图像的生成方法及装置。The present invention relates to the field of image processing, and in particular, to a method and apparatus for generating an HDR image.
背景技术Background technique
高动态范围(High-Dynamic Range,HDR)成像(HDR Image,HDRI)技术,在计算机图形学与电影摄影术中,是用来实现比普通数位图像技术更大曝光动态范围(即更大的明暗差别)的一组技术。HDR的目的是正确地表示真实世界中从太阳光直射到较暗的阴影这样大的范围亮度。相比普通数位图像,HDR可以提供更多的动态范围和图像细节,根据不同的曝光时间的低动态范围(Low-Dynamic Range,LDR)图像,利用每个曝光时间相对应最佳细节的LDR图像来合成最终HDR图像,能够更好的反映人真实环境中的视觉效果。High-Dynamic Range (HDR) imaging (HDRI) technology, used in computer graphics and cinematography, to achieve greater exposure dynamic range than normal digital image technology (ie, greater brightness and darkness) A set of techniques for difference). The purpose of HDR is to correctly represent the large range of brightness in the real world from direct sunlight to darker shadows. Compared to normal digital images, HDR provides more dynamic range and image detail. Llow images with the best detail for each exposure time are based on Low-Dynamic Range (LDR) images with different exposure times. To synthesize the final HDR image, it can better reflect the visual effect in the real environment of people.
高动态范围成像最初只用于纯粹由计算机生成的图像。后来,人们开发出了一些从不同曝光范围照片中生成HDR的方法。随着手持相机的日渐流行以及智能手机变得易于使用,使得许多业余摄影师能够通过一些手机应用简单地生成高动态范围场景的照片。High dynamic range imaging was originally only used for purely computer generated images. Later, people developed methods for generating HDR from photos of different exposure ranges. As handheld cameras become more popular and smartphones become easier to use, many amateur photographers can easily generate photos of high dynamic range scenes through some mobile applications.
国内外许多手机算法设计者都已经对HDR的技术进行了一些研究,包括谷歌(Google)、苹果、宏达国际电子股份有限公司(High Technology Computer Corporat ion,HTC)、诺基亚等手机厂商也都已经将他们的技术应用到实际去,在他们的相机应用中内置了HDR算法。比较传统的方法是由Paul Debevec在1997年提出的,该方法利用图像的曝光时间,获得相机的响应函数,然后利用响应函数,将图像从像素值反映射回场景辐照域,从而获得像素的辐照度(正比于场景的实际亮度值),然后在辐照域上对多幅图像进行加权平均融合,最后进行色调映射从而得到最终的HDR。但是这些方法的效果往往依赖于对相机响应函数的求解,而响应函数对图像的噪声比较敏感,因此为了能够得到精确的响应函数,需要拍摄出多幅不同曝光时间的高质量图像,并采样各种实际亮度不同的点,导致操作会比较复杂。此外,随着相机的损耗,相机的响应函数可能会发生改变,需要定时进行标定,这就需要标准化用户的操作,如果用户不能很好的进行响应函数的标定,那么HDR合成的效果会大打折扣。因此如果采用这种相机响应函数标定的方法,会使得用户体验较差,此外,得到的图像质量可能也会下降,不适合用于手持相机应用。Many mobile phone algorithm designers at home and abroad have already done some research on HDR technology, including Google, Apple, High Technology Computer Corp. (HTC), Nokia and other mobile phone manufacturers. Apply their technology to the real world and have built-in HDR algorithms in their camera applications. The more traditional method was proposed by Paul Debevec in 1997. The method uses the exposure time of the image to obtain the response function of the camera, and then uses the response function to inversely map the image from the pixel value back to the scene irradiation field, thereby obtaining the pixel. The irradiance (proportional to the actual brightness value of the scene), then weighted average fusion of multiple images over the irradiation domain, and finally tone mapping to obtain the final HDR. However, the effect of these methods often depends on the solution of the camera response function, and the response function is sensitive to the noise of the image. Therefore, in order to obtain an accurate response function, it is necessary to take a plurality of high-quality images with different exposure times, and sample each. The point where the actual brightness is different makes the operation more complicated. In addition, with the loss of the camera, the camera's response function may change, and calibration is required at a time. This requires standardization of the user's operation. If the user does not perform the calibration of the response function well, the effect of HDR synthesis will be greatly reduced. . Therefore, if this method of camera response function calibration is adopted, the user experience will be poor, and in addition, the obtained image quality may also be degraded, which is not suitable for a handheld camera application.
还有一种方法是在图像域上进行融合,是由Mertens在2009年提出曝光融合(exposure fusion)方法,该方法是计算多张图像每个像素的饱和度、对比度和曝光程度(well-exposedness),即描述物体显示效果是否良好,结合这三种系数,得出每张图的每个像素的权重,然后利用这个权重对多张图片进行加权,这个方法只需要输入图像即可,并不需要求解相机响应函数,也不需要进行最终的色调映射。不管是Debevec的方法还是Mertens的方法,都只能对静态的场景进行处理,如果场景中有物体在运动,则会造成鬼影。Another method is to fuse on the image domain. Mertens proposed the exposure fusion method in 2009 to calculate the saturation, contrast and exposure-exposedness of each pixel of multiple images. That is, to describe whether the object display effect is good, combined with these three coefficients, to obtain the weight of each pixel of each picture, and then use this weight to weight multiple pictures, this method only needs to input the image, and does not need Solving the camera response function does not require a final tone mapping. Both the Debevec method and the Mertens method can only deal with static scenes. If there are objects in the scene moving, it will cause ghosts.
现有技术中,为了实现对动态的场景进行处理,以多张LDR图像作为输入,首先对图像进行对齐,在红、绿、蓝(Red、Green、Blue,RGB)通道上和亮度通道上分别利用直 方图匹配将所有非参考图像的色调都变得和参考图像相似,然后在亮度通道上将非参考图像与参考图像做差,得到场景的运动区域,如果运动区域比较大,会将该图片舍弃,接着将运动区域对应的参考图像像素贴到未舍弃的非参考图像上,再利用Mertens方法对进行过色调映射的图进行曝光融合。In the prior art, in order to implement dynamic scene processing, multiple LDR images are used as input, and the images are first aligned, respectively, on red, green, blue (Red, Green, Blue, RGB) channels and luminance channels. Histogram matching is used to make the hue of all non-reference images similar to the reference image, and then the non-reference image is compared with the reference image on the luma channel to obtain the motion region of the scene. If the motion region is relatively large, the image will be After discarding, the reference image pixels corresponding to the motion region are pasted onto the non-rejected non-reference image, and the image subjected to the tone mapping is subjected to exposure fusion using the Mertens method.
但是如果场景中物体的运动比较大,那么就无法将该图片包括到融合所用的图片中,导致只能用少数图片进行融合,而由于较亮图像的曝光时间比较长,较亮图像的曝光时长大于参考图像,运动物体在较亮图像中的位移相对参考图像较大,因此运动场景中的较亮图像往往会被抛弃,那么融合的结果就会偏暗,物体辨识度会下降,此外,由于没有对场景的细节区域进行增强,会导致一些细节区域的丢失。However, if the motion of the object in the scene is relatively large, then the picture cannot be included in the picture used for the fusion, resulting in only a few pictures being merged, and since the exposure time of the brighter image is longer, the exposure time of the brighter image is longer. Larger than the reference image, the displacement of the moving object in the brighter image is larger than the reference image, so the brighter image in the moving scene is often discarded, the result of the fusion will be darker, the object recognition will decrease, and No enhancements to the detail area of the scene result in the loss of some detail areas.
发明内容Summary of the invention
针对上述技术问题,本发明提供了一种HDR图像生成方法及装置,可以对目标场景中较大的运动区域进行检测,并利用细节区域对初次融合后的HDR图像进行细节增强,生成的目标HDR图像细节丰富。In view of the above technical problem, the present invention provides an HDR image generation method and apparatus, which can detect a large motion area in a target scene, and use the detail area to enhance the detail of the first merged HDR image, and generate the target HDR. The image is rich in detail.
第一方面,提供了一种HDR图像生成方法,所述方法包括:获取图像序列的第一运动区域和第二运动区域;其中,所述图像序列包括参考图像、第一非参考图像和第二非参考图像,所述第一非参考图像、所述参考图像和所述第二非参考图像对目标场景的曝光时长依次递增,所述第一运动区域为所述第一非参考图像相对于所述参考图像存在灰度值差异的区域,所述第二运动区域为所述第二非参考图像相对于所述参考图像存在灰度值差异的区域;根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域;其中,所述第一比例为所述第一非参考图像中所述第一运动区域所占的比例,所述第二比例为所述第二非参考图像中所述第二运动区域所占的比例,所述目标运动区域包括至少一个连通区域;根据第一权重值和第二权重值,得到第一HDR图像;其中,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;根据第一权重之和与第二权重之和的比较结果,确定参照图像,其中,所述第一权重之和为所述参考图像中与所述连通区域重叠的区域的像素点的权重值之和,所述第二权重之和为所述第一非参考图像中与所述连通区域重叠的区域的像素点的权重值之和,其中,所述像素点的权重值为所述像素点的饱和度、对比度和曝光程度的乘积;利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像;基于所述连通区域,将所述调节后的第一HDR图像与所述参考图像或所述第一非参考图像进行融合处理,得到第二HDR图像。由此,通过第一阈值的设置,可以检测目标场景中一定面积的运动区域,扩大了运动区域的范围,即本申请可以允许场景中存在较大的运动区域,并去除了调节后的第一HDR图像的鬼影,得到没有鬼影的第二HDR图像。In a first aspect, an HDR image generating method is provided, the method comprising: acquiring a first motion region and a second motion region of a sequence of images; wherein the sequence of images comprises a reference image, a first non-reference image, and a second a non-reference image, wherein the first non-reference image, the reference image, and the second non-reference image sequentially increase an exposure duration of the target scene, the first motion region being the first non-reference image relative to the The reference image has a region where the gray value differs, the second motion region is a region where the second non-reference image has a gray value difference with respect to the reference image; according to the first ratio and the first threshold Comparing the result and a comparison result between the second ratio and the first threshold, determining a target motion region; wherein the first ratio is a ratio of the first motion region in the first non-reference image, The second ratio is a proportion of the second motion area in the second non-reference image, and the target motion area includes at least one connected area; according to the first weight And a second weight value, the first HDR image is obtained; wherein the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and the first non-reference a sum of a product of saturation, contrast, and exposure degree of each pixel in the image; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image Or the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight is a value of each pixel in the reference image. a product of saturation, contrast, and exposure degree; determining a reference image according to a comparison result of a sum of the first weight and a second weight, wherein a sum of the first weights is the connected region and the connected region a sum of weight values of pixel points of the overlapped region, the sum of the second weights being a sum of weight values of pixel points of a region of the first non-reference image overlapping with the connected region, wherein the pixel a weight value of a point is a product of saturation, contrast, and exposure degree of the pixel; performing brightness adjustment processing on the first HDR image using the reference image to obtain an adjusted first HDR image; And merging the adjusted first HDR image with the reference image or the first non-reference image to obtain a second HDR image. Therefore, by setting the first threshold, it is possible to detect a certain area of the motion area in the target scene, and expand the range of the motion area, that is, the present application can allow a large motion area in the scene, and remove the adjusted first The ghost of the HDR image, resulting in a second HDR image without ghosting.
在一种可能的实现方式中,所述方法还包括:确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个 数值是否大于第二阈值;如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;基于所述细节区域,将所述第一非参考图像与所述第二HDR图像进行融合处理,得到目标HDR图像。由此,通过确定所述第一非参考图像的边缘,获取到细节区域,以对第二HDR图像进行细节增强,得到的目标HDR图像细节更丰富。In a possible implementation manner, the method further includes: determining an edge of the first non-reference image, the edge includes an edge pixel point; determining a location around each pixel point in the first non-reference image Whether the value of the edge pixel is greater than the second threshold; if the value of the edge pixel is greater than the second threshold, the value of the edge pixel around the pixel in the first non-reference image is greater than the second An area formed by all the pixels of the threshold is determined as a detail area of the first non-reference image; based on the detail area, the first non-reference image and the second HDR image are fused to obtain a target HDR image. Thus, by determining the edge of the first non-reference image, the detail region is acquired to perform detail enhancement on the second HDR image, and the obtained target HDR image is more rich in detail.
在一种可能的实现方式中,所述根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域,包括:当所述第一比例和所述第二比例都不大于所述第一阈值时,将所述第一运动区域和所述第二运动区域进行叠加,确定叠加后的区域为目标运动区域;或者,当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,确定所述第一运动区域为目标运动区域;或者,当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,确定所述第二运动区域为目标运动区域。In a possible implementation manner, the determining, according to a comparison result between the first ratio and the first threshold, and a comparison result between the second ratio and the first threshold, determining a target motion region, including: when When the first ratio and the second ratio are not greater than the first threshold, the first motion region and the second motion region are superimposed to determine that the superposed region is the target motion region; or Determining that the first ratio is greater than the first threshold, and when the second ratio is greater than the first threshold, determining that the first motion region is a target motion region; or, when the first ratio is greater than the first a threshold, when the second ratio is not greater than the first threshold, determining that the second motion region is a target motion region.
在一种可能的实现方式中,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积,包括:当所述第一比例和所述第二比例都不大于所述第一阈值时,分别计算所述第一非参考图像和所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一非参考图像中每个像素点的权重值,以及将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第二非参考图像中每个像素点的权重值,将所述第一非参考图像中每个像素点的权重值和所述第二非参考图像中每个像素点的权重值相加,得到所述第一权重值;或者,当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,计算所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值;或者,当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,计算所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值。In a possible implementation manner, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and each pixel in the first non-reference image. a sum of a product of saturation, contrast, and exposure degree of the dot; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; or The first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight is a saturation, contrast, and sum of each pixel in the reference image. a product of the degree of exposure, comprising: calculating, when the first ratio and the second ratio are not greater than the first threshold, each pixel in the first non-reference image and the second non-reference image, respectively Saturation, contrast and degree of exposure of the point, multiplying the saturation, contrast and exposure degree of each pixel in the first non-reference image to obtain a weight of each pixel in the first non-reference image And multiplying saturation, contrast, and exposure degree of each pixel in the second non-reference image to obtain a weight value of each pixel in the second non-reference image, and the first non-reference Adding a weight value of each pixel in the image to a weight value of each pixel in the second non-reference image to obtain the first weight value; or, when the first ratio is not greater than the first a threshold, when the second ratio is greater than the first threshold, calculating a saturation, a contrast, and an exposure degree of each pixel in the first non-reference image, each pixel in the first non-reference image Multiplying the saturation, contrast, and exposure levels to obtain the first weight value; or, when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, the calculation Saturation, contrast, and exposure degree of each pixel in the second non-reference image, multiplying saturation, contrast, and exposure degree of each pixel in the second non-reference image to obtain the first weight value.
在一种可能的实现方式中,所述第一阈值不小于7.5%。In a possible implementation manner, the first threshold is not less than 7.5%.
在一种可能的实现方式中,所述根据所述第一权重值和第二权重值,得到第一HDR图像,包括:将第一像素点的第一权重值和第二像素点的第二权重值加权平均,得到一个加权平均值,所述加权平均值作为第三像素点的权重值,所述第一像素点为确定了第一权重值的所有像素点中的任一个,所述第二像素点为所述参考图像中与所述第一像素点对应的像素点;根据获得的所有所述第三像素点的权重值,得到所述第一HDR图像。In a possible implementation manner, the obtaining, according to the first weight value and the second weight value, the first HDR image, comprising: a first weight value of the first pixel point and a second weight point of the second pixel point Weighting the weighted average to obtain a weighted average value as a weight value of the third pixel point, wherein the first pixel point is any one of all pixel points determining the first weight value, The two pixel points are pixel points corresponding to the first pixel point in the reference image; and the first HDR image is obtained according to the obtained weight values of all the third pixel points.
在一种可能的实现方式中,根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域之后,所述方法还包括:对所述目标运动区域所在的图像进行扫描,当所述目标运动区域所在的图像中存在像素值等于第三阈值的像素点时,对所述像素值为第三阈值的像素点进行标记;确定标记过的所有像素点所构 成的区域为所述连通区域。In a possible implementation, after determining the target motion area according to the comparison result between the first ratio and the first threshold and the comparison result between the second ratio and the first threshold, the method further includes: Scanning an image in which the target motion region is located, and when there is a pixel point whose pixel value is equal to a third threshold in the image in which the target motion region is located, marking the pixel point whose pixel value is the third threshold value; The area formed by all the marked pixels is the connected area.
在一种可能的实现方式中,所述根据第一权重之和与第二权重之和的比较结果,确定参照图像,包括:当所述第一权重之和不小于所述第二权重之和,确定所述参考图像为参照图像;当所述第一权重之和小于所述第二权重之和,确定所述第一非参考图像为参照图像。In a possible implementation, the determining the reference image according to the comparison result of the sum of the first weight and the second weight comprises: when the sum of the first weights is not less than the sum of the second weights Determining that the reference image is a reference image; and determining that the first non-reference image is a reference image when a sum of the first weights is less than a sum of the second weights.
在一种可能的实现方式中,所述利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像,包括:当所述第一权重之和不小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述参考图像的亮度值,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像;或者,当所述第一权重之和小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述第一非参考图像的亮度值,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像。In a possible implementation, the performing the brightness adjustment process on the first HDR image by using the reference image to obtain the adjusted first HDR image includes: when the sum of the first weights is not less than Calculating a luminance value of the first HDR image and a luminance value of the reference image when using a sum of the second weights, using a difference between a luminance value of the first HDR image and a luminance value of the reference image, Determining, by the first HDR image, a brightness adjustment process to obtain an adjusted first HDR image; or, when the sum of the first weights is less than a sum of the second weights, calculating a brightness value of the first HDR image and a luminance value of the first non-reference image, using a difference between a luminance value of the first HDR image and a luminance value of the first non-reference image, performing dimming processing on the first HDR image to obtain an adjustment The first HDR image.
在一种可能的实现方式中,所述当所述第一权重之和不小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像,包括:以所述参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第一亮度比例进行相乘处理,得到与所述参考图像的亮度值相同的第一HDR图像;所述当所述第一权重之和小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像,包括:以所述第一非参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第二亮度比例进行相乘处理,得到与所述第一非参考图像的亮度值相同的第一HDR图像。In a possible implementation, when the sum of the first weights is not less than the sum of the second weights, the difference between the brightness value of the first HDR image and the brightness value of the reference image is utilized. And performing a brightness adjustment process on the first HDR image to obtain the adjusted first HDR image, including: using a brightness value of the reference image as a reference, and comparing a brightness value of the first HDR image with a preset number Performing a multiplication process on the luminance ratio to obtain a first HDR image having the same luminance value as the reference image; and using the first HDR when the sum of the first weights is smaller than the sum of the second weights And performing, by the difference between the brightness value of the image and the brightness value of the first non-reference image, dimming the first HDR image to obtain the adjusted first HDR image, including: the first non-reference image The luminance value is a reference, and the luminance value of the first HDR image is multiplied by a preset second luminance ratio to obtain a first HDR image that is the same as the luminance value of the first non-reference image.
在一种可能的实现方式中,在基于所述细节区域,将所述第一非参考图像与所述第二HDR图像进行融合处理,得到目标HDR图像之后,所述方法还包括:对所述目标HDR图像进行引导滤波和曝光矫正。由此,目标HDR图像的各个部分更加清晰。In a possible implementation, after the first non-reference image is merged with the second HDR image based on the detail region to obtain a target HDR image, the method further includes: The target HDR image is subjected to guided filtering and exposure correction. Thereby, the respective parts of the target HDR image are more clear.
在一种可能的实现方式中,所述方法还包括:确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;当所述第一比例和所述第二比例都大于所述第一阈值时,将所述细节区域和所述参考图像进行融合处理,得到目标HDR图像。In a possible implementation manner, the method further includes: determining an edge of the first non-reference image, the edge includes an edge pixel point; determining a location around each pixel point in the first non-reference image Whether the value of the edge pixel is greater than the second threshold; if the value of the edge pixel is greater than the second threshold, the value of the edge pixel around the pixel in the first non-reference image is greater than the second An area formed by all the pixels of the threshold is determined as a detail area of the first non-reference image; when the first ratio and the second ratio are both greater than the first threshold, the detail area and the reference image are The fusion process is performed to obtain a target HDR image.
在一种可能的实现方式中,所述确定所述第一非参考图像的边缘,包括:利用canny算子对所述第一非参考图像的每个像素点进行边缘检测;根据所述边缘检测的结果,确定所述第一非参考图像的边缘。In a possible implementation manner, the determining an edge of the first non-reference image includes: performing edge detection on each pixel of the first non-reference image by using a canny operator; As a result, the edge of the first non-reference image is determined.
第二方面,本发明提供了一种HDR图像的生成装置,所述装置包括:获取单元,用于获取图像序列的第一运动区域和第二运动区域;其中,所述图像序列包括参考图像、第一非参考图像和第二非参考图像,所述第一非参考图像、所述参考图像和所述第二非参考图像对目标场景的曝光时长依次递增,所述第一运动区域为所述第一非参考图像相对于所述参考图像存在灰度值差异的区域,所述第二运动区域为所述第二非参考图像相对于所述参 考图像存在灰度值差异的区域;确定单元,用于根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域;其中,所述第一比例为所述第一非参考图像中所述第一运动区域所占的比例,所述第二比例为所述第二非参考图像中所述第二运动区域所占的比例,所述目标运动区域包括至少一个连通区域;处理单元,用于根据第一权重值和第二权重值,得到第一HDR图像;其中,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;所述确定单元还用于,根据第一权重之和与第二权重之和的比较结果,确定参照图像,其中,所述第一权重之和为所述参考图像中与所述连通区域重叠的区域的像素点的权重值之和,所述第二权重之和为所述第一非参考图像中与所述连通区域重叠的区域的像素点的权重值之和,其中,所述像素点的权重值为所述像素点的饱和度、对比度和曝光程度的乘积;所述处理单元还用于,利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像;融合单元,用于基于所述连通区域,将所述调节后的第一HDR图像与所述参考图像或所述第一非参考图像进行融合处理,得到第二HDR图像。由此,通过第一阈值的设置,可以检测目标场景中一定面积的运动区域,扩大了运动区域的范围,即本申请可以允许场景中存在较大的运动区域,并去除了调节后的第一HDR图像的鬼影,得到没有鬼影的第二HDR图像。In a second aspect, the present invention provides an apparatus for generating an HDR image, the apparatus comprising: an acquiring unit, configured to acquire a first motion area and a second motion area of a sequence of images; wherein the image sequence includes a reference image, a first non-reference image and a second non-reference image, wherein the first non-reference image, the reference image, and the second non-reference image sequentially increase an exposure duration of the target scene, the first motion region being the a region in which the first non-reference image has a difference in gray value with respect to the reference image, the second motion region being a region in which the second non-reference image has a difference in gray value with respect to the reference image; a determining unit, Determining, according to a comparison result between the first ratio and the first threshold, and a comparison result between the second ratio and the first threshold, determining a target motion region; wherein the first ratio is the first non-reference a ratio of the first motion area in the image, the second ratio is a ratio of the second motion area in the second non-reference image, the target motion area The domain includes at least one connected area; the processing unit is configured to obtain a first HDR image according to the first weight value and the second weight value; wherein the first weight value is each pixel point in the first non-reference image a product of saturation, contrast, and degree of exposure; or, the first weight value is a product of saturation, contrast, and exposure level of each pixel in the second non-reference image; or, the first weight a value is a sum of a product of a saturation, a contrast, and an exposure degree of each pixel in the first non-reference image and a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; The second weight value is a product of saturation, contrast, and exposure degree of each pixel in the reference image; the determining unit is further configured to compare results according to a sum of the first weight and the second weight Determining a reference image, wherein a sum of the first weights is a sum of weight values of pixel points of an area of the reference image overlapping the connected area, and a sum of the second weights is the first a sum of weight values of pixels of a region overlapping the connected region in the reference image, wherein a weight of the pixel is a product of saturation, contrast, and exposure of the pixel; the processing unit further And performing, by using the reference image, performing brightness adjustment processing on the first HDR image to obtain an adjusted first HDR image; and a merging unit, configured to use the adjusted first HDR image based on the connected area Performing fusion processing with the reference image or the first non-reference image to obtain a second HDR image. Therefore, by setting the first threshold, it is possible to detect a certain area of the motion area in the target scene, and expand the range of the motion area, that is, the present application can allow a large motion area in the scene, and remove the adjusted first The ghost of the HDR image, resulting in a second HDR image without ghosting.
在一种可能的实现方式中,所述确定单元还用于,确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;所述装置还包括,判断单元;所述判断单元,用于判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;所述确定单元还用于,如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;所述融合单元还用于,基于所述细节区域,将所述第一非参考图像与所述第二HDR图像进行融合处理,得到目标HDR图像。由此,通过确定所述第一非参考图像的边缘,获取到细节区域,以对第二HDR图像进行细节增强,得到的目标HDR图像细节更丰富。In a possible implementation manner, the determining unit is further configured to: determine an edge of the first non-reference image, the edge includes an edge pixel point; the apparatus further includes: a determining unit; the determining unit, And determining whether the value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold; the determining unit is further configured to: if the edge pixel value is greater than the first value a second threshold, wherein an area formed by all the pixel points of the edge pixel points around the pixel point in the first non-reference image that are greater than the second threshold is determined as the detail area of the first non-reference image; the fusion unit further And configured to perform fusion processing on the first non-reference image and the second HDR image based on the detail region to obtain a target HDR image. Thus, by determining the edge of the first non-reference image, the detail region is acquired to perform detail enhancement on the second HDR image, and the obtained target HDR image is more rich in detail.
在一种可能的实现方式中,所述确定单元具体用于:当所述第一比例和所述第二比例都不大于所述第一阈值时,将所述第一运动区域和所述第二运动区域进行叠加,确定叠加后的区域为目标运动区域;或者,当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,确定所述第一运动区域为目标运动区域;或者,当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,确定所述第二运动区域为目标运动区域。In a possible implementation, the determining unit is specifically configured to: when the first ratio and the second ratio are not greater than the first threshold, the first motion area and the first The two motion regions are superimposed to determine that the superimposed region is the target motion region; or, when the first ratio is not greater than the first threshold, and the second ratio is greater than the first threshold, determining the first The motion area is the target motion area; or, when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, determining that the second motion area is the target motion area.
在一种可能的实现方式中,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素 点的饱和度、对比度和曝光程度的乘积;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积,包括:当所述第一比例和所述第二比例都不大于所述第一阈值时,分别计算所述第一非参考图像和所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一非参考图像中每个像素点的权重值,以及将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第二非参考图像中每个像素点的权重值,将所述第一非参考图像中每个像素点的权重值和所述第二非参考图像中每个像素点的权重值相加,得到所述第一权重值;或者,当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,计算所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值;或者,当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,计算所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值。In a possible implementation manner, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and each pixel in the first non-reference image. a sum of a product of saturation, contrast, and exposure degree of the dot; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; or The first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight is a saturation, contrast, and sum of each pixel in the reference image. a product of the degree of exposure, comprising: calculating, when the first ratio and the second ratio are not greater than the first threshold, each pixel in the first non-reference image and the second non-reference image, respectively Saturation, contrast and degree of exposure of the point, multiplying the saturation, contrast and exposure degree of each pixel in the first non-reference image to obtain a weight of each pixel in the first non-reference image a value, and multiplying a saturation, a contrast, and an exposure degree of each pixel in the second non-reference image to obtain a weight value of each pixel in the second non-reference image, the first non- Adding a weight value of each pixel in the reference image and a weight value of each pixel in the second non-reference image to obtain the first weight value; or, when the first ratio is not greater than the first a threshold, when the second ratio is greater than the first threshold, calculating saturation, contrast, and exposure level of each pixel in the first non-reference image, each pixel in the first non-reference image Multiplying the saturation, contrast, and exposure degree of the point to obtain the first weight value; or, when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, Saturation, contrast, and exposure degree of each pixel in the second non-reference image, multiplying saturation, contrast, and exposure degree of each pixel in the second non-reference image to obtain the first Weights.
在一种可能的实现方式中,所述第一阈值不小于7.5%。In a possible implementation manner, the first threshold is not less than 7.5%.
在一种可能的实现方式中,所述处理单元具体用于:将第一像素点的第一权重值和第二像素点的第二权重值加权平均,得到一个加权平均值,所述加权平均值作为第三像素点的权重值,所述第一像素点为确定了第一权重值的所有像素点中的任一个,所述第二像素点为所述参考图像中与所述第一像素点对应的像素点;根据获得的所有所述第三像素点的权重值,得到所述第一HDR图像。In a possible implementation, the processing unit is specifically configured to weight average the first weight value of the first pixel and the second weight of the second pixel to obtain a weighted average, the weighted average a value as a weight value of a third pixel point, wherein the first pixel point is any one of all pixel points that determine a first weight value, and the second pixel point is the first pixel in the reference image a pixel corresponding to the point; the first HDR image is obtained according to the obtained weight values of all the third pixel points.
在一种可能的实现方式中,所述装置还包括:扫描单元;所述扫描单元,用于对所述目标运动区域所在的图像进行扫描,当所述目标运动区域所在的图像中存在像素值等于第三阈值的像素点时,对所述像素值为第三阈值的像素点进行标记;所述确定单元还用于,确定标记过的所有像素点所构成的区域为所述连通区域。In a possible implementation, the device further includes: a scanning unit; the scanning unit is configured to scan an image where the target motion area is located, and a pixel value exists in an image where the target motion area is located When the pixel is equal to the third threshold, the pixel with the pixel value being the third threshold is marked; the determining unit is further configured to determine that the area formed by all the marked pixels is the connected area.
在一种可能的实现方式中,所述确定单元具体用于:当所述第一权重之和不小于所述第二权重之和,确定所述参考图像为参照图像;当所述第一权重之和小于所述第二权重之和,确定所述第一非参考图像为参照图像。In a possible implementation, the determining unit is specifically configured to: when the sum of the first weights is not less than a sum of the second weights, determine that the reference image is a reference image; when the first weight is The sum is smaller than the sum of the second weights, and the first non-reference image is determined to be a reference image.
在一种可能的实现方式中,所述处理单元具体用于:当所述第一权重之和不小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述参考图像的亮度值,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像;或者,当所述第一权重之和小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述第一非参考图像的亮度值,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像。In a possible implementation, the processing unit is specifically configured to: when the sum of the first weights is not less than a sum of the second weights, calculate a brightness value of the first HDR image and the reference a brightness value of the image, using a difference between the brightness value of the first HDR image and the brightness value of the reference image, performing brightness adjustment processing on the first HDR image to obtain an adjusted first HDR image; or, when Calculating a luminance value of the first HDR image and a luminance value of the first non-reference image when the sum of the first weights is smaller than a sum of the second weights, using a luminance value of the first HDR image And performing, by the difference of the brightness values of the first non-reference image, performing dimming processing on the first HDR image to obtain an adjusted first HDR image.
在一种可能的实现方式中,所述当所述第一权重之和不小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像,包括:以所述参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第一亮度比例进行相乘处理,得到与所述参考图像的亮度值相同的第一HDR图像;所述当所述第一权重之和小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调 暗处理,得到调节后的第一HDR图像,包括:以所述第一非参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第二亮度比例进行相乘处理,得到与所述第一非参考图像的亮度值相同的第一HDR图像。In a possible implementation, when the sum of the first weights is not less than the sum of the second weights, the difference between the brightness value of the first HDR image and the brightness value of the reference image is utilized. And performing a brightness adjustment process on the first HDR image to obtain the adjusted first HDR image, including: using a brightness value of the reference image as a reference, and comparing a brightness value of the first HDR image with a preset number Performing a multiplication process on the luminance ratio to obtain a first HDR image having the same luminance value as the reference image; and using the first HDR when the sum of the first weights is smaller than the sum of the second weights And performing, by the difference between the brightness value of the image and the brightness value of the first non-reference image, dimming the first HDR image to obtain the adjusted first HDR image, including: the first non-reference image The luminance value is a reference, and the luminance value of the first HDR image is multiplied by a preset second luminance ratio to obtain a first HDR image that is the same as the luminance value of the first non-reference image.
在一种可能的实现方式中,所述装置还包括:引导滤波和曝光矫正单元;所述引导滤波和曝光矫正单元,用于对所述目标HDR图像进行引导滤波和曝光矫正。由此,目标HDR图像的各个部分更加清晰。In a possible implementation manner, the apparatus further includes: a guiding filtering and an exposure correcting unit; and the guiding filtering and exposure correcting unit, configured to perform guided filtering and exposure correction on the target HDR image. Thereby, the respective parts of the target HDR image are more clear.
在一种可能的实现方式中,所述确定单元还用于,确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;所述判断单元还用于,判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;所述确定单元还用于,如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;所述融合单元还用于,当所述第一比例和所述第二比例都大于所述第一阈值时,将所述细节区域和所述参考图像进行融合处理,得到目标HDR图像。In a possible implementation, the determining unit is further configured to: determine an edge of the first non-reference image, the edge includes an edge pixel; the determining unit is further configured to determine the first non Whether the value of the edge pixel point around each pixel in the reference image is greater than a second threshold; the determining unit is further configured to: if the value of the edge pixel point is greater than a second threshold, An area formed by all the pixels of the edge pixel around the pixel in the non-reference image having a value greater than the second threshold is determined as the detail area of the first non-reference image; the fusion unit is further configured to: when the first When the ratio and the second ratio are both greater than the first threshold, the detail region and the reference image are merged to obtain a target HDR image.
在一种可能的实现方式中,所述确定单元具体用于:利用canny算子对所述第一非参考图像的每个像素点进行边缘检测;根据所述边缘检测的结果,确定所述第一非参考图像的边缘。In a possible implementation manner, the determining unit is specifically configured to: perform edge detection on each pixel of the first non-reference image by using a canny operator; and determine the first according to a result of the edge detection The edge of a non-reference image.
第三方面,本发明实施例提供了一种计算机存储介质,用于储存为上述HDR图像的生成方法所用的计算机软件指令,其包含用于执行上述第一方面所设计的程序。In a third aspect, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for generating the HDR image, which includes a program designed to execute the first aspect.
第四方面,本发明提供了一种HDR图像的生成装置,生成装置包括处理器、存储器,以及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现:In a fourth aspect, the present invention provides an apparatus for generating an HDR image, the generating apparatus comprising a processor, a memory, and a computer program stored on the memory and operable on the processor, the processor executing the program:
获取图像序列的第一运动区域和第二运动区域;其中,图像序列包括参考图像、第一非参考图像和第二非参考图像,第一非参考图像、参考图像和第二非参考图像对目标场景的曝光时长依次递增,第一运动区域为第一非参考图像相对于参考图像存在灰度值差异的区域,第二运动区域为第二非参考图像相对于参考图像存在灰度值差异的区域;Obtaining a first motion region and a second motion region of the image sequence; wherein the image sequence includes a reference image, a first non-reference image, and a second non-reference image, the first non-reference image, the reference image, and the second non-reference image pair target The exposure duration of the scene is sequentially increased, the first motion region is a region where the first non-reference image has a gray value difference with respect to the reference image, and the second motion region is a region where the second non-reference image has a gray value difference with respect to the reference image. ;
根据第一比例与第一阈值之间的比较结果以及第二比例与第一阈值之间的比较结果,确定目标运动区域;其中,第一比例为第一非参考图像中第一运动区域所占的比例,第二比例为第二非参考图像中第二运动区域所占的比例,目标运动区域包括至少一个连通区域;Determining a target motion region according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold; wherein the first ratio is occupied by the first motion region in the first non-reference image Ratio, the second ratio is a proportion of the second motion area in the second non-reference image, and the target motion area includes at least one connected area;
根据第一权重值和第二权重值,得到第一HDR图像;其中,第一权重值为第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,第一权重值为第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,第一权重值为第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;第二权重值为参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;Obtaining a first HDR image according to the first weight value and the second weight value; wherein the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and the second non-reference image The sum of the product of the saturation, contrast, and exposure level of each pixel in the middle; or, the first weight value is the product of the saturation, contrast, and exposure degree of each pixel in the first non-reference image; or, first The weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight is a product of saturation, contrast, and exposure degree of each pixel in the reference image;
根据第一权重之和与第二权重之和的比较结果,确定参照图像;其中,第一权重之和为参考图像中与连通区域重叠的区域的像素点的权重值之和,第二权重之和为第一非参考图像中与连通区域重叠的区域的像素点的权重值之和,其中,像素点的权重值为像素点的饱和度、对比度和曝光程度的乘积;Determining a reference image according to a comparison result of a sum of the first weight and a sum of the second weights; wherein, the sum of the first weights is a sum of weight values of pixel points of the region overlapping the connected region in the reference image, and the second weight is And a sum of weight values of pixels of the region overlapping the connected region in the first non-reference image, wherein the weight of the pixel is a product of saturation, contrast, and exposure of the pixel;
利用参照图像对第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像;Performing a brightness adjustment process on the first HDR image by using the reference image to obtain an adjusted first HDR image;
基于连通区域,将调节后的第一HDR图像与参考图像或第一非参考图像进行融合处理, 得到第二HDR图像。The adjusted first HDR image is fused with the reference image or the first non-reference image based on the connected region to obtain a second HDR image.
在一种可能的实现方式中,处理器还用于执行:In a possible implementation, the processor is further configured to execute:
确定第一非参考图像的边缘,边缘包括边缘像素点;Determining an edge of the first non-reference image, the edge including an edge pixel point;
判断第一非参考图像中每个像素点周围的边缘像素点的个数值是否大于第二阈值;Determining whether a value of an edge pixel point around each pixel point in the first non-reference image is greater than a second threshold;
如果边缘像素点的个数值大于第二阈值,则将第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold as the details of the first non-reference image region;
基于细节区域,将第一非参考图像与第二HDR图像进行融合处理,得到目标HDR图像。The first non-reference image and the second HDR image are merged based on the detail region to obtain a target HDR image.
在一种可能的实现方式中,根据第一比例与第一阈值之间的比较结果以及第二比例与第一阈值之间的比较结果,确定目标运动区域,包括:In a possible implementation manner, determining a target motion area according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold, including:
当第一比例和第二比例都不大于第一阈值时,将第一运动区域和第二运动区域进行叠加,确定叠加后的区域为目标运动区域;或者,When the first ratio and the second ratio are not greater than the first threshold, the first motion region and the second motion region are superimposed to determine that the superposed region is the target motion region; or
当第一比例不大于第一阈值,第二比例大于第一阈值时,确定第一运动区域为目标运动区域;或者,Determining that the first motion area is the target motion area when the first ratio is not greater than the first threshold and the second ratio is greater than the first threshold; or
当第一比例大于第一阈值,第二比例不大于第一阈值时,确定第二运动区域为目标运动区域。When the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, determining that the second motion region is the target motion region.
在一种可能的实现方式中,第一权重值为第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,第一权重值为第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,第一权重值为第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;第二权重值为参考图像中每个像素点的饱和度、对比度和曝光程度的乘积,包括:In a possible implementation manner, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and saturation and contrast of each pixel in the first non-reference image. And the sum of the products of the exposure degrees; or, the first weight value is a product of the saturation, contrast, and exposure degree of each pixel in the first non-reference image; or, the first weight value is each of the second non-reference images. The product of the saturation, contrast, and exposure of the pixels; the second weight is the product of the saturation, contrast, and exposure of each pixel in the reference image, including:
当第一比例和第二比例都不大于第一阈值时,分别计算第一非参考图像和第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到第一非参考图像中每个像素点的权重值,以及将第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到第二非参考图像中每个像素点的权重值,将第一非参考图像中每个像素点的权重值和第二非参考图像中每个像素点的权重值相加,得到第一权重值;或者,When the first ratio and the second ratio are not greater than the first threshold, calculating saturation, contrast, and exposure degree of each pixel in the first non-reference image and the second non-reference image, respectively, in the first non-reference image Multiplying the saturation, contrast, and exposure levels of each pixel to obtain a weight value for each pixel in the first non-reference image, and the saturation, contrast, and exposure of each pixel in the second non-reference image Multiplying, obtaining a weight value of each pixel in the second non-reference image, adding a weight value of each pixel in the first non-reference image and a weight value of each pixel in the second non-reference image, First weight value; or,
当第一比例不大于第一阈值,第二比例大于第一阈值时,计算第一非参考图像中每个像素点的饱和度、对比度和曝光程度,将第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到第一权重值;或者,Calculating the saturation, contrast, and exposure degree of each pixel in the first non-reference image when the first ratio is not greater than the first threshold and the second ratio is greater than the first threshold, and each pixel in the first non-reference image Multiply the saturation, contrast, and exposure levels to obtain the first weight value; or,
当第一比例大于第一阈值,第二比例不大于第一阈值时,计算第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到第一权重值。Calculating the saturation, contrast, and exposure level of each pixel in the second non-reference image when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, and each pixel in the second non-reference image The saturation, contrast, and exposure levels are multiplied to obtain the first weight value.
在一种可能的实现方式中,第一阈值不小于7.5%。In a possible implementation manner, the first threshold is not less than 7.5%.
在一种可能的实现方式中,根据第一权重值和第二权重值,得到第一HDR图像,包括:In a possible implementation, the first HDR image is obtained according to the first weight value and the second weight value, including:
将第一像素点的第一权重值和第二像素点的第二权重值加权平均,得到一个加权平均值,加权平均值作为第三像素点的权重值,第一像素点为确定了第一权重值的所有像素点中的任一个,第二像素点为参考图像中与第一像素点对应的像素点;Weighting and averaging the first weight value of the first pixel point and the second weight value of the second pixel point to obtain a weighted average value, the weighted average value is used as the weight value of the third pixel point, and the first pixel point is determined to be the first Any one of all the pixel points of the weight value, the second pixel point being a pixel point corresponding to the first pixel point in the reference image;
根据获得的所有第三像素点的权重值,得到第一HDR图像。A first HDR image is obtained based on the obtained weight values of all the third pixel points.
在一种可能的实现方式中,根据第一比例与第一阈值之间的比较结果以及第二比例与 第一阈值之间的比较结果,确定目标运动区域之后,方法还包括:In a possible implementation, after determining the target motion area according to the comparison result between the first ratio and the first threshold and the comparison result between the second ratio and the first threshold, the method further includes:
对目标运动区域所在的图像进行扫描,当目标运动区域所在的图像中存在像素值等于第三阈值的像素点时,对像素值为第三阈值的像素点进行标记;Scanning an image of the target motion area, and when there is a pixel point whose pixel value is equal to the third threshold in the image where the target motion area is located, marking the pixel point whose pixel value is the third threshold;
确定标记过的所有像素点所构成的区域为连通区域。It is determined that the area formed by all the marked pixels is the connected area.
在一种可能的实现方式中,根据第一权重之和与第二权重之和的比较结果,确定参照图像,包括:In a possible implementation manner, determining a reference image according to a comparison result of a sum of the first weight and the second weight, including:
当第一权重之和不小于第二权重之和,确定参考图像为参照图像;Determining the reference image as a reference image when the sum of the first weights is not less than the sum of the second weights;
当第一权重之和小于第二权重之和,确定第一非参考图像为参照图像。When the sum of the first weights is less than the sum of the second weights, determining that the first non-reference image is a reference image.
在一种可能的实现方式中,利用参照图像对第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像,包括:In a possible implementation, the brightness adjustment process is performed on the first HDR image by using the reference image to obtain the adjusted first HDR image, including:
当第一权重之和不小于第二权重之和时,计算第一HDR图像的亮度值和参考图像的亮度值,利用第一HDR图像的亮度值和参考图像的亮度值的差异,对第一HDR图像进行调亮处理,得到调节后的第一HDR图像;或者,When the sum of the first weights is not less than the sum of the second weights, calculating the brightness value of the first HDR image and the brightness value of the reference image, using the difference between the brightness value of the first HDR image and the brightness value of the reference image, for the first The HDR image is subjected to a brightening process to obtain an adjusted first HDR image; or
当第一权重之和小于第二权重之和时,计算第一HDR图像的亮度值和第一非参考图像的亮度值,利用第一HDR图像的亮度值和第一非参考图像的亮度值的差异,对第一HDR图像进行调暗处理,得到调节后的第一HDR图像。Calculating a luminance value of the first HDR image and a luminance value of the first non-reference image when the sum of the first weights is less than a sum of the second weights, using the luminance values of the first HDR image and the luminance values of the first non-reference image Difference, the first HDR image is dimmed to obtain an adjusted first HDR image.
在一种可能的实现方式中,当第一权重之和不小于第二权重之和时,利用第一HDR图像的亮度值和参考图像的亮度值的差异,对第一HDR图像进行调亮处理,得到调节后的第一HDR图像,包括:In a possible implementation manner, when the sum of the first weights is not less than the sum of the second weights, the first HDR image is brightened by using a difference between the luminance values of the first HDR image and the luminance values of the reference image. , getting the adjusted first HDR image, including:
以参考图像的亮度值为基准,将第一HDR图像的亮度值与预设的第一亮度比例进行相乘处理,得到与参考图像的亮度值相同的第一HDR图像;Multiplying the luminance value of the first HDR image with the preset first luminance ratio based on the luminance value of the reference image to obtain a first HDR image having the same luminance value as the reference image;
当第一权重之和小于第二权重之和时,利用第一HDR图像的亮度值和第一非参考图像的亮度值的差异,对第一HDR图像进行调暗处理,得到调节后的第一HDR图像,包括:When the sum of the first weights is smaller than the sum of the second weights, the first HDR image is dimmed by using a difference between the luminance values of the first HDR image and the luminance values of the first non-reference image to obtain the adjusted first HDR images, including:
以第一非参考图像的亮度值为基准,将第一HDR图像的亮度值与预设的第二亮度比例进行相乘处理,得到与第一非参考图像的亮度值相同的第一HDR图像。The luminance value of the first HDR image is multiplied with the preset second luminance ratio based on the luminance value of the first non-reference image to obtain a first HDR image having the same luminance value as the first non-reference image.
在一种可能的实现方式中,在基于细节区域,将第一非参考图像与第二HDR图像进行融合处理,得到目标HDR图像之后,方法还包括:In a possible implementation, after the first non-reference image is merged with the second HDR image based on the detail region to obtain the target HDR image, the method further includes:
对目标HDR图像进行引导滤波和曝光矫正。Guide filtering and exposure correction for the target HDR image.
在一种可能的实现方式中,处理器还用于执行:In a possible implementation, the processor is further configured to execute:
确定第一非参考图像的边缘,边缘包括边缘像素点;Determining an edge of the first non-reference image, the edge including an edge pixel point;
判断第一非参考图像中每个像素点周围的边缘像素点的个数值是否大于第二阈值;Determining whether a value of an edge pixel point around each pixel point in the first non-reference image is greater than a second threshold;
如果边缘像素点的个数值大于第二阈值,则将第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold as the details of the first non-reference image region;
当第一比例和第二比例都大于第一阈值时,将细节区域和参考图像进行融合处理,得到目标HDR图像。When the first ratio and the second ratio are both greater than the first threshold, the detail region and the reference image are merged to obtain a target HDR image.
在一种可能的实现方式中,确定第一非参考图像的边缘,包括:In a possible implementation manner, determining an edge of the first non-reference image includes:
利用canny算子对第一非参考图像的每个像素点进行边缘检测;Performing edge detection on each pixel of the first non-reference image by using a canny operator;
根据边缘检测的结果,确定第一非参考图像的边缘。The edge of the first non-reference image is determined based on the result of the edge detection.
附图说明DRAWINGS
图1为本发明实施例提供的HDR图像的生成方法流程图;FIG. 1 is a flowchart of a method for generating an HDR image according to an embodiment of the present invention;
图2为本发明实施例提供的得到最终的连通区域的示意图;2 is a schematic diagram of obtaining a final connected area according to an embodiment of the present invention;
图3为本发明实施例提供的得到第二HDR图像的示意图;FIG. 3 is a schematic diagram of obtaining a second HDR image according to an embodiment of the present disclosure;
图4为本发明实施例提供的得到目标HDR图像的示意图;4 is a schematic diagram of obtaining a target HDR image according to an embodiment of the present invention;
图5为本发明实施例提供的HDR图像的生成装置结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for generating an HDR image according to an embodiment of the present disclosure;
图6为本发明实施例提供的HDR图像的生成装置的另一结构示意图;FIG. 6 is another schematic structural diagram of an apparatus for generating an HDR image according to an embodiment of the present invention;
图7为本发明实施例提供的HDR图像的生成装置的再一结构示意图。FIG. 7 is a schematic structural diagram of still another apparatus for generating an HDR image according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
本申请的应用场景为图像处理领域,当需要将多张LDR图像生成HDR图像时,可以应用本申请提供的HDR图像的生成方法。The application scenario of the present application is in the field of image processing. When it is required to generate an HDR image by using multiple LDR images, the method for generating an HDR image provided by the present application can be applied.
图1为本发明实施例提供的HDR图像的生成方法流程图。如图1所示,HDR图像生成方法包括以下步骤:FIG. 1 is a flowchart of a method for generating an HDR image according to an embodiment of the present invention. As shown in FIG. 1, the HDR image generation method includes the following steps:
步骤101,获取图像序列的第一运动区域和第二运动区域。Step 101: Acquire a first motion area and a second motion area of the image sequence.
其中,图像序列包括参考图像、第一非参考图像和第二非参考图像,第一非参考图像、参考图像和第二非参考图像对目标场景的曝光时长依次递增,第一运动区域为第一非参考图像相对于参考图像存在灰度值差异的区域,第二运动区域为第二非参考图像相对于参考图像存在灰度值差异的区域。The image sequence includes a reference image, a first non-reference image, and a second non-reference image. The first non-reference image, the reference image, and the second non-reference image sequentially increase the exposure duration of the target scene, and the first motion region is first. The non-reference image has a region where the gradation value differs from the reference image, and the second motion region is a region where the second non-reference image has a gradation value difference with respect to the reference image.
需要说明的是,本申请仅以三张图像为例进行说明,可以理解的是,图像的数量可以是三张以上,当图像的数量为三张以上时,第一非参考图像和第二非参考图像的曝光时长最接近参考图像,第一非参考图像的曝光时长小于参考图像,第二非参考图像的曝光时长大于参考图像。It should be noted that the present application only uses three images as an example for illustration. It can be understood that the number of images may be three or more. When the number of images is three or more, the first non-reference image and the second non- The exposure time of the reference image is closest to the reference image, the exposure time of the first non-reference image is smaller than the reference image, and the exposure time of the second non-reference image is greater than the reference image.
下面,对如何获取到第一非参考图像、参考图像和第二非参考图像做详细的说明。Next, a detailed description will be given on how to acquire the first non-reference image, the reference image, and the second non-reference image.
首先,可以通过终端设备拍摄目标场景的三张曝光时间逐渐增加的图像,即原始第一非参考图像、原始参考图像和原始第二非参考图像,其中,终端设备可以是具有摄像头的设备,包括但不限于照相机(例如数码相机)、摄像机、手机(例如智能手机)、平板电脑(Pad)、个人数字助理(Personal Digital Assistant,PDA)、便携设备(例如,便携式计算机)、可穿戴设备等,本发明实施例对此不做具体限定。First, an image in which three exposure times of the target scene are gradually increased, that is, an original first non-reference image, an original reference image, and an original second non-reference image, may be taken by the terminal device, wherein the terminal device may be a device having a camera, including However, it is not limited to a camera (such as a digital camera), a video camera, a mobile phone (such as a smart phone), a tablet (Pad), a personal digital assistant (PDA), a portable device (for example, a portable computer), a wearable device, or the like. This embodiment of the present invention does not specifically limit this.
其次,分别将原始第一非参考图像、原始参考图像和原始第二非参考图像的RGB图转换为灰度图。Next, the RGB maps of the original first non-reference image, the original reference image, and the original second non-reference image are respectively converted into grayscale images.
接着,在亮度通道上,以原始参考图像的灰度图为标准,对原始第一非参考图像的灰度图进行直方图匹配(histogrammatching,HM),将原始第一非参考图像的灰度图调亮,以原始参考图像的灰度图为标准,对原始第二非参考图像的灰度图进行HM,将原始第二非参考图像调暗。Then, on the luminance channel, using the grayscale image of the original reference image as a standard, histogram matching (HM) is performed on the grayscale image of the original first non-reference image, and the grayscale image of the original first non-reference image is obtained. Brightening, using the grayscale image of the original reference image as a standard, performing HM on the grayscale image of the original second non-reference image, and dimming the original second non-reference image.
最后,利用surf特征点检测算法,获得调亮后的原始第一非参考图像、原始参考图像和调暗后的原始第二非参考图像的单应性矩阵,并分别利用单应性矩阵对原始第一非参考图像、原始参考图像和原始第二非参考图像进行映射,使图像对齐,消除因为相机抖动 造成的运动,得到第一非参考图像、参考图像和第二非参考图像(分别参见图2中201、202和203)。Finally, the surf feature point detection algorithm is used to obtain the homography matrix of the original original non-reference image, the original reference image and the dimmed original second non-reference image, and respectively use the homography matrix to the original Mapping the first non-reference image, the original reference image, and the original second non-reference image to align the images, eliminating motion caused by camera shake, and obtaining the first non-reference image, the reference image, and the second non-reference image (see FIG. 2 in 201, 202 and 203).
获取图像序列的第一运动区域和第二运动区域具体包括:Obtaining the first motion area and the second motion area of the image sequence specifically includes:
分别将第一非参考图像、参考图像和第二非参考图像的RGB图转换为灰度图(分别参见图2中的204、205和206)。接着,在亮度通道上,进行HM,以参考图像的灰度图为标准,对第一非参考图像的灰度图进行HM,将第一非参考图像的灰度图调亮(参见图2中的207),将第二非参考图像的灰度图进行直方图匹配,将第二非参考图像的灰度图调暗(参见图2中的208)。最后,比较调亮后的第一非参考图像的灰度图和参考图像的灰度图的灰度值差异,将所有灰度差值大于预设阈值的像素点确定为第一运动区域(参见图2中的209),相应的,比较调暗后的第二非参考图像的灰度图和参考图像的灰度图的灰度值差异,将所有灰度差值大于预设阈值的像素点确定为第二运动区域(参见图2中的210),比如,调暗后的第二非参考图像的灰度图中第一像素点的灰度值为200,参考图像的灰度图中第一像素点的灰度值为100,两者灰度值差异为100,当预设阈值为50时,所述两者灰度值差异大于预设阈值,因此,第一像素点的像素值为1,获得所有像素值为1的像素点后,再经过阈值过滤、腐蚀膨胀操作得到经过去燥的第二运动区域,像素值为1的像素点参见图2中210的白色区域,像素值为0的像素点参见图2中210的黑色区域,得到的第二运动区域参见图2中的210。The RGB maps of the first non-reference image, the reference image, and the second non-reference image are respectively converted into grayscale maps (see 204, 205, and 206 in FIG. 2, respectively). Next, on the luminance channel, perform HM, and perform HM on the grayscale image of the first non-reference image with the grayscale image of the reference image as a standard, and brighten the grayscale image of the first non-reference image (see FIG. 2) 207), performing histogram matching on the grayscale image of the second non-reference image, and dimming the grayscale image of the second non-reference image (see 208 in FIG. 2). Finally, comparing the gray value difference between the grayscale image of the first non-reference image and the gray image of the reference image, and determining all the pixel points whose grayscale difference is greater than the preset threshold as the first motion region (see 209) in FIG. 2, correspondingly, comparing the grayscale value difference between the grayscale image of the second non-reference image and the grayscale image of the reference image, and all the pixel points whose grayscale difference is greater than a preset threshold Determined as the second motion region (see 210 in FIG. 2), for example, the gray value of the first pixel in the grayscale image of the second non-reference image after dimming is 200, and the grayscale image of the reference image is The gray value of one pixel is 100, and the difference between the gray values is 100. When the preset threshold is 50, the difference between the gray values is greater than the preset threshold. Therefore, the pixel value of the first pixel is 1. After obtaining all the pixel points with the pixel value of 1, the threshold filtering and the etching expansion operation are performed to obtain the second motion region after de-drying, and the pixel value of the pixel value is 1 (see the white area of 210 in FIG. 2, and the pixel value is The pixel of 0 refers to the black area of 210 in Fig. 2, and the obtained second motion area See in 2210.
步骤102,根据第一比例与第一阈值之间的比较结果以及第二比例与第一阈值之间的比较结果,确定目标运动区域。Step 102: Determine a target motion area according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold.
其中,第一比例为第一非参考图像中第一运动区域所占的比例,第二比例为第二非参考图像中第二运动区域所占的比例,目标运动区域包括至少一个连通区域。在图像处理领域中,连通区域(Connected Component)一般是指图像中具有相同像素值且位置相邻的前景像素点组成的图像区域,The first ratio is a proportion of the first motion area in the first non-reference image, the second ratio is a proportion of the second motion area in the second non-reference image, and the target motion area includes at least one connected area. In the field of image processing, a connected component generally refers to an image region in the image that has the same pixel value and is adjacent to the foreground pixel.
进一步地,根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域,包括:Further, determining the target motion area according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold, including:
当第一比例和第二比例都不大于所述第一阈值时,将所述第一运动区域和第二运动区域进行叠加,确定叠加后的区域为目标运动区域;或者,When the first ratio and the second ratio are not greater than the first threshold, the first motion area and the second motion area are superimposed to determine that the superimposed area is the target motion area; or
当第一比例不大于所述第一阈值,第二比例大于所述第一阈值时,确定第一运动区域为目标运动区域;或者,Determining that the first motion area is the target motion area when the first ratio is not greater than the first threshold and the second ratio is greater than the first threshold; or
当第一比例大于第一阈值,所述第二比例不大于第一阈值时,确定第二运动区域为目标运动区域。When the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, determining that the second motion region is the target motion region.
在一个实施例中,参见图2,第一比例和第二比例都不大于第一阈值,将第一运动区域和第二运动区域叠加后,得到的目标运动区域参见2中的211。In an embodiment, referring to FIG. 2, the first ratio and the second ratio are not greater than the first threshold. After the first motion region and the second motion region are superimposed, the obtained target motion region is referred to as 211 in 2.
进一步地,根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域之后,所述方法还包括:对所述目标运动区域所在的图像进行扫描,当所述目标运动区域所在的图像中存在像素值等于第三阈值的像素点时,对所述像素值为第三阈值的像素点进行标记;确定标记过的所有像素点所构成的区域为所述连通区域。Further, after determining the target motion region according to the comparison result between the first ratio and the first threshold and the comparison result between the second ratio and the first threshold, the method further includes: targeting the target motion region The image in which the image is located is scanned, and when there is a pixel point whose pixel value is equal to the third threshold in the image in which the target motion region is located, the pixel point whose pixel value is the third threshold value is marked; and all the marked pixel points are determined. The area formed is the connected area.
在一个示例中,第三阈值为1,目标运动区域中所有像素值为1的像素点所构成的区 域为连通区域。In one example, the third threshold is 1, and the area formed by the pixel points having all pixel values of 1 in the target motion area is the connected area.
在另一个示例中,第三阈值为0,确定目标区域中所有像素值为0的像素点所构成的区域,目标运动区域所在的图像中,除像素值为0的像素点所构成的区域,其余区域为连通区域。In another example, the third threshold is 0, and an area formed by the pixel points of all the pixel values in the target area is determined, and an area of the image in which the target motion area is located, except for the pixel point whose pixel value is 0, The remaining area is the connected area.
举例来说,如果第一运动区域中包括两处运动的区域,比如,头和脚,那么头就是一个连通区域,脚就是一个连通区域,参见图1中的209,连通区域的个数为0,参见图2中的210,连通区域的个数为1。For example, if the first motion area includes two moving areas, such as the head and the foot, then the head is a connected area, and the foot is a connected area. Referring to 209 in FIG. 1, the number of connected areas is 0. Referring to 210 in FIG. 2, the number of connected regions is 1.
在确定目标运动区域的连通区域后,以参考图像为引导图像,对连通区域进行引导滤波(guided filter,GF),使得GF之后的连通区域更接近实际场景中的物体边缘。GF,即对连通区域进行智能扩张,让GF之后的连通区域更像一个完整的区域,从而适当扩大连通区域,如果不进行GF,由于该场景中人物的手是在运动的,得到的连通区域在手的边缘,也就是手指位置会有所缺失,而利用GF对目标运动区域的连通区域进行GF之后,会使得连通区域在边缘区域(即手指头位置)得到扩张,从而避免手指头位置出现鬼影,对连通区域进行引导滤波之后,得到的连通区域参见图2中的211。After the connected area of the target motion area is determined, the reference image is used as the guide image, and the connected area is guided filtered (GF), so that the connected area after the GF is closer to the edge of the object in the actual scene. GF, that is, the intelligent expansion of the connected area, so that the connected area after the GF is more like a complete area, so that the connected area is appropriately enlarged. If the GF is not performed, since the hand of the person in the scene is moving, the obtained connected area is obtained. At the edge of the hand, that is, the position of the finger will be missing, and using GF to perform the GF on the connected region of the target moving region will cause the connected region to be expanded in the edge region (ie, the finger position), thereby avoiding the finger position. Ghosting, after the booting and filtering of the connected area, the obtained connected area is referred to as 211 in FIG.
在进行GF之后,连通区域的值会变成0-1之间的小数值,将GF之前的连通区域与GF后的连通区域相叠加,将像素值大于1的值置为1,小于1的值保持不变,使得生成的最终的连通区域看起来更像是针对一整个运动物体而不是部分运动物体,这样过渡更为自然,参见图2中的211和212,将引导滤波之前的连通区域211和引导滤波之后的连通区域212进行叠加,得到最终的连通区域,标记为213。After the GF is performed, the value of the connected region becomes a small value between 0-1, and the connected region before the GF is superimposed with the connected region after the GF, and the value of the pixel value greater than 1 is set to 1, less than 1. The value remains the same, so that the resulting connected region looks more like an entire moving object than a partially moving object, so the transition is more natural, see 211 and 212 in Figure 2, which will guide the connected region before filtering. 211 and the connected region 212 after the guided filtering are superimposed to obtain a final connected region, denoted 213.
下文中,在基于连通区域进行融合处理时,特指利用最终得到的连通区域进行融合,即利用图2中的213进行融合处理。Hereinafter, when the fusion processing is performed based on the connected region, the fusion is performed by using the finally obtained connected region, that is, the fusion processing is performed using 213 in FIG. 2 .
第一阈值可以根据需要自行设置,第一阈值不小于7.5%。因此,本申请可以检测目标场景中一定面积的运动区域,扩大了运动区域的范围,即本申请可以允许场景中存在较大的运动区域。The first threshold may be set as needed, and the first threshold is not less than 7.5%. Therefore, the present application can detect a certain area of the motion area in the target scene, and expand the range of the motion area, that is, the present application can allow a larger motion area in the scene.
步骤103,根据第一权重值和第二权重值,得到第一HDR图像。Step 103: Obtain a first HDR image according to the first weight value and the second weight value.
其中,第一权重值为第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,第一权重值为第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,第一权重值为第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积。Wherein, the first weight value is a sum of a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image. Or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; or, the first weight value is saturation of each pixel in the second non-reference image, The product of the contrast and the degree of exposure; the second weight is the product of the saturation, contrast, and exposure level of each pixel in the reference image.
下面对如何计算第一权重值和第二权重值进行具体的说明。The following describes how to calculate the first weight value and the second weight value.
当第一比例和第二比例都不大于所述第一阈值时,分别计算第一非参考图像和所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到第一非参考图像中每个像素点的权重值,以及将第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到第二非参考图像中每个像素点的权重值,将第一非参考图像中每个像素点的权重值和所述第二非参考图像中每个像素点的权重值相加,得到所述第一权重值;或者,When the first ratio and the second ratio are not greater than the first threshold, calculating saturation, contrast, and exposure degree of each pixel in the first non-reference image and the second non-reference image, respectively, Multiplying the saturation, contrast, and exposure levels of each pixel in the first non-reference image to obtain a weight value for each pixel in the first non-reference image, and saturating each pixel in the second non-reference image Multiplying the degree, the contrast, and the degree of exposure to obtain a weight value for each pixel in the second non-reference image, the weight value of each pixel in the first non-reference image and each pixel in the second non-reference image The weight values of the points are added to obtain the first weight value; or,
当第一比例不大于所述第一阈值,第二比例大于所述第一阈值时,计算第一非参考图像中每个像素点的饱和度、对比度和曝光程度,将第一非参考图像中每个像素点的饱和度、 对比度和曝光程度相乘,得到所述第一权重值;或者,When the first ratio is not greater than the first threshold and the second ratio is greater than the first threshold, calculating saturation, contrast, and exposure level of each pixel in the first non-reference image, in the first non-reference image Multiplying the saturation, contrast, and exposure level of each pixel to obtain the first weight value; or,
当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,计算所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值。Calculating saturation, contrast, and exposure level of each pixel in the second non-reference image when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold The saturation, contrast, and exposure degree of each pixel in the second non-reference image are multiplied to obtain the first weight value.
在一个示例中,根据所述第一权重值和第二权重值,得到第一HDR图像,包括:将第一像素点的第一权重值和第二像素点的第二权重值加权平均,得到一个加权平均值,所述加权平均值作为第三像素点的权重值,所述第一像素点为确定了第一权重值的所有像素点中的任一个,所述第二像素点为所述参考图像中与所述第一像素点对应的像素点;根据获得的所有所述第三像素点的权重值,得到所述第一HDR图像。In an example, obtaining the first HDR image according to the first weight value and the second weight value, comprising: weighting and averaging the first weight value of the first pixel point and the second weight value of the second pixel point, a weighted average value as a weight value of a third pixel point, the first pixel point being any one of all pixel points determining a first weight value, the second pixel point being the a pixel point corresponding to the first pixel point in the reference image; and the first HDR image is obtained according to the obtained weight values of all the third pixel points.
步骤104,根据第一权重之和与第二权重之和的比较结果,确定参照图像。Step 104: Determine a reference image according to a comparison result of a sum of the first weight and a second weight.
其中,所述第一权重之和为所述参考图像中与所述连通区域重叠的区域的像素点的权重值之和,所述第二权重之和为所述第一非参考图像中与所述连通区域重叠的区域的像素点的权重值之和,其中,所述像素点的权重值为所述像素点的饱和度、对比度和曝光程度的乘积。The sum of the first weights is a sum of weight values of pixel points of an area overlapping the connected area in the reference image, and the sum of the second weights is a sum of the first non-reference image A sum of weight values of pixels of a region where the connected regions overlap, wherein a weight of the pixel is a product of saturation, contrast, and exposure of the pixel.
在一个示例中,所述根据第一权重之和与第二权重之和的比较结果,确定参照图像,包括:当所述第一权重之和不小于所述第二权重之和,确定所述参考图像为参照图像;当所述第一权重之和小于所述第二权重之和,确定所述第一非参考图像为参照图像。In one example, the determining the reference image according to the comparison result of the sum of the first weight and the second weight comprises: determining that the sum of the first weights is not less than a sum of the second weights The reference image is a reference image; and when the sum of the first weights is less than the sum of the second weights, determining that the first non-reference image is a reference image.
在一个示例中,参见图3,由于所述第一权重之和不小于所述第二权重之和,因此确定所述参考图像为参照图像。In one example, referring to FIG. 3, since the sum of the first weights is not less than the sum of the second weights, the reference image is determined to be a reference image.
步骤105,利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像。Step 105: Perform brightness adjustment processing on the first HDR image by using the reference image to obtain an adjusted first HDR image.
在一个示例中,利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像,包括:In one example, performing brightness adjustment processing on the first HDR image by using the reference image to obtain an adjusted first HDR image includes:
当所述第一权重之和不小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述参考图像的亮度值,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像;或者,Calculating a luminance value of the first HDR image and a luminance value of the reference image when the sum of the first weights is not less than a sum of the second weights, using a luminance value and a location of the first HDR image Determining the first HDR image by using a difference in luminance values of the reference image to obtain an adjusted first HDR image; or
当所述第一权重之和小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述第一非参考图像的亮度值,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像。Calculating a luminance value of the first HDR image and a luminance value of the first non-reference image when the sum of the first weights is smaller than a sum of the second weights, using a luminance value of the first HDR image And dithering the first HDR image with a difference in luminance values of the first non-reference image to obtain an adjusted first HDR image.
进一步地,所述当所述第一权重之和不小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像,包括:以所述参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第一亮度比例进行相乘处理,得到与所述参考图像的亮度值相同的第一HDR图像;Further, when the sum of the first weights is not less than the sum of the second weights, using the difference between the brightness value of the first HDR image and the brightness value of the reference image, the first Performing a brightness adjustment process on the HDR image to obtain the adjusted first HDR image, comprising: multiplying a brightness value of the first HDR image by a preset first brightness ratio based on a brightness value of the reference image Processing to obtain a first HDR image having the same brightness value as the reference image;
所述当所述第一权重之和小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像,包括:以所述第一非参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第二亮度比例进行相乘处理,得到与所述第一非参考图像的亮度值相同的第一HDR图像。And when the sum of the first weights is smaller than the sum of the second weights, using the difference between the brightness values of the first HDR image and the brightness values of the first non-reference image, to the first HDR Performing a dimming process on the image to obtain the adjusted first HDR image, including: performing, by using a luminance value of the first non-reference image, a luminance value of the first HDR image and a preset second luminance ratio The multiplication processing obtains a first HDR image that is the same as the luminance value of the first non-reference image.
在一个示例中,得到的调节后的第一HDR图像参见图3中的301。由于第一HDR图像存在鬼影,因此,要对第一HDR图像进行去鬼影。以下步骤106,将详细描述如何去除第一HDR图像的鬼影。In one example, the resulting adjusted first HDR image is referenced to 301 in FIG. Since the first HDR image has ghosts, the first HDR image is de-ghosted. In the following step 106, how to remove the ghost of the first HDR image will be described in detail.
步骤106,基于所述连通区域,将所述调节后的第一HDR图像与所述参考图像或所述第一非参考图像进行融合处理,得到第二HDR图像。Step 106: fused the adjusted first HDR image with the reference image or the first non-reference image based on the connected area to obtain a second HDR image.
其中,融合处理即拉普拉斯金字塔融合,在进行拉普拉斯金字塔融合时,将调节后的第一HDR图像和参考图像或者第一非参考图像进行融合,将这两幅图像分别设定为a和b,融合结果为c,那么c中肯定有一部分是从a拿过来的,这部分肯定是没有b的信息,同样的,从b拿过来的部分,是不会有a的信息的,那么如何区分哪些信息从a拿,哪些信息从b拿,连通区域就是对哪些信息从a拿,哪些信息从b拿进行区分,更直观的讲,连通区域只是个黑白的图像,白色代表从调节后的第一HDR图像拿,黑色代表从参考图像或者第一非参考图像拿,因此一次拉普拉斯金字塔融合中,严格的来说是需要三幅图像的,两幅源图像(最后合成的第二HDR图像由这两幅图像中的像素点组成)和一幅指示如何取点的掩码图像(mask),连通区域,就是那个mask图像(非黑即白,非0即1)。上文已经说明过,此处的连通区域特指最终的连通区域,参见图3中213。由此,去除了调节后的第一HDR图像的鬼影。The fusion processing is a Laplacian pyramid fusion, and when the Laplacian pyramid fusion is performed, the adjusted first HDR image is merged with the reference image or the first non-reference image, and the two images are respectively set. For a and b, the fusion result is c, then some of the c must be taken from a, this part is definitely no information of b, the same, the part taken from b, there will be no information of a Then, how to distinguish which information is taken from a, and which information is taken from b. The connected area is to distinguish which information is taken from a and which information is taken from b. More intuitively, the connected area is only a black and white image, and white represents The adjusted first HDR image is taken, and the black color is taken from the reference image or the first non-reference image, so in a Laplacian pyramid fusion, strictly speaking, three images are required, and two source images (final synthesis) The second HDR image consists of the pixels in the two images) and a mask image indicating how to take the point. The connected region is the mask image (non-black or white, non-zero or 1). As explained above, the connected area here refers specifically to the final connected area, see 213 in FIG. Thereby, ghosts of the adjusted first HDR image are removed.
可选地,步骤106之后还包括:Optionally, after step 106, the method further includes:
步骤107,确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;基于所述细节区域,将所述第一非参考图像与所述第二HDR图像进行融合处理,得到目标HDR图像。由此,对第二HDR图像进行了细节增强,得到的目标HDR图像细节更丰富。Step 107: Determine an edge of the first non-reference image, the edge includes an edge pixel point, and determine whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold is determined as the first a detail region of the non-reference image; based on the detail region, the first non-reference image and the second HDR image are merged to obtain a target HDR image. Thereby, the second HDR image is enhanced in detail, and the obtained target HDR image is more detailed.
其中,在图像处理领域中,边缘是指其周围像素灰度急剧变化的那些象素的集合,它是图像最基本的特征。此处,将边缘中的像素点自定义为边缘像素点。如果一个像素点的边缘像素点的个数值大于第二阈值,则说明该像素点细节丰富,此时,可以根据实际需要,对第二阈值进行设置。Among them, in the field of image processing, an edge refers to a collection of those pixels whose pixel gradation changes abruptly, which is the most basic feature of an image. Here, the pixels in the edge are customized as edge pixels. If the value of the edge pixel of one pixel is greater than the second threshold, the pixel is rich in detail. In this case, the second threshold may be set according to actual needs.
此处的融合处理,也可以是进行拉普拉斯金字塔融合处理,此时,细节区域的作用和步骤106中提及的连通区域的作用一致,都是作为mask图像的。细节区域在此处用于指示哪些信息从第一非参考图像拿,哪些信息从所述第二HDR图像拿,具体细节将不再赘述。The fusion processing here may also be a Laplacian pyramid fusion process. At this time, the role of the detail area is the same as that of the connected area mentioned in step 106, and is used as a mask image. The detail area is used here to indicate which information is taken from the first non-reference image and which information is taken from the second HDR image, and details will not be described again.
确定所述第一非参考图像的边缘,包括:利用canny算子对所述第一非参考图像的每个像素点进行边缘检测;根据所述边缘检测的结果,确定所述第一非参考图像的边缘。Determining an edge of the first non-reference image, comprising: performing edge detection on each pixel of the first non-reference image by using a canny operator; determining the first non-reference image according to a result of the edge detection the edge of.
可选地,在步骤107之后还包括:Optionally, after step 107, the method further includes:
步骤108,对所述目标HDR图像进行引导滤波和曝光矫正。Step 108, performing guided filtering and exposure correction on the target HDR image.
其中,进行引导滤波是对第二融合后的图像进行去噪,曝光矫正的目的是亮度调整。Wherein, the guiding filtering is to denoise the second fused image, and the purpose of the exposure correction is brightness adjustment.
在一个示例中,细节区域参见图4中的401,得到的目标HDR图像参见图4中的402,对所述目标HDR图像进行引导滤波和曝光矫正之后得到的图像参见图4中的403。In one example, the detail area is referred to as 401 in FIG. 4, and the obtained target HDR image is referred to as 402 in FIG. 4. The image obtained after the guide filtering and exposure correction of the target HDR image is referred to as 403 in FIG.
可选地,所述HDR图像的生成方法还包括:Optionally, the method for generating the HDR image further includes:
步骤109,确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;Step 109, determining an edge of the first non-reference image, the edge including an edge pixel point;
判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;Determining whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold;
如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold is determined as the first non- The detail area of the reference image;
当所述第一比例和所述第二比例都大于所述第一阈值时,将所述细节区域和所述参考图像进行融合处理,得到目标HDR图像。And when the first ratio and the second ratio are both greater than the first threshold, the detail region and the reference image are merged to obtain a target HDR image.
需要说明的是,图2中的201、202、203,图3中的202、301、302,图4中的201、401、402、403都为RGB图,但是为了满足说明书附图的要求,其显示在图2、3和图4中的为灰度图。It should be noted that 201, 202, 203 in FIG. 2, 202, 301, and 302 in FIG. 3, and 201, 401, 402, and 403 in FIG. 4 are all RGB images, but in order to meet the requirements of the drawings of the specification, It is shown in Figures 2, 3 and 4 as a grayscale image.
进一步地,本发明实施例提供的HDR图像的生成方法,在生成HDR图像时,可以获取到每张非参考图像的运动区域,则可以利用多张运动区域,在描述非运动场景时,显示场景中的物体运动,甚至可以合成HDR时频。Further, the method for generating an HDR image provided by the embodiment of the present invention may acquire a motion region of each non-reference image when generating an HDR image, and may use multiple motion regions to display a scene when describing a non-motion scene. The motion of the object in the object can even synthesize the HDR time-frequency.
图5为本发明实施例提供的HDR图像的生成装置结构示意图,用于执行图1所述的方法,如图5所示,该HDR图像生成装置500包括:获取单元510、确定单元520、处理单元530、融合单元540。FIG. 5 is a schematic structural diagram of an apparatus for generating an HDR image according to an embodiment of the present invention, for performing the method described in FIG. 1. As shown in FIG. 5, the HDR image generating apparatus 500 includes: an obtaining unit 510, a determining unit 520, and processing. Unit 530, fusion unit 540.
获取单元510,用于获取图像序列的第一运动区域和第二运动区域;其中,所述图像序列包括参考图像、第一非参考图像和第二非参考图像,所述第一非参考图像、所述参考图像和所述第二非参考图像对目标场景的曝光时长依次递增,所述第一运动区域为所述第一非参考图像相对于所述参考图像存在灰度值差异的区域,所述第二运动区域为所述第二非参考图像相对于所述参考图像存在灰度值差异的区域。The acquiring unit 510 is configured to acquire a first motion area and a second motion area of the image sequence, where the image sequence includes a reference image, a first non-reference image, and a second non-reference image, the first non-reference image, The exposure time of the reference image and the second non-reference image to the target scene are sequentially incremented, and the first motion area is an area where the first non-reference image has a gray value difference with respect to the reference image, The second motion region is a region where the second non-reference image has a difference in gray value with respect to the reference image.
确定单元520,用于根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域;其中,所述第一比例为所述第一非参考图像中所述第一运动区域所占的比例,所述第二比例为所述第二非参考图像中所述第二运动区域所占的比例,所述目标运动区域包括至少一个连通区域。a determining unit 520, configured to determine a target motion region according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold; wherein the first ratio is the a ratio of the first motion area in the first non-reference image, the second ratio is a ratio of the second motion area in the second non-reference image, the target motion area including at least one Connected area.
处理单元530,用于根据第一权重值和第二权重值,得到第一HDR图像;其中,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积。The processing unit 530 is configured to obtain, according to the first weight value and the second weight value, a first HDR image, where the first weight value is a saturation, a contrast, and a saturation of each pixel in the first non-reference image. a product of the degree of exposure; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; or, the first weight value is the first a sum of a product of saturation, contrast, and exposure degree of each pixel in the non-reference image and a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; the second weight value The product of the saturation, contrast, and exposure level of each pixel in the reference image.
确定单元520还用于,根据第一权重之和与第二权重之和的比较结果,确定参照图像,其中,所述第一权重之和为所述参考图像中与所述连通区域重叠的区域的像素点的权重值之和,所述第二权重之和为所述第一非参考图像中与所述连通区域重叠的区域的像素点的权重值之和,其中,所述像素点的权重值为所述像素点的饱和度、对比度和曝光程度的乘积。The determining unit 520 is further configured to: determine, according to a comparison result of the sum of the first weight and the second weight, the sum of the first weights is an area of the reference image that overlaps with the connected area a sum of the weight values of the pixels, the sum of the second weights being a sum of weight values of pixel points of the region of the first non-reference image overlapping with the connected region, wherein the weight of the pixel The value is the product of the saturation, contrast, and exposure level of the pixel.
处理单元530还用于,利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像。The processing unit 530 is further configured to perform brightness adjustment processing on the first HDR image by using the reference image to obtain an adjusted first HDR image.
融合单元540,用于基于所述连通区域,将所述调节后的第一HDR图像与所述参考图 像或所述第一非参考图像进行融合处理,得到第二HDR图像。The merging unit 540 is configured to fuse the adjusted first HDR image with the reference image or the first non-reference image based on the connected area to obtain a second HDR image.
进一步地,确定单元520还用于,确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;Further, the determining unit 520 is further configured to determine an edge of the first non-reference image, where the edge includes an edge pixel point;
图6为本发明实施例提供的HDR图像的生成装置的另一结构示意图,如图6所示,该HDR图像的生成装置600还包括,判断单元610。FIG. 6 is another schematic structural diagram of an HDR image generating apparatus according to an embodiment of the present invention. As shown in FIG. 6, the HDR image generating apparatus 600 further includes a determining unit 610.
判断单元610,用于判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值。The determining unit 610 is configured to determine whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold.
所述确定单元520还用于,如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域。The determining unit 520 is further configured to: if the value of the edge pixel point is greater than the second threshold, the value of the edge pixel point around the pixel point in the first non-reference image is greater than all pixels of the second threshold The area formed by the dots is determined as the detail area of the first non-reference image.
所述融合单元540还用于,基于所述细节区域,将所述第一非参考图像与所述第二HDR图像进行融合处理,得到目标HDR图像。The merging unit 540 is further configured to perform fusion processing on the first non-reference image and the second HDR image based on the detail region to obtain a target HDR image.
进一步地,确定单元520具体用于:当所述第一比例和所述第二比例都不大于所述第一阈值时,将所述第一运动区域和所述第二运动区域进行叠加,确定叠加后的区域为目标运动区域;或者,Further, the determining unit 520 is specifically configured to: when the first ratio and the second ratio are not greater than the first threshold, superimpose the first motion region and the second motion region to determine The superimposed area is the target motion area; or,
当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,确定所述第一运动区域为目标运动区域;或者,Determining, when the first ratio is not greater than the first threshold, the second ratio is greater than the first threshold, determining that the first motion region is a target motion region; or
当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,确定所述第二运动区域为目标运动区域。When the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, determining that the second motion region is a target motion region.
进一步地,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积,包括:Further, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and saturation and contrast of each pixel in the first non-reference image. And a sum of products of exposure degrees; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight value is a product of saturation, contrast, and exposure degree of each pixel in the reference image, including :
当所述第一比例和所述第二比例都不大于所述第一阈值时,分别计算所述第一非参考图像和所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一非参考图像中每个像素点的权重值,以及将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第二非参考图像中每个像素点的权重值,将所述第一非参考图像中每个像素点的权重值和所述第二非参考图像中每个像素点的权重值相加,得到所述第一权重值;或者,Calculating saturation, contrast, and sum of each pixel in the first non-reference image and the second non-reference image, respectively, when the first ratio and the second ratio are not greater than the first threshold a degree of exposure, multiplying a saturation, a contrast, and an exposure degree of each pixel in the first non-reference image to obtain a weight value of each pixel in the first non-reference image, and the second Multiplying the saturation, contrast, and exposure degree of each pixel in the non-reference image to obtain a weight value of each pixel in the second non-reference image, and each pixel in the first non-reference image And adding a weight value to a weight value of each pixel in the second non-reference image to obtain the first weight value; or
当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,计算所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值;或者,Calculating saturation, contrast, and exposure level of each pixel in the first non-reference image when the first ratio is not greater than the first threshold and the second ratio is greater than the first threshold Multiplying the saturation, contrast, and exposure degree of each pixel in the first non-reference image to obtain the first weight value; or
当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,计算所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值。Calculating saturation, contrast, and exposure level of each pixel in the second non-reference image when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold The saturation, contrast, and exposure degree of each pixel in the second non-reference image are multiplied to obtain the first weight value.
进一步地,所述第一阈值不小于7.5%。Further, the first threshold is not less than 7.5%.
进一步地,所述处理单元530具体用于:Further, the processing unit 530 is specifically configured to:
将第一像素点的第一权重值和第二像素点的第二权重值加权平均,得到一个加权平均值,所述加权平均值作为第三像素点的权重值,所述第一像素点为确定了第一权重值的所有像素点中的任一个,所述第二像素点为所述参考图像中与所述第一像素点对应的像素点;根据获得的所有所述第三像素点的权重值,得到所述第一HDR图像。Weighting and averaging the first weight value of the first pixel point and the second weight value of the second pixel point to obtain a weighted average value, where the weighted average value is used as a weight value of the third pixel point, and the first pixel point is Determining any one of all pixel points of the first weight value, the second pixel point being a pixel point corresponding to the first pixel point in the reference image; according to all the third pixel points obtained The weight value is obtained to obtain the first HDR image.
进一步地,所述装置还包括:扫描单元620。Further, the device further includes: a scanning unit 620.
所述扫描单元620,用于对所述目标运动区域所在的图像进行扫描,当所述目标运动区域所在的图像中存在像素值等于第三阈值的像素点时,对所述像素值为第三阈值的像素点进行标记。The scanning unit 620 is configured to scan an image where the target motion area is located, and when there is a pixel point whose pixel value is equal to a third threshold in the image where the target motion area is located, the pixel value is the third value. The pixel points of the threshold are marked.
所述确定单元520还用于,确定标记过的所有像素点所构成的区域为所述连通区域。The determining unit 520 is further configured to determine that an area formed by all the marked pixels is the connected area.
进一步地,所述确定单元520具体用于:Further, the determining unit 520 is specifically configured to:
当所述第一权重之和不小于所述第二权重之和,确定所述参考图像为参照图像;Determining that the reference image is a reference image when a sum of the first weights is not less than a sum of the second weights;
当所述第一权重之和小于所述第二权重之和,确定所述第一非参考图像为参照图像。When the sum of the first weights is less than the sum of the second weights, determining that the first non-reference image is a reference image.
进一步地,所述处理单元530具体用于:Further, the processing unit 530 is specifically configured to:
当所述第一权重之和不小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述参考图像的亮度值,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像;或者,Calculating a luminance value of the first HDR image and a luminance value of the reference image when the sum of the first weights is not less than a sum of the second weights, using a luminance value and a location of the first HDR image Determining the first HDR image by using a difference in luminance values of the reference image to obtain an adjusted first HDR image; or
当所述第一权重之和小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述第一非参考图像的亮度值,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像。Calculating a luminance value of the first HDR image and a luminance value of the first non-reference image when the sum of the first weights is smaller than a sum of the second weights, using a luminance value of the first HDR image And dithering the first HDR image with a difference in luminance values of the first non-reference image to obtain an adjusted first HDR image.
进一步地,所述当所述第一权重之和不小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像,包括:以所述参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第一亮度比例进行相乘处理,得到与所述参考图像的亮度值相同的第一HDR图像。Further, when the sum of the first weights is not less than the sum of the second weights, using the difference between the brightness value of the first HDR image and the brightness value of the reference image, the first Performing a brightness adjustment process on the HDR image to obtain the adjusted first HDR image, comprising: multiplying a brightness value of the first HDR image by a preset first brightness ratio based on a brightness value of the reference image Processing, obtaining a first HDR image that is the same as the luminance value of the reference image.
所述当所述第一权重之和小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像,包括:以所述第一非参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第二亮度比例进行相乘处理,得到与所述第一非参考图像的亮度值相同的第一HDR图像。And when the sum of the first weights is smaller than the sum of the second weights, using the difference between the brightness values of the first HDR image and the brightness values of the first non-reference image, to the first HDR Performing a dimming process on the image to obtain the adjusted first HDR image, including: performing, by using a luminance value of the first non-reference image, a luminance value of the first HDR image and a preset second luminance ratio The multiplication processing obtains a first HDR image that is the same as the luminance value of the first non-reference image.
进一步地,所述装置还包括:引导滤波和曝光矫正单元630。Further, the apparatus further includes: a guide filtering and exposure correction unit 630.
所述引导滤波和曝光矫正单元630,用于对所述目标HDR图像进行引导滤波和曝光矫正。The guiding filtering and exposure correction unit 630 is configured to perform guided filtering and exposure correction on the target HDR image.
进一步地,所述确定单元520还用于,确定所述第一非参考图像的边缘,所述边缘包括边缘像素点。Further, the determining unit 520 is further configured to determine an edge of the first non-reference image, where the edge includes an edge pixel point.
所述判断单元610还用于,判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值。The determining unit 610 is further configured to determine whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold.
所述确定单元520还用于,如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区 域确定为第一非参考图像的细节区域。The determining unit 520 is further configured to: if the value of the edge pixel point is greater than the second threshold, the value of the edge pixel point around the pixel point in the first non-reference image is greater than all pixels of the second threshold The area formed by the dots is determined as the detail area of the first non-reference image.
所述融合单元540还用于,当所述第一比例和所述第二比例都大于所述第一阈值时,将所述细节区域和所述参考图像进行融合处理,得到目标HDR图像。The merging unit 540 is further configured to: when the first ratio and the second ratio are both greater than the first threshold, perform fusion processing on the detail region and the reference image to obtain a target HDR image.
进一步地,所述确定单元520具体用于:利用canny算子对所述第一非参考图像的每个像素点进行边缘检测;根据所述边缘检测的结果,确定所述第一非参考图像的边缘。Further, the determining unit 520 is specifically configured to: perform edge detection on each pixel of the first non-reference image by using a canny operator; and determine, according to a result of the edge detection, the first non-reference image. edge.
图7为本发明实施例提供的HDR图像的生成装置的再一结构示意图,该装置用于执行图1所述方法。如图7所示,该***700包括处理器710、存储器720、显示器730、接收器740、通信接口750及***总线760;所述处理器710、存储器720、显示器730、接收器740及通信接口750通过***总线建立连接,一个或多个程序都将被存储在存储器730中并被配置为所述处理器710执行,一个或多个程序包括用于执行HDR图像的生成方法中的所有指令。FIG. 7 is still another schematic structural diagram of an apparatus for generating an HDR image according to an embodiment of the present invention, where the apparatus is used to perform the method illustrated in FIG. 1. As shown in FIG. 7, the system 700 includes a processor 710, a memory 720, a display 730, a receiver 740, a communication interface 750, and a system bus 760; the processor 710, the memory 720, the display 730, the receiver 740, and a communication interface. The 750 establishes a connection through the system bus, one or more programs will be stored in the memory 730 and configured to be executed by the processor 710, and the one or more programs include all instructions in the method of generating the HDR image.
处理器710可以为中央处理器(英文:central processing unit,缩写:CPU)。The processor 710 can be a central processing unit (English: central processing unit, abbreviation: CPU).
存储器720可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(英文:random-access memory,缩写:RAM);存储器也可以包括非易失性存储器(英文:non-volatile memory),例如只读存储器(英文:read-only memory,缩写:ROM),快闪存储器,硬盘(英文:hard disk drive,缩写:HDD)或固态硬盘(英文:solid state drive,缩写:SSD);存储器720还可以包括上述种类的存储器的组合。The memory 720 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviation: RAM); the memory may also include a non-volatile memory (English: non-volatile memory) , for example, read-only memory (English: read-only memory, abbreviation: ROM), flash memory, hard disk (English: hard disk drive, abbreviation: HDD) or solid state drive (English: solid state drive, abbreviation: SSD); memory 720 may also include a combination of the above types of memory.
一种示例性的存储介质耦合至处理器710,从而使处理器710能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器710的组成部分。处理器710和存储介质可以位于ASIC中。另外,该ASIC可以位于核心网接口设备中。当然,处理器710和存储介质也可以作为分立组件存在于核心网接口设备中。An exemplary storage medium is coupled to processor 710 to enable processor 710 to read information from, and to write information to, the storage medium. Of course, the storage medium can also be an integral part of the processor 710. The processor 710 and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a core network interface device. Of course, the processor 710 and the storage medium may also exist as discrete components in the core network interface device.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art will appreciate that in one or more examples described above, the functions described herein can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium. Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage medium may be any available media that can be accessed by a general purpose or special purpose computer.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。The specific embodiments of the present invention have been described in detail with reference to the preferred embodiments of the present invention. The scope of the protection, any modifications, equivalent substitutions, improvements, etc., which are made on the basis of the technical solutions of the present invention, are included in the scope of the present invention.

Claims (27)

  1. 一种高动态范围HDR图像的生成方法,其特征在于,所述方法包括:A method for generating a high dynamic range HDR image, the method comprising:
    获取图像序列的第一运动区域和第二运动区域;其中,所述图像序列包括参考图像、第一非参考图像和第二非参考图像,所述第一非参考图像、所述参考图像和所述第二非参考图像对目标场景的曝光时长依次递增,所述第一运动区域为所述第一非参考图像相对于所述参考图像存在灰度值差异的区域,所述第二运动区域为所述第二非参考图像相对于所述参考图像存在灰度值差异的区域;Obtaining a first motion region and a second motion region of the sequence of images; wherein the sequence of images includes a reference image, a first non-reference image, and a second non-reference image, the first non-reference image, the reference image, and The second non-reference image sequentially increases the exposure duration of the target scene, where the first motion region is an area where the first non-reference image has a gray value difference with respect to the reference image, and the second motion region is a region in which the second non-reference image has a difference in gray value with respect to the reference image;
    根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域;其中,所述第一比例为所述第一非参考图像中所述第一运动区域所占的比例,所述第二比例为所述第二非参考图像中所述第二运动区域所占的比例,所述目标运动区域包括至少一个连通区域;Determining a target motion region according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold; wherein the first ratio is in the first non-reference image a ratio of the first motion area, the second ratio is a proportion of the second motion area in the second non-reference image, and the target motion area includes at least one connectivity area;
    根据第一权重值和第二权重值,得到第一HDR图像;其中,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;Obtaining a first HDR image according to the first weight value and the second weight value; wherein the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image a sum of a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; or, the first weight value is a saturation, contrast of each pixel in the first non-reference image And a product of the degree of exposure; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight value is in the reference image The product of the saturation, contrast, and exposure level of each pixel;
    根据第一权重之和与第二权重之和的比较结果,确定参照图像;其中,所述第一权重之和为所述参考图像中与所述连通区域重叠的区域的像素点的权重值之和,所述第二权重之和为所述第一非参考图像中与所述连通区域重叠的区域的像素点的权重值之和,其中,所述像素点的权重值为所述像素点的饱和度、对比度和曝光程度的乘积;Determining a reference image according to a comparison result of a sum of the first weight and a sum of the second weights; wherein, the sum of the first weights is a weight value of a pixel point of an area of the reference image overlapping the connected area And a sum of the second weights is a sum of weight values of pixel points of a region of the first non-reference image overlapping with the connected region, wherein a weight value of the pixel point is the pixel point The product of saturation, contrast, and exposure;
    利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像;Performing brightness adjustment processing on the first HDR image by using the reference image to obtain an adjusted first HDR image;
    基于所述连通区域,将所述调节后的第一HDR图像与所述参考图像或所述第一非参考图像进行融合处理,得到第二HDR图像。And integrating the adjusted first HDR image with the reference image or the first non-reference image to obtain a second HDR image.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;Determining an edge of the first non-reference image, the edge including an edge pixel point;
    判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;Determining whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold;
    如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold is determined as the first non- The detail area of the reference image;
    基于所述细节区域,将所述第一非参考图像与所述第二HDR图像进行融合处理,得到目标HDR图像。And integrating the first non-reference image and the second HDR image to obtain a target HDR image based on the detail region.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域,包括:The method according to claim 1 or 2, wherein the determining a target motion region according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold ,include:
    当所述第一比例和所述第二比例都不大于所述第一阈值时,将所述第一运动区域和所述第二运动区域进行叠加,确定叠加后的区域为目标运动区域;或者,When the first ratio and the second ratio are not greater than the first threshold, superimposing the first motion region and the second motion region to determine that the superimposed region is a target motion region; or ,
    当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,确定所述第一运动区域为目标运动区域;或者,Determining, when the first ratio is not greater than the first threshold, the second ratio is greater than the first threshold, determining that the first motion region is a target motion region; or
    当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,确定所述第二运动区域为目标运动区域。When the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, determining that the second motion region is a target motion region.
  4. 根据权利要求1或2所述的方法,其特征在于,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积,包括:The method according to claim 1 or 2, wherein the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the first non-reference image and the first non- a sum of products of saturation, contrast, and exposure degree of each pixel in the reference image; or, the first weight value is a saturation, contrast, and exposure degree of each pixel in the first non-reference image a product; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight is each pixel in the reference image The product of saturation, contrast, and exposure, including:
    当所述第一比例和所述第二比例都不大于所述第一阈值时,分别计算所述第一非参考图像和所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一非参考图像中每个像素点的权重值,以及将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第二非参考图像中每个像素点的权重值,将所述第一非参考图像中每个像素点的权重值和所述第二非参考图像中每个像素点的权重值相加,得到所述第一权重值;或者,Calculating saturation, contrast, and sum of each pixel in the first non-reference image and the second non-reference image, respectively, when the first ratio and the second ratio are not greater than the first threshold a degree of exposure, multiplying a saturation, a contrast, and an exposure degree of each pixel in the first non-reference image to obtain a weight value of each pixel in the first non-reference image, and the second Multiplying the saturation, contrast, and exposure degree of each pixel in the non-reference image to obtain a weight value of each pixel in the second non-reference image, and each pixel in the first non-reference image And adding a weight value to a weight value of each pixel in the second non-reference image to obtain the first weight value; or
    当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,计算所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值;或者,Calculating saturation, contrast, and exposure level of each pixel in the first non-reference image when the first ratio is not greater than the first threshold and the second ratio is greater than the first threshold Multiplying the saturation, contrast, and exposure degree of each pixel in the first non-reference image to obtain the first weight value; or
    当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,计算所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值。Calculating saturation, contrast, and exposure level of each pixel in the second non-reference image when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold The saturation, contrast, and exposure degree of each pixel in the second non-reference image are multiplied to obtain the first weight value.
  5. 根据权利要求1所述的方法,其特征在于,所述第一阈值不小于7.5%。The method of claim 1 wherein said first threshold is no less than 7.5%.
  6. 根据权利要求1所述的方法,其特征在于,所述根据所述第一权重值和第二权重值,得到第一HDR图像,包括:The method according to claim 1, wherein the obtaining the first HDR image according to the first weight value and the second weight value comprises:
    将第一像素点的第一权重值和第二像素点的第二权重值加权平均,得到一个加权平均值,所述加权平均值作为第三像素点的权重值,所述第一像素点为确定了第一权重值的所有像素点中的任一个,所述第二像素点为所述参考图像中与所述第一像素点对应的像素点;Weighting and averaging the first weight value of the first pixel point and the second weight value of the second pixel point to obtain a weighted average value, where the weighted average value is used as a weight value of the third pixel point, and the first pixel point is Determining any one of all pixel points of the first weight value, the second pixel point being a pixel point corresponding to the first pixel point in the reference image;
    根据获得的所有所述第三像素点的权重值,得到所述第一HDR图像。The first HDR image is obtained according to the obtained weight values of all the third pixel points.
  7. 根据权利要求1所述的方法,其特征在于,根据第一比例与第一阈值之间的比较 结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域之后,所述方法还包括:The method according to claim 1, wherein after determining the target motion region according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold, The method also includes:
    对所述目标运动区域所在的图像进行扫描,当所述目标运动区域所在的图像中存在像素值等于第三阈值的像素点时,对所述像素值为第三阈值的像素点进行标记;Scanning an image of the target motion area, and when there is a pixel point whose pixel value is equal to the third threshold in the image where the target motion area is located, marking the pixel point whose pixel value is the third threshold;
    确定标记过的所有像素点所构成的区域为所述连通区域。It is determined that the area formed by all the marked pixels is the connected area.
  8. 根据权利要求1所述的方法,其特征在于,所述根据第一权重之和与第二权重之和的比较结果,确定参照图像,包括:The method according to claim 1, wherein the determining the reference image according to the comparison result of the sum of the first weight and the second weight comprises:
    当所述第一权重之和不小于所述第二权重之和,确定所述参考图像为参照图像;Determining that the reference image is a reference image when a sum of the first weights is not less than a sum of the second weights;
    当所述第一权重之和小于所述第二权重之和,确定所述第一非参考图像为参照图像。When the sum of the first weights is less than the sum of the second weights, determining that the first non-reference image is a reference image.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像,包括:The method according to any one of claims 1-8, wherein the performing the brightness adjustment processing on the first HDR image by using the reference image to obtain the adjusted first HDR image comprises:
    当所述第一权重之和不小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述参考图像的亮度值,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像;或者,Calculating a luminance value of the first HDR image and a luminance value of the reference image when the sum of the first weights is not less than a sum of the second weights, using a luminance value and a location of the first HDR image Determining the first HDR image by using a difference in luminance values of the reference image to obtain an adjusted first HDR image; or
    当所述第一权重之和小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述第一非参考图像的亮度值,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像。Calculating a luminance value of the first HDR image and a luminance value of the first non-reference image when the sum of the first weights is smaller than a sum of the second weights, using a luminance value of the first HDR image And dithering the first HDR image with a difference in luminance values of the first non-reference image to obtain an adjusted first HDR image.
  10. 根据权利要求9所述的方法,其特征在于,所述当所述第一权重之和不小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像,包括:The method according to claim 9, wherein when the sum of the first weights is not less than the sum of the second weights, the luminance values of the first HDR image and the reference image are utilized. And performing a brightness adjustment process on the first HDR image to obtain the adjusted first HDR image, including:
    以所述参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第一亮度比例进行相乘处理,得到与所述参考图像的亮度值相同的第一HDR图像;And multiplying the brightness value of the first HDR image and the preset first brightness ratio by a brightness value of the reference image to obtain a first HDR image having the same brightness value as the reference image;
    所述当所述第一权重之和小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像,包括:And when the sum of the first weights is smaller than the sum of the second weights, using the difference between the brightness values of the first HDR image and the brightness values of the first non-reference image, to the first HDR The image is dimmed to obtain an adjusted first HDR image, including:
    以所述第一非参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第二亮度比例进行相乘处理,得到与所述第一非参考图像的亮度值相同的第一HDR图像。Multiplying the luminance value of the first HDR image with a preset second luminance ratio based on the luminance value of the first non-reference image to obtain the same luminance value as the first non-reference image The first HDR image.
  11. 根据权利要求2所述的方法,其特征在于,在基于所述细节区域,将所述第一非参考图像与所述第二HDR图像进行融合处理,得到目标HDR图像之后,所述方法还包括:The method according to claim 2, wherein after the first non-reference image and the second HDR image are merged based on the detail region to obtain a target HDR image, the method further includes :
    对所述目标HDR图像进行引导滤波和曝光矫正。Guide filtering and exposure correction are performed on the target HDR image.
  12. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;Determining an edge of the first non-reference image, the edge including an edge pixel point;
    判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;Determining whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold;
    如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;If the value of the edge pixel is greater than the second threshold, determining an area formed by all the pixels of the edge pixel around the pixel in the first non-reference image that are greater than the second threshold is determined as the first non- The detail area of the reference image;
    当所述第一比例和所述第二比例都大于所述第一阈值时,将所述细节区域和所述参考图像进行融合处理,得到目标HDR图像。And when the first ratio and the second ratio are both greater than the first threshold, the detail region and the reference image are merged to obtain a target HDR image.
  13. 根据权利要求2或12所述的方法,其特征在于,所述确定所述第一非参考图像的边缘,包括:The method according to claim 2 or 12, wherein the determining the edge of the first non-reference image comprises:
    利用canny算子对所述第一非参考图像的每个像素点进行边缘检测;Performing edge detection on each pixel of the first non-reference image by using a canny operator;
    根据所述边缘检测的结果,确定所述第一非参考图像的边缘。An edge of the first non-reference image is determined based on a result of the edge detection.
  14. 一种HDR图像的生成装置,其特征在于,所述装置包括:An apparatus for generating an HDR image, characterized in that the apparatus comprises:
    获取单元,用于获取图像序列的第一运动区域和第二运动区域;其中,所述图像序列包括参考图像、第一非参考图像和第二非参考图像,所述第一非参考图像、所述参考图像和所述第二非参考图像对目标场景的曝光时长依次递增,所述第一运动区域为所述第一非参考图像相对于所述参考图像存在灰度值差异的区域,所述第二运动区域为所述第二非参考图像相对于所述参考图像存在灰度值差异的区域;An acquiring unit, configured to acquire a first motion area and a second motion area of the image sequence; wherein the image sequence includes a reference image, a first non-reference image, and a second non-reference image, the first non-reference image, The reference image and the second non-reference image sequentially increase the exposure duration of the target scene, where the first motion region is an area where the first non-reference image has a gray value difference with respect to the reference image, The second motion region is a region where the second non-reference image has a difference in gray value with respect to the reference image;
    确定单元,用于根据第一比例与第一阈值之间的比较结果以及第二比例与所述第一阈值之间的比较结果,确定目标运动区域;其中,所述第一比例为所述第一非参考图像中所述第一运动区域所占的比例,所述第二比例为所述第二非参考图像中所述第二运动区域所占的比例,所述目标运动区域包括至少一个连通区域;a determining unit, configured to determine a target motion region according to a comparison result between the first ratio and the first threshold and a comparison result between the second ratio and the first threshold; wherein the first ratio is the first a ratio of the first motion area in a non-reference image, the second ratio is a ratio of the second motion area in the second non-reference image, the target motion area including at least one connectivity region;
    处理单元,用于根据第一权重值和第二权重值,得到第一HDR图像;其中,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;a processing unit, configured to obtain, according to the first weight value and the second weight value, a first HDR image; wherein the first weight value is a saturation, contrast, and exposure of each pixel in the first non-reference image a product of a degree; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; or, the first weight value is the first non- a sum of a product of saturation, contrast, and exposure of each pixel in the reference image and a product of saturation, contrast, and exposure of each pixel in the first non-reference image; the second weight value a product of saturation, contrast, and exposure level of each pixel in the reference image;
    所述确定单元还用于,根据第一权重之和与第二权重之和的比较结果,确定参照图像,其中,所述第一权重之和为所述参考图像中与所述连通区域重叠的区域的像素点的权重值之和,所述第二权重之和为所述第一非参考图像中与所述连通区域重叠的区域的像素点的权重值之和,其中,所述像素点的权重值为所述像素点的饱和度、对比度和曝光程度的乘积;The determining unit is further configured to determine a reference image according to a comparison result of a sum of the first weight and a second weight, wherein the sum of the first weights is overlapped with the connected area in the reference image a sum of weight values of the pixels of the region, the sum of the second weights being a sum of weight values of pixel points of the region of the first non-reference image overlapping with the connected region, wherein the pixel point The weight value is the product of the saturation, contrast, and exposure level of the pixel;
    所述处理单元还用于,利用所述参照图像对所述第一HDR图像进行亮度调节处理,得到调节后的第一HDR图像;The processing unit is further configured to perform brightness adjustment processing on the first HDR image by using the reference image to obtain an adjusted first HDR image;
    融合单元,用于基于所述连通区域,将所述调节后的第一HDR图像与所述参考图像或所述第一非参考图像进行融合处理,得到第二HDR图像。a merging unit, configured to fuse the adjusted first HDR image with the reference image or the first non-reference image based on the connected area to obtain a second HDR image.
  15. 根据权利要求14所述的装置,其特征在于,所述确定单元还用于,确定所述第 一非参考图像的边缘,所述边缘包括边缘像素点;The apparatus according to claim 14, wherein the determining unit is further configured to determine an edge of the first non-reference image, the edge comprising an edge pixel point;
    所述装置还包括,判断单元;所述判断单元,用于判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;The device further includes: a determining unit, configured to determine whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold;
    所述确定单元还用于,如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;The determining unit is further configured to: if the value of the edge pixel point is greater than the second threshold, the value of the edge pixel point around the pixel point in the first non-reference image is greater than all the pixel points of the second threshold The constructed area is determined as the detail area of the first non-reference image;
    所述融合单元还用于,基于所述细节区域,将所述第一非参考图像与所述第二HDR图像进行融合处理,得到目标HDR图像。The merging unit is further configured to perform fusion processing on the first non-reference image and the second HDR image based on the detail region to obtain a target HDR image.
  16. 根据权利要求14或15所述的装置,其特征在于,所述确定单元具体用于:The device according to claim 14 or 15, wherein the determining unit is specifically configured to:
    当所述第一比例和所述第二比例都不大于所述第一阈值时,将所述第一运动区域和所述第二运动区域进行叠加,确定叠加后的区域为目标运动区域;或者,When the first ratio and the second ratio are not greater than the first threshold, superimposing the first motion region and the second motion region to determine that the superimposed region is a target motion region; or ,
    当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,确定所述第一运动区域为目标运动区域;或者,Determining, when the first ratio is not greater than the first threshold, the second ratio is greater than the first threshold, determining that the first motion region is a target motion region; or
    当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,确定所述第二运动区域为目标运动区域。When the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold, determining that the second motion region is a target motion region.
  17. 根据权利要求14或15所述的装置,其特征在于,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积与所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积之和;或者,所述第一权重值为所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;或者,所述第一权重值为所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度的乘积;所述第二权重值为所述参考图像中每个像素点的饱和度、对比度和曝光程度的乘积,包括:The apparatus according to claim 14 or 15, wherein said first weight value is a product of saturation, contrast, and exposure degree of each pixel in said first non-reference image and said first non- a sum of products of saturation, contrast, and exposure degree of each pixel in the reference image; or, the first weight value is a saturation, contrast, and exposure degree of each pixel in the first non-reference image a product; or, the first weight value is a product of saturation, contrast, and exposure degree of each pixel in the second non-reference image; the second weight is each pixel in the reference image The product of saturation, contrast, and exposure, including:
    当所述第一比例和所述第二比例都不大于所述第一阈值时,分别计算所述第一非参考图像和所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一非参考图像中每个像素点的权重值,以及将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第二非参考图像中每个像素点的权重值,将所述第一非参考图像中每个像素点的权重值和所述第二非参考图像中每个像素点的权重值相加,得到所述第一权重值;或者,Calculating saturation, contrast, and sum of each pixel in the first non-reference image and the second non-reference image, respectively, when the first ratio and the second ratio are not greater than the first threshold a degree of exposure, multiplying a saturation, a contrast, and an exposure degree of each pixel in the first non-reference image to obtain a weight value of each pixel in the first non-reference image, and the second Multiplying the saturation, contrast, and exposure degree of each pixel in the non-reference image to obtain a weight value of each pixel in the second non-reference image, and each pixel in the first non-reference image And adding a weight value to a weight value of each pixel in the second non-reference image to obtain the first weight value; or
    当所述第一比例不大于所述第一阈值,所述第二比例大于所述第一阈值时,计算所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第一非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值;或者,Calculating saturation, contrast, and exposure level of each pixel in the first non-reference image when the first ratio is not greater than the first threshold and the second ratio is greater than the first threshold Multiplying the saturation, contrast, and exposure degree of each pixel in the first non-reference image to obtain the first weight value; or
    当所述第一比例大于所述第一阈值,所述第二比例不大于所述第一阈值时,计算所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度,将所述第二非参考图像中每个像素点的饱和度、对比度和曝光程度相乘,得到所述第一权重值。Calculating saturation, contrast, and exposure level of each pixel in the second non-reference image when the first ratio is greater than the first threshold and the second ratio is not greater than the first threshold The saturation, contrast, and exposure degree of each pixel in the second non-reference image are multiplied to obtain the first weight value.
  18. 根据权利要求14所述的装置,其特征在于,所述第一阈值不小于7.5%。The apparatus according to claim 14, wherein said first threshold is not less than 7.5%.
  19. 根据权利要求14所述的装置,其特征在于,所述处理单元具体用于:The device according to claim 14, wherein the processing unit is specifically configured to:
    将第一像素点的第一权重值和第二像素点的第二权重值加权平均,得到一个加权平均值,所述加权平均值作为第三像素点的权重值,所述第一像素点为确定了第一权重值的所有像素点中的任一个,所述第二像素点为所述参考图像中与所述第一像素点对应的像素点;Weighting and averaging the first weight value of the first pixel point and the second weight value of the second pixel point to obtain a weighted average value, where the weighted average value is used as a weight value of the third pixel point, and the first pixel point is Determining any one of all pixel points of the first weight value, the second pixel point being a pixel point corresponding to the first pixel point in the reference image;
    根据获得的所有所述第三像素点的权重值,得到所述第一HDR图像。The first HDR image is obtained according to the obtained weight values of all the third pixel points.
  20. 根据权利要求14所述的装置,其特征在于,所述装置还包括:扫描单元;The device according to claim 14, wherein the device further comprises: a scanning unit;
    所述扫描单元,用于对所述目标运动区域所在的图像进行扫描,当所述目标运动区域所在的图像中存在像素值等于第三阈值的像素点时,对所述像素值为第三阈值的像素点进行标记;The scanning unit is configured to scan an image where the target motion area is located, and when there is a pixel point whose pixel value is equal to a third threshold in the image where the target motion area is located, the pixel value is a third threshold Pixels are marked;
    所述确定单元还用于,确定标记过的所有像素点所构成的区域为所述连通区域。The determining unit is further configured to determine that an area formed by all the marked pixels is the connected area.
  21. 根据权利要求14所述的装置,其特征在于,所述确定单元具体用于:The device according to claim 14, wherein the determining unit is specifically configured to:
    当所述第一权重之和不小于所述第二权重之和,确定所述参考图像为参照图像;Determining that the reference image is a reference image when a sum of the first weights is not less than a sum of the second weights;
    当所述第一权重之和小于所述第二权重之和,确定所述第一非参考图像为参照图像。When the sum of the first weights is less than the sum of the second weights, determining that the first non-reference image is a reference image.
  22. 根据权利要求14-21任一项所述的装置,其特征在于,所述处理单元具体用于:The device according to any one of claims 14 to 21, wherein the processing unit is specifically configured to:
    当所述第一权重之和不小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述参考图像的亮度值,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像;或者,Calculating a luminance value of the first HDR image and a luminance value of the reference image when the sum of the first weights is not less than a sum of the second weights, using a luminance value and a location of the first HDR image Determining the first HDR image by using a difference in luminance values of the reference image to obtain an adjusted first HDR image; or
    当所述第一权重之和小于所述第二权重之和时,计算所述第一HDR图像的亮度值和所述第一非参考图像的亮度值,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像。Calculating a luminance value of the first HDR image and a luminance value of the first non-reference image when the sum of the first weights is smaller than a sum of the second weights, using a luminance value of the first HDR image And dithering the first HDR image with a difference in luminance values of the first non-reference image to obtain an adjusted first HDR image.
  23. 根据权利要求22所述的装置,其特征在于,所述当所述第一权重之和不小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述参考图像的亮度值的差异,对所述第一HDR图像进行调亮处理,得到调节后的第一HDR图像,包括:The apparatus according to claim 22, wherein said luminance value of said first HDR image and said reference image are used when said sum of said first weights is not less than a sum of said second weights And performing a brightness adjustment process on the first HDR image to obtain the adjusted first HDR image, including:
    以所述参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第一亮度比例进行相乘处理,得到与所述参考图像的亮度值相同的第一HDR图像;And multiplying the brightness value of the first HDR image and the preset first brightness ratio by a brightness value of the reference image to obtain a first HDR image having the same brightness value as the reference image;
    所述当所述第一权重之和小于所述第二权重之和时,利用所述第一HDR图像的亮度值和所述第一非参考图像的亮度值的差异,对所述第一HDR图像进行调暗处理,得到调节后的第一HDR图像,包括:And when the sum of the first weights is smaller than the sum of the second weights, using the difference between the brightness values of the first HDR image and the brightness values of the first non-reference image, to the first HDR The image is dimmed to obtain an adjusted first HDR image, including:
    以所述第一非参考图像的亮度值为基准,将所述第一HDR图像的亮度值与预设的第二亮度比例进行相乘处理,得到与所述第一非参考图像的亮度值相同的第一HDR图像。Multiplying the luminance value of the first HDR image with a preset second luminance ratio based on the luminance value of the first non-reference image to obtain the same luminance value as the first non-reference image The first HDR image.
  24. 根据权利要求15所述的装置,其特征在于,所述装置还包括:引导滤波和曝光矫正单元;The device according to claim 15, wherein said device further comprises: a guiding filter and an exposure correction unit;
    所述引导滤波和曝光矫正单元,用于对所述目标HDR图像进行引导滤波和曝光矫正。The guiding filtering and exposure correcting unit is configured to perform guided filtering and exposure correction on the target HDR image.
  25. 根据权利要求14所述的装置,其特征在于,所述确定单元还用于,确定所述第一非参考图像的边缘,所述边缘包括边缘像素点;The apparatus according to claim 14, wherein the determining unit is further configured to determine an edge of the first non-reference image, the edge comprising an edge pixel point;
    所述判断单元还用于,判断所述第一非参考图像中每个像素点周围的所述边缘像素点的个数值是否大于第二阈值;The determining unit is further configured to: determine whether a value of the edge pixel point around each pixel point in the first non-reference image is greater than a second threshold;
    所述确定单元还用于,如果所述边缘像素点的个数值大于第二阈值,则将所述第一非参考图像中像素点周围的边缘像素点的个数值大于第二阈值的所有像素点构成的区域确定为第一非参考图像的细节区域;The determining unit is further configured to: if the value of the edge pixel point is greater than the second threshold, the value of the edge pixel point around the pixel point in the first non-reference image is greater than all the pixel points of the second threshold The constructed area is determined as the detail area of the first non-reference image;
    所述融合单元还用于,当所述第一比例和所述第二比例都大于所述第一阈值时,将所述细节区域和所述参考图像进行融合处理,得到目标HDR图像。The merging unit is further configured to: when the first ratio and the second ratio are both greater than the first threshold, perform fusion processing on the detail region and the reference image to obtain a target HDR image.
  26. 根据权利要求15或25所述的装置,其特征在于,所述确定单元具体用于:The device according to claim 15 or 25, wherein the determining unit is specifically configured to:
    利用canny算子对所述第一非参考图像的每个像素点进行边缘检测;Performing edge detection on each pixel of the first non-reference image by using a canny operator;
    根据所述边缘检测的结果,确定所述第一非参考图像的边缘。An edge of the first non-reference image is determined based on a result of the edge detection.
  27. 一种存储程序的计算机可读存储介质,其特征在于,所述程序包括指令,所述指令用于执行权利要求1-13任一项所述的方法。A computer readable storage medium storing a program, the program comprising instructions for performing the method of any of claims 1-13.
PCT/CN2017/117106 2017-03-31 2017-12-19 Hdr image generation method and apparatus WO2018176925A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710209247.8 2017-03-31
CN201710209247.8A CN108668093B (en) 2017-03-31 2017-03-31 HDR image generation method and device

Publications (1)

Publication Number Publication Date
WO2018176925A1 true WO2018176925A1 (en) 2018-10-04

Family

ID=63674214

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/117106 WO2018176925A1 (en) 2017-03-31 2017-12-19 Hdr image generation method and apparatus

Country Status (2)

Country Link
CN (1) CN108668093B (en)
WO (1) WO2018176925A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767281A (en) * 2021-02-02 2021-05-07 北京小米松果电子有限公司 Image ghost eliminating method, device, electronic equipment and storage medium
CN113012070A (en) * 2021-03-25 2021-06-22 常州工学院 High-dynamic scene image sequence acquisition method based on fuzzy control
CN113313661A (en) * 2021-05-26 2021-08-27 Oppo广东移动通信有限公司 Image fusion method and device, electronic equipment and computer readable storage medium
CN113705509A (en) * 2021-09-02 2021-11-26 北京云蝶智学科技有限公司 Method and device for acquiring analysis information of test questions
CN115293994A (en) * 2022-09-30 2022-11-04 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110503044A (en) 2018-12-03 2019-11-26 神盾股份有限公司 Fingerprint sensor and its finger sensing method
CN111489320A (en) * 2019-01-29 2020-08-04 华为技术有限公司 Image processing method and device
CN113674181A (en) * 2020-05-13 2021-11-19 武汉Tcl集团工业研究院有限公司 Alignment fusion method and equipment for multi-exposure images
CN111915635A (en) * 2020-08-21 2020-11-10 广州云蝶科技有限公司 Test question analysis information generation method and system supporting self-examination paper marking
CN113012081A (en) * 2021-01-28 2021-06-22 北京迈格威科技有限公司 Image processing method, device and electronic system
CN113240614B (en) * 2021-04-07 2023-02-10 华南理工大学 High-dynamic image fusion method suitable for K-TIG welding ultra-strong arc light scene
CN113626633A (en) * 2021-09-01 2021-11-09 北京云蝶智学科技有限公司 Picture retrieval method and device
CN113723539A (en) * 2021-09-02 2021-11-30 北京云蝶智学科技有限公司 Test question information acquisition method and device
CN114664047A (en) * 2022-05-26 2022-06-24 长沙海信智能***研究院有限公司 Expressway fire identification method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140307044A1 (en) * 2013-04-15 2014-10-16 Qualcomm Incorporated Reference image selection for motion ghost filtering
CN105894484A (en) * 2016-03-30 2016-08-24 山东大学 HDR reconstructing algorithm based on histogram normalization and superpixel segmentation
CN106056629A (en) * 2016-05-31 2016-10-26 南京大学 High dynamic range imaging method for removing ghosts through moving object detection and extension

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101852616B (en) * 2010-04-30 2012-07-11 北京航空航天大学 Method and device for realizing extraction of star target under high dynamic condition
CN106169182B (en) * 2016-05-25 2019-08-09 西安邮电大学 A method of synthesizing several different exposure images

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140307044A1 (en) * 2013-04-15 2014-10-16 Qualcomm Incorporated Reference image selection for motion ghost filtering
CN105894484A (en) * 2016-03-30 2016-08-24 山东大学 HDR reconstructing algorithm based on histogram normalization and superpixel segmentation
CN106056629A (en) * 2016-05-31 2016-10-26 南京大学 High dynamic range imaging method for removing ghosts through moving object detection and extension

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767281A (en) * 2021-02-02 2021-05-07 北京小米松果电子有限公司 Image ghost eliminating method, device, electronic equipment and storage medium
CN112767281B (en) * 2021-02-02 2024-04-30 北京小米松果电子有限公司 Image ghost eliminating method and device, electronic equipment and storage medium
CN113012070A (en) * 2021-03-25 2021-06-22 常州工学院 High-dynamic scene image sequence acquisition method based on fuzzy control
CN113012070B (en) * 2021-03-25 2023-09-26 常州工学院 High dynamic scene image sequence acquisition method based on fuzzy control
CN113313661A (en) * 2021-05-26 2021-08-27 Oppo广东移动通信有限公司 Image fusion method and device, electronic equipment and computer readable storage medium
CN113705509A (en) * 2021-09-02 2021-11-26 北京云蝶智学科技有限公司 Method and device for acquiring analysis information of test questions
CN115293994A (en) * 2022-09-30 2022-11-04 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium
CN115293994B (en) * 2022-09-30 2022-12-16 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN108668093A (en) 2018-10-16
CN108668093B (en) 2020-08-14

Similar Documents

Publication Publication Date Title
WO2018176925A1 (en) Hdr image generation method and apparatus
CN108335279B (en) Image fusion and HDR imaging
EP2987135B1 (en) Reference image selection for motion ghost filtering
US9077913B2 (en) Simulating high dynamic range imaging with virtual long-exposure images
JP6467787B2 (en) Image processing system, imaging apparatus, image processing method, and program
KR101662846B1 (en) Apparatus and method for generating bokeh in out-of-focus shooting
US9131201B1 (en) Color correcting virtual long exposures with true long exposures
US8891867B2 (en) Image processing method
US8340417B2 (en) Image processing method and apparatus for correcting skin color
US8929683B2 (en) Techniques for registering and warping image stacks
US8284271B2 (en) Chroma noise reduction for cameras
KR20200023651A (en) Preview photo blurring method and apparatus and storage medium
US20150063694A1 (en) Techniques for combining images with varying brightness degrees
JP6720881B2 (en) Image processing apparatus and image processing method
CN107564085B (en) Image warping processing method and device, computing equipment and computer storage medium
JP6904788B2 (en) Image processing equipment, image processing methods, and programs
EP3179716B1 (en) Image processing method, computer storage medium, device, and terminal
US9900503B1 (en) Methods to automatically fix flash reflection at capture time
CN107087114B (en) Shooting method and device
US20230252612A1 (en) De-ghosting and see-through prevention for image fusion
Mangiat et al. Automatic scene relighting for video conferencing
JP6873815B2 (en) Image processing equipment, imaging equipment, image processing methods, programs, and storage media
JP2017182668A (en) Data processor, imaging device, and data processing method
JP6668646B2 (en) Image processing apparatus, image processing method, and program
CN117710264A (en) Dynamic range calibration method of image and electronic equipment

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: 17902749

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: 17902749

Country of ref document: EP

Kind code of ref document: A1