A driving video playback method
By employing unique image coordinate and latitude/longitude conversion and preset playback rules, the complexity of dashcam video playback is solved, enabling efficient synchronous display of driving trajectory and video, intelligent accident detection, and improved user experience.
Patent Information
- Application Number
- CN202210310072.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-03-28
AI Technical Summary
Existing dashcams have complex human-computer interaction for video playback, resulting in a poor user experience and making it difficult to achieve efficient synchronous display of driving trajectory and video.
By employing a unique image coordinate and latitude/longitude conversion method, combined with preset playback rules and cropping focus adjustment, the system achieves high synchronization between driving trajectory and video, automatically detects collision accidents and adjusts playback focus, and intelligently displays the data based on timestamps and trajectory sequences.
It improves the intelligence of driving video playback, automatically displaying accident footage without requiring manual adjustment by the user, thus enhancing the user experience.
Smart Images

Figure CN116863560B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of driving recorders, in particular to a driving video playback method. BACKGROUND
[0002] With the continuous growth of vehicle ownership in China, the increasingly complex road conditions, traffic accidents are also increasing, how to maintain their rights and interests become the urgent demand of the majority of drivers, therefore, as a driving recorder can provide evidence for driving record, in the traffic accident investigation provides more and more important role.
[0003] At present, most of the driving recorders only record driving video, some can realize the combination of driving video and position information, but the human-computer interaction of video playback is complex, and the user experience is poor. SUMMARY
[0004] The present application provides a driving video playback method, aiming at solving the defects in the prior art and improving the intelligent degree of driving video playback.
[0005] To achieve the above purpose, the technical scheme adopted by the present application is:
[0006] The present application provides a driving video playback method, comprising:
[0007] Step 1, obtaining the current click position of the user, judging whether the current click position is on the driving track, if yes, converting the current click position into the current latitude and longitude according to the preset conversion rule, otherwise prompting that the current click position has no driving video;
[0008] Step 2, obtaining the corresponding time stamp according to the current latitude and longitude;
[0009] Step 3, determining the corresponding video segment according to the current time stamp, and playing the video segment according to the preset playing rule with the current time stamp as the starting point.
[0010] Specifically, the preset conversion rule is:
[0011] If (Pmax-Pmin) / (Qmax-Qmin) < (H / V), then:
[0012] P = (Pmin+Pmax) / 2+(X-H / 2)×(Qmax-Qmin) / V*n,
[0013] Q = (Qmin+Qmax) / 2+(V / 2-Y)×(Qmax-Qmin) / V*n;
[0014] If (Pmax-Pmin) / (Qmax-Qmin) ≥ (H / V), then:
[0015] P = (Pmin + Pmax) / 2 + (X - H / 2) * (Pmax - Pmin) / H * n,
[0016] Q = (Qmin + Qmax) / 2 + (V / 2 - Y) * (Pmax - Pmin) / H * n;
[0017] Wherein, (X, Y) represents the image coordinates of the current click position, (P, Q) represents the current latitude and longitude, Pmax, Pmin, Qmax, Qmin represent the maximum value of the longitude, the minimum value of the longitude, the maximum value of the latitude, the minimum value of the latitude of the current map area respectively, n represents the current map zoom level, H represents the horizontal resolution of the display screen, V represents the vertical resolution of the display screen.
[0018] Specifically, the preset playing rule comprises:
[0019] Step A1, forming a clipping area on the original driving video picture according to the resolution of the display screen, the geometric center of the clipping area being a clipping focal point;
[0020] Step A2, detecting whether there is a collision in the playing time period, if yes, entering the next step, otherwise, setting the clipping focal point as the center point of the original driving video picture and entering step A5;
[0021] Step A3, detecting the occurrence position of the collision in the original driving video, and judging whether the occurrence position of the collision is in the clipping area, if yes, entering step A5, otherwise, entering the next step;
[0022] Step A4, moving the clipping focal point to make the occurrence position of the collision in the clipping area, and entering the next step;
[0023] Step A5, reading the video in the clipping area for playing.
[0024] Specifically, the detecting the occurrence position of the collision in the original driving video comprises:
[0025] Step A3-1, reading the historical frame of the current video as a reference frame, identifying the target vehicle in each lane adjacent to the vehicle in the reference frame, and determining the pixel area of the target vehicle's connected region, denoted as a first pixel area;
[0026] Step A3-2, mirroring the first pixel area with a preset point outside the target vehicle as the center to generate a first mirrored pixel area, and recording the area of the first mirrored pixel area as a first area;
[0027] Step A3-3, identifying a pixel area of a connected region of the same target vehicle in the current video frame, denoted as a second pixel area;
[0028] Step A3-4, calculating an area of the second pixel area, denoted as a second area;
[0029] Step A3-5, calculating a judgment pixel area, which is an absolute value of an area difference between the first area and the second area;
[0030] Step A3-6, judging whether the judgment pixel area is greater than a preset area threshold, if yes, judging that the target vehicle has collided, otherwise judging that the target vehicle has not collided;
[0031] Step A3-7, determining a center of the second pixel area as a collision occurrence position.
[0032] Further, after the step 2, further comprising:
[0033] Step 21, judging whether the timestamp is more than one, if yes, displaying all the timestamps according to a first preset rule;
[0034] Step 22, selecting a current timestamp.
[0035] Specifically, the first preset rule comprises:
[0036] Step B1, judging whether altitudes corresponding to each timestamp are same, if yes, proceeding to the next step, otherwise proceeding to step B3;
[0037] Step B2, judging whether collision sensor data within a preset time length before and after each timestamp is abnormal, if yes, displaying a thumbnail of a video at the corresponding time, otherwise arranging the each timestamp in time sequence;
[0038] Step B3, judging that a place corresponding to each timestamp is a cross point between upper and lower layers of a ring-shaped elevated bridge, reading preset elevated upper layer and lower layer images, and displaying the images after adding corresponding timestamps to the elevated upper layer and lower layer.
[0039] Further, after the step 3, further comprising:
[0040] Step 4, obtaining a target progress of a current video, and obtaining a track sequence corresponding to the current video segment;
[0041] Step 5, determining a time sequence of the current video segment according to the track sequence;
[0042] Step 6, determining a time element of the current timestamp in the time sequence, denoted as a reference time element;
[0043] Step 7, taking the reference time element as a starting time, determining a target time element corresponding to a target progress of the current video in the time sequence according to a second preset rule;
[0044] Step 8, acquiring a target track point corresponding to the target time element, and moving the track mark point to a position of the target track point.
[0045] Specifically, the second preset rule is that the serial number i of the target time element is m+k, where k=[offset*△T / n], offset represents the target progress, △T is the duration of the current video segment, and [] represents an integral operation.
[0046] Specifically, the step 8 includes:
[0047] Step C1, determining a reference track point corresponding to the reference time element, and acquiring a pixel length corresponding to the track mark point, denoted as a first pixel length;
[0048] Step C2, calculating a second pixel value corresponding to a straight line distance between the target track point and the reference track point;
[0049] Step C3, judging whether the second pixel value is greater than a preset multiple of the first pixel length, if yes, updating the position of the track mark point, and if not, not updating the position of the track mark point.
[0050] Further, after the step 8, the method further includes:
[0051] Step 9, receiving a request of deleting the current driving video, and restoring a driving track color corresponding to the current driving video to a default color.
[0052] The application has the advantages that: the application realizes high synchronization of driving track and driving video playing through a unique image coordinate and latitude-longitude conversion method; when there are multiple time stamps, the type of the time stamp is intelligently judged, and corresponding display is performed for user selection; a collision accident is automatically adjusted to a cutting focus, so that an accident occurrence picture can be displayed without manual adjustment of a display picture by the user; the time sequence of the video segment and the position sequence are one-to-one corresponding, and the track mark point is automatically updated according to the playing progress, so that the intelligent degree of driving video playback is improved. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 is a flowchart of a driving video playback method of the application. DETAILED DESCRIPTION
[0054] The embodiments of the present application will be described in detail below with reference to the drawings, which are used only for reference and illustration, and do not constitute a limitation on the scope of patent protection of the present application.
[0055] In the flow described in the specification, claims or drawings of the present application, the serial numbers of the respective steps (such as steps 10, 20, etc.) are only used to distinguish the respective steps, and the serial numbers themselves do not represent any execution order. It should be noted that the "first", "second", etc. in the present description are only used to distinguish the description objects, and do not represent the order of precedence, nor do the "first", "second", etc. represent different types.
[0056] Example 1
[0057] As Figure 1 shown, the embodiment provides a driving video playback method, comprising:
[0058] Step 1, obtaining the current click position of the user, judging whether the current click position is on the driving track, if yes, converting the current click position into the current latitude and longitude (P, Q) according to the preset conversion rule, otherwise, prompting that the current click position has no driving video.
[0059] In the embodiment, the preset conversion rule is:
[0060] If (Pmax-Pmin) / (Qmax-Qmin) < (H / V), then:
[0061] P=(Pmin+Pmax) / 2+(X-H / 2)×(Qmax-Qmin) / V*n,
[0062] Q=(Qmin+Qmax) / 2+(V / 2-Y)×(Qmax-Qmin) / V*n;
[0063] If (Pmax-Pmin) / (Qmax-Qmin) ≥ (H / V), then:
[0064] P=(Pmin+Pmax) / 2+(X-H / 2)×(Pmax-Pmin) / H*n,
[0065] Q=(Qmin+Qmax) / 2+(V / 2-Y)×(Pmax-Pmin) / H*n;
[0066] Wherein, (X, Y) represents the image coordinates of the current click position, Pmax, Pmin, Qmax, Qmin represent the maximum value of the longitude, the minimum value of the longitude, the maximum value of the latitude, and the minimum value of the latitude of the current map area respectively, n represents the current map zoom level, H represents the horizontal resolution of the display screen, and V represents the vertical resolution of the display screen.
[0067] Step 2, obtaining a corresponding timestamp according to the current latitude and longitude (P, Q).
[0068] Step 3, determining a corresponding video segment according to the current timestamp, and playing the video segment according to a preset playing rule starting from the current timestamp.
[0069] In the embodiment, the preset playing rule comprises:
[0070] Step A1, forming a clipping area on the original driving video picture according to the resolution of the display screen, the geometric center of the clipping area being a clipping focal point;
[0071] Step A2, detecting whether there is a collision in the playing time period, if yes, proceeding to the next step, otherwise, setting the clipping focal point as the center point of the original driving video picture, and proceeding to step A5;
[0072] Step A3, detecting the occurrence position of the collision in the original driving video, and judging whether the occurrence position of the collision is in the clipping area, if yes, proceeding to step A5, otherwise, proceeding to the next step;
[0073] Step A4, moving the clipping focal point so that the occurrence position of the collision is in the clipping area, and proceeding to the next step;
[0074] Step A5, reading the video in the clipping area for playing.
[0075] In the embodiment, the detecting the occurrence position of the collision in the original driving video comprises:
[0076] Step A3-1, reading a historical frame of the current video as a reference frame, identifying a target vehicle in each lane adjacent to the vehicle in the reference frame, and determining a pixel area of a connected region of the target vehicle, denoted as a first pixel area Z1.
[0077] In the embodiment, the historical frame of the current video is the Nth frame (for example, the 50th frame) before the current video frame.
[0078] The pixel area of the connected region of the target vehicle refers to a closed region connected with the target vehicle and enclosed.
[0079] Step A3-2, mirroring the first pixel area Z1 with a preset point outside the target vehicle as the center to generate a first mirrored pixel area Z1', and recording the area of the first mirrored pixel area Z1' as a first area S1.
[0080] In the embodiment, the preset point is set as follows: a line is extended in the direction opposite to the advancing direction of the target vehicle, and the distance between the line and the contour of the tail of the target vehicle is a preset number of pixels (for example, 10 pixels).
[0081] Step A3-3, a pixel region of the connected region of the same target vehicle in the current video frame is identified, and is recorded as a second pixel region Z2.
[0082] Step A3-4, the area of the second pixel region Z2 is calculated, and is recorded as a second area S2.
[0083] Step A3-5, a judgment pixel area ΔS is calculated, the judgment pixel area is the absolute value of the area difference between the first area S1 and the second area S2, that is, ΔS = |S1-S2|.
[0084] Step A3-6, it is judged whether the judgment pixel area ΔS is greater than a preset area threshold S0, if yes, it is judged that the target vehicle has collided, and if not, it is judged that the target vehicle has not collided.
[0085] Step A3-7, the center of the second pixel region Z2 is determined as the position of the collision.
[0086] The current driving recorders generally adopt wide-angle cameras, and the horizontal or vertical resolution is often greater than the resolution of the display screen, so that the accident vehicle cannot be displayed on the display screen in some cases. In the embodiment, the position of the accident vehicle is detected, and the cropping focus is moved according to the position, so that the accident picture can be displayed without manual adjustment of the user, thereby improving the user experience.
[0087] Example 2
[0088] Different from the embodiment 1, the embodiment further includes the following steps after the step 2 of the embodiment 1.
[0089] Step 21, it is judged whether the timestamp is more than one, if yes, all the timestamps are displayed according to a first preset rule.
[0090] Step 22, the selected timestamp is taken as a current timestamp.
[0091] In the embodiment, the first preset rule includes:
[0092] Step B1, it is judged whether the altitudes corresponding to the timestamps are the same, if yes, the next step is entered, and if not, step B3 is entered.
[0093] Step B2, judging whether the collision sensor data within a preset time length before and after each timestamp is abnormal, if yes, displaying the thumbnail of the video at the corresponding time, otherwise arranging the timestamps in time sequence;
[0094] Step B3, judging whether the place corresponding to each timestamp is the intersection of the upper and lower layers of the circular viaduct, reading the preset upper and lower viaduct images, and displaying them after adding the corresponding timestamps to the upper and lower viaducts.
[0095] By setting this step, if the current click position of the user is the intersection of the upper and lower layers of the circular viaduct, the timestamp expected to be selected by the user can be quickly determined.
[0096] Example 3
[0097] Different from Embodiment 1, this embodiment further includes the following steps after the step 3 of Embodiment 1:
[0098] Step 4, obtaining the target progress of the current video, and obtaining the track sequence L corresponding to the current video segment.
[0099] In this embodiment, the track sequence L={l(0), l(1), l(2)…l(i), l(i+1), l(i+2)…l(n)},
[0100] wherein l(i) represents each position point, and n is determined by the accuracy of the track point, for example, n=999.
[0101] Step 5, determining the time sequence T of the current video segment according to the track sequence L.
[0102] In this embodiment, the time sequence T={t(0), t(1), t(2)…t(i), t(i+1), t(i+2)…t(n)},wherein the time element t(i) represents a time node that can be located in the current video. If n=999, it means that the current video segment is divided into 1000 time sequences.
[0103] In this way, each track point l(i) in the track sequence L is in one-to-one correspondence with each time element t(i) in the time sequence T.
[0104] Step 6, determining the time element of the current timestamp in the time sequence T, denoted as the reference time element t(m).
[0105] Step 7, taking the reference time element t(m) as the starting time, determining the target time element t(i) corresponding to the target progress in the time sequence T according to the target progress offset of the current video and the second preset rule.
[0106] In the embodiment, the second preset rule is that the sequence number i of the target time element is m+k, where k=[offset*△T / n], offset represents the target progress, △T is the time length of the current video segment, and [] represents an integral operation.
[0107] Since the driving video is stored in the form of multiple file segments, the current click position (i.e., the starting time) of the user is generally not the starting point of the current video segment, but an intermediate position, i.e., the reference time element t(m) is generally not the starting reference time element t(0).
[0108] For example, if the time length of the current video segment is 1000s, the video starting time t(m) is t(100), and the target progress offset is 10s backward, the target progress offset is -10s, and then:
[0109] k=[-10s*1000s / 1000]= -10, i.e., t(i)=t(90).
[0110] Step 8, obtaining a corresponding target track point l(i) according to the target time element t(i), and moving the track marker point to the position of the target track point l(i).
[0111] In the embodiment, the step 8 includes:
[0112] Step C1, determining a corresponding reference track point l(m) according to the reference time element t(m), and obtaining a pixel length corresponding to the track marker point, denoted as a first pixel length;
[0113] Step C2, calculating a second pixel value D corresponding to the straight-line distance between the target track point l(i) and the reference track point l(m);
[0114] Step C3, judging whether the second pixel value D is greater than a preset multiple of the first pixel length, if yes, updating the position of the track marker point, and if not, not updating the position of the track marker point.
[0115] In the embodiment, the preset multiple is 2 times.
[0116] Example 4
[0117] Different from the embodiment 3, the embodiment further includes, after the step 8 of the embodiment 3:
[0118] Step 9, receiving a request of deleting the current driving video, and restoring the driving track color corresponding to the current driving video to a default color.
[0119] The above merely provides the preferred embodiment of the present application, and cannot allude to the protection scope of the present application; therefore, any equivalent change made according to the patent application scope of the present application shall still fall within the scope of the present application.
Claims
1. A method for playing back driving videos, characterized in that, include: Step 1: Obtain the user's current click location and determine whether the current click location is on the driving trajectory. If so, convert the current click location to the current latitude and longitude according to the preset conversion rule; otherwise, prompt that there is no driving video at the current click location. Step 2: Obtain the corresponding timestamp based on the current latitude and longitude; Step 3: Determine the corresponding video segment based on the current timestamp, and play the video segment according to the preset playback rules starting from the current timestamp; The preset playback rules include: Step A1: Create a cropping area on the original driving video frame according to the resolution of the display screen, and the geometric center of the cropping area is the cropping focus; Step A2: Detect whether there is a collision during the playback period. If so, proceed to the next step; otherwise, set the cropping focus to the center point of the original driving video frame and proceed to step A5. Step A3: Detect the location of the collision in the original driving video and determine whether the location of the collision is within the cropping area. If yes, proceed to step A5; otherwise, proceed to the next step. Step A4: Move the cutting focus so that the collision occurs within the cutting area, and proceed to the next step; Step A5: Read and play the video within the cropped area.
2. The driving video playback method according to claim 1, characterized in that, The preset conversion rule is as follows: If (Pmax-Pmin) / (Qmax-Qmin) < (H / V), then: P=(Pmin+Pmax) / 2+(XH / 2)×(Qmax-Qmin) / V*n, Q=(Qmin+Qmax) / 2+(V / 2-Y)×(Qmax-Qmin) / V*n; If (Pmax-Pmin) / (Qmax-Qmin)≥(H / V), then: P=(Pmin+Pmax) / 2+(XH / 2)×(Pmax-Pmin) / H*n, Q=(Qmin+Qmax) / 2+(V / 2-Y)×(Pmax-Pmin) / H*n; Where (X,Y) represents the image coordinates of the current clicked location, (P,Q) represents the current latitude and longitude, Pmax, Pmin, Qmax, and Qmin represent the maximum, minimum, maximum, and minimum latitude values of the current map area, respectively, n represents the current map zoom level, H represents the horizontal resolution of the display screen, and V represents the vertical resolution of the display screen.
3. The driving video playback method according to claim 1, characterized in that, The detection of the collision location in the original driving video includes: Step A3-1: Read the historical frames of the current video as reference frames, identify target vehicles in each lane adjacent to the current vehicle in the reference frames, and determine the pixel regions of the connected areas of the target vehicles, which are denoted as the first pixel region. Step A3-2: Mirror the first pixel region with a preset point outside the target vehicle as the center to generate a first mirror pixel region, and record the area of the first mirror pixel region as the first area; Step A3-3: Identify the pixel regions of connected regions of the same target vehicle in the current video frame, and record them as the second pixel region; Step A3-4: Calculate the area of the second pixel region and record it as the second area; Step A3-5: Calculate the area of the judgment pixel, where the area of the judgment pixel is the absolute value of the difference between the areas of the first area and the second area; Step A3-6: Determine whether the area of the determined pixel is greater than a preset area threshold. If yes, determine that the target vehicle has collided; otherwise, determine that the target vehicle has not collided. Step A3-7: Determine the center of the second pixel region as the location where the collision occurs.
4. The driving video playback method according to claim 1, characterized in that, Following step 2, the following is also included: Step 21: Determine whether the timestamp exceeds one; if so, display all timestamps according to the first preset rule. Step 22: Use the selected timestamp as the current timestamp.
5. The driving video playback method according to claim 4, characterized in that, The first preset rule includes: Step B1: Determine whether the altitudes corresponding to each timestamp are the same. If yes, proceed to the next step; otherwise, proceed to step B3. Step B2: Determine whether the collision sensor data within a preset time period before and after each timestamp is abnormal. If so, display a thumbnail of the video at the corresponding time. Otherwise, arrange the timestamps in chronological order. Step B3: Determine that the location corresponding to each timestamp is the intersection of the upper and lower layers of the circular viaduct, read the preset upper and lower layer images of the viaduct, add the corresponding timestamps to the upper and lower layers of the viaduct, and then display them.
6. The driving video playback method according to claim 1, characterized in that, Following step 3, the following is also included: Step 4: Obtain the target progress of the current video and obtain the trajectory sequence corresponding to the current video segment; Step 5: Determine the time series of the current video segment based on the trajectory sequence; Step 6: Determine the time element of the current timestamp in the time series, and denote it as the reference time element; Step 7: Using the reference time element as the starting time, and based on the target progress of the current video, determine the target time element corresponding to the target progress in the time series according to the second preset rule; Step 8: Obtain the corresponding target trajectory point based on the target time element, and move the trajectory marker point to the position of the target trajectory point.
7. The driving video playback method according to claim 6, characterized in that, The second preset rule is: the index of the target time element i = m + k, where k = [offset * △T / n], offset represents the target progress, △T is the duration of the current video segment, and [] represents the rounding operation.
8. The driving video playback method according to claim 6, characterized in that, Step 8 includes: Step C1: Determine the corresponding reference trajectory point based on the reference time element, and obtain the pixel length corresponding to the trajectory marker point, which is recorded as the first pixel length; Step C2: Calculate the second pixel value corresponding to the straight-line distance between the target trajectory point and the reference trajectory point; Step C3: Determine whether the value of the second pixel is greater than a preset multiple of the length of the first pixel. If yes, update the position of the trajectory marker point; otherwise, do not update the position of the trajectory marker point.
9. The driving video playback method according to claim 6, characterized in that, Following step 8, the following is also included: Step 9: Receive a request to delete the current driving video and restore the driving trajectory color corresponding to the current driving video to the default color.
Citation Information
Patent Citations
Driving recorder video playback method, device and system based on map locus
CN105611391A