WO2021174687A1 - 去除图像中的反光的方法及装置、电子设备和存储介质 - Google Patents

去除图像中的反光的方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2021174687A1
WO2021174687A1 PCT/CN2020/092546 CN2020092546W WO2021174687A1 WO 2021174687 A1 WO2021174687 A1 WO 2021174687A1 CN 2020092546 W CN2020092546 W CN 2020092546W WO 2021174687 A1 WO2021174687 A1 WO 2021174687A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
processed
training
polarization
map
Prior art date
Application number
PCT/CN2020/092546
Other languages
English (en)
French (fr)
Inventor
雷晨阳
严琼
Original Assignee
深圳市商汤科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市商汤科技有限公司 filed Critical 深圳市商汤科技有限公司
Publication of WO2021174687A1 publication Critical patent/WO2021174687A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • the present disclosure relates to the field of image technology, and in particular, to a method and device for removing light reflection in an image, an electronic device, and a storage medium.
  • the present disclosure provides a technical solution for removing light reflection in an image.
  • a method for removing light reflection in an image including:
  • the plurality of polarization maps corresponding to the image to be processed and the light reflection prediction map corresponding to the image to be processed determine the image after reflection removal corresponding to the image to be processed.
  • the acquiring multiple polarization maps corresponding to the image to be processed and polarization information corresponding to the image to be processed includes:
  • the corresponding pixel points in the multiple polarization images corresponding to the image to be processed are processed to obtain polarization information corresponding to the image to be processed.
  • the polarization information corresponding to the image to be processed includes a first polarization information map corresponding to the image to be processed, a second polarization information map corresponding to the image to be processed, and the image to be processed At least one of the corresponding third polarization information image and the fourth polarization information image corresponding to the image to be processed, wherein the first polarization information image corresponding to the image to be processed is used to indicate the image corresponding to the image to be processed
  • the polarization intensity of the multiple polarization images, the second polarization information image corresponding to the image to be processed is used to indicate the polarization degree of the multiple polarization images corresponding to the image to be processed, and the third polarization information corresponding to the image to be processed
  • the figure is used to represent the polarization angles of the light of the multiple polarization images corresponding to the image to be processed, and the fourth polarization information image corresponding to the image to be processed is used to represent the multiple polarization images corresponding to the image to be processed to remove
  • the method before the acquiring the image to be processed, the method further includes:
  • the acquiring multiple polarization maps corresponding to the training image and the polarization information corresponding to the training image includes:
  • the corresponding pixel points in the multiple polarization images corresponding to the training image are processed to obtain polarization information corresponding to the training image.
  • the polarization information corresponding to the training image includes a first polarization information image corresponding to the training image, a second polarization information image corresponding to the training image, and a third polarization information image corresponding to the training image.
  • At least one of the polarization information image and the fourth polarization information image corresponding to the training image wherein the first polarization information image corresponding to the training image is used to represent the polarization of the multiple polarization images corresponding to the training image Strong, the second polarization information map corresponding to the training image is used to indicate the polarization degree of the multiple polarization maps corresponding to the training image, and the third polarization information map corresponding to the training image is used to indicate the polarization information map corresponding to the training image
  • the polarization angles of the light of the multiple polarization images, and the fourth polarization information image corresponding to the training image is used to represent the information of the multiple polarization images corresponding to the training image after the overexposure is removed.
  • the training the first sub-network and the second sub-network at least according to the transmitted light prediction map corresponding to the training image includes:
  • the determining the value of the first loss function according to the transmitted light prediction map corresponding to the training image and the reflection prediction map corresponding to the training image includes:
  • the transmission light prediction map corresponding to the training image and the reflection prediction map corresponding to the training image are respectively normalized to obtain a normalized transmission light prediction map and a normalized reflection prediction map corresponding to the training image picture;
  • the normalized cross-correlation value between the feature map of the first layer corresponding to the normalized transmitted light prediction image and the feature map of the first layer corresponding to the normalized reflection prediction image determine the first The value of the loss function.
  • the training the first sub-network and the second sub-network at least according to the transmitted light prediction map corresponding to the training image includes:
  • the determining the value of the second loss function according to the transmitted light prediction map and the transmitted light target map corresponding to the training image includes:
  • the overexposed transmitted light prediction image corresponding to the training image is obtained, where
  • the pixel value of the overexposed pixel is the first preset value
  • the pixel value of the non-overexposed pixel is the second preset value, wherein the The first preset value is less than the second preset value
  • the method before the obtaining the transmitted light target image corresponding to the training image according to the difference between the training image and the reflective real image corresponding to the training image, the method further includes:
  • a device for removing light reflection in an image including:
  • the first acquisition module is used to acquire the image to be processed
  • the second acquisition module is configured to acquire multiple polarization images corresponding to the image to be processed and polarization information corresponding to the image to be processed, wherein the multiple polarization images corresponding to the image to be processed are polarization images that pass through different angles.
  • the first prediction module is configured to determine the reflection prediction image corresponding to the image to be processed according to the multiple polarization images corresponding to the image to be processed and the polarization information corresponding to the image to be processed;
  • the second prediction module is configured to determine, based on the multiple polarization maps corresponding to the to-be-processed image and the reflection prediction map corresponding to the to-be-processed image, a de-reflective image corresponding to the to-be-processed image.
  • the second acquisition module is used to:
  • the corresponding pixel points in the multiple polarization images corresponding to the image to be processed are processed to obtain polarization information corresponding to the image to be processed.
  • the polarization information corresponding to the image to be processed includes a first polarization information map corresponding to the image to be processed, a second polarization information map corresponding to the image to be processed, and the image to be processed At least one of the corresponding third polarization information image and the fourth polarization information image corresponding to the image to be processed, wherein the first polarization information image corresponding to the image to be processed is used to indicate the image corresponding to the image to be processed
  • the polarization intensity of the multiple polarization images, the second polarization information image corresponding to the image to be processed is used to indicate the polarization degree of the multiple polarization images corresponding to the image to be processed, and the third polarization information corresponding to the image to be processed
  • the figure is used to represent the polarization angles of the light of the multiple polarization images corresponding to the image to be processed, and the fourth polarization information image corresponding to the image to be processed is used to represent the multiple polarization images corresponding to the image to be processed to remove
  • the device further includes:
  • the third acquisition module is configured to acquire multiple polarization images corresponding to the training image and polarization information corresponding to the training image, wherein the multiple polarization images corresponding to the training image are formed through polarizers with different angles;
  • the third prediction module is used for inputting the multiple polarization maps corresponding to the training image and the polarization information corresponding to the training image into the first sub-network of the neural network, and outputting the information corresponding to the training image via the first sub-network Reflective prediction map;
  • the fourth prediction module is configured to input the multiple polarization maps corresponding to the training image and the reflection prediction map corresponding to the training image into the second sub-network of the neural network, and output the training through the second sub-network The transmitted light prediction map corresponding to the image;
  • the training module is configured to train the first sub-network and the second sub-network at least according to the transmitted light prediction map corresponding to the training image.
  • the third acquisition module is used to:
  • the corresponding pixel points in the multiple polarization images corresponding to the training image are processed to obtain polarization information corresponding to the training image.
  • the polarization information corresponding to the training image includes a first polarization information image corresponding to the training image, a second polarization information image corresponding to the training image, and a third polarization information image corresponding to the training image.
  • At least one of the polarization information image and the fourth polarization information image corresponding to the training image wherein the first polarization information image corresponding to the training image is used to represent the polarization of the multiple polarization images corresponding to the training image Strong, the second polarization information map corresponding to the training image is used to indicate the polarization degree of the multiple polarization maps corresponding to the training image, and the third polarization information map corresponding to the training image is used to indicate the polarization information map corresponding to the training image
  • the polarization angles of the light of the multiple polarization images, and the fourth polarization information image corresponding to the training image is used to represent the information of the multiple polarization images corresponding to the training image after the overexposure is removed.
  • the training module is used to:
  • the training module is used to:
  • the transmission light prediction map corresponding to the training image and the reflection prediction map corresponding to the training image are respectively normalized to obtain a normalized transmission light prediction map and a normalized reflection prediction map corresponding to the training image picture;
  • the normalized cross-correlation value between the feature map of the first layer corresponding to the normalized transmitted light prediction image and the feature map of the first layer corresponding to the normalized reflection prediction image determine the first The value of the loss function.
  • the training module is used to:
  • the training module is used to:
  • the overexposed transmitted light prediction image corresponding to the training image is obtained, where
  • the pixel value of the overexposed pixel is the first preset value
  • the pixel value of the non-overexposed pixel is the second preset value, wherein the The first preset value is less than the second preset value
  • the device further includes:
  • the acquisition module is used to acquire the training image and the reflective real image corresponding to the training image through the polarization sensor.
  • an electronic device including: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to call the memory to store The executable instructions to perform the above method.
  • a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the above-mentioned method when executed by a processor.
  • a computer program including computer readable code, and when the computer readable code is executed in an electronic device, a processor in the electronic device executes for realizing the above method.
  • the reflection prediction map corresponding to the image to be processed is determined, and the reflection prediction map corresponding to the image to be processed is determined based on the plurality of polarization maps corresponding to the image to be processed.
  • Fig. 1 shows a flowchart of a method for removing light reflection in an image provided by an embodiment of the present disclosure.
  • Fig. 2 shows a schematic diagram of a neural network provided by an embodiment of the present disclosure.
  • FIG. 3 shows a schematic diagram of the monotonicity of the first loss function L PNCC before and after normalization of the transmitted light prediction map corresponding to the training image and the reflection prediction map corresponding to the training image in the embodiment of the present disclosure.
  • FIG. 4 shows schematic diagrams of the background image B, the transmitted light image T, the light reflection image R, and the mixed image M.
  • Fig. 5 shows a schematic diagram of a method for acquiring a training image and a reflective real image corresponding to the training image.
  • FIG. 6 shows a schematic diagram of an output image obtained after processing an input image with three different types of reflections using the method for removing reflections in an image provided by an embodiment of the present disclosure.
  • Fig. 7 shows a block diagram of a device for removing reflections in an image provided by an embodiment of the present disclosure.
  • FIG. 8 shows a block diagram of an electronic device 800 provided by an embodiment of the present disclosure.
  • FIG. 9 shows a block diagram of an electronic device 1900 provided by an embodiment of the present disclosure.
  • the glass surface may be reflective. This kind of reflection not only affects the beauty of the photo, but also may cause a lot of details of the real scene to be lost. For example, when a photo of an illegal vehicle is taken on a traffic road, the excessive reflection of the car window may make it impossible to see the driver's face.
  • embodiments of the present disclosure provide a method and device for removing light reflection in an image, an electronic device, and a storage medium.
  • a polarization map, and polarization information corresponding to the image to be processed determine the reflection prediction map corresponding to the image to be processed based on the multiple polarization images corresponding to the image to be processed and the polarization information corresponding to the image to be processed, According to the multiple polarization maps corresponding to the image to be processed and the reflection prediction map corresponding to the image to be processed, determine the image after reflection removal corresponding to the image to be processed, thereby accurately removing the reflection in the image to be processed .
  • the embodiments of the present disclosure can be applied to various application scenarios. For example, when photographing still life outside through the window, taking pictures of the scenery outside the car window in the car, taking pictures of exhibits in glass cabinets in museums, taking pictures of illegal vehicles on traffic roads, etc., the embodiments of the present disclosure can be adopted. Quickly remove the reflections in the photos taken, and provide users with photos without reflection interference. For another example, when shooting a portrait of a person wearing glasses, the embodiment of the present disclosure can be used to quickly remove the reflection in the captured photo, so that the eyes and the area around the eyes of the person are more clear.
  • the embodiments of the present disclosure can be applied to the fields of computer vision, intelligent image processing, photographing, automatic driving, robot vision, and the like.
  • Fig. 1 shows a flowchart of a method for removing light reflection in an image provided by an embodiment of the present disclosure.
  • the execution subject of the method for removing light reflection in an image may be a device for removing light reflection in an image.
  • the method for removing reflections in an image may be executed by a terminal device or a server or other processing device.
  • the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, or a portable device. Wearable equipment, etc.
  • UE user equipment
  • PDA Personal Digital Assistant
  • the method for removing light reflection in an image may be implemented by a processor invoking a computer-readable instruction stored in a memory. As shown in FIG. 1, the method for removing light reflection in an image includes step S11 to step S14.
  • step S11 an image to be processed is acquired.
  • the image to be processed may be acquired by a polarization sensor, and the image to be processed may be a single-channel image.
  • the image to be processed may include image information obtained through polarizers at four angles of 0°, 45°, 90°, and 135°.
  • step S12 multiple polarization images corresponding to the image to be processed and polarization information corresponding to the image to be processed are acquired, wherein the multiple polarization images corresponding to the image to be processed are formed by polarizing plates with different angles. of.
  • the image to be processed includes image information with four polarizer angles of 0°, 45°, 90°, and 135°. Accordingly, the number of polarization images corresponding to the image to be processed may be 4. The four polarization images corresponding to the image correspond to the four polarizer angles of 0°, 45°, 90°, and 135°, respectively.
  • the polarization image corresponding to the image to be processed may be a grayscale image.
  • the polarization information corresponding to the image to be processed may be determined according to multiple polarization maps corresponding to the image to be processed.
  • the acquiring multiple polarization maps corresponding to the image to be processed and the polarization information corresponding to the image to be processed includes: performing processing on pixels belonging to different polarizer angles in the image to be processed Separating to obtain multiple polarization maps corresponding to the image to be processed; processing corresponding pixels in the multiple polarization maps corresponding to the image to be processed to obtain polarization information corresponding to the image to be processed.
  • the pixels belonging to 0° in the image to be processed can be separated to obtain the The first polarization map corresponding to the image, separating the pixels belonging to 45° in the image to be processed, obtaining the second polarization map corresponding to the image to be processed, and separating the pixels belonging to 90° in the image to be processed , Obtain the third polarization image corresponding to the image to be processed, separate the pixels belonging to 135° in the image to be processed, and obtain the fourth polarization image corresponding to the image to be processed.
  • the polarization information corresponding to the image to be processed includes a first polarization information map corresponding to the image to be processed, a second polarization information map corresponding to the image to be processed, and the image to be processed At least one of the corresponding third polarization information image and the fourth polarization information image corresponding to the image to be processed, wherein the first polarization information image corresponding to the image to be processed is used to indicate the image corresponding to the image to be processed
  • the polarization intensity of the multiple polarization images, the second polarization information image corresponding to the image to be processed is used to indicate the polarization degree of the multiple polarization images corresponding to the image to be processed, and the third polarization information corresponding to the image to be processed
  • the figure is used to represent the polarization angles of the light of the multiple polarization images corresponding to the image to be processed, and the fourth polarization information image corresponding to the image to be processed is used to represent the multiple polarization images corresponding to the image to be processed to remove
  • a reflection prediction image corresponding to the image to be processed is determined according to the multiple polarization images corresponding to the image to be processed and the polarization information corresponding to the image to be processed.
  • the multiple polarization maps corresponding to the image to be processed and the polarization information corresponding to the image to be processed may be input to the first sub-network of the neural network, and the output of the neural network may be output through the first sub-network.
  • the reflection prediction map corresponding to the image to be processed may represent the reflection map corresponding to the image to be processed predicted by the neural network.
  • step S14 according to the plurality of polarization maps corresponding to the image to be processed and the light reflection prediction map corresponding to the image to be processed, the image after the light reflection corresponding to the image to be processed is determined.
  • the multiple polarization maps corresponding to the image to be processed and the reflection prediction map corresponding to the image to be processed may be input into the second sub-network of the neural network, and the second sub-network may be used via the second sub-network.
  • the network outputs the image with the reflection removed corresponding to the image to be processed.
  • the method before the obtaining the image to be processed, the method further includes: obtaining a plurality of polarization maps corresponding to the training image, and polarization information corresponding to the training image, wherein the training image The corresponding multiple polarization images are formed through polarizers with different angles; the multiple polarization images corresponding to the training image and the polarization information corresponding to the training image are input into the first sub-network of the neural network, and the first sub-network is passed through the first sub-network.
  • the sub-network outputs the reflection prediction map corresponding to the training image; the multiple polarization maps corresponding to the training image and the reflection prediction map corresponding to the training image are input into the second sub-network of the neural network, and the second sub-network is passed through the second
  • the sub-network outputs the transmitted light prediction map corresponding to the training image; at least the first sub-network and the second sub-network are trained according to the transmitted light prediction map corresponding to the training image.
  • the training image may be a single-channel image.
  • the height of the training image is H and the width is W.
  • the training image may include image information obtained through polarizers at four angles of 0°, 45°, 90°, and 135°.
  • the number of polarization patterns corresponding to the training image may be 4, and the 4 polarization patterns corresponding to the training image respectively correspond to the 4 polarizing plate angles of 0°, 45°, 90°, and 135°.
  • the four polarization maps corresponding to the training image can be represented as I 1 , I 2 , I 3 and I 4 .
  • the heights of I 1 , I 2 , I 3 and I 4 can be Width can be
  • the polarization image corresponding to the training image may be a grayscale image.
  • the polarization information corresponding to the training image may be determined by multiple polarization maps corresponding to the training image.
  • the reflection prediction map corresponding to the training image can be expressed as
  • the transmitted light prediction map corresponding to the training image can be expressed as Reflective prediction map output by the first sub-network As the input of the second sub-network, it can be used to obtain higher-quality transmitted light prediction maps
  • the reflection prediction image corresponding to the training image may represent the reflection image corresponding to the training image predicted by the neural network.
  • the transmitted light prediction image corresponding to the training image may represent the image predicted by the neural network after the reflection of the training image is removed.
  • the first sub-network and the second sub-network may adopt a U-Net structure.
  • the embodiments of the present disclosure are not limited to this, and those skilled in the art can also flexibly select the types and structures of the first sub-network and the second sub-network according to actual application scenario requirements and/or personal preferences.
  • the acquiring multiple polarization maps corresponding to the training image and the polarization information corresponding to the training image includes: separating pixels belonging to different polarizer angles in the training image to obtain all Multiple polarization maps corresponding to the training image; processing corresponding pixels in the multiple polarization maps corresponding to the training image to obtain polarization information corresponding to the training image. For example, if the training image includes image information obtained through four polarizers with angles of 0°, 45°, 90°, and 135°, the pixels belonging to 0° in the training image can be separated to obtain the training image.
  • the first polarization image I 1 corresponding to the image is separated from the pixels belonging to 45° in the training image, and the second polarization image I 2 corresponding to the training image is obtained, and the pixels belonging to 90° in the training image are separated At this point, the third polarization image I 3 corresponding to the training image is obtained, the pixels belonging to 135° in the training image are separated, and the fourth polarization image I 4 corresponding to the training image is obtained.
  • the polarization information corresponding to the training image includes a first polarization information image corresponding to the training image, a second polarization information image corresponding to the training image, and a third polarization information image corresponding to the training image.
  • At least one of the polarization information image and the fourth polarization information image corresponding to the training image wherein the first polarization information image corresponding to the training image is used to represent the polarization of the multiple polarization images corresponding to the training image Strong, the second polarization information map corresponding to the training image is used to indicate the polarization degree of the multiple polarization maps corresponding to the training image, and the third polarization information map corresponding to the training image is used to indicate the polarization information map corresponding to the training image
  • the polarization angle of the light, and the fourth polarization information map corresponding to the training image is used to represent the information of the multiple polarization maps corresponding to the training image after the overexposure has been removed.
  • the first polarization information map corresponding to the training image can be expressed as I
  • the second polarization information map corresponding to the training image can be expressed as ⁇
  • the third polarization information map corresponding to the training image can be expressed as
  • O the fourth polarization information map corresponding to the training image
  • formula 1 may be used to obtain the first polarization information map I corresponding to the training image:
  • x is any pixel in the figure, and the coordinates of pixel x are (i, j), where,
  • Equation 2 can be used to obtain the second polarization information map ⁇ corresponding to the training image:
  • Equation 3 can be used to obtain the third polarization information map corresponding to the training image
  • Equation 4 may be used to obtain the fourth polarization information map O corresponding to the training image:
  • 0.98.
  • max ⁇ I 1 (x),I 2 (x),I 3 (x),I 4 (x) ⁇ > ⁇ it can indicate that the pixel point x is overexposed; if max ⁇ I 1 (x), I 2 (x), I 3 (x), I 4 (x) ⁇ , it can indicate that the pixel point x is not overexposed.
  • the fourth polarization information map O corresponding to the training image if the pixel point x is overexposed, the pixel value of the pixel point x is 0; if the pixel point x is not overexposed, the pixel value of the pixel point x is 1.
  • the method for determining the first polarization information map, the second polarization information map, the third polarization information map, and the fourth polarization information map corresponding to the image to be processed, the first polarization information map corresponding to the training image The methods for determining the second polarization information map, the third polarization information map, and the fourth polarization information map are similar, which will not be repeated in the embodiment of the present disclosure.
  • the neural network is trained by using the polarization information corresponding to the training image, so that the neural network can learn to recognize the reflection image and the transmitted light image and separate them Ability.
  • the Hypercolumn in VGG-19 can be added to the input of the neural network to enhance the effect of the neural network.
  • the conv1_2 pair I 1 , I 2 , I 3, and I 3 of the VGG-19 can be used before the multiple polarization maps corresponding to the training image and the polarization information corresponding to the training image are input into the first sub-network of the neural network.
  • I 4 and I are processed, and the processing result is up-sampled by bilinear interpolation, so that the sizes of I 1 , I 2 , I 3 , I 4 and I after the up-sampling are the same as the training image.
  • gamma correction can be performed on the input image (training image or image to be processed) of the neural network first.
  • Fig. 2 shows a schematic diagram of a neural network provided by an embodiment of the present disclosure.
  • the height of the training image is H and the width is W.
  • four polarization maps I 1 , I 2 , I 3 and I 4 corresponding to the training image can be obtained.
  • the heights of I 1 , I 2 , I 3 and I 4 are Wide as By processing I 1 , I 2 , I 3 and I 4 , the first polarization information image I corresponding to the training image, the second polarization information image ⁇ corresponding to the training image, and the third polarization information image corresponding to the training image can be obtained.
  • the fourth polarization information map O corresponding to the training image.
  • the training the first sub-network and the second sub-network at least according to the transmitted light prediction map corresponding to the training image includes: according to the transmitted light corresponding to the training image The prediction map and the reflection prediction map corresponding to the training image are used to determine the value of the first loss function; at least according to the value of the first loss function, the first sub-network and the second sub-network are trained.
  • the determining the value of the first loss function according to the transmitted light prediction map corresponding to the training image and the reflection prediction map corresponding to the training image includes: the transmission light corresponding to the training image
  • the light prediction image and the reflection prediction image corresponding to the training image are respectively normalized to obtain a normalized transmitted light prediction image and a normalized reflection prediction image corresponding to the training image;
  • the transmitted light prediction map is input to the first preset network, and the characteristic map of the first layer corresponding to the normalized transmitted light prediction map is output through the first layer of the first preset network, where 1 ⁇ l ⁇ P, P represents the total number of layers of the first preset network;
  • the normalized reflection prediction map is input to the first preset network, and the first preset network is output through the first layer
  • the normalized cross-correlation value between the feature maps determines the
  • the first preset network may be VGG-19 or ResNet-18, etc., which is not limited in the embodiment of the present disclosure.
  • the transmitted light prediction map corresponding to the training image can be expressed as
  • the reflection prediction map corresponding to the training image can be expressed as
  • the first loss function L PNCC (I A , I B ) can be obtained according to Equation 5:
  • n the total number of layers used to determine the first loss function.
  • FIG. 3 shows a schematic diagram of the monotonicity of the first loss function L PNCC before and after normalization of the transmitted light prediction map corresponding to the training image and the reflection prediction map corresponding to the training image in the embodiment of the present disclosure.
  • the first loss function L PNCC can be made monotonous with the increase of ⁇ Decreasing.
  • the training the first sub-network and the second sub-network at least according to the transmitted light prediction image corresponding to the training image includes: according to the training image and the training image The difference between the real reflection images corresponding to the image, and obtain the transmitted light target map corresponding to the training image; determine the value of the second loss function according to the transmitted light prediction map corresponding to the training image and the transmitted light target map; at least according to The value of the second loss function is used to train the first sub-network and the second sub-network.
  • the pixel value of the pixel in the training image may be subtracted from the pixel value of the corresponding pixel in the reflective real image corresponding to the training image to obtain the transmitted light target image corresponding to the training image.
  • the transmitted light target image corresponding to the training image may indicate the ground truth of the transmitted light image corresponding to the training image, that is, the transmitted light target image corresponding to the training image may indicate that the training image is de-reflective. The true value of the post image.
  • FIG. 4 shows schematic diagrams of the background image B, the transmitted light image T, the light reflection image R, and the mixed image M.
  • the background image B represents a view obtained by directly photographing the subject (ie, the background) without passing through the glass.
  • the hybrid map M is a map obtained by photographing the subject behind the glass through the glass.
  • the background image B is used as the supervision information of the network. Since the photo taken through the glass will be refracted, the position of the corresponding image information in the image is different in the background image B and the photo (mixed image M with reflection).
  • the transmitted light target image corresponding to the training image is obtained according to the difference between the training image and the reflective real image corresponding to the training image, and the transmitted light target image is used as the supervision information of the neural network.
  • This can make the transmitted light target image and the corresponding image information in the training image have the same position in the image, and can solve the problem of misalignment in the image of the background image and the corresponding image information in the mixed image in the related art, so as to provide high quality
  • the neural network obtained from this training can more accurately remove the reflection in the input image and obtain a higher quality output image.
  • the training image is a mixed image M with reflection
  • the actual reflection image is the true value of the reflection image R corresponding to the training image.
  • the method provided by this implementation mode can handle various forms of reflected light, so that the image reflection problem caused by complex light sources in the real world can be dealt with, and the generalization ability is strong.
  • the method before obtaining the transmitted light target image corresponding to the training image according to the difference between the training image and the reflective real image corresponding to the training image, the method further includes: The sensor collects the training image and the reflective real image corresponding to the training image.
  • Fig. 5 shows a schematic diagram of a method for acquiring a training image and a reflective real image corresponding to the training image.
  • a black cloth can be used to cover the back of the glass to block all the transmitted light, the real reflection image can be collected by the polarization sensor, and then the black cloth can be removed, and the corresponding training images can be collected by the polarization sensor.
  • different types of glasses may be used to obtain the training images and the reflective real images corresponding to the training images, so as to obtain rich and diverse training data.
  • the training image and the reflective real image corresponding to the training image are collected in the above-mentioned manner, and the difference between the training image and the reflective real image corresponding to the training image is used as the transmitted light target image corresponding to the training image.
  • This does not require the glass to have a special material, thickness, color, etc., that is, the glass applicable to the embodiments of the present disclosure can be flat, curved, thin, thick, colored, uncolored, etc., so as to be able to Suitable for a wider range of application scenarios.
  • the training image and the reflective real image corresponding to the training image can also be obtained through a simulation system.
  • the determining the value of the second loss function according to the transmitted light prediction map corresponding to the training image and the transmitted light target map includes: predicting the transmitted light corresponding to the training image Fig. 4 is the product of the pixel values of the corresponding pixels in the fourth polarization information image corresponding to the training image to obtain the transmission light prediction image corresponding to the training image, where the overexposure is removed.
  • the pixel value of the overexposed pixel is a first preset value
  • the pixel value of the non-overexposed pixel is a second preset value, wherein the first preset value is smaller than the second preset value.
  • Preset value according to the product of the transmitted light target image and the pixel value of the corresponding pixel in the fourth polarization information image corresponding to the training image, obtain the transmitted light target image corresponding to the training image without overexposure;
  • the overexposed transmitted light prediction map is input into a second preset network, and the feature map of the k-th layer corresponding to the overexposed transmitted light prediction map is output via the k-th layer of the second preset network, where , 1 ⁇ k ⁇ Q, Q represents the total number of layers of the second preset network; input the overexposed transmitted light target image into the second preset network,
  • the kth layer outputs the feature map of the kth layer corresponding to the overexposed transmitted light target image; according to the feature map of the kth layer corresponding to the overexposed transmitted light prediction image and the removed overexposed transmission
  • the difference between the feature maps of the k-th layer corresponding to the light target map determines the value of the second loss function.
  • the second preset network may be VGG-19 or ResNet-18, etc., which is not limited in the embodiment of the present disclosure.
  • the first preset value may be 0, and the second preset value may be 1.
  • the embodiments of the present disclosure are not limited to this.
  • the first preset value may be 0.01, and the second preset value may be 1.
  • Equation 6 the second loss function can be expressed by Equation 6:
  • T represents the transmitted light target image
  • O represents the transmitted light prediction map
  • O represents the fourth polarization information map corresponding to the training image
  • ⁇ k represents the weight of the k-th layer
  • ⁇ k can be initialized based on the number of parameters of each layer
  • O ⁇ T represents the removal of the overexposed transmitted light target picture
  • v k (O ⁇ T) represents the feature map of the k-th layer obtained after inputting O ⁇ T into the second preset network
  • Means will The feature map of the k-th layer obtained after inputting the second preset network
  • m represents the total number of layers used to determine the second loss function.
  • the loss function of the neural network may be equal to the sum of the first loss function and the second loss function.
  • the learning rate is set to 0.0001, training 200 epoch (period), and then the learning rate is set to 0.00001, continue Train for 200 epochs.
  • the number of training images used in each epoch can be adjusted according to the total number of training images.
  • FIG. 6 shows a schematic diagram of an output image obtained after processing an input image with three different types of reflections using the method for removing reflections in an image provided by an embodiment of the present disclosure.
  • the neural network provided by the embodiment of the present disclosure can accurately remove the reflective layer in the input image, and obtain a higher-quality output image after the reflection is removed.
  • the method for removing light reflection in an image does not limit the type of light reflection and the type of light source, and can deal with the problem of image reflection caused by complex light sources in the real world, and has a wide range of application scenarios.
  • the neural network training method provided by the embodiments of the present disclosure can quickly complete the training of the network.
  • the embodiments of the present disclosure use a deep network to quickly and accurately predict and obtain a transmitted light prediction map (that is, a map after reflections are removed).
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • the present disclosure also provides devices, electronic devices, computer-readable storage media, and programs for removing light reflections in images. All of the above can be used to implement any of the methods for removing light reflections in images provided in the present disclosure, and the corresponding technical solutions and Description and refer to the corresponding records in the method section, and will not repeat them.
  • Fig. 7 shows a block diagram of a device for removing reflections in an image provided by an embodiment of the present disclosure.
  • the device for removing reflections in an image includes: a first acquisition module 71 for acquiring an image to be processed; a second acquisition module 72 for acquiring multiple polarization maps corresponding to the image to be processed , And the polarization information corresponding to the image to be processed, wherein the multiple polarization images corresponding to the image to be processed are formed by polarizing plates with different angles; the first prediction module 73 is configured to correspond to the image to be processed And the polarization information corresponding to the image to be processed to determine the reflection prediction image corresponding to the image to be processed; the second prediction module 74 is configured to determine the reflection prediction image corresponding to the image to be processed according to the polarization image and the polarization information corresponding to the image to be processed.
  • the light reflection prediction map corresponding to the image to be processed is determined, and the light reflection-removed image corresponding to the image to be processed is determined
  • the second acquisition module 72 is configured to: separate pixels belonging to different polarizer angles in the image to be processed to obtain multiple polarization images corresponding to the image to be processed; The corresponding pixel points in the multiple polarization images corresponding to the image to be processed are processed to obtain polarization information corresponding to the image to be processed.
  • the polarization information corresponding to the image to be processed includes a first polarization information map corresponding to the image to be processed, a second polarization information map corresponding to the image to be processed, and the image to be processed At least one of the corresponding third polarization information image and the fourth polarization information image corresponding to the image to be processed, wherein the first polarization information image corresponding to the image to be processed is used to indicate the image corresponding to the image to be processed
  • the polarization intensity of the multiple polarization images, the second polarization information image corresponding to the image to be processed is used to indicate the polarization degree of the multiple polarization images corresponding to the image to be processed, and the third polarization information corresponding to the image to be processed
  • the figure is used to represent the polarization angles of the light of the multiple polarization images corresponding to the image to be processed, and the fourth polarization information image corresponding to the image to be processed is used to represent the multiple polarization images corresponding to the image to be processed to remove
  • the device further includes: a third acquisition module, configured to acquire multiple polarization maps corresponding to the training image, and polarization information corresponding to the training image, wherein the training image corresponds to The multiple polarization maps are formed through polarizers with different angles; the third prediction module is used to input the multiple polarization maps corresponding to the training image and the polarization information corresponding to the training image into the first sub-network of the neural network, Output the reflection prediction map corresponding to the training image via the first sub-network; a fourth prediction module is used to input multiple polarization maps corresponding to the training image and the reflection prediction map corresponding to the training image into the nerve The second sub-network of the network outputs the transmitted light prediction map corresponding to the training image via the second sub-network; the training module is used to train the first sub-network at least according to the transmitted light prediction map corresponding to the training image Network and the second sub-network.
  • a third acquisition module configured to acquire multiple polarization maps corresponding to the training image, and polarization
  • the third acquisition module is used to: separate pixels belonging to different polarizer angles in the training image to obtain multiple polarization maps corresponding to the training image; Corresponding pixel points in multiple polarization images are processed to obtain polarization information corresponding to the training image.
  • the polarization information corresponding to the training image includes a first polarization information image corresponding to the training image, a second polarization information image corresponding to the training image, and a third polarization information image corresponding to the training image.
  • At least one of the polarization information image and the fourth polarization information image corresponding to the training image wherein the first polarization information image corresponding to the training image is used to represent the polarization of the multiple polarization images corresponding to the training image Strong, the second polarization information map corresponding to the training image is used to indicate the polarization degree of the multiple polarization maps corresponding to the training image, and the third polarization information map corresponding to the training image is used to indicate the polarization information map corresponding to the training image
  • the polarization angles of the light of the multiple polarization images, and the fourth polarization information image corresponding to the training image is used to represent the information of the multiple polarization images corresponding to the training image after the overexposure is removed.
  • the training module is configured to: determine the value of the first loss function according to the transmitted light prediction map corresponding to the training image and the reflection prediction map corresponding to the training image; The value of the first loss function is used to train the first sub-network and the second sub-network.
  • the training module is used to: normalize the transmitted light prediction map corresponding to the training image and the reflection prediction map corresponding to the training image to obtain the training image corresponding
  • the normalized transmitted light prediction map and the normalized reflection prediction map; the normalized transmitted light prediction map is input to the first preset network, and the output of the first preset network is output through the first layer of the first preset network.
  • the characteristic map of the first layer corresponding to the normalized transmitted light prediction map where 1 ⁇ l ⁇ P, and P represents the total number of layers of the first preset network;
  • the normalized reflection prediction map Input the first preset network, output the feature map of the first layer corresponding to the normalized reflection prediction map through the first layer of the first preset network; predict according to the normalized transmitted light
  • the normalized cross-correlation value between the feature map of the first layer corresponding to the image and the feature map of the first layer corresponding to the normalized reflection prediction image determines the value of the first loss function.
  • the training module is configured to: obtain the transmitted light target image corresponding to the training image according to the difference between the training image and the reflective real image corresponding to the training image; Determine the value of the second loss function according to the transmitted light prediction map and the transmitted light target map corresponding to the image; and train the first sub-network and the second sub-network at least according to the value of the second loss function.
  • the training module is configured to: obtain the product of the corresponding pixel values in the fourth polarization information image corresponding to the training image and the transmitted light prediction image corresponding to the training image The training image corresponding to the overexposed transmitted light prediction map, wherein, in the fourth polarization information map corresponding to the training image, the pixel value of the overexposed pixel is the first preset value, and the pixel value of the overexposed pixel is the first preset value.
  • the pixel value of the pixel point is a second preset value, wherein the first preset value is less than the second preset value; according to the fourth polarization information image corresponding to the transmitted light target image and the training image The product of the pixel values of the corresponding pixel points is used to obtain the target image of the transmitted light for removing the overexposure corresponding to the training image;
  • the k-th layer of the network outputs the feature map of the k-th layer corresponding to the overexposed transmitted light prediction map, where 1 ⁇ k ⁇ Q, and Q represents the total number of layers of the second preset network;
  • the overexposed transmitted light target map is input into the second preset network, and the feature map of the k-th layer corresponding to the overexposed transmitted light target map is output via the k-th layer of the second preset network; according to The difference between the feature map of the k-th layer corresponding to the overexposed transmitted light prediction image and the feature map of the k-th layer corresponding to the overexposed transmitted light target
  • the device further includes: an acquisition module, configured to acquire a training image and a reflective real image corresponding to the training image through a polarization sensor.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the foregoing method when executed by a processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium, or may be a volatile computer-readable storage medium.
  • the embodiments of the present disclosure also provide a computer program product, which includes computer-readable code, and when the computer-readable code is executed on an electronic device, the processor in the electronic device executes the method for realizing the foregoing method.
  • the embodiments of the present disclosure also provide another computer program product, which is used to store computer-readable instructions.
  • the computer executes the operations of the method for removing reflections in the image provided by any of the foregoing embodiments.
  • An embodiment of the present disclosure also provides an electronic device, including: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to call the executable stored in the memory Instructions to perform the above method.
  • the electronic device can be provided as a terminal, server or other form of device.
  • FIG. 8 shows a block diagram of an electronic device 800 provided by an embodiment of the present disclosure.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method to operate on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic Disk Magnetic Disk or Optical Disk.
  • the power supply component 806 provides power for various components of the electronic device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with the generation, management, and distribution of power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the above-mentioned peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, 3G, 4G/LTE, 5G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field-available A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application-specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field-available A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • FIG. 9 shows a block diagram of an electronic device 1900 provided by an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to the network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows Mac OS Or similar.
  • a non-volatile computer-readable storage medium is also provided, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the foregoing method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as the instantaneous signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
  • Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network-including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect to the user's computer) connect).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine that makes these instructions when executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner. Thus, the computer-readable medium storing the instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more components for realizing the specified logical function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically implemented by hardware, software, or a combination thereof.
  • the computer program product is specifically embodied as a computer storage medium.
  • the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc. Wait.
  • SDK software development kit

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及一种去除图像中的反光的方法及装置、电子设备和存储介质。所述方法包括:获取待处理图像;获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,其中,所述待处理图像对应的多个偏振图是经过不同角度的偏振片形成的;根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图;根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像。

Description

去除图像中的反光的方法及装置、电子设备和存储介质
本申请要求在2020年3月4日提交中国专利局、申请号为202010144325.2、申请名称为“去除图像中的反光的方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及图像技术领域,尤其涉及一种去除图像中的反光的方法及装置、电子设备和存储介质。
背景技术
在实际生活和工作中,利用相机拍摄照片在某些情况下需要透过玻璃拍摄物体。例如透过窗户拍摄外面的静物,拍摄戴眼镜的人物照片,在博物馆拍摄玻璃柜内的展品,在交通道路上拍摄违法车辆的照片等。由于玻璃的两侧的光照条件不同,玻璃表面有一定可能产生反光。
发明内容
本公开提供了一种去除图像中的反光的技术方案。
根据本公开的一方面,提供了一种去除图像中的反光的方法,包括:
获取待处理图像;
获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,其中,所述待处理图像对应的多个偏振图是经过不同角度的偏振片形成的;
根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图;
根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像。
在一种可能的实现方式中,所述获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,包括:
对待处理图像中属于不同偏振片角度的像素点进行分离,得到所述待处理图像对应的多个偏振图;
对所述待处理图像对应的多个偏振图中相应的像素点进行处理,得到所述待处理图像对应的偏振信息。
在一种可能的实现方式中,所述待处理图像对应的偏振信息包括所述待处理图像对应的第一偏振信息图、所述待处理图像对应的第二偏振信息图、所述待处理图像对应的第三偏振信息图和所述待处理图像对应的第四偏振信息图中的至少之一,其中,所述待处理图像对应的第一偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振光强,所述待处理图像对应的第二偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振程度,所述待处理图像对应的第三偏振信息图用于表示所述待处理图像对应的多个偏振图的光的偏振角度,所述待处理图像对应的第四偏振信息图用于表示所述待处理图像对应的多个偏振图去除过曝后的信息。
在一种可能的实现方式中,在所述获取待处理图像之前,所述方法还包括:
获取训练图像对应的多个偏振图,以及所述训练图像对应的偏振信息,其中,所述训练图像对应的多个偏振图是经过不同角度的偏振片形成的;
将所述训练图像对应的多个偏振图和所述训练图像对应的偏振信息输入神经网络的第一子网络,经由所述第一子网络输出所述训练图像对应的反光预测图;
将所述训练图像对应的多个偏振图和所述训练图像对应的反光预测图输入所述神经网络的第二子网络,经由所述第二子网络输出所述训练图像对应的透射光预测图;
至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述获取训练图像对应的多个偏振图,以及所述训练图像对应的偏振信息,包括:
对训练图像中属于不同偏振片角度的像素点进行分离,得到所述训练图像对应的多个偏振图;
对所述训练图像对应的多个偏振图中相应的像素点进行处理,得到所述训练图像对应的偏振信息。
在一种可能的实现方式中,所述训练图像对应的偏振信息包括所述训练图像对应的第一偏振信息图、所述训练图 像对应的第二偏振信息图、所述训练图像对应的第三偏振信息图和所述训练图像对应的第四偏振信息图中的至少之一,其中,所述训练图像对应的第一偏振信息图用于表示所述训练图像对应的多个偏振图的偏振光强,所述训练图像对应的第二偏振信息图用于表示所述训练图像对应的多个偏振图的偏振程度,所述训练图像对应的第三偏振信息图用于表示所述训练图像对应的多个偏振图的光的偏振角度,所述训练图像对应的第四偏振信息图用于表示所述训练图像对应的多个偏振图去除过曝后的信息。
在一种可能的实现方式中,所述至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络,包括:
根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值;
至少根据所述第一损失函数的值,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值,包括:
对所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图分别进行归一化处理,得到所述训练图像对应的归一化的透射光预测图和归一化的反光预测图;
将所述归一化的透射光预测图输入第一预设网络,经由所述第一预设网络的第l层输出所述归一化的透射光预测图对应的第l层的特征图,其中,1≤l≤P,P表示所述第一预设网络的总层数;
将所述归一化的反光预测图输入所述第一预设网络,经由所述第一预设网络的第l层输出所述归一化的反光预测图对应的第l层的特征图;
根据所述归一化的透射光预测图对应的第l层的特征图与所述归一化的反光预测图对应的第l层的特征图之间的归一化互相关值,确定第一损失函数的值。
在一种可能的实现方式中,所述至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络,包括:
根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图;
根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值;
至少根据所述第二损失函数的值,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值,包括:
根据所述训练图像对应的透射光预测图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光预测图,其中,在所述训练图像对应的第四偏振信息图中,过曝的像素点的像素值为第一预设值,非过曝的像素点的像素值为第二预设值,其中,所述第一预设值小于所述第二预设值;
根据所述透射光目标图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光目标图;
将所述去除过曝的透射光预测图输入第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光预测图对应的第k层的特征图,其中,1≤k≤Q,Q表示所述第二预设网络的总层数;
将所述去除过曝的透射光目标图输入所述第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光目标图对应的第k层的特征图;
根据所述去除过曝的透射光预测图对应的第k层的特征图与所述去除过曝的透射光目标图对应的第k层的特征图之间的差值,确定第二损失函数的值。
在一种可能的实现方式中,在所述根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图之前,所述方法还包括:
根据本公开的一方面,提供了一种去除图像中的反光的装置,包括:
第一获取模块,用于获取待处理图像;
第二获取模块,用于获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,其中,所述待处理图像对应的多个偏振图是经过不同角度的偏振片形成的;
第一预测模块,用于根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图;
第二预测模块,用于根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像。
在一种可能的实现方式中,所述第二获取模块用于:
对待处理图像中属于不同偏振片角度的像素点进行分离,得到所述待处理图像对应的多个偏振图;
对所述待处理图像对应的多个偏振图中相应的像素点进行处理,得到所述待处理图像对应的偏振信息。
在一种可能的实现方式中,所述待处理图像对应的偏振信息包括所述待处理图像对应的第一偏振信息图、所述待处理图像对应的第二偏振信息图、所述待处理图像对应的第三偏振信息图和所述待处理图像对应的第四偏振信息图中的至少之一,其中,所述待处理图像对应的第一偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振光强,所述待处理图像对应的第二偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振程度,所述待处理图像对应的第三偏振信息图用于表示所述待处理图像对应的多个偏振图的光的偏振角度,所述待处理图像对应的第四偏振信息图用于表示所述待处理图像对应的多个偏振图去除过曝后的信息。
在一种可能的实现方式中,所述装置还包括:
第三获取模块,用于获取训练图像对应的多个偏振图,以及所述训练图像对应的偏振信息,其中,所述训练图像对应的多个偏振图是经过不同角度的偏振片形成的;
第三预测模块,用于将所述训练图像对应的多个偏振图和所述训练图像对应的偏振信息输入神经网络的第一子网络,经由所述第一子网络输出所述训练图像对应的反光预测图;
第四预测模块,用于将所述训练图像对应的多个偏振图和所述训练图像对应的反光预测图输入所述神经网络的第二子网络,经由所述第二子网络输出所述训练图像对应的透射光预测图;
训练模块,用于至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述第三获取模块用于:
对训练图像中属于不同偏振片角度的像素点进行分离,得到所述训练图像对应的多个偏振图;
对所述训练图像对应的多个偏振图中相应的像素点进行处理,得到所述训练图像对应的偏振信息。
在一种可能的实现方式中,所述训练图像对应的偏振信息包括所述训练图像对应的第一偏振信息图、所述训练图像对应的第二偏振信息图、所述训练图像对应的第三偏振信息图和所述训练图像对应的第四偏振信息图中的至少之一,其中,所述训练图像对应的第一偏振信息图用于表示所述训练图像对应的多个偏振图的偏振光强,所述训练图像对应的第二偏振信息图用于表示所述训练图像对应的多个偏振图的偏振程度,所述训练图像对应的第三偏振信息图用于表示所述训练图像对应的多个偏振图的光的偏振角度,所述训练图像对应的第四偏振信息图用于表示所述训练图像对应的多个偏振图去除过曝后的信息。
在一种可能的实现方式中,所述训练模块用于:
根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值;
至少根据所述第一损失函数的值,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述训练模块用于:
对所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图分别进行归一化处理,得到所述训练图像对应的归一化的透射光预测图和归一化的反光预测图;
将所述归一化的透射光预测图输入第一预设网络,经由所述第一预设网络的第l层输出所述归一化的透射光预测图对应的第l层的特征图,其中,1≤l≤P,P表示所述第一预设网络的总层数;
将所述归一化的反光预测图输入所述第一预设网络,经由所述第一预设网络的第l层输出所述归一化的反光预测图对应的第l层的特征图;
根据所述归一化的透射光预测图对应的第l层的特征图与所述归一化的反光预测图对应的第l层的特征图之间的归一化互相关值,确定第一损失函数的值。
在一种可能的实现方式中,所述训练模块用于:
根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图;
根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值;
至少根据所述第二损失函数的值,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述训练模块用于:
根据所述训练图像对应的透射光预测图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光预测图,其中,在所述训练图像对应的第四偏振信息图中,过曝的像素点的像素值为第一预设值,非过曝的像素点的像素值为第二预设值,其中,所述第一预设值小于所述第二预设值;
根据所述透射光目标图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光目标图;
将所述去除过曝的透射光预测图输入第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光预测图对应的第k层的特征图,其中,1≤k≤Q,Q表示所述第二预设网络的总层数;
将所述去除过曝的透射光目标图输入所述第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光目标图对应的第k层的特征图;
根据所述去除过曝的透射光预测图对应的第k层的特征图与所述去除过曝的透射光目标图对应的第k层的特征图之间的差值,确定第二损失函数的值。
在一种可能的实现方式中,所述装置还包括:
采集模块,用于通过偏振传感器采集训练图像和所述训练图像对应的反光真实图。
根据本公开的一方面,提供了一种电子设备,包括:一个或多个处理器;用于存储可执行指令的存储器;其中,所述一个或多个处理器被配置为调用所述存储器存储的可执行指令,以执行上述方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
根据本公开的一方面,提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法。
在本公开实施例中,通过获取待处理图像,获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图,根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像,由此能够准确地去除待处理图像中的反光。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出本公开实施例提供的去除图像中的反光的方法的流程图。
图2示出本公开实施例提供的神经网络的示意图。
图3示出本公开实施例中对训练图像对应的透射光预测图和训练图像对应的反光预测图归一化前后第一损失函数L PNCC的单调性的示意图。
图4示出了背景图B、透射光图T、反光图R和混合图M的示意图。
图5示出了训练图像和训练图像对应的反光真实图的采集方法的示意图。
图6示出采用本公开实施例提供的去除图像中的反光的方法对带有三种不同类型的反光的输入图像进行处理后得到的输出图像的示意图。
图7示出本公开实施例提供的去除图像中的反光的装置的框图。
图8示出本公开实施例提供的一种电子设备800的框图。
图9示出本公开实施例提供的一种电子设备1900的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为 优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
如上所述,由于玻璃的两侧的光照条件不同,玻璃表面有一定可能产生反光。此类反光不仅影响照片的美观,更可能使得大量真实场景的细节丢失,例如,在交通道路上拍摄违法车辆的照片时,车窗反光过强可能导致无法看见驾驶员的人脸。
为了解决类似上文所述的技术问题,本公开实施例提供了一种去除图像中的反光的方法及装置、电子设备和存储介质,通过获取待处理图像,获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图,根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像,由此能够准确地去除待处理图像中的反光。
本公开实施例可以应用于各种应用场景中。例如,在透过窗户拍摄外面的静物,在车内对车窗外的景色进行拍照,在博物馆拍摄玻璃柜内的展品,在交通道路上拍摄违法车辆的照片等情况下,可以采用本公开实施例快速去除拍摄的照片中的反光,给用户提供没有反光干扰的照片。又如,当拍摄戴眼镜的人像时,可以采用本公开实施例快速去除拍摄的照片中的反光,使人物的眼睛及眼周区域更加清晰。
本公开实施例可以应用于计算机视觉、智能图像处理、拍照、自动驾驶、机器人视觉等领域。
图1示出本公开实施例提供的去除图像中的反光的方法的流程图。所述去除图像中的反光的方法的执行主体可以是去除图像中的反光的装置。例如,所述去除图像中的反光的方法可以由终端设备或服务器或其它处理设备执行。其中,终端设备可以是用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备或者可穿戴设备等。在一些可能的实现方式中,所述去除图像中的反光的方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。如图1所示,所述去除图像中的反光的方法包括步骤S11至步骤S14。
在步骤S11中,获取待处理图像。
在本公开实施例中,所述待处理图像可以是通过偏振传感器采集得到的,所述待处理图像可以是单通道的图像。例如,所述待处理图像可以包括经过4个角度0°、45°、90°和135°的偏振片得到的图像信息。
在步骤S12中,获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,其中,所述待处理图像对应的多个偏振图是经过不同角度的偏振片形成的。
例如,所述待处理图像包括4个偏振片角度0°、45°、90°和135°的图像信息,相应地,所述待处理图像对应的偏振图的数量可以为4,所述待处理图像对应的4个偏振图分别对应于0°、45°、90°和135°这4个偏振片角度。
在一种可能的实现方式中,所述待处理图像对应的偏振图可以是灰度图。
在本公开实施例中,所述待处理图像对应的偏振信息可以根据所述待处理图像对应的多个偏振图确定。
在一种可能的实现方式中,所述获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,包括:对待处理图像中属于不同偏振片角度的像素点进行分离,得到所述待处理图像对应的多个偏振图;对所述待处理图像对应的多个偏振图中相应的像素点进行处理,得到所述待处理图像对应的偏振信息。例如,所述待处理图像包括4个偏振片角度0°、45°、90°和135°的图像信息,则可以分离出所述待处理图像中属于0°的像素点,得到所述待处理图像对应的第一偏振图,分离出所述待处理图像中属于45°的像素点,得到所述待处理图像对应的第二偏振图,分离出所述待处理图像中属于90°的像素点,得到所述待处理图像对应的第三偏振图,分离出所述待处理图像中属于135°的像素点,得到所述待处理图像对应的第四偏振图。
在一种可能的实现方式中,所述待处理图像对应的偏振信息包括所述待处理图像对应的第一偏振信息图、所述待处理图像对应的第二偏振信息图、所述待处理图像对应的第三偏振信息图和所述待处理图像对应的第四偏振信息图中 的至少之一,其中,所述待处理图像对应的第一偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振光强,所述待处理图像对应的第二偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振程度,所述待处理图像对应的第三偏振信息图用于表示所述待处理图像对应的多个偏振图的光的偏振角度,所述待处理图像对应的第四偏振信息图用于表示所述待处理图像对应的多个偏振图去除过曝后的信息。
在步骤S13中,根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图。
在一种可能的实现方式中,可以将所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息输入神经网络的第一子网络,经由所述第一子网络输出所述待处理图像对应的反光预测图。在该实现方式中,所述待处理图像对应的反光预测图可以表示所述神经网络预测的所述待处理图像对应的反光图。
在步骤S14中,根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像。
在一种可能的实现方式中,可以将所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图输入所述神经网络的第二子网络,经由所述第二子网络输出所述待处理图像对应的去除反光后的图像。
在一种可能的实现方式中,在所述获取待处理图像之前,所述方法还包括:获取训练图像对应的多个偏振图,以及所述训练图像对应的偏振信息,其中,所述训练图像对应的多个偏振图是经过不同角度的偏振片形成的;将所述训练图像对应的多个偏振图和所述训练图像对应的偏振信息输入神经网络的第一子网络,经由所述第一子网络输出所述训练图像对应的反光预测图;将所述训练图像对应的多个偏振图和所述训练图像对应的反光预测图输入所述神经网络的第二子网络,经由所述第二子网络输出所述训练图像对应的透射光预测图;至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络。
在该实现方式中,所述训练图像可以是单通道的图像。例如,训练图像的高为H,宽为W。作为该实现方式的一个示例,所述训练图像可以包括经过4个角度0°、45°、90°和135°的偏振片得到的图像信息。相应地,所述训练图像对应的偏振图的数量可以为4,所述训练图像对应的4个偏振图分别对应于0°、45°、90°和135°这4个偏振片角度。例如,训练图像对应的4个偏振图可以表示为I 1、I 2、I 3和I 4。其中,I 1、I 2、I 3和I 4的高可以为
Figure PCTCN2020092546-appb-000001
宽可以为
Figure PCTCN2020092546-appb-000002
其中,所述训练图像对应的偏振图可以是灰度图。在该实现方式中,所述训练图像对应的偏振信息可以所述训练图像对应的多个偏振图确定。所述训练图像对应的反光预测图可以表示为
Figure PCTCN2020092546-appb-000003
所述训练图像对应的透射光预测图可以表示为
Figure PCTCN2020092546-appb-000004
第一子网络输出的反光预测图
Figure PCTCN2020092546-appb-000005
作为第二子网络的输入,可以用于得到更高质量的透射光预测图
Figure PCTCN2020092546-appb-000006
在该实现方式中,所述训练图像对应的反光预测图可以表示所述神经网络预测的所述训练图像对应的反光图。所述训练图像对应的透射光预测图可以表示所述神经网络预测的所述训练图像去除反光后的图像。
作为该实现方式的一个示例,所述第一子网络和所述第二子网络可以采用U-Net的结构。当然,本公开实施例不限于此,本领域技术人员也可以根据实际应用场景需求和/或个人喜好灵活选择第一子网络和第二子网络的类型和结构。
在一种可能的实现方式中,所述获取训练图像对应的多个偏振图,以及所述训练图像对应的偏振信息,包括:对训练图像中属于不同偏振片角度的像素点进行分离,得到所述训练图像对应的多个偏振图;对所述训练图像对应的多个偏振图中相应的像素点进行处理,得到所述训练图像对应的偏振信息。例如,所述训练图像包括经过4个角度0°、45°、90°和135°的偏振片得到的图像信息,则可以分离出所述训练图像中属于0°的像素点,得到所述训练图像对应的第一偏振图I 1,分离出所述训练图像中属于45°的像素点,得到所述训练图像对应的第二偏振图I 2,分离出所述训练图像中属于90°的像素点,得到所述训练图像对应的第三偏振图I 3,分离出所述训练图像中属于135°的像素点,得到所述训练图像对应的第四偏振图I 4
在一种可能的实现方式中,所述训练图像对应的偏振信息包括所述训练图像对应的第一偏振信息图、所述训练图像对应的第二偏振信息图、所述训练图像对应的第三偏振信息图和所述训练图像对应的第四偏振信息图中的至少之一,其中,所述训练图像对应的第一偏振信息图用于表示所述训练图像对应的多个偏振图的偏振光强,所述训练图像对应的第二偏振信息图用于表示所述训练图像对应的多个偏振图的偏振程度,所述训练图像对应的第三偏振信息图用于表示所述训练图像对应的光的偏振角度,所述训练图像对应的第四偏振信息图用于表示所述训练图像对应的多个偏振图去除过曝后的信息。
例如,训练图像对应的第一偏振信息图可以表示为I、训练图像对应的第二偏振信息图可以表示为ρ、训练图像对应的第三偏振信息图可以表示为
Figure PCTCN2020092546-appb-000007
和训练图像对应的第四偏振信息图可以表示为O。
作为该实现方式的一个示例,可以采用式1得到训练图像对应的第一偏振信息图I:
I(x)=(I 1(x)+I 2(x)+I 3(x)+I 4(x))/2     式1,
其中,x为图中任一像素点,像素点x的坐标为(i,j),其中,
Figure PCTCN2020092546-appb-000008
作为该实现方式的一个示例,可以采用式2得到训练图像对应的第二偏振信息图ρ:
Figure PCTCN2020092546-appb-000009
作为该实现方式的一个示例,可以采用式3得到训练图像对应的第三偏振信息图
Figure PCTCN2020092546-appb-000010
Figure PCTCN2020092546-appb-000011
作为该实现方式的一个示例,可以采用式4得到训练图像对应的第四偏振信息图O:
Figure PCTCN2020092546-appb-000012
例如,δ=0.98。其中,若max{I 1(x),I 2(x),I 3(x),I 4(x)}>δ,则可以表明像素点x过曝;若max{I 1(x),I 2(x),I 3(x),I 4(x)}≤δ,则可以表明像素点x非过曝。在训练图像对应的第四偏振信息图O中,若像素点x过曝,则像素点x的像素值为0;若像素点x非过曝,则像素点x的像素值为1。
上文中,所述待处理图像对应的第一偏振信息图、第二偏振信息图、第三偏振信息图和第四偏振信息图的确定方法,与所述训练图像对应的第一偏振信息图、第二偏振信息图、第三偏振信息图和第四偏振信息图的确定方法类似,本公开实施例对此不再赘述。
由于反光图与透射光图在偏振信息上具有较大的差异,因此,通过采用所述训练图像对应的偏振信息训练神经网络,使神经网络能够学习到识别反光图与透射光图并将它们分离的能力。
在一种可能的实现方式中,可以将VGG-19中的超列(Hypercolumn)增加到所述神经网络的输入中,以增强神经网络的效果。例如,在将所述训练图像对应的多个偏振图和所述训练图像对应的偏振信息输入神经网络的第一子网络之前,可以采用VGG-19的conv1_2对I 1、I 2、I 3、I 4和I进行处理,并对处理结果进行双线性插值的上采样,以使上采样后的I 1、I 2、I 3、I 4和I的尺寸与训练图像相同。为了适用于VGG-19,可以先对神经网络的输入图像(训练图像或者待处理图像)进行伽玛校正。
图2示出本公开实施例提供的神经网络的示意图。在图2所示的示例中,训练图像的高为H,宽为W。训练图像经过预处理,可以得到训练图像对应的4个偏振图I 1、I 2、I 3和I 4。其中,I 1、I 2、I 3和I 4的高为
Figure PCTCN2020092546-appb-000013
宽为
Figure PCTCN2020092546-appb-000014
对I 1、I 2、I 3和I 4进行处理,可以得到训练图像对应的第一偏振信息图I、训练图像对应的第二偏振信息图ρ、训练图像对应的第三偏振信息图
Figure PCTCN2020092546-appb-000015
和训练图像对应的第四偏振信息图O。将I 1、I 2、I 3、I 4、I、ρ、
Figure PCTCN2020092546-appb-000016
和O输入第一子网络RNet,可以得到训练图像对应的反光预测图
Figure PCTCN2020092546-appb-000017
将I 1、I 2、I 3、I 4
Figure PCTCN2020092546-appb-000018
输入第二子网络TNet,可以得到训练图像对应的透射光预测图
Figure PCTCN2020092546-appb-000019
在一种可能的实现方式中,所述至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络,包括:根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值;至少根据所述第一损失函数的值,训练所述第一子网络和所述第二子网络。
作为该实现方式的一个示例,所述根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值,包括:对所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图分别进行归一化处理,得到所述训练图像对应的归一化的透射光预测图和归一化的反光预测图;将所述归一化的透射光预测图输入第一预设网络,经由所述第一预设网络的第l层输出所述归一化的透射光预测图对应的第l层的特征图,其中,1≤l≤P,P表示所述第一预设网络的总层数;将所述归一化的反光预测图输入所述第一预设网络,经由所述第一预设网络的第l层输出所述归一化的反光预测图对应的第l层的特征图;根据所述归一化的透射光预测图对应的第l层的特征图与所述归一化的反光预测图对应的第l层的特征图之间的归一化互相关值,确定第一损失函数的值。
在该实现方式中,第一预设网络可以是VGG-19或者ResNet-18等,本公开实施例对此不作限定。
例如,训练图像对应的透射光预测图可以表示为
Figure PCTCN2020092546-appb-000020
训练图像对应的反光预测图可以表示为
Figure PCTCN2020092546-appb-000021
第一损失函数L PNCC(I A,I B)可以根据式5得到:
Figure PCTCN2020092546-appb-000022
其中,
Figure PCTCN2020092546-appb-000023
表示I A的归一化结果,
Figure PCTCN2020092546-appb-000024
表示I B的归一化结果,
Figure PCTCN2020092546-appb-000025
表示
Figure PCTCN2020092546-appb-000026
输入第一预设网络之后得到 的第l层的特征图,
Figure PCTCN2020092546-appb-000027
表示
Figure PCTCN2020092546-appb-000028
输入第一预设网络之后得到的第l层的特征图,n表示用于确定第一损失函数的总层数。例如,可以使用第一预设网络的conv2_2、conv3_2和conv4_2这三层输出的特征图确定第一损失函数,那么,在式5中,n=3。
图3示出本公开实施例中对训练图像对应的透射光预测图和训练图像对应的反光预测图归一化前后第一损失函数L PNCC的单调性的示意图。其中,
Figure PCTCN2020092546-appb-000029
表示训练图像对应的透射光预测图,
Figure PCTCN2020092546-appb-000030
表示训练图像对应的反光预测图。如图3所示,通过对所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图分别进行归一化处理,能够使第一损失函数L PNCC随着α的增大单调递减。
在一种可能的实现方式中,所述至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络,包括:根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图;根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值;至少根据所述第二损失函数的值,训练所述第一子网络和所述第二子网络。
在该实现方式中,可以将所述训练图像中像素点的像素值与所述训练图像对应的反光真实图中相应像素点的像素值相减,得到所述训练图像对应的透射光目标图。其中,所述训练图像对应的透射光目标图可以表示所述训练图像对应的透射光图的真值(Ground Truth),即所述训练图像对应的透射光目标图可以表示所述训练图像去除反光后的图像的真值。
图4示出了背景图B、透射光图T、反光图R和混合图M的示意图。其中,背景图B表示不透过玻璃,直接对拍摄对象(即背景)进行拍摄得到的图。混合图M表示透过玻璃对玻璃后的拍摄对象拍摄得到的图。相关技术中,将背景图B作为网络的监督信息。由于透过玻璃拍摄照片会发生折射,因此,背景图B与拍摄得到的照片(带反光的混合图M)中,相应图像信息在图像中的位置不同。而本公开实施例通过根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图,并将透射光目标图作为神经网络的监督信息,由此能够使透射光目标图与训练图像中相应图像信息在图像中的位置相同,能够解决相关技术中背景图与混合图中相应图像信息在图像中的位置不对齐的问题,从而能够提供高质量的训练数据集,由此训练得到的神经网络在实际应用时,能够更准确地去除输入图像中的反光,得到更高质量的输出图像。其中,训练图像为带反光的混合图M,反光真实图为训练图像对应的反光图R的真值,本公开实施例可以根据T=M-R,得到训练图像对应的透射光目标图T。采用该实现方式提供的方法可以处理多种形式的反射光,从而可以处理真实世界中的复杂光源造成的图像反光问题,泛化能力较强。
作为该实现方式的一个示例,在所述根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图之前,所述方法还包括:通过偏振传感器采集训练图像和所述训练图像对应的反光真实图。
图5示出了训练图像和训练图像对应的反光真实图的采集方法的示意图。例如,可以用一块黑布盖住玻璃的背面来阻挡所有透射光,通过偏振传感器采集反光真实图,再移开黑布,通过偏振传感器采集相应的训练图像。在本公开实施例中,可以采用不同类型的玻璃获得训练图像和训练图像对应的反光真实图,从而获得丰富、多样的训练数据。
本公开实施例通过上述方式采集训练图像和训练图像对应的反光真实图,并将所述训练图像与所述训练图像对应的反光真实图之差作为所述训练图像对应的透射光目标图,由此无需要求玻璃具有特殊的材质、厚度、颜色等,即,本公开实施例所适用的玻璃可以是平整的、弯曲的、薄的、厚的、带颜色的、不带颜色的等,从而能够适用于更广泛的应用场景。
作为该实现方式的另一个示例,还可以通过仿真系统获得训练图像和所述训练图像对应的反光真实图。
在一种可能的实现方式中,所述根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值,包括:根据所述训练图像对应的透射光预测图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光预测图,其中,在所述训练图像对应的第四偏振信息图中,过曝的像素点的像素值为第一预设值,非过曝的像素点的像素值为第二预设值,其中,所述第一预设值小于所述第二预设值;根据所述透射光目标图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光目标图;将所述去除过曝的透射光预测图输入第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光预测图对应的第k层的特征图,其中,1≤k≤Q,Q表示所述第二预设网络的总层数;将所述去除过曝的透射光目标图输入所述第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光目标图对应的第k层的特征图;根据所述去除过曝的透射光预测图对应的第k层的特征图与所述去除过曝的透射光目标图对应的第k层的特征图之间的差值,确定第二损失函数的值。
在该实现方式中,第二预设网络可以是VGG-19或者ResNet-18等,本公开实施例对此不作限定。
作为该实现方式的一个示例,第一预设值可以为0,第二预设值可以为1。当然,本公开实施例不限于此。例如,第一预设值可以为0.01,第二预设值可以为1。
例如,第二损失函数可以采用式6来表示:
Figure PCTCN2020092546-appb-000031
其中,T表示透射光目标图,
Figure PCTCN2020092546-appb-000032
表示透射光预测图,O表示训练图像对应的第四偏振信息图,β k表示第k层的权重,β k可以基于各层参数的个数初始化,O×T表示去除过曝的透射光目标图,
Figure PCTCN2020092546-appb-000033
表示去除过曝的透射光预测图,v k(O×T)表示将O×T输入第二预设网络之后得到的第k层的特征图,
Figure PCTCN2020092546-appb-000034
表示将
Figure PCTCN2020092546-appb-000035
输入第二预设网络之后得到的第k层的特征图,m表示用于确定第二损失函数的总层数。例如,可以使用第二预设网络的conv1_1、conv1_2、conv2_2、conv3_2、conv4_2和conv5_2这6层输出的特征图确定第二损失函数,那么,在式6中,m=6。
在一种可能的实现方式中,所述神经网络的损失函数可以等于第一损失函数与第二损失函数之和。
在一种可能的实现方式中,在训练所述神经网络时,可以首先采用Adam的梯度下降优化方法,学习率设置为0.0001,训练200个epoch(期),再将学习率设置为0.00001,继续训练200个epoch。其中,每个epoch所用到的训练图像的数量可以根据训练图像的总量进行调节。
图6示出采用本公开实施例提供的去除图像中的反光的方法对带有三种不同类型的反光的输入图像进行处理后得到的输出图像的示意图。如图6所示,本公开实施例提供的神经网络能够准确地移除输入图像中的反光图层,得到较高质量的去除反光后的输出图像。
本公开实施例提供的去除图像中的反光的方法不限定反光类型、光源类型,能够处理真实世界中的复杂光源造成的图像反光问题,应用场景较为广泛。另外,本公开实施例提供的神经网络的训练方法能够快速地完成网络的训练。本公开实施例利用深度网络,能够快速且精确地预测得到透射光预测图(即去除反光后的图)。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
此外,本公开还提供了去除图像中的反光的装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种去除图像中的反光的方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图7示出本公开实施例提供的去除图像中的反光的装置的框图。如图7所示,所述去除图像中的反光的装置包括:第一获取模块71,用于获取待处理图像;第二获取模块72,用于获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,其中,所述待处理图像对应的多个偏振图是经过不同角度的偏振片形成的;第一预测模块73,用于根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图;第二预测模块74,用于根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像。
在一种可能的实现方式中,所述第二获取模块72用于:对待处理图像中属于不同偏振片角度的像素点进行分离,得到所述待处理图像对应的多个偏振图;对所述待处理图像对应的多个偏振图中相应的像素点进行处理,得到所述待处理图像对应的偏振信息。
在一种可能的实现方式中,所述待处理图像对应的偏振信息包括所述待处理图像对应的第一偏振信息图、所述待处理图像对应的第二偏振信息图、所述待处理图像对应的第三偏振信息图和所述待处理图像对应的第四偏振信息图中的至少之一,其中,所述待处理图像对应的第一偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振光强,所述待处理图像对应的第二偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振程度,所述待处理图像对应的第三偏振信息图用于表示所述待处理图像对应的多个偏振图的光的偏振角度,所述待处理图像对应的第四偏振信息图用于表示所述待处理图像对应的多个偏振图去除过曝后的信息。
在一种可能的实现方式中,所述装置还包括:第三获取模块,用于获取训练图像对应的多个偏振图,以及所述训练图像对应的偏振信息,其中,所述训练图像对应的多个偏振图是经过不同角度的偏振片形成的;第三预测模块,用于将所述训练图像对应的多个偏振图和所述训练图像对应的偏振信息输入神经网络的第一子网络,经由所述第一子网络输出所述训练图像对应的反光预测图;第四预测模块,用于将所述训练图像对应的多个偏振图和所述训练图像对应 的反光预测图输入所述神经网络的第二子网络,经由所述第二子网络输出所述训练图像对应的透射光预测图;训练模块,用于至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述第三获取模块用于:对训练图像中属于不同偏振片角度的像素点进行分离,得到所述训练图像对应的多个偏振图;对所述训练图像对应的多个偏振图中相应的像素点进行处理,得到所述训练图像对应的偏振信息。
在一种可能的实现方式中,所述训练图像对应的偏振信息包括所述训练图像对应的第一偏振信息图、所述训练图像对应的第二偏振信息图、所述训练图像对应的第三偏振信息图和所述训练图像对应的第四偏振信息图中的至少之一,其中,所述训练图像对应的第一偏振信息图用于表示所述训练图像对应的多个偏振图的偏振光强,所述训练图像对应的第二偏振信息图用于表示所述训练图像对应的多个偏振图的偏振程度,所述训练图像对应的第三偏振信息图用于表示所述训练图像对应的多个偏振图的光的偏振角度,所述训练图像对应的第四偏振信息图用于表示所述训练图像对应的多个偏振图去除过曝后的信息。
在一种可能的实现方式中,所述训练模块用于:根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值;至少根据所述第一损失函数的值,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述训练模块用于:对所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图分别进行归一化处理,得到所述训练图像对应的归一化的透射光预测图和归一化的反光预测图;将所述归一化的透射光预测图输入第一预设网络,经由所述第一预设网络的第l层输出所述归一化的透射光预测图对应的第l层的特征图,其中,1≤l≤P,P表示所述第一预设网络的总层数;将所述归一化的反光预测图输入所述第一预设网络,经由所述第一预设网络的第l层输出所述归一化的反光预测图对应的第l层的特征图;根据所述归一化的透射光预测图对应的第l层的特征图与所述归一化的反光预测图对应的第l层的特征图之间的归一化互相关值,确定第一损失函数的值。
在一种可能的实现方式中,所述训练模块用于:根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图;根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值;至少根据所述第二损失函数的值,训练所述第一子网络和所述第二子网络。
在一种可能的实现方式中,所述训练模块用于:根据所述训练图像对应的透射光预测图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光预测图,其中,在所述训练图像对应的第四偏振信息图中,过曝的像素点的像素值为第一预设值,非过曝的像素点的像素值为第二预设值,其中,所述第一预设值小于所述第二预设值;根据所述透射光目标图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光目标图;将所述去除过曝的透射光预测图输入第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光预测图对应的第k层的特征图,其中,1≤k≤Q,Q表示所述第二预设网络的总层数;将所述去除过曝的透射光目标图输入所述第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光目标图对应的第k层的特征图;根据所述去除过曝的透射光预测图对应的第k层的特征图与所述去除过曝的透射光目标图对应的第k层的特征图之间的差值,确定第二损失函数的值。
在一种可能的实现方式中,所述装置还包括:采集模块,用于通过偏振传感器采集训练图像和所述训练图像对应的反光真实图。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。其中,所述计算机可读存储介质可以是非易失性计算机可读存储介质,或者可以是易失性计算机可读存储介质。
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,当计算机可读代码在电子设备上运行时,所述电子设备中的处理器执行用于实现上述方法。
本公开实施例还提供了另一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的去除图像中的反光的方法的操作。
本公开实施例还提供一种电子设备,包括:一个或多个处理器;用于存储可执行指令的存储器;其中,所述一个或多个处理器被配置为调用所述存储器存储的可执行指令,以执行上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图8示出本公开实施例提供的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图8,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如Wi-Fi、2G、3G、4G/LTE、5G或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图9示出本公开实施例提供的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图9,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows
Figure PCTCN2020092546-appb-000036
Mac OS
Figure PCTCN2020092546-appb-000037
或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段 或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (21)

  1. 一种去除图像中的反光的方法,包括:
    获取待处理图像;
    获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,其中,所述待处理图像对应的多个偏振图是经过不同角度的偏振片形成的;
    根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图;
    根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像。
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,包括:
    对待处理图像中属于不同偏振片角度的像素点进行分离,得到所述待处理图像对应的多个偏振图;
    对所述待处理图像对应的多个偏振图中相应的像素点进行处理,得到所述待处理图像对应的偏振信息。
  3. 根据权利要求1或2所述的方法,其特征在于,所述待处理图像对应的偏振信息包括所述待处理图像对应的第一偏振信息图、所述待处理图像对应的第二偏振信息图、所述待处理图像对应的第三偏振信息图和所述待处理图像对应的第四偏振信息图中的至少之一,其中,所述待处理图像对应的第一偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振光强,所述待处理图像对应的第二偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振程度,所述待处理图像对应的第三偏振信息图用于表示所述待处理图像对应的多个偏振图的光的偏振角度,所述待处理图像对应的第四偏振信息图用于表示所述待处理图像对应的多个偏振图去除过曝后的信息。
  4. 根据权利要求1至3中任意一项所述的方法,其特征在于,在所述获取待处理图像之前,所述方法还包括:
    获取训练图像对应的多个偏振图,以及所述训练图像对应的偏振信息,其中,所述训练图像对应的多个偏振图是经过不同角度的偏振片形成的;
    将所述训练图像对应的多个偏振图和所述训练图像对应的偏振信息输入神经网络的第一子网络,经由所述第一子网络输出所述训练图像对应的反光预测图;
    将所述训练图像对应的多个偏振图和所述训练图像对应的反光预测图输入所述神经网络的第二子网络,经由所述第二子网络输出所述训练图像对应的透射光预测图;
    至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络。
  5. 根据权利要求4所述的方法,其特征在于,所述至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络,包括:
    根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值;
    至少根据所述第一损失函数的值,训练所述第一子网络和所述第二子网络。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值,包括:
    对所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图分别进行归一化处理,得到所述训练图像对应的归一化的透射光预测图和归一化的反光预测图;
    将所述归一化的透射光预测图输入第一预设网络,经由所述第一预设网络的第l层输出所述归一化的透射光预测图对应的第l层的特征图,其中,1≤l≤P,P表示所述第一预设网络的总层数;
    将所述归一化的反光预测图输入所述第一预设网络,经由所述第一预设网络的第l层输出所述归一化的反光预测图对应的第l层的特征图;
    根据所述归一化的透射光预测图对应的第l层的特征图与所述归一化的反光预测图对应的第l层的特征图之间的归一化互相关值,确定第一损失函数的值。
  7. 根据权利要求4至6中任意一项所述的方法,其特征在于,所述至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络,包括:
    根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图;
    根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值;
    至少根据所述第二损失函数的值,训练所述第一子网络和所述第二子网络。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值,包括:
    根据所述训练图像对应的透射光预测图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光预测图,其中,在所述训练图像对应的第四偏振信息图中,过曝的像素点的像素值为第一预设值,非过曝的像素点的像素值为第二预设值,其中,所述第一预设值小于所述第二预设值;
    根据所述透射光目标图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光目标图;
    将所述去除过曝的透射光预测图输入第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光预测图对应的第k层的特征图,其中,1≤k≤Q,Q表示所述第二预设网络的总层数;
    将所述去除过曝的透射光目标图输入所述第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光目标图对应的第k层的特征图;
    根据所述去除过曝的透射光预测图对应的第k层的特征图与所述去除过曝的透射光目标图对应的第k层的特征图之间的差值,确定第二损失函数的值。
  9. 根据权利要求7或8所述的方法,其特征在于,在所述根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图之前,所述方法还包括:
    通过偏振传感器采集训练图像和所述训练图像对应的反光真实图。
  10. 一种去除图像中的反光的装置,包括:
    第一获取模块,用于获取待处理图像;
    第二获取模块,用于获取所述待处理图像对应的多个偏振图,以及所述待处理图像对应的偏振信息,其中,所述待处理图像对应的多个偏振图是经过不同角度的偏振片形成的;
    第一预测模块,用于根据所述待处理图像对应的多个偏振图和所述待处理图像对应的偏振信息,确定所述待处理图像对应的反光预测图;
    第二预测模块,用于根据所述待处理图像对应的多个偏振图和所述待处理图像对应的反光预测图,确定所述待处理图像对应的去除反光后的图像。
  11. 根据权利要求10所述的装置,其特征在于,所述第二获取模块用于:
    对待处理图像中属于不同偏振片角度的像素点进行分离,得到所述待处理图像对应的多个偏振图;
    对所述待处理图像对应的多个偏振图中相应的像素点进行处理,得到所述待处理图像对应的偏振信息。
  12. 根据权利要求10或11所述的装置,其特征在于,所述待处理图像对应的偏振信息包括所述待处理图像对应的第一偏振信息图、所述待处理图像对应的第二偏振信息图、所述待处理图像对应的第三偏振信息图和所述待处理图像对应的第四偏振信息图中的至少之一,其中,所述待处理图像对应的第一偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振光强,所述待处理图像对应的第二偏振信息图用于表示所述待处理图像对应的多个偏振图的偏振程度,所述待处理图像对应的第三偏振信息图用于表示所述待处理图像对应的多个偏振图的光的偏振角度,所述待处理图像对应的第四偏振信息图用于表示所述待处理图像对应的多个偏振图去除过曝后的信息。
  13. 根据权利要求10至12中任意一项所述的装置,其特征在于,所述装置还包括:
    第三获取模块,用于获取训练图像对应的多个偏振图,以及所述训练图像对应的偏振信息,其中,所述训练图像对应的多个偏振图是经过不同角度的偏振片形成的;
    第三预测模块,用于将所述训练图像对应的多个偏振图和所述训练图像对应的偏振信息输入神经网络的第一子网络,经由所述第一子网络输出所述训练图像对应的反光预测图;
    第四预测模块,用于将所述训练图像对应的多个偏振图和所述训练图像对应的反光预测图输入所述神经网络的第二子网络,经由所述第二子网络输出所述训练图像对应的透射光预测图;
    训练模块,用于至少根据所述训练图像对应的透射光预测图,训练所述第一子网络和所述第二子网络。
  14. 根据权利要求13所述的装置,其特征在于,所述训练模块用于:
    根据所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图,确定第一损失函数的值;
    至少根据所述第一损失函数的值,训练所述第一子网络和所述第二子网络。
  15. 根据权利要求14所述的装置,其特征在于,所述训练模块用于:
    对所述训练图像对应的透射光预测图和所述训练图像对应的反光预测图分别进行归一化处理,得到所述训练图像对应的归一化的透射光预测图和归一化的反光预测图;
    将所述归一化的透射光预测图输入第一预设网络,经由所述第一预设网络的第l层输出所述归一化的透射光预测图对应的第l层的特征图,其中,1≤l≤P,P表示所述第一预设网络的总层数;
    将所述归一化的反光预测图输入所述第一预设网络,经由所述第一预设网络的第l层输出所述归一化的反光预测图对应的第l层的特征图;
    根据所述归一化的透射光预测图对应的第l层的特征图与所述归一化的反光预测图对应的第l层的特征图之间的归一化互相关值,确定第一损失函数的值。
  16. 根据权利要求13至15中任意一项所述的装置,其特征在于,所述训练模块用于:
    根据所述训练图像与所述训练图像对应的反光真实图之差,得到所述训练图像对应的透射光目标图;
    根据所述训练图像对应的透射光预测图和所述透射光目标图,确定第二损失函数的值;
    至少根据所述第二损失函数的值,训练所述第一子网络和所述第二子网络。
  17. 根据权利要求16所述的装置,其特征在于,所述训练模块用于:
    根据所述训练图像对应的透射光预测图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光预测图,其中,在所述训练图像对应的第四偏振信息图中,过曝的像素点的像素值为第一预设值,非过曝的像素点的像素值为第二预设值,其中,所述第一预设值小于所述第二预设值;
    根据所述透射光目标图与所述训练图像对应的第四偏振信息图中相应像素点的像素值的乘积,得到所述训练图像对应的去除过曝的透射光目标图;
    将所述去除过曝的透射光预测图输入第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光预测图对应的第k层的特征图,其中,1≤k≤Q,Q表示所述第二预设网络的总层数;
    将所述去除过曝的透射光目标图输入所述第二预设网络,经由所述第二预设网络的第k层输出所述去除过曝的透射光目标图对应的第k层的特征图;
    根据所述去除过曝的透射光预测图对应的第k层的特征图与所述去除过曝的透射光目标图对应的第k层的特征图之间的差值,确定第二损失函数的值。
  18. 根据权利要求16或17所述的装置,其特征在于,所述装置还包括:
    采集模块,用于通过偏振传感器采集训练图像和所述训练图像对应的反光真实图。
  19. 一种电子设备,包括:
    一个或多个处理器;
    用于存储可执行指令的存储器;
    其中,所述一个或多个处理器被配置为调用所述存储器存储的可执行指令,以执行权利要求1至9中任意一项所述的方法。
  20. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法。
  21. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至9中的任一权利要求所述的方法。
PCT/CN2020/092546 2020-03-04 2020-05-27 去除图像中的反光的方法及装置、电子设备和存储介质 WO2021174687A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010144325.2 2020-03-04
CN202010144325.2A CN111369464B (zh) 2020-03-04 2020-03-04 去除图像中的反光的方法及装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2021174687A1 true WO2021174687A1 (zh) 2021-09-10

Family

ID=71211696

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092546 WO2021174687A1 (zh) 2020-03-04 2020-05-27 去除图像中的反光的方法及装置、电子设备和存储介质

Country Status (3)

Country Link
CN (1) CN111369464B (zh)
TW (1) TWI749593B (zh)
WO (1) WO2021174687A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082477A (zh) * 2022-08-23 2022-09-20 山东鲁芯之光半导体制造有限公司 一种基于去反光效果的半导体晶圆加工质量检测方法
CN117422646A (zh) * 2023-12-19 2024-01-19 荣耀终端有限公司 去反光模型的训练方法、去反光模型和去反光方法

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112598598B (zh) * 2020-12-25 2023-11-28 南京信息工程大学滨江学院 一种基于两级反射光消除网络的图像反射光去除方法
CN113011303B (zh) * 2021-03-12 2023-04-18 支付宝(杭州)信息技术有限公司 一种基于偏振图像的面部特征确定方法及装置
CN113421191A (zh) * 2021-06-28 2021-09-21 Oppo广东移动通信有限公司 图像处理方法、装置、设备及存储介质
CN115358937B (zh) * 2022-07-18 2023-06-20 荣耀终端有限公司 图像去反光方法、介质及电子设备
TWI820889B (zh) * 2022-09-01 2023-11-01 英屬維爾京群島商威爾德嘉德有限公司 圖像處理方法及其裝置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108286966A (zh) * 2018-01-24 2018-07-17 北京航空航天大学 一种自适应多光谱偏振导航传感器及其定向方法
CN108900754A (zh) * 2018-08-27 2018-11-27 广州大学 一种用于消除眼镜镜面反光的摄像装置及其控制方法
JP2019004204A (ja) * 2017-06-12 2019-01-10 住友電工システムソリューション株式会社 画像処理装置、画像出力装置およびコンピュータプログラム
CN110827217A (zh) * 2019-10-30 2020-02-21 维沃移动通信有限公司 图像处理方法、电子设备及计算机可读存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7489391B2 (en) * 2004-04-27 2009-02-10 The Trustees Of The University Of Pennsylvania Polarization and reflection based non-contact latent fingerprint imaging and lifting
CN102742258B (zh) * 2010-07-21 2016-10-26 松下知识产权经营株式会社 图像处理装置
CN108038454B (zh) * 2017-12-15 2020-01-07 北京正通亿和文化艺术交流有限公司 一种全息灯光脸部采集系统
TWI699559B (zh) * 2018-01-16 2020-07-21 美商伊路米納有限公司 結構照明成像系統和使用結構化光來創建高解析度圖像的方法
CN108492364B (zh) * 2018-03-27 2022-09-20 百度在线网络技术(北京)有限公司 用于生成图像生成模型的方法和装置
CN109325912B (zh) * 2018-08-27 2023-05-12 曜科智能科技(上海)有限公司 基于偏振光光场的反光分离方法及标定拼合系统
CN109993124B (zh) * 2019-04-03 2023-07-14 深圳华付技术股份有限公司 基于视频反光的活体检测方法、装置及计算机设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019004204A (ja) * 2017-06-12 2019-01-10 住友電工システムソリューション株式会社 画像処理装置、画像出力装置およびコンピュータプログラム
CN108286966A (zh) * 2018-01-24 2018-07-17 北京航空航天大学 一种自适应多光谱偏振导航传感器及其定向方法
CN108900754A (zh) * 2018-08-27 2018-11-27 广州大学 一种用于消除眼镜镜面反光的摄像装置及其控制方法
CN110827217A (zh) * 2019-10-30 2020-02-21 维沃移动通信有限公司 图像处理方法、电子设备及计算机可读存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082477A (zh) * 2022-08-23 2022-09-20 山东鲁芯之光半导体制造有限公司 一种基于去反光效果的半导体晶圆加工质量检测方法
CN115082477B (zh) * 2022-08-23 2022-10-28 山东鲁芯之光半导体制造有限公司 一种基于去反光效果的半导体晶圆加工质量检测方法
CN117422646A (zh) * 2023-12-19 2024-01-19 荣耀终端有限公司 去反光模型的训练方法、去反光模型和去反光方法
CN117422646B (zh) * 2023-12-19 2024-05-10 荣耀终端有限公司 去反光模型的训练方法、去反光模型和去反光方法

Also Published As

Publication number Publication date
CN111369464B (zh) 2021-11-09
TWI749593B (zh) 2021-12-11
CN111369464A (zh) 2020-07-03
TW202135005A (zh) 2021-09-16

Similar Documents

Publication Publication Date Title
WO2021174687A1 (zh) 去除图像中的反光的方法及装置、电子设备和存储介质
CN109829501B (zh) 图像处理方法及装置、电子设备和存储介质
WO2021196401A1 (zh) 图像重建方法及装置、电子设备和存储介质
TWI773945B (zh) 錨點確定方法、電子設備和儲存介質
TWI706379B (zh) 圖像處理方法及裝置、電子設備和儲存介質
CN109658401B (zh) 图像处理方法及装置、电子设备和存储介质
US20220262012A1 (en) Image Processing Method and Apparatus, and Storage Medium
CN110009090B (zh) 神经网络训练与图像处理方法及装置
EP3010226A2 (en) Method and apparatus for obtaining photograph
WO2020155711A1 (zh) 图像生成方法及装置、电子设备和存储介质
WO2020155609A1 (zh) 一种目标对象处理方法、装置、电子设备及存储介质
TWI755833B (zh) 一種圖像處理方法、電子設備和儲存介質
EP3923234A1 (en) Training method and device for an image enhancement model, and storage medium
WO2017031901A1 (zh) 人脸识别方法、装置及终端
KR20210065178A (ko) 생체 검출 방법 및 장치, 전자 기기 및 저장 매체
WO2016192325A1 (zh) 视频文件的标识处理方法及装置
CN110458218B (zh) 图像分类方法及装置、分类网络训练方法及装置
WO2021189704A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2021169136A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN110619610B (zh) 图像处理方法及装置
WO2020220807A1 (zh) 图像生成方法及装置、电子设备及存储介质
JP6259544B2 (ja) フレーミング情報の表示方法及び装置
EP3816927B1 (en) Method and apparatus for training image processing models, and storage medium
CN112819714A (zh) 目标对象曝光方法、装置、存储介质及设备
TWI770531B (zh) 人臉識別方法、電子設備和儲存介質

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.01.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20922762

Country of ref document: EP

Kind code of ref document: A1