Reversing image generation method, system and related device
By obtaining the angle angle of the vehicle and the actual reversing image, and obtaining auxiliary line information in memory, the problem of limited resources in the vehicle system during the rapid reversing stage is solved, and the effect of quickly generating reversing images containing reversing auxiliary lines is achieved.
Patent Information
- Application Number
- CN202411731590.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-18
AI Technical Summary
During the rapid reversing stage, the system resources of the on-board system are limited and it is impossible to quickly provide reversing images.
By obtaining the angle angle of the vehicle and the actual reversing image, the auxiliary line information is obtained from the memory according to the angle angle, including the pixel position and color information of the reversing auxiliary line, and superimposing this information on the actual reversing image to generate the target reversing image.
With limited system resources, it is possible to quickly generate reversing images containing reversing assist lines to help drivers reverse safely.
Smart Images

Figure CN119636585A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of reversing image technology, and in particular to a reversing image generation method, system and related devices. Background Art
[0002] Reversing assist lines can help drivers more intuitively judge the distance to obstacles, thereby effectively reducing the probability of accidents. Reversing assist lines are usually dynamically adjusted according to the vehicle's steering angle and movement trajectory to guide the driver to reverse safely.
[0003] Since the system resources of the vehicle system are limited during the fast reversing stage, how to perform reversing image processing under limited system resources is particularly important. Summary of the invention
[0004] The reversing image generation method, system and related devices provided in the present application can solve the problem that during the rapid reversing stage, the system resources of the vehicle system are limited and the reversing image cannot be provided quickly.
[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a reversing image generation method, which includes: in response to a reversing instruction, obtaining the turning angle of the vehicle and the actual reversing image; obtaining corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; image drawing is performed according to the auxiliary line information and the actual reversing image to obtain the target reversing image; wherein the target reversing image has a reversing auxiliary line corresponding to the auxiliary line information.
[0006] Among them, the auxiliary line information is obtained in advance in the following manner: obtaining a plurality of preset original reversing auxiliary line images; determining the target pixel point corresponding to the auxiliary line according to the ARGB value of the pixel point in each original reversing auxiliary line image; obtaining the position and ARGB value of the target pixel point, and obtaining the auxiliary line information corresponding to each original reversing auxiliary line image.
[0007] Among them, after obtaining the position and ARGB value of the target pixel point and obtaining the auxiliary line information corresponding to each original reversing auxiliary line image, it includes: storing the auxiliary line information corresponding to each original reversing auxiliary line image according to a preset format to obtain an auxiliary line information file; wherein the auxiliary line information corresponding to each original reversing auxiliary line is separated by an end mark in the auxiliary line information file.
[0008] Among them, the position and ARGB value of the target pixel are stored in 32 bits.
[0009] Among them, obtaining corresponding auxiliary line information from the memory according to the turning angle includes: obtaining a mapping relationship table from the memory; obtaining the auxiliary line information identifier corresponding to the turning angle from the mapping relationship table; and obtaining the corresponding auxiliary line information from the memory according to the auxiliary line information identifier.
[0010] The process of drawing an image based on the auxiliary line information and the actual reversing image to obtain the target reversing image includes: superimposing the auxiliary line information on the actual reversing image to obtain the target reversing image.
[0011] To solve the above technical problems, another technical solution adopted in the present application is: to provide a vehicle-mounted system, which includes: an image acquisition component for acquiring actual reversing images; a processor, coupled to the image acquisition component, for responding to a reversing instruction, obtaining the turning angle of the vehicle, and obtaining corresponding auxiliary line information from the memory according to the turning angle, and drawing an image according to the auxiliary line information and the actual reversing image to obtain a target reversing image; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary lines; a display screen, coupled to the processor, for displaying the target reversing image.
[0012] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide a reversing image generating device, which includes: a first acquisition module, used to respond to a reversing instruction and obtain the turning angle of the vehicle; a second acquisition module, used to obtain corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; an image drawing module, used to draw an image according to the auxiliary line information to obtain a target reversing image; wherein the target reversing image has a reversing auxiliary line corresponding to the auxiliary line information.
[0013] To solve the above technical problems, another technical solution adopted in the present application is: to provide a vehicle-mounted device, which includes a memory and a processor coupled to the memory, the memory stores at least one computer program, and when the at least one computer program is loaded and executed by the processor, it is used to implement the method provided by the above technical solution.
[0014] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a computer-readable storage medium / computer program product, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method provided by the above technical solution;
[0015] The computer program product includes a computer program, and when the computer program is executed by a processor, the method provided by the above technical solution is implemented.
[0016] The reversing image generation method, system and related devices provided in the present application obtain the turning angle of the vehicle and the actual reversing image when receiving a reversing command; obtain the corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary lines; draw an image according to the auxiliary line information and the actual reversing image to obtain the target reversing image; wherein the target reversing image has reversing auxiliary lines corresponding to the auxiliary line information, thereby solving the problem that in the fast reversing stage, the system resources of the vehicle system are limited and the reversing image cannot be provided quickly. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0018] Figure 1 It is a flowchart of an embodiment of a method for generating a reversing image in the present application;
[0019] Figure 2 It is a flowchart of an embodiment of obtaining auxiliary line information in the present application;
[0020] Figure 3 It is a schematic diagram of the storage format of auxiliary line information in this application;
[0021] Figure 4 is a flowchart of another embodiment of the method for generating a reversing image in the present application;
[0022] Figure 5 It is a structural schematic diagram of an embodiment of the vehicle-mounted system in the present application;
[0023] Figure 6 It is a structural schematic diagram of an embodiment of a reversing image generating device in the present application;
[0024] Figure 7 It is a structural schematic diagram of an embodiment of the vehicle-mounted device in this application;
[0025] Figure 8 It is a schematic diagram of the structure of an embodiment of a computer-readable storage medium in the present application;
[0026] Fig. 9 It is a structural diagram of an embodiment of a computer program product in the present application. DETAILED DESCRIPTION
[0027] Explanation of the words that may appear in the following text:
[0028] Small core: refers to ARM9 or R5F series processors. ARM9: Belongs to the ARMv4T or ARMv5TE series in the ARM architecture. It is a general-purpose 32-bit processor architecture that is mainly used to efficiently perform general computing tasks, with good performance and low power consumption. R5F: Belongs to the ARMv7-R architecture. The Cortex-R series processors are mainly designed for real-time control applications and have hard real-time performance. Although their performance is limited compared to modern processors, their low power consumption, high reliability and simple design make them still valuable in the embedded field that requires low cost and low complexity.
[0029] Big core: ARM Cortex TM -A series processors are high-performance application processors designed by ARM, mainly for devices with high computing requirements such as smartphones, tablets, digital TVs, automotive electronics, servers, the Internet of Things and embedded systems. The Cortex-A series processors achieve a good balance between computing performance, energy efficiency and flexibility.
[0030] SoC (System on a Chip) is a technology that integrates various functions into a single chip. SoC usually contains a processor (CPU), memory, input / output interface, graphics processor (GPU) and other peripherals, all of which are integrated on a single chip. This integration gives SoC significant advantages in performance, power consumption, size and cost, and is widely used in smart phones, tablets, IoT devices, automotive electronics and embedded systems.
[0031] MCU (Microcontroller Unit) is a single-chip system that integrates multiple functions such as processor (CPU), memory (RAM and ROM), input / output interface (I / O), timer, ADC (analog-to-digital converter), etc., and is designed for embedded control applications. Compared with complex SoC, MCU is more focused on performing specific tasks and is often used in low-power, low-cost, real-time response applications such as home appliances, automotive electronics, industrial control and IoT devices.
[0032] ISP (Image Signal Processor) is a dedicated hardware module for processing raw data captured from image sensors. ISP is mainly used in cameras, smartphones, car cameras, monitoring systems and other devices, responsible for processing raw image signals to generate high-quality images or videos. ISP can perform complex image processing in real time, and its power consumption and efficiency are higher than general-purpose processors (such as CPU, GPU).
[0033] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0034] Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0035] Reversing assist lines can help drivers more intuitively judge the distance to obstacles, thereby effectively reducing the probability of accidents. Reversing assist lines are usually dynamically adjusted according to the vehicle's steering angle and movement trajectory to guide the driver to reverse safely.
[0036] Since the system resources of the vehicle system are limited during the fast reversing stage, how to perform reversing image processing under limited system resources is particularly important.
[0037] Based on this, the present application proposes to obtain the turning angle of the vehicle and the actual reversing image when receiving a reversing command; obtain the corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; perform image drawing according to the auxiliary line information and the actual reversing image to obtain the target reversing image; wherein the target reversing image has a reversing auxiliary line corresponding to the auxiliary line information, thereby solving the problem that the system resources of the vehicle system are limited and the reversing image cannot be provided quickly during the fast reversing stage. Please refer to any of the following embodiments for details.
[0038] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a method for generating a reversing image in the present application. The method for generating a reversing image includes:
[0039] Step 11: In response to the reversing instruction, the turning angle of the vehicle and the actual reversing image are acquired.
[0040] During the rapid reversing phase, a reversing command may be generated by a corresponding control mechanism of the vehicle.
[0041] The fast reverse phase may correspond to the phase when the vehicle has just started and the vehicle system has not yet been fully activated, that is, at this time, the system resources of the vehicle system are limited.
[0042] The vehicle's steering angle can be generated by angle sensors on the steering wheel or wheels.
[0043] The actual reversing image can be collected by the image acquisition component. At this time, the actual reversing image collected by the image acquisition component has not yet been displayed on the display interface of the vehicle-mounted system.
[0044] Step 12: Obtain corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line.
[0045] In some embodiments, auxiliary line information may be extracted from a number of original reversing auxiliary line images in advance, and then in the fast reversing stage, only the auxiliary line information is loaded into the memory, thereby reducing the occupation of memory space.
[0046] In some embodiments, the color information may include information such as color and transparency.
[0047] Step 13: Perform image drawing according to the auxiliary line information and the actual reversing image to obtain a target reversing image; wherein the target reversing image has reversing auxiliary lines corresponding to the auxiliary line information.
[0048] In some embodiments, auxiliary line information is superimposed on the actual reversing image to obtain a target reversing image.
[0049] For example, the pixels in the auxiliary line information can be mapped to the actual reversing image to obtain the actual pixels in the auxiliary line information in the actual reversing image. Then, the color of the actual pixel is adjusted to the color of the pixel in the auxiliary line information to obtain the target reversing image.
[0050] It is then displayed on the display interface to assist the driver in completing reversing.
[0051] In this embodiment, when a reversing command is received, the turning angle of the vehicle and the actual reversing image are obtained; the corresponding auxiliary line information is obtained from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary lines; the image is drawn according to the auxiliary line information and the actual reversing image to obtain the target reversing image; wherein the target reversing image has reversing auxiliary lines corresponding to the auxiliary line information, thereby solving the problem that in the fast reversing stage, the system resources of the vehicle system are limited and the reversing image cannot be provided quickly.
[0052] See also Figure 2 , the auxiliary line information is obtained in advance in the following way:
[0053] Step 21: Obtain a plurality of preset original reversing auxiliary line images.
[0054] Step 22: Determine the target pixel point corresponding to the auxiliary line according to the ARGB value of the pixel point in each original reversing auxiliary line image.
[0055] In some embodiments, there are usually three types of auxiliary lines, the first type is a red auxiliary line, the second type is a yellow auxiliary line, and the third type is a green auxiliary line. Therefore, auxiliary lines of different colors correspond to different ARGB values. ARGB is a color mode, that is, an RGB color mode with an Alpha (transparency) channel added, and belongs to a 32-bit bitmap storage structure.
[0056] In some embodiments, in each original reversing auxiliary line image, except for the auxiliary line having a corresponding color, the remaining pixels are all black or white. Therefore, the target pixel corresponding to the auxiliary line can be determined based on the ARGB value of the pixel. For example, in the original reversing auxiliary line image, except for the auxiliary line having a corresponding color, the remaining pixels are all black, and the ARGB value corresponding to black is (0, 0, 0). When a pixel that is not (0, 0, 0) is detected, the pixel can be determined as the target pixel corresponding to the auxiliary line.
[0057] Step 23: Obtain the position and ARGB value of the target pixel point to obtain the auxiliary line information corresponding to each original reversing auxiliary line image.
[0058] Similarly, after determining the target pixel point, the position corresponding to the target pixel point in the original reversing auxiliary line image can be obtained. In the above manner, the auxiliary line information corresponding to each auxiliary line in each original reversing auxiliary line image can be recorded.
[0059] In some embodiments, after acquiring the position and ARGB value of the target pixel point and obtaining the auxiliary line information corresponding to each original reversing auxiliary line image, the auxiliary line information corresponding to each original reversing auxiliary line image is stored in a preset format to obtain an auxiliary line information file; wherein the auxiliary line information corresponding to each original reversing auxiliary line is separated by an end mark in the auxiliary line information file.
[0060] like Figure 3 As shown in the figure, P stands for Position, which is stored in 32 bits, with the upper 16 bits storing width and the lower 16 bits storing height; C stands for Color (ARGB value), which stores the AARGB8888 value of the corresponding pixel. After a pair of auxiliary line information is stored, it ends with 0xFFFE, marking the end of the previous auxiliary line and the beginning of the next auxiliary line. When all auxiliary line information is stored, it ends with 0xFFFF, indicating the end of all auxiliary line information. That is, the position and ARGB value of the target pixel are stored in 32 bits.
[0061] Through the above method, during the fast reversing stage, when the system resources of the vehicle system are limited, the reversing image drawing can be achieved by loading auxiliary line information with a smaller data volume into the memory.
[0062] In some embodiments, since the reversing auxiliary lines in each row are continuous pixels with the same color starting from a certain coordinate position, only the auxiliary line starting position coordinates, the number of auxiliary line pixels and the auxiliary line color in each row can be stored. The auxiliary line information file saved in this way saves more storage space.
[0063] See also Figure 4 , Figure 4 1 is a flow chart of another embodiment of the reversing image generation method in the present application. The reversing image generation method comprises:
[0064] Step 41: In response to the reversing instruction, the turning angle of the vehicle and the actual reversing image are acquired.
[0065] Step 42: Get the mapping relationship table from the memory.
[0066] In some embodiments, the mapping relationship table is constructed after the auxiliary line information is formed. For example, a one-to-one mapping relationship is established between each auxiliary line information and the reverse turning angle to generate the mapping relationship table.
[0067] Through the above method, the number of auxiliary lines can be clearly known, which is recorded as N, and a one-to-one mapping relationship is established between each auxiliary line F(i) (i=0, 2, 3...N-1) and the steering wheel angle α when reversing. Assume that the total number of reversing auxiliary lines is 109 pairs, which are recorded as F(0), F(1)...F(108) in sequence, where F(0) represents the reversing auxiliary line when there is no steering (i.e., the steering wheel angle α=0), F(1), F(2)...F(54) are the reversing left auxiliary lines corresponding to the steering wheel turning left, and F(55), F(56)...F(108) are the reversing right auxiliary lines corresponding to the steering wheel turning right.
[0068] Step 43: Obtain the auxiliary line information identifier corresponding to the corner angle from the mapping relationship table.
[0069] Step 44: Obtain corresponding auxiliary line information from the memory according to the auxiliary line information identifier; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line.
[0070] Step 45: Perform image drawing according to the auxiliary line information and the actual reversing image to obtain a target reversing image; wherein the target reversing image has reversing auxiliary lines corresponding to the auxiliary line information.
[0071] Steps 43 to 45 have the same or similar technical solutions as the other embodiments of the present application and will not be described in detail here.
[0072] In this embodiment, when a reversing command is received, the turning angle of the vehicle and the actual reversing image are obtained; a mapping relationship table is obtained from the memory, and the auxiliary line information identifier corresponding to the turning angle is obtained from the mapping relationship table. The corresponding auxiliary line information is obtained from the memory according to the auxiliary line information identifier, and an image is drawn according to the auxiliary line information and the actual reversing image to obtain the target reversing image. This solves the problem that in the fast reversing stage, the system resources of the vehicle system are limited and the reversing image cannot be provided quickly.
[0073] See also Figure 5 , Figure 5 Schematic diagram of the structure of an embodiment of the vehicle-mounted system in the present application. The vehicle-mounted system 50 includes: an image acquisition component 51, a processor 52 and a display screen 53.
[0074] The image acquisition component 51 is used to acquire the actual reversing image.
[0075] The processor 52 is coupled to the image acquisition component 51, and is used to respond to the reversing instruction, obtain the turning angle of the vehicle, and obtain the corresponding auxiliary line information from the memory according to the turning angle, and draw the image according to the auxiliary line information and the actual reversing image to obtain the target reversing image; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line.
[0076] The display screen 53 is coupled to the processor 52 and is used for displaying the target reversing image.
[0077] In some embodiments, the processor 52 is also used to obtain auxiliary line information in advance in the following manner: obtain a plurality of preset original reversing auxiliary line images; determine the target pixel point corresponding to the auxiliary line based on the ARGB value of the pixel point in each original reversing auxiliary line image; obtain the position and ARGB value of the target pixel point to obtain the auxiliary line information corresponding to each original reversing auxiliary line image.
[0078] In some embodiments, after acquiring the position and ARGB value of the target pixel point and obtaining the auxiliary line information corresponding to each original reversing auxiliary line image, the processor 52 is further used to store the auxiliary line information corresponding to each original reversing auxiliary line image in a preset format to obtain an auxiliary line information file; wherein the auxiliary line information corresponding to each original reversing auxiliary line is separated by an end mark in the auxiliary line information file.
[0079] In some embodiments, the position and ARGB value of the target pixel are stored using 32 bits.
[0080] In some embodiments, the processor 52 is further used to obtain a mapping relationship table from the memory; obtain the auxiliary line information identifier corresponding to the turning angle from the mapping relationship table; and obtain the corresponding auxiliary line information from the memory according to the auxiliary line information identifier.
[0081] In some embodiments, the processor 52 is further configured to superimpose auxiliary line information on the actual reversing image to obtain a target reversing image.
[0082] In some embodiments, the image acquisition component 51, the processor 52 and the display screen 53 cooperate to implement the method of any of the above embodiments.
[0083] In one application scenario, the vehicle system uses the Android operating system. Since the fast reversing is running in the small core, the small core runs the little kernel system, which does not support the file system, does not support decoding, cannot run the opencv library, and cannot run the algorithm. Therefore, in the small core, it is not possible to use the opencv library for calibration, generate the calibration coordinate position in real time, and then use the algorithm to dynamically draw auxiliary lines as in the large core running the Android environment. In order to enable the small core to support the dynamic auxiliary line function during the fast reversing stage, the following solution is designed:
[0084] First, the auxiliary line coordinate position and the corresponding ARGB value are generated according to the original reversing auxiliary line image. For example, the auxiliary line information can be extracted from the preset original reversing auxiliary line image using corresponding processing tools.
[0085] Because in the original reversing auxiliary line image, except for the line information, everything else is black, the extraction method that can be used is: determine whether the ARGB value of the pixel is 0. If it is 0, it means that this pixel does not contain auxiliary line information; if it is not 0, it means that this pixel contains auxiliary line information, and then store the corresponding coordinate position and ARGB value in the auxiliary line information file, and package this auxiliary line information file into the image.
[0086] When the loading system runs the little kernel, the file storing the auxiliary line information can be loaded into the memory, and then the reversing service program running in the little kernel reads and parses the auxiliary line information, and establishes a one-to-one mapping relationship between the turning angle and the auxiliary line.
[0087] After the reversing service is started, the reversing service program keeps checking whether there is a reversing signal. If no reversing signal is detected, it sleeps for a preset time, such as 20ms, and continues to detect the reversing signal. If a reversing signal is detected, the following two operations are performed in parallel: the mipi path hardware is turned on to collect the reversing image data, and the steering wheel angle is obtained at the same time. The corresponding auxiliary line information is obtained according to the table lookup according to the angle, and then the reversing auxiliary line image is drawn point by point. Finally, the original reversing image and the auxiliary line image are sent to the display screen, and the pixel alpha fusion is performed through the overlay module of the display screen, and the fusion is sent to the display screen for display.
[0088] The steering wheel angle is obtained from the MCU through the SPI interface (Serial Peripheral Interface). When the steering wheel angle changes, the SPI will receive the corresponding angle data. The MCU communicates with the small core through SPI. When the steering wheel angle changes, the data will be synchronized to the small core. The small core uses a blocking method to obtain data from the MCU through the SPI interface and analyzes the validity of the data. When a reversing signal is detected, the reversing service program in the small core will initialize the Mipi path hardware, collect reversing image data through the camera, and then transmit it to the small core through the mipi csi interface. Finally, it is written to DRAM (memory) through the ISP module in the small core.
[0089] The specific implementation steps are as follows:
[0090] Step 1: Generate auxiliary information file corresponding to the auxiliary lines.
[0091] Due to the limitations of the small core, such as not supporting decoding, file system, and algorithm, it is impossible to directly generate auxiliary line information files in real time in the small core. There are many ways to generate auxiliary line information files, such as generating auxiliary line information files through large core calibration, and tools parsing the original reversing auxiliary line image to obtain auxiliary line information files. The following uses the tool to parse the original reversing auxiliary line image to obtain the auxiliary line information file for explanation. The tool parses the PNG format image to generate the auxiliary line information file.
[0092] The PC uses the VS development tool to read the preset original reversing auxiliary line image from the specified path, and then extract the auxiliary line information from it. The extraction method is: determine whether the ARGB value of the pixel is 0. If it is 0, it means that this pixel does not contain auxiliary line information; if it is not 0, it means that this pixel contains auxiliary line information, and then store the corresponding coordinate position and ARGB value in the auxiliary line information file.
[0093] The position is stored in 32 bits, with the upper 16 bits storing width and the lower 16 bits storing height; C represents color information, storing the ARGB8888 value of the corresponding pixel. After a pair of auxiliary line information is stored, it ends with 0xFFFE, marking the end of the previous auxiliary line and the beginning of the next auxiliary line. When all auxiliary line information is stored, it ends with 0xFFFF, indicating the end of all auxiliary line information. A one-to-one mapping relationship is established between each auxiliary line information and the reversing angle, thereby realizing the function of storing auxiliary line information in a very small storage space.
[0094] Step 2: Pack the auxiliary line information into the system image.
[0095] Step 3: Load the auxiliary line information into the memory, and the reversing process parses the auxiliary line information and saves it into the local data structure.
[0096] Load the system, run the little kernel system, load the file storing the auxiliary line information into the memory, and then the reversing service program running in the little kernel parses the auxiliary line information according to the corresponding auxiliary line storage format, and then saves the parsed auxiliary line information into the local data structure.
[0097] Step 4: Establish a one-to-one mapping relationship between the auxiliary line information and the steering wheel angle.
[0098] Through step three, the number of auxiliary lines can be clearly known, denoted as N, and a one-to-one mapping relationship is established between each auxiliary line F(i) (i=0, 2, 3...N-1) and the steering wheel angle α during reversing. Assume that the total number of reversing auxiliary lines is 109 pairs, denoted as F(0), F(1)...F(108) in sequence, where F(0) represents the reversing auxiliary line when there is no steering (i.e., the steering wheel angle α=0), F(1), F(2)...F(54) are the reversing left auxiliary lines corresponding to the steering wheel turning left, and F(55), F(56)...F(108) are the reversing right auxiliary lines corresponding to the steering wheel turning right.
[0099] In some embodiments, for ease of calculation, the steering angles are mapped to integers, which can improve computational efficiency.
[0100] Step 5: Loop detection of reversing events. When there is a reversing message, collect the data of the image acquisition component and obtain the steering wheel steering angle, and look up the table to draw the corresponding reversing auxiliary line. If the reversing service program detects a reversing event, turn on the mipipath hardware, enable the camera, collect the reversing image data (reversing image) through the isp hardware module, and save the collected reversing image to the buffer of the image acquisition component; obtain the steering wheel angle from the MCU through the spi physical interface, query the one-to-one mapping relationship table established in step 4, obtain the trajectory information corresponding to the corresponding angle, and then draw the reversing auxiliary line according to the coordinate position in the trajectory information and the ARGB value of the corresponding coordinate position, and save the reversing auxiliary line image in the buffer of the UI interface. Send the buffer of the reversing image data image acquisition component and the buffer of the auxiliary line image data UI interface to the overlay module, perform pixel alpha fusion through the overlay module, obtain the frame buffer, and finally send the frame buffer to the LCD (liquid crystal display) through the 1vds interface for on-screen display. If no reversing event is detected, the mipi path and the reversing display channel are closed, and after sleeping for 100ms, the reversing event detection is continued. Frame buffer is to drive a video display device from a memory buffer containing complete frame data using a video output device.
[0101] See also Figure 6 , Figure 6 1 is a schematic diagram of a structure of an embodiment of a reversing image generating device in the present application. The reversing image generating device 60 comprises: a first acquisition module 61 , a second acquisition module 62 and an image drawing module 63 .
[0102] The first acquisition module 61 is used for acquiring the turning angle of the vehicle in response to a reverse instruction.
[0103] The second acquisition module 62 is used to acquire corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line.
[0104] The image drawing module 63 is used to draw an image according to the auxiliary line information to obtain a target reversing image; wherein the target reversing image has reversing auxiliary lines corresponding to the auxiliary line information.
[0105] In some embodiments, the second acquisition module 62 is also used to obtain auxiliary line information in advance in the following manner: obtain a number of preset original reversing auxiliary line images; determine the target pixel point corresponding to the auxiliary line based on the ARGB value of the pixel point in each original reversing auxiliary line image; obtain the position and ARGB value of the target pixel point to obtain the auxiliary line information corresponding to each original reversing auxiliary line image.
[0106] In some embodiments, after acquiring the position and ARGB value of the target pixel point and obtaining the auxiliary line information corresponding to each original reversing auxiliary line image, the second acquisition module 62 is further used to store the auxiliary line information corresponding to each original reversing auxiliary line image in a preset format to obtain an auxiliary line information file; wherein the auxiliary line information corresponding to each original reversing auxiliary line is separated by an end mark in the auxiliary line information file.
[0107] In some embodiments, the position and ARGB value of the target pixel are stored using 32 bits.
[0108] In some embodiments, the second acquisition module 62 is further used to acquire a mapping relationship table from a memory; acquire an auxiliary line information identifier corresponding to the turning angle from the mapping relationship table; and acquire corresponding auxiliary line information from the memory according to the auxiliary line information identifier.
[0109] In some embodiments, the image drawing module 63 is further used to superimpose auxiliary line information on the actual reversing image to obtain a target reversing image.
[0110] In some embodiments, the first acquisition module 61, the second acquisition module 62 and the image drawing module 63 cooperate to implement the method of any of the above embodiments.
[0111] See also Figure 7 , Figure 7 1 is a schematic diagram of the structure of an embodiment of the vehicle-mounted device in the present application. The vehicle-mounted device 70 includes a memory 71 and a processor 72 coupled to the memory 71. The memory 71 stores at least one computer program. When the at least one computer program is loaded and executed by the processor 72, it is used to implement the following method:
[0112] In response to a reversing instruction, the turning angle of the vehicle and the actual reversing image are obtained; corresponding auxiliary line information is obtained from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; image drawing is performed according to the auxiliary line information and the actual reversing image to obtain a target reversing image; wherein the target reversing image has a reversing auxiliary line corresponding to the auxiliary line information.
[0113] It can be understood that when at least one computer program is loaded and executed by the processor 72, it is also used to implement the method of any of the above embodiments.
[0114] See also Figure 8 , Figure 8 1 is a schematic diagram of a computer-readable storage medium in an embodiment of the present application. The computer-readable storage medium 80 has a computer-executable instruction 81, which is used to implement the following method when the computer-executable instruction 81 is loaded and executed by the processor:
[0115] In response to a reversing instruction, the turning angle of the vehicle and the actual reversing image are obtained; corresponding auxiliary line information is obtained from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; image drawing is performed according to the auxiliary line information and the actual reversing image to obtain a target reversing image; wherein the target reversing image has a reversing auxiliary line corresponding to the auxiliary line information.
[0116] It can be understood that when the computer execution instruction 81 is loaded and executed by the processor, it is used to implement the method of any of the above embodiments.
[0117] See also Fig. 9 , Fig. 9 1 is a schematic diagram of a structure of an embodiment of a computer program product in the present application. The computer program product 90 includes a computer program 91, and when the computer program 91 is executed by a processor, it is used to implement the following method:
[0118] In response to a reversing instruction, the turning angle of the vehicle and the actual reversing image are obtained; corresponding auxiliary line information is obtained from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; image drawing is performed according to the auxiliary line information and the actual reversing image to obtain a target reversing image; wherein the target reversing image has a reversing auxiliary line corresponding to the auxiliary line information.
[0119] It can be understood that when the computer program 91 is loaded and executed by the processor, it is used to implement the method of any of the above embodiments.
[0120] In summary, the reversing image generation method, system and related devices provided by the present application obtain the turning angle of the vehicle and the actual reversing image when receiving a reversing command; obtain the corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; draw an image according to the auxiliary line information and the actual reversing image to obtain the target reversing image; wherein the target reversing image has reversing auxiliary lines corresponding to the auxiliary line information, thereby solving the problem that in the fast reversing stage, the system resources of the vehicle system are limited and the reversing image cannot be provided quickly.
[0121] In the 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 implementation described above is only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0122] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0123] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0124] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0125] The above description is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for generating a reversing image, characterized in that: The reversing image generation method comprises: In response to a reversing instruction, obtaining a turning angle of the vehicle and an actual reversing image; Obtaining corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; An image is drawn according to the auxiliary line information and the actual reversing image to obtain a target reversing image; wherein the target reversing image has a reversing auxiliary line corresponding to the auxiliary line information.
2. The method for generating a reversing image according to claim 1, characterized in that: The auxiliary line information is obtained in advance in the following manner: Acquire a plurality of preset original reversing auxiliary line images; Determine the target pixel point corresponding to the auxiliary line according to the ARGB value of each pixel point in the original reversing auxiliary line image; The position and ARGB value of the target pixel point are obtained to obtain the auxiliary line information corresponding to each of the original reversing auxiliary line images.
3. The method for generating a reversing image according to claim 2, characterized in that: After acquiring the position and ARGB value of the target pixel point and obtaining the auxiliary line information corresponding to each of the original reversing auxiliary line images, the method includes: The auxiliary line information corresponding to each of the original reversing auxiliary line images is stored in a preset format to obtain an auxiliary line information file; wherein the auxiliary line information corresponding to each of the original reversing auxiliary lines is separated by an end mark in the auxiliary line information file.
4. The method for generating a reversing image according to claim 3, characterized in that: The position and ARGB value of the target pixel are stored in 32 bits.
5. The method for generating a reversing image according to claim 1, characterized in that: The obtaining corresponding auxiliary line information from the memory according to the turning angle includes: Get the mapping relationship table from memory; Acquire the auxiliary line information identifier corresponding to the turning angle from the mapping relationship table; The corresponding auxiliary line information is obtained from the memory according to the auxiliary line information identifier.
6. The method for generating a reversing image according to claim 1, characterized in that: The step of performing image drawing according to the auxiliary line information and the actual reversing image to obtain a target reversing image includes: The auxiliary line information is superimposed on the actual reversing image to obtain the target reversing image.
7. A vehicle-mounted system, characterized in that: The vehicle-mounted system comprises: Image acquisition component, used to acquire actual reversing images; A processor, coupled to the image acquisition component, is used to obtain the turning angle of the vehicle in response to a reversing instruction, obtain corresponding auxiliary line information from a memory according to the turning angle, and perform image drawing according to the auxiliary line information and an actual reversing image to obtain a target reversing image; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; A display screen is coupled to the processor and is used to display the target reversing image.
8. A reversing image generating device, characterized in that: The reversing image generating device comprises: A first acquisition module, for acquiring a turning angle of the vehicle in response to a reversing instruction; A second acquisition module is used to acquire corresponding auxiliary line information from the memory according to the turning angle; wherein the auxiliary line information includes the position and color information of the pixel points corresponding to the reversing auxiliary line; The image drawing module is used to draw an image according to the auxiliary line information to obtain a target reversing image; wherein the target reversing image has a reversing auxiliary line corresponding to the auxiliary line information.
9. A vehicle-mounted device, characterized in that: The vehicle-mounted device includes a memory and a processor coupled to the memory, the memory stores at least one computer program, and when the at least one computer program is loaded and executed by the processor, it is used to implement the method according to any one of claims 1 to 6.
10. A computer-readable storage medium / computer program product, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor; The computer program product comprises a computer program, which implements the method according to any one of claims 1 to 6 when executed by a processor.