CN114549372A - Vehicle window image anti-reflection method and device, electronic equipment and storage medium - Google Patents

Vehicle window image anti-reflection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114549372A
CN114549372A CN202011330370.3A CN202011330370A CN114549372A CN 114549372 A CN114549372 A CN 114549372A CN 202011330370 A CN202011330370 A CN 202011330370A CN 114549372 A CN114549372 A CN 114549372A
Authority
CN
China
Prior art keywords
picture
window
window picture
vehicle
vehicle window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011330370.3A
Other languages
Chinese (zh)
Inventor
王玉波
徐源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202011330370.3A priority Critical patent/CN114549372A/en
Publication of CN114549372A publication Critical patent/CN114549372A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30236Traffic on road, railway or crossing

Abstract

The embodiment of the invention discloses a method and a device for increasing the transmission of a car window image, electronic equipment and a storage medium. The car window image in the car window image anti-reflection method is acquired through a video shutter and a picture shutter, and the method comprises the following steps: determining a first window picture acquired by a picture shutter, and determining a second window picture from a video acquired by a video shutter according to the first window picture; carrying out phase reversal processing on the first window picture or the second window picture to obtain a first window picture after phase reversal or a second window picture after phase reversal; and superposing the window area according to the reversed first window picture and the reversed second window picture or the reversed second window picture and the first window picture to obtain the anti-reflection window picture. According to the embodiment of the invention, the anti-reflection of the car window image is realized by eliminating the stripes on the car window, and the visibility in the car window is improved.

Description

Vehicle window image anti-reflection method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to a method and a device for increasing the transmission of a car window image, electronic equipment and a storage medium.
Background
Because the window glass can cause reflection, a polarizer is arranged on the current traffic gate and used for filtering the reflection on the window. However, due to the interference phenomenon of light and the sticking films stuck on a plurality of windows, colored stripes exist at the positions of the windows in the images shot by the traffic gate, and the observation and the recognition of people in the windows are not facilitated.
In the prior art, in order to improve the degree of recognition of personnel in a vehicle window, the adopted technology comprises the following steps: the window portion is identified, reducing the saturation. However, the color of people in the vehicle can be affected while the saturation is reduced, for example, the face of a person is grayed, and the stripe removing effect is general. Or the window portion may be identified and the saturation reduced, e.g. green, based on a certain dominant color of the stripe. However, because the color of the car window film is widely distributed, the effect of reducing saturation by adopting a single color is common, and the color of a person wearing clothes with the color in the car can be influenced, so that color cast is caused.
Disclosure of Invention
The embodiment of the invention provides a method and a device for increasing the transmission of a car window image, electronic equipment and a storage medium, wherein the transmission of the car window image is realized by eliminating stripes on a car window, and the visibility in the car window is improved.
In a first aspect, an embodiment of the present invention provides a method for increasing a transmission of a vehicle window image, where the vehicle window image is acquired through a video shutter and a picture shutter, and the method includes:
determining a first vehicle window picture acquired by the picture shutter, and determining a second vehicle window picture from a video acquired by the video shutter according to the first vehicle window picture;
carrying out phase reversal processing on the first window picture or the second window picture to obtain a phase reversed first window picture or a phase reversed second window picture;
and overlapping the window area according to the reversed first window picture and the second window picture, or the reversed second window picture and the first window picture to obtain the anti-reflection window picture.
In a second aspect, an embodiment of the present invention further provides a vehicle window image anti-reflection device, where a vehicle window image is obtained through a video shutter and a picture shutter, and the device includes:
the vehicle window picture determining module is used for determining a first vehicle window picture acquired by the picture shutter and determining a second vehicle window picture from a video acquired by the video shutter according to the first vehicle window picture;
the vehicle window picture phase reversal module is used for carrying out phase reversal processing on the first vehicle window picture or the second vehicle window picture to obtain a first vehicle window picture after phase reversal or a second vehicle window picture after phase reversal;
and the vehicle window picture overlapping module is used for overlapping the vehicle window area according to the reversed first vehicle window picture and the second vehicle window picture, or the reversed second vehicle window picture and the first vehicle window picture to obtain the anti-reflection vehicle window picture.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a storage device to store one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the car window image antireflection method according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the program is executed by a processor, the method for increasing the transmission gain of a vehicle window image according to any embodiment of the present invention is implemented.
According to the embodiment of the invention, based on two vehicle window images acquired by the video shutter and the picture shutter, one vehicle window image is subjected to phase reversal processing and then is superposed on the other vehicle window image, so that color stripes on the shot vehicle window image are eliminated, the visibility in a vehicle window is enhanced, and the identification accuracy of personnel in the vehicle is further improved.
Drawings
Fig. 1 is a flowchart of a method for increasing the transmission of a vehicle window image according to a first embodiment of the present invention;
fig. 2 is a flowchart of a vehicle window image anti-reflection method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a vehicle window image anti-reflection method in a third embodiment of the invention;
FIG. 4 is a schematic diagram of a process for superimposing window pictures;
fig. 5 is a schematic structural view of a vehicle window image antireflection device according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device in a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a vehicle window image antireflection method according to a first embodiment of the present invention, and this embodiment may be suitable for eliminating a situation where a color fringe exists in a vehicle window image captured by a traffic gate due to an interference phenomenon. The method can be executed by a vehicle window image anti-reflection device, the device can be implemented in a software and/or hardware manner, and can be configured in an electronic device, for example, the electronic device can be a device with communication and computing capabilities, such as a background server. The vehicle window image in the method is acquired through a video shutter and a picture shutter, as shown in fig. 1, the method specifically comprises the following steps:
step 101, determining a first window picture acquired by a picture shutter, and determining a second window picture from a video acquired by a video shutter according to the first window picture.
The video shutter and the picture shutter can be two modes for acquiring images in the double-shutter image acquisition device. The double-shutter image acquisition device can be a camera with a double-shutter function, and the camera can be applied to a traffic gate and used for monitoring passing vehicles. The video shutter is used for live video recording, and the picture shutter is used for flash lamp snapshot. The main difference between the two shutters is that the exposure and light compensation conditions are different. The live video is to meet the requirements of capturing vehicles, and is characterized in that the whole scene of a picture is bright, no strong supplementary light penetrates through a vehicle window, and generally, people in the vehicle window are not good in visibility. The flash lamp snapshot is that when the vehicle travels to a preset snapshot position, a frame of special image acquired by a camera is supplemented with light by using an external xenon light supplement lamp, so that the face effect in a vehicle window is acquired, and a shutter at the level of one thousandth of a second is usually used. And because the door window is made by glass, through having certain reflection of light, consequently through having the polarizer on the camera of traffic bayonet socket for the reflection of light on the filtering door window, conveniently sees the car in.
However, due to the interference phenomenon of light and the sticking films stuck on a plurality of windows, colored stripes exist at the positions of the windows in the images shot by the traffic gate, and the observation and the recognition of people in the windows are not facilitated. The interference of light refers to a phenomenon that two (or more) lines of light waves with constant phase (i.e., vibration state) meet each other, and vibration is intensified at some points in a superposition region and weakened at some points. For example, when sunlight shines on a soap bubble, a beautiful color is seen; if a thin colored glass sheet (or film) is placed in the light path, the pattern presented on the rear screen is a single color stripe with alternating bright and dark colors; if the incident light is monochromatic light, interference fringes with alternate bright and dark colors appear on the surface of the film; if the incident light is polychromatic light, color fringes appear. So the sunlight irradiates on the film, and the seen color fringes are the interference phenomenon generated by the extended polychromatic light source. The color stripes on the window are not beneficial to identifying people in the vehicle, so the color stripes on the window need to be eliminated.
Specifically, for two images acquired through a video shutter and a picture shutter, a snap-shot image of a vehicle window is acquired through the picture shutter to serve as a first vehicle window picture, a second vehicle window picture is determined from a live video acquired through the video shutter according to the acquisition time of the first vehicle window picture, and the second vehicle window picture is determined according to the acquisition time of the first vehicle window picture, so that the consistency of contents in the two pictures is ensured, and the accuracy of subsequent superposition is facilitated. Meanwhile, as the video shutter and the picture shutter are on the same camera or on two cameras with the same parameter configuration, the interference phenomenon generated on the shot vehicle window pictures is the same, namely the color fringes on the two vehicle window pictures are distributed in the same manner.
In one possible embodiment, step 101 includes:
acquiring a first picture acquired by a picture shutter, and determining a window area from the first picture as a first window picture;
determining a second picture from the video acquired by the video shutter according to the first window picture, and determining a window area from the second picture as a second window picture;
the method comprises the following steps of:
carrying out vehicle body detection and license plate positioning on the first picture or the second picture to obtain a vehicle body position and a license plate position;
determining a coarse window positioning area from the position of the vehicle body according to the position of the license plate;
and extracting a vehicle window area from the vehicle window rough positioning area according to the morphological characteristics of the vehicle window.
The captured pictures and live videos obtained by the picture shutter and the video shutter can include other parts of the vehicle body and scenes except the vehicle in addition to the vehicle window area, and the subsequent superposition is inaccurate due to the existence of the parts except the vehicle window area, so that the vehicle window area needs to be extracted.
Specifically, after a snapshot acquired by a picture shutter is acquired, the snapshot is taken as a first picture, a vehicle window area is selected from the first picture as a first vehicle window picture, and the first vehicle window picture only comprises the vehicle window area of the vehicle. Illustratively, when the window area is selected from the first picture, vehicle body detection and license plate positioning are firstly carried out to obtain the position of the vehicle body and the position of the license plate, because the window area is positioned above the license plate, a coarse positioning area where the window is positioned can be obtained from the area where the vehicle body is positioned, finally, the coarse positioning area is further positioned according to the morphological characteristics of the window, and the window area is intercepted after positioning to be used as the first window picture. And similarly, extracting the window area of the second picture, and taking the extracted window area as the second window picture. Furthermore, the sizes of the first window picture and the second window picture are controlled to be equal, so that the phenomenon of dislocation can not occur during subsequent overlapping, and the phenomena of double images and the like can occur during overlapping of the windows.
In one possible embodiment, determining the second window picture from the video captured by the video shutter according to the first window picture includes:
determining the acquisition time of a first vehicle window picture;
and determining a video frame closest to the acquisition time from the video acquired by the video shutter as a second window picture.
And selecting the closest video frame from the video as a second window picture according to the acquisition time of the first window picture, so that the distribution of the stripes on the first window picture is the same as that of the snapshot picture. This is because the fringe distribution changes due to the change of the external environment such as illumination when the first window picture and the second window picture are in different time, and therefore it is necessary to ensure that the acquisition time of the first window picture and the acquisition time of the second window picture are close to each other.
And 102, carrying out phase reversal processing on the first window picture or the second window picture to obtain the phase-reversed first window picture or the phase-reversed second window picture.
The reverse processing is to convert each color on an image into its complementary color, that is, the hue is rotated 180 degrees, and the colors on the color wheel separated by 180 degrees are complementary colors.
Specifically, the specific operation of the inversion processing is that if the first window picture and the second window picture are represented by three RGB channels, the range of the intensity value of any one pixel in the three channels is 0 to 255, and if the three RGB channels of the target pixel are (r, g, b), the RGB channel value of the target pixel after the inversion processing is (255-r, 255-g, 255-b). Any one of the first window picture and the second window picture can be subjected to reverse processing, namely, each pixel point in the window picture is subjected to reverse processing, so that the color stripes after reverse phase are obtained.
And 103, overlapping the window area according to the reversed first window picture and the reversed second window picture or the reversed second window picture and the first window picture to obtain the anti-reflection window picture.
The first window picture or the second window picture is subjected to phase reversal processing to obtain a negative film with the color completely opposite to the color of the window stripes, the negative film is superposed on the second window picture or the first window picture which is not subjected to phase reversal processing, and the stripes are completely distributed on the first window picture and the second window picture, so that the stripes are eliminated through superposition of the negative film.
If only one car window picture is superimposed with its own reverse picture, this will result in the picture being cancelled out to gray. For example, with an Alpha overlay with an Alpha value of 0.5, the pixel value of any point on the overlaid picture is: 0.5(r, g, b) + (1-0.5) (255-r, 255-g, 255-b) ═ 128, 128, 128), because three channels in the picture are mixed in equal proportion, black, white, and gray are generated according to the difference of brightness. In the embodiment of the invention, the car window picture subjected to reverse processing and the superposed car window picture are from different shutters, so that the distribution of other pixel points is different on the two pictures except for the same color stripes, and the superposed pictures cannot be completely counteracted into gray, so that the details of the scene in the car are kept while the color stripes are eliminated, and the identification accuracy of personnel in the car is improved.
According to the embodiment of the invention, based on two vehicle window images acquired by the video shutter and the picture shutter, one vehicle window image is subjected to phase reversal processing and then is superposed on the other vehicle window image, so that color stripes on the shot vehicle window image are eliminated, the visibility in a vehicle window is enhanced, and the identification accuracy of personnel in the vehicle is further improved.
Example two
Fig. 2 is a flowchart of a vehicle window image antireflection method in the second embodiment of the present invention, and the second embodiment is further optimized based on the first embodiment. As shown in fig. 2, the method includes:
step 201, determining a first window picture acquired by a picture shutter, and determining a second window picture from a video acquired by a video shutter according to the first window picture.
Step 202, performing phase inversion processing on the first vehicle window picture to obtain a phase-inverted first vehicle window picture.
And carrying out phase inversion processing on the snap-shot image obtained by the image shutter to obtain a first vehicle window image after phase inversion. Illustratively, the pixel value of each pixel point in the snapshot image is calculated as (255-r, 255-g, 255-b), wherein (r, g, b) is a three-channel pixel value of a target pixel point in the snapshot image.
And step 203, superposing the reversed first vehicle window picture on a second vehicle window picture to obtain a superposed vehicle window picture.
Because the reversed first window picture comprises the reversed color stripes, the reversed first window picture is superposed on the second window picture, and the color stripes on the first window picture and the second window picture are distributed in the same way, so that the reversed color stripes and the color stripes which are not reversed are offset after superposition, and the superposed window pictures have no color stripes.
In one possible embodiment, the overlay is an Alpha overlay, which is performed by the following formula:
(R,G,B)=A(r1,g1,b1)+(1-A)(r2,g2,b2);
wherein, (R, G, B) are three channel values of target pixel points in the superimposed window picture, (R1, G1, B1) are three channel values of target pixel points in the window picture which is not subjected to the phase inversion processing, (R2, G2, B2) are three channel values of target pixel points in the window picture which is subjected to the phase inversion processing, and a is an Alpha value.
Because the value of the color in one picture is in a range, if the pixel values in the two pictures are directly added, the color of a part of pixel points in the superposed pictures can overflow, and therefore Alpha superposition is adopted in the embodiment of the invention, and the color overflow caused by the superposition of the pictures is avoided.
Specifically, (r1, g1, b1) is the three-channel value of the target pixel point in the second window picture, and (r2, g2, b2) is the three-channel value of the target pixel point in the inverted first window picture. And (R, G and B) are three channel values of target pixel points in the superposed car window picture. For example, in the foregoing step, the sizes of the first window picture and the second window picture are set to be the same, and the positioning is performed according to the outer edge of the window, so that the positions of the objects represented by the pixels to be superimposed on the vehicle are the same, and the problem of superimposed offset is avoided. In the present embodiment, the Alpha value is set to 0.5.
In a possible embodiment, before superimposing the inverted first window picture on the second window picture, the method further includes:
and carrying out filtering processing on the second window picture.
If the video shutter and the picture shutter both belong to one sensor, the sensor cannot output two pictures at the same time, so that the first window picture and the second window picture are not output at the same time strictly. On the basis of the above example, one frame closest to the acquisition time of the first window picture is selected as the second window picture, but in practical use, there may be a certain difference, which may cause a ghost phenomenon in a large-edge area such as a window frame when superimposed.
Therefore, in order to eliminate the ghost phenomenon, before the images are superimposed, the second window image is subjected to filtering processing to remove detail features of large edges such as a window frame, and only basic information of a basic layer, namely color stripes, of the second window image is reserved. Because the width of the stripe is very wide, pixel-level matching cancellation is not needed, and therefore, the cancellation of the stripe positive film and the stripe negative film cannot be influenced by the dislocation of a few pixel points after filtering. Meanwhile, after filtering, the obvious edge at the frame of the vehicle window is filtered, and no ghost image phenomenon is generated.
Specifically, the operation of performing filtering processing on the second window picture may be performed simultaneously with the phase inversion processing of the first window picture, and then the phase-inverted first window picture and the filtered second window picture are superimposed to obtain a superimposed window picture.
Due to the shutter setting mechanism of the double-shutter image acquisition device where the video shutter and the picture shutter are located, the second window picture acquired by the video shutter includes the whole condition of the vehicle, the window area does not include the detail information of the people in the vehicle and can be regarded as only including the color stripe information, and in the first window picture acquired by the picture shutter, due to the fact that light supplementing processing is carried out, the window area includes the information of the people in the vehicle besides the color stripe information, filtering cannot be carried out on the first window picture, and interference on the detail characteristics of the people in the vehicle is avoided.
In order to improve the superposition accuracy, the car window picture can be acquired by adopting a structure of two sensors, specifically, the middle part divides the light beam into two paths through a spectroscope, the two sensors are provided with different shutters to acquire the same image at the same time, and pixel-level matching can be carried out. One sensor acquires a live video image, the other sensor acquires a snapshot picture, and the difference between the two shutters is controlled within 500us, so that the positions of the vehicle windows in the live video image and the snapshot picture are the same, and then the live video image and the snapshot picture are directly superposed, thereby avoiding the phenomenon of ghost image in the superposition and influencing the superposition accuracy.
And 204, carrying out phase inversion processing on the superposed vehicle window picture to obtain the anti-reflection vehicle window picture.
As can be seen from the above description, the first window picture corresponds to a stripe + a person, the second window picture corresponds to a stripe, the first window picture is inverted to obtain an inverted stripe + an inverted person, and the superimposed window picture is the inverted stripe + the inverted person + the stripe + the inverted person. Therefore, if the characteristics of people in the car window are to be obtained, the superposed car window pictures need to be subjected to phase inversion again to obtain people, so that the visibility of the people in the anti-reflection car window pictures is increased, the recognition is facilitated, and the perception of the eyes is facilitated.
According to the embodiment of the invention, based on two vehicle window images acquired by the video shutter and the picture shutter, the first vehicle window image acquired by the picture shutter is subjected to phase reversal processing and then is superimposed on the second vehicle window image acquired by the video shutter, so that color stripes on the vehicle window image acquired by shooting are eliminated, the visibility in a vehicle window is enhanced, and the identification accuracy of personnel in the vehicle is further improved.
EXAMPLE III
Fig. 3 is a flowchart of a vehicle window image antireflection method in a third embodiment of the present invention, and the second embodiment is further optimized based on the first embodiment. As shown in fig. 3, the method includes:
step 301, determining a first window picture acquired by a picture shutter, and determining a second window picture from a video acquired by a video shutter according to the first window picture.
And 302, performing phase reversal processing on the second window picture to obtain a reversed second window picture.
And carrying out phase reversal processing on the live-action video picture obtained by the video shutter to obtain a second window picture after phase reversal. Illustratively, the pixel value of each pixel point in the live video picture is calculated as (255-r, 255-g, 255-b), wherein (r, g, b) is a three-channel pixel value of a target pixel point in the live video picture.
And 303, superposing the reversed second window picture on the first window picture to obtain a superposed window picture which is an anti-reflection window picture.
Because the reversed second window picture comprises the reversed color stripes, the reversed second window picture is superposed on the first window picture, and the color stripes on the first window picture and the second window picture are distributed in the same way, so that the reversed color stripes and the color stripes which are not reversed are offset after superposition.
In one possible embodiment, the overlay is an Alpha overlay, which is performed by the following formula:
(R,G,B)=A(r1,g1,b1)+(1-A)(r2,g2,b2);
wherein, (R, G, B) are three channel values of target pixel points in the superimposed window picture, (R1, G1, B1) are three channel values of target pixel points in the window picture which is not subjected to the phase inversion processing, (R2, G2, B2) are three channel values of target pixel points in the window picture which is subjected to the phase inversion processing, and a is an Alpha value.
Specifically, (r1, g1, b1) is a three-channel value of a target pixel point in the first window picture, and (r2, g2, b2) is a three-channel value of a target pixel point in the second window picture after phase inversion. And (R, G and B) are three channel values of target pixel points in the superposed car window picture. For example, in the foregoing step, the sizes of the first window picture and the second window picture are set to be the same, and pixel-level matching is performed according to the outer edge of the window, so that the positions of objects represented by the pixels to be superimposed are the same on the vehicle, and the problem of superimposed offset is avoided. In the present embodiment, the Alpha value is set to 0.5.
In a possible embodiment, before superimposing the inverted second window picture on the first window picture, the method further includes:
and carrying out filtering processing on the reversed second window picture.
As can be seen from the above, in order to eliminate the ghost image superimposed on the window frame, it is necessary to perform filtering processing on the second window picture obtained by the video shutter. Specifically, after phase inversion is performed on the second window picture, filtering processing is performed again, or filtering processing and phase inversion are performed on the second window picture first, so that a filtered phase-inverted second window picture is obtained, and then the picture and the first window picture are superposed to obtain a superposed window picture, namely the anti-reflection window picture.
As shown in fig. 4, the process of superimposing the window pictures includes that the first window picture corresponds to a stripe + a person, the second window picture corresponds to a stripe, the second window picture is inverted to obtain an inverted stripe, and the superimposed window picture is an inverted stripe + a person. Therefore, the reversed second window picture is superposed on the first window picture, and the anti-reflection window picture can be obtained without carrying out reversal processing.
According to the embodiment of the invention, after the second window picture of the live video is obtained, the second window picture is subjected to phase reversal to obtain the negative film which is completely opposite to the color of the stripes on the window in the first window picture. And then, the negative film is superposed on the window position of the first window picture, so that the color stripes on the shot window image are eliminated, the visibility in the window is enhanced, and the identification accuracy of people in the vehicle is improved.
Example four
Fig. 5 is a schematic structural diagram of a vehicle window image anti-reflection device in the fourth embodiment of the present invention, and this embodiment is applicable to a case where a color fringe exists on a vehicle window image captured by a traffic gate due to an interference phenomenon. As shown in fig. 5, the car window image in the device is obtained through a video shutter and a picture shutter, and the device comprises:
a window image determining module 510, configured to determine a first window image acquired by the image shutter, and determine a second window image from a video acquired by the video shutter according to the first window image;
a window picture phase reversal module 520, configured to perform phase reversal processing on the first window picture or the second window picture to obtain a phase-reversed first window picture or a phase-reversed second window picture;
and the vehicle window picture superposing module 530 is configured to superpose a vehicle window area according to the inverted first vehicle window picture and the inverted second vehicle window picture, or the inverted second vehicle window picture and the first vehicle window picture, so as to obtain an anti-reflection vehicle window picture.
According to the embodiment of the invention, based on two vehicle window images acquired by the video shutter and the picture shutter, one vehicle window image is subjected to phase reversal processing and then is superposed on the other vehicle window image, so that color stripes on the shot vehicle window image are eliminated, the visibility in a vehicle window is enhanced, and the identification accuracy of personnel in the vehicle is further improved.
Optionally, the vehicle window image overlaying module 530 includes a first vehicle window image overlaying unit, and is specifically configured to:
superposing the reversed first vehicle window picture to the second vehicle window picture to obtain a superposed vehicle window picture;
and carrying out phase reversal processing on the superposed vehicle window picture to obtain the anti-reflection vehicle window picture.
Optionally, the vehicle window picture overlaying module 530 includes a vehicle window picture second overlaying unit, and is specifically configured to:
and superposing the reversed second window picture on the first window picture to obtain a superposed window picture which is an anti-reflection window picture.
Optionally, the superposition is Alpha superposition, and is performed through the following formula:
(R,G,B)=A(r1,g1,b1)+(1-A)(r2,g2,b2);
wherein, (R, G, B) are three channel values of target pixel points in the superimposed window picture, (R1, G1, B1) are three channel values of target pixel points in the window picture which is not subjected to the phase inversion processing, (R2, G2, B2) are three channel values of target pixel points in the window picture which is subjected to the phase inversion processing, and a is an Alpha value.
Optionally, the apparatus further includes a second window picture filtering module, configured to:
and before the window area is superposed according to the inverted first window picture and the inverted second window picture or the inverted second window picture and the first window picture, carrying out filtering processing on the second window picture or the inverted second window picture.
Optionally, the vehicle window image determining module 510 is specifically configured to:
acquiring a first picture acquired by the picture shutter, and determining a vehicle window area from the first picture as a first vehicle window picture;
determining a second picture from the video acquired by the video shutter according to the first window picture, and determining a window area from the second picture as a second window picture;
the window image determining module 510 includes a window area determining unit, specifically configured to:
carrying out vehicle body detection and license plate positioning on the first picture or the second picture to obtain a vehicle body position and a license plate position;
determining a coarse window positioning area from the vehicle position according to the license plate position;
and extracting a car window area from the car window rough positioning area according to the morphological characteristics of the car window.
Optionally, the window image determining module 510 includes a second window image determining unit, specifically configured to:
determining the acquisition time of the first vehicle window picture;
and determining a video frame closest to the acquisition time from the video acquired by the video shutter as a second window picture.
The vehicle window image anti-reflection device provided by the embodiment of the invention can execute the vehicle window image anti-reflection method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the vehicle window image anti-reflection method.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 6 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 6, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory device 28, and a bus 18 that couples various system components including the system memory device 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system storage 28 may include computer system readable media in the form of volatile storage, such as Random Access Memory (RAM)30 and/or cache storage 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Storage 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in storage 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown in FIG. 6, the network adapter 20 communicates with the other modules of the electronic device 12 via the bus 18. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system storage device 28, for example, implementing a car window image anti-reflection method provided by the embodiment of the present invention, where the car window image is acquired through a video shutter and a picture shutter, and the method includes:
determining a first vehicle window picture acquired by the picture shutter, and determining a second vehicle window picture from a video acquired by the video shutter according to the first vehicle window picture;
carrying out phase reversal processing on the first window picture or the second window picture to obtain a phase reversed first window picture or a phase reversed second window picture;
and overlapping the window area according to the reversed first window picture and the second window picture, or the reversed second window picture and the first window picture to obtain the anti-reflection window picture.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored thereon, and when the program is executed by a processor, the method for increasing the transmission of a vehicle window image provided in the sixth embodiment of the present invention is implemented, where the vehicle window image is obtained through a video shutter and a picture shutter, and the method includes:
determining a first vehicle window picture acquired by the picture shutter, and determining a second vehicle window picture from a video acquired by the video shutter according to the first vehicle window picture;
carrying out phase reversal processing on the first window picture or the second window picture to obtain a phase reversed first window picture or a phase reversed second window picture;
and overlapping the window area according to the reversed first window picture and the second window picture, or the reversed second window picture and the first window picture to obtain the anti-reflection window picture.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. The method for increasing the transmission of the car window image is characterized in that the car window image is acquired through a video shutter and a picture shutter, and comprises the following steps:
determining a first vehicle window picture acquired by the picture shutter, and determining a second vehicle window picture from a video acquired by the video shutter according to the first vehicle window picture;
carrying out phase reversal processing on the first window picture or the second window picture to obtain a phase reversed first window picture or a phase reversed second window picture;
and overlapping the window area according to the reversed first window picture and the second window picture, or the reversed second window picture and the first window picture to obtain the anti-reflection window picture.
2. The method according to claim 1, wherein the overlapping the window area according to the inverted first window picture and the inverted second window picture comprises:
superposing the reversed first vehicle window picture to the second vehicle window picture to obtain a superposed vehicle window picture;
and carrying out phase reversal processing on the superposed vehicle window picture to obtain the anti-reflection vehicle window picture.
3. The method according to claim 1, wherein the overlapping the window area according to the inverted second window picture and the first window picture comprises:
and superposing the reversed second window picture on the first window picture to obtain a superposed window picture which is an anti-reflection window picture.
4. Method according to any of claims 2 or 3, wherein the overlay is an Alpha overlay, the overlay being performed by the following formula:
(R,G,B)=A(r1,g1,b1)+(1-A)(r2,g2,b2);
wherein, (R, G, B) are three channel values of target pixel points in the superimposed window picture, (R1, G1, B1) are three channel values of target pixel points in the window picture which is not subjected to the phase inversion processing, (R2, G2, B2) are three channel values of target pixel points in the window picture which is subjected to the phase inversion processing, and a is an Alpha value.
5. The method according to claim 1, wherein before performing the overlapping processing on the window area according to the inverted first window picture and the second window picture, or the inverted second window picture and the first window picture, the method further comprises:
and carrying out filtering processing on the second window picture or the reversed second window picture.
6. The method of claim 1, wherein determining a first window picture captured by the picture shutter and determining a second window picture from the video captured by the video shutter based on the first window picture comprises:
acquiring a first picture acquired by the picture shutter, and determining a vehicle window area from the first picture as a first vehicle window picture;
determining a second picture from the video acquired by the video shutter according to the first window picture, and determining a window area from the second picture as a second window picture;
the method comprises the following steps of:
carrying out vehicle body detection and license plate positioning on the first picture or the second picture to obtain a vehicle body position and a license plate position;
determining a coarse window positioning area from the vehicle position according to the license plate position;
and extracting a car window area from the car window rough positioning area according to the morphological characteristics of the car window.
7. The method of claim 1, wherein determining a second window picture from the video captured by the video shutter based on the first window picture comprises:
determining the acquisition time of the first vehicle window picture;
and determining a video frame closest to the acquisition time from the video acquired by the video shutter as a second window picture.
8. The vehicle window image anti-reflection device is characterized in that a vehicle window image is acquired through a video shutter and a picture shutter, and comprises:
the vehicle window picture determining module is used for determining a first vehicle window picture acquired by the picture shutter and determining a second vehicle window picture from a video acquired by the video shutter according to the first vehicle window picture;
the vehicle window picture phase reversal module is used for carrying out phase reversal processing on the first vehicle window picture or the second vehicle window picture to obtain a first vehicle window picture after phase reversal or a second vehicle window picture after phase reversal;
and the vehicle window picture overlapping module is used for overlapping the vehicle window area according to the reversed first vehicle window picture and the second vehicle window picture, or the reversed second vehicle window picture and the first vehicle window picture to obtain the anti-reflection vehicle window picture.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a vehicle window image anti-reflection method as claimed in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a vehicle window image antireflection method according to any one of claims 1 to 7.
CN202011330370.3A 2020-11-24 2020-11-24 Vehicle window image anti-reflection method and device, electronic equipment and storage medium Pending CN114549372A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011330370.3A CN114549372A (en) 2020-11-24 2020-11-24 Vehicle window image anti-reflection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011330370.3A CN114549372A (en) 2020-11-24 2020-11-24 Vehicle window image anti-reflection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114549372A true CN114549372A (en) 2022-05-27

Family

ID=81659230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011330370.3A Pending CN114549372A (en) 2020-11-24 2020-11-24 Vehicle window image anti-reflection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114549372A (en)

Similar Documents

Publication Publication Date Title
US20140340515A1 (en) Image processing method and system
Tang et al. Investigating haze-relevant features in a learning framework for image dehazing
US7796139B1 (en) Methods and apparatus for displaying a frame with contrasting text
JP2022071177A (en) Multiplexed high dynamic range image
US10477128B2 (en) Neighborhood haze density estimation for single-image dehaze
Galdran et al. A variational framework for single image dehazing
JP2015172926A (en) image processing method and image processing apparatus
KR20140111426A (en) System for enhancing the foggy luminance image using the estimation model of haze removal
KR20140140163A (en) Appatatus for image dehazing using the user controllable radical root operation
US10620434B2 (en) Multi-layer imaging
EP3624438A2 (en) Exposure control method and device, and electronic device
Mondal et al. Single image haze removal using contrast limited adaptive histogram equalization based multiscale fusion technique
CN112907497A (en) Image fusion method and image fusion device
JP2013162339A (en) Imaging apparatus
KR20140137832A (en) Apparatus for enhancing the foggy luminance image using lower bound of transmission rate
CN112884688A (en) Image fusion method, device, equipment and medium
CN114549372A (en) Vehicle window image anti-reflection method and device, electronic equipment and storage medium
Ilie et al. Gradient domain context enhancement for fixed cameras
EP3683716A1 (en) Monitoring method, apparatus and system, electronic device, and computer readable storage medium
US11354821B2 (en) Image processing method and apparatus
JP2002157588A (en) Method and apparatus for processing image data and recording medium with recording program for performing the method recorded thereon
CN114338958A (en) Image processing method and related equipment
Zhang et al. Haze removal from single images based on a luminance reference model
JP6821090B2 (en) Image processing equipment, image processing method, and image processing program
TWI673685B (en) Electronic image defogging system and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination