Interactive segmentation carpet pattern piece shearing method and system

By using an interactive segmentation method, combined with image processing and CNC equipment control, the problems of high segmentation accuracy and cost in carpet pattern cutting have been solved, and an efficient and stable automated cutting process has been achieved.

CN121904092APending Publication Date: 2026-04-21ZHEJIANG BUSINESS TECH INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG BUSINESS TECH INST
Filing Date
2025-12-16
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies for cutting carpet patterns suffer from problems such as low segmentation accuracy, high cost, low efficiency, poor quality stability, and poor adaptability. In particular, it is difficult to achieve efficient automated cutting under complex textures and uneven lighting conditions.

Method used

An interactive segmentation method is adopted, including image acquisition, preprocessing, annotation, edge extraction and CNC equipment control. Through image filtering, contrast adjustment and adaptive rotation correction and other techniques, a clear segmentation mask is generated and converted into a physical coordinate path, and an electric shear is controlled to perform automated cutting.

Benefits of technology

It improves the segmentation accuracy and quality stability of carpet pattern pieces, reduces costs, adaptability and efficiency, and realizes a low-cost, high-precision semi-automated cutting process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121904092A_ABST
    Figure CN121904092A_ABST
Patent Text Reader

Abstract

The invention provides an interactive segmentation carpet pattern piece cutting method and system, and the method comprises the steps: carrying out the image collection and camera calibration processing of a to-be-segmented carpet blank, and obtaining a target image; carrying out image preprocessing on the target image, wherein the preprocessing comprises image filtering, contrast adjustment, multi-scale brightness adjustment and adaptive rotation correction; marking the preprocessed target image to obtain a foreground region and a background region, and generating a segmentation mask; extracting a closed contour of the segmentation mask by using OpenCV; performing morphological operation and edge smoothing processing on the closed contour, optimizing a segmentation boundary, and converting the segmentation boundary into a physical coordinate path; and the physical coordinate path is issued to numerical control equipment, and electric scissors are controlled to execute automatic piece shearing on the carpet blank to be segmented. According to the method, the quality stability and adaptability of the shears are improved, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing and industrial automation, and in particular to an interactive method and system for cutting carpet pattern pieces. Background Technology

[0002] Carpet carving is a process that involves machining V-shaped grooves (usually 3-5mm deep) along the edges of carpet patterns to create a three-dimensional visual effect through light and shadow. Its core technical specifications must meet the following requirements: edge positioning accuracy ±2-3mm, contour breakage rate <5%, and processing efficiency suitable for industrial production. Figure 2 As shown, traditional hand-cutting relies on skilled craftsmen with 5 to 8 years of experience, but it suffers from problems such as high costs, difficulty in recruiting workers, low efficiency, poor quality stability, and lack of traceability.

[0003] To replace manual operations, the industry has tried various technical approaches, but in actual production environments, existing fully automated solutions still have the following problems: low segmentation accuracy (IoU<0.8) with complex textures and uneven lighting; fine line contours are prone to distortion or breakage; and serious missed detections in shadow areas; segmentation only outputs masks, which need to be manually converted into cutting paths and cannot directly drive mechanical execution; it requires massive amounts of labeled data, and high-end deep learning solutions rely on high-performance GPUs, resulting in high industrial deployment costs; and it cannot simultaneously balance "noise suppression, contrast enhancement, and lighting balance", resulting in poor adaptability. Summary of the Invention

[0004] In view of this, the present invention provides an interactive segmentation method and system for cutting carpet pattern pieces to solve the above problems.

[0005] This invention provides an interactive method for cutting carpet pattern pieces, comprising: acquiring and calibrating an image of the carpet blank to be cut to obtain a target image; performing image preprocessing on the target image, the preprocessing including image filtering, contrast adjustment, multi-scale brightness adjustment, and adaptive rotation correction; annotating the preprocessed target image to obtain foreground and background regions, and generating a segmentation mask; extracting the closed contour of the segmentation mask using OpenCV; performing morphological operations and edge smoothing on the closed contour to optimize the segmentation boundary and converting it into a physical coordinate path; and sending the physical coordinate path to a CNC device to control an electric shear to automatically cut the carpet blank to be cut.

[0006] In another implementation of the present invention, the image filtering employs a bilateral filtering algorithm to achieve noise suppression and edge preservation. The core formula of the algorithm is:

[0007] Where N(p) is the neighborhood window of pixel p, and G s G r The Gaussian kernel functions for the spatial domain and range are respectively, W p This is the normalization coefficient.

[0008] In another implementation of the present invention, the contrast adjustment employs a contrast-limited adaptive histogram equalization algorithm to improve the detail recognition of the carpet pattern, including: converting the image from RGB space to HSV space and selecting brightness-related channels for processing; dividing the target channel into several sub-blocks, with the size of the sub-blocks adaptively adjusted according to the image resolution; calculating the grayscale histogram of each sub-block, setting a contrast limit threshold and truncating the portion of the histogram exceeding the threshold, and redistributing grayscale values ​​to suppress over-enhancement; and interpolating and fusing the equalization results of each sub-block to eliminate block artifacts and ensure the overall continuity of the image.

[0009] In another implementation of the present invention, the adaptive rotation correction achieves image orientation correction through edge detection and Hough transform, including: extracting edge features of the carpet pattern using an edge detection operator; performing a Hough transform on the edge image, detecting straight line features in the image and extracting angle clusters to determine the image tilt angle θ0; constructing a rotation transformation matrix to align the image, and aligning the corrected image orientation with the cropping reference.

[0010] In another implementation of the present invention, the rotation transformation matrix is ​​represented as:

[0011] Among them, t x t y These are translation parameters to ensure the image is displayed completely after rotation.

[0012] In another implementation of the invention, the electric shears are fixed to the gantry device of the intelligent cutting platform by a clamp.

[0013] In another implementation of the present invention, the fixture is designed as follows: it adopts a hexagonal prism structure to fit the mounting interface of the carpet shearing workbench robotic arm and achieve stable fixation; it is equipped with an annular clamp to fit the shape characteristics of electric scissors; and it is made of stainless steel to meet the temperature and strength requirements of industrial operating environments.

[0014] In another aspect, the present invention provides an interactive carpet pattern cutting system, comprising: an image acquisition module for acquiring and calibrating images of the carpet blank to be cut, thereby obtaining a target image; an image processing module for preprocessing the target image, the preprocessing including image filtering, contrast adjustment, multi-scale brightness adjustment, and adaptive rotation correction; an image annotation module for annotating the preprocessed target image to obtain foreground and background regions, and generating a segmentation mask; a path acquisition module for extracting the closed contour of the segmentation mask using OpenCV; performing morphological operations and edge smoothing on the closed contour to optimize the segmentation boundary, and converting it into a physical coordinate path; and an automated cutting module for sending the physical coordinate path to a CNC device to control an electric shear to perform automated cutting of the carpet blank to be cut.

[0015] In another aspect, the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of an interactively segmented carpet pattern piece cutting method as described in any of the preceding claims. In another aspect, the present invention provides a computer storage medium storing a computer program that, when executed by a processor, implements the steps of an interactively segmented carpet pattern cutting method as described in any of the preceding claims.

[0016] The interactive segmentation method for carpet pattern cutting of the present invention preserves the edge details of the pattern through image preprocessing, improves the distinction between carpet texture and background, and provides a clear image basis for subsequent contour extraction; interactive segmentation is used to extract the carpet pattern contour, improving annotation efficiency and adaptability; contour points are selected as path points, without polynomial fitting or smoothing, avoiding the accuracy loss caused by fitting; the quality stability and adaptability of the cutting are improved, and the cost is reduced. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. By reading the detailed description of the embodiments below, the advantages and benefits of the solutions will become clear to those skilled in the art. The accompanying drawings are only for illustrating preferred embodiments and are not intended to limit the present invention. In the accompanying drawings: Figure 1 This is a schematic flowchart of an interactive carpet pattern cutting method according to an embodiment of the present invention.

[0018] Figure 2 This is a schematic diagram of a conventional manual shearing process according to an embodiment of the present invention.

[0019] Figure 3 This is a schematic diagram of an OpenCV tool according to an embodiment of the present invention.

[0020] Figure 4 This is an example diagram of a DXF file fragment according to an embodiment of the present invention.

[0021] Figure 5 This is a simplified pseudocode diagram of a trajectory according to an embodiment of the present invention.

[0022] Figure 6 This is a schematic diagram of edge extraction according to an embodiment of the present invention.

[0023] Figure 7 This is a schematic diagram of striped carpet image segmentation according to an embodiment of the present invention.

[0024] Figure 8 This is an example diagram of a custom electric scissors protocol according to an embodiment of the present invention.

[0025] Figure 9 This is a schematic diagram of a clamp structure according to an embodiment of the present invention. Detailed Implementation

[0026] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.

[0027] Figure 1 This is a schematic flowchart of an interactive carpet pattern cutting method provided by an embodiment of the present invention, as shown below. Figure 1 As shown, this embodiment mainly includes: S101. Image acquisition and camera calibration processing are performed on the carpet blank to be divided to obtain the target image.

[0028] For example, a data acquisition system consisting of a camera, a light source, and a support was constructed, and a pixel-physical size mapping was established through checkerboard calibration.

[0029] Image acquisition hardware includes the following components: Image acquisition device: USB camera, with resolution adapted to the needs of capturing details of carpet patterns and frame rate sufficient for actual shooting scenarios.

[0030] Optical components: Select a lens that matches the shooting distance to ensure complete coverage of the carpet area to be captured.

[0031] Light source system: LED ring light source with adjustable color temperature and brightness to ensure uniform illumination on the carpet surface.

[0032] Fixed structure: An adjustable bracket is used to fix the camera so that the camera optical axis is perpendicular to the carpet surface, reducing shooting distortion.

[0033] The checkerboard calibration method is used to convert image pixels to actual physical dimensions. The specific steps include: Using a checkerboard calibration board with known square dimensions, place the calibration board on the carpet surface to be sampled. Capture multiple sets of images of the calibration board from different angles, covering the camera's field of view. Distortion correction: Based on the calibration board images, solve for the camera's intrinsic parameter matrix and distortion coefficients, and compensate for distortion in the acquired images. Identify the pixel side length of each square in the calibration board image and calculate the pixel-to-physical-size ratio coefficient k.

[0034] This coefficient enables the conversion between pixel distances in an image and their actual physical lengths, providing a basis for subsequent cropping accuracy.

[0035] S102. Perform image preprocessing on the target image, including image filtering, contrast adjustment, multi-scale brightness adjustment, and adaptive rotation correction.

[0036] For example, cascaded edge-preserving denoising, local contrast enhancement, and adaptive rotation correction are used to improve the basic quality of segmentation.

[0037] S103. Label the preprocessed target image to obtain the foreground and background regions, and generate a segmentation mask.

[0038] S104. Use OpenCV to extract the closed contour of the segmentation mask.

[0039] For example, the extraction algorithm is as follows Figure 3 As shown, the segmentation boundary is optimized through morphological operations to obtain a binary mask; the closed contour is extracted from the mask and converted into a vector format.

[0040] S105. Perform morphological operations and edge smoothing on the closed contour, optimize the segmentation boundary, and convert it into a physical coordinate path.

[0041] For example, a screening strategy is used to extract contour points as path points, which are then converted into physical coordinates by calibration parameters (without polynomial fitting or smoothing) to avoid the loss of accuracy caused by fitting.

[0042] Preferably, the filtering strategy employs equidistant sampling: calculating the ratio between pixels and physical dimensions; setting the sampling interval, and retaining the corresponding point when the cumulative length along the contour reaches a threshold; forming a uniformly distributed set of path points.

[0043] Preferably, the selection strategy employs angle selection: calculating the angle between adjacent contour points and retaining points with greater curvature; reducing redundant points on straight paths and simplifying the trajectory. The advantages of this strategy are that it maintains the accuracy of the original contour, avoids fitting errors, and simplifies the calculation process.

[0044] The closed contour is extracted from the binary mask obtained from the segmentation and converted into physical coordinates. The pixel coordinates are converted into physical coordinates through calibration parameters. The conversion error can be controlled within the accuracy range required for industrial processing.

[0045] DXF format such as Figure 4 As shown, a compatible LWPOLYLINE entity is generated (with the closure flag set to 1), which can be integrated with DXF post-processing functions to output machining files adapted to CNC systems.

[0046] like Figure 5 As shown, the Douglas-Peucker algorithm is proposed to reduce the number of CNC trajectory points. The balance between the number of points and the contour deviation is adjusted by parameters. This function can be integrated into the DXF post-processing workflow. The extracted edge contour is shown below. Figure 6 As shown.

[0047] S106. Send the physical coordinate path to the CNC equipment and control the electric shears to perform automated shearing on the carpet blank to be divided.

[0048] For example, the CNC control protocol is as follows Figure 8 As shown, the system supports common CNC protocols (such as G-Code and .plt format) and custom serial port protocols, enabling control of actions such as tool movement, cutting, pausing, and returning to the origin.

[0049] For example, a commercially available V-shaped carving shears can be used as the execution terminal, and the groove machining can be achieved through the control program. The planned CNC controller action flow is as follows: The tool moves along the contour normal to the machining start point; it descends to the set depth; it follows the contour path to complete the groove cutting; the tool is lifted to a safe height and moved to the next contour segment. The segmentation result is as follows: Figure 7 As shown.

[0050] By integrating open-source interactive segmentation tools (such as EISeg) and adopting a modular design, the segmentation tools are used as replaceable components. They interact with the system through a standard interface (inputting an image and click coordinates, and outputting a binary mask), which facilitates subsequent tool upgrades and replacements.

[0051] The interactive segmentation method for carpet pattern cutting of the present invention preserves the edge details of the pattern through image preprocessing, improves the distinction between carpet texture and background, and provides a clear image basis for subsequent contour extraction; interactive segmentation is used to extract the carpet pattern contour, improving annotation efficiency and adaptability; contour points are selected as path points, without polynomial fitting or smoothing, avoiding the accuracy loss caused by fitting; the quality stability and adaptability of the cutting are improved, and the cost is reduced.

[0052] In another implementation of the present invention, the image filtering employs a bilateral filtering algorithm to achieve noise suppression and edge preservation. The core formula of the algorithm is:

[0053] Where N(p) is the neighborhood window of pixel p, and G s G r The Gaussian kernel functions for the spatial domain and range are respectively, W p This is the normalization coefficient.

[0054] For example, the preprocessing module adopts a multi-level cascaded structure, sequentially performing denoising, enhancement, and correction processes to improve image quality and adapt to subsequent segmentation and cropping processes. The filter window size is adaptively adjusted according to the carpet texture features, preserving pattern edge details while removing noise, thus avoiding the loss of key features in subsequent contour extraction.

[0055] In another implementation of the present invention, the contrast adjustment employs a contrast-limited adaptive histogram equalization algorithm to improve the detail recognition of the carpet pattern, including: converting the image from RGB space to HSV space and selecting brightness-related channels for processing; dividing the target channel into several sub-blocks, with the size of the sub-blocks adaptively adjusted according to the image resolution; calculating the grayscale histogram of each sub-block, setting a contrast limit threshold and truncating the portion of the histogram exceeding the threshold, and redistributing grayscale values ​​to suppress over-enhancement; and interpolating and fusing the equalization results of each sub-block to eliminate block artifacts and ensure the overall continuity of the image.

[0056] For example, contrast adjustment can improve the distinction between carpet texture and background, providing a clear image basis for subsequent contour extraction.

[0057] In another implementation of the present invention, the adaptive rotation correction achieves image orientation correction through edge detection and Hough transform, including: extracting edge features of the carpet pattern using an edge detection operator; performing a Hough transform on the edge image, detecting straight line features in the image and extracting angle clusters to determine the image tilt angle θ0; constructing a rotation transformation matrix to align the image, and aligning the corrected image orientation with the cropping reference.

[0058] In another implementation of the present invention, the rotation transformation matrix is ​​represented as:

[0059] Among them, t x t y These are translation parameters to ensure the image is displayed completely after rotation.

[0060] In another implementation of the invention, the electric shears are fixed to the gantry device of the intelligent cutting platform by a clamp.

[0061] In another implementation of the present invention, the fixture is designed as follows: it adopts a hexagonal prism structure to fit the mounting interface of the carpet shearing workbench robotic arm and achieve stable fixation; it is equipped with an annular clamp to fit the shape characteristics of electric scissors; and it is made of stainless steel to meet the temperature and strength requirements of industrial operating environments.

[0062] For example, such as Figure 9 As shown, this clamp is used to fix electric scissors to the robotic arm of a carpet shearing machine. Its structural design is adapted to the robotic arm interface, ensuring the installation stability and operational accuracy of the electric scissors. A dedicated clamp compatible with multiple specifications of electric scissors is designed to adapt to CNC cutting platforms for path execution.

[0063] The design performance parameters are shown in Table 1, which can meet the clamping and operation requirements of electric scissors: Table 1. Fixture performance parameters

[0064] The following technical effects can be achieved through the above structural and parameter design: It is compatible with various specifications of electric scissors to meet the tool requirements of different work scenarios; it is easy to install and operate, and the electric scissors can be quickly assembled and disassembled; the vibration amplitude is small during operation, ensuring the accuracy and stability of carpet shearing; the manufacturing cost is controllable, making it economical for industrial applications.

[0065] The key points of the integrated planning of this invention include: Specialized clamp design: A specialized clamp designed to securely mount the electric shears to the gantry.

[0066] Control program adaptation: Develop matching control programs and adjust tool operating parameters.

[0067] Process parameter configuration: Cutting parameters can be configured for different materials to simplify user operation.

[0068] DXF post-processing planning: The plan integrates cutting process parameters into the DXF post-processing module. Users can automatically generate processing code by selecting the "V-groove cutting" mode. The technology is feasible.

[0069] Example 1 A pre-selected, compatible custom cutting machine (CNC cutting bed equipment) serves as the intelligent cutting platform for carpet shears. The electric shears are fixed to the platform gantry moving device using a designed clamp, enabling the modification and application of carpet shears.

[0070] Table 2. Performance parameters of the intelligent cutting platform

[0071] The vacuum adsorption table enhances the carpet's hold and reduces shear displacement deviation; high-precision transmission components help ensure the accuracy of the cutting trajectory; the industrial control cutting bed system supports parametric operation, adapting to the needs of automated shearing processes.

[0072] Example 2 Multiple sets of carpet images with complex textures and uneven lighting were selected for testing. The results of manual annotation were used as a reference standard to verify the applicability of different interactive segmentation tools in carpet pattern segmentation.

[0073] Perform applicability verification of the segmentation tool: In practical applications, RITM and EISeg tools were used for interactive segmentation of carpet patterns, and both tools demonstrated good compatibility. The RITM tool can achieve initial segmentation with minimal interactive operations, meeting the needs of rapid processing.

[0074] The EISeg tool has advantages in segmentation accuracy and ease of operation, and can effectively identify the boundaries of complex carpet textures.

[0075] The selected interactive segmentation tools can all meet the segmentation accuracy requirements of carpet sheet cutting in industrial scenarios, and their operation efficiency is adapted to the actual production cycle.

[0076] Conduct an interaction efficiency evaluation: Taking the EISeg tool as an example, the interactive efficiency of carpet image segmentation is evaluated: The average number of interactive operations per carpet image is low, allowing for rapid adjustment of segmented regions; the annotation time meets the image processing efficiency requirements of the production line and is suitable for the segmentation needs of batch carpet images. Based on the EISeg segmentation results, contour quality is improved through morphological optimization and edge smoothing.

[0077] Perform hardware compatibility testing: In practical applications, the partitioning tool is run on conventionally configured hardware. The results show that the recommended hardware specifications are commonly used in industrial scenarios and no special high-end equipment is required. The hardware cost is within a reasonable range, and the resource consumption is compatible with the performance of conventional industrial control equipment. The operating efficiency can meet the real-time processing requirements, and the overall system cost meets the economic requirements of industrial applications.

[0078] To address the shortcomings of existing technologies, this invention provides a "low-cost, high-precision, semi-automatic" carpet patch cutting path generation solution, with the following advantages: Lowering the hardware barrier: It is compatible with ordinary industrial PCs, does not require high-end GPUs, and reduces the cost of industrial deployment.

[0079] Interaction efficiency has been optimized: Post-processing optimization reduces the number of interaction clicks (≤ 5 times, ≤ 3 times in normal scenarios), thereby improving annotation efficiency.

[0080] The segmentation accuracy was guaranteed: the post-segmentation processing flow was optimized, and the overlap (IoU) was ≥ 0.9 and the boundary error was ≤ 2 px in complex carpet scenes.

[0081] Achieve seamless workflow: Automated connection from image acquisition to physical coordinate path output, reducing manual intervention.

[0082] Adapted for industrial applications: Through fixture design and platform integration, the path-driven control of electric scissors is achieved.

[0083] Another aspect of the present invention provides an interactively segmented carpet pattern piece cutting system, comprising: Image acquisition module: performs image acquisition and camera calibration processing on the carpet blank to be segmented to obtain the target image.

[0084] Image processing module: performs image preprocessing on the target image, including image filtering, contrast adjustment, multi-scale brightness adjustment, and adaptive rotation correction.

[0085] Image annotation module: Annotates the preprocessed target image to obtain the foreground and background regions and generates a segmentation mask.

[0086] The path acquisition module uses OpenCV to extract the closed contour of the segmentation mask; performs morphological operations and edge smoothing on the closed contour to optimize the segmentation boundary and convert it into a physical coordinate path.

[0087] Automated shearing module: The physical coordinate path is sent to the CNC equipment to control the electric shears to perform automated shearing on the carpet blank to be divided.

[0088] The interactive segmentation carpet pattern cutting system of the present invention preserves the edge details of the pattern through image preprocessing, improves the distinction between carpet texture and background, and provides a clear image basis for subsequent contour extraction; it uses interactive segmentation to extract the carpet pattern contour, improving annotation efficiency and adaptability; it selects contour points as path points, without performing polynomial fitting or smoothing, avoiding the accuracy loss caused by fitting; it improves the quality stability and adaptability of the cutting, and reduces costs.

[0089] In another aspect of the present invention, the electronic device includes: a processor, a memory, and a communication bus and a communication interface.

[0090] in: The processor, memory, and communication interface communicate with each other via a communication bus.

[0091] A communication interface is used to communicate with other electronic devices or servers.

[0092] The processor is used to execute a program, specifically, to execute the steps of any of the interactive segmentation carpet pattern piece cutting methods described in the above embodiments.

[0093] Specifically, the program may include program code, which includes computer operation instructions.

[0094] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0095] Memory is used to store programs. Memory may include high-speed RAM, and may also include non-volatile memory, such as at least one disk drive.

[0096] Specifically, the program can be used to cause the processor to execute the steps of any of the interactive segmentation carpet pattern cutting methods described in the embodiments. The specific implementation of each step in the program can be found in the corresponding descriptions of the steps and units executed in any of the interactive segmentation carpet pattern cutting methods described above, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments.

[0097] An exemplary embodiment of this application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods of various embodiments of this application.

[0098] The methods described above according to embodiments of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.

[0099] Specific embodiments of the present invention have now been described. Other embodiments are within the scope of the appended claims. In some cases, the actions described in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result.

[0100] It should be noted that all directional indications (such as up, down, left, right, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship between the components in a certain order (as shown in the figure). If the specific order changes, the directional indication will also change accordingly.

[0101] In the description of this invention, the terms "first" and "second" are used only for convenience in describing different components or names, and should not be construed as indicating or implying a sequential relationship, relative importance, or implicitly specifying the number of technical features indicated. Thus, a feature defined with "first" and "second" may explicitly or implicitly include at least one of that feature.

[0102] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0103] It should be noted that although specific embodiments of the present invention have been described in detail with reference to the accompanying drawings, this should not be construed as limiting the scope of protection of the present invention. Various modifications and variations that can be made by those skilled in the art without inventive effort within the scope described in the claims still fall within the scope of protection of the present invention.

[0104] The examples of the embodiments of the present invention are intended to concisely illustrate the technical features of the embodiments of the present invention, so that those skilled in the art can intuitively understand the technical features of the embodiments of the present invention, and are not intended to be an improper limitation of the embodiments of the present invention.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for interactively segmenting carpet pattern pieces, characterized in that, include: Image acquisition and camera calibration processing are performed on the carpet blank to be segmented to obtain the target image; The target image is preprocessed, including image filtering, contrast adjustment, multi-scale brightness adjustment, and adaptive rotation correction. The preprocessed target image is labeled to obtain the foreground and background regions, and a segmentation mask is generated. The closed contour of the segmentation mask is extracted using OpenCV; The closed contour is subjected to morphological operations and edge smoothing to optimize the segmentation boundary and convert it into a physical coordinate path; The physical coordinate path is sent to the CNC equipment to control the electric shears to perform automated shearing of the carpet blank to be divided.

2. The method according to claim 1, characterized in that, The image filtering employs a bilateral filtering algorithm to achieve noise suppression and edge preservation. The core formula of the algorithm is: Where N(p) is the neighborhood window of pixel p, and G s G r The Gaussian kernel functions for the spatial domain and range are respectively, W p This is the normalization coefficient.

3. The method according to claim 1, characterized in that, The contrast adjustment employs a contrast-limited adaptive histogram equalization algorithm to improve the detail recognition of the carpet pattern, including: The image is converted from RGB space to HSV space, and the brightness-related channels are selected for processing; The target channel is divided into several sub-blocks, and the size of the sub-blocks is adaptively adjusted according to the image resolution. Calculate the grayscale histogram for each sub-block, set a contrast limit threshold and truncate the portion of the histogram that exceeds the threshold, and redistribute grayscale values ​​to suppress over-enhancement; Interpolation is performed on the equalization results of each sub-block to eliminate block artifacts and ensure the overall continuity of the image.

4. The method according to claim 1, characterized in that, The adaptive rotation correction achieves image orientation correction through edge detection and Hough transform, including: Edge detection operators are used to extract edge features of the carpet pattern; Perform Hough transform on the edge image, detect straight line features in the image and extract angle clusters to determine the image tilt angle θ0; A rotation transformation matrix is ​​constructed to align the image, and the corrected image orientation is aligned with the cropping reference.

5. The method according to claim 4, characterized in that, The rotation transformation matrix is ​​represented as follows: Among them, t x t y These are translation parameters to ensure the image is displayed completely after rotation.

6. The method according to claim 1, characterized in that, The electric shears are fixed to the gantry device of the intelligent cutting platform by clamps.

7. The method according to claim 6, characterized in that, The fixture is structurally designed as follows: It adopts a hexagonal prism structure and is compatible with the installation interface of the robotic arm of the carpet cutting workbench to achieve stable fixation; It features a ring-shaped clamp to fit the shape of electric scissors; Made of stainless steel, it meets the temperature and strength requirements of industrial operating environments.

8. An interactive carpet pattern cutting system, characterized in that, include: Image acquisition module: performs image acquisition and camera calibration processing on the carpet blank to be segmented to obtain the target image; Image processing module: performs image preprocessing on the target image, including image filtering, contrast adjustment, multi-scale brightness adjustment, and adaptive rotation correction; Image annotation module: Annotates the preprocessed target image to obtain the foreground and background regions and generates a segmentation mask; The path acquisition module uses OpenCV to extract the closed contour of the segmentation mask; performs morphological operations and edge smoothing on the closed contour, optimizes the segmentation boundary, and converts it into a physical coordinate path. Automated shearing module: The physical coordinate path is sent to the CNC equipment to control the electric shears to perform automated shearing on the carpet blank to be divided.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the interactive segmentation carpet pattern piece cutting method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by a processor, implements the steps of the interactive segmentation carpet pattern cutting method as described in any one of claims 1 to 7.