A method, device and apparatus for detecting red oil markings on automotive parts

CN117372371BActive Publication Date: 2026-10-23GAC HONDA AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311359386.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-19
Publication Date
2026-10-23
Estimated Expiration
2043-10-19

AI Technical Summary

Technical Problem

人工目视检查受检测人员检测经验,身体状态因素的影响,检测的品质难以稳定保证

Benefits of technology

[0051]本发明通过获取待检测图像;基于目标检测算法,确定待检测图像中的待检测零件类别和待检测位置;根据待检测零件类别,确定相应的最优预设HSV参数和最优红油阈值;基于最优预设HSV参数,计算待检测位置的红色像素面积占比,得到待检测位置的红色像素面积阈值;将红色像素面积阈值与最优红油阈值进行对比,确定待检测图像的检测结果,检测结果用于指示待检测图像中是否有红油标记。通过设定最优预设HSV参数和最优红油阈值,判断待检测图像是否存在红油标记,减少了人工及零件材质因素的干扰,提高了对汽车零部件红油标记检测的准确性、可靠性和检测效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117372371B_ABST
    Figure CN117372371B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of detection automobile parts red oil mark method, device and equipment, belong to automobile parts technical field.The present application obtains the image to be detected;Determine the part class to be detected and the position to be detected in the image to be detected based on target detection algorithm;According to the part class to be detected, determine the corresponding optimal preset HSV parameter and optimal red oil threshold;Based on optimal preset HSV parameter, calculate the red pixel area proportion of the position to be detected, obtain the red pixel area threshold of the position to be detected;The red pixel area threshold is compared with optimal red oil threshold, determine the detection result of the image to be detected, detection result is used to indicate whether there is red oil mark in the image to be detected.The optimal preset HSV parameter and optimal red oil threshold are set, whether the image to be detected exists red oil mark is judged, the interference of artificial and part material factor is reduced, the accuracy, reliability and detection efficiency of automobile parts red oil mark detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automotive parts technology, specifically relating to a method, apparatus, and equipment for detecting red oil markings on automotive parts. Background Technology

[0002] During the assembly of automotive parts, bolts and nuts need to reach a certain specified torque value when tightened according to the assembly process requirements. In order to ensure that the corresponding torque specifications are met, the assembly process generally requires two steps: a first tightening and a second torque confirmation. Moreover, there are hundreds of types of bolts and nuts involved.

[0003] The secondary torque process typically involves using a torque wrench with vermilion oil applied to the corresponding socket. When the operator uses the torque wrench to confirm the secondary torque of the bolt and nut, the vermilion oil from the socket will adhere to the end faces of the bolt and nut. The presence of this red oil mark on the bolt and nut end faces indicates whether the bolt and nut have undergone the secondary torque process and whether they meet the process requirements. Additionally, some bolts and nuts do not require a socket for the torque wrench; in these cases, a red oil-based pen is used to draw a line to indicate that they have undergone the secondary torque process. Therefore, checking for the corresponding red oil mark on the end faces of bolts and nuts is a way to inspect the assembly status of these fasteners on automobiles.

[0004] Currently, the inspection of red paint markings on automotive parts mainly involves manual visual inspection and image comparison using vision equipment. Manual visual inspection is affected by the inspector's experience and physical condition, making it difficult to consistently guarantee the quality of the inspection. The method of identifying red paint markings by comparing images acquired using vision equipment requires the inspected parts to be in a relatively stable condition, and for parts that have undergone quenching, it is difficult to distinguish the presence or absence of red paint markings in the image. Summary of the Invention

[0005] Therefore, the present invention provides a method, apparatus and equipment for detecting red oil markings on automotive parts, which helps to reduce interference from human factors and part material factors during the detection of red oil markings on automotive parts, and improves the accuracy, reliability and efficiency of the detection of red oil markings on automotive parts.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for detecting red oil markings on automotive parts, comprising:

[0008] Acquire the image to be detected;

[0009] Based on the target detection algorithm, the category and location of the parts to be detected in the image to be detected are determined;

[0010] Based on the category of the part to be tested, determine the corresponding optimal preset HSV parameters and optimal red oil threshold.

[0011] Based on the optimal preset HSV parameters, the proportion of red pixel area at the location to be detected is calculated to obtain the red pixel area threshold at the location to be detected.

[0012] The red pixel area threshold is compared with the optimal red oil threshold to determine the detection result of the image to be detected. The detection result is used to indicate whether there is a red oil mark in the image to be detected.

[0013] Further, the step of calculating the proportion of red pixel area at the location to be detected based on the optimal preset HSV parameters, and obtaining the red pixel area threshold at the location to be detected, includes:

[0014] The location to be detected is subjected to HSV dimension transformation to obtain the corresponding transformed HSV dimension;

[0015] The area of ​​the red pixels at the detection location is determined based on the fact that the converted HSV dimension is within the range of the optimal preset HSV parameters.

[0016] The red pixel area threshold at the detection location is obtained based on the ratio of the area of ​​the red pixel at the detection location to the area of ​​the detection location.

[0017] Further, determining the corresponding optimal preset HSV parameters and optimal red oil threshold based on the category of the part to be detected includes:

[0018] Acquire multiple sample detection images of the same type of part to be detected; wherein, the sample detection images are labeled with preset tags, the preset tags being used to indicate whether the sample detection images have red oil markings;

[0019] Based on multiple preset HSV parameters, the red pixel area threshold for each sample detection image is determined under each preset HSV parameter.

[0020] Under each preset HSV parameter, the threshold of the largest red pixel area in the sample detection image without red oil marking is determined as the candidate red oil threshold;

[0021] Based on the candidate red oil threshold, the sample detection images marked with red oil are detected, and the sample detection images in which the red pixel area threshold in the sample detection images marked with red oil is greater than the candidate red oil threshold are determined as target images;

[0022] Based on the number of target images and the number of sample detection images marked with red oil, the red oil detection rate of the target image corresponding to each preset HSV parameter is determined;

[0023] The preset HSV parameters and candidate red oil thresholds corresponding to the highest red oil detection rate of the target image are determined as the optimal preset HSV parameters and optimal red oil thresholds for the part category to be detected.

[0024] Further, the step of comparing the red pixel area threshold with the optimal red oil threshold to determine the detection result of the image to be detected includes:

[0025] If the red pixel area threshold is greater than or equal to the optimal red oil threshold, then the detection result of the image to be detected is determined to be marked with red oil.

[0026] If the red pixel area threshold is less than the optimal red oil threshold, then the detection result of the image to be detected is determined to be without red oil marking.

[0027] Furthermore, the method also includes:

[0028] The preset label of the image to be detected is determined based on the detection result of the image to be detected;

[0029] The image to be detected containing the preset label is added to the sample detection image, and the optimal preset HSV parameters and the optimal red oil threshold are re-determined to iteratively update the optimal preset HSV parameters and the optimal red oil threshold.

[0030] Furthermore, after determining that the detection result of the image to be detected is that there is no red oil mark, the method further includes:

[0031] The first alarm is triggered to indicate that there is no red oil mark in the image to be detected.

[0032] Furthermore, the method also includes:

[0033] Within a preset time period, the detection results of multiple images to be detected are obtained respectively;

[0034] If the number of errors in the detection results exceeds the first preset threshold, a second early warning is triggered to indicate that the on-site image acquisition equipment needs maintenance.

[0035] If the number of times no red oil mark is found in the test results exceeds the second preset threshold, a third warning prompt will be triggered to indicate that there is an abnormality in the on-site red oil application process.

[0036] Secondly, the present invention provides an apparatus for detecting red oil markings on automotive parts, comprising:

[0037] The acquisition module is used to acquire the image to be detected;

[0038] The detection location determination module is used to determine the category and detection location of the part to be detected in the image to be detected based on the target detection algorithm;

[0039] The parameter threshold determination module is used to determine the corresponding optimal preset HSV parameters and optimal red oil threshold according to the category of the part to be detected;

[0040] The red pixel area threshold determination module is used to calculate the proportion of red pixel area at the location to be detected based on the optimal preset HSV parameters, and obtain the red pixel area threshold at the location to be detected.

[0041] The detection module is used to compare the red pixel area threshold with the optimal red oil threshold to determine the detection result of the image to be detected. The detection result is used to indicate whether there is a red oil mark in the image to be detected.

[0042] Furthermore, the device also includes an early warning module, wherein the early warning module is specifically used for:

[0043] When the detection result of the image to be detected is determined to be free of red oil markings, a first alarm is triggered to indicate that there are no red oil markings in the image to be detected; and,

[0044] Within a preset time period, the detection results of multiple images to be detected are obtained respectively;

[0045] If the number of errors in the detection results exceeds the first preset threshold, a second early warning is triggered to indicate that the on-site image acquisition equipment needs maintenance.

[0046] If the number of times no red oil mark is found in the test results exceeds the second preset threshold, a third warning prompt will be triggered to indicate that there is an abnormality in the on-site red oil application process.

[0047] Thirdly, the present invention provides a device for detecting red oil markings on automotive parts, comprising:

[0048] One or more memories on which executable programs are stored;

[0049] One or more processors are configured to execute the executable program in the memory to implement the steps of any of the methods described above.

[0050] The present invention, by adopting the above technical solution, has at least the following beneficial effects:

[0051] This invention acquires an image to be inspected; based on a target detection algorithm, it determines the category and location of the part to be inspected in the image; according to the category of the part to be inspected, it determines the corresponding optimal preset HSV parameters and optimal red paint threshold; based on the optimal preset HSV parameters, it calculates the proportion of red pixel area at the location to be inspected, obtaining the red pixel area threshold at the location to be inspected; and it compares the red pixel area threshold with the optimal red paint threshold to determine the detection result of the image to be inspected. The detection result is used to indicate whether there is a red paint mark in the image to be inspected. By setting the optimal preset HSV parameters and the optimal red paint threshold, the invention determines whether there is a red paint mark in the image to be inspected, reducing the interference of human factors and part material factors, and improving the accuracy, reliability, and efficiency of red paint mark detection for automotive parts.

[0052] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0053] To more clearly illustrate the technical solutions 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.

[0054] Figure 1 This is a flowchart illustrating a method for detecting red oil markings on automotive parts according to an embodiment of the present invention;

[0055] Figure 2 This is a block diagram illustrating a device for detecting red oil markings on automotive parts, as shown in an embodiment of the present invention.

[0056] Figure 3 This is a block diagram illustrating another device for detecting red oil markings on automotive parts, as shown in an embodiment of the present invention.

[0057] Figure 4 This is a block diagram illustrating a device for detecting red oil markings on automotive parts, as shown in an embodiment of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0059] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for detecting red oil markings on automotive parts, as shown in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0060] Step S11: Obtain the image to be detected;

[0061] Step S12: Based on the target detection algorithm, determine the category and location of the part to be detected in the image to be detected;

[0062] Step S13: Determine the corresponding optimal preset HSV parameters and optimal red oil threshold according to the category of the part to be detected;

[0063] Step S14: Based on the optimal preset HSV parameters, calculate the proportion of red pixel area at the location to be detected, and obtain the red pixel area threshold at the location to be detected.

[0064] Step S15: Compare the red pixel area threshold with the optimal red oil threshold to determine the detection result of the image to be detected. The detection result is used to indicate whether there is a red oil mark in the image to be detected.

[0065] In this embodiment, the executing entity can be an electronic device such as a terminal device or a server.

[0066] The electronic device can acquire the image to be inspected. The image to be inspected is the image of the car parts that need to be checked for the presence of red paint markings.

[0067] Furthermore, electronic devices can also use object detection algorithms to determine the category and location of parts to be detected in an image. Object detection algorithms, also known as object extraction, are a type of image segmentation based on the geometric and statistical features of objects. By using object detection algorithms to determine the category and location of parts to be detected in the image, preparation is made for subsequent detection of the presence or absence of red paint markings.

[0068] Furthermore, the electronic equipment can further determine the corresponding optimal preset HSV parameters and optimal red paint threshold based on the category of the part to be inspected. It should be noted that in the assembly process of automotive parts, the parts requiring inspection of red paint markings are generally bolts and nuts, and there are hundreds of types of bolts and nuts involved. Since the image state of the red paint markings on each type of bolt and nut is not exactly the same after the secondary torque process, each type of part to be inspected has different optimal preset HSV parameters and optimal red paint thresholds. The optimal preset HSV parameter is the optimal parameter range determined based on the sample inspection image; this parameter can be used to determine whether a pixel in the image is a red pixel. The optimal red paint threshold is used to determine whether there is a red paint marking in the image to be inspected. Differentiated parameter settings for various categories of parts to be inspected can improve the accuracy and reliability of the inspection.

[0069] Then, the electronic device can calculate the proportion of red pixel area at the detection location based on the optimal preset HSV parameters, thus obtaining the red pixel area threshold for the detection location. The red pixel area threshold is compared with the optimal red paint threshold to determine whether there is a red paint mark in the image to be detected. By setting the optimal preset HSV parameters and the optimal red paint threshold, the method of determining whether the part to be detected has been coated with red paint reduces interference from human factors and part material factors, improves the accuracy and reliability of detection, and increases production efficiency and quality.

[0070] It is understood that this invention acquires an image to be detected; determines the category and location of the part to be detected in the image based on a target detection algorithm; determines the corresponding optimal preset HSV parameters and optimal red paint threshold according to the part category; calculates the proportion of red pixel area at the location to be detected based on the optimal preset HSV parameters, obtaining the red pixel area threshold at the location to be detected; and compares the red pixel area threshold with the optimal red paint threshold to determine the detection result of the image to be detected. The detection result is used to indicate whether there is a red paint mark in the image to be detected. By setting the optimal preset HSV parameters and the optimal red paint threshold, the presence of a red paint mark in the image to be detected is determined, reducing the interference of human factors and part material factors, and improving the accuracy, reliability, and efficiency of detecting red paint marks on automotive parts.

[0071] Further, the step of calculating the proportion of red pixel area at the location to be detected based on the optimal preset HSV parameters, and obtaining the red pixel area threshold at the location to be detected, includes:

[0072] The location to be detected is subjected to HSV dimension transformation to obtain the corresponding transformed HSV dimension;

[0073] The area of ​​the red pixels at the detection location is determined based on the fact that the converted HSV dimension is within the range of the optimal preset HSV parameters.

[0074] The red pixel area threshold at the detection location is obtained based on the ratio of the area of ​​the red pixel at the detection location to the area of ​​the detection location.

[0075] It should be noted that HSV dimensions are a color space distribution that includes three dimensions: hue, saturation, and lightness. Different combinations of these three dimensions can form different colors. The optimal preset HSV parameters are the optimal parameter range determined based on sample detection images. These parameters can be used to determine whether a pixel in the image is a red pixel.

[0076] It should be noted that since the R, G, and B components of the color of an object in an image are all related to the amount of light hitting the object, image descriptions based on these components make object identification more difficult. HSV, by separating color from saturation and pseudo-illumination, abstracts color and is therefore more suitable for object detection.

[0077] Specifically, in the detection of red paint markings on automotive parts, the image of the location to be detected is converted from RGB to HSV dimension, resulting in the corresponding converted HSV dimension, or HSV data structure. Pixels whose converted HSV dimension falls within the optimal preset HSV parameter range are considered red pixels, and the area of ​​the red pixels at the detection location is determined. Finally, based on the ratio of the area of ​​the red pixels at the detection location to the area of ​​the detection location itself, a threshold for the area of ​​the red pixels at the detection location is obtained. By converting the image of the location to be detected from RGB to HSV dimension, red paint markings are easier to identify and have higher resolution.

[0078] Further, determining the corresponding optimal preset HSV parameters and optimal red oil threshold based on the category of the part to be detected includes:

[0079] Acquire multiple sample detection images of the same type of part to be detected; wherein, the sample detection images are labeled with preset tags, the preset tags being used to indicate whether the sample detection images have red oil markings;

[0080] Based on multiple preset HSV parameters, the red pixel area threshold for each sample detection image is determined under each preset HSV parameter.

[0081] Under each preset HSV parameter, the threshold of the largest red pixel area in the sample detection image without red oil marking is determined as the candidate red oil threshold;

[0082] Based on the candidate red oil threshold, the sample detection images marked with red oil are detected, and the sample detection images in which the red pixel area threshold in the sample detection images marked with red oil is greater than the candidate red oil threshold are determined as target images;

[0083] Based on the number of target images and the number of sample detection images marked with red oil, the red oil detection rate of the target image corresponding to each preset HSV parameter is determined;

[0084] The preset HSV parameters and candidate red oil thresholds corresponding to the highest red oil detection rate of the target image are determined as the optimal preset HSV parameters and optimal red oil thresholds for the part category to be detected.

[0085] It should be noted that each type of part to be inspected corresponds to a set of optimal preset HSV parameters and optimal red oil threshold. The optimal preset HSV parameters and optimal red oil threshold are determined by analyzing the sample inspection images, and the specific steps are as follows:

[0086] 1) Obtain multiple sample detection images of the same type of part to be inspected. Each sample detection image is labeled with a preset label, which indicates whether there is a red oil mark in the sample detection image.

[0087] 2) Based on multiple preset HSV parameters, determine the red pixel area threshold for each sample detection image under each preset HSV parameter. The preset HSV parameters are pre-set parameters that determine whether a pixel in the sample detection image is red. The area of ​​red pixels in the sample detection image is calculated, and the ratio of the red pixel area to the total area of ​​the sample detection image is used to obtain the red pixel area threshold for the detection location. This yields the red pixel area threshold for each sample detection image under each preset HSV parameter.

[0088] 3) Under each preset HSV parameter, in the sample detection image without red oil markers, the threshold of the largest red pixel area is determined as the candidate red oil threshold.

[0089] 4) Based on the selected candidate red oil threshold, the sample detection images with red oil markings are detected. The sample detection images with red oil markings whose red pixel area threshold is greater than the candidate red oil threshold are determined as target images. That is, the sample detection images with red oil markings whose red pixel area threshold is greater than the candidate red oil threshold are re-determined as having red oil markings; the sample detection images with red oil markings whose red pixel area threshold is less than the candidate red oil threshold are re-determined as not having red oil markings.

[0090] 5) Based on the number of target images and the number of sample images with red oil markings, determine the red oil detection rate of the target image corresponding to each preset HSV parameter; whereby the red oil detection rate of the target image is the proportion of the target image in the sample images with red oil markings.

[0091] 6) The preset HSV parameters and candidate red oil thresholds corresponding to the highest red oil detection rate of the target image are determined as the optimal preset HSV parameters and optimal red oil thresholds for the type of part to be detected.

[0092] By determining the optimal preset HSV parameters and optimal red oil threshold for each type of part to be inspected, it can be ensured that the red pigment area threshold of parts without red oil markings is less than the optimal red oil threshold, so that parts without red oil markings can be detected, while parts with red oil markings also have a very high detection rate.

[0093] Further, the step of comparing the red pixel area threshold with the optimal red oil threshold to determine the detection result of the image to be detected includes:

[0094] If the red pixel area threshold is greater than or equal to the optimal red oil threshold, then the detection result of the image to be detected is determined to be marked with red oil.

[0095] If the red pixel area threshold is less than the optimal red oil threshold, then the detection result of the image to be detected is determined to be without red oil marking.

[0096] Specifically, the presence of red oil markings in the image to be detected is determined by comparing the red pixel area threshold with the optimal red oil threshold. If the red pixel area threshold is greater than or equal to the optimal red oil threshold, then the image to be detected is determined to contain red oil markings. If the red pixel area threshold is less than the optimal red oil threshold, then the image to be detected is determined to contain no red oil markings.

[0097] Furthermore, the method also includes:

[0098] The preset label of the image to be detected is determined based on the detection result of the image to be detected;

[0099] The image to be detected containing the preset label is added to the sample detection image, and the optimal preset HSV parameters and the optimal red oil threshold are re-determined to iteratively update the optimal preset HSV parameters and the optimal red oil threshold.

[0100] It should be noted that image acquisition equipment may wear out after prolonged use, causing the shooting angle of the target detection position in the image to shift, which affects the shooting angle and quality of the image. This may lead to misjudgments of various parameter thresholds for the detection position. Therefore, it is necessary to iteratively update the optimal preset HSV parameters and the optimal red oil threshold to ensure high accuracy and robustness without lag during the detection process.

[0101] The preset label is used to indicate whether there is a red oil mark in the image to be detected. After the image to be detected is detected, the image to be detected is labeled with the preset label according to the detection results; then, the image to be detected labeled with the preset label is added to the sample detection image to update the sample detection image, thereby redetermining the optimal preset HSV parameters and the optimal red oil threshold, and iteratively updating the optimal preset HSV parameters and the optimal red oil threshold.

[0102] Furthermore, after determining that the detection result of the image to be detected is that there is no red oil mark, the method further includes:

[0103] The first alarm is triggered to indicate that there is no red oil mark in the image to be detected.

[0104] Specifically, in this embodiment, the first alarm is used to remind the operator that the detection result of the image to be inspected is that there is no red paint mark. During the detection of red paint marks on automotive parts, if no red paint mark is detected, the detection result is fed back to the front end, and the front end issues a first alarm to remind the operator that the image to be inspected has no red paint mark applied.

[0105] Furthermore, the method also includes:

[0106] Within a preset time period, the detection results of multiple images to be detected are obtained respectively;

[0107] If the number of errors in the detection results exceeds the first preset threshold, a second early warning is triggered to indicate that the on-site image acquisition equipment needs maintenance.

[0108] If the number of times no red oil mark is found in the test results exceeds the second preset threshold, a third warning prompt will be triggered to indicate that there is an abnormality in the on-site red oil application process.

[0109] It should be noted that the second warning is used to remind operators that the current on-site image acquisition equipment is malfunctioning and requires maintenance; the third warning is used to remind operators that the current on-site red paint application process is malfunctioning.

[0110] The preset time period, the first preset threshold, and the second preset threshold are values ​​preset based on actual production experience. In this embodiment, no specific limitations are imposed on them.

[0111] If, within a preset time period, the number of errors in the detection results of multiple images to be detected exceeds a first preset threshold, it indicates that there has been a significant change in the on-site image acquisition equipment. The front end can then issue a second warning to alert the operator that the on-site image acquisition equipment needs maintenance.

[0112] If, within a preset time period, the number of times no red oil mark is found in the detection results of multiple images to be detected exceeds the second preset threshold, then although no error has occurred in the detection results, the number of times no red oil mark is found exceeds the second preset threshold, indicating that the red oil mark has not been applied. The front end can then issue a third warning to indicate that there is an abnormality in the on-site red oil application process.

[0113] Please see Figure 2 , Figure 2 This is a block diagram illustrating a device for detecting red paint markings on automotive parts, as shown in an embodiment of the present invention. The device may include:

[0114] Acquisition module 21 is used to acquire the image to be detected;

[0115] The detection location determination module 22 is used to determine the category and detection location of the part to be detected in the image to be detected based on the target detection algorithm;

[0116] The parameter threshold determination module 23 is used to determine the corresponding optimal preset HSV parameters and optimal red oil threshold according to the category of the part to be detected;

[0117] The red pixel area threshold determination module 24 is used to calculate the proportion of red pixel area at the location to be detected based on the optimal preset HSV parameters, and obtain the red pixel area threshold at the location to be detected.

[0118] The detection module 25 is used to compare the red pixel area threshold with the optimal red oil threshold to determine the detection result of the image to be detected. The detection result is used to indicate whether there is a red oil mark in the image to be detected.

[0119] Regarding the device for detecting red oil markings on automotive parts in the above embodiments, the specific operation methods of each module have been described in detail in the embodiments of the related methods described above, and will not be elaborated here.

[0120] Please see Figure 3 , Figure 3 This is a block diagram illustrating another device for detecting red paint markings on automotive parts, as shown in an embodiment of the present invention. The device may further include:

[0121] Early warning module 26, wherein the early warning module 26 is specifically used for:

[0122] When the detection result of the image to be detected is determined to be free of red oil markings, a first alarm is triggered to indicate that there are no red oil markings in the image to be detected; and,

[0123] Within a preset time period, the detection results of multiple images to be detected are obtained respectively;

[0124] If the number of errors in the detection results exceeds the first preset threshold, a second early warning is triggered to indicate that the on-site image acquisition equipment needs maintenance.

[0125] If the number of times no red oil mark is found in the test results exceeds the second preset threshold, a third warning prompt will be triggered to indicate that there is an abnormality in the on-site red oil application process.

[0126] Regarding the device for detecting red oil markings on automotive parts in the above embodiments, the specific operation methods of each module have been described in detail in the embodiments of the related methods described above, and will not be elaborated here.

[0127] Please see Figure 4 , Figure 4 This is a block diagram illustrating an embodiment of the present invention for a device for detecting red oil markings on automotive parts. The device includes:

[0128] One or more memories 31, on which executable programs are stored;

[0129] One or more processors 32 are configured to execute the executable program in the memory 31 to implement the steps of any of the methods described above.

[0130] Regarding the device for detecting red oil markings on automotive parts in the above embodiments, the specific manner in which the processor 32 executes the program in the memory 31 has been described in detail in the embodiments related to the method, and will not be elaborated here.

[0131] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0132] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" or "more" means at least two.

[0133] It should be understood that when an element is referred to as "fixed to" or "set on" another element, it may be directly on the other element or may have an intervening element present at the same time; when an element is referred to as "connected to" another element, it may be directly connected to the other element or may have an intervening element present at the same time. In addition, the term "connected" as used herein may include wireless connections; the word "and / or" as used includes any unit and all combinations of one or more of the associated listed items.

[0134] Any process or method description in the flowchart or otherwise herein can be understood as: representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0135] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0136] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0137] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0138] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0139] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0140] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for detecting red oil markings on automotive parts, characterized in that, include: Acquire the image to be detected; Based on the target detection algorithm, the category and location of the parts to be detected in the image to be detected are determined; Based on the category of the part to be detected, the corresponding optimal preset HSV parameters and optimal red oil threshold are determined, specifically including: acquiring multiple sample detection images of the same category of the part to be detected; wherein, the sample detection images are labeled with preset tags, which are used to indicate whether the sample detection images have red oil markings; based on multiple preset HSV parameters, determining the red pixel area threshold of each sample detection image under each preset HSV parameter; under each preset HSV parameter, determining the largest red pixel area threshold in the sample detection images without red oil markings as the candidate red oil threshold; based on the candidate red oil threshold, detecting the sample detection images with red oil markings, and determining the sample detection images with red oil markings whose red pixel area threshold is greater than the candidate red oil threshold as target images; based on the number of target images and the number of sample detection images with red oil markings, determining the red oil detection rate of the target images corresponding to each preset HSV parameter; determining the preset HSV parameters and candidate red oil thresholds corresponding to the highest value of the red oil detection rate of the target images as the optimal preset HSV parameters and optimal red oil thresholds for the category of the part to be detected; Based on the optimal preset HSV parameters, the proportion of red pixel area at the location to be detected is calculated to obtain the red pixel area threshold at the location to be detected. The red pixel area threshold is compared with the optimal red oil threshold to determine the detection result of the image to be detected. The detection result is used to indicate whether there is a red oil mark in the image to be detected. The method further includes: The preset label of the image to be detected is determined based on the detection result of the image to be detected; the image to be detected containing the preset label is added to the sample detection image, and the optimal preset HSV parameter and the optimal red oil threshold are re-determined, so as to iteratively update the optimal preset HSV parameter and the optimal red oil threshold.

2. The method according to claim 1, characterized in that, The step of calculating the proportion of red pixel area at the location to be detected based on the optimal preset HSV parameters, and obtaining the red pixel area threshold at the location to be detected, includes: The location to be detected is subjected to HSV dimension transformation to obtain the corresponding transformed HSV dimension; The area of ​​the red pixels at the detection location is determined based on the fact that the converted HSV dimension is within the range of the optimal preset HSV parameters. The red pixel area threshold at the detection location is obtained based on the ratio of the area of ​​the red pixel at the detection location to the area of ​​the detection location.

3. The method according to claim 1, characterized in that, The step of comparing the red pixel area threshold with the optimal red oil threshold to determine the detection result of the image to be detected includes: If the red pixel area threshold is greater than or equal to the optimal red oil threshold, then the detection result of the image to be detected is determined to be marked with red oil. If the red pixel area threshold is less than the optimal red oil threshold, then the detection result of the image to be detected is determined to be without red oil marking.

4. The method according to claim 1, characterized in that, After determining that there are no red oil markings in the image to be detected, the method further includes: The first alarm is triggered to indicate that there is no red oil mark in the image to be detected.

5. The method according to claim 4, characterized in that, The method further includes: Within a preset time period, the detection results of multiple images to be detected are obtained respectively; If the number of errors in the detection results exceeds the first preset threshold, a second early warning is triggered to indicate that the on-site image acquisition equipment needs maintenance. If the number of times no red oil mark is found in the test results exceeds the second preset threshold, a third warning prompt will be triggered to indicate that there is an abnormality in the on-site red oil application process.

6. A device for detecting red oil markings on automotive parts, characterized in that, The apparatus for performing the method as described in any one of claims 1-5, the apparatus comprising: The acquisition module is used to acquire the image to be detected; The detection location determination module is used to determine the category and detection location of the part to be detected in the image to be detected based on the target detection algorithm; The parameter threshold determination module is used to determine the corresponding optimal preset HSV parameters and optimal red oil threshold according to the category of the part to be detected; The red pixel area threshold determination module is used to calculate the proportion of red pixel area at the location to be detected based on the optimal preset HSV parameters, and obtain the red pixel area threshold at the location to be detected. The detection module is used to compare the red pixel area threshold with the optimal red oil threshold to determine the detection result of the image to be detected. The detection result is used to indicate whether there is a red oil mark in the image to be detected.

7. The apparatus according to claim 6, characterized in that, The device further includes an early warning module, wherein the early warning module is specifically used for: When the detection result of the image to be detected is determined to be free of red oil markings, a first alarm is triggered to indicate that there are no red oil markings in the image to be detected; and, Within a preset time period, the detection results of multiple images to be detected are obtained respectively; If the number of errors in the detection results exceeds the first preset threshold, a second early warning is triggered to indicate that the on-site image acquisition equipment needs maintenance. If the number of times no red oil mark is found in the test results exceeds the second preset threshold, a third warning prompt will be triggered to indicate that there is an abnormality in the on-site red oil application process.

8. A device for detecting red paint markings on automotive parts, characterized in that, include: One or more memories on which executable programs are stored; One or more processors are configured to execute the executable program in the memory to implement the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Binarization method, device and equipment for blue target

    CN111523551A

  • Object detection method, object detection device and electronic equipment

    CN112347887A