Visual detection method and device for production quality of cold roll forming water tank
Through the automatic machine vision detection method, the cold-bending forming sink is subjected to multi-dimensional quality evaluation, which solves the problems of low manual inspection efficiency and high cost, and achieves efficient and stable quality judgment, ensuring the rapid and long-term stability of the sink during installation.
Patent Information
- Application Number
- CN202510521799.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-19
AI Technical Summary
Manually judge the production quality and efficiency of cold-bending forming sinks are low and costly, making it difficult to meet the needs of efficient installation and long-term stable use.
Using an automatic detection method based on machine vision, by constructing a hole position feature model, side images are collected in real time and multiple judgments are made, including pattern response score analysis, edge distance calculation and inter-hole distance evaluation, to achieve multi-dimensional quality evaluation.
It improves the detection efficiency and stability of the test results, reduces the inspection cost, and ensures the speed and long-term stability of the sink during installation.
Smart Images

Figure CN120510091A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual inspection, and in particular to a method and device for visually inspecting the production quality of a cold-bend formed water tank. Background Art
[0002] Cold-formed guttering serves as a support for photovoltaic panel installation. During rainy or snowy conditions, moisture or snow may accumulate on the panels. The guttering's diversion function quickly directs this moisture and snow away from the panels. The flow of water effectively prevents dust and other impurities from accumulating on the panels, providing both protection and cleaning. High-quality guttering is less likely to deform or loosen during use, maintaining the long-term stability of the photovoltaic system. This high-quality construction also significantly improves installation efficiency and reduces costs, eliminating the need for additional drilling.
[0003] To ensure the quality of roll-formed gutters, quick and easy on-site installation, and long-term stable performance, manual quality assessment is often required. Since the size differences between specifications are only one or two millimeters, manual assessment and screening would be extremely time-consuming and labor-intensive. Summary of the Invention
[0004] In view of this, the present invention provides a method and device for visually inspecting the production quality of cold-bend formed water tanks to solve the problem of low efficiency and high cost in manually judging the production quality of cold-bend formed water tanks.
[0005] In a first aspect, the present invention provides a method for visually inspecting the production quality of a cold-formed water tank, the method comprising:
[0006] Construct a hole feature model for the cold-formed sink, call the TrainPatMaxPattern function to train the hole feature model, and output a Patterns data structure containing hole feature information;
[0007] Real-time acquisition of a side image of the roll-formed water tank, performing a FindPatMaxPatterns function analysis on the real-time acquired side image and the Patterns data structure, performing a first judgment on the production quality of the roll-formed water tank, and performing a second judgment after the first judgment passes;
[0008] Call the FindLine function to calculate the distance between the upper edge of the sink and each hole position, perform a second judgment on the production quality of the cold-formed sink, and perform a third judgment after the second judgment passes;
[0009] Calculate the distance between holes and make a third judgment on the production quality of cold-formed sinks.
[0010] The present invention provides a method for visually inspecting the production quality of cold-bend-formed water tanks, which uses an automatic inspection method based on machine vision to perform multi-dimensional and multi-faceted quality assessment of cold-bend-formed water tanks, thereby improving inspection efficiency and the stability of inspection results and reducing inspection costs.
[0011] In an optional embodiment, the hole feature model of the cold-formed water tank is constructed, and the TrainPatMaxPattern function is called to train the hole feature model, and the Patterns data structure containing the hole feature information is output, including:
[0012] Collecting a side image of the cold-formed water tank, and selecting an area containing the hole position in the side image as a training area;
[0013] Calling the TrainPatMaxPattern function to analyze and process the image in the training area, extract hole feature information, and construct a hole feature model based on the hole feature information;
[0014] The TrainPatMaxPattern function is called to train the feature model using the images in the training area, and output a Patterns data structure containing hole feature information.
[0015] In an optional embodiment, the real-time acquisition of a side image of the roll-formed water tank, performing a FindPatMaxPatterns function analysis on the real-time acquired side image and the Patterns data structure, performing a first judgment on the production quality of the roll-formed water tank, and performing a second judgment after the first judgment passes, includes:
[0016] Real-time acquisition of side images of roll-formed sinks;
[0017] Performing a FindPatMaxPatterns function analysis on the real-time collected side image and the Patterns data structure, and outputting a pattern response score;
[0018] When the pattern response score is not greater than a first set value, it is determined that the production quality of the cold-formed water tank is unqualified;
[0019] When the pattern response score is greater than the first set value, a second determination is performed.
[0020] In an optional embodiment, the calling of the FindLine function to calculate the distance between the upper edge of the sink and each hole position, performing a second judgment on the production quality of the cold-formed sink, and performing a third judgment after the second judgment passes, includes:
[0021] Call the FindLine function to calculate the coordinates of the two points on the upper edge line of each hole in the cold-formed water tank. The coordinates of the two points on the upper edge line include the coordinates of the upper edge line starting point and the coordinates of the upper edge line ending point.
[0022] Calculate the coordinates of the midpoint of the upper edge straight line based on the coordinates of the two points on the upper edge straight line;
[0023] Call the FindLine function to calculate the coordinates of two points on the top edge line of the cold-formed water tank, where the coordinates of the two points on the top edge line include the coordinates of the top edge line starting point and the coordinates of the top edge line ending point.
[0024] Calculate the coordinates of the midpoint of the top edge straight line based on the coordinates of the two points of the top edge straight line;
[0025] The distance between the upper edge of the sink and each hole position is calculated based on the midpoint coordinates of the upper edge straight line and the midpoint coordinates of the top edge straight line;
[0026] When the distance between the upper edge of the sink and each hole position is not within the preset range, the production quality of the cold-formed sink is judged to be unqualified;
[0027] When the distance between the upper edge of the sink and each hole position is within the preset range, the third judgment is performed.
[0028] In an optional embodiment, the calling of the FindLine function to calculate the coordinates of two points of the upper edge line of each hole position in the cold-rolled water tank includes:
[0029] For each hole position, the edge detection algorithm is used to find the hole boundary, and then the Hough transform is used to obtain a set of candidate lines;
[0030] The FindLine function is analyzed to obtain the FindLine function of the upper edge area of the hole position in the cold-formed water tank in the image. The FindLine function of the upper edge area is used to detect the straight line and output the coordinates of the two points of the upper edge straight line of the hole position in the cold-formed water tank.
[0031] In an optional embodiment, the calling of the FindLine function to calculate the coordinates of two points on the top edge straight line of the roll-formed water tank includes:
[0032] Perform FindLine function analysis to obtain the FindLine function of the top edge area of the cold-formed water tank in the image;
[0033] Use the FindLine function in the top edge area to detect the straight line and output the coordinates of the two points on the top edge of the cold-formed water tank.
[0034] In an optional embodiment, the calculation of the distance between holes and the third judgment of the production quality of the cold-formed water tank include:
[0035] Call the InspectEdge function to analyze the two adjacent hole areas on the side of the sink in the image and output an Inspect data structure that includes the edge and caliper numbers.
[0036] Use the InspectEdgePosition function to perform curve fitting analysis on the Inspect data structure, determine the fitting direction, and output the coordinates of the center of the two holes on the left and right sides and the radius of the circle;
[0037] Use the LineToCircle function to analyze the circles on the left and right sides of the two holes and the line segments perpendicular to the edge of the image, and output the distance between the holes;
[0038] When the distance between the holes is not greater than the second set value, it is determined that the production quality of the cold-formed water tank is qualified;
[0039] When the distance between the holes is greater than the second set value, it is determined that the production quality of the cold-bend formed water tank is unqualified.
[0040] In a second aspect, the present invention provides a device for visually inspecting the production quality of a cold-formed water tank, the device comprising: a light source, a camera, a light shield, and a photoelectric trigger sensor, wherein:
[0041] The light source is fixed to the side of the roll forming machine and is used to provide a lighting environment for the hole features of the roll forming sink;
[0042] The camera is fixed to the side of the roll forming machine and is used to capture the side image of the roll forming water tank;
[0043] The lens hood is placed on the camera to reduce the light entering the camera lens;
[0044] The photoelectric trigger sensor is installed on the transmission path of the cold-bend formed water tank, and is used to start the production quality visual inspection method of the cold-bend formed water tank according to the first aspect or any corresponding embodiment thereof.
[0045] The present invention provides a production quality visual inspection device for cold-bent-formed water tanks. By adopting an automatic inspection method based on machine vision, the device performs multi-dimensional and multi-faceted quality assessment of cold-bent-formed water tanks, thereby improving the inspection efficiency and the stability of the inspection results and reducing the inspection cost.
[0046] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the method for visual inspection of production quality of cold-bent formed water tanks according to the first aspect or any corresponding embodiment thereof.
[0047] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for visual inspection of production quality of cold-bent formed water tanks according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 1 is a flow chart of a method for visually inspecting the production quality of a cold-formed water tank according to an embodiment of the present invention;
[0050] Figure 2-Figure 11 Schematic diagram of hole positions in a cold-bend-formed water tank according to an embodiment of the present invention;
[0051] Figure 12-16 Schematic diagram of a production quality visual inspection device for cold-rolled water tanks according to an embodiment of the present invention;
[0052] Figure 17 A schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0054] The embodiment of the present invention provides a method for visually inspecting the production quality of cold-bend-formed water tanks, which achieves the purpose of quickly and effectively judging the production quality of cold-bend-formed water tanks through automatic inspection based on machine vision.
[0055] According to an embodiment of the present invention, an embodiment of a method for visually inspecting the production quality of a cold-bent formed water tank is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0056] In this embodiment, a method for visually inspecting the production quality of a cold-formed water tank is provided. Figure 1 As shown, the process includes the following steps:
[0057] Step S1: construct a hole feature model for a cold-formed water tank, call the TrainPatMaxPattern function to train the hole feature model, and output a Patterns data structure containing hole feature information.
[0058] Wherein, step S1 specifically includes:
[0059] Step S11 : collecting a side image of the cold-rolled water tank, and selecting an area containing the hole positions in the side image as a training area.
[0060] Step S12: calling the TrainPatMaxPattern function to analyze and process the image in the training area, extract hole feature information, and construct a hole feature model based on the hole feature information.
[0061] Step S13: calling the TrainPatMaxPattern function, using the images in the training area to train the feature model, and outputting a Patterns data structure containing hole feature information.
[0062] In the embodiment of the present invention, a side image of a cold-rolled water tank is collected, and the hole feature model (such as Figure 2 As shown), it then outputs the Patterns data structure containing the training pattern (including features, position, size, etc.) for subsequent image search and recognition tasks.
[0063] Step S2: Real-time acquisition of the side image of the cold-formed water tank, analysis of the side image acquired in real time and the Patterns data structure using the FindPatMaxPatterns function, a first judgment on the production quality of the cold-formed water tank, and a second judgment after the first judgment passes.
[0064] Wherein, step S2 specifically includes:
[0065] Step S21 , collecting a side image of the cold-bend formed water tank in real time.
[0066] Step S22 , performing a FindPatMaxPatterns function analysis on the real-time collected side image and the Patterns data structure, and outputting a pattern response score.
[0067] Step S23: When the pattern response score is not greater than the first set value, it is determined that the production quality of the cold-rolled water tank is unqualified.
[0068] Step S24: When the pattern response score is greater than the first set value, a second determination is performed.
[0069] In this embodiment of the present invention, the FindPatMaxPatterns function analyzes the trained TrainPatMaxPatterns data structure and the real-time image captured by the camera, outputting information such as a pattern response score and the pattern's position, coordinates, and angles. The image response score represents the degree of similarity. If the similarity is less than a first set value, the product is deemed unqualified. If the similarity is greater than the first set value, the next quality assessment proceeds. The first set value is set as required.
[0070] Step S3, calling the FindLine function, calculating the distance between the upper edge of the sink and each hole position, performing a second judgment on the production quality of the cold-formed sink, and performing a third judgment after the second judgment passes.
[0071] Wherein, step S3 specifically includes:
[0072] Step S31, calling the FindLine function to calculate the coordinates of the two points on the upper edge line of each hole position in the cold-rolled water tank, where the coordinates of the two points on the upper edge line include the coordinates of the starting point and the end point of the upper edge line.
[0073] Step S32: Calculate the coordinates of the midpoint of the upper edge straight line based on the coordinates of the two points of the upper edge straight line.
[0074] Step S33, calling the FindLine function to calculate the coordinates of two points on the top edge line of the cold-formed water tank, where the coordinates of the two points on the top edge line include the coordinates of the starting point of the top edge line and the coordinates of the ending point of the top edge line.
[0075] Step S34 , calculating the coordinates of the midpoint of the top edge line based on the coordinates of the two points of the top edge line.
[0076] Step S35 , calculating the distance between the upper edge of the sink and each hole position according to the midpoint coordinates of the upper edge straight line and the midpoint coordinates of the top edge straight line.
[0077] Step S36: When the distance between the upper edge of the water tank and each hole position is not within a preset range, it is determined that the production quality of the cold-bend formed water tank is unqualified.
[0078] Step S37: When the distance between the upper edge of the sink and each hole position is within a preset range, perform a third judgment.
[0079] Furthermore, step S31 specifically includes:
[0080] In step S311 , for each hole position, an edge detection algorithm is used to find the boundary of the hole position, and then a set of candidate straight lines is obtained using Hough transform.
[0081] Step S312: Perform FindLine function analysis to obtain the FindLine function of the upper edge area of the hole position in the cold-formed water tank in the image, use the FindLine function of the upper edge area to detect the straight line and output the coordinates of the two points of the upper edge line of the hole position in the cold-formed water tank.
[0082] Step S33 specifically includes:
[0083] Step S331 : performing a FindLine function analysis to obtain a FindLine function for the top edge area of the cold-bend formed water tank in the image.
[0084] Step S332: Use the FindLine function of the top edge area to detect a straight line and output the coordinates of two points of the top edge straight line of the cold-formed water tank.
[0085] In the embodiment of the present invention, the boundary of the hole position is found by edge detection algorithm, and then a set of candidate straight lines are obtained by Hough transform. Then, the FindLine function is performed to analyze the upper edge area of hole 1 in the cold-rolled water tank in the image. The FindLine function detects the straight line and returns the parameters (such as Figure 3 The coordinates of the upper edge of the cold-formed water tank center hole are output as A(a1, b1) and B(a2, b2). The coordinates of the upper edge of the center hole are calculated based on A(a1, b1) and B(a2, b2). The coordinates of the midpoint of the upper edge are calculated as P(X0, Y0), where X0 = (a1 + a2) / 2 and Y0 = (b1 + b2) / 2.
[0086] The FindLine function is also used to analyze the top edge area of the cold-formed water tank in the image. The FindLine function detects the straight line and returns the parameters (such as Figure 4The coordinates of the two points on the top edge of the cold-formed water tank, C(X1, Y1) and D(X2, Y2), are output. The coordinates of the midpoint of the top edge, M(X3, Y3), are then calculated based on the coordinates of the two points on the top edge, C(X1, Y1) and D(X2, Y2). Here, X3 = (X1 + X2) / 2 and Y3 = (Y1 + Y2) / 2.
[0087] Then, the distance L between the upper edge of the sink and each hole position is calculated based on the midpoint coordinates P(X0, Y0) of the upper edge straight line and the midpoint coordinates M(X3, Y3) of the top edge straight line, where:
[0088] The hole position affects the overall structural strength of the sink. The distance L obtained above is one of the criteria for determining whether a sink is qualified. Specifically, the distance L is determined to be within the specified top edge distance range. If not, the sink is considered unqualified. If it is, the next step is determined. The top edge distance refers to the distance between the top edge of the sink and the hole position. The consistency of this distance is crucial to ensuring the stability of the sink. If the top edge distance is inconsistent, the sink may wobble or become unstable during installation, affecting the user experience and safety.
[0089] Step S4, calculating the distance between holes and making a third judgment on the production quality of the cold-formed water tank.
[0090] Wherein, step S4 specifically includes:
[0091] Step S41 , calling the InspectEdge function to analyze two adjacent hole areas on the side of the sink in the image and output an Inspect data structure, which includes the edge and caliper numbers.
[0092] Step S42: Use the InspectEdgePosition function to perform curve fitting analysis on the Inspect data structure, determine the fitting direction, and output the coordinates of the center of the left and right sides of the two holes and the radius of the circle.
[0093] In step S43 , the LineToCircle function is used to analyze the circles on the left and right sides of the two holes and the line segments perpendicular to the edge of the image, and the distance between the holes is output.
[0094] Step S44: When the distance between the holes is not greater than the second set value, it is determined that the production quality of the cold-bend formed water tank is qualified.
[0095] Step S45: When the distance between the holes is greater than the second set value, it is determined that the production quality of the cold-formed water tank is unqualified.
[0096] In the embodiment of the present invention, for the two adjacent hole areas on the side of the sink in the image, the right edge area of hole 1 (such as Figure 5 As shown) and the left edge area of hole 2 (as shown Figure 6 The InspectEdge function performs the analysis and outputs the Inspect data structure of the edges and caliper numbers detected in the image. The InspectEdgePosition function is then used to perform curve fitting analysis on the Inspect data structure of the edges and caliper numbers to determine the fitting direction, and the center coordinates of the semicircles on the left and right sides of the two holes and the radius of the circles are output (as shown in the figure). Figure 7 、 Figure 8 shown).
[0097] The LineToCircle function is used to analyze the circles on both sides and the line segments perpendicular to the edge of the image. The output includes points on the line, points on the circle, the distance between points, and the angle of the directed distance. (For example, Figure 9 、 Figure 10 By connecting the points on these two circles, we can get the shortest distance N between the two adjacent holes (as shown in Figure 11 As shown). The shortest distance N (hole-to-hole distance) is one of the criteria for determining a qualified product. It is determined whether N is within the specified hole-to-hole distance range. If not, the product is unqualified. If it is, the production quality of the cold-formed water tank is qualified. In the embodiment of the present invention, the main basis for qualification is whether the hole-to-hole distance and the top distance meet the requirements.
[0098] The present invention provides a method for visually inspecting the production quality of cold-bend-formed water tanks, which uses an automatic inspection method based on machine vision to perform multi-dimensional and multi-faceted quality assessment of cold-bend-formed water tanks, thereby improving inspection efficiency and the stability of inspection results and reducing inspection costs.
[0099] The present invention also provides a device for visually inspecting the production quality of a roll-formed water tank, comprising: a light source, a camera, a light shield, and a photoelectric trigger sensor. The light source is fixed to the side of the roll-former to provide a lighting environment for the hole characteristics of the roll-formed water tank. The camera is fixed to the side of the roll-former to capture a side image of the roll-formed water tank. The light shield is placed on the camera to reduce the amount of light entering the camera lens. The photoelectric trigger sensor is installed on the transmission path of the roll-formed water tank to initiate the method for visually inspecting the production quality of the roll-formed water tank described in the above embodiment.
[0100] In the embodiment of the present invention, a Cognex visual inspection system is used, and a customized light source (such as Figure 12 As shown), lens hood (as Figure 13 、 Figure 14 As shown), photoelectric trigger sensor (as Figure 15 Perform visual inspection of the distance between holes and the top of the processed cold-formed sink.
[0101] 1. The specific steps are as follows:
[0102] 1. For two camera (such as Figure 16 Install a sunshade (as shown) Figure 13 、 Figure 14 The beneficial effects of this step are as follows:
[0103] ①Optimize aperture adjustment to reduce the light entering the lens and avoid overexposure or darkness caused by excessive aperture.
[0104] ②Reduction of reflected light: The lens hood can reduce the reflected light from the reflector entering the lens to avoid interference with imaging.
[0105] ③ Environmental interference filtering: The lens hood helps filter dust and impurities in the environment, keeping the lens clean and reducing light pollution.
[0106] ④ Focus assist: When focusing, the lens hood can reduce the interference of scattered light and ensure more accurate focus.
[0107] ⑤ Adaptation to low-light environments: In low-light environments, the lens hood can reduce additional light interference, improve image quality, and enhance image acquisition efficiency.
[0108] 2. Install a custom light source to optimize the edge detection image. This step produces the following beneficial effects:
[0109] ① Enhance the contrast between the target and the background. The customized light source highlights the surface features of the detected object (such as brightness, darkness, edges, etc.) through illumination of specific wavelength, angle and intensity. The backlight is evenly illuminated by a high-density LED array, which can clearly present the outer contour of the object, reduce background interference, and make the edge grayscale change more significant.
[0110] ② Eliminating noise and interference: In the bright daylight environment of a workshop, ambient light, reflections, and electromagnetic interference can cause image noise. Customized light sources use light pulses of specific frequencies or polarized light technology to suppress ambient light interference. Photoelectric sensors can operate stably in strong light levels up to 2000 lux, reducing false detection rates. Furthermore, coaxial light sources eliminate surface shadows, reduce false edges in images, and prevent algorithm misjudgments caused by noise.
[0111] ③Adapt to the testing requirements of different cold-formed materials and shapes.
[0112] ④ Highly reflective surfaces: Use coaxial light sources or low-angle ring lights to avoid overexposure caused by reflections from the profile and preserve edge details. Conventional backlights can easily produce diffraction halos at the edges of round or cylindrical objects, leading to measurement errors. Customized light sources reduce diffraction by optimizing diffuse reflectors or using collimated light designs, ensuring edge positioning accuracy. This optimization increases the through-hole misalignment detection speed to 28 meters / minute, reducing false positives by 17%.
[0113] 3. A photoelectric trigger sensor is installed to adjust the phase position. A SICK GTB2S-N1451 photoelectric switch detects momentary changes in light blocking across a 9mm aperture, triggering the industrial camera to capture the image. This allows for a ±0.1mm camera detection accuracy at a speed of 28m / min.
[0114] 2. Customize light sources and photoelectric trigger sensors to complete the detection process connection of relevant parameters of the product vision inspection system.
[0115] 1. Configuration and function of customized light source: In the visual inspection system, customized light source is one of the key hardware components. Its main function is to provide a uniform and stable lighting environment for the hole characteristics of the cold-formed sink, ensuring that the image quality meets the subsequent inspection requirements. The following is a detailed description:
[0116] Optimized lighting angle: The custom light source is optimized to avoid glare from the roll-formed sink surface and shadows from the perforated area. The square light source is adjustable to ensure uniform illumination and sharp edges over the perforated area, preventing blurry images or feature loss caused by glare.
[0117] Light intensity adjustment: The light intensity can be adjusted based on the reflective properties of the roll-formed sink surface to avoid overexposure due to excessive light or blurring due to insufficient light. Optimal light intensity is determined through field measurements to ensure clear visibility of details around the hole edges.
[0118] Light source color selection: Select the appropriate white light source color according to the material properties (metal) of the cold-formed sink. The white light source can provide comprehensive color information.
[0119] Light spot shape design: The light spot shape of the customized light source can be designed according to the distribution characteristics of the hole position. The strip light spot is used to ensure that the lighting coverage of the hole area is maximized while avoiding interference with other areas.
[0120] Function: By customizing the optimized configuration of the light source, the image quality of the hole features can be significantly improved, reflection and shadow interference can be reduced, and reliable input can be provided for subsequent image processing and feature extraction.
[0121] 2. Installation and triggering mechanism of photoelectric switch. The photoelectric switch is used to detect the position of the cold-formed water tank and trigger the detection process of the visual system. The following is a detailed description:
[0122] Photoelectric switch installation location: Photoelectric switches are typically installed along the conveyor path of the roll-formed water tank, a certain distance from the vision system camera. Installed on the side of the conveyor, they ensure that when the water tank reaches the designated position, the photoelectric switch can sense the presence of the water tank hole.
[0123] Photoelectric switch triggering mechanism: The photoelectric switch triggers the inspection process by sensing light signals reflected from the edge or surface of the roll-formed water tank. For example, when the water tank reaches a specified position, the photoelectric switch outputs a high signal, informing the vision system to begin image acquisition and analysis.
[0124] Interaction with the vision system: The trigger signal of the photoelectric switch is connected to the Cognex In-Sight vision system, the control program of the vision system, to ensure that the camera can capture images in time when the sink reaches the specified position, avoiding detection errors caused by position deviation.
[0125] The use of photoelectric switches ensures the automation and efficiency of the visual inspection process, avoids the need for manual intervention, and ensures the accuracy and consistency of detection.
[0126] 3. The synergistic effect of customized light source and photoelectric switch in the inspection process. In the visual inspection process of cold-formed water tanks, customized light source and photoelectric switch work together to ensure the efficiency and reliability of inspection. The following is a detailed description:
[0127] Initialization: When the vision system starts up, the custom light source activates according to the pre-configured lighting angle, intensity, and color, providing optimal lighting conditions for the hole features of the cold-formed sink. At the same time, the photoelectric switch enters standby mode, ready to sense the sink's arrival.
[0128] During the detection trigger phase, when the roll-formed water tank reaches the sensing area of the photoelectric switch, the switch outputs a trigger signal, notifying the vision system to begin the inspection process. The camera then captures the image, and the Cognex In-Sight vision system performs feature extraction and analysis. The further description of feature extraction and analysis is the same as in the previous embodiment and is not repeated here.
[0129] The present invention provides a production quality visual inspection device for cold-bent-formed water tanks. By adopting an automatic inspection method based on machine vision, the device performs multi-dimensional and multi-faceted quality assessment of cold-bent-formed water tanks, thereby improving the inspection efficiency and the stability of the inspection results and reducing the inspection cost.
[0130] See also Figure 17 , Figure 17 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 17 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 17 Take a processor 10 as an example.
[0131] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0132] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0133] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0134] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0135] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 17 Take the example of connecting via a bus.
[0136] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0137] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0138] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for visually inspecting the production quality of cold-formed water tanks, characterized in that: The method comprises: Construct a hole feature model for the cold-formed sink, call the TrainPatMaxPattern function to train the hole feature model, and output a Patterns data structure containing hole feature information; Real-time acquisition of a side image of the roll-formed water tank, performing a FindPatMaxPatterns function analysis on the real-time acquired side image and the Patterns data structure, performing a first judgment on the production quality of the roll-formed water tank, and performing a second judgment after the first judgment passes; Call the FindLine function to calculate the distance between the upper edge of the sink and each hole position, perform a second judgment on the production quality of the cold-formed sink, and perform a third judgment after the second judgment passes; Calculate the distance between holes and make a third judgment on the production quality of cold-formed sinks.
2. The method for visually inspecting the production quality of cold-rolled water tanks according to claim 1, characterized in that: The hole feature model of the cold-formed water tank is constructed, and the TrainPatMaxPattern function is called to train the hole feature model, and the Patterns data structure containing the hole feature information is output, including: Collecting a side image of the cold-formed water tank, and selecting an area containing the hole position in the side image as a training area; Calling the TrainPatMaxPattern function to analyze and process the image in the training area, extract hole feature information, and construct a hole feature model based on the hole feature information; The TrainPatMaxPattern function is called to train the feature model using the images in the training area, and output a Patterns data structure containing hole feature information.
3. The method for visually inspecting the production quality of cold-rolled water tanks according to claim 1, characterized in that: The real-time acquisition of a side image of the cold-rolled water tank, performing a FindPatMaxPatterns function analysis on the real-time acquired side image and the Patterns data structure, performing a first judgment on the production quality of the cold-rolled water tank, and performing a second judgment after the first judgment passes, including: Real-time acquisition of side images of roll-formed sinks; Performing a FindPatMaxPatterns function analysis on the real-time collected side image and the Patterns data structure, and outputting a pattern response score; When the pattern response score is not greater than a first set value, it is determined that the production quality of the cold-formed water tank is unqualified; When the pattern response score is greater than the first set value, a second determination is performed.
4. The method for visually inspecting the production quality of cold-rolled water tanks according to claim 1, characterized in that: The FindLine function is called to calculate the distance between the upper edge of the sink and each hole position, and the production quality of the cold-formed sink is judged for the second time. After the second judgment is passed, a third judgment is performed, including: Call the FindLine function to calculate the coordinates of the two points on the upper edge line of each hole in the cold-formed water tank. The coordinates of the two points on the upper edge line include the coordinates of the upper edge line starting point and the coordinates of the upper edge line ending point. Calculate the coordinates of the midpoint of the upper edge straight line based on the coordinates of the two points on the upper edge straight line; Call the FindLine function to calculate the coordinates of two points on the top edge line of the cold-formed water tank, where the coordinates of the two points on the top edge line include the coordinates of the top edge line starting point and the coordinates of the top edge line ending point. Calculate the coordinates of the midpoint of the top edge straight line based on the coordinates of the two points of the top edge straight line; The distance between the upper edge of the sink and each hole position is calculated based on the midpoint coordinates of the upper edge straight line and the midpoint coordinates of the top edge straight line; When the distance between the upper edge of the sink and each hole position is not within the preset range, the production quality of the cold-formed sink is judged to be unqualified; When the distance between the upper edge of the sink and each hole position is within the preset range, the third judgment is performed.
5. The method for visually inspecting the production quality of cold-rolled water tanks according to claim 4, characterized in that: The FindLine function is called to calculate the coordinates of the two points on the upper edge of each hole in the cold-formed sink, including: For each hole position, the edge detection algorithm is used to find the hole boundary, and then the Hough transform is used to obtain a set of candidate lines; The FindLine function is analyzed to obtain the FindLine function of the upper edge area of the hole position in the cold-formed water tank in the image. The FindLine function of the upper edge area is used to detect the straight line and output the coordinates of the two points of the upper edge straight line of the hole position in the cold-formed water tank.
6. The method for visually inspecting the production quality of cold-rolled water tanks according to claim 4, characterized in that: The FindLine function is called to calculate the coordinates of two points on the top edge of the cold-formed water tank, including: Perform FindLine function analysis to obtain the FindLine function of the top edge area of the cold-formed water tank in the image; Use the FindLine function in the top edge area to detect the straight line and output the coordinates of the two points on the top edge of the cold-formed water tank.
7. The method for visually inspecting the production quality of cold-rolled water tanks according to claim 1, characterized in that: The calculation of the distance between holes is used to make a third judgment on the production quality of the cold-formed water tank, including: Call the InspectEdge function to analyze the two adjacent hole areas on the side of the sink in the image and output an Inspect data structure that includes the edge and caliper numbers. Use the InspectEdgePosition function to perform curve fitting analysis on the Inspect data structure, determine the fitting direction, and output the coordinates of the center of the two holes on the left and right sides and the radius of the circle; Use the LineToCircle function to analyze the circles on the left and right sides of the two holes and the line segments perpendicular to the edge of the image, and output the distance between the holes; When the distance between the holes is not greater than the second set value, it is determined that the production quality of the cold-formed water tank is qualified; When the distance between the holes is greater than the second set value, it is determined that the production quality of the cold-bend formed water tank is unqualified.
8. A visual inspection device for the production quality of cold-formed water tanks, characterized in that: The device includes: a light source, a camera, a light shield and a photoelectric trigger sensor, wherein: The light source is fixed to the side of the roll forming machine and is used to provide a lighting environment for the hole features of the roll forming sink; The camera is fixed to the side of the roll forming machine and is used to capture the side image of the roll forming water tank; The lens hood is placed on the camera to reduce the light entering the camera lens; The photoelectric trigger sensor is installed on the transmission path of the cold-bend formed water tank and is used to start the production quality visual inspection method of the cold-bend formed water tank according to any one of claims 1 to 7.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for visual inspection of production quality of cold-bend formed water tanks according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the production quality visual inspection method of the cold-rolled water tank according to any one of claims 1 to 7.
Citation Information
Patent Citations
Aperture, pitch and position detection method, system and device based on machine vision
CN116342682A