Seal ring assembly detection method, system, medium and device based on halcon algorithm
By adopting an automated detection method based on the Halcon algorithm, the problem of accuracy in detecting the assembly status of the sealing ring of the sweeping robot was solved, achieving efficient and accurate assembly status assessment and ensuring product quality consistency.
Patent Information
- Application Number
- CN202211608634.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-12-14
AI Technical Summary
In the existing technology, the inspection of the assembly status of the sealing ring of the sweeping machine relies on manual visual inspection, which results in low inspection accuracy and inconsistent results, making it impossible to inspect according to the consistency standard.
A method based on the Halcon algorithm is adopted, which uses an industrial camera to take segmented pictures of the sealing ring, and uses the Halcon algorithm to determine the diameter and distance of the reference line and the detection point, so as to realize the automated detection of the assembly status of the sealing ring.
It improves the accuracy of sealing ring assembly status detection, ensures that products meet consistency standards, and enhances the reliability and efficiency of detection through indicator lights and alarm messages.
Smart Images

Figure CN115979151B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, system, medium, and device for detecting the assembly of sealing rings based on the Halcon algorithm. Background Technology
[0002] Robotic vacuum cleaners are a type of smart home appliance that can automatically clean floors in a room using artificial intelligence technology. They typically use a combination of brushing and vacuuming to collect debris into their own dustbin, thus completing the cleaning process.
[0003] The sweeper includes a base for automatically collecting garbage. In industrial production, the assembly status of the sealing ring of the automatic garbage collection base is usually inspected manually. The accuracy of the inspection cannot be guaranteed. Furthermore, due to the differences in the vision of different people, the judgment results of manual inspection are inconsistent. The assembly status of the sealing ring cannot be inspected according to a consistent standard, resulting in low accuracy of the inspection of the assembly status of the sealing ring. Summary of the Invention
[0004] In order to ensure that the assembly status of the sealing ring is inspected according to a consistent standard and to improve the accuracy of the sealing ring assembly status inspection, this application provides a sealing ring assembly inspection method, system, medium and device based on the Halcon algorithm.
[0005] The first aspect of this application provides a sealing ring assembly inspection method based on the Halcon algorithm, applied to an inspection device equipped with an industrial camera, and employing the following technical solution:
[0006] The industrial camera is controlled to take pictures of the sealing ring assembled on the sweeper in sequence according to the preset coil segments, so as to obtain pictures corresponding to each coil segment;
[0007] Based on the Halcon algorithm, the reference line of each coil segment is determined in the corresponding photo of each coil segment, and the diameter of multiple preset detection point coils and the distance from the center point of the multiple detection point coils to the reference line are determined.
[0008] The assembly status of the sealing ring is detected based on the diameter of multiple preset detection point coils and the distance from the center point of the multiple detection point coils to the reference line.
[0009] By adopting the above technical solution, an industrial camera is controlled to take pictures of the sealing ring sequentially according to the preset coil segments, obtaining pictures of each coil segment. Based on the Halcon algorithm, the pictures are analyzed and processed to obtain the diameter of multiple preset detection point coils and the distance from the center point of multiple detection point coils to the reference line. The diameter of multiple preset detection point coils can be used to determine whether the sealing ring is too tight during installation, and the distance from the center point of multiple detection point coils to the reference line can be used to determine whether the sealing ring is installed off-center. This is used to detect the assembly state of the sealing ring, so that the assembly state of the sealing ring is detected according to a consistent standard, improving the accuracy of the sealing ring assembly state detection, thereby producing more standardized products.
[0010] Optionally, before controlling the industrial camera to take pictures of the sealing ring assembled on the sweeper in sequence according to the preset coil segments, the method further includes: obtaining a power-on command and initializing the parameters; determining the position coordinates of the sealing ring assembled on the sweeper; and dividing the sealing ring into multiple preset coil segments according to the position coordinates of the sealing ring and a preset coordinate division rule, wherein each coil segment is within the shooting range of the industrial camera.
[0011] By adopting the above technical solution, the parameters are initialized when the machine is turned on, and the previous data is cleared so that the current detection data can be recorded. Since the sealing ring is large, it is divided into multiple preset coil segments according to the preset coordinate division rules so that the industrial camera can take pictures of each coil segment.
[0012] Optionally, controlling the industrial camera to take pictures of the sealing ring assembled on the sweeper in sequence according to preset coil segments, and obtaining pictures corresponding to each coil segment, includes: controlling the industrial camera to take pictures of the sealing ring assembled on the sweeper in sequence according to preset coil segments; determining whether the industrial camera has completed the task of taking pictures of the multiple preset coil segments; if completed, obtaining pictures corresponding to each coil segment; if not completed, continuing to execute the step of controlling the industrial camera to take pictures of the sealing ring assembled on the sweeper in sequence according to preset coil segments, until the task of taking pictures of all the preset coil segments is completed.
[0013] By adopting the above technical solution, the industrial camera is controlled to take pictures of the preset coils in sequence until the task of taking pictures of multiple preset coil segments is completed, thus completing the image of the entire sealing ring. The assembly status of the sealing ring is detected by taking pictures of the entire sealing ring, so that the assembly status of the sealing ring is detected according to a consistent standard, thereby improving the accuracy of the sealing ring assembly status detection.
[0014] Optionally, the reference line for each coil segment is determined in the corresponding photo based on the Halcon algorithm, including: obtaining the position coordinates of the marker points on the sweeping machine, and determining the reference line for each coil segment based on the position coordinates of the marker points and the preset vertical distance between the position coordinates of the marker points and the reference line.
[0015] By adopting the above technical solution, the reference line for each coil segment is determined based on the position coordinates of the marker points on the sweeper and the vertical distance between the preset marker point position coordinates and the reference line, thus avoiding misjudging the position of the reference line and further improving the accuracy of detection.
[0016] Optionally, determining the diameters of the multiple preset detection point coils and the distance from the center point of the multiple detection point coils to the reference line includes: determining the multiple preset detection point coils based on the position coordinates of the marker point; obtaining the diameters of the multiple preset detection point coils and the center point of the diameters of the multiple preset detection point coils; and determining the distance from the center point of the diameters of the multiple preset detection point coils to the reference line.
[0017] By adopting the above technical solution, multiple preset detection point coils can be accurately located according to the position of the marked points during each round of testing, avoiding the situation where the determined detection points are not on the sealing ring, which would lead to inaccurate test results.
[0018] Optionally, the step of detecting the assembly status of the sealing ring based on the diameters of the multiple preset detection point coils and the distances from the center points of the multiple detection point coils to the reference line includes: determining whether the diameters of the multiple preset detection point coils are all within a first preset range, and determining whether the distances from the center points of the multiple detection point coils to the reference line are within a second preset range; if the diameters of the multiple preset detection point coils are all within the first preset range, and the distances from the center points of the multiple detection point coils to the reference line are all within the second preset range, then the assembly status of the sealing ring is determined to be qualified; if at least one of the diameters of the multiple preset detection point coils is not within the first preset range, and / or at least one of the distances from the center points of the multiple detection point coils to the reference line is not within the second preset range, then the assembly status of the sealing ring is determined to be unqualified.
[0019] By adopting the above technical solution, the diameter of multiple preset detection point coils can be used to determine whether the sealing ring is too tight during installation, and the distance from the center point of multiple detection point coils to the reference line can be used to determine whether the sealing ring is installed off-center. This is used to detect the assembly status of the sealing ring, so that the assembly status of the sealing ring is detected according to a consistent standard, thereby improving the accuracy of the sealing ring assembly status detection.
[0020] Optionally, the method further includes: issuing a green light when the assembly status of the sealing ring is determined to be qualified; issuing a red light and displaying an alarm message when the assembly status of the sealing ring is determined to be unqualified, the alarm message including the reason for the unqualified status.
[0021] By adopting the above technical solution, corresponding indicator lights are issued according to the test results. The indicator lights can clearly indicate the test results, which is low-cost and simple. When the test fails, an alarm message indicating the reason for the failure will be displayed to remind personnel why the sealing ring fails the test and to repair the sealing ring in time.
[0022] A second aspect of this application provides a sealing ring assembly inspection system based on the Halcon algorithm, the system comprising:
[0023] The photo acquisition module is used to control the industrial camera to take pictures of the sealing ring assembled on the sweeper in sequence according to the preset coil segments, and obtain the photos corresponding to each coil segment;
[0024] The data acquisition module is used to determine the reference line of each coil segment in the corresponding photo of each coil segment based on the Halcon algorithm, and to determine the diameter of multiple preset detection point coils and the distance from the center point of the multiple detection point coils to the reference line.
[0025] The detection module is used to detect the assembly status of the sealing ring based on the diameter of multiple preset detection point coils and the distance from the center point of the multiple detection point coils to the reference line.
[0026] By adopting the above technical solution, the diameter of multiple preset detection point coils can be used to determine whether the sealing ring is too tight during installation, and the distance from the center point of multiple detection point coils to the reference line can be used to determine whether the sealing ring is installed off-center. This allows for the detection of the sealing ring's assembly status, ensuring that the sealing ring's assembly status is detected according to a consistent standard, thereby improving the accuracy of the sealing ring assembly status detection and producing more standardized products.
[0027] A third aspect of this application provides a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the method steps described above.
[0028] A fourth aspect of this application provides an electronic device comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the method steps described above.
[0029] In summary, this application includes at least one of the following beneficial technical effects:
[0030] 1. This application can determine whether the sealing ring is too tight during installation by measuring the diameter of multiple preset detection point coils, and can determine whether the sealing ring is misaligned by measuring the distance from the center point of the multiple detection point coils to the reference line. This is used to detect the assembly state of the sealing ring, so that the assembly state of the sealing ring can be detected according to a consistent standard, thereby improving the accuracy of the sealing ring assembly state detection and producing more standardized products.
[0031] 2. Based on the position coordinates of the markers on the sweeper and the perpendicular distance between the preset marker position coordinates and the reference line, determine the reference line for each coil segment to avoid mispositioning of the reference line and further improve the accuracy of detection;
[0032] 3. Based on the test results, corresponding indicator lights will be issued to indicate the test results. The indicator lights can clearly show the test results, which is low-cost and simple. When the test fails, an alarm message indicating the reason for the failure will be displayed to remind personnel why the sealing ring failed the test and to repair the sealing ring in time. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a schematic flowchart of a sealing ring assembly and detection method based on the Halcon algorithm provided in an embodiment of this application;
[0035] Figure 2 This is a schematic flowchart of another sealing ring assembly and detection method based on the Halcon algorithm provided in an embodiment of this application;
[0036] Figure 3 This is a detection example diagram corresponding to one of the coil segments in the sealing ring provided in this application embodiment;
[0037] Figure 4 This is an example principle flowchart of a sealing ring assembly and detection method based on the Halcon algorithm provided in an embodiment of this application;
[0038] Figure 5 This is a schematic diagram of a sealing ring assembly and detection system module based on the Halcon algorithm provided in an embodiment of this application;
[0039] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0040] Explanation of reference numerals in the attached diagram: 1. Photo acquisition module; 2. Data acquisition module; 3. Detection module; 1000. Electronic device; 1001. Processor; 1002. Communication bus; 1003. User interface; 1004. Network interface; 1005. Memory. Detailed Implementation
[0041] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0042] In the description of the embodiments in this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.
[0043] In the description of the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, B existing alone, or A and B existing simultaneously. Furthermore, unless otherwise stated, the term "multiple" means two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.
[0044] With the development of modern science and technology, smart homes are an inevitable trend. As a smart home appliance, the robotic vacuum cleaner possesses a certain degree of artificial intelligence, enabling it to autonomously perform cleaning tasks, freeing people's hands and improving work efficiency. At the same time, the industrial production volume of robotic vacuum cleaners is gradually increasing. The structure of a robotic vacuum cleaner includes a base for automatically collecting debris. During industrial production, the inspection of the assembly status of the sealing rings of this base is usually done manually by visual inspection. This method lacks accuracy, and due to differences in the visual perception of different personnel, the judgment results during manual inspection vary, making it impossible to inspect the assembly status of the sealing rings according to a consistent standard.
[0045] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems will be described in detail below with reference to specific embodiments. The following embodiments can be combined with each other. For the same or similar probabilities or processes, they may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0046] In one embodiment, such as Figure 1 As shown, a flowchart illustrating a sealing ring assembly inspection method based on the Halcon algorithm is presented. This method is mainly applied in inspection equipment, and the specific methods include:
[0047] Step 10: Control the industrial camera to take pictures of the sealing ring assembled on the sweeper in sequence according to the preset coil segments, and obtain the corresponding pictures of each coil segment.
[0048] In this embodiment of the application, the industrial camera is a key component of the machine vision system, which can acquire image information of the object being inspected.
[0049] Furthermore, in this embodiment of the application, the sealing ring is a sealing ring assembled on the base of the automatic garbage collection of the sweeper charging pile. The sealing ring is stuck in the base groove. In order to detect whether the sealing ring is assembled properly, the assembly status of the sealing ring needs to be detected during industrial production.
[0050] Specifically, an industrial camera is installed on the testing equipment. During industrial production, workers place the product to be tested into the testing equipment. In this embodiment, the product to be tested refers to a sweeper equipped with a sealing ring. When the testing equipment detects the product in a preset area, it determines the position coordinates of the sealing ring assembled on the sweeper and controls the industrial camera to take pictures of the sealing ring assembled on the sweeper sequentially according to preset coil segments, obtaining pictures corresponding to each coil segment. Since the sealing ring has a large area, and to obtain more accurate and clear pictures, the sealing ring is usually divided into multiple preset coil segments, and each coil segment is within the shooting range of the industrial camera. The coil segments are divided into multiple preset coil segments according to the position coordinates of the sealing ring and a preset coordinate division rule. The number of coil segments can be set by the user.
[0051] For example, in this embodiment of the application, multiple preset coil segments are set to five segments, which correspond to five different parts of the sealing ring. These five parts constitute a complete sealing ring. The detection equipment controls an industrial camera to take pictures of these five coil segments sequentially. After each picture is taken, it is determined whether the industrial camera has completed the task of taking pictures of the five coil segments. If not, the step of controlling the industrial camera to take pictures of the five coil segments sequentially continues until the task of taking pictures of the five coil segments is completed, so as to obtain a complete picture of the five coil segments.
[0052] Based on the above embodiments, as an optional embodiment, before controlling the industrial camera to take pictures of the sealing rings assembled on the sweeper in sequence according to the preset coil segments, the method further includes:
[0053] The testing equipment receives a power-on command and initializes its parameters accordingly, clearing previous data to facilitate the acquisition and recording of current testing data. The upper and lower light sources installed on the testing equipment are illuminated to provide a suitable photographic environment. The testing equipment determines the position coordinates of the sealing ring assembled on the sweeper within a preset area. Based on these coordinates, the sealing ring is divided into multiple preset coil segments according to a preset coordinate division rule. This preset coordinate division rule is determined manually through multiple photographic trials before testing, ensuring that each round of testing divides the sealing ring into multiple preset coil segments according to a consistent standard.
[0054] Step 20: Based on the Halcon algorithm, determine the reference line of each coil segment in the corresponding photo, and determine the diameter of multiple preset detection point coils and the distance from the center point of multiple detection point coils to the reference line.
[0055] The Halcon algorithm is a complete and standard machine vision algorithm software. In the embodiments of this application, the image processing of photos taken by industrial cameras can be performed according to the Halcon algorithm.
[0056] Furthermore, in this embodiment of the application, the reference line can be understood as a baseline in the corresponding photograph of each coil segment, used as the distance from the detection point to the reference line to judge whether the sealing ring is installed off-center.
[0057] Furthermore, in this embodiment, the preset detection point coil can be understood as positioning multiple detection points on the sealing ring according to preset standards. Since the sealing ring is a circular line with a certain thickness, the diameter of the multiple preset detection point coils refers to the coil thickness at that detection point, and the center point refers to the midpoint of the diameter at that detection point.
[0058] Please refer to Figure 2 Based on the above embodiments, as an optional embodiment, the reference line for each coil segment is determined in the corresponding photograph based on the Halcon algorithm, and the diameter of multiple preset detection point coils and the distance from the center point of multiple detection point coils to the reference line are determined. This step also includes the following steps:
[0059] Step 201: Obtain the position coordinates of the marker points on the sweeping machine, and determine the reference lines for each coil segment based on the position coordinates of the marker points and the vertical distance between the preset position coordinates of the marker points and the reference lines.
[0060] Specifically, in this embodiment, a marker point is provided on the sweeping machine. This marker point can be located near the sealing ring of the sweeping machine, and when the sealing ring is divided into multiple preset coil segments, the marker point is included in the photograph of each coil segment. The detection device acquires the position of the marker point on the sweeping machine and determines its position coordinates. Based on the position coordinates of the marker point and the perpendicular distance between the preset position coordinates of the marker point and the reference line, the ROI region of the reference line for each coil segment is found. The ROI region is the region of interest, which refers to the area of the input image that will be processed. Determining the reference line by the position coordinates of the marker point can avoid misjudging the position of the reference line and further improve the accuracy of detection.
[0061] Step 202: Determine multiple preset detection point coils based on the position coordinates of the marked points.
[0062] Specifically, the testing equipment determines the Region of Interest (ROI) for multiple testing points based on the positions of the marker points and the preset relationship between the marker point positions and the testing point positions. The coils corresponding to the ROIs of these multiple testing points are then used as multiple preset testing point coils. These testing point coils can be understood as multiple testing points on the sealing ring. The positions of the marker points accurately determine these preset testing point coils, preventing inaccurate test results caused by the determined testing points not being on the sealing ring during each round of testing.
[0063] Step 203: Obtain the diameter of multiple preset detection point coils and the center point of the diameter of multiple preset detection point coils, and determine the distance from the center point of the diameter of multiple preset detection point coils to the reference line.
[0064] Specifically, since the sealing ring is a circular line with a certain thickness, the diameter of the detection point coil in this embodiment can be understood as the thickness of the coil at each detection point, and the center point refers to the midpoint of the diameter at that detection point. The detection equipment processes the image based on the Halcon algorithm to obtain the diameters of multiple preset detection point coils and the center points of the diameters of multiple preset detection point coils, and determines the distance from the center points of the diameters of multiple preset detection point coils to the reference line. The diameters of the multiple preset detection point coils can be used to determine whether the sealing ring is too tight during installation, and the distance from the center points of the multiple detection point coils to the reference line can be used to determine whether the sealing ring is misaligned. This is used to detect the assembly state of the sealing ring, ensuring that the assembly state of the sealing ring is inspected according to a consistent standard, thereby making the produced products more standardized and of higher quality.
[0065] Please refer to Figure 3 , Figure 3 This is an example diagram showing the detection of one of the coil segments in the sealing ring. This coil segment contains five detection point coils, as shown by the five rectangles in the diagram. The detection point coils, their center points, diameters, reference lines, and markers for this coil segment can be found in [reference needed]. Figure 3 As shown, Figure 3 The top left corner displays data about the diameter of the detection point coil and the distance from the center point of the detection point coil to the reference line.
[0066] Step 30: Detect the assembly status of the sealing ring based on the diameter of multiple preset detection point coils and the distance from the center point of the multiple detection point coils to the reference line.
[0067] Specifically, the testing equipment determines whether the diameters of multiple preset detection point coils are all within a first preset range, and whether the distance from the center point of the multiple detection point coils to the reference line is within a second preset range. If the diameters of the multiple preset detection point coils are all within the first preset range, and the distance from the center point of the multiple detection point coils to the reference line is all within the second preset range, then the assembly status of the sealing ring is determined to be qualified.
[0068] Before testing, personnel are trained to test multiple products assembled with sealing rings. Under manual inspection, qualified products are identified. By analyzing the diameter data of multiple preset detection point coils in the qualified products, as well as the distance data from the center point of multiple detection point coils to the reference line, the range of the diameter data is determined as the first preset range, and the range of the distance data is determined as the second preset range.
[0069] If at least one of the diameters of the multiple preset detection point coils is not within the first preset range, and / or at least one of the distances from the center point of the multiple detection point coils to the reference line is not within the second preset range, then the assembly state of the sealing ring is determined to be unqualified.
[0070] Furthermore, when the testing equipment determines that the sealing ring's assembly status is acceptable, a green light is issued; when the testing equipment determines that the sealing ring's assembly status is unacceptable, a red light is issued, and an alarm message is displayed, including the reason for the unacceptability. This serves to prompt personnel to promptly repair the sealing ring.
[0071] For example, in this embodiment of the application, multiple preset coil segments are set to five segments. For instance, the first coil segment has two detection point coils, and the second coil segment has five detection point coils. The diameters of the two detection point coils in the first coil segment are 1.95 and 1.92, respectively; the diameters of the five detection point coils in the second coil segment are 1.57, 1.72, 2.03, 1.95, and 1.92, respectively. The first preset range is (1.7-2.2). If there is a diameter value in the second coil segment that is not within the first preset range, the assembly state of the sealing ring is determined to be unqualified. The detection device will issue a red light prompt and display an alarm prompt message. The alarm prompt message may include the diameter data at the unqualified detection point and indicate that the diameter data is too small, and the sealing ring was too tightened during installation.
[0072] Please see Figure 4 , Figure 4 An example flowchart of a sealing ring assembly detection method based on the Halcon algorithm is shown.
[0073] As an optional embodiment, the implementation principle of a sealing ring assembly inspection method based on the Halcon algorithm includes: the inspection equipment receives a power-on command and initializes its parameters, enabling the inspection equipment to inspect and record the product to be inspected using the initial parameters. A worker places the product to be inspected in the designated area of the inspection equipment, and the equipment illuminates its upper and lower light sources to provide a good lighting environment for subsequent image capture. An industrial camera is controlled to take pictures of the sealing ring assembled on the sweeper according to preset coil segments. It is determined whether five segments have been photographed. If not, the process continues until all five preset coil segments have been photographed. Based on the Halcon algorithm, reference lines for each coil segment are determined in the corresponding photos, along with the diameters of multiple preset detection point coils and the distances from the center points of multiple detection point coils to the reference lines. It is then determined whether the requirements are met. If met, a green light is issued; otherwise, a red light is issued.
[0074] The following are system embodiments of this application, which can be used to execute the method embodiments of this application. For details not disclosed in the system embodiments of this application, please refer to the method embodiments of this application.
[0075] Please refer to Figure 5 This application provides a sealing ring assembly detection system based on the Halcon algorithm, which may include: a photo acquisition module 1, a data acquisition module 2, and a detection module 3.
[0076] The photo acquisition module 1 is used to control the industrial camera to take pictures of the sealing ring assembled on the sweeper in sequence according to the preset coil segments, so as to obtain the photos corresponding to each coil segment.
[0077] Data acquisition module 2 is used to determine the reference line of each coil segment in the corresponding photo of each coil segment based on the Halcon algorithm, and to determine the diameter of multiple preset detection point coils and the distance from the center point of the multiple detection point coils to the reference line.
[0078] The detection module 3 is used to detect the assembly status of the sealing ring based on the diameter of multiple preset detection point coils and the distance from the center point of the multiple detection point coils to the reference line.
[0079] Optionally, based on the above embodiments, as an optional embodiment, the sealing ring assembly detection system based on the Halcon algorithm further includes: an initial processing module and a result display module.
[0080] The initial processing module is used to obtain the power-on command and initialize the parameters; determine the position coordinates of the sealing ring assembled on the sweeper; and divide the sealing ring into multiple preset coil segments according to the position coordinates of the sealing ring and a preset coordinate division rule, wherein each of the coil segments is within the shooting range of the industrial camera.
[0081] The result display module is used to issue a green light when the assembly status of the sealing ring is determined to be qualified, and to issue a red light and display an alarm message when the assembly status of the sealing ring is determined to be unqualified. The alarm message includes the reason for the unqualified status.
[0082] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0083] This application also provides a computer storage medium that can store multiple instructions adapted for loading and execution by a processor of the sealing ring assembly and detection method based on the Halcon algorithm described in the above embodiments. The specific execution process can be found in [reference needed]. Figures 1-4 The specific details of the illustrated embodiments will not be elaborated here.
[0084] Please see Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.
[0085] The communication bus 1002 is used to realize the connection and communication between these components.
[0086] The user interface 1003 may include a display screen and a camera. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0087] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0088] The processor 1001 may include one or more processing cores. The processor 1001 connects to various parts within the server 1000 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and by calling data stored in the memory 1005. Optionally, the processor 1001 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1001 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 1001.
[0089] The memory 1005 may include random access memory (RAM) or read-only memory. Optionally, the memory 1005 may include a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 6 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a sealing ring assembly and detection method based on the Halcon algorithm.
[0090] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0091] exist Figure 6 In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 1001 can be used to call an application program stored in the memory 1005 that is a sealing ring assembly detection method based on the Halcon algorithm. When executed by one or more processors, the electronic device performs one or more of the methods described in the above embodiments.
[0092] An electronic device readable storage medium is provided, characterized in that the electronic device readable storage medium stores instructions. When executed by one or more processors, these instructions cause the electronic device to perform one or more of the methods described in the above embodiments.
[0093] Those skilled in the art will clearly understand that the technical solutions of this application can be implemented using software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware capable of independently performing or cooperating with other components to perform specific functions. Hardware may include, for example, a Field-Programmable Gate Array (FPGA), an Integrated Circuit (IC), etc.
[0094] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0095] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0096] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0097] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0098] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0099] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0100] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0101] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A sealing ring assembly inspection method based on the Halcon algorithm, characterized in that, Applied to a testing equipment equipped with an industrial camera, the method includes: The industrial camera is controlled to take pictures of the sealing ring assembled on the sweeper in sequence according to the preset coil segments, so as to obtain pictures corresponding to each coil segment; Based on the Halcon algorithm, the reference line of each coil segment is determined in the corresponding photo of each coil segment, and the diameter of multiple preset detection point coils and the distance from the center point of the multiple preset detection point coils to the reference line are determined. The assembly state of the sealing ring is detected based on the diameter of multiple preset detection point coils and the distance from the center point of the multiple preset detection point coils to the reference line. The diameter of the multiple preset detection point coils refers to the coil thickness at the detection point, and the center point refers to the midpoint of the diameter at the detection point. Before the industrial camera is controlled to take pictures of the sealing rings assembled on the sweeper in a predetermined coil segment, the method further includes: Obtain the power-on command and initialize the parameters; Determine the coordinates of the sealing ring assembled onto the sweeper; Based on the position coordinates of the sealing ring, the sealing ring is divided into multiple preset coil segments according to a preset coordinate division rule, wherein each coil segment is within the shooting range of the industrial camera; Specifically, determining the reference line for each coil segment in the corresponding photograph based on the Halcon algorithm includes: Obtain the position coordinates of the marked points on the sweeping machine, and determine the reference lines for each coil segment based on the position coordinates of the marked points and the vertical distance between the preset position coordinates of the marked points and the reference lines; The step of determining the diameter of the plurality of preset detection point coils and the distance from the center point of the plurality of preset detection point coils to the reference line includes: Multiple preset detection point coils are determined based on the position coordinates of the marked points; Obtain the diameters of multiple preset detection point coils and the center points of the diameters of the multiple preset detection point coils, and determine the distance from the center points of the diameters of the multiple preset detection point coils to the reference line; The step of detecting the assembly state of the sealing ring based on the diameter of multiple preset detection point coils and the distance from the center point of the multiple preset detection point coils to the reference line includes: Determine whether the diameters of the plurality of preset detection point coils are all within a first preset range, and determine whether the distance from the center point of the plurality of preset detection point coils to the reference line is within a second preset range; If the diameters of the plurality of preset detection point coils are all within a first preset range, and the distances from the center points of the plurality of preset detection point coils to the reference line are all within a second preset range, then the assembly state of the sealing ring is determined to be qualified. If at least one of the diameters of the plurality of preset detection point coils is not within the first preset range, and / or at least one of the distances from the center point of the plurality of preset detection point coils to the reference line is not within the second preset range, then the assembly state of the sealing ring is determined to be unqualified.
2. The sealing ring assembly detection method based on the Halcon algorithm according to claim 1, characterized in that, The control system takes photos of the sealing rings assembled on the sweeper according to preset coil segments, obtaining photos corresponding to each coil segment, including: The industrial camera is controlled to take pictures of the sealing rings assembled on the sweeper in sequence according to the preset coil segments; Determine whether the industrial camera has completed the task of photographing the multiple preset coil segments; If completed, a photograph corresponding to each coil segment will be obtained; If not completed, the process continues, controlling the industrial camera to take pictures of the sealing rings assembled on the sweeper in sequence according to the preset coil segments, until the task of taking pictures of all the preset coil segments is completed.
3. The sealing ring assembly detection method based on the Halcon algorithm according to claim 1, characterized in that, The method further includes: When the assembly status of the sealing ring is determined to be qualified, a green light is issued as a reminder; When it is determined that the assembly status of the sealing ring is unqualified, a red light will be issued and an alarm message will be displayed, which includes the reason for the unqualified status.
4. A sealing ring assembly detection system based on the Halcon algorithm, characterized in that, The system is used to perform the sealing ring assembly detection method based on the Halcon algorithm as described in claim 1, the system comprising: The photo acquisition module (1) is used to control the industrial camera to take pictures of the sealing ring assembled on the sweeper in sequence according to the preset coil segments, and obtain the photos corresponding to each coil segment; The data acquisition module (2) is used to determine the reference line of each coil segment in the photo corresponding to each coil segment based on the Halcon algorithm, and to determine the diameter of multiple preset detection point coils and the distance from the center point of the multiple preset detection point coils to the reference line. The detection module (3) is used to detect the assembly status of the sealing ring based on the diameter of the multiple preset detection point coils and the distance from the center point of the multiple preset detection point coils to the reference line.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the steps of the method as described in any one of claims 1 to 3.
6. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 3.
Citation Information
Patent Citations
Visual detection system for sealing rings
CN110608672A
Adhesive tape size detection system of metal battery dispensing system
CN214470638U