Search

CN-121981976-A - Method, system and related equipment for detecting space foreign matters of 3D printer

CN121981976ACN 121981976 ACN121981976 ACN 121981976ACN-121981976-A

Abstract

The invention provides a method, a system and related equipment for detecting space foreign matters of a 3D printer, wherein the method comprises the steps of firstly acquiring a real-time image of a working space inside the 3D printer through a single camera; the method comprises the steps of generating a binary mask comprising a printing platform and a bin wall by utilizing an image segmentation model, performing multiple space calculation based on the binary mask to obtain geometric parameters representing the state of a target area, wherein the geometric parameters comprise area related parameters for evaluating the integrity of the area, cavity parameters for identifying internal residues and profile deviation degree parameters for judging whether profile forms are distorted by foreign matters or not, and comprehensively judging whether the foreign matters exist in a working space or not according to whether the geometric parameters exceed a preset threshold value. According to the invention, only a single camera is needed, foreign matters are reversely inferred by analyzing the geometric form of the segmented region, and as only one path of image flow is provided, the algorithm is simpler to process, the requirement on the calculation performance of equipment is lower, and the method is more suitable for local deployment.

Inventors

  • ZHANG WEIHONG
  • XIE JIANYU

Assignees

  • 宝纳生(深圳)科技有限公司

Dates

Publication Date
20260505
Application Date
20260107

Claims (10)

  1. 1. A method for detecting a spatial foreign matter of a 3D printer, comprising: acquiring a real-time image of an internal working space of the 3D printer through a single camera; Processing the real-time image by using a preset image segmentation model, and segmenting a binary mask of a target area in the internal working space, wherein the target area comprises a printing platform area and a vertical bin wall area; acquiring geometrical parameters for representing the state of the target region through multiple space calculations based on the binary mask, wherein the geometrical parameters comprise area related parameters for representing the area size or integrity of the binary mask, hole parameters for representing whether a background pixel region completely surrounded by foreground pixels exists inside a region defined by the binary mask, and profile deviation parameters for representing the morphological difference between the profile of the binary mask and a pre-constructed ideal profile; And comprehensively judging whether foreign matters exist in the internal working space according to the area related parameters, the cavity parameters and the profile deviation parameters.
  2. 2. The method for detecting a spatial foreign object of a 3D printer according to claim 1, wherein the method for acquiring the area-related parameter comprises: and in a preset fixed reference area, calculating the percentage of the pixel area covered by the binary mask to the total area of the fixed reference area.
  3. 3. The method for detecting a spatial foreign object in a 3D printer according to claim 1, wherein the method for acquiring the hole parameter comprises: Identifying and positioning a background pixel connected domain completely surrounded by the foreground pixels represented by the binary mask as a cavity, and calculating the total pixel area of the cavity; A first duty ratio of the total pixel area relative to a foreground area of the binary mask is calculated, or a second duty ratio of the total pixel area relative to a total area of the real-time image is calculated, and the first duty ratio or the second duty ratio is used as the hole parameter.
  4. 4. The method for detecting a spatial foreign object of a 3D printer according to claim 1, wherein the method for pre-constructing an ideal contour comprises: and acquiring an external rectangle of the binary mask, performing expansion operation and/or contraction operation of a preset pixel value on the external rectangle, and taking a regular rectangle outline obtained after the execution operation as the ideal outline.
  5. 5. The method for detecting a spatial foreign object in a 3D printer according to claim 4, wherein the method for acquiring the profile deviation parameter comprises: calculating the coverage rate of the area of the binary mask in the area defined by the ideal contour; or calculating the maximum or average vertical distance from the edge pixel point of the binary mask to the ideal contour boundary.
  6. 6. The method for detecting a spatial foreign object in a 3D printer according to claim 1, wherein comprehensively determining whether a foreign object exists in the internal working space according to the area-related parameter, the void parameter, and the profile deviation parameter comprises: comparing the area related parameter, the cavity parameter and the profile deviation parameter with a preset primary threshold value group and a preset secondary threshold value group; When any one of the area-related parameter, the cavity parameter and the profile deviation parameter exceeds a first-level threshold, determining that foreign matter exists; and outputting warning information when none of the area-related parameter, the cavity parameter and the profile deviation parameter exceeds the primary threshold value but at least one parameter exceeds the secondary threshold value.
  7. 7. The method of claim 1, wherein the image segmentation model is a deep learning segmentation network with lightweight improvements including at least one of optimizing a backbone network to reduce computation, introducing attention mechanisms to improve small object detection performance, and model structure clipping or quantization for embedded hardware.
  8. 8. A spatial foreign matter detection system of a 3D printer, the spatial foreign matter detection system of the 3D printer comprising: The real-time image acquisition module is used for acquiring a real-time image of the internal working space of the 3D printer through the single camera; the image segmentation processing module is used for processing the real-time image by utilizing a preset image segmentation model and segmenting a binary mask of a target area in the internal working space, wherein the target area comprises a printing platform area and a vertical bin wall area; A geometric parameter obtaining module, configured to obtain geometric parameters for characterizing a state of the target region through multiple spatial calculations based on the binary mask, where the geometric parameters include an area-related parameter for characterizing an area size or integrity of the binary mask, a hole parameter for characterizing whether a background pixel region completely surrounded by foreground pixels exists inside a region defined by the binary mask, and a contour deviation parameter for characterizing a morphological difference between a contour of the binary mask and a pre-constructed ideal contour; And the foreign matter comprehensive judging module is used for comprehensively judging whether foreign matters exist in the internal working space according to the area related parameter, the cavity parameter and the profile deviation degree parameter.
  9. 9. The space foreign matter detection device of the 3D printer is characterized by comprising a memory and at least one processor, wherein the memory is stored with instructions, and the memory and the at least one processor are interconnected through a circuit; The at least one processor invokes the instructions in the memory to cause the spatial foreign object detection device of the 3D printer to perform the spatial foreign object detection method of the 3D printer of any one of claims 1-7.
  10. 10. A computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the method of spatial foreign object detection of a 3D printer according to any of claims 1-7.

Description

Method, system and related equipment for detecting space foreign matters of 3D printer Technical Field The invention relates to the technical field of foreign matter detection, in particular to a method, a system and related equipment for detecting space foreign matters of a 3D printer. Background As a rapid prototyping apparatus, 3D printers have been widely used in fields of industrial manufacturing, medical treatment, education, personal consumption, and the like. Before the 3D printing task starts, ensuring that the surface of a working bin, particularly a printing platform, is clean and free of any unexpected foreign matters is a key premise for ensuring the quality of a printing finished product, protecting precision parts such as a printing nozzle and the like and preventing safety accidents. In order to solve the above problems, various foreign matter detection schemes have been proposed in the industry, mainly including three-dimensional laser radar scanning technology, ultrasonic scanning technology, and machine vision technology, and most of the existing machine vision schemes adopt stereoscopic vision technology, the stereoscopic vision technology uses two or more cameras at different positions, or uses a camera with a depth sensor to obtain three-dimensional information of a working space, and analysis is performed by an AI algorithm, the stereoscopic vision scheme requires strict synchronization and geometric calibration between the cameras, any minor positional deviation may cause measurement errors, and meanwhile, the algorithm for processing multipath image streams or depth data is generally complex, has high requirements on calculation performance, and is difficult to operate efficiently on an embedded motherboard with limited resources of a 3D printer. Accordingly, the prior art is still in need of improvement and development. Disclosure of Invention The invention provides a method, a system and related equipment for detecting space foreign matters of a 3D printer, and aims to solve the technical problems in the background technology in the prior art. The first aspect of the invention provides a method for detecting space foreign matters of a 3D printer, which comprises the following steps: acquiring a real-time image of an internal working space of the 3D printer through a single camera; Processing the real-time image by using a preset image segmentation model, and segmenting a binary mask of a target area in the internal working space, wherein the target area comprises a printing platform area and a vertical bin wall area; acquiring geometrical parameters for representing the state of the target region through multiple space calculations based on the binary mask, wherein the geometrical parameters comprise area related parameters for representing the area size or integrity of the binary mask, hole parameters for representing whether a background pixel region completely surrounded by foreground pixels exists inside a region defined by the binary mask, and profile deviation parameters for representing the morphological difference between the profile of the binary mask and a pre-constructed ideal profile; And comprehensively judging whether foreign matters exist in the internal working space according to the area related parameters, the cavity parameters and the profile deviation parameters. In an optional implementation manner of the first aspect of the present invention, the method for obtaining the area related parameter includes: and in a preset fixed reference area, calculating the percentage of the pixel area covered by the binary mask to the total area of the fixed reference area. In an optional implementation manner of the first aspect of the present invention, the method for obtaining the hole parameter includes: Identifying and positioning a background pixel connected domain completely surrounded by the foreground pixels represented by the binary mask as a cavity, and calculating the total pixel area of the cavity; A first duty ratio of the total pixel area relative to a foreground area of the binary mask is calculated, or a second duty ratio of the total pixel area relative to a total area of the real-time image is calculated, and the first duty ratio or the second duty ratio is used as the hole parameter. In an optional implementation manner of the first aspect of the present invention, the method for pre-constructing the ideal contour includes: and acquiring an external rectangle of the binary mask, performing expansion operation and/or contraction operation of a preset pixel value on the external rectangle, and taking a regular rectangle outline obtained after the execution operation as the ideal outline. In an optional implementation manner of the first aspect of the present invention, the method for obtaining the profile deviation parameter includes: calculating the coverage rate of the area of the binary mask in the area defined by the ideal contour; or calculating the max