Sewing parameter adaptive adjustment method and system, electronic device and storage medium
By acquiring image information of the sewing equipment through depth detection and edge detection algorithms, and adjusting sewing parameters in real time, the problem of the sewing equipment being unable to identify the fabric condition in advance is solved, thus improving sewing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JACK SEWING MASCH CO LTD
- Filing Date
- 2025-01-22
- Publication Date
- 2026-07-24
AI Technical Summary
Existing sewing equipment cannot identify the state of the fabric to be sewn in advance, resulting in delays in adjusting sewing parameters and affecting the smoothness and efficiency of the sewing process.
By employing depth detection and edge detection algorithms, image information from the sewing preparation and execution stages is acquired to calculate the initial and running state parameters of the fabric, and the sewing parameters are adjusted in real time.
It enables the advance calculation of fabric thickness information, avoids recognition lag issues, improves sewing efficiency and accuracy, and enhances adaptability to complex fabrics.
Smart Images

Figure CN122446435A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of garment manufacturing technology and relates to a method, system, electronic device and storage medium for adaptive adjustment of sewing parameters. Background Technology
[0002] With the development of the garment manufacturing industry, the market demand for personalized customization is growing. This trend requires sewing equipment to adaptively adjust its sewing parameters to suit the needs of fabrics with different materials, thicknesses, and patterns.
[0003] Currently, there are two main technical methods for adjusting sewing parameters in sewing equipment. One method is based on Hall effect sensors mounted on the presser foot to detect fabric thickness. While this method is inexpensive and easy to implement, the inherent limitations of the Hall effect sensor make it difficult to anticipate the true condition of the fabric when handling fast-moving or uneven surfaces. This leads to delays in adjusting sewing parameters, affecting the smoothness and efficiency of the entire sewing process. The other method is non-contact measurement using lasers. Compared to the former, laser technology can obtain more precise data. However, this method also has limitations, such as a relatively small effective coverage area; especially when encountering transparent or reflective materials, it may face recognition difficulties, thus failing to fully and accurately reflect the actual condition of the object being measured. Summary of the Invention
[0004] The purpose of this application is to provide a method, system, electronic device, and storage medium for adaptive adjustment of sewing parameters, in order to solve the problem of delayed adjustment of sewing parameters caused by the inability to identify the state of the fabric to be sewn in advance in the prior art.
[0005] In a first aspect, this application provides a method for adaptive adjustment of sewing parameters, comprising: acquiring an image of a workbench surface during the sewing preparation stage and using it as a first scene image; acquiring an image of the workbench surface during the sewing process and using it as a second scene image; processing the first scene image based on a depth detection algorithm and an edge detection algorithm to obtain initial state parameter information; processing the second scene image based on the depth detection algorithm and the edge detection algorithm to obtain operating state parameter information; determining the fabric state of the area to be sewn based on the initial state parameter information and the operating state parameter information; and adjusting the sewing parameters of the sewing equipment in a timely manner when starting the sewing operation in the area to be sewn based on the fabric state of the area to be sewn.
[0006] In one implementation of the first aspect, the first scene image is processed based on a depth detection algorithm and an edge detection algorithm to obtain initial state parameter information, including: detecting the first depth information of the target object in the first scene image based on the depth detection algorithm and generating a first depth map; the first depth information includes the thickness of the presser foot and the depth information of the table; detecting the first edge information of the target object in the first depth map based on the edge detection algorithm; the first edge information includes the coordinates of the needle landing point and the coordinates of the presser foot contour; and using the first depth information and the first edge information as the initial state parameter information.
[0007] In one implementation of the first aspect, the second scene image is processed based on a depth detection algorithm and an edge detection algorithm to obtain running state parameter information, including: detecting the second depth information of the target object in the second scene image based on the depth detection algorithm and generating a second depth map; the second depth information includes the depth information of the presser foot in the current sewing area and the depth information of the fabric in the adjacent sewing area; detecting the second edge information of the target object in the second depth map based on the edge detection algorithm; the second edge information includes the coordinates of the needle landing point and the coordinates of the presser foot contour in the current sewing area; and using the second depth information and the second edge information as the running state parameter information.
[0008] In one implementation of the first aspect, determining the fabric state of the area to be sewn based on the initial state parameter information and the operating state parameter information includes: calculating the thickness of the fabric in the adjacent areas to be sewn based on the thickness of the sewing board and the depth information of the fabric in the adjacent areas to be sewn; calculating the thickness of the fabric in the current sewing area based on the thickness of the sewing board, the thickness of the presser foot, and the depth information of the presser foot in the current sewing area; and calculating the change in fabric thickness between the current sewing area and the adjacent sewing areas based on the thickness of the fabric in the current sewing area and the thickness of the fabric in the adjacent areas to be sewn.
[0009] In one implementation of the first aspect, when starting the sewing operation in the area to be sewn, based on the fabric state of the area to be sewn, timely adjustment of the sewing parameters of the sewing equipment includes: determining whether the change in fabric thickness is equal to a preset threshold; if so, it indicates that the change in fabric thickness between the current sewing area and the adjacent area to be sewn is constant, and the existing sewing parameters of the sewing equipment remain unchanged; otherwise, determining whether the change in fabric thickness is greater than the preset threshold; if so, it indicates that the fabric will become thicker from the current sewing area to the adjacent area to be sewn; and adjusting the sewing parameters of the sewing equipment accordingly based on the change in fabric thickness; otherwise, it indicates that the fabric will become thinner from the current sewing area to the adjacent area to be sewn, and adjusting the sewing parameters of the sewing equipment accordingly based on the change in fabric thickness; wherein the sewing parameters of the sewing equipment include thread tension, feed dog movement trajectory, and needle spacing.
[0010] In one implementation of the first aspect, detecting the first depth information of a target object in the first scene image based on a depth detection algorithm and generating a first depth map includes: filtering the first scene image to obtain a filtered first scene image; calculating the vertical depth values from different pixels in the filtered first scene image to the camera optical center; wherein the vertical depth value from the pixel corresponding to the platform to the camera optical center is defined as the platform's depth information, and the vertical depth value from the pixel corresponding to the presser foot to the camera optical center is defined as the presser foot's depth information; the difference between the platform's depth information and the presser foot's depth information is defined as the presser foot's thickness; performing tolerance judgment on the vertical depth values from different pixels to the camera optical center based on a preset tolerance standard; dividing the filtered first scene image into several regions according to the tolerance judgment result; wherein each region corresponds to a specific vertical depth level; and assigning a corresponding intensity grayscale level to each region according to the vertical depth level corresponding to each region to construct the first depth map.
[0011] In one implementation of the first aspect, detecting the first edge information of the target object in the first depth map based on the edge detection algorithm includes: filtering the first depth map to obtain a filtered first depth map; performing edge enhancement processing on the filtered first depth map to highlight pixels with significant changes in neighborhood intensity in the filtered first depth map; calculating the gradient magnitude and direction of each pixel in the filtered first depth map to identify regions with large gradient values; and locating the coordinates of the needle landing point and the presser foot contour based on the regions with large gradient values.
[0012] Secondly, this application provides a sewing parameter adaptive adjustment system. The system includes: a first image acquisition module, used to acquire an image of the workbench surface during the sewing preparation stage, and use it as a first scene image; a second image acquisition module, used to acquire an image of the workbench surface during the sewing process, and use it as a second scene image; a first image processing module, used to process the first scene image based on a depth detection algorithm and an edge detection algorithm to obtain initial state parameter information; a second image processing module, used to process the second scene image based on a depth detection algorithm and an edge detection algorithm to obtain operating state parameter information; a fabric state determination module, used to determine the fabric state of the area to be sewn based on the initial state parameter information and the operating state parameter information; and a sewing parameter adjustment module, used to adjust the sewing parameters of the sewing equipment in a timely manner based on the fabric state of the area to be sewn when starting the sewing operation in the area to be sewn.
[0013] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described above.
[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the methods described above.
[0015] As described above, the adaptive sewing parameter adjustment method, system, electronic device, and storage medium of this application can calculate the fabric thickness information of the area to be sewn in advance, enabling timely adjustment of relevant sewing parameters and effectively avoiding the problem of recognition lag. Furthermore, by combining depth detection technology and edge detection technology, not only is the ability to capture effective information enhanced, but sewing efficiency is also significantly improved. Attached Figure Description
[0016] Figure 1 The diagram shown is a structural schematic of a mobile terminal described in one embodiment of this application.
[0017] Figure 2 The flowchart shown is an embodiment of the adaptive adjustment method for sewing parameters described in this application.
[0018] Figure 3 The diagram shows a spatial layout of the sewing equipment and camera described in this application in one embodiment.
[0019] Figure 4 The image shown is a schematic diagram of an embodiment of the first scene described in this application.
[0020] Figure 5The diagram shown is a schematic representation of the first depth map described in this application in one embodiment.
[0021] Figure 6 The diagram shows the depth of different sewing areas in one embodiment of the adaptive adjustment method for sewing parameters described in this application.
[0022] Figure 7 The diagram shown is a schematic representation of the edge detection feedback result in one embodiment of the adaptive adjustment method for sewing parameters described in this application.
[0023] Figure 8 The flowchart shown is an example of the adaptive adjustment method for sewing parameters described in this application in another embodiment.
[0024] Figure 9 The diagram shown is a structural schematic of an embodiment of the sewing parameter adaptive adjustment system described in this application.
[0025] Figure 10 The diagram shown is a structural schematic of the electronic device described in this application in one embodiment. Detailed Implementation
[0026] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0027] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0028] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0029] The following embodiments of this application provide a method, system, electronic device, and storage medium for adaptive adjustment of sewing parameters, which effectively solves the problem of delayed adjustment of sewing parameters caused by the inability to identify the state of the fabric to be sewn in advance in the prior art.
[0030] The adaptive sewing parameter adjustment method provided in this application can be run on mobile terminals, computer terminals, and similar devices. Taking the operation on the mobile terminal as an example, Figure 1 This is a hardware structure block diagram of the mobile terminal, such as... Figure 1 As shown, a mobile terminal may include a processor and a memory, wherein the processor may be a central processing unit and the memory is used to store data. Figure 1 The mobile terminal in the example is for illustrative purposes only and is not intended to limit the specific structure of the mobile terminal.
[0031] Optionally, the mobile terminal may further include: a communication transmission device and an input / output device.
[0032] Optionally, the memory can be used to store computer programs, such as application software programs and modules. The memory may include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include memory remotely located relative to the processor, which can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks (LANs), mobile communication networks, and combinations thereof.
[0033] Optionally, the communication transmission device can be used to receive or send data via a network, which may include a wireless network provided by the mobile terminal's communication provider. The communication transmission device may include a NIC (Network Interface Controller), which can be connected to other network devices via a base station to communicate with the Internet.
[0034] The technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0035] Please see Figure 2 The diagram shows a flowchart of an embodiment of the adaptive adjustment method for sewing parameters described in this application. Figure 2 As shown in the figure, this application embodiment provides a sewing parameter adaptive adjustment method, including the following steps S100 to S600.
[0036] In step S100, during the sewing preparation stage, an image of the workbench is acquired and used as the first scene image.
[0037] The sewing preparation stage is defined as the initial state where the sewing equipment is not started and there is no fabric on the worktable, at which time no operating parameters are generated.
[0038] In step S200, during the sewing stage, an image of the workbench surface is acquired and used as a second scene image.
[0039] The sewing process phase is defined as the motion state in which the sewing equipment has started and is performing a sewing task, specifically including the operation of raising the presser foot and placing the fabric on the worktable. At this time, the sewing equipment generates operating parameters.
[0040] In this embodiment, a monocular camera or a multi-view camera can be used to acquire the first scene image and the second scene image. Please refer to [link / reference]. Figure 3 The image shows a spatial layout diagram of the sewing equipment and camera described in this application in one embodiment.
[0041] Taking a standard flatbed sewing machine as an example, multiple cameras can be installed at the machine head to improve image recognition efficiency. In addition, a standard configuration includes supplementary lighting to ensure image quality. These cameras can capture complete image information of the fabric's condition under different working conditions, such as before sewing begins, during sewing, and after sewing is completed.
[0042] In one embodiment of this application, the camera acquires a first scene image and a second scene image at preset acquisition frequencies. The acquisition frequency of the camera can be adjusted appropriately according to the sewing speed of the worker.
[0043] It should be noted that the first scene image and the second scene image represent two different scene states, but they share the same field of view, meaning that the pixels in the two images correspond one-to-one. Compared to the first scene image, the depth values of the corresponding pixels in the second scene image show significant changes.
[0044] In step S300, the first scene image is processed based on the depth detection algorithm and the edge detection algorithm to obtain initial state parameter information.
[0045] In one embodiment of this application, the first scene image is processed based on a depth detection algorithm and an edge detection algorithm to obtain initial state parameter information, including the following steps S301 to S303.
[0046] In step S301, based on the depth detection algorithm, the first depth information in the first scene image is detected, and a first depth map is generated.
[0047] In one embodiment of this application, the first scene image displays various elements, including the operating mechanism of a sewing machine, such as a presser foot and a sewing table. Accordingly, the first depth information includes the thickness of the presser foot and the depth information of the sewing table.
[0048] In another embodiment of this application, the first scene image may also show additional devices related to the operator and sewing equipment, such as the operator's hands and sleeves, and a bird's nest device. Accordingly, the thickness of the operator's hands and sleeves, as well as the thickness of the bird's nest device, can be detected based on a depth detection algorithm.
[0049] For ease of describing the technical solution, this application mainly applies the thickness of the presser foot and the depth of the sewing table to the process of adjusting the sewing parameters. The calculation methods for other target objects and operating devices are similar, so they will not be described in detail.
[0050] In this embodiment, the first depth information is theoretically a fixed value. These fixed values play an auxiliary role in the subsequent calculation of the depth change before and after sewing, and can be excluded as default parameters to ensure the accuracy and flexibility of the calculation.
[0051] In one embodiment of this application, detecting first depth information in the first scene image and generating a first depth map based on the depth detection algorithm includes: filtering the first scene image to obtain a filtered first scene image; calculating the vertical depth values from different pixels in the filtered first scene image to the camera optical center; wherein the vertical depth value from the pixel corresponding to the platform to the camera optical center is defined as the platform's depth information, and the vertical depth value from the pixel corresponding to the pressure foot to the camera optical center is defined as the pressure foot's depth information; the difference between the platform's depth information and the pressure foot's depth information is defined as the pressure foot's thickness; performing tolerance judgment on the vertical depth values from different pixels to the camera optical center based on a preset tolerance standard; dividing the filtered first scene image into several regions according to the tolerance judgment result; wherein each region corresponds to a specific vertical depth level; and assigning a corresponding intensity grayscale level to each region according to the vertical depth level corresponding to each region to construct the first depth map.
[0052] In this embodiment, filtering the first scene image effectively reduces random noise. This noise may originate from changes in ambient light or interference during data transmission. Unprocessed noisy images not only affect visual clarity but also introduce errors into subsequent image-based calculations, leading to depth map distortion and consequently impacting sewing path planning and stitch control accuracy. Therefore, the image filtering strategy employed in this application effectively improves the quality of images acquired by the sewing equipment.
[0053] This application is based on a depth detection algorithm that can quickly identify the vertical depth of each pixel in an image, which corresponds to the undulation and thickness of the fabric.
[0054] In one embodiment of this application, dividing the filtered first scene image into several regions based on the tolerance judgment result includes merging pixels within a preset tolerance range to form several independent regions.
[0055] For example, the lower left corner of the shooting field of view can be set as the origin (0,0). During the sewing preparation stage, the vertical depth values of each pixel in the first scene image are sequentially labeled Z01, Z02, Z03, ..., Z0n. By performing tolerance calculations on these pixel vertical depth values, the pixels can be divided into several regions according to different depth levels, such as U01, U02, U03, ..., U0n. Each region corresponds to a vertical depth value. For example, the vertical depth value corresponding to U01 is Zu01, the vertical depth value corresponding to U02 is Zu02, and the vertical depth value corresponding to U03 is Zu03.
[0056] In one embodiment of this application, when the device used to acquire the first scene image is a multi-view camera, such as a binocular camera, more efficient and accurate three-dimensional spatial information capture can be achieved based on the principle of binocular parallax, thereby generating a higher quality first depth map.
[0057] Specifically, in a binocular camera system, two cameras, located on the left and right sides, simultaneously capture images of the same worktable. Because there is a certain horizontal distance (i.e., baseline length) between the two cameras, the images captured by each camera will have slight differences in viewpoint; this phenomenon is called "parallax." Using mathematical models such as triangulation, and combined with known parameters such as camera spacing and focal length, the actual distance value corresponding to each pixel can be accurately calculated, thereby constructing a complete 3D depth map.
[0058] In step S302, based on the edge detection algorithm, the first edge information in the first depth map is detected.
[0059] In one embodiment of this application, the first depth map shows the operating devices of the sewing equipment, such as a needle and a presser foot. Accordingly, the first edge information includes the coordinates of the needle landing point and the coordinates of the presser foot outline.
[0060] In one embodiment of this application, detecting the first edge information in the first depth map based on the edge detection algorithm includes: filtering the first depth map to obtain a filtered first depth map; performing edge enhancement processing on the filtered first depth map to highlight pixels with significant changes in neighborhood intensity in the filtered first depth map; calculating the gradient magnitude and direction of each pixel in the filtered first depth map to identify regions with large gradient values; and locating the coordinates of the needle landing point and the presser foot contour based on the regions with large gradient values.
[0061] In this embodiment, when processing images with noise interference caused by unstable ambient light or equipment vibration in the workshop, various types of noise such as salt-and-pepper noise and Gaussian noise can be effectively removed by using median filtering, Gaussian filtering, and other methods, resulting in a clear and smooth filtered image, thereby significantly improving the image quality.
[0062] Edge enhancement processing is applied to the filtered image. By adjusting the pixel grayscale values, pixels with significant changes in neighborhood intensity can be highlighted, making key areas such as fabric edges, needles, and presser feet more clearly distinguishable in the image. Taking the sewing of fabrics with complex patterns as an example, edge enhancement processing can significantly improve the contrast between the pattern and the fabric edge, making it easier to accurately extract edge information and avoiding edge misjudgment caused by pattern interference.
[0063] Areas with large gradient values are typically closely related to critical locations such as fabric edges, specific hem edges, needle landing points, and presser foot contours. Especially when sewing products with extremely high dimensional accuracy requirements, by calculating the gradient amplitude and direction, it is possible to accurately locate critical locations such as fabric edges, specific hem edges, needle landing points, and presser foot contours in complex image backgrounds, thereby ensuring the accuracy of sewing dimensions and meeting the requirements of high-quality product standards.
[0064] In step S303, the first depth information and the first edge information are used as the initial state parameter information.
[0065] Experiments show that edge information obtained solely from depth detection is often insufficient, while edge detection alone, although able to pinpoint edge locations, is prone to misidentifying non-edge elements such as shadows as edges, including pattern edges—all of which constitute erroneous or invalid edge information. Therefore, this application combines edge detection technology with depth detection technology, using an edge detection algorithm to "verify" the edge results obtained from depth detection. This strategy aims to eliminate invalid edges caused by factors such as material texture, while simultaneously enhancing the true edge signals in depth detection (e.g., correcting misidentifications caused by shadows), thereby significantly improving the accuracy and reliability of edge detection. Through this combined approach, this application can effectively distinguish between true stitching edges and various invalid edges, achieving more accurate edge detection results.
[0066] In step S400, the second scene image is processed based on the depth detection algorithm and the edge detection algorithm to obtain the running status parameter information.
[0067] In one embodiment of this application, the second scene image is processed based on a depth detection algorithm and an edge detection algorithm to obtain running status parameter information, including the following steps S401 to S403.
[0068] In step S401, based on the depth detection algorithm, the second depth information in the second scene image is detected, and a second depth map is generated.
[0069] In one embodiment of this application, the second scene image displays various elements, including an operating device (e.g., a presser foot) located in the current sewing area and fabric located in adjacent areas to be sewn. Accordingly, the second depth information includes the depth information of the presser foot in the current sewing area and the depth information of the fabric in the adjacent areas to be sewn.
[0070] In one embodiment of this application, detecting second depth information in the second scene image and generating a second depth map based on the depth detection algorithm includes: filtering the second scene image to obtain a filtered second scene image; calculating the vertical depth values from different pixels in the filtered second scene image to the camera optical center; wherein the vertical depth value from the pixel corresponding to the presser foot in the current sewing area to the camera optical center is defined as the presser foot's depth information; the vertical depth value from the pixel corresponding to the fabric in the adjacent sewing area to the camera optical center is defined as the fabric's depth information; performing tolerance judgment on the vertical depth values from different pixels to the camera optical center based on a preset tolerance standard; dividing the filtered second scene image into several regions according to the tolerance judgment result; wherein each region corresponds to a specific vertical depth level; assigning a corresponding intensity grayscale level to each region according to the vertical depth level corresponding to each region to construct the second depth map.
[0071] Specifically, the coordinates of the needle landing point and the coordinates of the presser foot outline are both located within the current sewing area. The adjacent sewing area refers to the area located in front of the needle landing point, where sewing operations will soon begin.
[0072] In this implementation, filtering the second scene image can effectively reduce noise in the image, thereby effectively improving the quality of the image acquired by the sewing equipment.
[0073] In one embodiment of this application, dividing the filtered second scene image into several regions based on the tolerance judgment result includes merging pixels within a preset tolerance range to form several independent regions.
[0074] For example, the lower left corner of the shooting field of view can be set as the origin (0,0). During the sewing stage, the vertical depth values of each pixel in the second scene image are sequentially labeled Z11, Z12, Z13, ..., Z1n. By performing tolerance calculations on the vertical depth values of these pixels, the pixels can be divided into several regions according to different depth levels, such as U11, U12, U13, ..., U1n. These regions correspond to areas where sewing operations will be performed at different times. For example, U11 represents the region where sewing will begin in 5 seconds, U12 corresponds to the region where sewing will begin in 10 seconds, and U13 corresponds to the region where sewing will begin in 15 seconds. Each region corresponds to a vertical depth value. For example, the vertical depth value corresponding to U11 is Zu11, the vertical depth value corresponding to U12 is Zu12, and the vertical depth value corresponding to U13 is Zu13.
[0075] Please see Figure 4 The image shown is a schematic diagram of the second scene image described in this application in one embodiment. Please refer to [link / reference]. Figure 5 The image shown is a schematic diagram of the second depth map described in this application in one embodiment.
[0076] By comparison Figure 4 and Figure 5 As can be observed, compared to the second scene image, the second depth map effectively removes the lighting and shadows from the original image, resulting in a smoother and more even visual effect. Furthermore, the second depth map retains key regions from the original image, providing strong support for subsequent depth information analysis.
[0077] Please see Figure 6The image shows a schematic diagram of the depth of different sewing areas in one embodiment of the adaptive adjustment method for sewing parameters described in this application. The depth information of the sewing table is represented by Z0, the depth information of the presser foot in the current sewing area is represented by Zw, and the depth information of the fabric in the adjacent sewing area is represented by Zu. During the sewing process, fabric is usually placed on the sewing table, and a presser foot is further placed on the fabric. Under the action of the presser foot, the fabric will be compressed. At this time, the difference between the depth information of the sewing table and the depth information of the presser foot actually reflects the superposition effect of the compressed fabric thickness and the presser foot thickness.
[0078] In one embodiment of this application, when the device used to acquire the second scene image is a multi-view camera, such as a binocular camera, more efficient and accurate three-dimensional spatial information capture can be achieved based on the principle of binocular parallax, thereby generating a higher quality second depth map. The specific implementation principle is the same as step S301, so it will not be repeated here.
[0079] In step S402, based on the edge detection algorithm, the second edge information in the second depth map is detected.
[0080] In one embodiment of this application, the second depth map displays pixels with significant changes in neighborhood intensity. Correspondingly, the second edge information includes the coordinates of the depth difference locations, reflecting the pixels with significant changes in neighborhood intensity.
[0081] In one embodiment of this application, detecting second edge information in the second depth map based on the edge detection algorithm includes: filtering the second depth map to obtain a filtered second depth map; performing edge enhancement processing on the filtered second depth map to highlight pixels with significant changes in neighborhood intensity in the filtered second depth map; calculating the gradient magnitude and direction of each pixel in the filtered second depth map to identify regions with large gradient values; and locating the coordinates of the depth difference position based on the regions with large gradient values.
[0082] It should be noted that the edge detection algorithm described in this embodiment is consistent with the edge detection algorithm described in step S302 in terms of function and effect, so it will not be described again here.
[0083] Please see Figure 7 The image shows a schematic diagram of the edge detection feedback result in one embodiment of the adaptive adjustment method for sewing parameters described in this application. Figure 7 As shown in the diagram, the edge detection feedback results can accurately identify the actual edges of the fabric and the splicing areas of different fabrics.
[0084] This application utilizes edge detection technology to effectively extract fabric edges, needle landing points, and presser foot contours from images. In addition, it can quickly identify the splicing of different fabrics and the edge positions of sewing material ends, while eliminating invalid edge information, thereby significantly improving the accuracy and reliability of edge detection.
[0085] In step S403, the second depth information and the second edge information are used as the running state parameter information.
[0086] It should be noted that the depth detection algorithm and edge detection algorithm described in the above embodiments of this application are not limited to the content presented in the above steps. In fact, any other depth detection algorithm and edge detection algorithm that can achieve the same effect is applicable to this application, and this application does not make any specific limitations on them.
[0087] In step S500, the fabric state of the area to be sewn is determined based on the initial state parameter information and the running state parameter information.
[0088] In one embodiment of this application, determining the fabric state of the area to be sewn based on the initial state parameter information and the running state parameter information includes the following steps S501 to S503.
[0089] In step S501, the thickness of the fabric in the adjacent sewing area is calculated based on the depth information of the platform and the depth information of the fabric in the adjacent sewing area.
[0090] Specifically, based on the depth information of the sewing platform and the depth information of the fabric in the adjacent sewing areas, the thickness of the fabric in the adjacent sewing areas is calculated using the following formula:
[0091] Zb1 = Z0 - Zu;
[0092] Where Z0 represents the depth information of the platform, Zu represents the depth information of the fabric in the adjacent area to be sewn, and Zb1 represents the thickness of the fabric in the adjacent area to be sewn.
[0093] In step S502, the thickness of the fabric in the current sewing area is calculated based on the depth information of the platform, the thickness of the presser foot, and the depth information of the presser foot in the current sewing area.
[0094] Specifically, based on the depth information of the sewing board, the thickness of the presser foot, and the depth information of the presser foot within the current sewing area, the thickness of the fabric within the current sewing area is calculated using the following formula:
[0095] Zb2 = Z0 - Zw - Zk;
[0096] Where Z0 represents the depth information of the sewing board, Zk represents the thickness of the presser foot, Zw represents the depth information of the presser foot in the current sewing area, and Zb2 represents the thickness of the fabric in the current sewing area.
[0097] In step S503, based on the thickness of the presser foot, the depth information of the presser foot in the current sewing area, and the depth information of the fabric in the adjacent sewing area, the change in fabric thickness between the current sewing area and the adjacent sewing area is calculated.
[0098] Specifically, based on the thickness of the presser foot, the depth information of the presser foot in the current sewing area, and the depth information of the fabric in the adjacent areas to be sewn, the change in fabric thickness between the current sewing area and the adjacent areas to be sewn is calculated using the following formula:
[0099] ΔZb=Zw+Zk-Zu;
[0100] Where Zw represents the depth information of the presser foot in the current sewing area, Zk represents the thickness of the presser foot, Zu represents the depth information of the fabric in the adjacent sewing area, and ΔZb represents the change in fabric thickness.
[0101] In one embodiment of this application, determining the fabric state of the area to be sewn based on the initial state parameter information and the running state parameter information further includes the following step S504.
[0102] In step S504, the movement and change of the depth difference position are determined based on the coordinates of the depth difference position.
[0103] For example, during the sewing process, by continuously acquiring images of the worktable and processing these images using steps S400 to S403, the coordinates of the depth difference positions at different time points can be obtained. Based on these coordinates of the depth difference positions at different time points, the movement and change of the depth difference positions over time can be further determined.
[0104] In step S600, the sewing parameters of the sewing equipment are adjusted in a timely manner based on the fabric condition of the area to be sewn.
[0105] Please see Figure 8 The flowchart shown is a representation of another embodiment of the adaptive adjustment method for sewing parameters described in this application. Figure 8As shown, adjusting the sewing parameters of the sewing equipment in a timely manner based on the fabric state of the area to be sewn includes: determining whether the change in fabric thickness is equal to a preset threshold; if so, it indicates that the change in fabric thickness between the current sewing area and the adjacent area to be sewn is constant, and the existing sewing parameters of the sewing equipment remain unchanged; otherwise, determining whether the change in fabric thickness is greater than the preset threshold; if so, it indicates that the fabric will become thicker from the current sewing area to the adjacent area to be sewn; adjusting the sewing parameters of the sewing equipment accordingly based on the change in fabric thickness; otherwise, it indicates that the fabric will become thinner from the current sewing area to the adjacent area to be sewn, and adjusting the sewing parameters of the sewing equipment accordingly based on the change in fabric thickness; wherein the sewing parameters of the sewing equipment include thread tension, feed dog movement trajectory, and needle spacing.
[0106] When Zu11 = Zu12 = ... = Zu1n, theoretically, the change in fabric thickness in the area to be sewn should remain constant. Conversely, when Zu11 ≠ Zu12 ≠ ... ≠ Zu1n, it means that the fabric thickness varies in the area to be sewn, which may be due to the overlapping of multiple pieces of fabric or the presence of upper and lower bindings. In this case, ΔZb represents the combined effect of the change in fabric thickness and the compression of the presser foot.
[0107] In this embodiment of the application, when the sewing equipment is about to sew into a thick area, the equipment will adjust the thread tension in advance to prevent thread breakage, optimize the movement trajectory of the feed dog to improve feeding efficiency, and adjust the stitch spacing to prevent the stitch spacing from being too dense, thereby effectively preventing sewing defects.
[0108] Compared to solutions using Hall effect sensors on the presser foot, the technical solution of this application can identify the actual state of the fabric in advance, avoiding the problem of recognition lag. Compared to laser detection solutions, the technical solution of this application has a larger detection range and can capture more effective information.
[0109] In one embodiment of this application, the combination of depth detection and edge detection technologies enables accurate recognition of the operator's hand gestures. Based on this recognition result, the system can trigger various preset commands according to the specific hand gestures made by the operator. For example, the operator can use a specific gesture with their right hand (such as pinching their index finger) to adjust the working speed of the sewing equipment or switch to a specific sewing mode.
[0110] It should be noted that the scope of protection of the adaptive adjustment method for sewing parameters described in this application is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the scope of protection of this application.
[0111] Please see Figure 9The image shown is a schematic diagram of the sewing parameter adaptive adjustment system described in this application in one embodiment. Figure 9 As shown, this application provides a sewing parameter adaptive adjustment system, including a first image acquisition module, a second image acquisition module, a first image processing module, a second image processing module, a fabric state determination module, and a sewing parameter adjustment module.
[0112] Specifically, the first image acquisition module is used to acquire an image of the workbench surface during the sewing preparation stage, and use it as a first scene image. The second image acquisition module is used to acquire an image of the workbench surface during the sewing stage, and use it as a second scene image. The first image processing module is used to process the first scene image based on a depth detection algorithm and an edge detection algorithm to obtain initial state parameter information. The second image processing module is used to process the second scene image based on a depth detection algorithm and an edge detection algorithm to obtain running state parameter information. The fabric state determination module is used to determine the fabric state of the area to be sewn based on the initial state parameter information and the running state parameter information. The sewing parameter adjustment module is used to adjust the sewing parameters of the sewing equipment in a timely manner based on the fabric state of the area to be sewn.
[0113] It should be noted that the structure and principle of the first image acquisition module, the second image acquisition module, the first image processing module, the second image processing module, the fabric state determination module, and the sewing parameter adjustment module correspond one-to-one with the steps in the above-mentioned adaptive adjustment method for sewing parameters, so they will not be repeated here.
[0114] The sewing parameter adaptive adjustment system provided in this application can implement the sewing parameter adaptive adjustment method described in this application. However, the implementation device of the sewing parameter adaptive adjustment method described in this application includes, but is not limited to, the structure of the sewing parameter adaptive adjustment system listed in this embodiment. All structural modifications and substitutions of the prior art made based on the principles of this application are included within the protection scope of this application.
[0115] Please see Figure 10 The diagram shows a structural schematic of the electronic device described in this application in one embodiment. Figure 10 As shown, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described above.
[0116] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0117] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.
[0118] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this application, depending on actual needs. For example, the functional modules / units in the various embodiments of this application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0119] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0120] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the methods described above. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state drive (SSD)).
[0121] This application embodiment may also provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application embodiment are generated. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0122] When the computer program product is executed by a computer, the computer performs the method described in the foregoing method embodiments. The computer program product can be a software installation package; when the foregoing method is required, the computer program product can be downloaded and executed on the computer.
[0123] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.
[0124] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A method for adaptive adjustment of sewing parameters, characterized in that, include: During the sewing preparation stage, an image of the workbench surface is acquired and used as the first scene image; During the sewing process, an image of the workbench surface is acquired and used as a second scene image; Based on depth detection and edge detection algorithms, the first scene image is processed to obtain initial state parameter information; Based on depth detection and edge detection algorithms, the second scene image is processed to obtain running status parameter information; Based on the initial state parameter information and the running state parameter information, the fabric state of the area to be sewn is determined; Based on the fabric condition of the area to be sewn, the sewing parameters of the sewing equipment are adjusted in a timely manner.
2. The method according to claim 1, characterized in that, Based on depth detection and edge detection algorithms, the first scene image is processed to obtain initial state parameter information, including: Based on the depth detection algorithm, the first depth information in the first scene image is detected, and a first depth map is generated; the first depth information includes the thickness of the presser foot and the depth information of the table. Based on the edge detection algorithm, the first edge information in the first depth map is detected; the first edge information includes the coordinates of the needle landing point and the coordinates of the presser foot contour. The first depth information and the first edge information are used as the initial state parameter information.
3. The method according to claim 2, characterized in that, Based on depth detection and edge detection algorithms, the second scene image is processed to obtain the following running state parameter information: Based on the depth detection algorithm, the second depth information in the second scene image is detected, and a second depth map is generated; the second depth information includes the depth information of the presser foot in the current sewing area and the depth information of the fabric in the adjacent sewing area. Based on the edge detection algorithm, second edge information is detected in the second depth map; the second edge information includes the coordinates of the depth difference location; The second depth information and the second edge information are used as the running status parameter information.
4. The method according to claim 3, characterized in that, Based on the initial state parameter information and the running state parameter information, determining the fabric state of the area to be sewn includes: Based on the depth information of the platform and the depth information of the fabric in the adjacent sewing area, the thickness of the fabric in the adjacent sewing area is calculated. Based on the depth information of the sewing board, the thickness of the presser foot, and the depth information of the presser foot in the current sewing area, the thickness of the fabric in the current sewing area is calculated; Based on the thickness of the presser foot, the depth information of the presser foot in the current sewing area, and the depth information of the fabric in the adjacent sewing areas, the change in fabric thickness between the current sewing area and the adjacent sewing areas is calculated.
5. The method according to claim 4, characterized in that, Based on the fabric condition of the area to be sewn, adjusting the sewing parameters of the sewing equipment in a timely manner includes: Determine whether the change in fabric thickness is equal to a preset threshold; If so, it indicates that the change in fabric thickness between the current sewing area and the adjacent sewing area is constant, maintaining the existing sewing parameters of the sewing equipment unchanged; Otherwise, determine whether the change in fabric thickness is greater than a preset threshold; If so, it indicates that the fabric will become thicker from the current sewing area to the adjacent sewing area; adjust the sewing parameters of the sewing equipment accordingly based on the change in fabric thickness; Otherwise, it indicates that the fabric will become thinner from the current sewing area to the adjacent sewing area, and the sewing parameters of the sewing equipment are adjusted accordingly based on the change in fabric thickness; wherein the sewing parameters of the sewing equipment include thread tension, feed dog movement trajectory and needle spacing.
6. The method according to claim 2, characterized in that, Based on the depth detection algorithm, detecting the first depth information in the first scene image and generating the first depth map includes: The first scene image is filtered to obtain a filtered first scene image; Calculate the vertical depth values from different pixels in the filtered first scene image to the camera optical center; wherein the vertical depth value from the pixel corresponding to the platform to the camera optical center is defined as the platform's depth information, and the vertical depth value from the pixel corresponding to the presser foot to the camera optical center is defined as the presser foot's depth information; the difference between the platform's depth information and the presser foot's depth information is defined as the presser foot's thickness. Based on the preset tolerance standard, the tolerance is judged for the vertical depth value from different pixels to the optical center of the camera. Based on the tolerance judgment result, the filtered first scene image is divided into several regions; each region corresponds to a specific vertical depth level; Based on the vertical depth level corresponding to each region, a corresponding intensity of grayscale level is assigned to each region to construct the first depth map.
7. The method according to claim 2, characterized in that, Based on the edge detection algorithm, the first edge information detected in the first depth map includes: The first depth map is filtered to obtain a filtered first depth map. Edge enhancement processing is performed on the filtered first depth map to highlight pixels in the filtered first depth map whose neighborhood intensity changes significantly. Calculate the gradient magnitude and direction of each pixel in the filtered first depth map to identify regions with larger gradient values; Based on the region with a large gradient value, the coordinates of the needle landing point and the coordinates of the presser foot contour are located.
8. A sewing parameter adaptive adjustment system, characterized in that, include: The first image acquisition module is used to acquire an image of the workbench during the sewing preparation stage and use it as the first scene image; The second image acquisition module is used to acquire an image of the workbench surface during the sewing stage and use it as a second scene image; The first image processing module is used to process the first scene image based on the depth detection algorithm and the edge detection algorithm to obtain initial state parameter information; The second image processing module is used to process the second scene image based on depth detection algorithm and edge detection algorithm to obtain running status parameter information; The fabric state determination module is used to determine the fabric state of the area to be sewn based on the initial state parameter information and the running state parameter information. The sewing parameter adjustment module is used to adjust the sewing parameters of the sewing equipment in a timely manner based on the fabric condition of the area to be sewn.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1 to 8.