An image detection method and apparatus for a vehicle

By dividing the region of interest in vehicle detection and dynamically adjusting the detection window size, the problem of low vehicle detection efficiency in existing technologies is solved, achieving real-time, accurate, and robust vehicle detection results.

CN115187940BActive Publication Date: 2026-04-17CHINA AUTOMOTIVE INNOVATION CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA AUTOMOTIVE INNOVATION CORP
Filing Date
2022-06-09
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing vehicle inspection technologies are inadequate in terms of accuracy, robustness, and real-time performance, resulting in low vehicle inspection efficiency and failing to meet industrialization needs.

Method used

By acquiring the image to be detected at the target time and its camera calibration parameters, the region of interest is divided and horizontally divided to determine the detection window size information. The sliding detection window is used to perform sliding detection on the sub-region of interest, dynamically adjusting the window size to reduce the number of invalid traversals and improve detection efficiency.

Benefits of technology

It achieves real-time and accurate vehicle detection, improves the robustness and efficiency of vehicle detection, reduces the number of searches, and ensures the accuracy and real-time nature of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115187940B_ABST
    Figure CN115187940B_ABST
Patent Text Reader

Abstract

The application relates to an image detection method and device for a vehicle, comprising the following steps: acquiring a to-be-detected image at a target moment, and a current vehicle speed of a self vehicle and camera calibration parameters corresponding to the target moment; determining a region of interest of the to-be-detected image based on the current vehicle speed of the self vehicle and the camera calibration parameters; performing transverse region division on the region of interest to obtain a plurality of regions of interest corresponding to the to-be-detected image and region size information of the plurality of regions of interest; determining detection window size information corresponding to each of the plurality of regions of interest based on the region size information of the plurality of regions of interest and the camera calibration parameters, wherein the detection window size information indicates a size adjustment range of a sliding detection window; and performing sliding detection on the plurality of regions of interest based on the detection window size information through the sliding detection window to obtain an image detection result. The application adaptively and dynamically adjusts the size range of the sliding detection window, thereby improving the image detection efficiency of the vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image detection method and apparatus for vehicles. Background Technology

[0002] With urbanization and the widespread use of automobiles, traffic accidents have surged, causing numerous personal injuries and economic losses. Ensuring safe and rapid vehicle operation and preventing rear-end collisions and other traffic accidents has become a crucial issue in the automotive field. Based on this, the concept of active automotive safety has emerged, and vehicle detection technology is one of the hot research areas in active automotive safety. Vehicle detection technology refers to the process of using image sensing to search for and identify vehicles in images, obtaining various attributes of the vehicles (such as position, speed, shape, and appearance). It is one of the key technologies in the field of active automotive safety, especially in realizing Forward Collision Warning (FCW) and Automatic Emergency Braking (AEB) functions.

[0003] Currently, the continuous enrichment of deep learning theory has led to the rapid development of visual vehicle detection technology. However, due to the complexity of its models and the high requirements for hardware, the Adaboost-based vehicle detection method is more mature for general automotive embedded devices. However, the relatively long algorithm processing time results in insufficient vehicle detection efficiency, failing to meet industrialization needs. Therefore, improving the accuracy, robustness, and real-time performance of vehicle detection, as well as its efficiency, remains a pressing issue. Summary of the Invention:

[0004] To address the aforementioned problems in the prior art, this application provides an image detection method and apparatus for vehicles, which improves the accuracy, robustness, and real-time performance of vehicle detection, and increases vehicle detection efficiency.

[0005] On one hand, this application provides an image detection method for vehicles, the method comprising:

[0006] Acquire the image to be detected at the target time, as well as the current vehicle speed and camera calibration parameters at the target time;

[0007] The region of interest in the image to be detected is determined based on the current vehicle speed and the camera calibration parameters;

[0008] The region of interest is divided horizontally to obtain multiple sub-regions of interest corresponding to the image to be detected and the region size information of the multiple sub-regions of interest.

[0009] Based on the region size information of the plurality of sub-regions of interest and the camera calibration parameters, the detection window size information corresponding to each of the plurality of sub-regions of interest is determined, and the detection window size information indicates the size adjustment range of the sliding detection window;

[0010] Based on the detection window size information, the sliding detection window is used to perform sliding detection on the multiple sub-regions of interest to obtain the image detection result.

[0011] Furthermore, based on the detection window size information, sliding detection is performed on the multiple sub-regions of interest through the sliding detection window to obtain image detection results, including:

[0012] Based on the detection window size information, the multiple sub-regions of interest are extracted by sliding the detection window to obtain multiple image sub-regions, the size of which is the same as the size of the sliding detection window.

[0013] Feature extraction processing is performed on the multiple image sub-regions to obtain multiple target image features corresponding to the multiple image sub-regions;

[0014] The image detection results are obtained by classifying and recognizing the features of the multiple target images based on the target object detection model.

[0015] Furthermore, the step of performing image sliding extraction on the plurality of sub-regions of interest based on the detection window size information, to obtain the plurality of image sub-regions, includes:

[0016] During the image sliding extraction of the multiple regions of interest, the position of the sliding detection window in the image to be detected is monitored.

[0017] When the sliding detection window is detected to have moved from the previous sub-region of interest to the current sub-region of interest, the size of the sliding detection window is adjusted based on the detection window size information corresponding to the current sub-region of interest;

[0018] Based on the adjusted sliding detection window, the image sliding extraction is performed on the current sub-region of interest to obtain the multiple image sub-regions.

[0019] Furthermore, the step of performing image sliding extraction on the plurality of sub-regions of interest based on the detection window size information, to obtain the plurality of image sub-regions, includes:

[0020] Based on the detection window size information, a sliding detection window is generated corresponding to each of the multiple sub-regions of interest;

[0021] Parallel image sliding extraction is performed on the plurality of sub-regions of interest based on each of the sliding detection windows to obtain the plurality of image sub-regions.

[0022] Furthermore, the step of performing image sliding extraction on the plurality of sub-regions of interest based on the detection window size information, to obtain the plurality of image sub-regions, includes:

[0023] Based on the detection window size information, iterative image sliding extraction is performed on the plurality of sub-regions of interest through the sliding detection window to obtain the plurality of image sub-regions;

[0024] Specifically, for each sub-region of interest, the size of the sliding detection window varies across different iterations of the iterative image sliding extraction.

[0025] Further, the iterative image sliding extraction of the plurality of sub-regions of interest based on the detection window size information through the sliding detection window to obtain the plurality of image sub-regions includes:

[0026] For each sub-region of interest, an initial sliding detection window is generated based on the lower limit of the size of the detection window information;

[0027] Based on the initial sliding detection window, the image sliding extraction is performed on the sub-region of interest.

[0028] The initial sliding detection window is updated in size based on a preset adjustment ratio to obtain an updated initial sliding detection window;

[0029] Based on the updated initial sliding detection window, the image sliding extraction is performed on the updated sub-region of interest.

[0030] The above steps of size update and update traversal image sliding extraction are performed alternately until the iteration end condition is met, thus obtaining the multiple image sub-regions.

[0031] Furthermore, during the image sliding extraction process of the multiple sub-regions of interest, different window sliding steps are used for the multiple sub-regions of interest, and the window sliding step size is determined based on the pixel height of the sub-region of interest.

[0032] Furthermore, the method also includes:

[0033] The image to be detected is subjected to detection line recognition to obtain a target detection line, which intersects the horizontal direction of the image to be detected;

[0034] Determining the region of interest (ROI) of the image to be detected based on the current vehicle speed and the camera calibration parameters includes:

[0035] The region of interest is determined based on the target detection line, the current vehicle speed, and the camera calibration parameters.

[0036] Furthermore, the region size information of the plurality of sub-regions of interest includes the boundary pixel height of the sub-regions of interest, and the step of determining the detection window size information corresponding to each of the plurality of sub-regions of interest based on the region size information of the plurality of sub-regions of interest and the shooting pitch angle includes:

[0037] The target height difference corresponding to the camera calibration parameters is determined according to a preset correspondence. The height difference indicates the image pixel height difference between the standard image and the image to be detected. The preset correspondence characterizes the correspondence between multiple pitch angles and multiple image pixel height differences in the camera calibration parameters.

[0038] The detection window size information is obtained by calculating the window size based on the boundary pixel height of the region of interest, the camera calibration parameters, the target height difference, and the preset size conversion coefficient.

[0039] On the other hand, this application provides an image detection device for a vehicle, the device comprising:

[0040] The first acquisition module is used to acquire the image to be detected at the target time, as well as the current vehicle speed and camera calibration parameters at the target time.

[0041] Region of Interest (ROI) Determination Module: Used to determine the region of interest (ROI) of the image to be detected based on the current vehicle speed and the camera calibration parameters;

[0042] Region of Interest (ROI) Acquisition Module: This module is used to perform horizontal region division on the ROI to obtain multiple ROIs corresponding to the image to be detected and the region size information of the multiple ROIs.

[0043] Detection window size information determination module: used to determine the detection window size information corresponding to each of the multiple sub-regions of interest based on the region size information of the multiple sub-regions of interest and the camera calibration parameters, wherein the detection window size information indicates the size adjustment range of the sliding detection window;

[0044] Sliding detection module: used to perform sliding detection on the multiple sub-regions of interest through the sliding detection window based on the detection window size information, and obtain image detection results.

[0045] On the other hand, this application provides an electronic device including a processor and a memory, wherein the memory stores at least one instruction and at least one program, the at least one instruction and the at least one program being loaded and executed by the processor to implement the image detection method for a vehicle as described above.

[0046] On the other hand, this application provides a computer storage medium storing at least one instruction and at least one program, wherein the at least one instruction and the at least one program are loaded and executed by a processor to implement the image detection method for vehicles as described in any of the above.

[0047] On the other hand, this application provides an in-vehicle terminal that stores at least one instruction and at least one program, wherein the at least one instruction and the at least one program are loaded and executed by a processor to implement the image detection method for a vehicle as described above.

[0048] The image detection method and apparatus for vehicles provided in this application have the following technical advantages:

[0049] This application acquires the image to be detected at a target time, along with the current vehicle speed and camera calibration parameters at that time. Based on the current vehicle speed and camera calibration parameters, it determines the region of interest (ROI) of the image. The ROI is then horizontally divided to obtain multiple sub-ROIs and their size information. Based on the sub-ROI size information and camera calibration parameters, the size information of the detection window corresponding to each sub-ROI is determined, indicating the adjustment range of the sliding detection window. Based on the detection window size information, sliding detection is performed on the multiple sub-ROIs using the sliding detection window to obtain the image detection result. This application divides the image to be detected into multiple sub-ROIs, sets a specific sliding detection window size range for each sub-ROI, and adaptively and dynamically adjusts the sliding detection window size range, filtering out invalid traversal times of the sliding detection window. This achieves real-time vehicle detection and localization, significantly reducing the number of searches and improving the accuracy, robustness, and real-time performance of vehicle image detection, while also increasing the efficiency of vehicle image detection. Attached Figure Description

[0050] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a schematic flowchart of an image detection method for vehicles provided in an embodiment of this application;

[0052] Figure 2 This is a schematic flowchart of an image detection method for vehicles provided in an embodiment of this application;

[0053] Figure 3 This is a schematic flowchart of an image detection method for vehicles provided in an embodiment of this application;

[0054] Figure 4 This is a schematic flowchart of an image detection method for vehicles provided in an embodiment of this application;

[0055] Figure 5 This is a schematic flowchart of an image detection method for vehicles provided in an embodiment of this application;

[0056] Figure 6 This is a schematic flowchart of an image detection method for vehicles provided in an embodiment of this application;

[0057] Figure 7 This is a schematic diagram of a sliding detection window provided in an embodiment of this application;

[0058] Figure 8 This is a schematic diagram of a sliding detection window provided in an embodiment of this application;

[0059] Figure 9 This is a schematic diagram of a Haar feature provided in an embodiment of this application;

[0060] Figure 10 This is a schematic diagram of a sliding detection window provided in an embodiment of this application;

[0061] Figure 11 This is a schematic block diagram of the structure of an image detection device for vehicles provided in an embodiment of this application;

[0062] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0063] This application discloses an image detection method for vehicles, which improves the accuracy, robustness, and real-time performance of vehicle detection, and increases vehicle detection efficiency.

[0064] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0065] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0066] The following combination Figure 1 For an introduction to the image detection method for vehicles disclosed in this application, please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a flowchart illustrating a method for vehicle image detection according to an embodiment of this application. This application provides method operation steps as shown in the embodiment or flowchart, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only execution order. In actual device, system, or equipment products, the method can be executed sequentially according to the embodiment or the accompanying drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown... Figure 1 As shown, the method may include:

[0067] S101: Acquire the image to be detected at the target time, as well as the current vehicle speed and camera calibration parameters corresponding to the target time.

[0068] It should be noted that the image to be detected can be the image of the front of the vehicle obtained by the vehicle's onboard camera during the current autonomous driving process. By adjusting the shooting angle of the vehicle's onboard camera, images of other directions of the current vehicle, such as the image of the rear of the current vehicle, can also be obtained.

[0069] In some embodiments, the target time can be the current time, the previous time, or any time, and is not limited in this application.

[0070] In some implementations, the image to be detected is an image captured by the vehicle-mounted camera at the target time. Correspondingly, the camera calibration parameters are the camera parameters of the vehicle when the onboard camera captures the image to be detected. These parameters can be obtained through a preset parameter calibration method. It should be noted that the calibration technique mainly involves calibrating parameters such as pitch angle, roll angle, azimuth angle, and installation position. In some embodiments, only the pitch angle is calibrated; other parameters are known parameters as they are determined during installation according to the installation requirements. Accordingly, the camera calibration parameters may include, but are not limited to, the shooting pitch angle, which is the pitch angle of the vehicle when the onboard camera captures the image to be detected. The preset parameter calibration method may include the following steps:

[0071] S201: Acquire a clear image of the vehicle's front view area captured by the vehicle-mounted camera at its installation location. The vehicle-mounted camera can be a CCD or CMOS camera or other device capable of acquiring images, and can be mounted on the vehicle's windshield. The image of the front of the vehicle captured by the vehicle-mounted camera is denoted as Image A, and an image pixel coordinate system is established on Image A.

[0072] S202: Pitch angle calibration based on the calibration target surface.

[0073] A calibration target surface is provided, with a distance L between the calibration target surface and the mounting position of the vehicle-mounted camera device. With the mounting angle of the vehicle-mounted camera device at 0° (lens horizontal), the pitch angle is 0°. It should be noted that the calibration target surface can be a calibration plate with marking functionality.

[0074] At least two coordinate system calibration lines are marked on the calibration target surface. The vehicle-mounted camera device acquires calibration images including the calibration target surface; obtains the calibration physical distance between at least two calibration lines and the calibration pixel distance between at least two calibration lines in the calibration image; and determines the proportional relationship k between the image pixel coordinate system and the actual world coordinate system based on the proportional relationship between the calibration pixel distance and the calibration physical distance.

[0075] Furthermore, a pitch angle calibration line is also provided on the calibration target surface. The pitch angle calibration line can be any one of the above-mentioned at least two coordinate system calibration lines, or it can be a newly added calibration line on the calibration target surface. When the pitch angle is 0°, the vehicle-mounted camera device acquires a standard image including the calibration target surface. The standard image includes the pitch angle calibration line, and the first height of the pitch angle calibration line in the standard image in the image pixel coordinate system is obtained as h1. When the pitch angle is θ, the vehicle-mounted camera device acquires a reference image including the calibration target surface, and the second height of the target calibration line in the reference image in the image pixel coordinate system is obtained as h2. The shooting pitch angle is determined based on the first height, the second height, and the proportional relationship between the image pixel coordinate system and the actual world coordinate system.

[0076] In one embodiment, the shooting pitch angle can be calculated using the following formula:

[0077]

[0078] Where δ represents the distortion coefficient; θ represents the shooting pitch angle of the vehicle-mounted camera device; k represents the ratio between the image pixel coordinate system and the actual world coordinate system; Δh represents the absolute value of the difference between h1 and h2, where h1 represents the height of the target calibration line of the calibration target surface in the image pixel coordinate system when the pitch angle is 0°, and h2 represents the height of the target calibration line of the calibration target surface in the image pixel coordinate system when the pitch angle is θ. Here, the pitch angle is 0° when the installation angle of the vehicle-mounted camera device is set to 0° (lens horizontal); L represents the horizontal distance between the calibration target surface and the installation position of the vehicle-mounted camera device.

[0079] Through the above S201-S202, the preset correspondence between different shooting pitch angles of the vehicle-mounted camera device and Δh can be obtained.

[0080] S102: Determine the region of interest (ROI) of the image to be detected based on the current vehicle speed and camera calibration parameters. Camera calibration parameters include the pitch angle of the onboard camera when acquiring the image. It should be noted that the current vehicle speed refers to the vehicle's current speed at the time the target image is acquired; the ROI represents the actual image range detected by the sliding detection window.

[0081] In existing technologies, vehicle detection is achieved by using a sliding detection window to perform sliding detection on the image to be detected. However, the excessive number of window searches is a major reason for low detection efficiency. To address this issue, this application considers vehicle speed and safe distance, dividing the detection range into a region of interest (ROI) and a non-ROI. The ROI represents the area where collisions may occur, while the non-ROI represents the non-collision area. Specific sliding window operations are performed on the ROI areas, while no sliding window detection is performed on the non-collision areas. This filters out invalid traversal counts of the sliding window, improving the real-time performance of the vehicle detection algorithm while ensuring accuracy.

[0082] Specifically, the region of interest is the area enclosed by the left and right boundary lines and the upper and lower boundary lines of the region of interest. This area is where the current vehicle may collide with the vehicle in front.

[0083] S103: Divide the region of interest horizontally to obtain multiple sub-regions of interest and their size information for the region of interest in the image to be detected.

[0084] In some embodiments, the number of the plurality of sub-regions of interest is positively correlated with the current vehicle speed.

[0085] In some embodiments, determining the region of interest (ROI) of the image to be detected based on the current vehicle speed and camera calibration parameters includes: determining the boundary lines of the ROI in the image to be detected based on the current vehicle speed and camera calibration parameters, and then obtaining the ROI based on the boundary lines. The boundary lines may include the upper boundary line, lower boundary line, left boundary line, and right boundary line of the ROI.

[0086] In one embodiment, the upper and lower boundaries of the region of interest can be determined based on the following formula. Specifically, the origin of the image pixel coordinate system is taken as the upper left corner of the image to be detected, with the positive x-direction to the right of the upper left corner and the positive y-direction downward from the upper left corner. The specific calculation formula is as follows:

[0087]

[0088] Row down =H

[0089] Row up Row is the upper boundary of the region of interest. down The lower boundary line of the region of interest is defined by θ, which represents the shooting pitch angle of the vehicle-mounted camera; vel represents the current vehicle speed (km / h) corresponding to the image to be detected; V0 is determined based on empirical values, and in some cases, V0 is 240. H represents the image pixel height of the image to be detected; for example, when the image to be detected is a 640*480 pixel image, the above H is 480.

[0090] The lower boundary line of the image is determined as the lower boundary line of the region of interest, and the upper boundary line of the region of interest is calculated based on the above formula. The boundary of the region of interest can be adaptively adjusted to obtain the optimal collision detection area corresponding to the current vehicle speed and shooting pitch angle. While reducing the image detection area, it ensures that the region of interest can cover the necessary detection area, improve detection efficiency, and avoid missed detection of areas.

[0091] In some embodiments, dividing the region of interest (ROI) horizontally to obtain multiple sub-ROIs corresponding to the image to be detected and the region size information of the multiple sub-ROIs may include: determining the number of sub-ROIs based on the current vehicle speed; dividing the ROI into a number of sequentially vertically connected sub-ROIs based on the number of sub-ROIs; and obtaining the region size information of each sub-ROI, including the upper and lower boundary pixel heights of the sub-ROI. Specifically, the vertical height of each sub-ROI may be the same.

[0092] In one embodiment, the number of sub-regions n can be determined based on the following formula:

[0093]

[0094] Where vel represents the current vehicle speed corresponding to the image to be detected; M is a constant, which can be determined based on empirical values, and in some cases, M is 30. The image to be detected is acquired when the current vehicle speed is 60 km / h, and the number of regions of interest n is calculated to be 3 using the formula above.

[0095] S104: Based on the region size information of multiple sub-regions of interest and camera calibration parameters, determine the detection window size information corresponding to each of the multiple sub-regions of interest. The sizes of the sliding detection windows corresponding to different sub-regions of interest are different, and the detection window size information indicates the size adjustment range of the sliding detection window.

[0096] In some embodiments, please refer to Figure 2 The region size information of multiple sub-regions of interest includes the boundary pixel height of the sub-regions of interest. Based on the region size information of the multiple sub-regions of interest and camera calibration parameters, the detection window size information corresponding to each of the multiple sub-regions of interest is determined, including:

[0097] S1041: Determine the target height difference corresponding to the camera calibration parameters according to the preset correspondence. The preset correspondence represents the correspondence between multiple shooting pitch angles and multiple image pixel height differences in the camera calibration parameters. The image pixel height difference indicates the image pixel height difference between the standard image and the image to be detected.

[0098] In practical applications, the preset correspondence can be based on the above S201-S202, with a one-to-one correspondence between the shooting pitch angle and the image pixel height difference, and the image pixel height difference is equal to the aforementioned Δh.

[0099] S1042: Calculate the window size based on the boundary pixel height of the sub-region of interest, camera calibration parameters, target height difference, and preset size conversion coefficient to obtain the detection window size information.

[0100] The preset size conversion factor is obtained based on the distortion coefficient, vehicle width, and the proportional relationship between the image pixel coordinate system and the corresponding real-world coordinate system. In one embodiment, the preset size conversion factor can be obtained based on the following formula:

[0101] i = δ × k × W;

[0102] Where i is the preset size conversion coefficient; δ is the distortion coefficient; and W is the preset vehicle width, with a value range of 1.6-1.8.

[0103] In one embodiment, the detection window size information of the sub-region of interest can be calculated using the following formula:

[0104]

[0105] Where C is the side length of the sliding detection window; θ is the shooting pitch angle of the vehicle-mounted image acquisition device; k is the ratio between the image pixel coordinate system and the corresponding real-world coordinate system; h x Let be the ordinate value of the upper or lower boundary of the sub-region of interest (x) within the region of interest (ROI) in the image pixel coordinate system. It should be noted that, based on the ordinate values ​​of the upper and lower boundaries of the sub-region of interest, the upper limit C2 and lower limit C1 of the sliding detection window for that sub-region of interest are obtained, thus yielding the detection window size information [C1, C2]. Specifically, substituting the ordinate value of the lower boundary of the sub-region of interest into the above formula yields the upper limit C2 of the sliding detection window within that sub-region of interest, and substituting the ordinate value of the upper boundary of the sub-region of interest into the above formula yields the lower limit C1 of the sliding detection window within that sub-region of interest.

[0106] S105: Based on the detection window size information, slide the detection window to perform sliding detection on multiple sub-regions of interest to obtain the image detection result.

[0107] In some embodiments, during the sliding detection of multiple regions of interest (ROIs), different window sliding steps are used for each ROI, and the window sliding step size is determined based on the pixel height of the ROI. Specifically, the sliding step size of the sliding detection window can be different within different ROIs; the closer the ROI is to the bottom of the image to be detected, the larger its corresponding window sliding step size, and vice versa; or the ROIs can be grouped based on their distance from the bottom of the image to be detected, with different window sliding step sizes for different groupings, and the closer the group is to the bottom of the image to be detected, the larger its window sliding step size. For example, if three ROIs are divided, the sliding step size for the two ROIs closest to the bottom of the image to be detected can be 2 pixels, and the sliding step size for the ROI furthest from the bottom of the image to be detected can be 1 pixel. This application uses different window sliding step sizes for multiple ROIs, further reducing the number of searches and improving vehicle detection efficiency.

[0108] This application divides the image to be detected into multiple sub-regions of interest, each with a specific sliding detection window size range. By adaptively and dynamically adjusting the sliding detection window size range, invalid traversal counts of the sliding detection window are filtered out, enabling real-time vehicle detection and localization. This significantly reduces the number of searches, improves vehicle image detection efficiency, and enhances the accuracy, robustness, and real-time performance of vehicle image detection.

[0109] In some embodiments, please refer to Figure 3Step S105 includes:

[0110] S301: Based on the detection window size information, multiple sub-regions of interest are extracted by sliding the detection window to obtain multiple image sub-regions. The size of the image sub-regions is the same as the size of the sliding detection window.

[0111] S302: Perform feature extraction processing on multiple image sub-regions to obtain multiple target image features corresponding to the multiple image sub-regions. For details, please refer to... Figure 9 The target image features can be Haar features. Among them, Haar features include, but are not limited to, at least one of two-rectangle features, three-rectangle features, four-rectangle features, vertical features, and tilt features.

[0112] S303: Based on the target object detection model, classify and identify multiple target image features to obtain image detection results.

[0113] Specifically, during the image traversal and extraction process within the sliding detection window, feature extraction processing can be performed on the real-time extracted image sub-regions to obtain target image features. These features are then input into the target object detection model to classify and identify each image sub-region. The target object can be any obstructing object surrounding the vehicle, including but not limited to vehicles, pedestrians, and obstacles.

[0114] In some embodiments, prior to step S105, the method further includes:

[0115] S401: Construct the initial object detection model.

[0116] S402: Obtain a sample set, which includes multiple sample images. The sample images are either vehicle images or non-vehicle images. Vehicle images are labeled as positive samples and non-vehicle images as negative samples. The sample images are then normalized in size. For example, the normalized sample images are 24x24 pixels in size, and the number of sample images in the sample set is n.

[0117] S403: Perform feature extraction processing on the sample image to obtain the sample image features.

[0118] Specifically, for any sample S in the sample set i Characterization is performed using Haar features to generate Haar feature vector H. i (i = 1, 2, ..., n). Please refer to [the relevant information]. Figure 9 Sample image features may include, for example Figure 9 The image shows one or more combinations of the 10 Haar feature categories. Specifically, the calculated values ​​of Haar features of different types, scales, and locations constitute the multidimensional Haar feature column vector H of a given sample image.i ,(i=1,2,...,n).

[0119] S404: Using sample image features as input to the initial object detection model and sample labels of the sample images as the desired output, the initial object detection model is iteratively trained for classification and recognition to obtain the target object detection model. Sample labels represent whether a sample image is a positive or negative sample.

[0120] Based on some or all of the above implementation methods, in some embodiments, the size of the sliding detection window needs to be adjusted during the image sliding extraction process. Please refer to the relevant documentation for details. Figure 4 Step S301 includes:

[0121] S3011: During the process of image sliding extraction of multiple sub-regions of interest, monitor the position of the sliding detection window in the image to be detected.

[0122] S3012: When it is detected that the sliding detection window has moved from the previous sub-region of interest to the current sub-region of interest, the size of the sliding detection window is adjusted based on the size information of the detection window corresponding to the current sub-region of interest;

[0123] S3013: Perform image sliding extraction on the current sub-region of interest based on the adjusted sliding detection window.

[0124] In some implementations, during the image sliding extraction of multiple regions of interest (ROIs), the position of the target marker of the sliding detection window in the image to be detected is monitored. If the target marker of the sliding detection window is detected to have moved from the previous ROI to the current ROI, the size of the sliding detection window is adjusted based on the detection window size information corresponding to the current ROI; image sliding extraction of the current ROI is then performed based on the adjusted sliding detection window. In other embodiments, the position of the sliding detection window can be determined by monitoring other information about the sliding detection window, and then the size of the sliding detection window can be adjusted based on its position. The target marker can be, for example, a marker that can characterize the position of the sliding detection window, such as its vertex, bottom border, or midpoint.

[0125] In other embodiments, please refer to Figure 5 Step S301 includes:

[0126] S3014: Generate sliding detection windows corresponding to multiple sub-regions of interest based on the detection window size information.

[0127] S3015: Parallel image sliding extraction is performed on multiple sub-regions of interest based on each sliding detection window to obtain multiple image sub-regions.

[0128] Specifically, image sliding extraction is performed simultaneously on the corresponding sub-regions of interest (ROIs) of the image using multiple sliding detection windows. It should be noted that the difference between this parallel image sliding extraction and the previous implementation is that multiple sliding detection windows are used to perform parallel detection on different ROIs of the image to be detected. In one embodiment, a one-to-one correspondence is established between the sliding detection windows and the ROIs. This multi-region parallel image sliding extraction improves image detection efficiency.

[0129] In other embodiments, step S301 includes:

[0130] S3016: Based on the detection window size information, iterative image sliding extraction is performed on multiple sub-regions of interest through a sliding detection window to obtain multiple image sub-regions; wherein, for each sub-region of interest, the size of the sliding detection window is different in different iterations of the iterative image sliding extraction.

[0131] Further, please refer to Figure 6 Step S3016 includes:

[0132] S30161: For each sub-region of interest, generate a corresponding initial sliding detection window based on the lower bound of the detection window size information. It should be noted that the lower bounds of the detection window size information are different for different sub-regions of interest.

[0133] Specifically, the detection window size information can be obtained using the aforementioned formula for calculating the side length of the sliding detection window.

[0134] S30162: Based on the initial sliding detection window, perform image sliding extraction on the sub-region of interest.

[0135] In one specific embodiment, please refer to Figure 7S30162 may include: using the lower left corner of the first sub-region of interest as the starting image sliding extraction position of the initial sliding detection window; using the lower limit of the detection window size corresponding to the first sub-region of interest as the first side length of the initial sliding detection window; the image sliding extraction path of the sliding detection window moves along the image to be detected in the left-to-right direction and the bottom-to-top direction; sliding the initial sliding detection window from the starting image sliding extraction position to the right with a first preset step size until the initial sliding detection window contacts the lateral movement boundary of the region of interest, the lateral movement boundary being the right boundary of the image; and updating the detection position through the first initial sliding detection window. The initial sliding detection window slides to the right with a preset step size until it contacts the lateral movement boundary of the region of interest (ROI). The image pixel height difference between the updated detection position and the initial detection position is set to the second preset step size. This left-to-right, bottom-to-top image sliding extraction step is repeated until the lower boundary of the initial sliding detection window moves to the lower boundary of the second ROI. The side length of the initial sliding detection window is then adjusted to the lower limit of the detection window size corresponding to the second ROI. The image sliding extraction method for the first ROI is repeated until all ROIs are extracted, thus completing one pass of the image sliding extraction for the target image. It should be noted that the first and second preset step sizes can be the same or different. This application prioritizes detecting image regions that are closer together by setting a detection path from the bottom to the top of the target image, ensuring detection efficiency while improving the safety of autonomous driving.

[0136] S30163: Update the size of the initial sliding detection window based on a preset adjustment ratio to obtain an updated initial sliding detection window; in some embodiments, the preset adjustment ratio can be 1.1-1.3 times.

[0137] S30164: Update the image sliding extraction of the sub-region of interest based on the updated initial sliding detection window.

[0138] S30165: Alternately execute the above steps of size update and update traversal image sliding extraction until the iteration termination condition is met, and obtain multiple image sub-regions.

[0139] Specifically, after completing one traversal of the image to be detected through sliding extraction, the side length of the initial sliding detection window is increased based on a preset adjustment ratio to achieve size update. This is followed by updating the traversal of the image through sliding extraction. The method for updating the traversal of the image through sliding extraction is similar to that in S30162, and will not be repeated here. The above size update and updating of the traversal of the image through sliding extraction are repeated until the iteration termination condition is met. In some embodiments, the iteration termination condition can be that, during the sliding extraction process, the side length of the current sliding detection window is greater than or equal to the upper limit of the size corresponding to the currently detected sub-region of interest.

[0140] Based on some or all of the above implementation methods, in some embodiments, the method further includes the step of determining the left and right boundary lines of the region of interest, performing detection line recognition on the image to be detected to obtain the target detection line, and the target detection line intersects with the lateral direction of the image to be detected.

[0141] Specifically, lane line recognition can be performed on the image, and then target detection lines can be determined based on the recognized lane lines. In some embodiments, lane lines Line1 and Line2 are recognized, and the lateral width of the lane lines between Line1 and Line2 is determined based on their coordinate information. A first target detection line and a second target detection line are determined based on a preset multiple and lane lines Line1 and Line2. The lateral width between the first target detection line and the second target detection line is a preset multiple of the lateral width of the lane lines, such as 1.3 times.

[0142] Specifically, based on the coordinate information, the expressions for Line1 and Line2 can be determined as y = k1x + b1 and y = k2x + b2, respectively. Therefore, the first target detection line is determined based on the left lane line Line1, and the second target detection line is determined based on the right lane line Line2. The first detection line... left The equation of the detection line is y = k3x + b3, and the equation of the second detection line is line. right The equation of the detection line is y = k4x + b4, where k3 can be equal to k1 and k4 can be equal to k2.

[0143] Vehicle detection primarily targets collisions with vehicles ahead. However, considering the tendency for vehicles in adjacent lanes to merge into the current lane, the lane lines are first obtained to determine the lane width area. Then, the lateral region of interest for vehicle detection is set to 1.3 times the lane width area as the boundary line of the lateral region of interest, thereby improving vehicle detection efficiency.

[0144] Accordingly, step S102 specifically includes: determining the region of interest based on the target detection line, the current vehicle speed, and the shooting pitch angle.

[0145] In some cases, the target detection line intersects with the lower edge of the image to be detected; correspondingly, the lateral boundaries of the region of interest (left and / or right boundary lines) are the target detection line. In other cases, the target detection line intersects with the left and / or right edges of the image to be detected; the lateral boundaries of the region of interest are the target detection line, as well as the target segment within the lateral boundary lines of the image to be detected. Please refer to [reference needed]. Figure 10 , Figure 10 The region where the target segment is located is marked. The target segment is the area between the intersection of the horizontal boundary line and the target detection line and the lower boundary of the image to be detected.

[0146] This application further determines the region of interest by using the target detection line, the current vehicle speed, and the shooting pitch angle. The lateral boundary of the region of interest is the target detection line, which further narrows the detection range of the image to be detected, reduces the number of sliding detection box searches, and improves vehicle detection efficiency.

[0147] The following describes the above image detection method for vehicles using a practical application scenario. Please refer to the documentation. Figure 8 .

[0148] S1: Acquire the image to be detected, as well as the current vehicle speed and shooting pitch angle corresponding to the image to be detected.

[0149] S2: Perform detection line recognition on the image to be detected to obtain the target detection line.

[0150] S3: Determine the region of interest based on the target detection line, the current vehicle speed, and the shooting pitch angle.

[0151] S4: Divide the region of interest into regions based on the current vehicle speed to obtain multiple sub-regions of interest and their size information for the image to be detected.

[0152] S5: Determine the detection window size information corresponding to each of the multiple sub-regions of interest based on the region size information and the shooting pitch angle.

[0153] S6: Based on the detection window size information, slide the detection window to perform sliding detection on multiple sub-regions of interest to obtain the image detection result.

[0154] In one implementation, step S6 includes:

[0155] S7: Based on the detection window size information, multiple sub-regions of interest are extracted by sliding the detection window to obtain multiple image sub-regions. The size of the image sub-regions is the same as the size of the sliding detection window.

[0156] S8: Perform feature extraction processing on multiple image sub-regions to obtain multiple target image features corresponding to the multiple image sub-regions.

[0157] S9: Based on the target object detection model, classify and identify multiple target image features to obtain image detection results.

[0158] In one implementation, step S7 includes:

[0159] S10: Based on the detection window size information, iterative image sliding extraction is performed on multiple sub-regions of interest through a sliding detection window; for each sub-region of interest, a corresponding initial sliding detection window is generated based on the size lower limit of the detection window size information.

[0160] S11: Extract the image by traversing the sub-region of interest through the initial sliding detection window.

[0161] S12: During the process of traversing the image and sliding to extract the sub-region of interest, monitor the position of the lower boundary of the sliding detection window in the image to be detected.

[0162] S13: When the lower boundary of the sliding detection window is detected to have moved from the previous sub-region of interest to the current sub-region of interest, the size of the sliding detection window is adjusted based on the detection window size information corresponding to the current sub-region of interest.

[0163] S14: Perform image sliding extraction on the current sub-region of interest based on the adjusted sliding detection window.

[0164] The step of traversing the image and sliding extraction includes: taking the lower left corner of the first sub-region of interest as the starting image sliding extraction position of the initial sliding detection window; taking the lower limit of the detection window size corresponding to the first sub-region of interest as the first side length of the initial sliding detection window; the sliding extraction path of the sliding detection window moves along the image to be detected from left to right and from bottom to top; sliding the initial sliding detection window from the starting image sliding extraction position to the right with a first preset step size until the target detection line in the region of interest is reached at the lower right fixed point of the initial sliding detection window; and updating the detection position by the first initial sliding detection window with a preset step size. The image is slid right until the target detection line in the region of interest is reached at the lower right corner of the initial sliding detection window. The image pixel height difference between the updated detection position and the initial detection position is set to a second preset step size. The image sliding extraction steps from left to right and from bottom to top are repeated until the lower boundary of the initial sliding detection window moves to the lower boundary of the second sub-region of interest. The side length of the initial sliding detection window is then adjusted to the lower limit of the detection window size corresponding to the second sub-region of interest. The image sliding extraction method for the first sub-region of interest is repeated until the image sliding extraction of all sub-regions of interest is completed, thus completing one traversal of the image to be detected. It should be noted that the first preset step size and the second preset step size can be the same or different. This application prioritizes detecting image regions that are closer together by setting a detection path from the bottom to the top of the image to be detected, ensuring detection efficiency while improving the safety of autonomous driving.

[0165] S15: Update the size of the initial sliding detection window based on a preset adjustment ratio to obtain an updated initial sliding detection window; perform image sliding extraction on the updated sub-region of interest based on the updated initial sliding detection window.

[0166] S16: Alternately execute the above steps of size update and update traversal image sliding extraction until the size of the iteratively updated detection window exceeds the upper limit of the size in the detection window size information, and obtain multiple image sub-regions.

[0167] On the other hand, embodiments of this application also provide an image detection device for vehicles, which is described below in conjunction with... Figure 11 This application provides an image detection device for vehicles, with reference to embodiments thereof. Figure 11 As shown, the device may include:

[0168] First acquisition module 11: used to acquire the image to be detected at the target time, as well as the current vehicle speed and camera calibration parameters corresponding to the target time;

[0169] Region of Interest Determination Module 12: Used to determine the region of interest in the image to be detected based on the current vehicle speed and camera calibration parameters;

[0170] Module 13 for obtaining sub-regions of interest: used to divide the region of interest into horizontal regions to obtain multiple sub-regions of interest and the region size information of the multiple sub-regions of interest corresponding to the image to be detected;

[0171] Detection window size information determination module 14: used to determine the detection window size information corresponding to each of the multiple sub-regions of interest based on the region size information of multiple sub-regions of interest and camera calibration parameters. The detection window size information indicates the size adjustment range of the sliding detection window.

[0172] Sliding detection module 15: Based on the detection window size information, it performs sliding detection on multiple sub-regions of interest through a sliding detection window to obtain image detection results.

[0173] In some embodiments, the sliding detection module 15 further includes:

[0174] Image extraction module: Based on the detection window size information, it is used to extract multiple sub-regions of interest by sliding the detection window to obtain multiple image sub-regions. The size of the image sub-regions is the same as the size of the sliding detection window.

[0175] Feature processing module: used to perform feature extraction processing on multiple image sub-regions to obtain multiple target image features corresponding to the multiple image sub-regions;

[0176] Recognition module: Used to classify and recognize multiple target image features based on the target object detection model to obtain image detection results.

[0177] In some embodiments, the image extraction module further includes:

[0178] Sliding detection window position monitoring module: used to monitor the position of the sliding detection window in the image to be detected during the process of sliding extraction of multiple sub-regions of interest;

[0179] Sliding detection window size adjustment module: When the sliding detection window is detected to have moved from the previous sub-region of interest to the current sub-region of interest, the module adjusts the size of the sliding detection window based on the detection window size information corresponding to the current sub-region of interest.

[0180] The first control module is used to perform image sliding extraction on the current sub-region of interest based on the adjusted sliding detection window.

[0181] In some embodiments, the image extraction module further includes:

[0182] Sliding detection window generation module: used to generate sliding detection windows corresponding to multiple sub-regions of interest based on the detection window size information;

[0183] The second control module is used to perform parallel image sliding extraction on multiple sub-regions of interest through each sliding detection window, thereby obtaining multiple image sub-regions.

[0184] In some embodiments, the image extraction module further includes:

[0185] Iterative detection module: It is used to perform iterative image sliding extraction on multiple sub-regions of interest by sliding the detection window based on the detection window size information, so as to obtain multiple image sub-regions; wherein, for each sub-region of interest, the size of the sliding detection window is different in different iterations of the iterative image sliding extraction.

[0186] Initial window generation module: used to generate a corresponding initial sliding detection window for each sub-region of interest based on the lower limit of the detection window size information;

[0187] The third control module is used to perform image sliding extraction by traversing the sub-region of interest based on the initial sliding detection window.

[0188] Window update module: Updates the size of the initial sliding detection window based on a preset adjustment ratio to obtain an updated initial sliding detection window;

[0189] Traversal detection module: used to perform image sliding extraction by updating the sub-region of interest based on the updated initial sliding detection window;

[0190] Execution module: Used to alternately execute the above steps of size update and update traversal image sliding extraction until the iteration termination condition is met, resulting in multiple image sub-regions.

[0191] In some embodiments, the apparatus further includes:

[0192] Target detection line acquisition module: used to identify detection lines in the image to be detected and obtain target detection lines, which intersect with the horizontal direction of the image to be detected.

[0193] Region of Interest Determination Module 12: It is also used to determine the region of interest based on the target detection line, the current vehicle speed and camera calibration parameters, and the lateral boundary of the region of interest is the target detection line.

[0194] Target height difference determination module: used to determine the target height difference corresponding to the camera calibration parameters according to the preset correspondence. The height difference indicates the image pixel height difference between the standard image and the image to be detected. The preset correspondence represents the correspondence between multiple pitch angles and multiple image pixel height differences in the camera calibration parameters.

[0195] Window size calculation module: This module is used to calculate the window size based on the boundary pixel height of the sub-region of interest, camera calibration parameters, target height difference, and preset size conversion coefficient, thereby obtaining the detection window size information.

[0196] Regarding the control device in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0197] The device and method embodiments in this application are based on similar implementation methods.

[0198] Embodiments of this application also provide an electronic device, the device including a processor and a memory, the memory storing at least one instruction and at least one program, the at least one instruction and the at least one program being loaded and executed by the processor to implement the image detection method for vehicles as described above.

[0199] Furthermore, Figure 12 A schematic diagram of the hardware structure of an electronic device for implementing the image detection method for vehicles provided in the embodiments of this application is shown. The electronic device may participate in or include the apparatus provided in the embodiments of this application. Figure 12 As shown, electronic device 1 may include one or more processors 902 (shown as 902a, 902b, ..., 902n in the figure) 902 (processor 902 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 904 for storing data, and a transmission device 906 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 12 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, electronic device 1 may also include... Figure 12 The more or fewer components shown, or having the same Figure 12 The different configurations shown.

[0200] It should be noted that the aforementioned one or more processors 902 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be wholly or partially embodied in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or wholly or partially integrated into any other element within the electronic device 1 (or mobile device). As involved in the embodiments of this application, the data processing circuit serves as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0201] The memory 904 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method in the embodiments of this application. The processor 902 executes various functional applications and data processing by running the software programs and modules stored in the memory 904, thereby realizing the above-described image detection method for vehicles. The memory 904 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 904 may further include memory remotely located relative to the processor 902, and these remote memories can be connected to the electronic device 1 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0202] The transmission device 906 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 1. In one example, the transmission device 906 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 906 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0203] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 1 (or mobile device).

[0204] In this embodiment, the memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for the functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.

[0205] Embodiments of this application also provide a computer storage medium storing at least one instruction and at least one program, wherein the at least one instruction and the at least one program are loaded and executed by a processor to implement the image detection method for vehicles as described above.

[0206] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0207] On the other hand, this application provides a vehicle-mounted terminal that stores at least one instruction and at least one program, wherein the at least one instruction and the at least one program are loaded and executed by a processor to implement the image detection method for a vehicle as described in any of the above.

[0208] The image detection method, apparatus, electronic device, computer storage medium, and vehicle terminal provided in this application have the following technical effects:

[0209] This application acquires the image to be detected at a target time, along with the current vehicle speed and camera calibration parameters at that time. Based on the current vehicle speed and camera calibration parameters, it determines the region of interest (ROI) of the image. The ROI is then horizontally divided to obtain multiple sub-ROIs and their size information. Based on the sub-ROI size information and camera calibration parameters, the size information of the detection window corresponding to each sub-ROI is determined, indicating the adjustment range of the sliding detection window. Based on the detection window size information, sliding detection is performed on the multiple sub-ROIs using the sliding detection window to obtain the image detection result. This application divides the image to be detected into multiple sub-ROIs, sets a specific sliding detection window size range for each sub-ROI, and adaptively and dynamically adjusts the sliding detection window size range, filtering out invalid traversal times of the sliding detection window. This achieves real-time vehicle detection and localization, significantly reducing the number of searches and improving the accuracy, robustness, and real-time performance of vehicle image detection, while also increasing the efficiency of vehicle image detection.

[0210] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.

[0211] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and apparatus embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0212] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0213] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An image detection method for a vehicle, characterized by, The method includes: Acquire the image to be detected at the target time, as well as the current vehicle speed and camera calibration parameters at the target time; The region of interest in the image to be detected is determined based on the current vehicle speed and the camera calibration parameters; The region of interest is divided horizontally to obtain multiple sub-regions of interest corresponding to the image to be detected and the region size information of the multiple sub-regions of interest; the number of the multiple sub-regions of interest is positively correlated with the current vehicle speed. Based on the region size information of the plurality of sub-regions of interest and the camera calibration parameters, the detection window size information corresponding to each of the plurality of sub-regions of interest is determined, and the detection window size information indicates the size adjustment range of the sliding detection window; Based on the detection window size information, iterative image sliding extraction is performed on the multiple sub-regions of interest through the sliding detection window to obtain multiple image sub-regions. For each sub-region of interest, the size of the sliding detection window is different in different iterations of the iterative image sliding extraction. Feature extraction processing is performed on the multiple image sub-regions to obtain multiple target image features corresponding to the multiple image sub-regions; Based on the target object detection model, the features of the multiple target images are classified and identified to obtain the image detection results.

2. The image detection method for a vehicle according to claim 1, characterized by, The method further includes: During the image sliding extraction of the multiple regions of interest, the position of the sliding detection window in the image to be detected is monitored. When it is detected that the sliding detection window has moved from the previous sub-region of interest to the current sub-region of interest, the size of the sliding detection window is adjusted based on the detection window size information corresponding to the current sub-region of interest; Based on the adjusted sliding detection window, the image sliding extraction is performed on the current sub-region of interest to obtain the multiple image sub-regions.

3. The image detection method for a vehicle according to claim 1, characterized by, The method further includes: Based on the detection window size information, a sliding detection window is generated corresponding to each of the multiple sub-regions of interest; Parallel image sliding extraction is performed on the plurality of sub-regions of interest based on each of the sliding detection windows to obtain the plurality of image sub-regions.

4. The image detection method for a vehicle according to claim 1, characterized by, The iterative image sliding extraction of the multiple sub-regions of interest based on the detection window size information, obtained by the sliding detection window, includes: For each sub-region of interest, an initial sliding detection window is generated based on the lower limit of the size of the detection window information; Based on the initial sliding detection window, the image sliding extraction is performed on the sub-region of interest. The initial sliding detection window is updated in size based on a preset adjustment ratio to obtain an updated initial sliding detection window; Based on the updated initial sliding detection window, the image sliding extraction is performed on the updated sub-region of interest. The above steps of size update and update traversal image sliding extraction are performed alternately until the iteration end condition is met, thus obtaining the multiple image sub-regions.

5. The image detection method for a vehicle according to claim 1, characterized by, During the image sliding extraction process of the multiple sub-regions of interest, different window sliding steps are used for the multiple sub-regions of interest, and the window sliding step is determined based on the pixel height of the sub-region of interest.

6. The image detection method for a vehicle according to any one of claims 1 to 5, characterized by, The method further includes: The image to be detected is subjected to detection line recognition to obtain a target detection line, which intersects the horizontal direction of the image to be detected; Determining the region of interest (ROI) of the image to be detected based on the current vehicle speed and the camera calibration parameters includes: The region of interest is determined based on the target detection line, the current vehicle speed, and the camera calibration parameters.

7. The image detection method for a vehicle according to any one of claims 1 to 5, characterized by, The region size information of the plurality of sub-regions of interest includes the boundary pixel height of the sub-regions of interest, and the step of determining the detection window size information corresponding to each of the plurality of sub-regions of interest based on the region size information of the plurality of sub-regions of interest and the camera calibration parameters includes: The target height difference corresponding to the camera calibration parameters is determined according to a preset correspondence. The height difference indicates the image pixel height difference between the standard image and the image to be detected. The preset correspondence characterizes the correspondence between multiple pitch angles and multiple image pixel height differences in the camera calibration parameters. The detection window size information is obtained by calculating the window size based on the boundary pixel height of the region of interest, the camera calibration parameters, the target height difference, and the preset size conversion coefficient.

8. An image detection device for a vehicle, characterized by The device includes: The first acquisition module is used to acquire the image to be detected at the target time, as well as the current vehicle speed and camera calibration parameters at the target time. Region of Interest (ROI) Determination Module: Used to determine the region of interest (ROI) of the image to be detected based on the current vehicle speed and the camera calibration parameters; Region of Interest (ROI) Acquisition Module: This module is used to horizontally divide the ROI to obtain multiple ROIs corresponding to the image to be detected and the region size information of the multiple ROIs; the number of the multiple ROIs is positively correlated with the current vehicle speed. Detection window size information determination module: used to determine the detection window size information corresponding to each of the multiple sub-regions of interest based on the region size information of the multiple sub-regions of interest and the camera calibration parameters, wherein the detection window size information indicates the size adjustment range of the sliding detection window; Iterative extraction module: used to perform iterative image sliding extraction on the multiple sub-regions of interest through the sliding detection window based on the detection window size information, to obtain multiple image sub-regions, wherein, for each sub-region of interest, the size of the sliding detection window is different in different iterations of the iterative image sliding extraction; Feature processing module: used to perform feature extraction processing on the multiple image sub-regions to obtain multiple target image features corresponding to the multiple image sub-regions; Recognition module: used to classify and recognize the features of the multiple target images based on the target object detection model, and obtain the image detection results.

Citation Information

Patent Citations

  • Blind area pre-warning system and method based on vehicle-mounted rear-view wide-angle camera

    CN108674313A

  • Camera calibration method and device, electronic equipment and storage medium

    CN113658265A