CN115567691A - Method and device for real-time display of front-view camera video stream by back-row entertainment system - Google Patents
Method and device for real-time display of front-view camera video stream by back-row entertainment system Download PDFInfo
- Publication number
- CN115567691A CN115567691A CN202211159693.XA CN202211159693A CN115567691A CN 115567691 A CN115567691 A CN 115567691A CN 202211159693 A CN202211159693 A CN 202211159693A CN 115567691 A CN115567691 A CN 115567691A
- Authority
- CN
- China
- Prior art keywords
- video stream
- image
- view camera
- vehicle
- entertainment system
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000012545 processing Methods 0.000 claims abstract description 52
- 238000003707 image sharpening Methods 0.000 claims abstract description 14
- 238000004422 calculation algorithm Methods 0.000 claims description 16
- 238000009792 diffusion process Methods 0.000 claims description 10
- 238000005457 optimization Methods 0.000 claims description 8
- 230000000007 visual effect Effects 0.000 abstract description 5
- 238000009499 grossing Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000003672 processing method Methods 0.000 description 6
- 238000013473 artificial intelligence Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000006378 damage Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 208000027418 Wounds and injury Diseases 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000002790 cross-validation Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000004313 glare Effects 0.000 description 2
- 208000014674 injury Diseases 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 206010039203 Road traffic accident Diseases 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 230000004438 eyesight Effects 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60R—VEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
- B60R16/00—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
- B60R16/02—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Mechanical Engineering (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本发明涉及摄像头视频流技术领域,尤其是一种后排娱乐系统实时显示前视摄像头视频流的方法,后排娱乐系统实时显示前视摄像头视频流的装置。The invention relates to the technical field of camera video streams, in particular to a method for real-time display of a front-view camera video stream by a rear-row entertainment system, and a device for real-time display of a front-view camera video stream by a rear-row entertainment system.
背景技术Background technique
现有车型后排乘客无法观察车辆前方交通状况,无法辅助提醒驾驶员注意及时避让车辆行人,虽然有行车记录仪的视频信号,但并没有用作扩展后排人员的观察视角。Passengers in the rear seats of existing models cannot observe the traffic conditions in front of the vehicle, and cannot assist in reminding the driver to avoid vehicles and pedestrians in time. Although there are video signals from the driving recorder, they are not used to expand the viewing angle of the rear passengers.
同时现有行车记录仪本身也存在着不足,比如拍照后图像处理对高亮处理效果较差,容易产生眩光等现象,难以辨识图像中信息的细节;比如行车记录仪拍摄角度为车辆正前方,拍摄角度视野固定,画面中不可避免出现发动机盖,造成拍摄视频用于交通事故定责时,剪辑价值不足。At the same time, the existing driving recorder itself also has deficiencies. For example, after taking pictures, the image processing effect on highlight processing is poor, it is easy to produce glare and other phenomena, and it is difficult to identify the details of the information in the image; for example, the shooting angle of the driving recorder is directly in front of the vehicle. The shooting angle and field of view are fixed, and the engine cover is unavoidable in the picture, resulting in insufficient editing value when the video is used to determine responsibility for traffic accidents.
基于上述原因,需要获得一种方案,可以利用车辆后排娱乐系统所具有的视频显示功能,实时显示车载前视摄像头录制的影像,满足后排成员观察车辆前方路况需求,使之具有提醒驾驶员安全驾驶的能力。Based on the above reasons, it is necessary to obtain a solution, which can use the video display function of the rear seat entertainment system of the vehicle to display the images recorded by the front view camera of the vehicle in real time, to meet the needs of the rear members to observe the road conditions in front of the vehicle, and to make it have the ability to remind the driver Ability to drive safely.
同时对视频流进行可视化的优化处理,消除眩光、视角不足等缺陷,提高画面可读性,为后排人员辅助驾驶员提供清晰准确的图像信息。At the same time, the video stream is visually optimized to eliminate defects such as glare and insufficient viewing angles, improve the readability of the screen, and provide clear and accurate image information for the rear passengers to assist the driver.
发明内容Contents of the invention
本发明的目的在于提供一种后排娱乐系统实时显示前视摄像头视频流的方法,后排娱乐系统实时显示前视摄像头视频流的装置,用以满足后排成员观察车辆前方路况需求,并提高画面可读性,为后排人员辅助驾驶员提供清晰准确的图像信息。The object of the present invention is to provide a method for displaying the video stream of the front-view camera in the rear entertainment system in real time, and a device for displaying the video stream of the front-view camera in the rear entertainment system in real time, so as to meet the needs of the rear row members to observe the road conditions in front of the vehicle, and improve The readability of the screen provides clear and accurate image information for the rear passengers to assist the driver.
本发明提供了下述方案:The present invention provides following scheme:
根据本发明的一个方面,提供一种后排娱乐系统实时显示前视摄像头视频流的方法,所述后排娱乐系统实时显示前视摄像头视频流的方法包括:According to one aspect of the present invention, a method for displaying a video stream of a front-view camera in real time in a rear entertainment system is provided, and the method for displaying a video stream of a front-view camera in a rear entertainment system in real time includes:
获取车载前视摄像头录制的视频流;Obtain the video stream recorded by the vehicle's front-view camera;
对获取到的视频流进行优化处理,从而获取优化后的视频流;Optimizing the obtained video stream to obtain an optimized video stream;
将获取到的优化后的视频流发送给后排播放屏幕进行播放。The obtained optimized video stream is sent to the rear playback screen for playback.
进一步的,所述获取车载前视摄像头录制的视频流包括:Further, said obtaining the video stream recorded by the vehicle-mounted front-view camera includes:
获取车载前视摄像头通过LVDS线束传递的分辨率为1080p分辨率的视频流。Obtain the 1080p resolution video stream transmitted by the vehicle's front-view camera through the LVDS harness.
进一步的,对获取到的视频流进行优化处理,从而获取优化后的视频流包括:Further, the obtained video stream is optimized, so that the optimized video stream includes:
对获取的视频流中的每一帧图像进行如下处理:Each frame image in the acquired video stream is processed as follows:
判断图像是否为逆光拍摄,若是,则Determine whether the image is taken against the light, if so, then
对图像进行图像锐化处理。Apply image sharpening to the image.
进一步的,所述对图像进行图像锐化处理之后,所述对获取的视频流中的每一帧图像进行如下处理进一步包括:Further, after performing image sharpening processing on the image, performing the following processing on each frame of image in the acquired video stream further includes:
对经过锐化处理后的图像进行平滑像素处理。Smooths pixels on a sharpened image.
进一步的,所述判断图像是否为逆光拍摄包括:Further, the judging whether the image is taken against the light includes:
获取像素组获取规则;Obtain pixel group acquisition rules;
根据像素组获取规则将每个图像分割成多个像素集合;Divide each image into multiple pixel sets according to the pixel group acquisition rules;
获取每个像素集合的亮度平均值;Obtain the average brightness of each pixel set;
根据各个像素集合的亮度平均值判断图像是否为逆光拍摄。Whether the image is shot against the light is judged according to the average brightness of each pixel set.
进一步的,所述对图像进行图像锐化处理包括:Further, said performing image sharpening processing on the image includes:
对各个像素集合中的各个像素点分别采用Sobel锐化算法进行图像处理,从而获取处理后的每一个像素点的像素点信息,从而获取经过锐化处理后的图像。The Sobel sharpening algorithm is used for image processing on each pixel point in each pixel set, so as to obtain the pixel point information of each pixel point after processing, so as to obtain the sharpened image.
进一步的,所述对经过锐化处理后的图像进行平滑像素处理包括:Further, the smoothing pixel processing of the sharpened image includes:
对经过锐化处理后的图像通过各向异性扩散滤波算法进行迭代计算,从而获取经过平滑像素处理后的图像。The sharpened image is iteratively calculated through an anisotropic diffusion filter algorithm to obtain an image after smooth pixel processing.
进一步的,所述后排娱乐系统实时显示前视摄像头视频流的方法进一步包括:Further, the method for displaying the video stream of the front-view camera in the rear entertainment system in real time further includes:
获取后排使用者根据所述后排播放屏幕所播放的优化后的视频流所生成的危险信号;Obtaining the danger signals generated by the users in the rear row based on the optimized video stream played on the playback screen in the rear row;
获取车辆各个毫米波雷达所传递的雷达信息;Obtain the radar information transmitted by each millimeter-wave radar of the vehicle;
根据雷达信息判断是否有障碍物与车辆的距离小于预设警戒值,若是,则According to the radar information, it is judged whether the distance between the obstacle and the vehicle is less than the preset warning value, and if so, then
将后排使用者所生成的危险信号发送给车辆控制系统,所述车辆控制系统根据该危险信号生成刹车信号,从而使车辆停车。The danger signal generated by the rear seat users is sent to the vehicle control system, and the vehicle control system generates a brake signal according to the danger signal, so as to stop the vehicle.
进一步的,所述将后排使用者所生成的危险信号发送给车辆控制系统,所述车辆控制系统根据该危险信号生成刹车信号,从而使车辆停车包括:Further, the sending the danger signal generated by the rear row users to the vehicle control system, the vehicle control system generating a braking signal according to the danger signal, so as to stop the vehicle includes:
获取各个雷达信息;Obtain each radar information;
根据各个雷达信息获取距离车辆最近的障碍物的距离信息;Obtain the distance information of the obstacle closest to the vehicle according to each radar information;
获取当前车速信息;Obtain current vehicle speed information;
根据当前车速信息以及距离信息获取碰撞时间信息;Obtain collision time information based on current vehicle speed information and distance information;
根据碰撞时间信息生成刹车速率曲线信息;Generate braking rate curve information according to the collision time information;
根据刹车速率曲线信息控制车辆停车。Control the vehicle to stop according to the braking rate curve information.
根据本发明的另一个方面,提供一种后排娱乐系统实时显示前视摄像头视频流的装置,所述后排娱乐系统实时显示前视摄像头视频流的装置包括:According to another aspect of the present invention, a device for displaying the video stream of the front-view camera in real time in the rear entertainment system is provided, and the device for displaying the video stream of the front-view camera in the rear entertainment system in real time includes:
视频流获取模块,所述视频流获取模块用于获取车载前视摄像头录制的视频流;A video stream acquisition module, the video stream acquisition module is used to obtain the video stream recorded by the vehicle-mounted front-view camera;
优化模块,所述优化模块用于对获取到的视频流进行优化处理,从而获取优化后的视频流;An optimization module, the optimization module is used to optimize the obtained video stream, so as to obtain the optimized video stream;
播放模块,所述播放模块用于将获取到的优化后的视频流发送给后排播放屏幕进行播放。A playing module, the playing module is used to send the obtained optimized video stream to the rear playing screen for playing.
本发明与现有技术相比具有以下的优点:Compared with the prior art, the present invention has the following advantages:
(1)本申请通过Sobel锐化算法进行图像处理,一定程度上优化局部像素区域过度曝光,提高了视频的视觉可读性。(1) This application uses the Sobel sharpening algorithm for image processing, which optimizes the overexposure of local pixel areas to a certain extent, and improves the visual readability of the video.
(2)本申请通过各向异性扩散滤波算法进行迭代计算进行图像信息的处理,将各像素区域之间差异平缓过度,提高了图像信息的一体性。(2) The present application uses an anisotropic diffusion filter algorithm to perform iterative calculations to process image information, so that the differences between pixel regions are smoothed out, and the integrity of image information is improved.
(3)本申请通过将毫米波雷达信息与图像信息融合成共同警示前方障碍物的信息,使车内人员一方面可以接受被动提示有障碍物,另一方面可以主动定位识别障碍物的方位、轮廓、属性等信息,使驾驶人员可以有更多处理障碍物策略的选择,比如转向而非必须紧急制动。(3) This application integrates millimeter-wave radar information and image information into information that jointly warns of obstacles ahead, so that on the one hand, the occupants in the vehicle can accept passive reminders of obstacles, and on the other hand, they can actively locate and identify obstacles. Information such as contours and attributes allows the driver to have more options for dealing with obstacles, such as turning instead of having to brake suddenly.
(4)本申请将警示前方障碍物的信息作为判断触发自动刹车的依据,使自动刹车具有双重的信息来源交叉印证,提高保障。(4) This application uses the information of warning obstacles ahead as the basis for judging and triggering automatic braking, so that automatic braking has double information sources for cross-validation and improves security.
(5)本申请通过警示前方障碍物的信息获得准确的制动距离和规避路线等信息,从而可以实现采用制动曲线方式自动制动;在防止人员因碰撞受较大损伤的同时,还减少了因过度制动造成的人员轻微损伤,人员安全保障进一步提高。(5) This application obtains information such as accurate braking distance and evasive route by warning the information of obstacles in front, so as to realize automatic braking in the way of braking curve; while preventing personnel from being greatly injured by collision, it also reduces Minor injuries to personnel caused by excessive braking are eliminated, and personnel safety is further improved.
附图说明Description of drawings
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the specific implementation or description of the prior art. Obviously, the accompanying drawings in the following description The drawings show some implementations of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.
图1是本实施例的一种后排娱乐系统实时显示前视摄像头视频流的方法流程图。FIG. 1 is a flow chart of a method for displaying a front-view camera video stream in real time in a rear entertainment system in this embodiment.
图2是本实施例的一种后排娱乐系统实时显示前视摄像头视频流的装置结构图。FIG. 2 is a structural diagram of a device for real-time displaying a video stream of a front-view camera in a rear entertainment system according to this embodiment.
图3是一个具体实施例的一种处理过曝、过暗视频流方法流程图。Fig. 3 is a flow chart of a method for processing over-exposed and over-dark video streams in a specific embodiment.
图4是一个具体实施例的一种视频流输出前调整处理方法流程图。Fig. 4 is a flowchart of a pre-output video stream adjustment processing method according to a specific embodiment.
图5是一个具体实施例的一种处理视频流显示尺寸的方法流程图。Fig. 5 is a flow chart of a method for processing the display size of a video stream in a specific embodiment.
图6是一个具体实施例的一种像素点选择处理方法示意图。Fig. 6 is a schematic diagram of a pixel point selection processing method in a specific embodiment.
图7是本实施例的一种电子设备硬件结构的结构图。FIG. 7 is a structural diagram of a hardware structure of an electronic device in this embodiment.
具体实施方式detailed description
下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
图1是本实施例的一种后排娱乐系统实时显示前视摄像头视频流的方法流程图。FIG. 1 is a flow chart of a method for displaying a front-view camera video stream in real time in a rear entertainment system in this embodiment.
如图1所示,本发明公开了一种后排娱乐系统实时显示前视摄像头视频流的方法,包括:As shown in Fig. 1, the present invention discloses a method for real-time displaying the video stream of the front-view camera in the rear entertainment system, including:
步骤S1,获取车载前视摄像头录制的视频流;Step S1, obtaining the video stream recorded by the vehicle-mounted front-view camera;
步骤S2,对获取到的视频流进行优化处理,从而获取优化后的视频流;Step S2, optimizing the obtained video stream, so as to obtain the optimized video stream;
步骤S3,将获取到的优化后的视频流发送给后排播放屏幕进行播放。In step S3, the obtained optimized video stream is sent to the playback screen in the back row for playback.
具体而言,视频流是指视频数据的传输,例如,它能够被作为一个稳定的和连续的数据流,期间涉及到解码、调制、优化等视频译码技术的处理。这些处理虽然是复杂的,但是连续进行的,没有影响到即时观看的效果。Specifically, a video stream refers to the transmission of video data, for example, it can be regarded as a stable and continuous data stream, which involves decoding, modulation, optimization and other video decoding technology processing. Although these processes are complicated, they are carried out continuously without affecting the instant viewing effect.
采用本申请的方法,可以使得后排乘客能够了解到车辆前方或者其他方向的具体情况,从而在驾驶员分神的时候提醒驾驶员。By adopting the method of the present application, the passengers in the rear row can know the specific situation in front of the vehicle or in other directions, so as to remind the driver when the driver is distracted.
在本实施例中,获取车载前视摄像头录制的视频流包括:In this embodiment, obtaining the video stream recorded by the vehicle-mounted front-view camera includes:
获取车载前视摄像头通过LVDS线束传递的分辨率为1080p分辨率的视频流。Obtain the 1080p resolution video stream transmitted by the vehicle's front-view camera through the LVDS harness.
具体而言,LVDS采用了差分传输机制,每一LVDS信号使用两条走线,这两条走线之间的电压差定义了LVDS信号值。LVDS可以实现点对点或一点对多点的连接,具有低功耗、低误码率、低串扰和低辐射等特点。后排娱乐显示因此可以顺利获得车载前视摄像头录制的视频流。Specifically, LVDS adopts a differential transmission mechanism, and each LVDS signal uses two traces, and the voltage difference between the two traces defines the LVDS signal value. LVDS can realize point-to-point or point-to-multipoint connection, and has the characteristics of low power consumption, low bit error rate, low crosstalk and low radiation. The rear entertainment display can therefore smoothly obtain the video stream recorded by the car's front-view camera.
1080p是一种在逐行扫描下达到1920×1080分辨率的显示格式,优化图像信息可以基于1920×1080分辨率下的像素特点来进行。1080p is a display format that achieves a resolution of 1920×1080 under progressive scanning. Optimizing image information can be performed based on the pixel characteristics of 1920×1080 resolution.
在本实施例中,对获取到的视频流进行优化处理,从而获取优化后的视频流包括:In this embodiment, optimizing the obtained video stream, so that obtaining the optimized video stream includes:
对获取的视频流中的每一帧图像进行如下处理:Each frame image in the acquired video stream is processed as follows:
判断图像是否为逆光拍摄,若是,则Determine whether the image is taken against the light, if so, then
对图像进行图像锐化处理。Apply image sharpening to the image.
具体而言,图像锐化是补偿图像的轮廓,增强图像的边缘及灰度跳变的部分,使图像变得清晰,分为空间域处理和频域处理两类。图像锐化是为了突出图像上地物的边缘、轮廓,或某些线性目标要素的特征。这种滤波方法提高了地物边缘与周围像元之间的反差,因此也被称为边缘增强。Specifically, image sharpening is to compensate the outline of the image, enhance the edge of the image and the part of the grayscale jump, so that the image becomes clear, and it is divided into two types: spatial domain processing and frequency domain processing. Image sharpening is to highlight the edges and contours of objects on the image, or the features of some linear target elements. This filtering method improves the contrast between the edge of the ground object and the surrounding pixels, so it is also called edge enhancement.
由于是视频流,并不是一直逆光情形不变,存在视频质量变化,需要对每一帧中过曝光、过暗的图像进行图像锐化处理,再拼回原来的视频流顺序,保障视频的连续性。Because it is a video stream, the backlighting situation does not always remain the same, and there is a change in video quality. It is necessary to perform image sharpening processing on the overexposed and dark images in each frame, and then return to the original video stream sequence to ensure the continuity of the video. sex.
在本实施例中,对图像进行图像锐化处理之后,对获取的视频流中的每一帧图像进行如下处理进一步包括:In this embodiment, after performing image sharpening processing on the image, performing the following processing on each frame of image in the acquired video stream further includes:
对经过锐化处理后的图像进行平滑像素处理。Smooths pixels on a sharpened image.
具体而言,平滑像素处理的目的有两类:一类是模糊;另一类是消除噪音。空间域的平滑滤波一般采用简单平均法进行,就是求邻近像元点的平均亮度值。Specifically, there are two types of smooth pixel processing purposes: one is blurring; the other is noise removal. The smoothing filter in the spatial domain is generally carried out by the simple average method, which is to calculate the average brightness value of adjacent pixel points.
在本实施例中,判断图像是否为逆光拍摄包括:In this embodiment, judging whether the image is taken against the light includes:
获取像素组获取规则;Obtain pixel group acquisition rules;
根据像素组获取规则将每个图像分割成多个像素集合;Divide each image into multiple pixel sets according to the pixel group acquisition rules;
获取每个像素集合的亮度平均值;Obtain the average brightness of each pixel set;
根据各个像素集合的亮度平均值判断图像是否为逆光拍摄。Whether the image is shot against the light is judged according to the average brightness of each pixel set.
具体而言,求邻近像元点的平均亮度值时,邻域的大小与平滑的效果直接相关,邻域越大平滑的效果越好,但邻域过大,平滑会使边缘信息损失的越大,从而使输出的图像变得模糊,因此需合理选择邻域的大小。Specifically, when calculating the average brightness value of neighboring pixels, the size of the neighborhood is directly related to the smoothing effect. The larger the neighborhood, the better the smoothing effect, but if the neighborhood is too large, the smoothing will cause the loss of edge information. Large, so that the output image becomes blurred, so it is necessary to choose the size of the neighborhood reasonably.
像素组获取规则依据具体的图像格式来进行平均分割。比如1080P视频的格式,将1920*1080图像按每192*108像素为单位进行平均分割,定义每192*108个像素为一个集合X(m,n),即一幅图像为10*10个集合组成。依次将(x,y)向左、向下平移4个像素点,即可获得集合X(1,1)、X(1,2)…X(m,n)。The pixel group acquisition rule performs average division according to the specific image format. For example, in the format of 1080P video, the 1920*1080 image is averagely divided into units of 192*108 pixels, and each 192*108 pixels is defined as a set X (m,n) , that is, an image is 10*10 sets composition. Translate (x, y) 4 pixels to the left and down in sequence to obtain the sets X (1,1) , X (1,2) ... X (m,n) .
亮度平均值判断是否为逆光的方法,主要是通过对相邻的每个像素集合取亮度平均值后进行比较,比如对每个集合内所有像素点取亮度平均值,依次比较X(m,n)与X(m,n-1)、X(m,n+1)、X(m-1,n)、X(m+1,n)亮度平均值。The method of judging whether it is backlight by the average brightness is mainly by comparing the average brightness of each adjacent pixel set, such as taking the average brightness of all pixels in each set, and comparing X (m,n ) and X (m,n-1) , X (m,n+1) , X (m-1,n) , X (m+1,n) brightness average.
判断是否为逆光,比如当集合X(m,n)平均亮度值比其各邻域集合亮度值均大于1.5倍以上,再或者当相邻集合亮度平均值大于预设的阈值时,即证明该段视频流存在逆光拍摄等情况,则该集合区域存在影响视频观看的高亮区域。To judge whether it is backlighting, for example, when the average brightness value of the set X (m,n) is greater than 1.5 times the brightness value of each neighborhood set, or when the average brightness value of the adjacent set is greater than the preset threshold, it is proved that the If a segment of the video stream is shot against the light, etc., there is a highlighted area in the collection area that affects video viewing.
在本实施例中,对图像进行图像锐化处理包括:In this embodiment, performing image sharpening processing on an image includes:
对各个像素集合中的各个像素点分别采用Sobel锐化算法进行图像处理,从而获取处理后的每一个像素点的像素点信息,从而获取经过锐化处理后的图像。The Sobel sharpening algorithm is used for image processing on each pixel point in each pixel set, so as to obtain the pixel point information of each pixel point after processing, so as to obtain the sharpened image.
具体而言,Sobel锐化算法中Sobel算子是像素图像边缘检测中最重要的算子之一,在机器学习、数字媒体、计算机视觉等信息科技领域起着举足轻重的作用。在技术上,它是一个离散的一阶差分算子,用来计算图像亮度函数的一阶梯度之近似值。在图像的任何一点使用此算子,将会产生该点对应的梯度矢量或是其法矢量。Specifically, the Sobel operator in the Sobel sharpening algorithm is one of the most important operators in pixel image edge detection, and plays a pivotal role in information technology fields such as machine learning, digital media, and computer vision. Technically, it is a discrete first-order difference operator used to calculate an approximation of the first-order gradient of the image brightness function. Using this operator at any point in the image will generate the gradient vector corresponding to that point or its normal vector.
在本实施例中,对经过锐化处理后的图像进行平滑像素处理包括:In this embodiment, performing smooth pixel processing on the sharpened image includes:
对经过锐化处理后的图像通过各向异性扩散滤波算法进行迭代计算,从而获取经过平滑像素处理后的图像。The sharpened image is iteratively calculated through an anisotropic diffusion filter algorithm to obtain an image after smooth pixel processing.
具体而言,各向异性扩散滤波主要在平滑图像中克服了高斯模糊的缺陷,各向异性扩散在平滑图像时是保留图像边缘的。Specifically, anisotropic diffusion filtering mainly overcomes the defect of Gaussian blur in smoothing images, and anisotropic diffusion preserves image edges when smoothing images.
在通过各向异性扩散滤波算法进行迭代计算中,根据当前像素和周围像素的关系,来确定是否要向周围扩散。比如某个邻域像素和当前像素差别较大,则代表这个邻域像素很可能是个边界,那么当前像素就不向这个方向扩散,这个边界也就得到保留。In the iterative calculation through the anisotropic diffusion filtering algorithm, it is determined whether to diffuse to the surrounding according to the relationship between the current pixel and the surrounding pixels. For example, if there is a large difference between a certain neighboring pixel and the current pixel, it means that this neighboring pixel is likely to be a boundary, then the current pixel will not spread in this direction, and this boundary will be preserved.
在本实施例中,后排娱乐系统实时显示前视摄像头视频流的方法进一步包括:In this embodiment, the method for the rear entertainment system to display the video stream of the front-view camera in real time further includes:
获取后排使用者根据后排播放屏幕所播放的优化后的视频流所生成的危险信号;Obtain the danger signals generated by the users in the rear row based on the optimized video stream played on the playback screen in the rear row;
获取车辆各个毫米波雷达所传递的雷达信息;Obtain the radar information transmitted by each millimeter-wave radar of the vehicle;
根据雷达信息判断是否有障碍物与车辆的距离小于预设警戒值,若是,则According to the radar information, it is judged whether the distance between the obstacle and the vehicle is less than the preset warning value, and if so, then
将后排使用者所生成的危险信号发送给车辆控制系统,车辆控制系统根据该危险信号生成刹车信号,从而使车辆停车。The danger signal generated by the user in the rear seat is sent to the vehicle control system, and the vehicle control system generates a braking signal according to the danger signal, so as to stop the vehicle.
采用这种方式,能够在车辆驾驶员出现特殊情况时(例如,驾驶员出现突发疾病而无法识别、评估车辆当前状态时),通过后排乘客的控制来生成危险信号,车辆在获取到危险信号后,可以根据雷达来判断车辆行进方向上是否确实有障碍物,如果有,则进行车辆控制。In this way, when a special situation occurs to the driver of the vehicle (for example, when the driver has a sudden illness and cannot recognize and evaluate the current state of the vehicle), the danger signal can be generated through the control of the rear passengers, and the vehicle can detect the danger. After receiving the signal, it can be judged according to the radar whether there is indeed an obstacle in the direction of the vehicle, and if so, the vehicle will be controlled.
采用这种方式,能够不单纯依靠人工智能来接管车辆,而是通过乘客与人工智能共同配合来实现车辆的控制,从而使危险的确信度强于单独依靠人工智能或单独依靠人工的确信度,防止人工智能误判。In this way, it is not only relying on artificial intelligence to take over the vehicle, but to realize the control of the vehicle through the cooperation of passengers and artificial intelligence, so that the certainty of danger is stronger than relying on artificial intelligence alone or artificial intelligence alone, Avoid artificial intelligence misjudgment.
在本实施例中,将后排使用者所生成的危险信号发送给车辆控制系统,车辆控制系统根据该危险信号生成刹车信号,从而使车辆停车包括:In this embodiment, sending the danger signal generated by the rear row users to the vehicle control system, the vehicle control system generates a braking signal according to the danger signal, so that the vehicle stops include:
获取各个雷达信息;Obtain each radar information;
根据各个雷达信息获取距离车辆最近的障碍物的距离信息;Obtain the distance information of the obstacle closest to the vehicle according to each radar information;
获取当前车速信息;Obtain current vehicle speed information;
根据当前车速信息以及距离信息获取碰撞时间信息;Obtain collision time information based on current vehicle speed information and distance information;
根据碰撞时间信息生成刹车速率曲线信息;Generate braking rate curve information according to the collision time information;
根据刹车速率曲线信息控制车辆停车。Control the vehicle to stop according to the braking rate curve information.
具体而言,面对障碍物,刹车是最基本的操作,但并不是一刹到底就最好,根据障碍物的具体情况,采取较为合适的刹车策略。Specifically, in the face of obstacles, braking is the most basic operation, but it is not the best to stop at the end. According to the specific situation of obstacles, adopt a more appropriate braking strategy.
比如,离自己车辆最近的障碍物与车辆的距离尚远,但被及时发现,或车速并不快等,可以选择缓慢刹车,并提醒驾驶员,给驾驶员以转向躲避障碍物的机会,否则,驾驶员只能被动接受原地急速停止的操作,失去了保障车辆安全的灵活性,尤其是当后方有车时,突然的刹车还可能造成追尾情况出现。For example, if the obstacle closest to your own vehicle is still far away from the vehicle, but it is discovered in time, or the speed of the vehicle is not fast, etc., you can choose to brake slowly and remind the driver to give the driver a chance to turn to avoid the obstacle, otherwise, The driver can only passively accept the operation of stopping rapidly on the spot, and loses the flexibility to ensure the safety of the vehicle, especially when there is a car behind, sudden braking may also cause a rear-end collision.
而采用刹车曲线的方法,一方面减少车辆因紧急制动带来的次生伤害,另一方面也没有失去最低安全保障的效能。The method of using the braking curve, on the one hand, reduces the secondary damage caused by the emergency braking of the vehicle, and on the other hand, does not lose the effectiveness of the minimum safety guarantee.
在本实施例中,刹车曲线可以人工设置,例如,当车辆距离障碍物有20米时,且车辆速度不超过60公里/小时,人工通过经验设置一条刹车曲线供车辆刹车时使用。In this embodiment, the braking curve can be set manually. For example, when the vehicle is 20 meters away from the obstacle and the vehicle speed does not exceed 60 km/h, manually set a braking curve for the vehicle to brake through experience.
图2是本实施例的一种后排娱乐系统实时显示前视摄像头视频流的装置结构图。FIG. 2 is a structural diagram of a device for real-time displaying a video stream of a front-view camera in a rear entertainment system according to this embodiment.
如图2所示,本发明公开了一种后排娱乐系统实时显示前视摄像头视频流的装置包括:视频流获取模块,优化模块,播放模块;As shown in Figure 2, the present invention discloses a device for displaying the video stream of the front-view camera in real time in the rear entertainment system, including: a video stream acquisition module, an optimization module, and a playback module;
视频流获取模块,用于获取车载前视摄像头录制的视频流;The video stream obtaining module is used to obtain the video stream recorded by the vehicle-mounted front-view camera;
优化模块,用于对获取到的视频流进行优化处理,从而获取优化后的视频流;An optimization module, configured to optimize the acquired video stream, so as to obtain an optimized video stream;
播放模块,用于将获取到的优化后的视频流发送给后排播放屏幕进行播放。The playback module is configured to send the obtained optimized video stream to the rear playback screen for playback.
值得注意的是,虽然在本系统中只披露了视频流获取模块、优化模块、播放模块,但并不意味着本系统的组成仅仅局限于上述基本功能模块,相反,本发明所要表达的意思是:在上述基本功能模块的基础之上本领域技术人员可以结合现有技术任意添加一个或多个功能模块,形成无穷多个实施例或技术方案,也就是说本系统是开放式而非封闭式的,不能因为本实施例仅披露了个别基本功能模块,就认为本发明权利要求的保护范围局限于所公开的基本功能模块。同时,为了描述的方便,描述以上装置时以功能分为各种单元、模块分别描述。当然在实施本申请时可以把各单元、模块的功能在同一个或多个软件和/或硬件中实现。It is worth noting that although only the video stream acquisition module, optimization module, and playback module are disclosed in this system, it does not mean that the composition of this system is only limited to the above-mentioned basic functional modules. On the contrary, the meaning expressed by the present invention is : On the basis of the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the prior art to form infinitely many embodiments or technical solutions, that is to say, the system is open rather than closed Yes, because this embodiment only discloses individual basic functional modules, it cannot be considered that the protection scope of the claims of the present invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, when describing the above devices, the functions are divided into various units and modules and described separately. Of course, when implementing the present application, the functions of each unit and module can be implemented in one or more software and/or hardware.
图3是一个具体实施例的一种处理过曝、过暗视频流方法流程图。Fig. 3 is a flow chart of a method for processing over-exposed and over-dark video streams in a specific embodiment.
如图3所示,本发明公开了一种处理过曝、过暗视频流方法。As shown in FIG. 3 , the present invention discloses a method for processing over-exposed and over-dark video streams.
在车辆前后左右四个方位设置摄像头,借助软件算法通过车载环视摄像头录制车辆前后左右四个方位的1080p分辨率的视频,并将该视频通过LVDS线束传输至车娱乐系统;Cameras are installed in the front, rear, left, and right directions of the vehicle, and the 1080p resolution video in the front, rear, left, and right directions of the vehicle is recorded through the vehicle-mounted surround view camera with the help of software algorithms, and the video is transmitted to the car entertainment system through the LVDS wiring harness;
车载娱乐系统实时对接收的1080p视频流利用集成显卡GPU进行硬解码,解码后视频流为摄像头录制原始图像,车载娱乐系统将视频流以mp4文件格式保存在内存中。The in-vehicle entertainment system performs hard decoding on the received 1080p video stream in real time using the integrated graphics GPU, and the decoded video stream records the original image for the camera, and the in-vehicle entertainment system saves the video stream in the memory in the format of mp4 file.
当受外界因素影响,拍摄原始视频画面存在过曝、过暗的问题,借助车载视频剪辑软件界面UI,剪辑有问题的视频。When affected by external factors, there are problems of over-exposure and over-darkness in the original video when shooting, and the problematic video can be edited with the help of the UI of the on-board video editing software.
步骤P1,挑选需要做过曝、过暗的图像,对过曝、过暗的图像做锐化处理。Step P1, select the over-exposed and over-dark images, and perform sharpening processing on the over-exposed and over-dark images.
图像锐化方法:取视频中一帧过曝、过暗的图像,将1920*1080图像按每192*108像素为单位进行平均分割,定义每192*108个像素为一个集合X(m,n),即一幅图像为10*10个集合组成;对每个集合取亮度平均值,比如当集合X(m,n)平均亮度值比其各邻域集合亮度值均大于1.5倍以上,则该集合区域存在影响视频观看的高亮区域。同理,也可以获取该集合区域存在影响视频观看的过暗区域的信息。Image sharpening method: Take a frame of overexposed and overdark image in the video, divide the 1920*1080 image into units of 192*108 pixels, and define every 192*108 pixels as a set X (m,n ) , that is, an image is composed of 10*10 sets; take the average brightness value for each set, for example, when the average brightness value of the set X (m,n) is greater than 1.5 times the brightness value of each neighborhood set, then There are highlighted areas in this collection area that affect video viewing. Similarly, it is also possible to obtain information that there is an over-dark area in the collection area that affects video watching.
对X(m,n)集合进行Sobel锐化处理,使用经锐化处理后X(m,n)及其邻域图像对比原图像局部细节加强,高亮区域亮度降低,区域面积减小,可视化程度加强,使用处理后局部图像对原图像相同位置进行像素替换,所得图像初步具备目视细节分辨能力。Perform Sobel sharpening processing on the X (m, n) set, use the sharpened X (m, n) and its neighborhood image to compare the local details of the original image, reduce the brightness of the highlighted area, reduce the area, and visualize The degree is strengthened, and the processed local image is used to replace the pixels in the same position of the original image, and the obtained image initially has the ability to distinguish visual details.
虽然此时消除了过曝、过暗的影响,但由于对各个像素集合进行锐化处理,导致画面分割感变强,还需要进行下一步的平滑处理。Although the effects of overexposure and overdarkening are eliminated at this time, due to the sharpening processing of each pixel set, the sense of screen segmentation becomes stronger, and the next step of smoothing processing is required.
步骤P2,对锐化处理过的视频进行平滑处理。Step P2, smoothing the sharpened video.
平滑方法:采用各向异性扩散滤波算法进行迭代计算;通过UI自定义滤波迭代次数t,滤波系数k;Smoothing method: use anisotropic diffusion filter algorithm for iterative calculation; customize the number of filter iterations t and filter coefficient k through the UI;
经迭代公式:Iterative formula:
经t次迭代后输出;Output after t iterations;
若本次处理效果不满足平滑的要求,可对原图像重新进行次数t、系数k调整,直至达到预设的效果要求。If the processing effect this time does not meet the smoothing requirements, the original image can be re-adjusted for the number of times t and the coefficient k until the preset effect requirements are met.
关于推导公式,Regarding the derivation formula,
I是图像灰度信息值,迭代次数t。I is the gray information value of the image, and the number of iterations is t.
四个散度公式是在四个方向上对当前像素求偏导,n、e、w、s代表东南西北四个方向;The four divergence formulas are to calculate the partial derivative of the current pixel in four directions, n, e, w, s represent the four directions of southeast, northwest;
cN、cS、cE、cW代表四个方向上的导热系数;cN, cS, cE, cW represent the thermal conductivity in four directions;
整个公式需要先前设置的参数主要有三个,迭代次数t,根据情况设置;导热系数相关的k,取值越大越平滑,越不易保留边缘;lambda同样也是取值越大越平滑。There are three main parameters that need to be set in the whole formula, the number of iterations t, which is set according to the situation; the larger the value of k related to the thermal conductivity, the smoother it is, and the less likely it is to retain the edge; the larger the value of lambda, the smoother it is.
步骤P3,对视频部分区域进行播放速度调整、画面大小调整、删除、插入,增强视频艺术性。Step P3, adjusting the playback speed, adjusting the screen size, deleting, and inserting part of the video area to enhance the artistry of the video.
步骤P4,对视频进行水印添加,添加制作人信息,时间,地点等,记录防止视频盗用。Step P4, adding a watermark to the video, adding producer information, time, location, etc., and recording to prevent theft of the video.
步骤P5,利用车载娱乐系统集成音乐应用,将用户选定的音乐作为背景音乐叠加在视频中。In step P5, use the vehicle entertainment system to integrate the music application, and superimpose the music selected by the user as background music on the video.
步骤P6,将剪辑视频上传至云端服务器,上传服务器后在手机端通过app将云端服务器视频下载至手机中。Step P6, upload the edited video to the cloud server, and after uploading to the server, download the video from the cloud server to the mobile phone through the app on the mobile phone.
图4是一个具体实施例的一种视频流输出前调整处理方法流程图。Fig. 4 is a flowchart of a pre-output video stream adjustment processing method according to a specific embodiment.
如图4所示,本发明公开了一种视频流输出前调整处理方法。As shown in FIG. 4 , the present invention discloses a pre-output adjustment processing method of a video stream.
在步骤P3中,对视频部分区域进行播放速度调整、画面大小调整、删除、插入,增强视频艺术性的具体操作如下:In step P3, adjust the playback speed, adjust the screen size, delete, insert, and enhance the artistry of the video in some areas of the video. The specific operations are as follows:
步骤P31,分别选定需要处理的区域起始点和终点,选择需要处理的播放速度对处理后选定区域和原视频剩余区域进行拼接。Step P31, respectively select the start point and end point of the area to be processed, select the playback speed to be processed, and stitch the selected area after processing with the remaining area of the original video.
步骤P32,分别选定需要处理的区域起始点和终点,对需要处理的画面进行放大/缩小,对处理后选定区域和原视频剩余区域进行拼接。Step P32, respectively select the start point and end point of the area to be processed, zoom in/out the picture to be processed, and stitch the selected area after processing with the remaining area of the original video.
步骤P33,分别选定需要处理的区域起始点和终点,对需要处理区域进行删除,对原视频剩余区域进行拼接。Step P33, respectively select the start point and end point of the area to be processed, delete the area to be processed, and stitch the remaining areas of the original video.
步骤P34,选择视频某个点为插入点,待插入的视频段或图片插入选定点,并与原视频剩余区域进行拼接。Step P34, select a certain point of the video as the insertion point, insert the video segment or picture to be inserted into the selected point, and splice with the remaining area of the original video.
图5是一个具体实施例的一种处理视频流显示尺寸的方法流程图。Fig. 5 is a flow chart of a method for processing the display size of a video stream in a specific embodiment.
如图5所示,本发明公开了一种处理视频流显示尺寸的方法。As shown in Fig. 5, the present invention discloses a method for processing the display size of a video stream.
通过车载前视摄像头录制1080p分辨率的视频流,该视频流通过LVDS线束传输至车载后排娱乐系统,车载后排娱乐系统实时对接收的1080p视频流利用集成显卡GPU进行硬解码,解码后视频流为摄像头录制原始图像,受外界影响原始图像存在逆光拍摄、黑夜拍摄等多种可能,导致原始视频图像内容模糊,分辨率低等问题。所以挑选影响观看识别的图像进行锐化处理和平滑处理。The 1080p resolution video stream is recorded through the front-view camera on the vehicle, and the video stream is transmitted to the rear seat entertainment system of the vehicle through the LVDS wiring harness. The stream records the original image for the camera. Due to external influences, the original image may have many possibilities such as backlight shooting and night shooting, resulting in problems such as blurred content and low resolution of the original video image. Therefore, select images that affect viewing recognition for sharpening and smoothing.
步骤P101,挑选过曝、过暗的图像,对过曝、过暗的图像做锐化处理。Step P101, selecting over-exposed and over-dark images, and performing sharpening processing on the over-exposed and over-dark images.
图6是一个具体实施例的一种像素点选择处理方法示意图。Fig. 6 is a schematic diagram of a pixel point selection processing method in a specific embodiment.
如图6所示,本实施例公开一种像素点选择处理方法。As shown in FIG. 6 , this embodiment discloses a pixel point selection processing method.
在步骤P101中,对后排娱乐系统接受的原始视频流的每一帧图像进行数字图像处理,以一帧图像举例,取图像中左起第二列第二行像素点为(x,y),定义像素点(x,y)向周围扩展2像素后所得25个点为集合X;集合X中每一个像素点可用(x±n,y±n)表示,其中n为距中心点(x,y)的像素值。当(x,y)点周围不足2像素时,X集合可相应进行缩减,比如X集合的(a,b)像素点。In step P101, digital image processing is performed on each frame of the original video stream accepted by the rear seat entertainment system. Taking one frame of image as an example, take the second column and second row of pixels from the left in the image as (x, y) , define the pixel point (x, y) to expand 2 pixels around to get 25 points as a set X; each pixel point in the set X can be represented by (x±n, y±n), where n is the distance from the center point (x , the pixel value of y). When there are less than 2 pixels around the (x, y) point, the X set can be reduced accordingly, such as the (a, b) pixel points of the X set.
依次将(x,y)向左、向下平移4个像素点,即可获得集合X(1,1)、X(1,2)…X(m,n)。对每个集合内所有像素点取亮度平均值,依次比较X(m,n)与X(m,n-1)、X(m,n+1)、X(m-1,n)、X(m+1,n)亮度平均值,比如,当相邻集合亮度平均值大于阈值47时,即证明该段视频流存在逆光拍摄等情况;Translate (x, y) 4 pixels to the left and down in sequence to obtain the sets X (1,1) , X (1,2) ... X (m,n) . Take the average brightness of all pixels in each set, and compare X (m,n) with X (m,n-1) , X (m,n+1) , X (m-1,n) , X (m+1,n) average brightness, for example, when the average brightness of adjacent sets is greater than the threshold 47, it proves that there is backlight shooting in this video stream;
该集合X(m,n)产生极为明显的亮度差,影响视频内容分辨,因此需要对X(m,n)及其邻域共9个集合进行图像锐化处理。This set X (m,n) produces a very obvious brightness difference, which affects the resolution of video content. Therefore, a total of 9 sets of X (m,n) and its neighborhood need to be sharpened.
对X(m,n)及其邻域内共9个集合中共计25*9个像素点采用Sobel锐化算法进行图像处理,每一像素点运算后命名为g(x,y),则: A total of 25*9 pixels in 9 sets of X (m,n) and its neighborhood are processed by Sobel sharpening algorithm, and each pixel is named g(x, y) after operation, then:
其中, in,
具体而言,本实施例Sobel锐化算法相当于引用了Sobel边缘算子;Specifically, the Sobel sharpening algorithm in this embodiment is equivalent to quoting the Sobel edge operator;
该算子包含两组3x3的矩阵,分别为横向及纵向,将之与图像作平面卷积,即可分别得出横向及纵向的亮度差分近似值。如果以A代表原始图像,Gx及Gy分别代表经横向及纵向边缘检测的图像,其公式如下:The operator includes two sets of 3x3 matrices, which are horizontal and vertical respectively, and plane convolution is performed with the image to obtain the approximate values of the horizontal and vertical brightness differences respectively. If A represents the original image, Gx and Gy represent the images detected by horizontal and vertical edges respectively, the formula is as follows:
图像的每一个像素的横向及纵向梯度近似值可用以下的公式结合,来计算梯度的大小。The horizontal and vertical gradient approximation values of each pixel of the image can be combined with the following formula to calculate the magnitude of the gradient.
可用以下公式计算梯度方向。The gradient direction can be calculated with the following formula.
在以上实施例中,如果以上的角度Θ等于零,即代表图像该处拥有纵向边缘,左方较右方暗。In the above embodiments, if the above angle Θ is equal to zero, it means that the image has a vertical edge, and the left side is darker than the right side.
步骤P201,对锐化处理后的图像进行平滑处理。Step P201, smoothing the sharpened image.
使用经锐化处理后X(m,n)及其邻域图像对比原图像局部细节加强,高亮区域亮度降低,区域面积减小,可视化程度加强,使用处理后局部图像对原图像相同位置进行像素替换,所得图像初步具备目视细节分辨能力,但画面分割感较强,可明显感知画面中图像处理区域,因此需对整幅图像进行滤波,达到平滑像素替换边缘割裂效果的目的,采用各项异性扩散滤波算法进行迭代计算,取迭代次数为t=3,为保证处理后图像清晰度,取系数k=30,则迭代公式为:Use the sharpened X (m, n) and its neighborhood image to compare the local details of the original image, the brightness of the highlighted area is reduced, the area area is reduced, and the degree of visualization is enhanced. Use the processed partial image to compare the same position of the original image Pixel replacement, the obtained image initially has the ability to distinguish visual details, but the sense of screen segmentation is strong, and the image processing area in the screen can be clearly perceived, so it is necessary to filter the entire image to achieve the purpose of smooth pixel replacement edge splitting effect, using various The anisotropic diffusion filter algorithm is used for iterative calculation, and the number of iterations is t=3. In order to ensure the image clarity after processing, the coefficient k=30 is taken, and the iterative formula is:
经三次迭代后,所得图像较为平滑,无割裂感,可作为一帧图像进行显示。After three iterations, the obtained image is relatively smooth without a sense of fragmentation, and can be displayed as a frame of image.
步骤P301,对平滑处理后的图像进行图像拼接和裁剪。Step P301, performing image splicing and cropping on the smoothed image.
对视频流中每一帧图像进行上述处理后可将图像拼接成每秒60帧视频流,车载后排娱乐系统内置通用视频播放器,播放器取屏幕长度为width,高为height,当录制视频流长边像素x>width时,对视频长边进行压缩,使x=width,同时对短边y进行等比例压缩,保证自适应屏幕后最终形成视频长宽比例不变。After performing the above processing on each frame of the video stream, the images can be spliced into a video stream of 60 frames per second. The car rear entertainment system has a built-in universal video player. The player takes the screen length as width and height as height. When recording video When the pixel x on the long side of the stream is > width, the long side of the video is compressed so that x = width, and the short side y is compressed in equal proportions to ensure that the final aspect ratio of the video after adaptive screen remains unchanged.
当录制视频流短边像素y>height时,对视频流短边进行压缩,使y=height,同时对视频流长边的左右进行相同长度剪裁,保证自适应屏幕后最终形成视频畸变较小。When recording the short side pixel y>height of the video stream, compress the short side of the video stream so that y=height, and at the same time cut the left and right sides of the long side of the video stream to the same length to ensure that the final video distortion is small after adapting to the screen.
本发明与现有技术相比具有以下的优点:Compared with the prior art, the present invention has the following advantages:
(1)本申请通过Sobel锐化算法进行图像处理,一定程度上优化局部像素区域过度曝光,提高了视频的视觉可读性。(1) This application uses the Sobel sharpening algorithm for image processing, which optimizes the overexposure of local pixel areas to a certain extent, and improves the visual readability of the video.
(2)本申请通过各向异性扩散滤波算法进行迭代计算进行图像信息的处理,将各像素区域之间差异平缓过度,提高了图像信息的一体性。(2) The present application uses an anisotropic diffusion filter algorithm to perform iterative calculations to process image information, so that the differences between pixel regions are smoothed out, and the integrity of image information is improved.
(3)本申请通过将毫米波雷达信息与图像信息融合成共同警示前方障碍物的信息,使车内人员一方面可以接受被动提示有障碍物,另一方面可以主动定位识别障碍物的方位、轮廓、属性等信息,使驾驶人员可以有更多处理障碍物策略的选择,比如转向而非必须紧急制动。(3) This application integrates millimeter-wave radar information and image information into information that jointly warns of obstacles ahead, so that on the one hand, the occupants in the vehicle can accept passive reminders of obstacles, and on the other hand, they can actively locate and identify obstacles. Information such as contours and attributes allows the driver to have more options for dealing with obstacles, such as turning instead of having to brake suddenly.
(4)本申请将警示前方障碍物的信息作为判断触发自动刹车的依据,使自动刹车具有双重的信息来源交叉印证,提高保障。(4) This application uses the information of warning obstacles ahead as the basis for judging and triggering automatic braking, so that automatic braking has double information sources for cross-validation and improves security.
(5)本申请通过警示前方障碍物的信息获得准确的制动距离和规避路线等信息,从而可以实现采用制动曲线方式自动制动;在防止人员因碰撞受较大损伤的同时,还减少了因过度制动造成的人员轻微损伤,人员安全保障进一步提高。(5) This application obtains information such as accurate braking distance and evasive route by warning the information of obstacles in front, so as to realize automatic braking in the way of braking curve; while preventing personnel from being greatly injured by collision, it also reduces Minor injuries to personnel caused by excessive braking are eliminated, and personnel safety is further improved.
图7是本实施例的一种电子设备硬件结构的结构图。FIG. 7 is a structural diagram of a hardware structure of an electronic device in this embodiment.
如图7所示,本申请还公开了一种电子设备,包括:处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;存储器中存储有计算机程序,当计算机程序被处理器执行时,使得处理器执行后排娱乐系统实时显示前视摄像头视频流方法的步骤。As shown in Figure 7, the present application also discloses an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein, the processor, the communication interface, and the memory complete mutual communication through the communication bus; There is a computer program. When the computer program is executed by the processor, the processor executes the steps of the method for displaying the video stream of the front-view camera in real time in the rear seat entertainment system.
本申请还提供了一种计算机可读存储介质,其存储有可由电子设备执行的计算机程序,当计算机程序在电子设备上运行时,使得电子设备执行后排娱乐系统实时显示前视摄像头视频流方法的步骤。The present application also provides a computer-readable storage medium, which stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the method for displaying the video stream of the front-view camera in real time in the rear entertainment system A step of.
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
电子设备包括硬件层,运行在硬件层之上的操作系统层,以及运行在操作系统上的应用层。该硬件层包括中央处理器(CPU,Central Processing Unit)、内存管理单元(MMU,Memory Management Unit)和内存等硬件。该操作系统可以是任意一种或多种通过进程(Process)实现电子设备控制的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。并且在本发明实施例中该电子设备可以是智能手机、平板电脑等手持设备,也可以是桌面计算机、便携式计算机等电子设备,本发明实施例中并未特别限定。An electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU, Central Processing Unit), a memory management unit (MMU, Memory Management Unit) and memory. The operating system can be any one or more computer operating systems that realize electronic device control through processes, for example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system. And in the embodiment of the present invention, the electronic device may be a handheld device such as a smart phone or a tablet computer, or may be an electronic device such as a desktop computer or a portable computer, which is not particularly limited in the embodiment of the present invention.
本发明实施例中的电子设备控制的执行主体可以是电子设备,或者是电子设备中能够调用程序并执行程序的功能模块。电子设备可以获取到存储介质对应的固件,存储介质对应的固件由供应商提供,不同存储介质对应的固件可以相同可以不同,在此不做限定。电子设备获取到存储介质对应的固件后,可以将该存储介质对应的固件写入存储介质中,具体地是往该存储介质中烧入该存储介质对应固件。将固件烧入存储介质的过程可以采用现有技术实现,在本发明实施例中不做赘述。The execution subject of electronic device control in the embodiment of the present invention may be an electronic device, or a functional module in the electronic device that can call a program and execute the program. The electronic device can obtain the firmware corresponding to the storage medium. The firmware corresponding to the storage medium is provided by the supplier. The firmware corresponding to different storage media may be the same or different, which is not limited here. After the electronic device obtains the firmware corresponding to the storage medium, it may write the firmware corresponding to the storage medium into the storage medium, specifically burn the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be realized by using the existing technology, and will not be repeated in the embodiment of the present invention.
电子设备还可以获取到存储介质对应的重置命令,存储介质对应的重置命令由供应商提供,不同存储介质对应的重置命令可以相同可以不同,在此不做限定。The electronic device can also obtain a reset command corresponding to the storage medium. The reset command corresponding to the storage medium is provided by the supplier. The reset commands corresponding to different storage media can be the same or different, which is not limited here.
此时电子设备的存储介质为写入了对应的固件的存储介质,电子设备可以在写入了对应的固件的存储介质中响应该存储介质对应的重置命令,从而电子设备根据存储介质对应的重置命令,对该写入对应的固件的存储介质进行重置。根据重置命令对存储介质进行重置的过程可以现有技术实现,在本发明实施例中不做赘述。At this time, the storage medium of the electronic device is the storage medium in which the corresponding firmware is written, and the electronic device can respond to the reset command corresponding to the storage medium in the storage medium in which the corresponding firmware is written, so that the electronic device can The reset command resets the storage medium in which the corresponding firmware is written. The process of resetting the storage medium according to the reset command can be implemented in the prior art, and will not be described in detail in this embodiment of the present invention.
为了描述的方便,描述以上装置时以功能分为各种单元、模块分别描述。当然在实施本申请时可以把各单元、模块的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above devices, the functions are divided into various units and modules and described separately. Of course, when implementing the present application, the functions of each unit and module can be implemented in one or more software and/or hardware.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this invention belongs. It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be used in an idealized or overly formal sense unless specifically defined to explain.
对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。For the method embodiment, for the sake of simple description, it is expressed as a series of action combinations, but those skilled in the art should know that the embodiment of the present invention is not limited by the described action order, because according to the embodiment of the present invention , certain steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器或者网络设备等)执行本申请各个实施方式或者实施方式的某些部分所述的方法。It can be known from the above description of the implementation manners that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , optical disc, etc., including several instructions to make a computer device (which may be a personal computer, server or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of this application.
本发明在公开了与一种后排娱乐系统实时显示前视摄像头视频流方法和装置对应的电子设备和存储介质的基础之上,还公开一种后排娱乐系统实时显示前视摄像头视频流的车辆,具体包括:On the basis of disclosing the electronic equipment and storage medium corresponding to a method and device for displaying the video stream of the front-view camera in real time in the rear-row entertainment system, the present invention also discloses a method for displaying the video stream of the front-view camera in real-time in the rear-row entertainment system Vehicles, specifically:
电子设备,用于实现后排娱乐系统实时显示前视摄像头视频流方法;The electronic device is used to realize the real-time display method of the front-view camera video stream in the rear entertainment system;
处理器,处理器运行程序,当程序运行时从电子设备输出的数据执行后排娱乐系统实时显示前视摄像头视频流方法的步骤;Processor, the processor runs the program, and when the program is running, the data output from the electronic device executes the steps of the rear entertainment system to display the video stream of the front-view camera in real time;
存储介质,用于存储程序,程序在运行时对于从电子设备输出的数据执行后排娱乐系统实时显示前视摄像头视频流方法的步骤。The storage medium is used for storing a program, and the program executes the steps of the method for displaying the video stream of the front-view camera in real time by the rear seat entertainment system for the data output from the electronic device when the program is running.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211159693.XA CN115567691A (en) | 2022-09-22 | 2022-09-22 | Method and device for real-time display of front-view camera video stream by back-row entertainment system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211159693.XA CN115567691A (en) | 2022-09-22 | 2022-09-22 | Method and device for real-time display of front-view camera video stream by back-row entertainment system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115567691A true CN115567691A (en) | 2023-01-03 |
Family
ID=84741159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211159693.XA Pending CN115567691A (en) | 2022-09-22 | 2022-09-22 | Method and device for real-time display of front-view camera video stream by back-row entertainment system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115567691A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2324647A1 (en) * | 2000-09-29 | 2002-03-29 | Charles A. Paul, Jr. | Dual panel vehicular display system |
JP2011020539A (en) * | 2009-07-15 | 2011-02-03 | Panasonic Corp | Rear-seat image display device |
CN202863291U (en) * | 2012-09-17 | 2013-04-10 | 浙江吉利汽车研究院有限公司杭州分公司 | Automobile video monitoring device |
CN106232427A (en) * | 2014-04-17 | 2016-12-14 | 三菱电机株式会社 | Display device for mounting on vehicle |
CN108259819A (en) * | 2016-12-29 | 2018-07-06 | 财团法人车辆研究测试中心 | Dynamic image feature enhancement method and system |
CN112026757A (en) * | 2020-06-09 | 2020-12-04 | 理工雷科智途(北京)科技有限公司 | Self-adaptive active anti-collision brake system with autonomous training and learning function |
CN212828163U (en) * | 2020-08-07 | 2021-03-30 | 上汽通用汽车有限公司 | Vehicle-mounted entertainment device and automobile |
-
2022
- 2022-09-22 CN CN202211159693.XA patent/CN115567691A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2324647A1 (en) * | 2000-09-29 | 2002-03-29 | Charles A. Paul, Jr. | Dual panel vehicular display system |
JP2011020539A (en) * | 2009-07-15 | 2011-02-03 | Panasonic Corp | Rear-seat image display device |
CN202863291U (en) * | 2012-09-17 | 2013-04-10 | 浙江吉利汽车研究院有限公司杭州分公司 | Automobile video monitoring device |
CN106232427A (en) * | 2014-04-17 | 2016-12-14 | 三菱电机株式会社 | Display device for mounting on vehicle |
CN108259819A (en) * | 2016-12-29 | 2018-07-06 | 财团法人车辆研究测试中心 | Dynamic image feature enhancement method and system |
CN112026757A (en) * | 2020-06-09 | 2020-12-04 | 理工雷科智途(北京)科技有限公司 | Self-adaptive active anti-collision brake system with autonomous training and learning function |
CN212828163U (en) * | 2020-08-07 | 2021-03-30 | 上汽通用汽车有限公司 | Vehicle-mounted entertainment device and automobile |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10026160B2 (en) | Systems and techniques for automatic image haze removal across multiple video frames | |
US9384532B2 (en) | Apparatus for improving fogged image using user-controllable root operator | |
CN113276774B (en) | Method, device and equipment for processing video picture in unmanned vehicle remote driving process | |
DE102013015847B3 (en) | vision system | |
CN113978366B (en) | An intelligent electronic rearview mirror system based on human eye attention and implementation method | |
US20220242433A1 (en) | Saliency-based presentation of objects in an image | |
WO2018042976A1 (en) | Image generation device, image generation method, recording medium, and image display system | |
JP2023046953A (en) | Image processing system, mobile device, image processing method, and computer program | |
TWM557685U (en) | Driving assistance system | |
US12101580B2 (en) | Display control apparatus, display control method, and program | |
CN115567691A (en) | Method and device for real-time display of front-view camera video stream by back-row entertainment system | |
DE102021104895A1 (en) | SYSTEMS AND METHODS FOR PERFORMING REMOTE AUTOMATED VEHICLE PARKING | |
US11107197B2 (en) | Apparatus for processing image blurring and method thereof | |
EP4304191A2 (en) | Camera system, method for controlling the same, and computer program | |
JP2018074191A (en) | On-vehicle video display system, on-vehicle video display method, and program | |
JP5294756B2 (en) | Vehicle surrounding image providing apparatus and vehicle surrounding image providing method | |
Negru et al. | Exponential image enhancement in daytime fog conditions | |
KR102115579B1 (en) | Vehicle side view system | |
JP2016131009A (en) | Display control device, projection device, display control method, display control program, and recording medium | |
CN115891837A (en) | Method for improving vehicle driving safety and computer storage medium | |
US20240112307A1 (en) | Image processing device and image display device | |
JP7325308B2 (en) | Image processing device and image processing method | |
US20250124892A1 (en) | Methods and apparatuses for mitigation of motion sickness | |
JP2024010834A (en) | Sharpening device, sharpening program and sharpening method | |
CN117984899A (en) | Vehicle-mounted video display method and device, vehicle and readable storage medium |
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 |