Detection Method, Device and System for Seam Head Integration Machine
Through the visual detection system, the detection marks in the image are collected in real time, the problem of photoelectric switches being sensitive to fabric materials is solved, and the precise detection of fabric transfer is achieved, ensuring the efficient operation of the sewing machine.
Patent Information
- Application Number
- CN202110659463.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-15
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-06-15
AI Technical Summary
The existing photoelectric switch detection unit is sensitive to fabric materials, resulting in poor detection results, especially for thin fabrics and dark fabrics, which affects the working efficiency of the seam head integrated machine.
A visual detection system is used instead of the photoelectric switch. By detecting whether there are detection marks in the image in real time by detecting whether there is a detection mark in the image. If there is no mark, the acquisition will be repeated until the mark is detected to determine whether the fabric is completely transferred.
It improves detection accuracy and responsiveness, reduces the requirements for fabric materials, and ensures the normal and efficient operation of the seam head all-in-one machine.
Smart Images

Figure CN113298801B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visual inspection, and particularly to a detection method, device and system for a seam head integrated machine. Background Art
[0002] In an integrated machine with a seam head, in order to achieve continuous operation, a robotic arm is required to pull the fabric from the needle thread reel to the seam head mechanism. To protect the needle thread reel and ensure the production speed, an optoelectronic switch type detection unit is usually added during the process of the fabric moving from the needle thread reel to the seam head to determine whether the fabric has been completely pulled out from the needle reel.
[0003] The existing optoelectronic switch type detection unit can determine whether the fabric has completely passed through by the change of the electrical signal, including transmissive optoelectronic switches and reflective optoelectronic switches. The transmissive optoelectronic switch consists of an emitter and a receiver arranged oppositely. When the light beam emitted by the emitter is blocked and the receiver cannot receive the light beam, an electrical signal change occurs. The reflective optoelectronic switch can be further divided into diffuse reflection type and specular reflection type, which consists of an emitter and a receiver arranged on the same side. For the diffuse reflection type, when the light beam emitted by the emitter is blocked by an object and reflected, and the reflected light is received by the receiver, an electrical signal change occurs; for the specular reflection type, a reflector needs to be additionally arranged on the opposite side of the emitter. When the light beam emitted by the emitter is blocked and not reflected by the reflector, an electrical signal change occurs.
[0004] However, the above optoelectronic switch type detection unit is affected by the fabric material, resulting in poor detection effect. For example, the transmissive optoelectronic switch cannot accurately detect thinner fabrics, and the reflective optoelectronic switch cannot accurately detect darker fabrics, thus affecting the operation of the seam head integrated machine. Summary of the Invention
[0005] This application provides a detection method, device and system for a seam head integrated machine to achieve accurate detection of whether the fabric is transferred by the seam head integrated machine.
[0006] In a first aspect, this application provides a detection method for a seam head integrated machine, including: detecting whether a detection mark exists in the current image collected by a detection acquisition device, where the acquisition device is used to collect images of a predetermined area in real time, and the detection mark is set in the predetermined area; if the detection mark does not exist in the current image, then the step of detecting whether the detection mark exists in the current image collected by the detection acquisition device is executed again until the detection mark exists in the current image collected by the acquisition device; determining that the target to be transferred has completed the transfer; where the detection mark is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection mark and the acquisition device.
[0007] Second aspect, the present application provides a detection device for a seam sewing integrated machine, including: a processing module, configured to detect whether a detection mark exists in the current image collected by a collection device, where the collection device is used to collect images of a predetermined area in real time, and the detection mark is set in the predetermined area; a control module, configured to, if the detection mark does not exist in the current image, execute again the step of detecting whether a detection mark exists in the current image collected by the collection device until a detection mark exists in the current image collected by the collection device; the control module is further configured to determine that a target to be transferred has completed the transfer; where the detection mark is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection mark and the image collection device.
[0008] Third aspect, the present application provides an electronic device, including: a memory, a processor; a memory; a memory for storing executable instructions that can be executed by the processor; where the processor is configured to: execute the method described in the first aspect according to the executable instructions.
[0009] Fourth aspect, the present application provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0010] Fifth aspect, the present application provides a computer program product, including a computer program, where when the computer program is executed by a processor, it implements the method described in the first aspect.
[0011] Sixth aspect, the present application provides a detection system for a seam sewing integrated machine, including: a collection device and the detection device for the seam sewing integrated machine described in the second aspect.
[0012] The detection method, device and system for the seam sewing integrated machine provided by the present application determine whether a target to be transferred has completed the transfer by detecting whether a detection mark exists in the current image collected by the collection device; if the detection mark does not exist in the current image, the step of detecting whether a detection mark exists in the current image collected by the collection device is executed again until a detection mark exists in the current image collected by the collection device, and then it is determined that the target to be transferred has completed the transfer. The detection method of the present application uses image collection instead of photoelectric detection, improves the detection accuracy and responsiveness, reduces the requirements for the target to be transferred, improves the applicability to the target to be transferred, and can ensure the normal and efficient operation of the seam sewing integrated machine.
[0013] It should be understood that the content described in the above invention content part is not intended to limit the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. Description of the Drawings
[0014] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0015] Figure 1a A schematic diagram of an application scenario provided for the present application;
[0016] Figure 1b A flowchart of the change detection of a detection flag in the application scenario provided for the present application;
[0017] Figure 2a A flowchart of the detection method of a seam head integration machine provided in the first embodiment of the present application;
[0018] Figure 2b A flowchart of the detection method of a seam head integration machine provided in the first embodiment of the present application;
[0019] Figure 3 A schematic structural diagram of the detection device of a seam head integration machine provided in the second embodiment of the present application;
[0020] Figure 4 A schematic structural diagram of a processing module in the detection device of a seam head integration machine provided in the second embodiment of the present application;
[0021] Figure 5 A schematic structural diagram of an electronic device provided in the third embodiment of the present application;
[0022] Figure 6 A control flowchart of the detection system of a seam head integration machine provided in the fourth embodiment of the present application.
[0023] Through the above accompanying drawings, clear embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These accompanying drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed implementation manners
[0024] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different accompanying drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0025] First, the terms related to the present application will be explained:
[0026] Vision detection: Industrial cameras are used instead of human eyes to perform functions such as recognition, measurement, and positioning. Generally, a vision detection system is composed of a camera, a lens, and a light source combination, which can replace manual work to complete the detection of bar code characters, cracks, packaging, the integrity of the surface layer, depressions, etc. Using a vision detection system can effectively improve the detection speed and accuracy of the production line, and greatly increase the output and quality.
[0027] Feature extraction: It refers to the method and process of using a computer to extract characteristic information from an image. In machine learning, pattern recognition, and image processing, feature extraction starts from an initial set of measurement data and establishes derived values (features) that are designed to provide information and be non-redundant, thereby facilitating subsequent learning and generalization steps, and in some cases bringing better interpretability. Feature extraction is related to dimensionality reduction, and the quality of features has a crucial impact on the generalization ability. One of the most important characteristics of feature extraction is repeatability, that is, the features extracted from different images of the same scene should be the same.
[0028] ROI region (region of interest): Region of interest. In machine vision and image processing, the area that needs to be processed is outlined in the form of a square, circle, ellipse, irregular polygon, etc. from the processed image, which is called the region of interest.
[0029] This application is applied to the scenario of transferring textiles by a seam head integration machine. In an integrated sock knitting machine with a seam head machine, after the socks are knitted, the mechanical arm pulls the socks from the needle plate to the seam head mechanism. In order to protect the needle plate and ensure the production speed, usually during the process of the stretching arm moving from the needle plate to the seam head mechanism, an optoelectronic switch set on the needle plate is used to determine whether the socks have been completely pulled out from the needle plate. The optoelectronic switch type detection module is divided into two methods, one is the opposed type optoelectronic switch, and the other is the reflective optoelectronic switch. The opposed type optoelectronic switch consists of an emitter and a receiver set oppositely. When the beam emitted by the emitter is blocked and the receiver cannot receive the beam, an electrical signal change occurs. The reflective optoelectronic switch can be further divided into the diffuse reflection type and the specular reflection type, which consist of an emitter and a receiver set on the same side. For the diffuse reflection type, when the beam emitted by the emitter is blocked by an object and reflected, and the reflected light is received by the receiver, an electrical signal change occurs; for the specular reflection type, a reflector needs to be set on the opposite side of the emitter. When the beam emitted by the emitter is blocked and not reflected by the reflector, an electrical signal change occurs. The above optoelectronic switches are used to judge whether the textile has been transferred through the change of the electrical signal. Specifically, if the optoelectronic switch set on the needle plate finds an occlusion based on the electrical signal, it is determined that the fabric has not been transferred, otherwise it is determined that the fabric has been transferred.
[0030] However, in the above solution, the photoelectric switch needs to provide a specific installation position on the needle disc. The working radius of the stretching robotic arm of the seam head mechanism is relatively large, and the detection length needs to be at least 20 cm. The knitting needle discs in the seam head integrated machine are all circular. If the photoelectric is also arc-shaped and just fits on the edge of the needle disc, then the detection will be optimal. However, special-shaped photoelectric switches are very rare, and most of the photoelectric switches on the market are strip-shaped. This leads to limited installation positions, resulting in the inability to give a response when the sock leaves the needle disc for the first time. For example, if the fabric to be transferred is not completely transferred and only covers the area not covered by the photoelectric switch for detection, it may cause misjudgment. Moreover, the photoelectric switch may have a reaction delay or be unable to detect some objects of specific materials. For example, it will affect the reaction of the photoelectric switch for some black socks or thin silk stockings. If the next sock is knitted when the sock is not completely pulled out, the sock will be entangled with the needle disc and damage the needle disc, thus affecting the operation of the entire sock knitting machine.
[0031] The present application provides a detection method, device and system for a seam head integrated machine, aiming to solve the above technical problems in the prior art. A vision detection system is introduced into the seam head integrated machine to replace the photoelectric switch for detecting the fabric transfer process.
[0032] The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. These specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0033] Embodiment 1
[0034] The detection method for the seam head integrated machine provided by the present application can be applicable to Figure 1a an application scenario as shown in Figure 1aAs shown, taking sock knitting as an example, the semi-finished socks knitted by the sock knitting mechanism (not shown in the figure) will be transferred to the seam sewing mechanism for seam sewing. During the transfer process, the detection device collects images of the transfer path of the socks from the sock knitting mechanism to the seam sewing mechanism (the transfer path is exemplified by a solid line with an arrow in the figure), and the image collection area covers the transfer path area. The detection device continuously collects images during the transfer process, continuously extracts and matches the features of the marker. When the feature points of the marker are blocked, the matching value is lower than the set threshold; when the feature points of the marker reappear and are not blocked, the matching value is higher than the set threshold again, indicating that the socks have been transferred, and a signal that the socks have completely passed is given. To introduce the detection marker more intuitively, the detection marker given in the example is a simple dot matrix. It should be noted that the detection marker can include different colors or different shapes, such as a black-and-white picture with a distinct contour, or a color picture with distinct colors distributed. In the specific implementation process, it is selected according to implementation conditions, program conditions, etc.
[0035] Combined with Figure 1b An example of the process of sock transfer is given. For example, during the transfer process of the socks, the change process of the detection marker is as Figure 1b shown. At the beginning, the socks are not transferred, and the detection marker is in a fully visible state (in the figure, an 8×4 rectangular dot array is used as an example of the detection marker, where the black dots indicate not blocked, that is, they can be recognized from the image, and the white dots indicate blocked and cannot be recognized from the image); then the socks start to be transferred, and the left marker in the illustrated direction is blocked; continue to transfer, and the socks block all the markers; when the left marker in the illustrated direction appears again, it indicates that the socks are about to be transferred away; when the detection marker is in a fully visible state again, it indicates that the socks have been completely transferred.
[0036] Figure 2a This is a flowchart of the detection method of the seam sewing integrated machine provided in the first embodiment of the present application. As Figure 2a shown, the detection method of the seam sewing integrated machine provided in the first embodiment of the present application includes:
[0037] Step 101, detect whether there is a detection marker in the current image collected by the detection and collection device, where the collection device is used to collect images of a predetermined area in real time, and the detection marker is set in the predetermined area.
[0038] Specifically, the collection device can be a device for collecting images, which can have a display function and can display the collected images simultaneously after collecting the images; it can also not have a display function and cannot display the collected images simultaneously after collecting the images. If you want to display the collected images, you can connect a display auxiliary device. The collection device can be a camera with a display function or a camera without a display function.
[0039] In practical applications, the execution entity of this detection method can be the detection device of the seam joining machine. This device can be implemented through a computer program, for example, application software, etc.; or, this device can also be implemented as a medium storing relevant computer programs, for example, USB flash drives, cloud disks, etc.; or, this device can also be implemented through an entity device integrated or installed with relevant computer programs, for example, chips, etc. This detection device can be set separately and connected to the acquisition device; or, this detection device can be integrated in the acquisition device.
[0040] The predetermined area should cover the trajectory passed by the target to be transferred during the transfer process, so as to facilitate a complete judgment of whether the target to be transferred has been completely transferred. The detection mark is set in the predetermined area, and the detection device continuously extracts and matches the features of the detection mark.
[0041] Step 102: If there is no detection mark in the current image, then repeat the step of detecting whether there is a detection mark in the current image collected by the acquisition device until there is a detection mark in the current image collected by the acquisition device.
[0042] In order to detect whether the target to be transferred has passed a certain specific position, first, when the target to be transferred has not been transferred, a clear background picture with an appropriate range is collected to create a template, special colors and / or marks of special colors are selected, the detection device extracts the features of the marks, and during the transfer of the target to be transferred, the acquisition device continuously collects images, and the detection device extracts feature points based on the images collected by the acquisition device and matches them with the feature points in the template.
[0043] It should be noted that the absence of a detection mark includes two situations. One is that the target to be transferred obscures all feature points, indicating that the target to be transferred is in the process of being transferred; the other is that the target to be transferred obscures some feature points, indicating that the target to be transferred has just started to be transferred or is about to be completely transferred. The presence of a detection target means that the detection mark is completely displayed, indicating that the target to be transferred has been completely transferred or has not started to be transferred yet.
[0044] When the target to be transferred is being transferred, the feature points of the mark will be obscured and the matching value will be lower than the set threshold, and step 101 is continued to be repeated; when the target to be transferred is completely transferred, the feature points of the mark are no longer obscured and reappear, and the matching value is higher than the set threshold again, then step 103 is performed.
[0045] Step 103: Determine that the target to be transferred has been completely transferred; wherein, the detection mark is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection mark and the acquisition device.
[0046] Specifically, when the feature points of the detection marker are no longer blocked and reappear, and the matching value is higher than the set threshold again, it indicates that the target to be transferred has been completely transferred. Among them, in order to detect whether the target to be transferred has passed through a specific place, it is turned into an occlusion problem. Therefore, the detection marker is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection marker and the acquisition device.
[0047] In the above detection method, the detection marker can select the relatively conspicuous red as the marker in the visual detection algorithm. The marker is preferably non-reflective and can be leather or matte red tape. If other red markers appear within the field of view, the non-marker red needs to be blocked to prevent interference with the algorithm. In some instances, other colors can also be selected. This embodiment does not make specific limitations, and those skilled in the art can flexibly select colors and shapes according to the actual situation. During actual application, for some models of seam head integration machines, if there are already symbols that can be used as markers on the transfer trajectory of the target to be transferred, there is no need to set additional markers.
[0048] Further, in an example, as Figure 2b shown, step 101 may specifically include:
[0049] Step 201, extract the feature points of the detection marker from the current image collected by the acquisition device to obtain a feature extraction result; Step 202, perform feature matching between the feature extraction result and the feature data of the detection marker to obtain a feature matching result; Step 203, if the feature matching result is a mismatch, it is determined that there is no detection marker in the current image; Step 204, if the feature matching result is a match, it is determined that there is a detection marker in the current image.
[0050] Among them, the feature data of the detection marker are all the feature points when not blocked by the transferred target. During the transfer of the target to be transferred, some or all of the feature points will be blocked. The acquisition device will continuously collect the current image, and the detection device extracts the feature points based on the image collected by the acquisition device, detects the marker in real time and obtains a feature extraction result; compares and matches the extracted feature result with all the feature points to obtain a feature matching result. When the feature matching result is a mismatch, it is considered that there is no detection marker in the current image, that is, it indicates that some or all of the feature points are blocked by the target to be transferred; when the feature result is a match, it is considered that there is a detection marker in the current image, that is, it indicates that all the feature points are not blocked. The change process of the above feature matching result can indicate that the fabric has passed through, that is, it has been successfully transferred.
[0051] Further, in one example, step 202 performs feature matching between the feature extraction result and the feature data of the detection flag to obtain a feature matching result, including: using the line-2D matching algorithm to perform feature matching between the feature extraction result and the feature data of the detection flag to obtain a feature matching result.
[0052] Specifically, through the line-2D matching algorithm, according to the video source or picture source provided by the acquisition device, it is calculated whether the flag is occluded. Line-2D is a sub-module in line-mod. It removes the 3D modality of line-mod and only uses 2D images to make templates for object matching. The basic idea of the line-2D matching algorithm is to calculate the similarity through a classic similarity calculation formula based on the contour and gradient information of the image for template matching. The similarity calculation formula is as follows:
[0053]
[0054] Among them, ori(O, r) is the gradient at position r on the template image, and ori(I, c + r) is the gradient at (c + r) on the input image, where c is the center point on the input image corresponding to the template image, and actually here it is the gradient of the pixel on the input image corresponding to the pixel on the template image.
[0055] This matching algorithm uses binary bits to represent the quantized gradient direction and calculates the response image of each quantized direction for the search image respectively, thus converting the above process of calculating the matching similarity into a process of looking up a table, greatly improving the efficiency of calculating the similarity; by the method of diffusion direction, the gradient directions of different pixel positions in the neighborhood are counted into the anchor pixel, thus improving the robustness of the matching process to small positions and rotations; through the data organization method of linear storage, the search speed of the matching process is improved.
[0056] In one example, the detection method further includes: calculating the target focal length of the acquisition device according to the installation position of the acquisition device, the area range of the predetermined area, as well as the field of view range and viewing distance of the acquisition device; adjusting the focal length of the acquisition device to the target focal length.
[0057] Specifically, the acquisition device includes a camera and a lens. Based on its installation position relative to the predetermined area, the area range of the predetermined area, as well as the field of view range and the viewing distance of the acquisition device, the target focal length of the acquisition device is calculated, and a lens with an appropriate focal length is selected to ensure that the field of view range of the acquisition device can cover the transfer trajectory of the target to be transferred and ensure the effectiveness of image acquisition. If a unified focal length is used, it may be possible that the image acquisition area cannot completely cover the detection mark, resulting in too small a detection range. Or the detection mark is too small in the image, resulting in poor feature point extraction effect, and a wide-angle lens may introduce detection marks with similar features, interfering with the detection algorithm. Therefore, the ratio of the area of the ROI region corresponding to the detection mark in the image acquired by the acquisition device to the area of the field of view range of the acquisition device is in the range of 1:8 to 1:4.
[0058] In one example, before step 101, it further includes: controlling the light source device to turn on. The light source device is installed on the acquisition device and is used to provide the illumination brightness required for the acquisition device to perform image acquisition. It is necessary to select a suitable light source according to the installation position of the light source. Generally, a ring light source is used. The LED lamp beads of the ring light source are arranged in a ring and have a certain angle with the optical axis. There are various angles and sizes of the lamp bead arrangement methods to meet different detection requirements, and the lens or camera acquires images through the middle of the ring light source. Under normal circumstances, the ring light source can be installed on the camera. However, when the detection position is below the middle cover structure of the seam head integration machine and the camera takes pictures at an angle, the light source cannot effectively cover all detection areas, resulting in poor image acquisition effect. A reasonable light source should control the illuminance of the detection area to be relatively uniform, without overly bright or overly dark areas.
[0059] In one example, before step 101, it further includes: controlling the laser device to turn on. The laser device is installed on the acquisition device, and the projection area of the laser device is consistent with the image acquisition area of the acquisition device; adjusting the installation position of the acquisition device until the projection area of the laser device is consistent with the position where the detection mark is located. Since image acquisition and mark detection and other parts can operate independently, it is not necessarily necessary to display image information. For example, during debugging, in order to facilitate installation, a laser device is fixed at the camera end, and the laser and the camera are calibrated. As long as the laser spot hits a specific position on the mark, the image can be not displayed and the installation can be directly carried out. The acquisition device will automatically detect the red mark, and then narrow the template range to only extract the effective feature points of the mark, which greatly reduces interference.
[0060] The detection method of the seam head integration machine provided in the first embodiment of the present application includes detecting whether a detection mark exists in the current image collected by the detection collection device; if the detection mark does not exist in the current image, the step of detecting whether a detection mark exists in the current image collected by the detection collection device is executed again until the detection mark exists in the current image collected by the collection device; it is determined that the target to be transferred has completed the transfer. Using image acquisition instead of photoelectric detection reduces the requirements for the target to be transferred, improves the applicability to the target to be transferred, enables the image field of view to cover the detection area, avoids setting installation positions on the transfer route, and at the same time improves the detection accuracy and responsiveness, ensuring the normal and efficient operation of the seam head integration machine.
[0061] Embodiment 2
[0062] The structural schematic diagram of the detection device of the seam head integration machine provided in the second embodiment of the present application is as Figure 3 shown, including: a processing module 10, configured to detect whether a detection mark exists in the current image collected by the detection collection device, where the collection device is used to collect images of a predetermined area in real time, and the detection mark is set in the predetermined area; a control module 20, configured to, if the detection mark does not exist in the current image, execute again the step of detecting whether a detection mark exists in the current image collected by the detection collection device until the detection mark exists in the current image collected by the collection device; the control module 20 is further configured to determine that the target to be transferred has completed the transfer; wherein, the detection mark is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection mark and the image acquisition device.
[0063] Specifically, the collection device in the processing module 10 can be a device for collecting images, which can have a display function and can display the collected image simultaneously after collecting the image; or it can not have a display function and cannot display the collected image simultaneously after collecting the image. If you want to display the collected image, you can connect a display auxiliary device. The collection device can be a camera with a display function or a camera without a display function. The predetermined area should cover the trajectory passed by the target to be transferred during the transfer process to facilitate a complete judgment of whether the target to be transferred has been completely transferred. The detection mark is set in the predetermined area, and the processing module 10 continuously extracts and matches the features of the detection mark.
[0064] In order to detect whether the target to be transferred has passed a specific position, first, when the target to be transferred has not been transferred, a clear background image with an appropriate range is collected to create a template. Special colors and / or signs of special colors are selected, and the acquisition device extracts features of the signs. During the transfer of the target to be transferred, the processing module 10 continuously collects images and extracts feature points, and matches them with the feature points in the template. Among them, the non-existence of the detection sign includes two cases. One is that the target to be transferred obscures all the feature points, indicating that the target to be transferred is in the process of being transferred; the other is that the target to be transferred obscures some of the feature points, indicating that the target to be transferred has just started to be transferred or is about to be completely transferred. The existence of the detection target means that the detection sign is completely displayed, indicating that the target to be transferred has been completely transferred or has not started to be transferred yet.
[0065] When the target to be transferred is being transferred, the feature points of the sign will be obscured, and the matching value will be lower than the set threshold. Then the control module 20 feeds back to the processing module 10, and the processing module 10 continues to collect the current image and detect whether there is a detection sign; when the target to be transferred is completely transferred, the feature points of the sign are no longer obscured and reappear, and the matching value is higher than the set threshold again, then the control module 20 determines that the target to be transferred has been transferred. Among them, in order to detect whether the target to be transferred has passed a specific place, it is turned into an occlusion problem. Therefore, the detection sign is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection sign and the acquisition device.
[0066] In the above detection method, the detection sign can select the more conspicuous red color as the marker in the visual detection algorithm. The marker is preferably non-reflective and can be leather or matte red tape. If there are other red signs in the field of view, the non-sign red needs to be occluded to prevent interference with the processing module 10. In some examples, other colors can also be selected. This embodiment does not make specific limitations, and those skilled in the art can flexibly select colors and shapes according to the actual situation. In the actual application process, for some models of seam head integrated machines, if there are already signs that can be used as markers on the transfer trajectory of the target to be transferred, there is no need to set additional markers.
[0067] In an example, Figure 4Schematic diagram of the structure of the processing module in the detection device of the seam head integration machine provided in the second embodiment of the present application. The processing module 10 includes: a feature extraction unit 11, configured to extract feature points regarding a detection mark from the current image collected by the acquisition device to obtain a feature extraction result; a feature matching unit 12, configured to perform feature matching on the feature extraction result and the feature data of the detection mark to obtain a feature matching result; a processing unit 13, configured to determine that there is no actual detection mark in the current image if the feature matching result is a mismatch; the processing unit 13 is further configured to determine that there is a detection mark in the current image if the feature matching result is a match.
[0068] Among them, the feature data of the detection mark are all the feature points when not blocked by the transfer target. During the transfer process of the transfer target, it will partially or even completely block the feature points. The feature extraction unit 11 continuously collects the current image and extracts the feature points in the image to detect the mark in real time and obtain a feature extraction result; the feature matching unit 12 compares and matches the feature extraction result with all the feature points to obtain a feature matching result. When the feature matching result is a mismatch, the processing unit 13 considers that there is no detection mark in the current image, that is, it indicates that some or all of the feature points are blocked by the transfer target; when the feature result is a match, the processing unit 13 considers that there is a detection mark in the current image, that is, it indicates that all the feature points are not blocked. The change process of the above feature matching result can indicate that the fabric has passed through, that is, it has been successfully transferred.
[0069] In one example, the feature matching unit 12 specifically uses the line-2D matching algorithm to perform feature matching on the feature extraction result and the feature data of the detection mark to obtain a feature matching result.
[0070] The basic idea of the line-2D matching algorithm adopted by the feature matching unit 12 is template matching by calculating the similarity through a classic similarity calculation formula according to the contour and gradient information of the image. The similarity calculation formula is as follows:
[0071]
[0072] Among them, ori(O, r) is the gradient at position r on the template image, and ori(I, c + r) is the gradient at (c + r) on the input image, where c is the center point on the input image corresponding to the template image, and actually here it is the gradient of the pixel on the input image corresponding to the pixel of the template image.
[0073] Its ingenuity lies in the following aspects: 1) The matching algorithm uses binary digits to represent the quantized gradient directions, and calculates the response images of each quantized direction for the search image respectively, thus transforming the above calculation process of the matching similarity into a process of looking up a table, greatly improving the efficiency of calculating the similarity; 2) By means of the diffusion direction method, the gradient directions at different pixel positions in the neighborhood are counted into the anchor pixel, thus improving the robustness of the matching process to small displacements and rotations; 3) Through the data organization method of linear storage, the lookup speed of the matching process is improved.
[0074] In one example, the detection device of the seam head integration machine further includes: a calculation module, configured to calculate the target focal length of the acquisition device according to the installation position of the acquisition device, the area range of the predetermined area, and the field of view range and the viewing distance of the acquisition device; an adjustment module, configured to adjust the focal length of the acquisition device to the target focal length.
[0075] Specifically, according to the target focal length of the acquisition device calculated by the calculation module, a lens with an appropriate focal length is selected, and the focal length of the acquisition device is adjusted to the target focal length by the adjustment module to ensure that the field of view range of the acquisition device can cover the transfer trajectory of the target to be transferred and ensure the effectiveness of image acquisition. If a unified focal length is used, it may cause the image acquisition area to not fully cover the detection mark, resulting in too small a detection range. Or the detection mark is too small in the image, resulting in poor effect of feature point extraction, and a wide-angle lens may introduce detection marks with similar features, interfering with the detection algorithm. Therefore, the ratio of the area of the ROI region corresponding to the detection mark in the image acquired by the acquisition device to the area of the field of view range of the acquisition device is selected to be in the range of 1:8 to 1:4.
[0076] In one example, the control module 20 is further configured to control the light source device to turn on before the processing module 10 detects whether there is a detection mark in the current image acquired by the acquisition device; wherein, the light source device is installed on the acquisition device, and the light source device is used to provide the illumination brightness required for the acquisition device to perform image acquisition. It is necessary to select a suitable light source according to the installation position of the light source. Generally, a ring light source is used. The LED lamp beads of the ring light source are arranged in a ring and have a certain angle with the optical axis. There are various angles and sizes of the lamp bead arrangement methods to meet different detection requirements, and the lens or camera acquires images through the middle of the ring light source. Under normal circumstances, the ring light source can be installed on the camera, but when the detection position is below the middle cover structure of the seam head integration machine and the camera takes pictures at an angle, the light source cannot effectively cover all detection areas, resulting in poor image acquisition effect. A reasonable light source should control the illuminance of the detection area to be relatively average, without overly bright or overly dark areas.
[0077] In one example, the control module 20 is further configured to control the laser device to turn on before the processing module 10 detects whether a detection mark exists in the current image collected by the collection device; wherein, the laser device is installed on the collection device, and the projection area of the laser device is consistent with the image collection area of the collection device; the control module is further configured to adjust the installation position of the collection device until the projection area of the laser device is consistent with the position where the detection mark is located. Since image collection and mark detection are independent operating parts, it is not necessarily required to display image information. For example, during debugging, for the convenience of installation, a laser device is fixed at the camera end, and the laser and the camera are calibrated. As long as the light spot of the laser hits a specific position on the mark, the image can be not displayed and the installation can be directly carried out. The collection device will automatically detect the red mark, and then narrow the template range to only extract the effective feature points of the mark, which greatly reduces interference.
[0078] The detection device of the seam head integration machine provided in the second embodiment of the present application includes a processing module 10, configured to detect whether a detection mark exists in the current image collected by the collection device, wherein the collection device is configured to collect images of a predetermined area in real time, and the detection mark is set in the predetermined area; a control module 20, configured to, if the detection mark does not exist in the current image, execute the step of detecting whether a detection mark exists in the current image collected by the collection device again until the detection mark exists in the current image collected by the collection device; the control module 20 is further configured to determine that the target to be transferred has completed the transfer; wherein, the detection mark is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection mark and the image collection device. Collecting images instead of photoelectric detection reduces the requirements for the target to be transferred, improves the applicability to the target to be transferred, enables the image field of view to cover the detection area, avoids setting installation positions on the transfer route, and at the same time improves the detection accuracy and responsiveness, ensuring the normal and efficient operation of the seam head integration machine.
[0079] Embodiment Three
[0080] Figure 5 is a schematic structural diagram of an electronic device provided in Embodiment Three of the present application, as Figure 5 shown, the electronic device includes:
[0081] A processor 291, the electronic device further includes a memory 292; it may further include a communication interface 293 and a bus 294. Among them, the processor 291, the memory 292, and the communication interface 293 can communicate with each other through the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can call the logical instructions in the memory 292 to execute the methods of the above embodiments.
[0082] In addition, when the logical instructions in the above-mentioned memory 292 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0083] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of the present application. The processor 291 executes the software programs, instructions, and modules stored in the memory 292 to perform functional applications and data processing, that is, to implement the methods in the above-mentioned method embodiments.
[0084] The memory 292 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0085] The embodiments of the present application provide a computer-readable storage medium, in which computer-execution instructions are stored. When the computer-execution instructions are executed by a processor, they are used to implement the methods provided in the above-mentioned embodiments.
[0086] The embodiments of the present application provide a computer program product, including a computer program, which implements the methods provided in the above-mentioned embodiments when executed by a processor.
[0087] Embodiment 4
[0088] The flowchart of the detection system of the seam head integration machine provided in Embodiment 4 of the present application. The system includes a collection device and the detection device described in Embodiment 2. Among them, the collection device is used to collect images, and the detection device correspondingly executes the detection method provided in the foregoing method embodiments.
[0089] Taking an actual scenario as an example, such as Figure 6 As shown, the general working process of the system includes: the system opens a Controller Area Network (CAN) communication interface, which can be used for communication with the main control unit, and gives the processes of system initialization, upgrade, and detection. The specific system process is as Figure 6 shown.
[0090] First, power on each module and start the system. When program update is required, insert a USB flash drive storing the update file, update the fixed operating file to overwrite the original operating file, and then start the detection application program; when program update is not required, directly start the detection application program. Then, perform system initialization. When the initialization is incorrect, the system will give an error message. If there is a communication error, an alarm light will be given. After the system's CAN communication connection, camera connection, and template loading are successful, the system starts detection and calibrates flag bit 1. If the host computer changes parameters, the system dynamically changes the parameters according to the host computer's instructions and receives the detection signal; if the host computer does not change parameters, the system receives the detection signal. When the signal is not to detect, the system does not start detection; when the signal is to detect, the system starts detection, turns on the light source, and the processing module and control module start running. When the matching value is lower than the threshold, it indicates that there is no detection flag, and a corresponding communication signal is given; when the matching value is higher than the threshold, it indicates that there is a detection flag, and a corresponding communication signal is given. After this detection is completed, turn off the light source, return to flag bit 1, and wait for the next detection.
[0091] The detection system of the seam head integration machine provided in the third embodiment of the present application includes the detection device described in the second embodiment, which can manually update the program and give error prompts when problems are encountered in the startup and detection processes, improving the detection accuracy and ensuring the normal and efficient operation of the seam head integration machine.
[0092] Those skilled in the art will readily think of other implementations of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include the common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.
[0093] It should be understood that the present application is not limited to the exact structure already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
Claims
1. A detection method for a seam head integration machine, characterized in that Including: Detecting whether a detection mark exists in the current image collected by the detection and acquisition device, where the acquisition device is used to collect images of a predetermined area in real time, and the detection mark is set in the predetermined area; If the detection mark does not exist in the current image, then the step of detecting whether the detection mark exists in the current image collected by the detection and acquisition device is executed again until the detection mark exists in the current image collected by the acquisition device; Determining that the target to be transferred has completed the transfer; where the detection mark is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection mark and the acquisition device; The method further includes: Calculating the target focal length of the acquisition device based on the installation position of the acquisition device, the area range of the predetermined area, and the field of view range and viewing distance of the acquisition device; Adjusting the focal length of the acquisition device to the target focal length; The ratio of the area of the ROI region corresponding to the detection mark in the image collected by the acquisition device to the area of the field of view range of the acquisition device is in the range of 1:8 to 1:4; Detecting whether a detection mark exists in the current image collected by the detection and acquisition device includes: Performing feature point extraction on the current image collected by the acquisition device for the detection mark to obtain a feature extraction result; Performing feature matching between the feature extraction result and the feature data of the detection mark to obtain a feature matching result; If the feature matching result is a mismatch, it is determined that the detection mark does not exist in the current image; If the feature matching result is a match, it is determined that the detection mark exists in the current image; The performing feature matching between the feature extraction result and the feature data of the detection mark to obtain a feature matching result includes: Using the line-2D matching algorithm to perform feature matching between the feature extraction result and the feature data of the detection mark to obtain a feature matching result; Before detecting whether a detection mark exists in the current image collected by the detection and acquisition device, it further includes: Controlling the light source device to turn on, the light source device is installed on the acquisition device, and the light source device is used to provide the illumination brightness required for the acquisition device to collect images; and, Controlling the laser device to turn on, the laser device is installed on the acquisition device, and the projection area of the laser device is consistent with the image acquisition area of the acquisition device; Adjusting the installation position of the acquisition device until the projection area of the laser device is consistent with the position where the detection mark is located.
2. A detection device for a seam head integrated machine, characterized in that, Including: A processing module, configured to detect whether a detection mark exists in the current image collected by the detection and acquisition device, where the acquisition device is used to collect images of a predetermined area in real time, and the detection mark is set in the predetermined area; A control module, configured to, if the detection mark does not exist in the current image, then execute again the step of detecting whether the detection mark exists in the current image collected by the detection and acquisition device until the detection mark exists in the current image collected by the acquisition device; The control module is further configured to determine that the target to be transferred has been transferred; wherein, the detection flag is set on the transfer trajectory of the target to be transferred in the image, and the target to be transferred is located between the detection flag and the image acquisition device; The device further includes: A calculation module, configured to calculate a target focal length of the acquisition device according to the installation position of the acquisition device, the area range of the predetermined area, and the field of view range and viewing distance of the acquisition device; An adjustment module, configured to adjust the focal length of the acquisition device to the target focal length; The ratio of the area of the ROI region corresponding to the detection flag in the image acquired by the acquisition device to the area of the field of view range of the acquisition device is in the range of 1:8 to 1:4; The processing module includes: A feature extraction unit, configured to perform feature point extraction on the current image acquired by the acquisition device with respect to the detection flag to obtain a feature extraction result; A feature matching unit, configured to perform feature matching on the feature extraction result and the feature data of the detection flag to obtain a feature matching result; A processing unit, configured to determine that the detection flag does not exist in the current image if the feature matching result is a mismatch; The processing unit is further configured to determine that the detection flag exists in the current image if the feature matching result is a match; The feature matching unit is specifically configured to use a line-2D matching algorithm to perform feature matching on the feature extraction result and the feature data of the detection flag to obtain a feature matching result; The control module is further configured to control the light source device to turn on before the processing module detects whether the detection flag exists in the current image acquired by the acquisition device; Wherein, the light source device is installed on the acquisition device, and the light source device is configured to provide the illumination brightness required for the acquisition device to perform image acquisition; The control module is further configured to control the laser device to turn on before the processing module detects whether the detection flag exists in the current image acquired by the acquisition device; wherein, the laser device is installed on the acquisition device, and the projection area of the laser device is consistent with the image acquisition area of the acquisition device; The control module is further configured to adjust the installation position of the acquisition device until the projection area of the laser device is consistent with the position where the detection flag is located.
3. An electronic device, characterized in that, Includes: A memory, a processor; A memory; A memory for storing executable instructions of the processor; Wherein, the processor is configured to: execute the detection method according to claim 1 according to the executable instructions.
4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by the processor, they are used to implement the detection method according to claim 1.
5. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the detection method according to claim 1.
6. A detection system for a seam head integrated machine, characterized in that, Includes: An acquisition device and a detection device of a seam head integration machine according to claim 2.
Citation Information
Patent Citations
Article taking and placing detection system, method and device
CN112052701A