





技术领域technical field
本发明实施例涉及图像处理技术领域,尤其涉及一种车窗图像增透方法、装置、电子设备和存储介质。Embodiments of the present invention relate to the technical field of image processing, and in particular, to a method, device, electronic device, and storage medium for antireflection of a car window image.
背景技术Background technique
由于车窗玻璃会造成反光,因此在当前交通卡口上会带有偏振镜,用于滤除车窗上的反光。但是由于光的干涉现象以及很多车窗贴有贴膜,导致交通卡口拍摄到的图像中在车窗位置有彩色条纹,不利于对车窗内人员的观察和识别。Since the window glass causes reflections, the current traffic bayonet will have a polarizer to filter out the reflections on the window. However, due to the interference phenomenon of light and many car windows are covered with film, the images captured by the traffic bayonet have colored stripes at the position of the car window, which is not conducive to the observation and identification of the people in the car window.
现有技术中,为了提高对车窗内人员的识别度,采用的技术有:将车窗部分识别出来,降低饱和度。但是降低饱和度的同时会影响车内人员的色彩,比如造成人脸发灰,并且去条纹效果一般。或者将车窗部分识别出来,根据条纹的某种主要颜色降低饱和度,如绿色。但是由于车窗贴膜的颜色分布广泛,采用单一颜色降低饱和度的效果一般,并且也会影响到车内穿着该颜色衣服人员的色彩,造成偏色。In the prior art, in order to improve the recognition degree of the person in the window, the adopted technology includes: identifying the window part and reducing the saturation. However, reducing the saturation will also affect the color of the people in the car, such as causing the face to be gray, and the effect of stripping is general. Or identify the window part and desaturate it according to one of the main colors of the stripes, such as green. However, due to the wide color distribution of the window film, the effect of using a single color to reduce the saturation is general, and it will also affect the color of the people wearing the color in the car, resulting in color cast.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种车窗图像增透方法、装置、电子设备和存储介质,通过消除车窗上的条纹实现对车窗图像进行增透,提高车窗内的可见性。Embodiments of the present invention provide a method, device, electronic device and storage medium for antireflection of a car window image, which can achieve antireflection on the car window image by eliminating stripes on the car window, and improve the visibility in the car window.
第一方面,本发明实施例提供了一种车窗图像增透方法,所述车窗图像通过视频快门和图片快门获取,包括:In a first aspect, an embodiment of the present invention provides a method for antireflection of a car window image, where the car window image is acquired through a video shutter and a picture shutter, including:
确定由所述图片快门采集到的第一车窗图片,并根据所述第一车窗图片从所述视频快门采集到的视频中确定第二车窗图片;determining a first car window picture collected by the picture shutter, and determining a second car window picture from the video collected by the video shutter according to the first car window picture;
对所述第一车窗图片或所述第二车窗图片进行反相处理,得到反相后的第一车窗图片或反相后的第二车窗图片;Perform inversion processing on the first window picture or the second vehicle window picture to obtain the inverted first window picture or the inverted second window picture;
根据所述反相后的第一车窗图片和所述第二车窗图片,或所述反相后的第二车窗图片和所述第一车窗图片对车窗区域进行叠加处理,得到增透后的车窗图片。Perform superposition processing on the window area according to the reversed first window picture and the second vehicle window picture, or the reversed second vehicle window picture and the first vehicle window picture, to obtain A picture of the car window after anti-reflection.
第二方面,本发明实施例还提供了一种车窗图像增透装置,所述车窗图像通过视频快门和图片快门获取,包括:In a second aspect, an embodiment of the present invention further provides a vehicle window image antireflection device, where the vehicle window image is acquired through a video shutter and a picture shutter, including:
车窗图片确定模块,用于确定由所述图片快门采集到的第一车窗图片,并根据所述第一车窗图片从所述视频快门采集到的视频中确定第二车窗图片;a car window picture determination module, configured to determine a first car window picture collected by the picture shutter, and determine a second car window picture from the video collected by the video shutter according to the first car window picture;
车窗图片反相模块,用于对所述第一车窗图片或所述第二车窗图片进行反相处理,得到反相后的第一车窗图片或反相后的第二车窗图片;The window picture inversion module is used for inverting the first window picture or the second window picture to obtain the inverted first window picture or the inverted second window picture ;
车窗图片叠加模块,用于根据所述反相后的第一车窗图片和所述第二车窗图片,或所述反相后的第二车窗图片和所述第一车窗图片对车窗区域进行叠加处理,得到增透后的车窗图片。A car window picture overlay module, configured to pair the inverted first car window picture and the second car window picture, or the inverted second car window picture and the first car window picture The window area is superimposed to obtain an image of the window after anti-reflection.
第三方面,本发明实施例还提供了一种电子设备,包括:In a third aspect, an embodiment of the present invention also provides an electronic device, including:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序,storage means for storing 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 vehicle 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 on which a computer program is stored, and when the program is executed by a processor, implements the anti-reflection method for a window image according to any embodiment of the present invention .
本发明实施例基于视频快门和图片快门采集到的两种车窗图像,通过对其中一张车窗图像进行反相处理后,再叠加到另一张车窗图像上,以消除拍摄得到的车窗图像上的彩色条纹,增强车窗内可见性,进而提高对车内人员的识别准确度。The embodiment of the present invention is based on the two kinds of car window images collected by the video shutter and the picture shutter, by performing inversion processing on one of the car window images, and then superimposing them on the other car window image, so as to eliminate the captured car window image. The colored stripes on the window image enhance the visibility inside the window, thereby improving the identification accuracy of occupants in the vehicle.
附图说明Description of drawings
图1是本发明实施例一中的车窗图像增透方法的流程图;1 is a flowchart of a method for antireflection of a window image in Embodiment 1 of the present invention;
图2是本发明实施例二中的车窗图像增透方法的流程图;2 is a flowchart of a method for antireflection of a window image in Embodiment 2 of the present invention;
图3是本发明实施例三中的车窗图像增透方法的流程图;3 is a flowchart of a method for antireflection of a window image in Embodiment 3 of the present invention;
图4是车窗图片的叠加过程示意图;Figure 4 is a schematic diagram of the superposition process of the window pictures;
图5是本发明实施例四中的车窗图像增透装置的结构示意图;5 is a schematic structural diagram of a vehicle window image antireflection device in Embodiment 4 of the present invention;
图6是本发明实施例五中的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device in Embodiment 5 of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present invention.
实施例一Example 1
图1是本发明实施例一中的车窗图像增透方法的流程图,本实施例可适用于消除由于干涉现象导致交通卡口拍摄到的车窗图像上存在彩色条纹的情况。该方法可以由车窗图像增透装置来执行,该装置可以采用软件和/或硬件的方式实现,并可配置在电子设备中,例如电子设备可以是后台服务器等具有通信和计算能力的设备。该方法中的车窗图像通过视频快门和图片快门获取,如图1所示,该方法具体包括:FIG. 1 is a flow chart of a method for antireflection of a window image in Embodiment 1 of the present invention. This embodiment can be applied to eliminate color fringes on a window image captured by a traffic checkpoint due to an interference phenomenon. The method can be performed by a vehicle window image antireflection device, which can be implemented in software and/or hardware, and can be configured in an electronic device, for example, the electronic device can be a background server and other devices with communication and computing capabilities. The car window image in this method is obtained through a video shutter and a picture shutter, as shown in Figure 1, the method specifically includes:
步骤101、确定由图片快门采集到的第一车窗图片,并根据第一车窗图片从视频快门采集到的视频中确定第二车窗图片。Step 101: Determine a first window picture collected by the picture shutter, and determine a second window picture from the video collected by the video shutter according to the first window picture.
其中,视频快门和图片快门可以是双快门图像采集装置中两种采集图像的方式。双快门图像采集装置可以是具有双快门功能的相机,该相机可以应用于交通卡口,用于对过往车辆进行监控。其中,视频快门用于实况录像,图片快门用于闪光灯抓拍。两种快门的主要区别在于曝光和补光条件不同。实况录像是为了满足对车辆的捕获,注重画面整体场景明亮,无强补光打透车窗,通常车窗内人物可见性不佳。闪光灯抓拍是车辆行驶到预设抓拍位置时,相机获取的一帧特殊图像,使用外置氙气补光灯补光,用于获取车窗内人脸效果,通常使用千分之一秒级别的快门。而由于车窗是由玻璃制成,通过会有一定的反光,因此在交通卡口的相机上通过带有偏振镜,用于滤除车窗上的反光,方便看见车内。Among them, the video shutter and the picture shutter may be two ways of capturing images in a dual-shutter image capturing device. The dual-shutter image acquisition device may be a camera with dual-shutter function, and the camera may be applied to a traffic bayonet for monitoring passing vehicles. Among them, the video shutter is used for live video recording, and the picture shutter is used for flash capture. The main difference between the two shutters is the exposure and fill light conditions. Live video recording is to satisfy the capture of the vehicle, focusing on the overall bright scene of the picture, without strong supplementary light hitting the window, usually the visibility of the characters in the window is poor. Flash snapshot is a special frame of image obtained by the camera when the vehicle is driving to the preset snapshot position. The external xenon fill light is used to fill in the light to obtain the effect of the face in the window. Usually, the shutter of one thousandth of a second is used. . Since the car window is made of glass, there will be a certain amount of reflection, so the camera at the traffic bayonet is equipped with a polarizer to filter out the reflection on the window, so that it is convenient to see the inside of the car.
但是由于光的干涉现象以及很多车窗贴有贴膜,导致交通卡口拍摄到的图像中在车窗位置有彩色条纹,不利于对车窗内人员的观察和识别。光的干涉是指相位(即振动状态)差恒定的两列(或多列)光波相遇,在叠加区域的某些点振动加强,某些点减弱的现象。例如当阳光照在肥皂泡上时就会看到美丽的彩色;如果在光路上放置一个有色薄玻璃片(或薄膜),在后面的屏上呈现的图案是亮暗相间的单色条纹;如果入射光是单色光,薄膜表面上将出现明暗相间的干涉条纹;如果入射光是复色光,就出现彩色条纹。所以阳光照射在薄膜上,所见的彩色条纹是扩展复色光源所产生的干涉现象。车窗上的彩色条纹不利于对车内人员进行识别,因此需要对车窗上的彩色条纹进行消除。However, due to the interference phenomenon of light and many car windows are covered with film, the images captured by the traffic bayonet have colored stripes at the position of the car window, which is not conducive to the observation and identification of the people in the car window. Interference of light refers to the phenomenon that two columns (or multiple columns) of light waves with a constant phase (ie, vibration state) difference meet, and the vibration is strengthened at some points in the superimposed area and weakened at some points. For example, when the sun shines on soap bubbles, you will see beautiful colors; if you place a colored thin glass sheet (or film) in the light path, the pattern presented on the back screen is a single color stripe of light and dark; if If the incident light is monochromatic light, light and dark interference fringes will appear on the surface of the film; if the incident light is polychromatic light, colored fringes will appear. Therefore, when the sunlight shines on the film, the color fringes seen are the interference phenomenon produced by the expanded polychromatic light source. The colored stripes on the windows are not conducive to the identification of people in the car, so it is necessary to eliminate the colored stripes on the windows.
具体的,对于通过视频快门和图片快门获取到的两种图像,首先通过图片快门采集对车窗的抓拍图像作为第一车窗图片,再根据第一车窗图片的采集时机从视频快门采集到的实况录像视频中确定第二车窗图片,根据第一车窗图片的采集时机确定第二车窗图片,以保证两张图片中内容的一致性,便于后续叠加的准确度。同时由于视频快门和图片快门是同一相机上的或者位于参数配置相同的两个相机上,使得拍摄得到的车窗图片上产生的干涉现象相同,即两个车窗图片上彩色条纹分布相同。Specifically, for the two kinds of images obtained through the video shutter and the picture shutter, firstly, the snapshot image of the car window is collected through the picture shutter as the first car window picture, and then the first car window picture is collected from the video shutter according to the collection timing of the first car window picture. The second car window picture is determined in the live video of the first car window, and the second car window picture is determined according to the collection timing of the first car window picture, so as to ensure the consistency of the contents of the two pictures and facilitate the accuracy of subsequent superposition. At the same time, because the video shutter and the picture shutter are located on the same camera or on two cameras with the same parameter configuration, the interference phenomenon generated on the captured window pictures is the same, that is, the color fringes on the two window pictures are distributed the same.
在一个可行的实施例中,步骤101包括:In a feasible embodiment,
获取由图片快门采集到的第一图片,从第一图片中确定车窗区域作为第一车窗图片;obtaining the first picture collected by the picture shutter, and determining the window area from the first picture as the first window picture;
并根据第一车窗图片从视频快门采集到的视频中确定第二图片,从第二图片中确定车窗区域作为第二车窗图片;and determining the second picture from the video collected by the video shutter according to the first window picture, and determining the window area from the second picture as the second window picture;
其中,车窗区域的确定步骤如下:The steps for determining the window area are as follows:
对第一图片或第二图片进行车体检测和车牌定位,得到车体位置和车牌位置;Perform vehicle body detection and license plate positioning on the first picture or the second picture to obtain the vehicle body position and the license plate position;
根据车牌位置从车体位置中确定车窗粗定位区域;Determine the coarse positioning area of the window from the position of the vehicle body according to the position of the license plate;
根据车窗的形态特征从车窗粗定位区域中提取车窗区域。The window area is extracted from the coarse positioning area of the window according to the morphological features of the window.
由于图片快门和视频快门获取到的抓拍图片以及实况录像中除了车辆的车窗区域还会包括车体的其他部位以及包括车辆以外的场景,而除了车窗区域以外的部分存在会导致后续叠加不准确的现象,因此需要进行车窗区域的提取。In addition to the window area of the vehicle, the snapshot images obtained by the picture shutter and the video shutter and the live video also include other parts of the vehicle body and scenes other than the vehicle, and the existence of parts other than the window area will cause subsequent overlays to be ineffective. accurate phenomenon, so the extraction of the window area is required.
具体的,获取到图片快门采集到的抓拍图片后,将该抓拍图片作为第一图片,从第一图片中选取车窗区域作为第一车窗图片,至此第一车窗图片中仅包括车辆的车窗区域。示例性的,从第一图片中选取车窗区域时,首先进行车体检测和车牌定位,得到车体所在位置以及车牌所在位置,由于车窗区域位于车牌上方,因此可以从车体所在区域中得到车窗所在的粗定位区域,最后根据车窗的形态特征对粗定位区域进行进一步的定位,定位后截取车窗区域作为第一车窗图片。同理,对第二图片进行车窗区域的提取,将提取的车窗区域作为第二车窗图片。进一步的,控制第一车窗图片和第二车窗图片的大小相等,以便后续叠加时不会发生错位现象,导致车窗叠加出现重影等现象。Specifically, after the snapshot image collected by the picture shutter is obtained, the snapshot image is used as the first image, and the window area is selected from the first image as the first window image. So far, the first window image only includes the vehicle's window area. Exemplarily, when selecting the window area from the first picture, first perform vehicle body detection and license plate positioning to obtain the location of the vehicle body and the location of the license plate. The coarse positioning area where the window is located is obtained, and finally the coarse positioning area is further positioned according to the morphological characteristics of the window. After positioning, the window area is intercepted as the first window picture. Similarly, the window area is extracted from the second picture, and the extracted window area is used as the second window picture. Further, the size of the first window image and the second vehicle window image is controlled to be equal, so that a dislocation phenomenon will not occur during subsequent stacking, resulting in the phenomenon of ghosting and the like appearing in the stacking of the windows.
在一个可行的实施例中,根据第一车窗图片从视频快门采集到的视频中确定第二车窗图片,包括:In a feasible embodiment, determining the second car window picture from the video collected by the video shutter according to the first car window picture includes:
确定第一车窗图片的采集时间;Determine the acquisition time of the first window picture;
从视频快门采集到的视频中确定与采集时间最接近的视频帧作为第二车窗图片。From the video collected by the video shutter, the video frame closest to the collection time is determined as the second window picture.
根据第一车窗图片的采集时间从视频中选择最接近的视频帧作为第二车窗图片,使得第一车窗图片上的条纹分布与抓拍图片相同。这是由于若处于不同的时机,由于光照等外部环境的变化会导致条纹分布出现变化,因此需要保证第一车窗图片和第二车窗图片的采集时间接近。According to the collection time of the first window image, the closest video frame is selected from the video as the second vehicle window image, so that the fringe distribution on the first vehicle window image is the same as the snapshot image. This is because at different timings, the distribution of fringes will change due to changes in the external environment such as illumination, so it is necessary to ensure that the acquisition times of the first window image and the second vehicle window image are close to each other.
步骤102、对第一车窗图片或第二车窗图片进行反相处理,得到反相后的第一车窗图片或反相后的第二车窗图片。
其中,反向处理是指将一幅图像上每个颜色都转换为其补色,即相当于色相旋转180度,色轮上相距180度的颜色互为补色。Among them, the reverse processing refers to converting each color on an image to its complementary color, which is equivalent to a 180-degree rotation of the hue, and the colors on the color wheel that are 180 degrees apart are complementary colors to each other.
具体的,反相处理的具体操作是,如果用RGB三通道表示第一车窗图片和第二车窗图片,则其中任一像素点三通道的强度值范围为0-255,如果目标像素点的RGB三通道的值为(r,g,b),进行反相处理后该目标像素点的RGB通道值为(255-r,255-g,255-b)。可以对第一车窗图片和第二车窗图片中任一张车窗图片进行反向处理,即对车窗图片中每一像素点均进行反相处理,以得到反相后的彩色条纹。Specifically, the specific operation of the inversion processing is, if the first window picture and the second window picture are represented by RGB three channels, the intensity value of the three channels of any pixel point ranges from 0 to 255. If the target pixel point The values of the three RGB channels of , are (r, g, b), and the RGB channel values of the target pixel after inversion processing are (255-r, 255-g, 255-b). Reverse processing may be performed on any one of the first window picture and the second vehicle window picture, that is, inverse processing is performed on each pixel in the vehicle window picture, so as to obtain inverted color stripes.
步骤103、根据反相后的第一车窗图片和第二车窗图片,或反相后的第二车窗图片和第一车窗图片对车窗区域进行叠加处理,得到增透后的车窗图片。
由于将第一车窗图片或第二车窗图片进行反相处理后,得到与车窗条纹颜色完全相反的负片,将该负片叠加到未进行反相处理的第二车窗图片或第一车窗图片上,并且由于第一车窗图片和第二车窗图片上条纹分布完全相同,因此通过负片叠加使得条纹得到消除。Since the first window picture or the second window picture is inverted, a negative film with a completely opposite color to the window stripes is obtained, and the negative film is superimposed on the uninverted second window picture or the first car window. On the window picture, and because the fringe distribution on the first window image and the second window image is exactly the same, the fringes are eliminated by superimposing the negative film.
若只采用一张车窗图片与其本身的反向图片进行叠加,会导致该图片被抵消成灰色。例如,采用Alpha值为0.5的Alpha叠加,叠加后的图片上任一点的像素值为:0.5(r,g,b)+(1-0.5)(255-r,255-g,255-b)=(128,128,128),这是由于图片中三通道值等比例混合,按照亮度不同生成黑、白、灰。而在本发明实施例中,进行反向处理的车窗图片与叠加的车窗图片来源于不同的快门,因此两张图片上除了彩色条纹分布相同,其他像素点的分布不相同,因此叠加后的图片不会被完全抵消成灰色,使得消除彩色条纹的同时保证车内场景的细节保留,提高车内人员的识别准确度。If only one window image is superimposed with its own reverse image, it will cause the image to be offset into gray. For example, using Alpha overlay with an Alpha value of 0.5, the pixel value of any point on the superimposed image is: 0.5(r, g, b)+(1-0.5)(255-r, 255-g, 255-b)= (128, 128, 128), this is because the three-channel values in the picture are mixed in equal proportions, and black, white, and gray are generated according to different brightness. In the embodiment of the present invention, the reverse-processed window image and the superimposed window image originate from different shutters. Therefore, except for the same distribution of color stripes, the distribution of other pixels is different on the two images. The picture will not be completely offset into gray, so that the color stripes are eliminated while the details of the scene in the car are preserved, and the recognition accuracy of the people in the car is improved.
本发明实施例基于视频快门和图片快门采集到的两种车窗图像,通过对其中一张车窗图像进行反相处理后,再叠加到另一张车窗图像上,以消除拍摄得到的车窗图像上的彩色条纹,增强车窗内可见性,进而提高对车内人员的识别准确度。The embodiment of the present invention is based on the two kinds of car window images collected by the video shutter and the picture shutter, by performing inversion processing on one of the car window images, and then superimposing them on the other car window image, so as to eliminate the captured car window image. The colored stripes on the window image enhance the visibility inside the window, thereby improving the identification accuracy of occupants in the vehicle.
实施例二Embodiment 2
图2是本发明实施例二中的车窗图像增透方法的流程图,本实施例二在实施例一的基础上进行进一步地优化。如图2所示,该方法包括:FIG. 2 is a flow chart of a method for antireflection of a window image in Embodiment 2 of the present invention. This Embodiment 2 is further optimized on the basis of Embodiment 1. As shown in FIG. As shown in Figure 2, the method includes:
步骤201、确定由图片快门采集到的第一车窗图片,并根据第一车窗图片从视频快门采集到的视频中确定第二车窗图片。Step 201: Determine the first window picture collected by the picture shutter, and determine the second window picture from the video collected by the video shutter according to the first window picture.
步骤202、对第一车窗图片进行反相处理,得到反相后的第一车窗图片。Step 202: Perform inversion processing on the first vehicle window picture to obtain an inverted first vehicle window image.
对图片快门得到的抓拍图像进行反相处理,得到反相后的第一车窗图片。示例性的,对抓拍图像中每一像素点的像素值进行(255-r,255-g,255-b)的计算,其中(r,g,b)为抓拍图像中目标像素点的三通道像素值。Perform inversion processing on the captured image obtained by the picture shutter to obtain the first vehicle window picture after inversion. Exemplarily, the calculation of (255-r, 255-g, 255-b) is performed on the pixel value of each pixel in the captured image, where (r, g, b) is the three-channel of the target pixel in the captured image. Pixel values.
步骤203、将反相后的第一车窗图片叠加到第二车窗图片上,得到叠加后的车窗图片。
由于反相后的第一车窗图片中包括反相后的彩色条纹,因此将反相后的第一车窗图片叠加到第二车窗图片上,由于第一车窗图片和第二车窗图片上彩色条纹分布相同,因此叠加后使得反相后的彩色条纹与未经反相后的彩色条纹相抵消,因此在叠加后的车窗图片中没有彩色条纹。Since the inverted first window picture includes inverted color stripes, the inverted first window picture is superimposed on the second window picture. The color fringes on the pictures are distributed the same, so after superimposition, the inverted color fringes cancel out the non-inverted color fringes, so there are no colored fringes in the superimposed car window picture.
在一个可行的实施例中,叠加为Alpha叠加,通过如下公式进行叠加:In a feasible embodiment, the superposition is Alpha superposition, and the superposition is performed by the following formula:
(R,G,B)=A(r1,g1,b1)+(1-A)(r2,g2,b2);(R, G, B)=A(r1, g1, b1)+(1-A)(r2, g2, b2);
其中,(R,G,B)为叠加后的车窗图片中目标像素点的三通道值,(r1,g1,b1)为未经过反相处理的车窗图片中目标像素点的三通道值,(r2,g2,b2)为经过反相处理后的车窗图片中目标像素点的三通道值,A为Alpha值。Among them, (R, G, B) is the three-channel value of the target pixel in the superimposed window image, (r1, g1, b1) is the three-channel value of the target pixel in the window image that has not undergone inversion processing. , (r2, g2, b2) is the three-channel value of the target pixel in the inverted window image, and A is the Alpha value.
由于在一张图片中色彩的取值是有范围的,因此若直接将两张图片中的像素值进行相加会导致叠加后的图片中部分像素点的色彩会溢出,因此在本发明实施例中采用Alpha叠加,避免图片叠加造成的色彩溢出。Since the value of color in a picture has a range, if the pixel values in the two pictures are directly added, the color of some pixels in the superimposed picture will overflow. Therefore, in the embodiment of the present invention Alpha overlay is used to avoid color overflow caused by picture overlay.
具体的,(r1,g1,b1)为第二车窗图片中目标像素点的三通道值,(r2,g2,b2)为反相后的第一车窗图片中目标像素点的三通道值。(R,G,B)为叠加后的车窗图片中目标像素点的三通道值。示例性的,由于在前述步骤中,将第一车窗图片和第二车窗图片的大小设置相同,并且根据车窗的外边缘进行定位,使得进行叠加的像素点所代表的对象在车辆上位置相同,避免出现叠加偏移的问题。在本发明实施例中,Alpha值设为0.5。Specifically, (r1, g1, b1) are the three-channel values of the target pixel in the second window image, and (r2, g2, b2) are the three-channel values of the target pixel in the inverted first window image . (R, G, B) are the three-channel values of the target pixel in the superimposed window image. Exemplarily, because in the foregoing steps, 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 object represented by the pixels to be superimposed is on the vehicle. The position is the same to avoid the problem of overlapping offsets. In this embodiment of the present invention, the Alpha value is set to 0.5.
在一个可行的实施例中,在将反相后的第一车窗图片叠加到第二车窗图片上之前,还包括:In a feasible embodiment, before superimposing the inverted first window picture on the second vehicle window picture, the method further includes:
对第二车窗图片进行滤波处理。Filtering is performed on the second window image.
若视频快门和图片快门均属于一个传感器上,则该传感器无法同时输出两幅图片,所以第一车窗图片和第二车窗图片严格上并不是同一时间输出的。在上述示例的基础上,选择与第一车窗图片的采集时间最接近的一帧作为第二车窗图片,但是在实际使用中,会存在一定的差异,导致在叠加时会在车窗边框处等大边缘的区域产生重影现象。If both the video shutter and the picture shutter belong to the same sensor, the sensor cannot output two pictures at the same time, so the first window picture and the second window picture are not strictly output at the same time. On the basis of the above example, a frame closest to the acquisition time of the first window picture is selected as the second window picture, but in actual use, there will be some differences, resulting in the window frame when superimposed. Ghosting occurs in areas with equal large edges.
因此为了消除这种重影现象,在图片叠加前,对第二车窗图片进行滤波处理,去除车窗边框等大边缘的细节特征,仅保留第二车窗图片的基础层,即彩色条纹的基础信息。由于条纹的宽度很宽,无需进行像素级的匹配抵消,因此进行滤波后少数像素点的错位不会影响条纹正片和负片的抵消。同时进行滤波后车窗边框处的明显边缘已经进行了过滤,不会产生重影现象。Therefore, in order to eliminate this ghosting phenomenon, before the pictures are superimposed, the second window picture is filtered to remove the detailed features of the large edges such as the window frame, and only the base layer of the second window picture is retained, that is, the color stripes. basic information. Since the width of the stripes is very wide, there is no need to perform pixel-level matching and cancellation, so the dislocation of a few pixels after filtering will not affect the cancellation of the positive and negative strips. At the same time, after filtering, the obvious edges at the frame of the window have been filtered, and no ghosting phenomenon will occur.
具体的,对第二车窗图片进行滤波处理的操作可以与第一车窗图片的反相处理同时进行,后续将反相后的第一车窗图片和滤波后的第二车窗图片进行叠加,得到叠加后的车窗图片。Specifically, the operation of filtering the second window image may be performed simultaneously with the inversion processing of the first window image, and the inverted first window image and the filtered second window image are subsequently superimposed. , to get the 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 captured by the video shutter includes the overall situation of the vehicle, and the window area does not include the interior of the vehicle. The detailed information of the person can be regarded as only including the color stripe information, and in the first window picture collected by the picture shutter, due to the fill light processing, the window area includes the information of the people in the car in addition to the color stripe information. The first window picture cannot be filtered to avoid interfering with the detailed features of the occupants in the vehicle.
为了提高叠加准确度,可以采用两片传感器的结构对车窗图片进行获取,具体的,中间通过分光镜把光束分为两路,两个传感器具备不同的快门同时获取到同一幅图像,且可以进行像素级的匹配。一片传感器获取实况录像图像,一片传感器获取抓拍图片,两路快门差异控制在500us以内,使得实况录像图像和抓拍图片中车窗位置相同,然后直接进行叠加即可,避免在叠加中存在重影的现象,影响叠加准确度。In order to improve the superposition accuracy, the structure of two sensors can be used to obtain the picture of the car window. Specifically, the beam is divided into two paths by a beam splitter in the middle, and the two sensors have different shutters to obtain the same image at the same time, and can Perform pixel-level matching. One sensor captures the live video image and one sensor captures the captured image. The difference between the two shutters is controlled within 500us, so that the position of the window in the live video image and the captured image is the same, and then superimposed directly to avoid ghosting in the superposition. phenomenon, which affects the superposition accuracy.
步骤204、对叠加后的车窗图片进行反相处理,得到增透后的车窗图片。
由上述描述可知,对于第一车窗图片相当于是条纹+人物,第二车窗图片相当于是条纹,对第一车窗图片进行反相后得到的是反相后的条纹+反相后的人物,叠加后的车窗图片=反相后的条纹+反相后的人物+条纹=反相后的人物。因此若要得到车窗内人员的特征,需要对叠加后的车窗图片再进行一次反相处理,得到人物,使得增透后的车窗图片中人物的可见性增加,便于识别,有利于人眼感官。It can be seen from the above description that the first window picture is equivalent to stripes + characters, the second window picture is equivalent to stripes, and the inverted stripes + inverted characters are obtained after inverting the first window picture. , the superimposed car window picture=inverted stripes+inverted characters+stripes=inverted characters. Therefore, in order to obtain the characteristics of the people in the car window, it is necessary to perform an inversion process on the superimposed car window image to obtain the characters, so that the visibility of the characters in the anti-reflection car window image is increased, which is easy to identify and beneficial to people. Eye Senses.
本发明实施例基于视频快门和图片快门采集到的两种车窗图像,通过对图片快门得到的第一车窗图片进行反相处理后,再叠加到视频快门得到的第二车窗图像上,以消除拍摄得到的车窗图像上的彩色条纹,增强车窗内可见性,进而提高对车内人员的识别准确度。The embodiment of the present invention is based on two kinds of window images collected by the video shutter and the picture shutter, and after performing inversion processing on the first window image obtained by the picture shutter, and then superimposing it on the second window image obtained by the video shutter, In order to eliminate the color stripes on the captured window image, the visibility in the window is enhanced, and the recognition accuracy of the occupants in the vehicle is improved.
实施例三Embodiment 3
图3是本发明实施例三中的车窗图像增透方法的流程图,本实施例二在实施例一的基础上进行进一步地优化。如图3所示,该方法包括:FIG. 3 is a flow chart of a method for antireflection of a window image in Embodiment 3 of the present invention, and Embodiment 2 is further optimized on the basis of Embodiment 1. As shown in FIG. As shown in Figure 3, the method includes:
步骤301、确定由图片快门采集到的第一车窗图片,并根据第一车窗图片从视频快门采集到的视频中确定第二车窗图片。Step 301: Determine the first window picture collected by the picture shutter, and determine the second window picture from the video collected by the video shutter according to the first window picture.
步骤302、对第二车窗图片进行反相处理,得到反相后的第二车窗图片。
对视频快门得到的实况录像图片进行反相处理,得到反相后的第二车窗图片。示例性的,对实况录像图片中每一像素点的像素值进行(255-r,255-g,255-b)的计算,其中(r,g,b)为实况录像图片中目标像素点的三通道像素值。Perform inversion processing on the live video image obtained by the video shutter to obtain a second vehicle window image after inversion. Exemplarily, (255-r, 255-g, 255-b) is calculated for the pixel value of each pixel in the live video picture, where (r, g, b) is the target pixel value in the live video picture. Three-channel pixel value.
步骤303、将反相后的第二车窗图片叠加到第一车窗图片上,得到叠加后的车窗图片为增透后的车窗图片。
由于反相后的第二车窗图片中包括反相后的彩色条纹,因此将反相后的第二车窗图片叠加到第一车窗图片上,由于第一车窗图片和第二车窗图片上彩色条纹分布相同,因此叠加后使得反相后的彩色条纹与未经反相后的彩色条纹相抵消。Since the inverted second window picture includes inverted color stripes, the inverted second window picture is superimposed on the first window picture. The distribution of color fringes on the picture is the same, so after superposition, the inverted color fringes and the non-inverted color fringes are canceled.
在一个可行的实施例中,叠加为Alpha叠加,通过如下公式进行叠加:In a feasible embodiment, the superposition is Alpha superposition, and the superposition is performed by the following formula:
(R,G,B)=A(r1,g1,b1)+(1-A)(r2,g2,b2);(R, G, B)=A(r1, g1, b1)+(1-A)(r2, g2, b2);
其中,(R,G,B)为叠加后的车窗图片中目标像素点的三通道值,(r1,g1,b1)为未经过反相处理的车窗图片中目标像素点的三通道值,(r2,g2,b2)为经过反相处理后的车窗图片中目标像素点的三通道值,A为Alpha值。Among them, (R, G, B) is the three-channel value of the target pixel in the superimposed window image, (r1, g1, b1) is the three-channel value of the target pixel in the window image that has not undergone inversion processing. , (r2, g2, b2) is the three-channel value of the target pixel in the inverted window image, and A is the Alpha value.
具体的,(r1,g1,b1)为第一车窗图片中目标像素点的三通道值,(r2,g2,b2)为反相后的第二车窗图片中目标像素点的三通道值。(R,G,B)为叠加后的车窗图片中目标像素点的三通道值。示例性的,由于在前述步骤中,将第一车窗图片和第二车窗图片的大小设置相同,并且根据车窗的外边缘进行像素级的匹配,使得进行叠加的像素点所代表的对象在车辆上位置相同,避免出现叠加偏移的问题。在本发明实施例中,Alpha值设为0.5。Specifically, (r1, g1, b1) are the three-channel values of the target pixel in the first window image, and (r2, g2, b2) are the three-channel values of the target pixel in the second window image after inversion . (R, G, B) are the three-channel values of the target pixel in the superimposed window image. Exemplarily, since in the foregoing steps, 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 objects represented by the superimposed pixels are The same position on the vehicle avoids the problem of overlapping offsets. In this embodiment of the present invention, the Alpha value is set to 0.5.
在一个可行的实施例中,在将反相后的第二车窗图片叠加到第一车窗图片上之前,还包括:In a feasible embodiment, before superimposing the inverted second vehicle window image on the first vehicle window image, the method further includes:
对反相后的第二车窗图片进行滤波处理。Filtering processing is performed on the inverted second window picture.
由上述可知,为了消除车窗边框处的叠加重影现象,需要对视频快门得到的第二车窗图片进行滤波处理。具体的,对第二车窗图片进行反相后,再进行滤波处理或者对第二车窗图片先进行滤波处理再进行反相处理,得到滤波后的反相第二车窗图片,再将该图片与第一车窗图片进行叠加,得到叠加后的车窗图片,即为增透后的车窗图片。It can be seen from the above that in order to eliminate the superimposed ghost phenomenon at the frame of the car window, it is necessary to perform filtering processing on the second car window picture obtained by the video shutter. Specifically, after the second window picture is inverted, then filtering is performed, or the second window picture is first filtered and then inverted, so as to obtain a filtered inverted second window picture, and then the second window picture is filtered. The picture and the first window picture are superimposed to obtain the superimposed picture of the car window, which is the picture of the car window after antireflection.
车窗图片的叠加过程如图4所示,对于第一车窗图片相当于是条纹+人物,第二车窗图片相当于是条纹,对第二车窗图片进行反相后得到的是反相的条纹,叠加后的车窗图片=反相的条纹+条纹+人物=人物。因此将反相后的第二车窗图片叠加到第一车窗图片上,即可得到增透后的车窗图片,无需再进行反相处理。The superposition process of the window pictures is shown in Figure 4. The first window picture is equivalent to stripes + characters, the second window picture is equivalent to stripes, and the inverted stripes are obtained after inverting the second window picture. , the superimposed car window picture = reversed stripes + stripes + characters = characters. Therefore, by superimposing the inverted second window picture on the first car window picture, the anti-reflection window picture can be obtained, and no inversion processing is required.
本发明实施例获取到实况录像的第二车窗图片后,将第二车窗图片进行反相,得到与抓拍的第一车窗图片中车窗上条纹颜色完全相反的负片。然后把负片叠加到第一车窗图片的车窗位置上,从而消除拍摄得到的车窗图像上的彩色条纹,增强车窗内可见性,进而提高对车内人员的识别准确度。In the embodiment of the present invention, after acquiring the second window picture of the live video, the second window picture is inverted to obtain a negative film with a completely opposite color to the stripes on the window in the captured first window picture. Then, the negative film is superimposed on the window position of the first window image, thereby eliminating the color stripes on the captured window image, enhancing the visibility in the window, and further improving the recognition accuracy of the occupants in the vehicle.
实施例四Embodiment 4
图5是本发明实施例四中的车窗图像增透装置的结构示意图,本实施例可适用于消除由于干涉现象导致交通卡口拍摄到的车窗图像上存在彩色条纹的情况。如图5所示,该装置中所述车窗图像通过视频快门和图片快门获取,该装置包括:5 is a schematic structural diagram of a vehicle window image antireflection device in Embodiment 4 of the present invention. This embodiment can be applied to eliminate color fringes on a vehicle window image captured at a traffic checkpoint due to an interference phenomenon. As shown in FIG. 5 , the vehicle window image in the device is obtained through a video shutter and a picture shutter, and the device includes:
车窗图片确定模块510,用于确定由所述图片快门采集到的第一车窗图片,并根据所述第一车窗图片从所述视频快门采集到的视频中确定第二车窗图片;a car window
车窗图片反相模块520,用于对所述第一车窗图片或所述第二车窗图片进行反相处理,得到反相后的第一车窗图片或反相后的第二车窗图片;The window
车窗图片叠加模块530,用于根据所述反相后的第一车窗图片和所述第二车窗图片,或所述反相后的第二车窗图片和所述第一车窗图片对车窗区域进行叠加处理,得到增透后的车窗图片。The car window
本发明实施例基于视频快门和图片快门采集到的两种车窗图像,通过对其中一张车窗图像进行反相处理后,再叠加到另一张车窗图像上,以消除拍摄得到的车窗图像上的彩色条纹,增强车窗内可见性,进而提高对车内人员的识别准确度。The embodiment of the present invention is based on the two kinds of car window images collected by the video shutter and the picture shutter, by performing inversion processing on one of the car window images, and then superimposing them on the other car window image, so as to eliminate the captured car window image. The colored stripes on the window image enhance the visibility inside the window, thereby improving the identification accuracy of occupants in the vehicle.
可选的,所述车窗图片叠加模块530,包括车窗图片第一叠加单元,具体用于:Optionally, the vehicle window
将所述反相后的第一车窗图片叠加到所述第二车窗图片上,得到叠加后的车窗图片;superimposing the inverted first window image on the second vehicle window image to obtain a superimposed vehicle window image;
对所述叠加后的车窗图片进行反相处理,得到增透后的车窗图片。Perform inverse processing on the superimposed car window picture to obtain an anti-reflection car window picture.
可选的,所述车窗图片叠加模块530,包括车窗图片第二叠加单元,具体用于:Optionally, the window
将所述反相后的第二车窗图片叠加到所述第一车窗图片上,得到叠加后的车窗图片为增透后的车窗图片。The inverted second window picture is superimposed on the first vehicle window picture, and the superimposed vehicle window picture is obtained as an anti-reflection window picture.
可选的,所述叠加为Alpha叠加,通过如下公式进行叠加:Optionally, the superposition is Alpha superposition, which is superimposed by the following formula:
(R,G,B)=A(r1,g1,b1)+(1-A)(r2,g2,b2);(R, G, B)=A(r1, g1, b1)+(1-A)(r2, g2, b2);
其中,(R,G,B)为叠加后的车窗图片中目标像素点的三通道值,(r1,g1,b1)为未经过反相处理的车窗图片中目标像素点的三通道值,(r2,g2,b2)为经过反相处理后的车窗图片中目标像素点的三通道值,A为Alpha值。Among them, (R, G, B) is the three-channel value of the target pixel in the superimposed window image, (r1, g1, b1) is the three-channel value of the target pixel in the window image that has not undergone inversion processing. , (r2, g2, b2) is the three-channel value of the target pixel in the inverted window image, and A is the Alpha value.
可选的,所述装置还包括第二车窗图片滤波模块,用于:Optionally, the device further includes a second window picture filtering module for:
在根据所述反相后的第一车窗图片和所述第二车窗图片,或所述反相后的第二车窗图片和所述第一车窗图片对车窗区域进行叠加处理之前,对所述第二车窗图片或所述反相后的第二车窗图片进行滤波处理。Before superimposing the window area according to the inverted first window image and the second vehicle window image, or the inverted second vehicle window image and the first vehicle window image , performing filtering processing on the second vehicle window picture or the inverted second vehicle window image.
可选的,车窗图片确定模块510,具体用于:Optionally, the vehicle window
获取由所述图片快门采集到的第一图片,从所述第一图片中确定车窗区域作为第一车窗图片;acquiring a first picture collected by the picture shutter, and determining a window area from the first picture as the first window picture;
并根据所述第一车窗图片从所述视频快门采集到的视频中确定第二图片,从所述第二图片中确定车窗区域作为第二车窗图片;and determining a second picture from the video collected by the video shutter according to the first window picture, and determining the window area from the second picture as the second window picture;
其中,车窗图片确定模块510包括车窗区域确定单元,具体用于:Wherein, the vehicle window
对所述第一图片或第二图片进行车体检测和车牌定位,得到车体位置和车牌位置;Perform vehicle body detection and license plate positioning on the first picture or the second picture to obtain the vehicle body position and the license plate position;
根据所述车牌位置从所述车体位置中确定车窗粗定位区域;Determine the coarse positioning area of the window from the position of the vehicle body according to the position of the license plate;
根据车窗的形态特征从所述车窗粗定位区域中提取车窗区域。The vehicle window area is extracted from the vehicle window coarse positioning area according to the morphological feature of the vehicle window.
可选的,车窗图片确定模块510中包括第二车窗图片确定单元,具体用于:Optionally, the vehicle window
确定所述第一车窗图片的采集时间;determining the acquisition time of the first window picture;
从所述视频快门采集到的视频中确定与所述采集时间最接近的视频帧作为第二车窗图片。From the video collected by the video shutter, a video frame closest to the collection time is determined as the second window picture.
本发明实施例所提供的车窗图像增透装置可执行本发明任意实施例所提供的车窗图像增透方法,具备执行车窗图像增透方法相应的功能模块和有益效果。The vehicle window image antireflection device provided by the embodiment of the present invention can execute the vehicle window image antireflection method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the vehicle window image antireflection method.
实施例五Embodiment 5
图6是本发明实施例五提供的一种电子设备的结构示意图。图6示出了适于用来实现本发明实施方式的示例性电子设备12的框图。图6显示的电子设备12仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。FIG. 6 is a schematic structural diagram of an electronic device according to Embodiment 5 of the present invention. Figure 6 shows a block diagram of an exemplary
如图6所示,电子设备12以通用计算设备的形式表现。电子设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储装置28,连接不同系统组件(包括系统存储装置28和处理单元16)的总线18。As shown in FIG. 6, the
总线18表示几类总线结构中的一种或多种,包括存储装置总线或者存储装置控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。The
电子设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
系统存储装置28可以包括易失性存储装置形式的计算机系统可读介质,例如随机存取存储装置(RAM)30和/或高速缓存存储装置32。电子设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图6未显示,通常称为“硬盘驱动器”)。尽管图6中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储装置28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储装置28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本发明所描述的实施例中的功能和/或方法。A program/
电子设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该设备12交互的设备通信,和/或与使得该设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,电子设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图6所示,网络适配器20通过总线18与电子设备12的其它模块通信。应当明白,尽管图6中未示出,可以结合电子设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The
处理单元16通过运行存储在系统存储装置28中的程序,从而执行各种功能应用以及数据处理,例如实现本发明实施例所提供的车窗图像增透方法,所述车窗图像通过视频快门和图片快门获取,包括:The
确定由所述图片快门采集到的第一车窗图片,并根据所述第一车窗图片从所述视频快门采集到的视频中确定第二车窗图片;determining a first car window picture collected by the picture shutter, and determining a second car window picture from the video collected by the video shutter according to the first car window picture;
对所述第一车窗图片或所述第二车窗图片进行反相处理,得到反相后的第一车窗图片或反相后的第二车窗图片;Perform inversion processing on the first window picture or the second vehicle window picture to obtain the inverted first window picture or the inverted second window picture;
根据所述反相后的第一车窗图片和所述第二车窗图片,或所述反相后的第二车窗图片和所述第一车窗图片对车窗区域进行叠加处理,得到增透后的车窗图片。Perform superposition processing on the window area according to the reversed first window picture and the second vehicle window picture, or the reversed second vehicle window picture and the first vehicle window picture, to obtain A picture of the car window after anti-reflection.
实施例六Embodiment 6
本发明实施例六还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明实施例所提供的车窗图像增透方法,所述车窗图像通过视频快门和图片快门获取,包括:Embodiment 6 of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, implements the method for antireflection of a car window image provided by the embodiment of the present invention, the car window Images are acquired through video shutter and picture shutter, including:
确定由所述图片快门采集到的第一车窗图片,并根据所述第一车窗图片从所述视频快门采集到的视频中确定第二车窗图片;determining a first car window picture collected by the picture shutter, and determining a second car window picture from the video collected by the video shutter according to the first car window picture;
对所述第一车窗图片或所述第二车窗图片进行反相处理,得到反相后的第一车窗图片或反相后的第二车窗图片;Perform inversion processing on the first window picture or the second vehicle window picture to obtain the inverted first window picture or the inverted second window picture;
根据所述反相后的第一车窗图片和所述第二车窗图片,或所述反相后的第二车窗图片和所述第一车窗图片对车窗区域进行叠加处理,得到增透后的车窗图片。Perform superposition processing on the window area according to the reversed first window picture and the second vehicle window picture, or the reversed second vehicle window picture and the first vehicle window picture, to obtain A picture of the car window after anti-reflection.
本发明实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable mediums. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable Programmable Read Only Memory (EPROM or Flash), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络包括局域网(LAN)或广域网(WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedures, or a combination thereof programming languages such as "C" 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. Where a remote computer is involved, the remote computer may be connected to the user's computer through any kind of network including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider to connect over the Internet) .
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope is determined by the scope of the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011330370.3ACN114549372A (en) | 2020-11-24 | 2020-11-24 | Vehicle window image antireflection method, device, electronic device and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011330370.3ACN114549372A (en) | 2020-11-24 | 2020-11-24 | Vehicle window image antireflection method, device, electronic device and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN114549372Atrue CN114549372A (en) | 2022-05-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011330370.3APendingCN114549372A (en) | 2020-11-24 | 2020-11-24 | Vehicle window image antireflection method, device, electronic device and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN114549372A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104238893A (en)* | 2013-06-08 | 2014-12-24 | 腾讯科技(深圳)有限公司 | Video preview image displaying method and device |
| CN105005759A (en)* | 2015-05-04 | 2015-10-28 | 南京理工大学 | Multi-characteristic fused monitoring image front vehicle window positioning and extracting method |
| CN108322646A (en)* | 2018-01-31 | 2018-07-24 | 广东欧珀移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
| CN108495048A (en)* | 2018-05-29 | 2018-09-04 | 哈尔滨市舍科技有限公司 | Dual camera image capture device based on cradle head control |
| CN109492587A (en)* | 2018-11-12 | 2019-03-19 | 浙江宇视科技有限公司 | Image processing method and device |
| CN110400464A (en)* | 2019-07-15 | 2019-11-01 | 杭州亿圣信息技术有限公司 | A kind of cell disobeys the monitoring method of parking |
| CN111131724A (en)* | 2019-12-31 | 2020-05-08 | 浙江大华技术股份有限公司 | Vehicle window colorful pattern eliminating system, method and device, controller and storage medium |
| CN111524076A (en)* | 2020-04-07 | 2020-08-11 | 咪咕文化科技有限公司 | Image processing method, electronic device, and computer-readable storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104238893A (en)* | 2013-06-08 | 2014-12-24 | 腾讯科技(深圳)有限公司 | Video preview image displaying method and device |
| CN105005759A (en)* | 2015-05-04 | 2015-10-28 | 南京理工大学 | Multi-characteristic fused monitoring image front vehicle window positioning and extracting method |
| CN108322646A (en)* | 2018-01-31 | 2018-07-24 | 广东欧珀移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
| CN108495048A (en)* | 2018-05-29 | 2018-09-04 | 哈尔滨市舍科技有限公司 | Dual camera image capture device based on cradle head control |
| CN109492587A (en)* | 2018-11-12 | 2019-03-19 | 浙江宇视科技有限公司 | Image processing method and device |
| CN110400464A (en)* | 2019-07-15 | 2019-11-01 | 杭州亿圣信息技术有限公司 | A kind of cell disobeys the monitoring method of parking |
| CN111131724A (en)* | 2019-12-31 | 2020-05-08 | 浙江大华技术股份有限公司 | Vehicle window colorful pattern eliminating system, method and device, controller and storage medium |
| CN111524076A (en)* | 2020-04-07 | 2020-08-11 | 咪咕文化科技有限公司 | Image processing method, electronic device, and computer-readable storage medium |
| Title |
|---|
| 严圣华等: "Photoshop CS5 图像处理实用教程", vol. 1, 31 January 2012, 苏州大学出版社, pages: 216 - 217* |
| Publication | Publication Date | Title |
|---|---|---|
| CN104683767B (en) | Penetrating Fog image generating method and device | |
| Tang et al. | Investigating haze-relevant features in a learning framework for image dehazing | |
| US10825157B2 (en) | Glare reduction in captured images | |
| JP6485078B2 (en) | Image processing method and image processing apparatus | |
| CN106920221B (en) | Take into account the exposure fusion method that Luminance Distribution and details are presented | |
| CN110799918A (en) | Method, apparatus and computer program for a vehicle | |
| WO2020152521A1 (en) | Systems and methods for transforming raw sensor data captured in low-light conditions to well-exposed images using neural network architectures | |
| US20140340515A1 (en) | Image processing method and system | |
| CN109348089A (en) | Night scene image processing method and device, electronic equipment and storage medium | |
| WO2021022983A1 (en) | Image processing method and apparatus, electronic device and computer-readable storage medium | |
| KR20140140163A (en) | Appatatus for image dehazing using the user controllable radical root operation | |
| CN102930514A (en) | Rapid image defogging method based on atmospheric physical scattering model | |
| WO2022134957A1 (en) | Camera occlusion detection method and system, electronic device, and storage medium | |
| CN110827375A (en) | A method and system for true color coloring of infrared images based on low-light images | |
| US20240303778A1 (en) | Noise reduction circuit with blending of bilateral filtering and machine learning filtering | |
| CN114338958A (en) | An image processing method and related equipment | |
| CN110276831A (en) | Method and device for constructing three-dimensional model, equipment and computer-readable storage medium | |
| CN105554380A (en) | Day and night switching method and day and night switching device | |
| CN116614700A (en) | Self-adaptive adjustment method and system for image shooting parameters and vehicle | |
| CN107871346B (en) | driving recorder | |
| CN114639133A (en) | License plate image processing method and device, electronic equipment and storage medium | |
| CN112241935B (en) | Image processing method, device and equipment and storage medium | |
| CN114679553A (en) | Video noise reduction method and device | |
| KR101470833B1 (en) | Apparatus for enhancing the foggy luminance image using lower bound of transmission rate | |
| EP3683716A1 (en) | Monitoring method, apparatus and system, electronic device, and computer readable storage medium |
| 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 |