Method, apparatus, device and medium for generating reverse trajectory line
By converting the reverse track picture from pixel point data to line data and matching and drawing, the problem of insufficient storage space of the on-board multimedia entertainment host is solved, and the rapid display and security of the reverse track are achieved.
Patent Information
- Application Number
- CN202211449269.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-11-18
AI Technical Summary
The on-board multimedia entertainment host lacks storage space during the initial stage of startup, and cannot quickly display the reversing track line, which cannot meet the needs of fast reversing.
The pixel point data of the reverse track picture is converted into line data, stored as a set of pending pictures, and the steering wheel angle is used to match the target pending pictures, pixel point position marking and RGB assignment, and the target reversing track picture is drawn.
Quickly display the reversing trajectory in the initial stage of starting the car system, reducing storage space requirements, improving reversing safety and reducing error rates.
Smart Images

Figure CN115878825B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle safety, and particularly to a method, device, equipment and medium for generating a reverse trajectory line. Background Art
[0002] Quick reverse refers to the fact that the in-vehicle multimedia entertainment host (referred to as the car machine for short) can quickly enter and display the reverse image (including the reverse trajectory line, etc.) shortly after startup. Since quick reverse is realized at the initial stage of the car machine system startup, that is, without the support of the operating system and the GUI (Graphical User Interface) library, etc., the available storage space is also very limited.
[0003] And there are usually six or seven dozen reverse trajectory line pictures. The current solution is to display the reverse trajectory line after the operating system and application programs have started up. However, at this time, it may already be more than ten seconds or even longer after the car machine has started up, which cannot meet the requirements of quick reverse. Summary of the Invention
[0004] In view of the above, it is necessary to provide a method, device, equipment and medium for generating a reverse trajectory line, aiming to solve the problem that the requirements of quick reverse cannot be met due to insufficient storage space.
[0005] A method for generating a reverse trajectory line, the method for generating a reverse trajectory line includes:
[0006] Obtain a pre-calibrated set of initial reverse trajectory pictures;
[0007] Convert the pixel point data of each initial reverse trajectory picture in the set of initial reverse trajectory pictures into line data to obtain a set of pictures to be processed, and store the set of pictures to be processed in the car machine system;
[0008] In response to a reverse instruction triggered by a target vehicle, obtain the turning angle of the target vehicle;
[0009] Match according to the turning angle of the target vehicle in the set of pictures to be processed stored in the car machine system to obtain a target picture to be processed;
[0010] Determine the position of each pixel point in the target picture to be processed;
[0011] Assign RGB values to the pixel points corresponding to each pixel point position to obtain the color value of each pixel point;
[0012] Perform image drawing according to each pixel point position and the color value of each pixel point to obtain a target reverse trajectory picture.
[0013] According to a preferred embodiment of the present invention, each initial reverse trajectory picture in the set of initial reverse trajectory pictures corresponds to a vehicle steering angle.
[0014] According to a preferred embodiment of the present invention, the conversion of the pixel point data of each initial reverse trajectory picture in the set of initial reverse trajectory pictures into line data to obtain a set of pictures to be processed includes:
[0015] Obtain the starting point of each initial reverse trajectory picture and obtain a preset effective color;
[0016] Perform point-by-point scanning of each initial reverse trajectory picture starting from the starting point of each initial reverse trajectory picture;
[0017] During the scanning process, when a first pixel point with the preset effective color is scanned, determine the x-axis coordinate of the starting point as the first pixel point, and until a second pixel point without the preset effective color is scanned, determine the x-axis coordinate of the ending point as the second pixel point, and obtain the current y-axis coordinate. Generate a line according to the starting point x-axis coordinate, the ending point x-axis coordinate, and the y-axis coordinate;
[0018] Integrate each line obtained by scanning as the line data of each initial reverse trajectory picture, and generate each picture to be processed according to the line data of each initial reverse trajectory picture;
[0019] Classify the pictures to be processed into two categories according to whether the vehicle steering angle is a left turn or a right turn, and number each picture to be processed in ascending order of the steering angle in each type;
[0020] Construct the set of pictures to be processed according to the numbers of each picture to be processed.
[0021] According to a preferred embodiment of the present invention, the matching in the set of pictures to be processed stored in the vehicle-mounted system according to the steering angle of the target vehicle to obtain a target picture to be processed includes:
[0022] Obtain the maximum steering angle of the steering wheel of the target vehicle;
[0023] Calculate the quotient of the steering angle of the target vehicle and the maximum steering angle of the steering wheel to obtain a first value;
[0024] Obtain the total number of all pictures to be processed in the set of pictures to be processed;
[0025] Calculate the quotient of the total number and 2 to obtain a second value;
[0026] Calculate the product of the first value and the second value to obtain a target number;
[0027] Match the target image to be processed from the set of images to be processed according to the target serial number.
[0028] According to a preferred embodiment of the present invention, determining the position of each pixel point in the target image to be processed includes:
[0029] Obtain the starting x-axis coordinate, ending x-axis coordinate, and y-axis coordinate of each line in the target image to be processed;
[0030] Obtain the screen resolution width of the target vehicle;
[0031] Calculate the product of the y-axis coordinate of each line and the screen resolution width to obtain a third value corresponding to each line;
[0032] Obtain the x-axis coordinate of each pixel point included between the starting x-axis coordinate and the ending x-axis coordinate of each line;
[0033] Calculate the sum of the third value corresponding to each line and the x-axis coordinate of each pixel point corresponding to each line to obtain the pixel point position corresponding to each line;
[0034] Integrate the pixel point positions corresponding to each line to obtain the position of each pixel point in the target image to be processed.
[0035] According to a preferred embodiment of the present invention, performing RGB assignment on the pixel points corresponding to each pixel point position to obtain the color value of each pixel point includes:
[0036] Perform RGB assignment on the pixel points corresponding to each pixel point position according to the original color distribution of each initial reverse trajectory image to obtain the color value of each pixel point.
[0037] According to a preferred embodiment of the present invention, after obtaining the target reverse trajectory image, the method further includes:
[0038] Display the target reverse trajectory image on the display screen of the target vehicle;
[0039] Real-time monitor the actual reverse trajectory of the target vehicle;
[0040] When the actual reverse trajectory of the target vehicle deviates from the target reverse trajectory image, issue a warning prompt.
[0041] A reverse trajectory line generation device, the reverse trajectory line generation device includes:
[0042] An acquisition unit for acquiring a set of pre-calibrated initial reverse trajectory images;
[0043] A conversion unit, configured to convert the pixel point data of each initial reverse trajectory picture in the set of initial reverse trajectory pictures into line data, obtain a set of pictures to be processed, and store the set of pictures to be processed in the in-vehicle system;
[0044] The obtaining unit is further configured to obtain the steering angle of the target vehicle in response to a reverse instruction triggered by the target vehicle;
[0045] A matching unit, configured to perform matching in the set of pictures to be processed stored in the in-vehicle system according to the steering angle of the target vehicle to obtain a target picture to be processed;
[0046] A determining unit, configured to determine the position of each pixel point in the target picture to be processed;
[0047] An assignment unit, configured to perform RGB assignment on the pixel points corresponding to each pixel point position to obtain the color value of each pixel point;
[0048] A drawing unit, configured to perform image drawing according to each pixel point position and the color value of each pixel point to obtain a target reverse trajectory picture.
[0049] A computer device, the computer device includes:
[0050] A memory, storing at least one instruction; and
[0051] A processor, executing the instructions stored in the memory to implement the reverse trajectory line generation method.
[0052] A computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in a computer device to implement the reverse trajectory line generation method.
[0053] It can be seen from the above technical solutions that the present invention can convert the reverse trajectory pictures from pixel point data into line data and then store them, reducing the occupied space of the data, solving the problem of insufficient storage space in the in-vehicle system. When actually reversing, the steering wheel angle is used to match the target picture to be processed from the stored data, mark the pixel point positions of the target picture to be processed and perform RGB assignment, and draw it into a target reverse trajectory picture, with less dependence on resources and the environment, enabling the reverse trajectory to be quickly displayed under the condition restrictions at the initial stage of starting the in-vehicle system to assist in quick reversing. Description of the Drawings
[0054] Figure 1 It is a flowchart of a preferred embodiment of the reverse trajectory line generation method of the present invention.
[0055] Figure 2It is a functional block diagram of a preferred embodiment of the reverse trajectory line generation device of the present invention.
[0056] Figure 3 It is a schematic structural diagram of a computer device of a preferred embodiment of the method for generating a reverse trajectory line of the present invention. Detailed implementation manners
[0057] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] As Figure 1 shown, it is a flowchart of a preferred embodiment of the method for generating a reverse trajectory line of the present invention. According to different requirements, the order of steps in this flowchart can be changed, and some steps can be omitted.
[0059] The method for generating a reverse trajectory line is applied to one or more computer devices. The computer device is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0060] The computer device can be any electronic product that can perform human-computer interaction with a user. For example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an Internet Protocol Television (IPTV), a smart wearable device, etc.
[0061] The computer device can also include a network device and / or a user device. Among them, the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing (Cloud Computing).
[0062] The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0063] Among them, Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
[0064] Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0065] The network where the computer device is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, Virtual Private Network (VPN), etc.
[0066] S10, obtain a set of pre-calibrated initial reverse driving trajectory pictures.
[0067] In this embodiment, each initial reverse driving trajectory picture in the set of initial reverse driving trajectory pictures corresponds to a vehicle steering angle.
[0068] Among them, the vehicle steering angle refers to the steering wheel angle of the vehicle.
[0069] In this embodiment, the set of initial reverse driving trajectory pictures may include reverse driving trajectory pictures at various reverse angles.
[0070] S11, convert the pixel point data of each initial reverse driving trajectory picture in the set of initial reverse driving trajectory pictures into line data to obtain a set of pictures to be processed, and store the set of pictures to be processed in the in-vehicle system.
[0071] In this embodiment, the converting the pixel point data of each initial reverse driving trajectory picture in the set of initial reverse driving trajectory pictures into line data to obtain a set of pictures to be processed includes:
[0072] Obtain the starting point of each initial reverse driving trajectory picture and obtain a preset effective color;
[0073] Start from the starting point of each initial reverse driving trajectory picture and perform point-by-point scanning on each initial reverse driving trajectory picture;
[0074] During the scanning process, when a first pixel point with the preset valid color is scanned, the x-axis coordinate of the starting point is determined as the first pixel point. Until a second pixel point without the preset valid color is scanned, the x-axis coordinate of the ending point is determined as the second pixel point, and the current y-axis coordinate is obtained. A line is generated based on the x-axis coordinate of the starting point, the x-axis coordinate of the ending point, and the y-axis coordinate.
[0075] Integrate each line obtained by scanning as the line data of each initial reverse trajectory picture, and generate each picture to be processed based on the line data of each initial reverse trajectory picture.
[0076] Classify the pictures to be processed into two categories according to whether the vehicle turns left or right, and number each picture to be processed in ascending order of the turning angle within each type.
[0077] Construct a set of the pictures to be processed according to the numbers of each picture to be processed.
[0078] Among them, the preset valid color can be configured according to actual needs, such as yellow, red, etc.
[0079] For example: Start scanning point by point from the starting point of each initial reverse trajectory picture. When encountering a point with the preset valid color (based on the RGB (Red Green Blue) values of the pixel point), record the x-axis coordinate of the starting point. Until encountering a non-valid color, record the x-axis coordinate of the ending point, and then record the current y-axis coordinate. Combine these three data to form the x-axis coordinate of the starting point, the x-axis coordinate of the ending point, and the y-axis coordinate of a line, and gather them into the data set of this picture. It can be expressed by the formula as follows: l n ={x s , x e , y}, D n ={l1, l2, l3,... l n}, where l n represents the nth line scanned, D n represents the data set of the nth trajectory picture, and D n must be arranged in ascending order from the minimum turning angle to the maximum turning angle, divided into two types: left turn and right turn, each accounting for half of all trajectory pictures.
[0080] Through the above embodiments, the original pixel point data can be converted into line data for storage, and the occupied storage space is relatively small.
[0081] S12. In response to a reverse instruction triggered by the target vehicle, obtain the turning angle of the target vehicle.
[0082] In this embodiment, the reverse instruction can be triggered by the driver of the target vehicle or automatically triggered when reverse is detected. The present invention does not limit this.
[0083] In this embodiment, the steering wheel angle of the target vehicle is obtained as the angle of the target vehicle.
[0084] S13. Match according to the angle of the target vehicle in the set of to-be-processed pictures stored in the in-vehicle system to obtain a target to-be-processed picture.
[0085] In this embodiment, the matching according to the angle of the target vehicle in the set of to-be-processed pictures stored in the in-vehicle system to obtain a target to-be-processed picture includes:
[0086] Obtain the maximum steering wheel angle of the target vehicle;
[0087] Calculate the quotient of the angle of the target vehicle and the maximum steering wheel angle to obtain a first value;
[0088] Obtain the total number of all to-be-processed pictures in the set of to-be-processed pictures;
[0089] Calculate the quotient of the total number and 2 to obtain a second value;
[0090] Calculate the product of the first value and the second value to obtain a target serial number;
[0091] Match and obtain the target to-be-processed picture from the set of to-be-processed pictures according to the target serial number.
[0092] For example: after entering reverse gear, use the following formula to determine the target serial number:
[0093]
[0094] where T represents the angle of the target vehicle, T m represents the maximum steering wheel angle, N represents the total number of all to-be-processed pictures in the set of to-be-processed pictures (including half for left turn and half for right turn), that is, the steering wheel angle is evenly divided into N / 2 parts.
[0095] Further, match in the set of to-be-processed pictures according to the obtained target serial number to obtain the target to-be-processed picture.
[0096] S14. Determine the position of each pixel point in the target to-be-processed picture.
[0097] In this embodiment, the determining the position of each pixel point in the target to-be-processed picture includes:
[0098] Obtain the starting x-axis coordinate, ending x-axis coordinate and y-axis coordinate of each line in the target to-be-processed picture;
[0099] Obtain the screen resolution width of the target vehicle;
[0100] Calculate the product of the y-axis coordinate of each line and the width of the screen resolution to obtain a third value corresponding to each line;
[0101] Obtain the x-axis coordinate of each pixel point included between the starting x-axis coordinate and the ending x-axis coordinate of each line;
[0102] Calculate the sum of the third value corresponding to each line and the x-axis coordinate of each pixel point corresponding to each line to obtain the pixel point position corresponding to each line;
[0103] Integrate the pixel point positions corresponding to each line to obtain the pixel point position of each pixel point in the target image to be processed.
[0104] For example: Each pixel point position can be expressed as follows: i = y * w + x. Where, i is the pixel point position, y is the y-axis coordinate of the line, w is the width of the screen resolution, and x is the x-axis coordinate of each pixel point included between the starting x-axis coordinate and the ending x-axis coordinate of the line.
[0105] S15, perform RGB assignment on the pixel points corresponding to each pixel point position to obtain the color value of each pixel point.
[0106] In this embodiment, the performing RGB assignment on the pixel points corresponding to each pixel point position to obtain the color value of each pixel point includes:
[0107] Perform RGB assignment on the pixel points corresponding to each pixel point position according to the original color distribution of each initial reverse trajectory image to obtain the color value of each pixel point.
[0108] For example: The color value of each pixel point can be expressed as follows: B[i] = R. Where, B[i] represents the i-th pixel point, and R represents the RGB value.
[0109] S16, perform image drawing according to each pixel point position and the color value of each pixel point to obtain the target reverse trajectory image.
[0110] In this embodiment, performing image drawing according to each pixel point position and the color value of each pixel point can convert the stored reverse trajectory line data into a reverse trajectory image to assist in quick reverse.
[0111] In this embodiment, after obtaining the target reverse trajectory image, the method further includes:
[0112] Display the target reverse trajectory image on the display screen of the target vehicle;
[0113] Real-time monitor the actual reverse trajectory of the target vehicle;
[0114] When the actual reverse trajectory of the target vehicle deviates from the target reverse trajectory picture, a warning prompt is issued.
[0115] Through the above embodiments, it is possible to monitor the actual reverse process according to the generated target reverse trajectory picture, and give a timely warning prompt when deviating from the reverse trajectory, reducing the error rate of reversing and improving driving safety.
[0116] It can be seen from the above technical solutions that the present invention can convert the reverse trajectory picture from pixel point data into line data and then store it, reducing the occupied space of the data, solving the problem of insufficient storage space of the car machine. When actually reversing, the steering wheel angle is used to match the target picture to be processed from the stored data, mark the pixel point positions and assign RGB values to the target picture to be processed, and draw it into a target reverse trajectory picture, with less dependence on resources and the environment, enabling the reverse trajectory to be quickly displayed under the condition restrictions at the initial stage of starting the car machine system to assist in quick reversing.
[0117] As Figure 2 shown, it is a functional module diagram of a preferred embodiment of the reverse trajectory line generation device of the present invention. The reverse trajectory line generation device 11 includes an acquisition unit 110, a conversion unit 111, a matching unit 112, a determination unit 113, an assignment unit 114, and a drawing unit 115. The modules / units referred to in the present invention refer to a series of computer program segments that can be executed by a processor and can complete fixed functions, and are stored in a memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0118] The acquisition unit 110 is used to acquire a set of pre-calibrated initial reverse trajectory pictures.
[0119] In this embodiment, each initial reverse trajectory picture in the set of initial reverse trajectory pictures corresponds to a vehicle angle.
[0120] Among them, the vehicle angle refers to the steering wheel angle of the vehicle.
[0121] In this embodiment, the set of initial reverse trajectory pictures may include reverse trajectory pictures at various reverse angles.
[0122] The conversion unit 111 is used to convert the pixel point data of each initial reverse trajectory picture in the set of initial reverse trajectory pictures into line data, obtain a set of pictures to be processed, and store the set of pictures to be processed in the car machine system.
[0123] In this embodiment, the conversion unit 111 converts the pixel point data of each initial reverse trajectory picture in the set of initial reverse trajectory pictures into line data, and obtaining a set of pictures to be processed includes:
[0124] Obtain the starting point of each initial reverse trajectory picture and obtain a preset valid color;
[0125] Start from the starting point of each initial reverse trajectory picture and perform point-by-point scanning on each initial reverse trajectory picture;
[0126] During the scanning process, when a first pixel point with the preset valid color is scanned, determine the starting point x-axis coordinate of the first pixel point. Until a second pixel point without the preset valid color is scanned, determine the ending point x-axis coordinate of the second pixel point, and obtain the current y-axis coordinate. Generate a line according to the starting point x-axis coordinate, the ending point x-axis coordinate, and the y-axis coordinate;
[0127] Integrate each line obtained by scanning as the line data of each initial reverse trajectory picture, and generate each picture to be processed according to the line data of each initial reverse trajectory picture;
[0128] Classify the pictures to be processed into two categories according to whether the vehicle turning angle is left or right, and establish a serial number for each picture to be processed in ascending order of the turning angle in each type;
[0129] Construct the set of pictures to be processed according to the serial numbers of each picture to be processed.
[0130] Among them, the preset valid color can be configured according to actual needs, such as yellow, red, etc.
[0131] For example: Start point-by-point scanning from the starting point of each initial reverse trajectory picture. When encountering a point with the preset valid color (based on the RGB (Red Green Blue) value of the pixel point), record the starting point x-axis coordinate. Until encountering a non-valid color, record the ending point x-axis coordinate, and then record the current y-axis coordinate. Combine these three data to form the starting point x-axis coordinate, the ending point x-axis coordinate, and the y-axis coordinate of a line, and gather them into the data set of this picture. Express it with the formula as follows: l n ={x s ,x e ,y}, D n ={l1, l2, l3,... l n}, where l n represents the nth line scanned, D n represents the data set of the nth trajectory picture, and D n must be arranged in ascending order from the minimum turning angle to the maximum turning angle, divided into two types: left turn and right turn, each accounting for half of all trajectory pictures.
[0132] Through the above embodiments, the original pixel point data can be converted into line data for storage, and the occupied storage space is relatively small.
[0133] The obtaining unit 110 is further configured to obtain the steering angle of the target vehicle in response to a reverse instruction triggered by the target vehicle.
[0134] In this embodiment, the reverse instruction may be triggered by the driver of the target vehicle or automatically triggered when reverse is detected. The present invention does not limit this.
[0135] In this embodiment, the steering angle of the steering wheel of the target vehicle is obtained as the steering angle of the target vehicle.
[0136] The matching unit 112 is configured to perform matching in the set of to-be-processed pictures stored in the in-vehicle system according to the steering angle of the target vehicle, so as to obtain a target to-be-processed picture.
[0137] In this embodiment, the matching unit 112 performing matching in the set of to-be-processed pictures stored in the in-vehicle system according to the steering angle of the target vehicle to obtain a target to-be-processed picture includes:
[0138] Obtain the maximum steering angle of the steering wheel of the target vehicle;
[0139] Calculate the quotient of the steering angle of the target vehicle and the maximum steering angle of the steering wheel to obtain a first value;
[0140] Obtain the total number of all to-be-processed pictures in the set of to-be-processed pictures;
[0141] Calculate the quotient of the total number and 2 to obtain a second value;
[0142] Calculate the product of the first value and the second value to obtain a target serial number;
[0143] Match and obtain the target to-be-processed picture from the set of to-be-processed pictures according to the target serial number.
[0144] For example: after entering reverse, the following formula is used to determine the target serial number:
[0145]
[0146] Wherein, T represents the steering angle of the target vehicle, T m represents the maximum steering angle of the steering wheel, N represents the total number of all to-be-processed pictures in the set of to-be-processed pictures (including half for left turn and half for right turn), that is, the steering angle is evenly divided into N / 2 parts.
[0147] Further, match in the set of to-be-processed pictures according to the obtained target serial number to obtain the target to-be-processed picture.
[0148] The determining unit 113 is configured to determine the position of each pixel point in the target image to be processed.
[0149] In this embodiment, the determining unit 113 determines the position of each pixel point in the target image to be processed, including:
[0150] Obtain the starting x-axis coordinate, the ending x-axis coordinate, and the y-axis coordinate of each line in the target image to be processed;
[0151] Obtain the screen resolution width of the target vehicle;
[0152] Calculate the product of the y-axis coordinate of each line and the screen resolution width to obtain a third value corresponding to each line;
[0153] Obtain the x-axis coordinate of each pixel point included between the starting x-axis coordinate and the ending x-axis coordinate of each line;
[0154] Calculate the sum of the third value corresponding to each line and the x-axis coordinate of each pixel point corresponding to each line to obtain the pixel point position corresponding to each line;
[0155] Integrate the pixel point positions corresponding to each line to obtain the position of each pixel point in the target image to be processed.
[0156] For example: The position of each pixel point can be expressed as follows: i = y * w + x. Where i is the pixel point position, y is the y-axis coordinate of the line, w is the screen resolution width, and x is the x-axis coordinate of each pixel point included between the starting x-axis coordinate and the ending x-axis coordinate of the line.
[0157] The assignment unit 114 is configured to perform RGB assignment on the pixel points corresponding to each pixel point position to obtain the color value of each pixel point.
[0158] In this embodiment, the assignment unit 114 performs RGB assignment on the pixel points corresponding to each pixel point position to obtain the color value of each pixel point, including:
[0159] Perform RGB assignment on the pixel points corresponding to each pixel point position according to the original color distribution of each initial reverse trajectory image to obtain the color value of each pixel point.
[0160] For example: The color value of each pixel point can be expressed as follows: B[i] = R. Where B[i] represents the i-th pixel point and R represents the RGB value.
[0161] The drawing unit 115 is configured to perform image drawing according to each pixel point position and the color value of each pixel point to obtain the target reverse trajectory image.
[0162] In this embodiment, by performing image drawing based on the position of each pixel and the color value of each pixel, the stored reverse trajectory line data can be converted into a reverse trajectory picture to assist in quick reverse parking.
[0163] In this embodiment, after obtaining the target reverse trajectory picture, the target reverse trajectory picture is displayed on the display screen of the target vehicle.
[0164] The actual reverse trajectory of the target vehicle is monitored in real time.
[0165] When the actual reverse trajectory of the target vehicle deviates from the target reverse trajectory picture, a warning prompt is issued.
[0166] Through the above embodiments, the actual reverse parking process can be monitored based on the generated target reverse trajectory picture, and a timely warning prompt can be given when deviating from the reverse trajectory, reducing the error rate of reverse parking and improving driving safety.
[0167] It can be seen from the above technical solutions that the present invention can convert the reverse trajectory picture from pixel point data into line data and then store it, reducing the occupied space of the data, solving the problem of insufficient storage space of the car machine. During actual reverse parking, the steering wheel angle is used to match the target picture to be processed from the stored data, perform pixel point position marking and RGB assignment on the target picture to be processed, and draw it into the target reverse trajectory picture, with less dependence on resources and the environment, enabling the reverse trajectory to be quickly displayed under the condition restrictions at the initial stage of starting the car machine system to assist in quick reverse parking.
[0168] As Figure 3 shown, it is a schematic structural diagram of a computer device of a preferred embodiment for implementing the reverse trajectory line generation method of the present invention.
[0169] The computer device 1 may include a memory 12, a processor 13, and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a reverse trajectory line generation program.
[0170] Those skilled in the art can understand that the schematic diagram is only an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 can be either a bus structure or a star structure. The computer device 1 may also include more or fewer other hardware or software than shown, or different component arrangements. For example, the computer device 1 may also include input and output devices, network access devices, etc.
[0171] It should be noted that the computer device 1 is only an example, and other existing or future possible electronic products adaptable to the present invention should also be included in the protection scope of the present invention and be included herein by reference.
[0172] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disc, etc. In some embodiments, the memory 12 may be an internal storage unit of the computer device 1, such as the mobile hard disk of the computer device 1. In some other embodiments, the memory 12 may also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the computer device 1. Further, the memory 12 may also include both the internal storage unit and the external storage device of the computer device 1. The memory 12 can be used not only to store the application software installed in the computer device 1 and various types of data, such as the code of the reverse trajectory line generation program, etc., but also to temporarily store the data that has been output or will be output.
[0173] In some embodiments, the processor 13 may be composed of integrated circuits. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including the combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 13 is the control core (Control Unit) of the computer device 1, connecting all components of the entire computer device 1 through various interfaces and lines. By running or executing the programs or modules stored in the memory 12 (such as executing the reverse trajectory line generation program, etc.), and by calling the data stored in the memory 12, it executes various functions of the computer device 1 and processes data.
[0174] The processor 13 executes the operating system of the computer device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in the above-mentioned various embodiments of the reverse trajectory line generation method, such as Figure 1 the steps shown.
[0175] Exemplarily, the computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 12 and executed by the processor 13 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into an acquisition unit 110, a conversion unit 111, a matching unit 112, a determination unit 113, an assignment unit 114, and a drawing unit 115.
[0176] The integrated units implemented in the form of software function modules as described above may be stored in a computer-readable storage medium. The above-mentioned software function modules stored in a storage medium include several instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of the reverse trajectory line generation method according to each embodiment of the present invention.
[0177] If the modules / units integrated in the computer device 1 are implemented in the form of software function units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it may also be completed by a computer program instructing relevant hardware devices. The computer program may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned various method embodiments may be implemented.
[0178] Among them, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory, etc.
[0179] Furthermore, the computer-readable storage medium mainly includes a storage program area and a storage data area. Among them, the storage program area may store an operating system, application programs required for at least one function, etc.; the storage data area may store data created according to the use of the blockchain node, etc.
[0180] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, in essence, is a decentralized database, a series of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer, etc.
[0181] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a straight line is used to represent it in Figure 3 However, it does not mean that there is only one bus or one type of bus. The bus is set to achieve the connection and communication between the memory 12 and at least one processor 13, etc.
[0182] Although not shown, the computer device 1 may further include a power supply (such as a battery) for powering each component. Preferably, the power supply can be logically connected to the at least one processor 13 through a power management device, so as to realize functions such as charge management, discharge management, and power consumption management through the power management device. The power supply may further include any components such as one or more DC or AC power supplies, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The computer device 1 may further include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0183] Furthermore, the computer device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device 1 and other computer devices.
[0184] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the computer device 1 and to display a visual user interface.
[0185] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.
[0186] Figure 3 Only the computer device 1 with components 12-13 is shown. Those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the computer device 1, and it may include fewer or more components than shown, or combine some components, or have different component arrangements.
[0187] Combined with Figure 1 , the memory 12 in the computer device 1 stores a plurality of instructions to implement a reverse trajectory line generation method, and the processor 13 can execute the plurality of instructions to achieve:
[0188] Obtain a pre-calibrated set of initial reverse trajectory pictures;
[0189] Convert the pixel point data of each initial reverse trajectory picture in the set of initial reverse trajectory pictures into line data to obtain a set of pictures to be processed, and store the set of pictures to be processed in the vehicle-mounted system;
[0190] In response to a reverse instruction triggered by the target vehicle, obtain the steering angle of the target vehicle;
[0191] Match according to the steering angle of the target vehicle in the set of pictures to be processed stored in the vehicle-mounted system to obtain a target picture to be processed;
[0192] Determine the position of each pixel point in the target picture to be processed;
[0193] Assign RGB values to the corresponding pixel points at each pixel point position to obtain the color value of each pixel point;
[0194] Perform image drawing according to each pixel point position and the color value of each pixel point to obtain a target reverse trajectory picture.
[0195] Specifically, for the specific implementation method of the above instructions by the processor 13, reference may be made to Figure 1 the description of the relevant steps in the corresponding embodiments, which will not be elaborated here.
[0196] It should be noted that all the data involved in this case are legally obtained.
[0197] In several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.
[0198] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0199] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] In addition, in each embodiment of the present invention, the functional modules can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware, or in the form of a combination of hardware and software function modules.
[0201] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.
[0202] Therefore, in any aspect, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced by the present invention. Any reference signs in the claims should not be construed as limiting the claims concerned.
[0203] In addition, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of elements or devices described in the present invention can also be implemented by one element or device through software or hardware. The terms "first", "second", etc. are used to denote names and do not denote any particular order.
[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for generating a reverse trajectory line, characterized in that, The method for generating the reverse trajectory line includes: Obtain a set of pre-calibrated initial reverse trajectory pictures; Convert the pixel point data of each initial reverse trajectory picture in the set of initial reverse trajectory pictures into line data to obtain a set of pictures to be processed, and store the set of pictures to be processed in the vehicle-mounted system; wherein, the converting the pixel point data of each initial reverse trajectory picture in the set of initial reverse trajectory pictures into line data to obtain a set of pictures to be processed includes: obtaining the starting point of each initial reverse trajectory picture and obtaining a preset effective color; performing point-by-point scanning on each initial reverse trajectory picture starting from the starting point of each initial reverse trajectory picture; during the scanning process, when a first pixel point with the preset effective color is scanned, determining the x-axis coordinate of the starting point of the first pixel point, and until a second pixel point without the preset effective color is scanned, determining the x-axis coordinate of the ending point of the second pixel point, and obtaining the current y-axis coordinate, generating a line according to the starting point x-axis coordinate, the ending point x-axis coordinate and the y-axis coordinate; integrating each line obtained by scanning as the line data of each initial reverse trajectory picture, and generating each picture to be processed according to the line data of each initial reverse trajectory picture; dividing the pictures to be processed into two categories according to whether the vehicle turns left or right, and numbering each picture to be processed in ascending order of the turning angle in each category; constructing the set of pictures to be processed according to the numbers of each picture to be processed; In response to a reverse instruction triggered by the target vehicle, obtain the turning angle of the target vehicle; Match according to the turning angle of the target vehicle in the set of pictures to be processed stored in the vehicle-mounted system to obtain a target picture to be processed, including: obtaining the maximum turning angle of the steering wheel of the target vehicle; calculating the quotient of the turning angle of the target vehicle and the maximum turning angle of the steering wheel to obtain a first value; obtaining the total number of all pictures to be processed in the set of pictures to be processed; calculating the quotient of the total number and 2 to obtain a second value; calculating the product of the first value and the second value to obtain a target number; matching the target picture to be processed from the set of pictures to be processed according to the target number; Determine the position of each pixel point in the target picture to be processed; Perform RGB assignment on the pixel points corresponding to each pixel point position to obtain the color value of each pixel point; Perform image drawing according to each pixel point position and the color value of each pixel point to obtain a target reverse trajectory picture.
2. The method for generating a reverse trajectory line according to claim 1, wherein: Each initial reverse trajectory picture in the set of initial reverse trajectory pictures corresponds to a vehicle turning angle.
3. The method for generating a reverse trajectory line according to claim 1, wherein, The determining the position of each pixel point in the target picture to be processed includes: Obtain the starting point x-axis coordinate, the ending point x-axis coordinate and the y-axis coordinate of each line in the target picture to be processed; Obtain the screen resolution width of the target vehicle; Calculate the product of the y-axis coordinate of each line and the screen resolution width to obtain a third value corresponding to each line; Obtain the x-axis coordinates of each pixel point included between the starting x-axis coordinate and the ending x-axis coordinate of each line; Calculate the sum of the third value corresponding to each line and the x-axis coordinate of each pixel point corresponding to each line to obtain the pixel point positions corresponding to each line; Integrate the pixel point positions corresponding to each line to obtain the pixel point positions of each pixel point in the target image to be processed.
4. The method for generating a reverse trajectory line according to claim 1, wherein, The RGB assignment to the pixel points corresponding to each pixel point position to obtain the color values of each pixel point includes: Perform RGB assignment to the pixel points corresponding to each pixel point position according to the original color distribution of each initial reverse trajectory image to obtain the color values of each pixel point.
5. The method for generating a reverse trajectory line according to claim 1, wherein, After obtaining the target reverse trajectory image, the method further includes: Display the target reverse trajectory image on the display screen of the target vehicle; Real-time monitor the actual reverse trajectory of the target vehicle; When the actual reverse trajectory of the target vehicle deviates from the target reverse trajectory image, issue a warning prompt.
6. A reverse trajectory line generation device, characterized in that, The reverse trajectory line generation device includes: An acquisition unit for acquiring a set of pre-calibrated initial reverse trajectory images; A conversion unit for converting the pixel point data of each initial reverse trajectory image in the set of initial reverse trajectory images into line data to obtain a set of images to be processed, and storing the set of images to be processed in the vehicle-mounted system; wherein, the conversion of the pixel point data of each initial reverse trajectory image in the set of initial reverse trajectory images into line data to obtain a set of images to be processed includes: obtaining the starting point of each initial reverse trajectory image and obtaining a preset valid color; performing point-by-point scanning of each initial reverse trajectory image starting from the starting point of each initial reverse trajectory image; during the scanning process, when a first pixel point with the preset valid color is scanned, determining the first pixel point as the starting x-axis coordinate, until a second pixel point without the preset valid color is scanned, determining the second pixel point as the ending x-axis coordinate, and obtaining the current y-axis coordinate, generating a line according to the starting x-axis coordinate, the ending x-axis coordinate and the y-axis coordinate; integrating each line obtained by scanning as the line data of each initial reverse trajectory image, and generating each image to be processed according to the line data of each initial reverse trajectory image; classifying the images to be processed into two categories according to whether the vehicle turns left or right, and establishing a serial number for each image to be processed in ascending order of the turning angle in each category; constructing the set of images to be processed according to the serial numbers of each image to be processed; The acquisition unit is further configured to obtain the turning angle of the target vehicle in response to a reverse instruction triggered by the target vehicle; A matching unit, configured to match in the set of to-be-processed pictures stored in the in-vehicle system according to the steering angle of the target vehicle to obtain a target to-be-processed picture, including: obtaining the maximum steering angle of the steering wheel of the target vehicle; calculating a quotient of the steering angle of the target vehicle and the maximum steering angle of the steering wheel to obtain a first value; obtaining the total number of all to-be-processed pictures in the set of to-be-processed pictures; calculating a quotient of the total number and 2 to obtain a second value; calculating a product of the first value and the second value to obtain a target serial number; matching and obtaining the target to-be-processed picture from the set of to-be-processed pictures according to the target serial number; A determining unit, configured to determine the position of each pixel point in the target to-be-processed picture; An assignment unit, configured to perform RGB assignment on the corresponding pixel points at each pixel point position to obtain the color value of each pixel point; A drawing unit, configured to perform image drawing according to each pixel point position and the color value of each pixel point to obtain a target reverse trajectory picture.
7. A computer device, characterized in that, The computer device includes: A memory, storing at least one instruction; and A processor, configured to execute the instruction stored in the memory to implement the reverse trajectory line generation method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: At least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in the computer device to implement the reverse trajectory line generation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Reversing trajectory calibration method and system
CN114820818A
Vehicle perimeter monitoring device
US20130004021A1