Scene identification method and device, electronic equipment, vehicle and storage medium
By obtaining real-time real-life images of the vehicle, combining multi-frame information to determine the driving scene, and executing the scene switching strategy, the problem of insufficient single-frame recognition accuracy is solved, and the accuracy and user experience of driving scene recognition are improved.
Patent Information
- Application Number
- CN202410938210.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-11
AI Technical Summary
In the existing technology, the recognition accuracy of the driving scene category in a single frame is not enough, which affects the user experience.
By obtaining the real-time real-life image of the vehicle, combining the current frame and historical frames or subsequent frames, the driving scene is determined, the scene switching strategy is executed, and a multi-frame collaboration strategy is adopted to improve the recognition accuracy.
It improves the recognition accuracy of driving scene categories, enhances user experience, makes up for the static defects of single frame information, and reduces misjudgments.
Smart Images

Figure CN118762345A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a scene recognition method, device, electronic device, vehicle and storage medium. Background Art
[0002] One way for car companies to achieve intelligent driving or visual optimization is to obtain surrounding environment information in real time through the body camera, use image processing hardware to train algorithms according to specific requirements, and then improve the vehicle's perception of the surrounding environment. In the existing technology, the type of vehicle driving scene is usually identified through model training. However, the accuracy of judging the driving scene category using a single frame is not enough, which affects the user experience. Summary of the invention
[0003] In view of this, in order to solve some or all of the above technical problems, the present application provides a scene recognition method, device, electronic device, vehicle and storage medium.
[0004] In one aspect, the present invention provides a method for identifying a scene, the method comprising:
[0005] Obtain real-time real-scene images of vehicles;
[0006] Determine a first determined driving scene according to a current frame and at least one historical frame of the real scene image, or determine a second determined driving scene according to the current frame and at least one subsequent frame of the real scene image;
[0007] A scene switching strategy is executed according to the first determined driving scene or the second determined driving scene.
[0008] Optionally, before the step of determining the first actual driving scene of the current frame according to the current frame of the real scene image, the method further includes:
[0009] Acquire an initial determination driving scene of a current frame of the real scene image;
[0010] Determine a scene determination strategy corresponding to the initially determined driving scene.
[0011] The step of determining a first driving scene according to a current frame and at least one historical frame of the real scene image comprises:
[0012] Determining a first actual driving scene of the current frame according to the current frame of the real scene image;
[0013] Determining a first continuous scene number of the first actual driving scene according to a current frame and at least one historical frame of the real scene image;
[0014] The first determination driving scene is determined according to the first continuous scene number and a first scene confirmation threshold.
[0015] When the scene determination strategy is the first scene determination strategy, the step of executing the scene switching strategy according to the first determined driving scene or the second determined driving scene includes:
[0016] comparing the first continuous scene number with the first scene confirmation threshold;
[0017] If the first continuous scene number is greater than or equal to a first scene confirmation threshold, the scene switching strategy is to switch the first actual driving scene to the first determined driving scene.
[0018] The first number of consecutive scenes is obtained by the following method:
[0019] Determine whether the current frame has a previous frame;
[0020] If the judgment result is no, taking the current frame as the starting frame, and setting the first continuous scene number of the first actual driving scene of the current frame to 1;
[0021] If the judgment result is yes, and the actual driving scene category of the current frame is the same as the actual driving scene category of the previous frame, then the first continuous scene number of the first actual driving scene of the current frame is equal to the continuous scene number of the previous frame plus 1;
[0022] If the judgment result is yes, and the actual driving scene category of the current frame is different from the actual driving scene category of the previous frame, the current frame is used as the starting frame after the scene change, and the first continuous scene number of the first actual driving scene of the current frame is set to 1.
[0023] The step of determining a second driving scene according to a current frame and at least one subsequent frame of the real scene image comprises:
[0024] Determining a first actual driving scene of the current frame according to the current frame of the real scene image;
[0025] Determining a second actual driving scene of a subsequent frame according to a subsequent frame of the current frame of the real scene image;
[0026] Determining a second continuous scene number of the second actual driving scene according to a current frame and at least one subsequent frame of the real scene image;
[0027] The second determination driving scene is determined according to the second continuous scene number and the second scene confirmation threshold.
[0028] The step of executing the scene switching strategy according to the first determined driving scene or the second determined driving scene comprises:
[0029] comparing the second actual driving scenario with the first actual driving scenario;
[0030] If the second actual driving scene is different from the first actual driving scene, comparing the second continuous scene number with the second scene confirmation threshold;
[0031] If the second continuous scene number is greater than or equal to a second scene confirmation threshold, the scene switching strategy is to switch the second actual driving scene to the second determined driving scene.
[0032] The step of executing the scene switching strategy according to the first determined driving scene or the second determined driving scene comprises:
[0033] comparing the second actual driving scene with the first actual driving scene,
[0034] If the second actual driving scene is the same as the first actual driving scene, comparing the second continuous scene number with the second scene confirmation threshold;
[0035] If the second continuous scene number is greater than or equal to a second scene confirmation threshold, the scene switching strategy is to keep the first actual driving scene as the second determined driving scene.
[0036] When the scene determination strategy is the second scene determination strategy, the step of executing the scene switching strategy according to the first determined driving scene or the second determined driving scene includes:
[0037] Determining a third actual driving scene of a previous frame according to a previous frame of a current frame of the real scene image;
[0038] comparing whether the third actual driving scenario is the same as the first actual driving scenario;
[0039] If the third actual driving scene is different from the first actual driving scene, the third actual driving scene is switched to the first actual driving scene.
[0040] The second continuous scene number is obtained by the following method:
[0041] Determine whether the subsequent frame has a previous frame;
[0042] If the judgment result is no, the next frame is used as the starting frame, and the second person continuous scene number of the second actual driving scene of the next frame is set to 1;
[0043] If the judgment result is yes, and the actual driving scene category of the subsequent frame is the same as the actual driving scene category of the current frame, then the second continuous scene number of the second actual driving scene of the subsequent frame is equal to the continuous scene number of the current frame plus 1;
[0044] If the judgment result is yes, and the actual driving scene category of the subsequent frame is different from the actual driving scene category of the current frame, the subsequent frame is used as the starting frame after the scene change, and the second continuous scene number of the second actual driving scene of the subsequent frame is set to 1.
[0045] The method further comprises:
[0046] Finding a display style of the HUD system corresponding to the first determined driving scene or the second determined driving scene;
[0047] The HUD content is displayed according to the display style.
[0048] The step of searching for a display style of the HUD system corresponding to the first determined driving scene or the second determined driving scene comprises: partitioning the current frame of the real scene image to generate a partition situation; generating HUD content of each partition according to the partition situation; searching for a display style of the HUD system corresponding to the current frame of each partition;
[0049] The step of displaying the HUD content according to the display style includes: displaying the HUD content of each partition according to the display style of each partition.
[0050] In another aspect, the present invention provides a scene recognition device, the device comprising:
[0051] An acquisition unit, used for acquiring a real-time real-scene image of the vehicle;
[0052] a first determining unit, configured to determine a first determined driving scene according to a current frame and at least one historical frame of the real scene image, or
[0053] A second determination unit, configured to determine a second determination driving scene according to a current frame and at least one subsequent frame of the real scene image;
[0054] An execution unit is used to execute a scene switching strategy according to the first determined driving scene or the second determined driving scene.
[0055] On the other hand, the present invention also provides a scene recognition device, the device comprising:
[0056] A first acquisition module is used to acquire a real-time forward real scene image of the vehicle;
[0057] A second acquisition module is used to acquire a scene determination strategy corresponding to an initially determined driving scene category of the forward real scene image;
[0058] A generating module, configured to generate a determined driving scene category of a current frame of the forward real scene image according to the scene judgment strategy and the current frame of the forward real scene image and at least one frame before the current frame;
[0059] The processing module is used to perform corresponding processing according to the determined driving scene category of the current frame.
[0060] In another aspect, the present invention further provides an electronic device, comprising:
[0061] Memory for storing computer programs;
[0062] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the above method is implemented.
[0063] In another aspect, the present invention further provides a vehicle, comprising:
[0064] Memory for storing computer programs;
[0065] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the above method is implemented.
[0066] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described is implemented.
[0067] In the present application, a real-time real-scene image of a vehicle is obtained; a first determined driving scene is determined based on a current frame and at least one historical frame of the real-scene image, or a second determined driving scene is determined based on the current frame and at least one subsequent frame of the real-scene image; a scene switching strategy is executed based on the first determined driving scene or the second determined driving scene. In the present application, driving scene determination is performed based on multiple frames, so that the identification of driving scene categories is more in line with processing requirements and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0069] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0070] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0071] Figure 1 A schematic diagram of a flow chart of a scene recognition method provided in an embodiment of the present application;
[0072] Figure 2 A module diagram of a HUD display system in an application scenario of an embodiment of the present application;
[0073] Figure 3 This is a logic diagram of scene confirmation and scene anti-shake processing in the application scenario of the embodiment of the present application;
[0074] Figure 4 A logical processing diagram for setting the number of consecutive scenes in the application scenario of the embodiment of the present application;
[0075] Figure 5 This is a processing logic diagram of scene confirmation, scene switching and scene anti-shake in the application scenario of the embodiment of the present application;
[0076] Figure 6 A flowchart for identifying the tunnel entry and exit scenarios in the application scenario of the embodiment of the present application;
[0077] Figure 7 A schematic diagram of the structure of a scene recognition device for a vehicle provided in an embodiment of the present application;
[0078] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values described in these embodiments do not limit the scope of the present application.
[0080] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
[0081] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0082] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0083] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0084] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0085] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0086] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.
[0087] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0088] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0089] like Figure 1 As shown, a scene recognition method according to this embodiment is shown, and the method includes:
[0090] Step 11, obtaining a real-time real-scene image of the vehicle; the real-scene image may be a front real-scene image or other real-scene images. This step may specifically be: obtaining a real-time front real-scene image of the vehicle in real time through a front camera of the vehicle.
[0091] Step 12, determining a first driving scene based on the current frame and at least one historical frame of the real-scene image, or determining a second driving scene based on the current frame and at least one subsequent frame of the real-scene image; wherein the historical frame is one or more, preferably, the historical frame can be multiple; the subsequent frame can be one or more, preferably, the subsequent frame can be multiple.
[0092] Step 13: Execute a scene switching strategy according to the first determined driving scene or the second determined driving scene.
[0093] This embodiment adopts a single-frame and multi-frame collaborative strategy to make up for the static defects of single-frame information. A multi-frame strategy is introduced to make up for the misjudgment problem introduced by the independence of a single frame in the image recognition process through the correlation between multiple frames.
[0094] In one embodiment, before the step of determining the first actual driving scene of the current frame according to the current frame of the real scene image, the method further includes:
[0095] Acquire an initial determination driving scene of a current frame of the real scene image;
[0096] Determine the scene determination strategy corresponding to the initially determined driving scene. The scene determination strategy can be a high-latency or low-latency scene. In this step, the scene determination strategies corresponding to different initially determined driving scene categories can be pre-set according to processing requirements, so that the recognition results of the driving scene categories are more in line with actual processing requirements. The initially determined driving scene category can be obtained by identifying the current frame according to the general driving scene category. High-latency scenes are scenes with high delay tolerance, which can be some complex road environments, such as: fallen leaves, raindrops, reflections, reflections of roadside buildings, etc. near the camera. Low-latency scenes are scenes with low delay tolerance, which can be two mutually exclusive scenes with correlation, such as entering and exiting tunnels. High-latency scenes can correspond to the first scene determination strategy; low-latency scenes can correspond to the second scene determination strategy.
[0097] The following embodiments specifically describe the processing of different scene determination strategies.
[0098] In a high latency scenario, optionally, step 12 includes:
[0099] Step 121A, determining a first actual driving scene of the current frame according to the current frame of the real scene image;
[0100] Step 122A, determining a first continuous scene number of the first actual driving scene according to a current frame and at least one historical frame of the real scene image;
[0101] Step 123A: determining the first determined driving scene according to the first continuous scene number and the first scene confirmation threshold.
[0102] The above embodiments can be applied to anti-shake in high-latency scenarios, for example, scenarios where there are fallen leaves, raindrops, reflections, reflections of roadside buildings, etc. near the camera.
[0103] When the scene determination strategy is the first scene determination strategy, step 13 includes:
[0104] Step 131A, comparing the first continuous scene number with the first scene confirmation threshold;
[0105] Step 132A: if the first continuous scene number is greater than or equal to a first scene confirmation threshold, the scene switching strategy is to switch the first actual driving scene to the first determined driving scene.
[0106] In this step, the actual driving scene type of this embodiment is determined by using a general scene recognition technology to determine the single frame; the driving scene category is determined by comprehensively determining the current frame and the previous frame using a certain strategy.
[0107] In the above scenarios, for scenarios with high delay tolerance, a multi-frame anti-shake strategy is adopted. Through repeated confirmation of multiple consecutive frames (the first scene confirmation threshold), a scene judgment with high credibility is obtained, and the accuracy is improved at the expense of delay. The flicker problem caused by instantaneous scenes to users is reduced, some invalid scenes are filtered out, and the user experience is improved.
[0108] The first number of consecutive scenes is obtained according to the following steps:
[0109] Determine whether the current frame has a previous frame;
[0110] If the judgment result is no, taking the current frame as the starting frame, and setting the first continuous scene number of the first actual driving scene of the current frame to 1;
[0111] If the judgment result is yes, and the actual driving scene category of the current frame is the same as the actual driving scene category of the previous frame, then the first continuous scene number of the first actual driving scene of the current frame is equal to the continuous scene number of the previous frame plus 1;
[0112] If the judgment result is yes, and the actual driving scene category of the current frame is different from the actual driving scene category of the previous frame, the current frame is used as the starting frame after the scene change, and the first continuous scene number of the first actual driving scene of the current frame is set to 1.
[0113] The following describes the specific scenes. Scene 1: Rays of sunlight sprinkle on the asphalt road, making it look white. The electric poles at intervals on the side of the road just cast their reflections across the road, and the car is speeding between light and darkness.
[0114] The specific processing is: obtain the first continuous scene number, and then compare the first continuous scene number with the first scene confirmation threshold. If the first continuous scene number is greater than or equal to the first scene confirmation threshold, the scene is switched; otherwise, the original scene is maintained. This method can solve some instantaneous scene problems, and the instantaneous scenes that can be covered depend on the value of the first scene confirmation threshold. The larger the value of the first scene confirmation threshold, the more scenes are covered, but the delay when the scene is switched is higher; the smaller the value of the first scene confirmation threshold, the fewer scenes are covered, but the delay when the scene is switched is lower.
[0115] For a low-latency scenario, in one embodiment, step 12 includes:
[0116] Step 121B, determining a first actual driving scene of the current frame according to the current frame of the real scene image;
[0117] Step 122B, determining a second actual driving scene of a subsequent frame according to a subsequent frame of the current frame of the real scene image;
[0118] Step 123B, determining a second continuous scene number of the second actual driving scene according to the current frame and at least one subsequent frame of the real scene image;
[0119] Step 124B: determining the second determined driving scene according to the second continuous scene number and the second scene confirmation threshold.
[0120] The second number of consecutive scenes is obtained according to the following steps:
[0121] Determine whether the subsequent frame has a previous frame;
[0122] If the judgment result is no, the next frame is used as the starting frame, and the second person continuous scene number of the second actual driving scene of the next frame is set to 1;
[0123] If the judgment result is yes, and the actual driving scene category of the subsequent frame is the same as the actual driving scene category of the current frame, then the second continuous scene number of the second actual driving scene of the subsequent frame is equal to the continuous scene number of the current frame plus 1;
[0124] If the judgment result is yes, and the actual driving scene category of the subsequent frame is different from the actual driving scene category of the current frame, the subsequent frame is used as the starting frame after the scene change, and the second continuous scene number of the second actual driving scene of the subsequent frame is set to 1.
[0125] When the scene determination strategy is the second scene determination strategy, step 13 includes:
[0126] Step 131D, determining a third actual driving scene of the previous frame according to the previous frame of the current frame of the real scene image;
[0127] Step 132D, comparing whether the third actual driving scene is the same as the first actual driving scene;
[0128] Step 133D: If the third actual driving scene is different from the first actual driving scene, the third actual driving scene is switched to the first actual driving scene.
[0129] In the above embodiment, the scene switching is performed first, then it is determined whether the scene switching is wrong, and then it is determined whether to backtrack based on the determination result.
[0130] The following describes a specific embodiment of backtracking a switching error. Specifically, step 13 includes:
[0131] Step 131B, comparing the second actual driving scene with the first actual driving scene;
[0132] Step 132B: if the second actual driving scene is different from the first actual driving scene, comparing the second continuous scene number with the second scene confirmation threshold;
[0133] Step 133B: if the second continuous scene number is greater than or equal to a second scene confirmation threshold, the scene switching strategy is to switch the second actual driving scene to the second determined driving scene.
[0134] The following describes a specific embodiment of switching correctly without backtracking. Specifically, step 13 includes:
[0135] Step 131C, comparing the second actual driving scene with the first actual driving scene,
[0136] Step 132C: if the second actual driving scene is the same as the first actual driving scene, comparing the second continuous scene number with the second scene confirmation threshold;
[0137] Step 133C: if the second continuous scene number is greater than or equal to the second scene confirmation threshold, the scene switching strategy is to keep the first actual driving scene as the second determined driving scene.
[0138] The following describes the specific scenarios. Scenario 2: Entering a tunnel scenario. In the scenario of judging that the vehicle is entering a tunnel, in order to ensure the timeliness of the scene switching, when the second actual driving scenario is identified as the vehicle exiting the tunnel, the scene switching is executed. After the scene switching, the subsequent frames will be checked, and backtracking will be executed if errors are found. The exiting tunnel scenario is similar to the entering tunnel scenario.
[0139] Specifically, the second continuous scene number is obtained. If the initial driving scene is determined to be entering or exiting the tunnel, the subsequent logic is entered. Otherwise, other scene logic is followed. The in_flag field is defined to mark whether the vehicle is in the tunnel at this time: true is in the tunnel; false is outside the tunnel. When in_flag is false, it means that the vehicle is outside the tunnel at this time. If the initial driving scene of the frame is determined to be in the tunnel, it means that the frame is exactly the moment of entering the tunnel. In order to limit the operation to the first frame entering the tunnel, a flag field first_in_flag is added here. When this field is false, it means that the first frame operation has not been executed, otherwise it means that the first frame operation has been executed. After judging that first_in_flag is false, the scene will be switched immediately, and then the field will be set to true, and the first tunnel exit field first_out_flag, which is similar to it, will be set to false. If it is found that the first_in_flag field is already true, the second continuous scene number of the frame will be judged. When the second continuous scene number is greater than or equal to the second scene confirmation threshold, the in_flag field will be set to true to confirm that the vehicle is already in the tunnel, otherwise no processing will be performed.
[0140] The above is a normal tunnel entry scenario. However, if in_flag is false, it means that the vehicle is already outside the tunnel and the first tunnel entry task has been executed. However, the second actual driving scenario of the subsequent frame is outside the tunnel. In this case, the backtracking logic will be used. After the first execution of entering the tunnel, the number of second consecutive scenarios outside the tunnel that appear continuously is greater than or equal to the second scenario confirmation threshold. Only then can it be confirmed that the previous judgment of entering the tunnel is wrong and backtracking is performed. When backtracking, both first_in_flag and first_out_flag fields need to be set to false at the same time.
[0141] In the above scenarios, for scenarios with low delay tolerance, the misjudgment backtracking strategy is adopted. For scenarios that are sensitive to delay, the restrictive scene switching strategy is adopted, and the accuracy of this switch is verified based on the changes in subsequent frames. When a switching error is confirmed, backtracking is performed in a timely manner. This strategy is often used between paired, mutually exclusive, and closely related multiple scenes, otherwise the backtracking behavior will be invalid (it cannot return to a wrong starting point). In addition, for low-latency backtracking scenarios, it can be used as a low-latency means of judging scene switching to compensate for the instability caused by hardware delays and environmental changes. For example, for sunlight and rain sensors, the long link of the hardware itself and the slow response of the sensor in a dark environment will further increase the delay effect. Using the camera to obtain image frames for scene recognition, the stable and relatively low delay can largely compensate for the disadvantages of the hardware link.
[0142] In the above embodiment, the corresponding scene determination strategy is determined based on the initial determination of the driving scene category, and the final determination of the driving scene category is determined based on the current frame of the real-scene image and at least one subsequent frame before the current frame, so that the identification of the driving scene category is more in line with the processing requirements and the user experience is improved.
[0143] In addition, in a system based on image recognition and including multi-scene scheduling, this embodiment can effectively help the business layer determine the processing timing related to the scene, and can customize the processing logic according to the scene characteristics to enrich the business logic.
[0144] In one embodiment, the method further comprises:
[0145] The display style of the HUD system corresponding to the first determined driving scene or the second determined driving scene is searched; in some embodiments, the corresponding display style can also be selected according to the driving scene category and the color value of the current image at the same time.
[0146] According to the display style, the HUD content is displayed. The HUD content includes but is not limited to: navigation content, current vehicle speed, etc. The display style includes the style parameters, which may include: color value, brightness, font size, thickness, icon, etc., or a combination of several items.
[0147] Optionally, the step of searching for a display style of the HUD system corresponding to the first determined driving scene or the second determined driving scene includes: partitioning the current frame of the real scene image to generate a partition situation; generating HUD content of each partition according to the partition situation; searching for a display style of the HUD system corresponding to the current frame of each partition;
[0148] The step of displaying the HUD content according to the display style includes: displaying the HUD content of each partition according to the display style of each partition.
[0149] The technical solution of this embodiment has the following beneficial effects:
[0150] The technical solution of this embodiment divides the timing determination method according to the delay tolerance, which can not only meet the different demands of different scenarios for delay, but also provide ideas for dividing scenarios from other dimensions.
[0151] In addition, the use of continuous scene numbers simplifies logical processing and plays an important role in scene confirmation, switching, anti-shake and backtracking.
[0152] The following describes the application scenario of this embodiment. This embodiment provides a scene recognition method, which recognizes scenes based on real-time image frames and can be applied to the field of smart cockpits. The main idea of the invention is to obtain the real scene around the vehicle in real time through the vehicle camera, and recognize and switch the scene through single-frame features and inter-frame differences to meet the user's logical demands and visual experience for different scenes. This article takes the HUD display style optimization as an example to explain the scene recognition method of real-time images.
[0153] Taking the HUD scene as an example, to optimize the HUD display, it is necessary to obtain real-time images through the vehicle camera. For example, the forward real-time image is obtained through the vehicle's forward camera, and the background required by the HUD is cropped according to the HUD and camera-related hardware parameters. The foreground color tone and light environment are calculated by parallel partitioning, and the HUD display style is optimized in real time according to the parameter characteristics of different zones. By increasing the color contrast between the displayed content and the background and adjusting the brightness of the displayed content, the Washout phenomenon can be reduced and the user's visual experience of the HUD can be improved.
[0154] The HUD optimization system may include four modules: a pre-processing module, a scene recognition module, a display strategy module, and a display module. Figure 2 As shown, the output of the front module serves as the input of the back module.
[0155] The preprocessing module acquires the environment image in real time through the vehicle camera. The environment image can be a forward environment image, and the acquired image is preprocessed to meet the needs of subsequent modules for image processing. For example, according to the dynamic adjustment of the projection position of the HUD, the effective background area is changed, or in order to improve the efficiency and effectiveness of the algorithm, adapt to complex environmental textures, and more finely optimize the visual effects of different content areas, the background area can also be customized to be split into multiple sub-areas. The number and size of the partitions can be flexibly configured, and the only constraint is the hardware resources of the system. In other words, the role of the preprocessing module is to shield the image differences and ensure the simplicity of the subsequent algorithms. For example, the differences in the captured images caused by the differences in camera resolution and installation position; the differences in the effective background area caused by the adjustment of the HUD content projection area; the differences in the number and size of partitions caused by the design differences of the HUD content. Partitioning and cropping the target area can not only provide the smallest effective area for subsequent processing, but also facilitate the parallel operation of subsequent modules and reduce the computing burden.
[0156] The scene recognition module adopts the aforementioned scene recognition steps. The following is a detailed description. After receiving the partitioned image from the preprocessing module, algorithm processing will be performed on multiple blocks in parallel. Algorithm processing is mainly divided into two dimensions: single frame and multi-frame. The purpose of a single frame is to obtain the feature values of a single frame and each zone. Some zone feature values need to be verified with reference to the feature values at the frame level. There are two purposes of multiple frames: one is to solve the timing problem of logical processing based on the differences between multiple frames (such as switching between different scenes); the other is to verify the accuracy of single frame information based on the same points between multiple frames (such as scene jitter). Since the smallest processing unit of the algorithm is a zone, it is necessary to consider the issues of synchronization and pre-frame state storage when performing frame and multi-frame operations.
[0157] The visual scheme of HUD will be tuned and calibrated for the target scene, but the timing of switching the visual scheme and the display stability of the visual scheme depend on the recognition accuracy of the scene and the anti-shake strategy of the scene. The scene feature can be extracted for each frame of data, and the selection of this scene feature value depends on the needs of subsequent logical processing. For example, the HUD optimization mentioned in the article, according to the modification condition of the HUD display strategy adopted in the article, is judged based on the main color tone of the background, so the scene feature will select the background color tone.
[0158] Once the characteristic values of the scene are determined according to the processing needs, the characteristic value changes between multiple frames can be used as the basis for scene confirmation, anti-shake, and switching. The purpose of scene confirmation, anti-shake, and switching is to solve the problem of HUD frequently switching display strategies due to the ever-changing and complex driving environment. It improves the adaptability of HUD to complex and changing driving environments and improves the visual comfort of drivers.
[0159] Scene confirmation, anti-shake, and switching can be achieved through the same preset value (that is, the scene confirmation threshold L mentioned above), which refers to the number of consecutive frames that require the same scene feature value. Different scene confirmation thresholds L can also be used. The specific strategy is to first obtain the scene feature of the current frame, compare the feature with the scene feature of the previous frame, and obtain the number of consecutive frames with the same scene feature. When the value is greater than or equal to the preset value, the scene will be switched, otherwise the original scene will be retained.
[0160] The preset value is an integer, which will be dynamically adjusted according to the driving speed and the camera acquisition frame rate. The value is inversely proportional to the vehicle speed and directly proportional to the camera acquisition frame rate. That is, the faster the vehicle speed, the smaller the value, and the slower the vehicle speed, the larger the value; the higher the camera acquisition frame rate, the larger the value, and the lower the acquisition frame rate, the smaller the value.
[0161] The following describes the processing of the scene recognition module in detail. The scene recognition module performs algorithm processing from two aspects: single frame and multi-frame. A single frame extracts specific parameters of a frame of the image, or extracts the state of the region level (each frame is divided into multiple regions) according to the input region orientation. Multi-frame mainly combines the state of the current frame and continuous historical frames, which can not only determine the accuracy of the current frame scene, but also grasp the timing of logical intervention according to the changes between frames. Since it involves the state of the current frame and the historical frame, the storage of the frame is introduced first.
[0162] The management of frames is described below.
[0163] The frame storage adopts the queue method, which mainly manages various information related to the frame. Figure 3 As shown in the figure, each item in the queue is a frame, and each frame includes several zones (the number of zones is determined by the needs). The first-in-first-out strategy of the queue can ensure the validity of the most recent historical frame. At the same time, the length of the queue can be the maximum number of historical frames required for all scene judgments plus 1 (the addition of 1 is to prevent the queue from overflowing when the current frame is put into the queue).
[0164] The following description attributes based on a single frame.
[0165] Single frame processing is used to obtain frame-level and zone-level attribute information, such as timestamp, hue information, brightness information, scene category, number of continuous scenes, etc. Hue information refers to the background hue of each zone, which can be used to guide the display style of the HUD in that zone; brightness information refers to the image brightness of each zone, which can make up for the recognition blind spots caused by the accuracy of the brightness sensor (for example, when the brightness is lower than 100 lux, the displayed value of some sensors is 0); the type and specific value of the scene category are defined according to business needs, obtained through algorithms, and have a series of values with clear boundaries that are instructive for subsequent processing. The division of similar scenes can be independent of visual features, but it is necessary to ensure that the guiding significance for subsequent processing and the optimization strategy adopted are completely consistent. The scene category is both a classification and simplification of complex real-life scenes, and a combing and reduction of visual optimization solutions. It can be deleted or added according to specific needs, and has high flexibility; the number of continuous scenes is used for multi-frame processing, which refers to the number of historical frames with the same scene category as the current frame and continuous with the current frame + 1 (the statistics of this number include the current frame). The specific setting logic of the continuous scene number field is as follows Figure 4 As shown in the figure, after the scene category is obtained through the algorithm, it will first determine whether there is a previous frame. If there is no previous frame, the current frame is the starting frame, and the number of continuous scenes is set to 1; if there is a previous frame, and the scene category is the same as that of the previous frame, the number of continuous scenes of the current frame is equal to the number of continuous scenes of the previous frame plus 1; if there is a previous frame, but the scene category is different from that of the previous frame, it means that the frame is the starting frame after the scene change, and the number of continuous scenes is set to 1. The number of fields is added according to specific needs, and the scope of action needs to be considered when defining fields, such as: frame-level fields are still valid for zone-level scopes.
[0166] The following description is based on multi-frame timing.
[0167] After determining the attributes of a single frame, if you only refer to the single frame results for subsequent processing, it is inevitable to misjudge the timing. Because driving scenes have certain randomness, complexity and continuity. When using single-frame results as a reference, the switching of different scenes may be very frequent, even between several frames. Such frequent scene switching will cause the response strategy based on the judgment result to switch frequently. Take the HUD optimization given as an example in the full text. Under the logic of single-frame judgment, the display strategy of HUD will switch frequently, which is not friendly to human eyes and systems. Therefore, the identification and switching of scenes need to refer to multiple frames of information within a period of time. At the same time, it is also necessary to consider the tolerance of the scene to delay. If the tolerance to delay is high, such as driving scenes on the road, you can first confirm the continuity of the scene, and then trigger the scene switching logic; if the tolerance to delay is low, such as entering and exiting tunnel scenes, you can first trigger the scene switching logic, and then consider the continuity of the scene. The specific processing is as follows.
[0168] The following describes anti-shake processing for scenarios with high delay tolerance.
[0169] Scene 1: Rays of sunlight shine on the asphalt road, and the reflections of the electric poles at intervals on the road are just across the road. The car is running fast between light and darkness. If the information of each frame is used as the basis for the HUD strategy switching, due to many complex factors, the recognized scene switching may be frequent, and then the optimization strategy may be frequently switched, which is not user-friendly. Therefore, in order to ensure the stability of the main scene and reduce the interference of the instantaneous scene, the algorithm needs a scene anti-shake strategy.
[0170] Scene stabilization is to remove the instantaneous scene recognized when the vehicle is driving. This instantaneous scene is generated by complex road environments, such as fallen leaves, raindrops, reflections, and reflections of roadside buildings near the camera. Its characteristics may be related to vehicle speed (for example, the faster the vehicle speed, the faster it can pass through the instantaneous scene section), and the duration is very short, so most jittery scenes can be filtered out by increasing the duration threshold. Since the time interval for the camera to obtain image frames is stable, the number of image frames can be used as the duration threshold for ease of processing. The threshold changes inversely with speed, and the specific corresponding relationship can be obtained through calibration.
[0171] Anti-shake strategy such as Figure 5 As shown, first according to Figure 4 The logic sets the number of continuous scenes M (equivalent to the first continuous scene number mentioned above), and then compares the numerical values of M and L (L is the threshold for scene confirmation, equivalent to the first scene confirmation threshold mentioned above). If M is greater than or equal to L, the scene is switched; otherwise, the original scene conclusion is maintained (scene anti-shake). This method can solve some instantaneous scene problems, and the instantaneous scenes that can be covered depend on the numerical value of L. The larger the L value, the more scenes are covered, but the higher the delay when the scene is switched; the smaller the L value, the fewer scenes are covered, but the delay when the scene is switched is lower.
[0172] The following describes backtracking processing for a scenario with low delay tolerance.
[0173] Scenario 2: In the scenario of judging the vehicle entering a tunnel, in order to ensure the timeliness of scene switching, the algorithm will immediately execute the scene switching strategy when it recognizes that the vehicle has entered a tunnel, but the accuracy of the judgment cannot be guaranteed. In order to balance low latency and accuracy, the scene will be proofread based on subsequent frames after switching, and backtracking will be performed immediately if an error is found. The exit tunnel scenario is similar to the entry tunnel scenario.
[0174] Anti-shake is to minimize errors before they occur, while backtracking is to make up for errors that have already occurred. In the above scenario, the scene needs to be switched as soon as possible for low latency, and this kind of switching is very likely to be caused by recognition errors and complex environments. In order to improve the accuracy before and after the scene switch, the scene type needs to be limited before the switch, and all low-latency scene types need to be enumerated. They can also be grouped according to the needs of the scene, such as the tunnel entry and exit scenes mentioned in the above example. This can strictly limit the scope of scenes with recognition errors or jitters, and greatly filter out irrelevant scenes. After the switch, the switching behavior needs to be verified. If the verification is correct, the switching state is retained, otherwise the state is backtracked in time.
[0175] Since the tunnel entry and exit scenarios involve related state values, Figure 6 The tunnel entry and exit scenarios are summarized. Figure 4 After the logic sets the number of consecutive scenes M, the scene type is limited for the subsequent logic. If the scene type is entering or exiting the tunnel, the subsequent logic is entered, otherwise other scene logic is followed. The in_flag field is defined to mark whether the vehicle is in the tunnel at this time: true is in the tunnel; false is outside the tunnel. Next, the tunnel entry scene is described in detail. The tunnel exit scene is similar. When in_flag is false, it means that the vehicle is outside the tunnel at this time. If the scene category of the frame is in the tunnel, it means that the frame is exactly the moment of entering the tunnel. In order to minimize the delay, the logic of entering the tunnel should be executed immediately, such as adjusting the brightness value of the HUD. However, considering that the operation is limited to the first frame of entering the tunnel, a flag field first_in_flag is added here. When this field is false, it means that the first frame operation has not been executed, otherwise it means that the first frame operation has been executed. After judging that first_in_flag is false, the first frame task will be executed immediately, and then the field will be set to true, and the first tunnel exit field first_out_flag, which is similar to it, will be set to false. If it is found that the first_in_flag field is already true, the number of consecutive scenes in the frame will be judged (equivalent to the second consecutive scene number mentioned above). When the number of consecutive scenes M is greater than or equal to L (the scene confirmation threshold, equivalent to the second scene confirmation threshold mentioned above), the in_flag field will be set to true to confirm that the vehicle is already in the tunnel. Otherwise, no processing will be performed.
[0176] The above is a normal scene of entering a tunnel. However, if in_flag is false, it means that the car is already outside the tunnel and the first tunnel entry task has been executed. However, the subsequent frame recognition shows that the car is still outside the tunnel. In this case, the backtracking logic will be used. To ensure that the backtracking logic does not jitter, the accuracy of the backtracking will be constrained before the backtracking is executed. After the first execution of entering the tunnel, the number of consecutive tunnel outside recognition frames (M) must be greater than or equal to the scene confirmation threshold (L). Only then can it be confirmed that the previous judgment of entering the tunnel is wrong and the backtracking process is performed. When backtracking, both the first_in_flag and first_out_flag fields need to be set to false at the same time.
[0177] The tunnel entry and exit scenarios are two mutually exclusive scenarios with a certain correlation. Their logic is relatively independent, so you can make independent logic designs for these scenarios. If you need to have other grouping scenarios, you can customize the logic and improve the business logic of the scenarios.
[0178] The display strategy module mainly solves the problem of selecting the display strategy. The display strategy module adopts the display strategy of the aforementioned method. The display strategy module specifically: finds the display style of the HUD system corresponding to the first determined driving scene or the second determined driving scene; and displays the HUD content according to the display style.
[0179] Among them, the searching for the display style of the HUD system corresponding to the first determined driving scene or the second determined driving scene specifically includes: partitioning the current frame of the real-scene image to generate a partition situation; generating HUD content of each partition according to the partition situation; searching for the display style of the HUD system corresponding to the current frame of each partition; displaying the HUD content according to the display style specifically includes: displaying the HUD content of each partition according to the display style of each partition.
[0180] The following is a detailed description. The display strategy module selects the corresponding display style according to the driving scene category and the color value of the current image. Specifically: This module creates a style mapping table, which will query and obtain the recommended color tone according to the color value of the front module (the recommended color tone represents the category, which is the color tone defined from the perspective of the HUD display strategy, such as yellow tone, green tone). Different recommended color tone values correspond to different HUD display strategy parameters. Each recommended color tone can be used for different background color values (referring to the background color value calculated by the algorithm module). In order to simplify the logical mapping, a recommended color tone can correspond to one or more groups of continuous color values. For optimizing the HUD display, the continuous color value can be used as the basis for judging whether the scenes are the same in the scene recognition module. As long as they belong to the same color tone, they are judged to be the same scene.
[0181] The scene recognition module outputs a color value for each area, and then finds a recommended color tone based on the color value. Each recommended color tone corresponds to a set of HUD style parameters, which may include: color value, brightness, font size, thickness, icon, etc., or a combination of several items.
[0182] In order to solve the problem of too many color values, but it is impossible to formulate a classification scheme for each background color value, since each HUD display style can be used for multiple background color values, it is classified from the perspective of display style. It is recommended that when defining the color tone, both the similarity of the color value itself should be considered, and the same solution should be used for color values with large differences. For the convenience of comparison and code implementation, continuous color values or segmented continuous methods can be used to correspond to the color tone.
[0183] The display module includes a HUD UI rendering module and a backlight control module, and its function is to project the final display style onto the front windshield according to the display strategy. Since the HUD UI presentation enters the human eye through the reflection of the front windshield, it cannot display black and similar colors. Because black is often achieved by closing the path of the corresponding pixel. For the windshield, black cannot be reflected or displayed without incident light. Due to the accuracy of the brightness sensor, when the brightness is lower than a certain value (this value depends on the accuracy of the sensor, and there are certain differences between different sensors), such as 100 lux, the sensor used in the experiment returns a brightness value of 0 when it is lower than 100 lux. There are many scenes below 100 lux, so logical processing can be performed based on the image brightness in this range. Although the accuracy cannot be guaranteed, a reasonable reference value can be given in combination with the image features. The brightness strategy is best to make strategies for low brightness and high brightness separately to achieve better display effects.
[0184] The rendering module responds to the display strategy from two dimensions: hue and brightness, and the adjustment strategies of the two dimensions are relatively independent. The brightness value will set a highlight threshold. Below this threshold, color adjustment is mainly used, and brightness adjustment is supplementary. When it is above this threshold, the effect of color adjustment on clarity is greatly weakened, so brightness adjustment is mainly used, and color adjustment is supplementary.
[0185] like Figure 7 As shown, this embodiment provides a scene recognition device, the device comprising:
[0186] An acquisition unit 71 is used to acquire a real-time image of a vehicle;
[0187] A first determining unit 72 is configured to determine a first determined driving scene according to a current frame and at least one historical frame of the real scene image, or
[0188] A second determination unit 73, configured to determine a second determination driving scene according to a current frame and at least one subsequent frame of the real scene image;
[0189] The execution unit 74 is used to execute a scene switching strategy according to the first determined driving scene or the second determined driving scene.
[0190] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0191] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 8 The electronic device 1600 shown includes: at least one processor 1601, a memory 1602, at least one network interface 1604 and other user interfaces 1603. The various components in the electronic device 1600 are coupled together via a bus system 1605. It is understood that the bus system 1605 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 1605 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 1605 is not described in detail. Figure 8 Various buses are labeled as bus system 1605.
[0192] The user interface 1603 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0193] It can be understood that the memory 1602 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The memory 1602 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0194] In some embodiments, the memory 1602 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 16021 and an application program 16022 .
[0195] The operating system 16021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 16022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 16022.
[0196] In this embodiment, by calling the program or instructions stored in the memory 1602, specifically, the program or instructions stored in the application 16022, the processor 1601 is used to execute the method steps provided by each method embodiment.
[0197] The method disclosed in the above embodiment of the present application can be applied to the processor 1601, or implemented by the processor 1601. The processor 1601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1601. The above processor 1601 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1602, and the processor 1601 reads the information in the memory 1602 and completes the steps of the above method in combination with its hardware.
[0198] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.
[0199] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0200] The electronic device provided in this embodiment may be Figure 8 The electronic device shown in can execute all the steps of the method described above, thereby achieving the technical effects described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0201] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0202] When one or more programs in the storage medium can be executed by one or more processors, the above method can be implemented.
[0203] The processor is used to execute the program stored in the memory to implement the above steps:
[0204] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0205] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0206] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0207] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A scene recognition method, characterized in that: The method comprises: Obtain real-time real-scene images of vehicles; Determine a first driving scene based on a current frame and at least one historical frame of the real scene image, or Determining a second driving scene according to a current frame and at least one subsequent frame of the real scene image; A scene switching strategy is executed according to the first determined driving scene or the second determined driving scene.
2. The method according to claim 1, characterized in that: The method further comprises: Acquire an initial determination driving scene of a current frame of the real scene image; Determine a scene determination strategy corresponding to the initially determined driving scene.
3. The method according to claim 2, characterized in that The step of determining a first driving scene according to a current frame and at least one historical frame of the real scene image comprises: Determining a first actual driving scene of the current frame according to the current frame of the real scene image; Determining a first continuous scene number of the first actual driving scene according to a current frame and at least one historical frame of the real scene image; The first determination driving scene is determined according to the first continuous scene number and a first scene confirmation threshold.
4. The method according to claim 3, characterized in that When the scene determination strategy is the first scene determination strategy, the step of executing the scene switching strategy according to the first determined driving scene or the second determined driving scene includes: comparing the first continuous scene number with the first scene confirmation threshold; If the first continuous scene number is greater than or equal to a first scene confirmation threshold, the scene switching strategy is to switch the first actual driving scene to the first determined driving scene.
5. The method according to claim 3 or 4, characterized in that: The first number of consecutive scenes is obtained by the following method: Determine whether the current frame has a previous frame; If the judgment result is no, taking the current frame as the starting frame, and setting the first continuous scene number of the first actual driving scene of the current frame to 1; If the judgment result is yes, and the actual driving scene category of the current frame is the same as the actual driving scene category of the previous frame, then the first continuous scene number of the first actual driving scene of the current frame is equal to the continuous scene number of the previous frame plus 1; If the judgment result is yes, and the actual driving scene category of the current frame is different from the actual driving scene category of the previous frame, the current frame is used as the starting frame after the scene change, and the first continuous scene number of the first actual driving scene of the current frame is set to 1.
6. The method according to claim 2, characterized in that The step of determining a second driving scene according to a current frame and at least one subsequent frame of the real scene image comprises: Determining a first actual driving scene of the current frame according to the current frame of the real scene image; Determining a second actual driving scene of a subsequent frame according to a subsequent frame of the current frame of the real scene image; Determining a second continuous scene number of the second actual driving scene according to a current frame and at least one subsequent frame of the real scene image; The second determination driving scene is determined according to the second continuous scene number and the second scene confirmation threshold.
7. The method according to claim 6, characterized in that The step of executing the scene switching strategy according to the first determined driving scene or the second determined driving scene comprises: comparing the second actual driving scenario with the first actual driving scenario; If the second actual driving scene is different from the first actual driving scene, comparing the second continuous scene number with the second scene confirmation threshold; If the second continuous scene number is greater than or equal to a second scene confirmation threshold, the scene switching strategy is to switch the second actual driving scene to the second determined driving scene.
8. The method according to claim 6, characterized in that The step of executing the scene switching strategy according to the first determined driving scene or the second determined driving scene comprises: comparing the second actual driving scene with the first actual driving scene, If the second actual driving scene is the same as the first actual driving scene, comparing the second continuous scene number with the second scene confirmation threshold; If the second continuous scene number is greater than or equal to a second scene confirmation threshold, the scene switching strategy is to keep the first actual driving scene as the second determined driving scene.
9. The method according to any one of claims 6 to 8, characterized in that: When the scene determination strategy is the second scene determination strategy, the method further includes: Determining a third actual driving scene of a previous frame according to a previous frame of a current frame of the real scene image; comparing whether the third actual driving scenario is the same as the first actual driving scenario; If the third actual driving scene is different from the first actual driving scene, the third actual driving scene is switched to the first actual driving scene.
10. The method according to any one of claims 6 to 8, characterized in that: The second continuous scene number is obtained by the following method: Determine whether the subsequent frame has a previous frame; If the judgment result is no, the next frame is used as the starting frame, and the second person continuous scene number of the second actual driving scene of the next frame is set to 1; If the judgment result is yes, and the actual driving scene category of the subsequent frame is the same as the actual driving scene category of the current frame, then the second continuous scene number of the second actual driving scene of the subsequent frame is equal to the continuous scene number of the current frame plus 1; If the judgment result is yes, and the actual driving scene category of the subsequent frame is different from the actual driving scene category of the current frame, the subsequent frame is used as the starting frame after the scene change, and the second continuous scene number of the second actual driving scene of the subsequent frame is set to 1.
11. The method according to claim 1, characterized in that: The method further comprises: Finding a display style of the HUD system corresponding to the first determined driving scene or the second determined driving scene; The HUD content is displayed according to the display style.
12. The method according to claim 11, characterized in that The step of searching for a display style of the HUD system corresponding to the first determined driving scene or the second determined driving scene comprises: partitioning the current frame of the real scene image to generate a partition situation; generating HUD content of each partition according to the partition situation; searching for a display style of the HUD system corresponding to the current frame of each partition; The step of displaying the HUD content according to the display style includes: displaying the HUD content of each partition according to the display style of each partition.
13. A scene recognition device, characterized in that: The device comprises: An acquisition unit, used for acquiring a real-time real-scene image of the vehicle; a first determining unit, configured to determine a first determined driving scene according to a current frame and at least one historical frame of the real scene image, or A second determination unit, configured to determine a second determination driving scene according to a current frame and at least one subsequent frame of the real scene image; An execution unit is used to execute a scene switching strategy according to the first determined driving scene or the second determined driving scene.
14. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 12.
15. A vehicle, characterized in that: include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 12.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Scene switching frame detection method and device, storage medium and electronic equipment
CN112165621A
Self-driving automobile environment sensing method and device and storage medium
CN115303264A
Image processing method and device, equipment and storage medium
CN115330604A
Image coding method, real-time communication method, equipment and storage medium
CN116567243A
AU2020102039A4
Cited By
Curve meeting scene identification method, decision-making method, vehicle controller and vehicle
CN120963716A
