Vehicle logo detection method, device and equipment, medium and vehicle
By acquiring vehicle images under different exposure modes and using running lights as references, the vehicle logo detection process is simplified, and the problems of inconsistent manual detection and high deep learning cost are solved, and efficient and accurate vehicle logo position detection is achieved.
Patent Information
- Application Number
- CN202410224460.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2044-02-28
AI Technical Summary
In the prior art, vehicle logo detection relies on manual detection methods to cause inconsistent detection standards and time-consuming, and deep learning-based methods require a large amount of image data training, resulting in high detection complexity and high cost.
By acquiring the images of the vehicle under different exposure modes, the position information of the center point of the vehicle logo is obtained by image recognition processing, and the target contour line of the vehicle running light is extracted to determine the position of the vehicle logo, and the vehicle's own running lights are used as reference objects to simplify the detection process.
There is no need to collect a large amount of image data, which reduces the complexity and cost of vehicle logo detection, while improving the accuracy and adaptability of detection.
Smart Images

Figure CN120564110A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a vehicle logo detection method, device, equipment, medium and vehicle. Background Art
[0002] After the vehicle completes all assembly procedures in the final assembly workshop, the vehicle logo needs to be inspected on the final inspection line to check whether the vehicle logo is placed in a certain position, and then determine whether there is any deviation in the vehicle logo, such as whether the vehicle logo is located in the center of the left or right side of the vehicle.
[0003] The inspection process mainly relies on manual inspection methods. However, manual inspection is mostly based on the naked eye observation results of the inspectors. Even for the same vehicle, it may produce different inspection results due to different inspection experience and different observation angles during inspection. This makes it difficult to unify the inspection standards. At the same time, the use of manual inspection methods consumes a long time. In addition, if artificial intelligence is used, the corresponding detection model can be trained and then used to complete the vehicle logo detection work. However, this method requires collecting a large number of detection images and manually annotating the detection images during the model training phase. The time cost, labor cost and even financial cost are relatively high, and the complexity of building the detection model is also high. Therefore, how to quickly complete the detection of the vehicle logo position without using the above methods has become an urgent problem to be solved. Summary of the Invention
[0004] In order to solve the above technical problems, the present disclosure provides a vehicle logo detection method, device, equipment, medium and vehicle.
[0005] A first aspect of the present disclosure provides a vehicle logo detection method, the method comprising:
[0006] Acquire a first image and a second image of the vehicle at the same position, where the first image is an image including the vehicle logo and running lights captured by an image acquisition device in a first exposure mode, and the second image is an image including the vehicle logo and running lights captured by the image acquisition device in a second exposure mode, where the exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode;
[0007] Performing image recognition processing on the first image to obtain central point position information of the vehicle logo in the first image;
[0008] Extracting a target contour line of the vehicle running lights in the second image to obtain target contour line position information of the vehicle running lights in the second image;
[0009] When the distance between the center point of the vehicle logo and the target contour line meets the preset value, it is determined that the vehicle logo meets the position requirement.
[0010] A second aspect of an embodiment of the present disclosure provides a vehicle logo detection device, the device comprising:
[0011] an image acquisition module, configured to acquire a first image and a second image of the vehicle at the same position, wherein the first image is an image including the vehicle logo and running lights acquired by an image acquisition device in a first exposure mode, and the second image is an image including the vehicle logo and running lights acquired by the image acquisition device in a second exposure mode, wherein the exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode;
[0012] a center point acquisition module, configured to perform image recognition processing on the first image to obtain the center point position information of the vehicle logo in the first image;
[0013] a contour extraction module, configured to extract a target contour line of the vehicle running lights in the second image, and obtain target contour line position information of the vehicle running lights in the second image;
[0014] The vehicle logo detection module is used to determine that the vehicle logo meets the position requirement when the distance between the center point of the vehicle logo and the target contour line meets the preset value.
[0015] A third aspect of the present disclosure provides an electronic device, the device including:
[0016] Memory;
[0017] processor; and
[0018] A computer program, wherein the computer program is stored in a memory and is configured to be executed by a processor to implement the vehicle logo detection method of the first aspect as described above.
[0019] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the vehicle logo detection method as described in the first aspect above is implemented.
[0020] A fifth aspect of an embodiment of the present disclosure provides a vehicle, comprising the electronic device of the third aspect described above.
[0021] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art:
[0022] The vehicle logo detection method, device, equipment, medium and vehicle provided by the embodiments of the present disclosure can obtain a first image and a second image of a vehicle at the same position, wherein the first image is an image including the vehicle logo and the running lights acquired by the image acquisition device in the first exposure mode, and the second image is an image including the vehicle logo and the running lights acquired by the image acquisition device in the second exposure mode, and the exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode. After acquiring the first image and the second image, image recognition processing is performed on the first image to obtain the center point position information of the vehicle logo in the first image, and the target contour line of the vehicle running lights in the second image is extracted to obtain the second image. The target contour line position information of the vehicle's running lights in the image. When the distance between the center point of the vehicle logo and the target contour line meets the preset value, it is determined that the vehicle logo meets the position requirement. Therefore, by collecting images containing the vehicle logo and running lights in different exposure modes, the vehicle logo position can be inspected based on the image to determine whether the vehicle logo position meets the requirements. There is no need to collect a large amount of image data, which saves a lot of labor costs, reduces the complexity of vehicle logo detection, and improves the accuracy of vehicle logo detection. In addition, the vehicle's own running lights are used as a significant reference, which is more adaptive than background reference and has higher positioning accuracy than other non-luminous parts of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0024] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0025] Figure 1 is a flow chart of a vehicle logo detection method provided by an embodiment of the present disclosure;
[0026] Figure 2 is a schematic diagram of an image in different exposure modes provided by an embodiment of the present disclosure;
[0027] Figure 3 is a schematic diagram of a target tangent determination method provided by an embodiment of the present disclosure;
[0028] Figure 4 It is a schematic diagram of the basis for vehicle logo detection and judgment provided by an embodiment of the present disclosure;
[0029] Figure 5 is a flow chart of another vehicle logo detection method provided by an embodiment of the present disclosure;
[0030] Figure 6 is a structural diagram of a vehicle logo detection device provided by an embodiment of the present disclosure;
[0031] Figure 7 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0035] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0036] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0037] Typically, existing vehicle logo detection methods, such as deep learning-based visual methods, are artificial intelligence methods that require training machine learning models based on large amounts of two-dimensional image data. Consequently, they require extensive data collection. Furthermore, the vehicle logo detection process places high demands on the images containing the vehicle logo, and in turn, on the vehicle's surroundings. This leads to high detection complexity and inaccuracy. To address this issue, the present disclosure provides a vehicle logo detection method, which is described below in conjunction with specific embodiments.
[0038] Figure 1 This is a flowchart of a vehicle logo detection method provided by an embodiment of the present disclosure. The method can be executed by a vehicle logo detection device. The vehicle logo detection device can be implemented in software and / or hardware. The vehicle logo detection device can be configured in an electronic device, such as a server or terminal or a server cluster. The terminal can specifically include a mobile phone, a computer or tablet computer, a vehicle-mounted terminal, or any device that can be used to process the vehicle logo detection method.
[0039] like Figure 1 As shown, the vehicle logo detection method provided by the embodiment of the present disclosure includes the following steps.
[0040] S110. Acquire a first image and a second image of the vehicle at the same position, where the first image is an image including the vehicle logo and running lights captured by the image acquisition device in a first exposure mode, and the second image is an image including the vehicle logo and running lights captured by the image acquisition device in a second exposure mode, and the exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode.
[0041] In an embodiment of the present disclosure, when the electronic device needs to detect the position of the vehicle logo or receives a vehicle logo detection instruction, it obtains a first image and a second image of the vehicle at the same position, wherein the first image is an image corresponding to the front or rear of the vehicle captured by the image acquisition device in the first exposure mode, which includes the vehicle logo and running lights, and the second image is an image corresponding to the front or rear of the vehicle captured by the image acquisition device in the second exposure mode, which also includes the vehicle logo and running lights.
[0042] In the disclosed embodiments, the term "same location" can be understood as meaning that the relative position of the image capture device and the vehicle remains unchanged, specifically including the position of the vehicle logo and running lights, such as the front or rear of the vehicle. Because the relative position of the image capture device and the vehicle remains unchanged, the first and second images contain the same object, and the same object is located in the same position in both images.
[0043] The driving lights can be the front and rear star ring lights that remain on when the vehicle is moving between various workstations or when the vehicle is in operation.
[0044] In the embodiment of the present disclosure, the vehicle on which the vehicle logo position detection is performed may be a vehicle equipped with an annular running light, such as a through-type running light.
[0045] In the embodiment of the present disclosure, the image acquisition device may be any device capable of acquiring images, such as a camera or a webcam.
[0046] In the embodiment of the present disclosure, the first exposure mode can be the acquisition mode corresponding to the image acquisition device under normal exposure; the second exposure mode can be the acquisition mode corresponding to the image acquisition device under low exposure. The specific exposure values may vary slightly depending on the specifications and models of the image acquisition device.
[0047] Among them, the first image and the second image are both images of the front of the vehicle or both images of the rear of the vehicle. When the first image and the second image are both images of the front of the vehicle, they are used to detect the logo on the front of the vehicle; when the first image and the second image are both images of the rear of the vehicle, they are used to detect the logo on the rear of the vehicle.
[0048] The first image captured in the first exposure mode is an image including the vehicle logo; the second image captured in the second exposure mode is an image including the vehicle running lights.
[0049] Figure 2 is a schematic diagram of an image under different exposure modes provided by an embodiment of the present disclosure, such as Figure 2 As shown, the captured image is the front of the vehicle as an example for explanation, 10 is the image corresponding to the front of the vehicle captured in the first exposure mode, and 20 is the image corresponding to the front of the vehicle captured in the second exposure mode.
[0050] In some embodiments of the present disclosure, the first image and the second image are images corresponding to the front or rear of the vehicle to be detected by the vehicle logo, which are pre-captured and stored in the electronic device. They are carried in the vehicle logo detection instruction. When the electronic device receives the vehicle logo detection instruction, it parses the vehicle logo detection instruction to obtain the first image and the second image.
[0051] In other embodiments of the present disclosure, the first image and the second image are images obtained by controlling the image acquisition device to capture the front or rear of the vehicle corresponding to the vehicle logo in real time in different exposure modes (such as the first exposure mode and the second exposure mode, respectively) after the electronic device receives the vehicle logo detection instruction, according to the vehicle logo to be detected carried in the vehicle logo detection instruction. The image acquisition device uploads the captured images to the electronic device, and the electronic device obtains the first image and the second image.
[0052] S120 , performing image recognition processing on the first image to obtain central point position information of the vehicle logo in the first image.
[0053] In an embodiment of the present disclosure, after acquiring the first image and the second image, the electronic device performs image recognition processing on the first image to obtain the center point position information of the vehicle logo in the first image.
[0054] In some embodiments of the present disclosure, after acquiring the first image and the second image, the electronic device may compare the first image with a preset image template in the form of a sliding window, slide the preset image template based on a preset step size, and calculate the similarity value between the regional image in the first image contained in each sliding window and the preset image template, and then determine the position of the car logo in the first image based on the similarity value. In addition, the preset image template may be marked with the center point of the car logo, so the position of the center point of the car logo in the first image can also be obtained. The specific implementation method of comparing the first image with the preset image template in the form of a sliding window and calculating the similarity value of each window of the first image and the preset image module is similar to the existing specific implementation method of matching two images in the form of a sliding window, and will not be repeated here.
[0055] In other embodiments of the present disclosure, the electronic device can input the first image into a pre-trained machine learning model, perform image recognition processing on the first image, and obtain the center point of the vehicle logo, where the pre-trained machine learning model can be any model for identifying and detecting images, and there is no limitation here.
[0056] S130 : Extract target contour lines of the vehicle running lights in the second image to obtain target contour line position information of the vehicle running lights in the second image.
[0057] In an embodiment of the present disclosure, after acquiring the first image and the second image, the electronic device extracts the target contour line of the vehicle running lights in the second image to obtain the target contour line position information of the vehicle running lights.
[0058] Specifically, after acquiring the first image and the second image, the electronic device can identify the second image, determine the area where the running lights are located in the second image, and then determine the target contour line position information of the vehicle running lights based on the pixel points corresponding to the area where the running lights are located and the coordinate information of the pixel points.
[0059] S140: When the distance between the center point of the vehicle logo and the target contour line meets a preset value, it is determined that the vehicle logo meets the position requirement.
[0060] In the disclosed embodiment, after obtaining the center point position information of the vehicle logo and the outline position information of the vehicle's running lights, the electronic device detects the position of the vehicle logo based on the center point position information and the outline position information of the vehicle's running lights, and determines whether the vehicle logo position meets a preset position requirement. Specifically, the vehicle logo is determined to meet the position requirement when the distance between the center point of the vehicle logo and the target tangent meets the preset distance.
[0061] Specifically, the electronic device determines the distance from the center point of the vehicle logo to the vertical straight line of the outline of the vehicle running lights based on the center point position information and the outline position information of the vehicle running lights, determines whether the distance of the vehicle logo relative to the front or rear of the vehicle meets the preset position requirement based on whether the close distance of the vertical straight line meets the preset distance threshold, and determines the distance from the center point of the vehicle logo to the left and right sides of the outline of the vehicle running lights, and determines whether the distance of the vehicle logo position relative to the left and right sides of the vehicle meets the preset position requirement based on whether the distances to the left and right sides of the outline of the vehicle running lights are equal.
[0062] In an embodiment of the present disclosure, a first image and a second image of a vehicle at the same position can be acquired. The first image is an image including a vehicle logo and running lights, acquired by an image acquisition device in a first exposure mode, and the second image is an image including the vehicle logo and running lights, acquired by the image acquisition device in a second exposure mode. The exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode. After acquiring the first and second images, image recognition processing is performed on the first image to obtain position information of the center point of the vehicle logo in the first image. Target contour lines are extracted from the vehicle running lights in the second image to obtain target contour line position information of the vehicle running lights in the second image. When the distance between the center point of the vehicle logo and the target contour line meets a preset value, the vehicle logo is determined to meet position requirements. Thus, by acquiring images including the vehicle logo and running lights in different exposure modes, the vehicle logo position can be verified based on the images to determine whether the vehicle logo position meets the requirements. This eliminates the need to acquire a large amount of image data, saves significant labor costs, reduces the complexity of vehicle logo detection, and improves the accuracy of vehicle logo detection. Furthermore, using the vehicle's own running lights as salient reference objects is more adaptive than background reference and achieves higher positioning accuracy than other non-luminous parts of the vehicle.
[0063] On the basis of the above-mentioned embodiments of the present disclosure, in S130, target contour lines of the vehicle running lights in the second image are extracted to obtain target contour line position information of the vehicle running lights in the second image, which may specifically include: segmenting the second image based on a preset image segmentation method to obtain at least one alternative contour line in the second image; taking the alternative contour line with the largest number of pixels in at least one alternative contour line as the target contour line; and determining the position information of the target contour line in the second image as the target contour line position information of the vehicle running lights.
[0064] In the embodiment of the present disclosure, the preset image segmentation method may be an adaptive binarization method or other image segmentation algorithms, which are not limited here.
[0065] In the embodiment of the present disclosure, the electronic device segments the second image based on a preset image segmentation method to obtain at least one alternative contour line in the second image. The specific implementation method is similar to the existing implementation method of image segmentation based on image segmentation technology, and will not be repeated here.
[0066] In the embodiment of the present disclosure, the candidate contour lines may be understood as a plurality of contour lines present in the second image, including the contour lines of the vehicle's running lights.
[0067] In an embodiment of the present disclosure, the electronic device can determine the target contour line from at least one alternative contour line by sorting. Specifically, the sorting process can be to sort from high to low or from low to high according to the number of pixel points, so as to determine the alternative contour line with the largest number of pixel points and determine it as the target contour line.
[0068] The position information of the target contour line can be understood as the coordinate information of the pixel points corresponding to the target contour line.
[0069] In the embodiment of the present disclosure, before segmenting the second image, the method may further include: performing denoising on the second image to remove noise in the second image, thereby further improving the accuracy of the obtained contour line of the vehicle running lights.
[0070] In some embodiments of the present disclosure, after obtaining the second image, the electronic device may input the second image into a pre-trained machine learning model, perform contour line recognition on the second image based on the pre-trained machine learning model, obtain the target contour line of the vehicle running lights, and then determine the target contour line position information based on the pixel coordinates of the target contour line.
[0071] In the embodiment of the present disclosure, it is possible to obtain multiple contour lines corresponding to the second image by performing segmentation processing on the second image captured in the second exposure mode based on a preset image segmentation method, sort the number of pixel points corresponding to the multiple contour lines, obtain a target contour line with the largest number of pixel points, and determine the position information of the target contour line as the contour line position information of the vehicle running lights, thereby improving the accuracy of the obtained contour line position information of the vehicle running lights.
[0072] In an embodiment of the present disclosure, in S140, when the distance between the center point of the vehicle logo and the target contour line meets a preset value, it is determined that the vehicle logo meets the position requirement, which can specifically include: parametrically modeling the target contour line of the vehicle running lights based on the target contour line position information of the vehicle running lights, and obtaining a fitting curve corresponding to the target contour line of the vehicle running lights; determining the target tangent line with the smallest distance from the center point of the vehicle logo in the fitting curve; when the distance between the center point of the vehicle logo and the target tangent line meets the preset distance, it is determined that the vehicle logo meets the position requirement.
[0073] Among them, parameterized modeling of the target contour line of the vehicle running lights is performed to obtain a fitting curve corresponding to the target contour line of the vehicle running lights, which can specifically include: substituting the coordinates of the target pixel point corresponding to the target contour line position information into a preset fitting formula to obtain fitting parameters corresponding to the preset fitting formula; and obtaining the fitting curve based on the fitting parameters and the coordinates of the target pixel point.
[0074] In the embodiment of the present disclosure, the preset fitting formula may be a curve fitting formula, such as a quartic curve fitting formula, a quintic curve fitting formula, a sextic curve fitting formula, and the like.
[0075] For example, the quartic curve fitting formula is used as an example for explanation. The quartic curve fitting formula is: V = au 4 +bu 3 +cu 2 +du+e, where a, b, c, d, and e are the fitting parameters to be determined, V is the ordinate of the target pixel, and u is the abscissa of the target pixel. Substitute the abscissa and ordinate of all target pixels into the quartic curve fitting formula, and use the least squares method to solve it to obtain the optimal solution a of the equation. f 、b f 、c f d f 、e f , determine the optimal solution as the fitting parameter corresponding to the fitting formula, and then according to a f 、b f 、c f d f 、e f and the coordinates of the target pixel point to obtain the fitting curve.
[0076] In the embodiment of the present disclosure, when the preset fitting formula is a quintic curve fitting formula or a sextic curve fitting formula, the specific implementation method for obtaining the fitting curve is similar to that of the quartic curve fitting formula, and will not be elaborated here.
[0077] In the embodiment of the present disclosure, by substituting the coordinates of the target pixel point corresponding to the target contour line into the preset fitting formula, the fitting parameters corresponding to the preset fitting formula can be obtained, and then the fitting curve can be obtained according to the fitting parameters and the coordinates of the target pixel point. The fitting curve thus obtained is a curve that can fit the central part of the contour line of the vehicle's running lights, making the obtained fitting curve more accurate and practical.
[0078] In an embodiment of the present disclosure, determining a target tangent line in the fitting curve that is at the smallest distance from the center point of the vehicle logo may specifically include: determining the target center point of the fitting curve; taking a line connecting the center point and the target center point as a reference, obtaining multiple straight lines passing through the center point of the vehicle logo at preset angle intervals to obtain multiple intersection points of the multiple straight lines with the fitting curve; determining multiple tangent lines on the fitting curve that pass through the multiple intersection points, and calculating the distance from the center point of the vehicle logo to the multiple tangent lines, and determining the tangent line with the smallest distance from the center point of the vehicle logo as the target tangent line.
[0079] In the embodiment of the present disclosure, the preset angle interval may be a pre-set angle interval, for example, the preset angle interval may be any value between 0.1° and 1.0°, or other values may be used as the preset angle interval.
[0080] Figure 3 is a schematic diagram of a target tangent determination method provided by an embodiment of the present disclosure, specifically Figure 3 Take this as an example to explain in detail. Figure 3 As shown, point O is the center point of the vehicle logo, point P is the midpoint of the fitting curve, i.e., the target center point. Taking the line OP between point 0 and point P as a reference, the preset angles, i.e., the angle between the line OA between point O and point A and the line OP, and the angle between the line OB between point O and point B and the line OP, are expanded to the left and right respectively. For example, the preset angle can be 30°. Then, the preset angle between the line OA and the line OP is divided according to the preset angle interval. At the same time, the preset angle between the line OB and the line OP is divided according to the preset angle interval. A plurality of lines passing through the center point O and intersecting with the fitting curve C, as well as a plurality of intersection points of the plurality of lines with the fitting curve are obtained. Then, a plurality of tangents of the fitting curve passing through the plurality of intersection points are determined, and the distance between the center point O and the plurality of tangents is calculated. The tangent with the smallest distance to the center point is determined as the target tangent.
[0081] In an embodiment of the present disclosure, after obtaining the target tangent, the electronic device determines that the vehicle logo meets the position requirement when the distance between the center point of the vehicle logo and the target contour line meets the preset value. This may specifically include: determining a parallel line passing through the center point of the vehicle logo and parallel to the target tangent, and obtaining two intersection points of the parallel line and the fitting curve; calculating a first distance and a second distance from the center point of the vehicle logo to the two intersection points respectively; determining that the vehicle logo position meets the preset position requirement when the difference between the first distance and the second distance is within a preset difference range, and / or the third distance from the center point of the vehicle logo to the target tangent meets a preset distance threshold.
[0082] In the embodiment of the present disclosure, the preset difference range may be a preset difference range used to determine whether the vehicle logo meets a preset position requirement in the horizontal direction (ie, the distance from the left and right sides of the vehicle).
[0083] The preset distance threshold may be a preset distance threshold used to determine whether the vehicle logo in the vertical direction (ie, the distance from the front or rear of the vehicle) meets a preset position requirement.
[0084] Figure 4 This is a schematic diagram of the vehicle logo detection and judgment basis provided by the embodiment of the present disclosure, such as Figure 4 As shown, point O is the center point of the vehicle logo, tangent M is the target tangent, tangent N is a straight line parallel to tangent M and passing through the center point O, and the first distance L1 and the second distance L2 from point O to the two intersection points of tangent N and the fitting curve are calculated respectively. When L1 is equal to L2 or the difference between L1 and L2 is within the preset difference range, it is determined that the position of the vehicle logo meets the preset position requirement in the horizontal direction; at the same time, the third distance from point O to tangent M is compared with the preset distance threshold. When the third distance meets the preset distance threshold, it is determined that the position of the vehicle logo meets the preset position requirement in the vertical direction.
[0085] In the disclosed embodiment, the vehicle's running lights can be used as the basis for vehicle logo detection. By determining the horizontal and vertical distances between the center point of the vehicle logo and the fitting curve corresponding to the vehicle's running lights, it is determined whether the vehicle logo position meets the preset position requirements in the horizontal and vertical directions. This reduces the complexity of vehicle logo detection and improves the accuracy of vehicle logo detection.
[0086] Figure 5 is a flow chart of another vehicle logo detection method provided by an embodiment of the present disclosure. Figure 5 As shown, the vehicle logo detection method may specifically include the following steps:
[0087] S510. Acquire a first image and a second image of the vehicle at the same position, where the first image is an image including the vehicle logo and running lights captured by the image acquisition device in a first exposure mode, and the second image is an image including the vehicle logo and running lights captured by the image acquisition device in a second exposure mode, and the exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode.
[0088] S520: Perform image recognition processing on the first image to obtain the center point position information of the vehicle logo in the first image.
[0089] S530: Segment the second image based on a preset image segmentation method to obtain at least one candidate contour line in the second image.
[0090] S540 , sorting the number of pixels corresponding to at least one candidate contour line, and taking the candidate contour line with the largest number of pixels as the target contour line.
[0091] S550: Determine the position information of the target contour line in the second image as the target contour line position information of the vehicle's running lights.
[0092] S560 : performing parameterized modeling on the target contour line of the vehicle running light based on the target contour line position information of the vehicle running light, and obtaining a fitting curve corresponding to the target contour line of the vehicle running light.
[0093] S570: Determine the target tangent line in the fitting curve that has the smallest distance from the center point of the vehicle logo.
[0094] S580 , determining a parallel line passing through the center point of the vehicle logo and parallel to the target tangent line, obtaining two intersection points of the parallel line and the fitting curve, and calculating a first distance and a second distance from the center point of the vehicle logo to the two intersection points, respectively.
[0095] S590: When the difference between the first distance and the second distance is within a preset difference range, and / or the third distance from the center point of the vehicle logo to the target tangent meets a preset distance threshold, determine that the vehicle logo meets the position requirement.
[0096] It should be noted that the specific implementation of steps S510 to S590 is similar to that in the above embodiment and will not be described in detail here.
[0097] In an embodiment of the present disclosure, a first image and a second image containing a vehicle logo and running lights captured by an image capture device at the same position and in different exposure modes can be obtained. According to the characteristics of the images captured in different exposure modes, image recognition processing can be performed on the first image to obtain the position information of the center point of the vehicle logo. At the same time, segmentation processing can be performed on the second image to obtain at least one candidate contour line corresponding to the second image. The number of pixel points corresponding to the at least one candidate contour line is sorted, and the candidate contour line with the largest number of pixel points is used as the target contour line. The position information of the target contour line in the second image is determined as the target contour line position information of the vehicle running lights, and then the target contour line of the vehicle running lights is determined. Parametric modeling is performed to obtain a fitting curve corresponding to a target contour line of the vehicle running lights, a target tangent line with the smallest distance from the center point in the fitting curve is determined, and further a parallel line passing through the center point and parallel to the target tangent line is determined, and two intersection points with the fitting curve are determined, and a first distance and a second distance from the center point of the vehicle logo to the two intersection points are calculated. When the difference between the first distance and the second distance is within a preset difference range, and / or the third distance from the center point of the vehicle logo to the target tangent line meets a preset distance threshold, it is determined that the position of the vehicle logo meets the preset position requirement. Thus, the vehicle logo can be detected using the vehicle running lights as a reference for vehicle logo detection, thereby reducing the complexity of vehicle logo detection and improving the accuracy of vehicle logo detection.
[0098] Figure 6 The figure is a schematic diagram of the structure of a vehicle logo detection device provided in an embodiment of the present disclosure. The vehicle logo detection device in the embodiment of the present disclosure can be installed in an electronic device, which can be a server, terminal, or server cluster. The terminal can specifically include a mobile phone, computer, tablet computer, vehicle-mounted terminal, or any other device capable of processing the vehicle logo detection method, without limitation.
[0099] like Figure 6 As shown, the vehicle logo detection device 600 may include an image acquisition module 610 , a center point acquisition module 620 , a contour extraction module 630 and a vehicle logo detection module 640 .
[0100] The image acquisition module 610 can be used to acquire a first image and a second image of the vehicle at the same position, where the first image is an image containing the vehicle logo and running lights captured by the image acquisition device in a first exposure mode, and the second image is an image containing the vehicle logo and running lights captured by the image acquisition device in a second exposure mode, and the exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode.
[0101] The center point acquisition module 620 may be configured to perform image recognition processing on the first image to obtain the center point position information of the vehicle logo in the first image.
[0102] The contour extraction module 630 may be configured to extract a target contour line of the vehicle running lights in the second image, and obtain target contour line position information of the vehicle running lights in the second image.
[0103] The vehicle logo detection module 640 may be configured to determine that the vehicle logo meets a position requirement when the distance between the center point of the vehicle logo and the target contour line meets a preset value.
[0104] In an embodiment of the present disclosure, a first image and a second image of a vehicle at the same position can be acquired. The first image is an image including a vehicle logo and running lights, acquired by an image acquisition device in a first exposure mode, and the second image is an image including the vehicle logo and running lights, acquired by the image acquisition device in a second exposure mode. The exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode. After acquiring the first and second images, image recognition processing is performed on the first image to obtain position information of the center point of the vehicle logo in the first image. Target contour lines are extracted from the vehicle running lights in the second image to obtain target contour line position information of the vehicle running lights in the second image. When the distance between the center point of the vehicle logo and the target contour line meets a preset value, the vehicle logo is determined to meet position requirements. Thus, by acquiring images including the vehicle logo and running lights in different exposure modes, the vehicle logo position can be verified based on the images to determine whether the vehicle logo position meets the requirements. This eliminates the need to acquire a large amount of image data, saves significant labor costs, reduces the complexity of vehicle logo detection, and improves the accuracy of vehicle logo detection. Furthermore, using the vehicle's own running lights as salient reference objects is more adaptive than background reference and achieves higher positioning accuracy than other non-luminous parts of the vehicle.
[0105] In some embodiments of the present disclosure, the contour extraction module 630 may include a segmentation unit, a sorting unit, and a contour line determination unit.
[0106] The segmentation unit may be configured to perform segmentation processing on the second image based on a preset image segmentation method to obtain at least one candidate contour line in the second image.
[0107] The sorting unit may be configured to select the candidate contour line having the largest number of pixels among the at least one candidate contour line as the target contour line.
[0108] The contour line determination unit may be configured to determine position information of the target contour line in the second image as target contour line position information of the vehicle running lights.
[0109] In some embodiments of the present disclosure, the vehicle logo detection module 640 may include a fitting unit, a tangent determination unit, and a vehicle logo detection unit.
[0110] The fitting unit can be used to perform parameterized modeling on the target contour line of the vehicle running light based on the target contour line position information of the vehicle running light, and obtain a fitting curve corresponding to the target contour line of the vehicle running light.
[0111] The tangent determination unit may be used to determine a target tangent line in the fitting curve that has the smallest distance from the center point of the vehicle logo.
[0112] The vehicle logo detection unit may be configured to determine that the vehicle logo meets a position requirement when the distance between the center point of the vehicle logo and the target tangent meets a preset distance.
[0113] In some embodiments of the present disclosure, the fitting unit can be specifically used to substitute the coordinates of the target pixel point corresponding to the target contour line position information into a preset fitting formula to obtain the fitting parameters corresponding to the preset fitting formula; and obtain a fitting curve based on the fitting parameters and the coordinates of the target pixel point.
[0114] In some embodiments of the present disclosure, the tangent determination unit can be specifically used to obtain multiple straight lines passing through the center point of the vehicle logo at preset angle intervals, and obtain multiple intersection points of the multiple straight lines and the fitting curve; determine multiple tangents passing through the multiple intersection points on the fitting curve, and calculate the distance from the center point of the vehicle logo to the multiple tangents, and determine the tangent with the smallest distance from the center point of the vehicle logo as the target tangent.
[0115] In some embodiments of the present disclosure, the vehicle logo detection unit can be specifically used to determine a parallel line passing through the center point of the vehicle logo and parallel to the target tangent, and obtain two intersection points of the parallel line and the fitting curve; calculate the first distance and the second distance from the center point of the vehicle logo to the two intersection points respectively; when the difference between the first distance and the second distance is within a preset difference range, and / or the third distance from the center point of the vehicle logo to the target tangent meets the preset distance threshold, determine that the vehicle logo position meets the preset position requirement.
[0116] It should be noted that Figure 6 The vehicle logo detection device 600 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.
[0117] Figure 7 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.
[0118] In the embodiments of the present disclosure, Figure 7 The electronic device shown can be a server or a terminal or a server cluster, wherein the terminal can specifically include a mobile phone, a computer or a tablet computer, a vehicle-mounted terminal, or any device that can be used for the vehicle logo detection method, etc., and is not limited here.
[0119] like Figure 7As shown, the electronic device may include a processor 710 and a memory 720 storing computer program instructions.
[0120] Specifically, the processor 710 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0121] Memory 720 may include a large-capacity memory for information or instructions. By way of example, and not limitation, memory 720 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 720 may include removable or non-removable (or fixed) media. Where appropriate, memory 720 may be internal or external to the integrated gateway device. In certain embodiments, memory 720 is non-volatile solid-state memory. In certain embodiments, memory 720 includes read-only memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0122] The processor 710 reads and executes the computer program instructions stored in the memory 720 to perform the steps of the vehicle logo detection method provided in the embodiment of the present disclosure.
[0123] In one example, the electronic device may further include a transceiver 730 and a bus 740. Figure 7 As shown, the processor 710 , the memory 720 and the transceiver 730 are connected via a bus 740 and communicate with each other.
[0124] The bus 740 includes hardware, software, or both. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus 740 may include one or more buses.
[0125] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the vehicle logo detection method provided by the embodiments of the present disclosure.
[0126] The aforementioned storage medium may, for example, include a memory 720 of computer program instructions, which may be executed by the processor 710 of the electronic device to implement the vehicle logo detection method provided in the embodiment of the present disclosure. Alternatively, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, or an optical data storage device.
[0127] The embodiments of the present disclosure further provide a vehicle, which includes electronic equipment and can implement the various processes and effects in the above embodiments of the present disclosure, which will not be described in detail here.
[0128] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article or apparatus.
[0129] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle logo detection method, characterized in that: The method comprises: Acquire a first image and a second image of a vehicle at the same position, where the first image is an image including the vehicle logo and running lights captured by an image acquisition device in a first exposure mode, and the second image is an image including the vehicle logo and running lights captured by the image acquisition device in a second exposure mode, wherein the exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode; Performing image recognition processing on the first image to obtain center point position information of the vehicle logo in the first image; extracting a target contour line of the vehicle running lights in the second image to obtain target contour line position information of the vehicle running lights in the second image; When the distance between the center point of the vehicle logo and the target contour line meets a preset value, it is determined that the vehicle logo meets the position requirement.
2. The method according to claim 1, characterized in that The extracting the target contour line of the vehicle running lights in the second image to obtain the target contour line position information of the vehicle running lights in the second image includes: performing segmentation processing on the second image based on a preset image segmentation method to obtain at least one candidate contour line in the second image; The candidate contour line with the largest number of pixels among the at least one candidate contour line is used as the target contour line; The position information of the target contour line in the second image is determined as the target contour line position information of the vehicle running light.
3. The method according to claim 1, characterized in that When the distance between the center point of the vehicle logo and the target contour line meets a preset value, determining that the vehicle logo meets the position requirement includes: performing parameterized modeling on the target contour line of the vehicle running light based on the target contour line position information of the vehicle running light, and obtaining a fitting curve corresponding to the target contour line of the vehicle running light; Determine the target tangent line with the shortest distance from the center point of the vehicle logo in the fitting curve; When the distance between the center point of the vehicle logo and the target tangent meets the preset distance, it is determined that the vehicle logo meets the position requirement.
4. The method according to claim 3, characterized in that The performing parameterized modeling on the target contour line of the vehicle running light based on the target contour line position information of the vehicle running light to obtain a fitting curve corresponding to the target contour line of the vehicle running light includes: Substituting the coordinates of the target pixel point corresponding to the target contour line position information into a preset fitting formula to obtain fitting parameters corresponding to the preset fitting formula; The fitting curve is obtained according to the fitting parameters and the coordinates of the target pixel point.
5. The method according to claim 3, characterized in that Determining the target tangent line with the smallest distance from the center point of the vehicle logo in the fitting curve includes: Acquire multiple straight lines passing through the center point of the vehicle logo at preset angle intervals, and obtain multiple intersection points of the multiple straight lines and the fitting curve; A plurality of tangent lines passing through the plurality of intersection points on the fitting curve are determined, and distances from the center point of the vehicle logo to the plurality of tangent lines are calculated, and a tangent line having the smallest distance from the center point of the vehicle logo is determined as the target tangent line.
6. The method according to claim 3, characterized in that When the distance between the center point of the vehicle logo and the target tangent line meets the preset distance, determining that the vehicle logo meets the position requirement includes: Determine a parallel line passing through the center point of the vehicle logo and parallel to the target tangent line, and obtain two intersection points of the parallel line and the fitting curve; Calculate a first distance and a second distance from the center point of the vehicle logo to the two intersection points respectively; When the difference between the first distance and the second distance is within a preset difference range, and / or a third distance from the center point of the vehicle logo to the target tangent meets a preset distance threshold, it is determined that the vehicle logo meets the position requirement.
7. A vehicle logo detection device, characterized in that: include: an image acquisition module, configured to acquire a first image and a second image of the vehicle at the same position, wherein the first image is an image including the vehicle logo and running lights acquired by an image acquisition device in a first exposure mode, and the second image is an image including the vehicle logo and running lights acquired by the image acquisition device in a second exposure mode, wherein the exposure corresponding to the first exposure mode is greater than the exposure corresponding to the second exposure mode; a center point acquisition module, configured to perform image recognition processing on the first image to obtain center point position information of the vehicle logo in the first image; a contour extraction module, configured to extract a target contour line of the vehicle running lights in the second image, and obtain target contour line position information of the vehicle running lights in the second image; The vehicle logo detection module is used to determine that the vehicle logo meets the position requirement when the distance between the center point of the vehicle logo and the target contour line meets a preset value.
8. An electronic device, characterized in that: include: Memory; processor; as well as computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method according to any one of claims 1 to 6.
9. 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 according to any one of claims 1 to 6 is implemented.
10. A vehicle, characterized in that: Comprising the electronic device as claimed in claim 8.
Citation Information
Patent Citations
Vehicle high beam light turn-on detection method and device, electronic equipment and video camera
CN108875458A
Method and apparatus for vehicle light detection, electronic device, and storage medium
WO2023029467A1