CN117635595B - Visual detection method for surface quality of precision injection mold embryo - Google Patents

Visual detection method for surface quality of precision injection mold embryo Download PDF

Info

Publication number
CN117635595B
CN117635595B CN202311769056.9A CN202311769056A CN117635595B CN 117635595 B CN117635595 B CN 117635595B CN 202311769056 A CN202311769056 A CN 202311769056A CN 117635595 B CN117635595 B CN 117635595B
Authority
CN
China
Prior art keywords
connected domain
value
edge pixel
injection molding
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311769056.9A
Other languages
Chinese (zh)
Other versions
CN117635595A (en
Inventor
段常娥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Songjia Precision Technology Dongguan Co ltd
Original Assignee
Songjia Precision Technology Dongguan Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Songjia Precision Technology Dongguan Co ltd filed Critical Songjia Precision Technology Dongguan Co ltd
Priority to CN202311769056.9A priority Critical patent/CN117635595B/en
Publication of CN117635595A publication Critical patent/CN117635595A/en
Application granted granted Critical
Publication of CN117635595B publication Critical patent/CN117635595B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image analysis, in particular to a visual detection method for the surface quality of a precision injection molding blank. The method comprises the steps of obtaining a gray image, analyzing gray values and gradient values of pixel points in a connected domain and the area of the connected domain according to a visual detection method, and obtaining characteristic factors; further analyzing the position change, gradient value and gradient value of the boundary closed edge line of the connected domain to obtain a gloss value; finally, analyzing the gray value of the edge pixel point in the sub-region, the boundary edge line and the area of the sub-region to obtain a change degree value; and obtaining an integral characteristic value through the characteristic factor, the glossiness value and the change value, determining a defect area, and judging the quality of the surface of the precision injection molding blank. The invention obtains the integral characteristic value through the visual detection method, accurately detects the defect area of the precision injection molding embryo, accurately judges the surface quality of the precision injection molding embryo, and ensures the high quality of the surface of the precision injection molding embryo.

Description

Visual detection method for surface quality of precision injection mold embryo
Technical Field
The invention relates to the technical field of image analysis, in particular to a visual detection method for the surface quality of a precision injection molding blank.
Background
Precision injection molding blanks refer to mold preforms for injection molding that have the basic shape of the final mold product, but are not yet fully formed. The precision injection molding blank can be used for producing large-scale and high-quality plastic parts with relatively low cost and high efficiency, so that the precision injection molding blank is widely applied to the manufacturing industry, in particular to the fields of electronics, medical treatment, automobiles and the like. In order to improve the quality of plastic parts, accurate defect detection needs to be carried out on the surface of the precise injection molding blank, so that the influence of defects on the surface of the precise injection molding blank on the manufacture of the plastic parts is avoided.
In the existing method, a defect area on the surface of the precision injection molding blank is obtained through a visual detection method, and the quality of the surface of the precision injection molding blank is determined. However, in actual situations, when the visual inspection method detects defects on the surface of the precision injection molding blank, the visual inspection method is easily interfered by other factors, such as complexity of the surface of the precision injection molding blank, diversity of defects on the surface of the precision injection molding blank, and the like, so that the existing visual inspection method cannot well identify and distinguish stains and protruding defects on the surface of the precision injection molding blank, which results in inaccurate defect detection results on the surface of the precision injection molding blank, and further cannot accurately determine the quality of the surface of the precision injection molding blank.
Disclosure of Invention
In order to solve the technical problem that the existing visual detection method cannot well identify and distinguish stains and convex defects on the surface of a precision injection molding blank, so that the defect detection result on the surface of the precision injection molding blank is inaccurate, the invention aims to provide a visual detection method for the surface quality of the precision injection molding blank, which adopts the following technical scheme:
the invention provides a visual detection method for the surface quality of a precision injection molding blank, which comprises the following steps:
acquiring a gray level image of the surface of a precision injection mold blank;
classifying edge pixel points in each connected domain in the gray image according to the gray value in the gray image to obtain edge pixel classes in each connected domain; acquiring characteristic factors of each connected domain according to the duty ratio of the edge pixel points in each connected domain, the area of each connected domain and the fluctuation of the number of the edge pixel points of each edge pixel class in each connected domain;
acquiring a gloss degree value of each connected domain according to the position change between adjacent edge pixel points on a boundary closed edge line of each connected domain and the gradient value of each edge pixel point on the boundary closed edge line and the gradient value fluctuation condition of each edge pixel point in each connected domain;
acquiring a contour change value of each sub-region according to the gray value difference between adjacent pixel points in each sub-region and the boundary edge line length and area of each sub-region; wherein, the subarea represents a non-connected domain and each connected domain in the gray image; acquiring a change degree value of each connected domain according to the profile change value difference between each connected domain and the non-connected domain;
acquiring the overall characteristic value of each connected domain according to the characteristic factor, the glossiness value and the change value of each connected domain;
and obtaining a defect area according to the integral characteristic value, and determining the quality of the surface of the precision injection molding blank.
Further, the method for obtaining the edge pixel class comprises the following steps:
and acquiring non-closed edge lines in each connected domain, and dividing edge pixel points with the same gray value in the non-closed edge lines in each connected domain into the same class as edge pixel classes in each connected domain.
Further, the method for acquiring the characteristic factors comprises the following steps:
taking the ratio of the total number of the edge pixel points in each communication domain to the total number of the pixel points in each communication domain as the duty ratio of the edge pixel points in each communication domain;
acquiring the number of edge pixel points of each edge pixel class in each connected domain as the first number of each edge pixel class;
acquiring information entropy of edge pixel points in each connected domain according to the first quantity and the total quantity of the edge pixel points in each connected domain;
and acquiring the characteristic factors of each connected domain according to the duty ratio of the edge pixel point in each connected domain, the area of each connected domain and the information entropy of the edge pixel point in each connected domain.
Further, the calculation formula of the characteristic factor is as follows:
wherein T is r Is the characteristic factor of the r connected domain; d (D) r The total number of edge pixel points in the r-th connected domain; q (Q) r The total number of the pixel points in the r-th connected domain; s is(s) r Is the area of the r-th connected domain; u is the total number of edge pixel classes in the r-th connected domain; h r,u A first number of the ith edge pixel class in the ith connected domain;the duty ratio of the edge pixel point in the (r) th connected domain; />Information entropy of the edge pixel point in the (r) th connected domain; ln is a logarithmic function based on a natural constant e.
Further, the method for obtaining the gloss level value comprises the following steps:
for a boundary closed edge line of any connected domain, taking any edge pixel point on the boundary closed edge line as an initial point, and acquiring a change slope between each edge pixel point on the boundary closed edge line and the position of the adjacent next edge pixel point as a target slope;
acquiring a variance of a target slope as a first characteristic value of the connected domain;
acquiring a gradient value average value of each edge pixel point on the boundary closed edge line as a second gradient value;
taking the reciprocal of the second gradient value as a second characteristic value of the connected domain;
acquiring gradient value variance of each edge pixel point in the connected domain as a third characteristic value of the connected domain;
and taking the product of the first characteristic value, the second characteristic value and the third characteristic value of the connected domain as the gloss level value of the connected domain.
Further, the contour change value obtaining method comprises the following steps:
for any subarea, acquiring the absolute value of the difference value of the gray value between each pixel point in the subarea and each adjacent pixel point as an adjacent gray difference value;
acquiring the average value of adjacent gray difference values in the subarea as the surface complexity in the subarea;
acquiring the number of edge pixel points on a boundary edge line of the sub-region, and taking the number as the length of the boundary edge line of the sub-region;
taking the ratio of the length of the boundary edge line of the subarea to the area of the subarea as the contour coefficient of the subarea;
and taking the ratio of the surface complexity and the contour coefficient in the subarea as the contour change value of the subarea.
Further, the calculation formula of the change degree value is as follows:
wherein E is r Is the variation degree value of the r connected domain; gamma ray Surface complexity for non-connected domains; p is p Is the profile coefficient of the non-connected domain;is the profile variation value of the non-connected domain; gamma ray r The surface complexity of the r-th connected domain; p is p r The profile coefficient of the r-th connected domain; />The profile variation value of the r-th connected domain; i is an absolute function.
Further, the calculation formula of the integral characteristic value is as follows:
in the method, in the process of the invention,is the integral characteristic value of the r connected domain; t (T) r Is the characteristic factor of the r connected domain; w (w) r The gloss level value of the (r) th connected domain; e (E) r Is the variation degree value of the r connected domain; tanh is a hyperbolic tangent function.
Further, the method for obtaining the defect area according to the integral characteristic value and determining the quality of the surface of the precision injection molding blank comprises the following steps:
when the overall characteristic value is smaller than or equal to a preset defect judging threshold value, the corresponding connected domain is used as a defect area;
the precision injection molding embryo with the defective region was judged to have a surface quality problem.
Further, the method for obtaining the connected domain comprises the following steps: and acquiring the connected domain in the gray level image through a connected domain marking algorithm.
The invention has the following beneficial effects:
analyzing each connected domain in the gray level image, determining an object analyzed by a visual detection method, and avoiding interference caused by a normal region; in order to accurately detect the defect area, the defect area and the stain area are accurately distinguished through the visual detection method, so that the characteristic factor of each connected domain is obtained according to the duty ratio of edge pixel points in each connected domain, the area of each connected domain and the fluctuation of the number of edge pixel points in each edge pixel class in each connected domain, and the possibility that each connected domain is the defect area is primarily judged; further acquiring a gloss degree value of each connected domain according to the position change between adjacent edge pixel points on the boundary closed edge line of each connected domain and the gradient value of each edge pixel point on the boundary closed edge line and the gradient value fluctuation condition of each edge pixel point in each connected domain, and further judging the possibility that each connected domain is a defect region; the contour change value of each sub-region is obtained according to the gray value difference between adjacent pixel points in each sub-region and the boundary edge line length and area of each sub-region, the change condition of the contour coefficient in each sub-region is accurately reflected, the change degree value of each connected region is obtained according to the contour change value difference between each connected region and non-connected region, and the possibility that each connected region is a defective region is further judged; and then according to the characteristic factors, the glossiness values and the change degree values of each connected domain, the integral characteristic values of each connected domain are accurately obtained, the abnormal characteristics of each connected domain are accurately analyzed, the defect area in the gray level image is accurately detected, and the quality of the surface of the precision injection molding blank is accurately determined. According to the invention, the shape and the internal confusion degree of each connected domain, the definition of the boundary edge line of each connected domain and the change condition of the contour coefficient of each connected domain are accurately analyzed by a visual detection method, so that the defect area is accurately detected, namely, the defect area and the spot area are accurately detected, the visual detection precision of the surface quality of the precision injection molding blank is improved, and the quality of the precision injection molding blank is ensured.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a visual inspection method for surface quality of a precision injection molding blank according to an embodiment of the invention.
Detailed Description
In order to further illustrate the technical means and effects adopted for achieving the preset purpose of the present invention, the following description refers to the specific implementation, structure, characteristics and effects of a visual inspection method for surface quality of a precision injection molding blank according to the present invention, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, 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 belongs.
The following specifically describes a specific scheme of the visual detection method for the surface quality of the precision injection molding blank provided by the invention with reference to the accompanying drawings.
The embodiment of the invention comprises the following steps: in the embodiment of the invention, the precision injection molding blank in the field of medical equipment is taken as an example, the defect area on the surface of the precision injection molding blank is detected, and the quality of the surface of the precision injection molding blank is accurately judged.
The aim of the embodiment of the invention is as follows: in order to accurately distinguish the raised defect area from the spot area by a visual detection method, the embodiment of the invention analyzes the pixel points in each communication area and the boundary edge pixel points, simultaneously analyzes the profile change condition of each communication area, further accurately acquires the integral characteristic value of each communication area, acquires the defect area in the gray image, accurately distinguishes the raised defect area from the spot area, determines and distinguishes the quality of the surface of the precision injection molding blank, and ensures the performance and appearance of the precision injection molding blank.
Referring to fig. 1, a flow chart of a visual inspection method for surface quality of a precision injection mold blank according to an embodiment of the invention is shown, the method comprises the following steps:
step S1: and acquiring a gray level image of the surface of the precision injection mold blank.
Specifically, in order to accurately detect the convex defects on the surface of the precision injection molding blank, the embodiment of the invention places the precision injection molding blank on a stable workbench, sets a plurality of illumination light sources with adjustable brightness, irradiates the surface of the precision injection molding blank from different angles, and improves the visibility of the defects on the surface of the precision injection molding blank. A CCD camera is used to acquire images of the surface of the precision injection mold blank from multiple angles. Meanwhile, camera parameters are set according to the materials and colors of the precise injection molding embryo and the required image resolution, so that the obtained precise injection molding embryo surface image is clear. For clarity of description, the embodiment of the present invention takes an image of the surface of a precision injection molding blank as an example, and the image of the surface of the precision injection molding blank appearing later is referred to as an image.
In order to accurately acquire a defect area in a precise injection molding blank surface image, the embodiment of the invention carries out graying treatment on the precise injection molding blank surface image to acquire a gray image of the precise injection molding blank surface. The graying process is the prior art, and will not be described in detail.
Step S2: classifying edge pixel points in each connected domain in the gray image according to the gray value in the gray image to obtain edge pixel classes in each connected domain; and acquiring the characteristic factors of each connected domain according to the duty ratio of the edge pixel points in each connected domain, the area of each connected domain and the fluctuation of the number of the edge pixel points of each edge pixel class in each connected domain.
Specifically, a raised defect area on the surface of a precision injection molding blank is an area in a gray level image, and in order to efficiently detect the defect area in the gray level image, the embodiment of the invention acquires a connected domain in the gray level image through a connected domain marking algorithm. The connected domain labeling algorithm is an existing algorithm, and will not be described in detail. In practical situations, stains exist on the surface of the precision injection molding blank, so that the connected domain in the gray scale image is a raised defect area or a stained area. The existing visual detection method is influenced by the complexity and defect diversity of the surface of the precision injection molding blank, so that the existing visual detection method is difficult to accurately distinguish a dirty area and a raised defect area on the surface of the precision injection molding blank in the detection process, and further the defect detection result is inaccurate.
In order to improve accuracy of detecting a defect area by a visual detection method, the embodiment of the invention obtains edge pixel points in a gray level image through an edge detection algorithm. The edge detection algorithm is a known technique, and will not be described in detail. Because of the complexity of the surface of the precision injection mold blank, edge pixel points exist inside the connected domain, wherein an edge line formed by the edge pixel points in the connected domain is not necessarily closed. The pixel points in the connected domain in the embodiment of the invention do not contain the pixel points on the boundary edge. Meanwhile, the gray value of each edge pixel point in the connected domain may be different. However, in the raised defect area, the gray value change of the edge pixel points has a certain rule, and in the stain area, the gray value change of the edge pixel points is disordered, so that according to the gray value, the embodiment of the invention divides the edge pixel points with the same gray value in each connected area in the gray image into the same category as the edge pixel category in each connected area. When the number of edge pixels of an edge pixel class in a certain connected domain changes more, the more disordered the distribution of the edge pixels in the connected domain is, the more likely the connected domain is a stain region. Meanwhile, if the number of edge pixel points in a certain connected domain is larger, the more disordered the connected domain is indirectly indicated, and the more likely the connected domain is a stain region. In actual cases, the stained area is generally smaller and the raised defect area is larger, so that the area of the connected domain is obtained. The method for obtaining the area of the connected domain is the prior art, and will not be described in detail. And further, according to the duty ratio of the edge pixel points in each connected domain, the area of each connected domain and the fluctuation of the number of the edge pixel points in each connected domain, the characteristic factors of each connected domain are obtained, and the possibility that each connected domain is a defect area is primarily judged.
Preferably, the method for acquiring the characteristic factors is as follows: taking the ratio of the total number of the edge pixel points in each communication domain to the total number of the pixel points in each communication domain as the duty ratio of the edge pixel points in each communication domain; acquiring the number of edge pixel points of each edge pixel class in each connected domain as the first number of each edge pixel class; acquiring information entropy of edge pixel points in each connected domain according to the first quantity and the total quantity of the edge pixel points in each connected domain; and acquiring the characteristic factors of each connected domain according to the duty ratio of the edge pixel point in each connected domain, the area of each connected domain and the information entropy of the edge pixel point in each connected domain. The method for obtaining the entropy is the prior art and will not be described in detail.
Taking the r connected domain as an example, a calculation formula for obtaining the feature factor of the r connected domain is as follows:
wherein T is r Is the characteristic factor of the r connected domain; d (D) r The total number of edge pixel points in the r-th connected domain; q (Q) r The total number of the pixel points in the r-th connected domain; s is(s) r Is the area of the r-th connected domain; u is the total number of edge pixel classes in the r-th connected domain; h r,u A first number of the ith edge pixel class in the ith connected domain;is the (r)The duty ratio of the edge pixel points in the communicating domain; />Information entropy of the edge pixel point in the (r) th connected domain; ln is a logarithmic function based on a natural constant e.
D is the same as r The larger the duty ratio of edge pixel points in the r-th connected domainThe larger the r connected domain, the more edge pixel points are, which indirectly indicates that the more disordered the texture distribution in the surface area of the precision injection molding embryo corresponding to the r connected domain, the more likely the r connected domain is a stain area, T r The larger; s is(s) r The smaller the size, the more likely the r-th communicating domain is a stained region, T r The larger; information entropy of edge pixel point in the (r) th connected domain>The larger the texture distribution in the r-th connected domain, the more complex the +.>The larger T r The larger; thus T r The larger the r-th communicating domain, the more likely it is a stained region, T r The smaller the r-th connected domain is, the more likely it is a raised defect region. Wherein (1)>And->The values of (1, 0) are all within the range of (1), and therefore T r The rounding range of (1, 0).
And acquiring the characteristic factor of each connected domain according to the method for acquiring the characteristic factor of the r connected domain.
Step S3: and acquiring the glossiness value of each connected domain according to the position change between adjacent edge pixel points on the boundary closed edge line of each connected domain and the gradient value of each edge pixel point on the boundary closed edge line and the gradient value fluctuation condition of each edge pixel point in each connected domain.
In practical situations, the stain area can be in a smaller area of the connected domain or in a larger area of the connected domain, and meanwhile, the complexity in the stain area is similar to that of the raised defect area, so that the embodiment of the invention further analyzes the shape regularity of each connected domain according to the position change condition between adjacent edge pixel points on the boundary closed edge line of each connected domain. The shape of the stained area is generally irregular, that is, the shape of the corresponding connected area is relatively poor, and the shape of the raised defect area is generally relatively regular, that is, the shape of the corresponding connected area is relatively good. Meanwhile, the boundary edge line of the convex defect region is clearer, and the boundary edge line of the stain region is more fuzzy, so that the gradient value of each edge pixel point on the boundary closed edge line of the connected region is analyzed, wherein the larger the gradient value is, the more likely the corresponding connected region is the convex defect region. In the embodiment of the invention, the gradient value of each edge pixel point is obtained through an edge detection algorithm. In practical situations, certain regularity exists in textures in the raised defect area, so that gradient values of edge pixel points in the raised defect area are similar, and in a stain area, stains can cause change of gloss of the surface of the precision injection molding blank, and the gradient values of the edge pixel points in the stain area are relatively large. Therefore, according to the embodiment of the invention, the gloss level value of each connected domain is obtained according to the position change between the adjacent edge pixel points on the boundary closed edge line of each connected domain, the gradient value of each edge pixel point on the boundary closed edge line and the gradient value fluctuation condition of each edge pixel point in each connected domain, so that the raised defect area and the stain area in the gray level image are further distinguished.
Preferably, the method for obtaining the gloss level value is as follows: and for the boundary closed edge line of any connected domain, taking any edge pixel point on the boundary closed edge line as an initial point, and acquiring a change slope between each edge pixel point on the boundary closed edge line and the position of the adjacent next edge pixel point as a target slope. And regarding the last edge pixel point on the boundary closed edge line, taking the initial point on the boundary closed edge line as the next adjacent edge pixel point of the last edge pixel point on the boundary closed edge line, and acquiring the target slope corresponding to the last edge pixel point on the boundary closed edge line. Where the target slope may be positive, negative, or 0. And acquiring the variance of the target slope as a first characteristic value of the connected domain. It is known that the shape of the raised defect region is relatively regular and the shape of the stained region is irregular, and therefore, the first characteristic value of the raised defect region is relatively small and the first characteristic value of the stained region is relatively large under normal conditions. And acquiring the average value of the gradient values of each edge pixel point on the boundary closed edge line as a second gradient value, wherein the second gradient value of the convex defect region is larger because the edge of the convex defect region is clear and the edge of the stain region is fuzzy. Taking the reciprocal of the second gradient value as a second characteristic value of the connected domain; and acquiring the gradient value variance of each edge pixel point in the connected domain as a third characteristic value of the connected domain, and reflecting the texture distribution condition in the connected domain through the third characteristic value. Therefore, the product of the first, second, and third characteristic values of the connected domain is taken as the gloss level value of the connected domain.
As an example, taking the r-th connected domain in step S2 as an example, a calculation formula for obtaining the gloss level value of the r-th connected domain is:
wherein w is r The gloss level value of the (r) th connected domain;a first characteristic value of the r-th connected domain; />A third characteristic value of the r-th connected domain; n is the total number of edge pixel points on the boundary closed edge line of the r-th connected domain; g r,i The gradient value of the ith edge pixel point on the boundary closed edge line of the (r) th connected domain; />Is a second gradient value; />And the second characteristic value of the r-th connected domain.
It should be noted that the number of the substrates,the larger the size, the more irregular the shape of the r-th connected domain, the more likely the r-th connected domain is a stain region, w r The larger; />The larger the texture distribution in the (r) th connected domain, the more disordered the texture distribution in the (r) th connected domain, the more likely the (r) th connected domain is a stain area, w r The larger; second gradient value->The smaller the boundary of the r-th connected domain is, the more blurred the boundary, the second eigenvalue +.>The larger the r-th communicating domain, the more likely it is a stained region, w r The larger; thus, w r The larger the r-th communicating domain, the more likely it is a stained region, w r The smaller the r-th connected domain is, the more likely it is a raised defect region.
And according to the method for acquiring the gloss level value of the r-th connected domain, acquiring the gloss level value of each connected domain.
Step S4: acquiring a contour change value of each sub-region according to the gray value difference between adjacent pixel points in each sub-region and the boundary edge line length and area of each sub-region; wherein, the subarea represents a non-connected domain and each connected domain in the gray image; and obtaining the change degree value of each connected domain according to the difference of the profile change values between each connected domain and the non-connected domain.
Specifically, the overall contour condition of each sub-area is determined through the length and the area of the boundary edge line of each sub-area, wherein the overall contour condition of each sub-area is closely related to the surface complexity in each sub-area, so that the surface complexity in each sub-area is represented according to the gray value difference between adjacent pixel points in each sub-area, and the contour change value of each sub-area is obtained. In the raised defect area, the overall profile condition of the raised defect area can be changed along with the change of the surface complexity of the raised defect area, so that the profile change value of the raised defect area corresponding to the connected domain keeps relatively stable change, and the profile change value of the raised defect area corresponding to the connected domain is similar to the profile change value of the non-connected domain in the gray level image. Because the change degree of the surface complexity of the stain area is disordered, the change amplitude of the profile change value of the stain area corresponding to the connected domain is larger, and therefore the difference between the profile change value of the stain area corresponding to the connected domain and the profile change value of the non-connected domain in the gray level image is larger. Furthermore, according to the embodiment of the invention, the change degree value of each connected domain is obtained according to the difference of the profile change values between each connected domain and non-connected domains, wherein the smaller the change degree value is, the more likely the corresponding connected domain is a convex defect region. The specific method for acquiring the change degree value comprises the following steps:
(1) And acquiring a profile variation value.
Preferably, the method for obtaining the profile variation value is as follows: for any subarea, acquiring the absolute value of the difference value of the gray value between each pixel point in the subarea and each adjacent pixel point as an adjacent gray difference value; acquiring the average value of adjacent gray difference values in the subarea as the surface complexity in the subarea; acquiring the number of edge pixel points on a boundary edge line of the sub-region, and taking the number as the length of the boundary edge line of the sub-region; taking the ratio of the length of the boundary edge line of the subarea to the area of the subarea as the contour coefficient of the subarea; and taking the ratio of the surface complexity and the contour coefficient in the subarea as the contour change value of the subarea. In the embodiment of the invention, the subareas represent connected domains and non-connected domains. So far, the contour change value of each connected domain and the contour change value of the non-connected domain are obtained.
(2) And obtaining a change degree value.
Taking the r connected domain in step S2 as an example, a calculation formula for obtaining the change degree value of the r connected domain is as follows:
wherein E is r Is the variation degree value of the r connected domain; gamma ray Surface complexity for non-connected domains; p is p Is the profile coefficient of the non-connected domain;is the profile variation value of the non-connected domain; gamma ray r The surface complexity of the r-th connected domain; p is p r The profile coefficient of the r-th connected domain; />The profile variation value of the r-th connected domain; i is an absolute function.
It should be noted that the number of the substrates,and->The closer the r-th connected domain is, the more likely it is to be a raised defect region, thus E r The smaller the r-th connected domain is, the more likely to be a raised defect region, E r The larger the r-th connected domain, the more likely it is a stained area.
And acquiring the change degree value of each connected domain according to the method for acquiring the change degree value of the r-th connected domain.
Step S5: and obtaining the overall characteristic value of each connected domain according to the characteristic factor, the glossiness value and the change value of each connected domain.
Specifically, identifying and detecting raised defect areas and stained areas on the surface of the precision injection molding blank is an important step in detecting the quality of the surface of the precision injection molding blank. Because the raised defect area and the stain area have certain overlapping property on the area characteristics, the raised defect area and the stain area in the gray level image are difficult to effectively distinguish only according to the area size of the connected area, so that the characteristic factors, the glossiness value and the change value of the connected area are used as the characteristics for distinguishing the raised defect area and the stain area together, the integral characteristic value of each connected area is accurately obtained, the defect characteristics in each connected area are accurately analyzed, and the visual detection method has more practical significance.
Taking the r connected domain in step S2 as an example, a calculation formula for obtaining the overall eigenvalue of the r connected domain is as follows:
in the method, in the process of the invention,is the integral characteristic value of the r connected domain; t (T) r Is the characteristic factor of the r connected domain; w (w) r The gloss level value of the (r) th connected domain; e (E) r Is the variation degree value of the r connected domain; tanh is a hyperbolic tangent function.
T is the same as r The smaller the size, the more regular the texture distribution and the larger the area in the r-th connected domain, the more likely the r-th connected domain is a raised defect region,the smaller; w (w) r The smaller the r connected domain is, the more regular the shape, the more regular the texture distribution, the clearer the boundary, the more likely the r connected domain is a raised defect region, +.>The smaller; e (E) r The smaller the value of the profile variation of the r-th connected domain is, the more likely the r-th connected domain is a convex defect region, the more similar the value of the profile variation of the non-connected domain is, the more likely the r-th connected domain is a convex defect region, the more the r-th connected domain is a convex defect region>The smaller; thus, the first and second substrates are bonded together,the smaller the r-th connected domain is, the more likely it is a raised defect region.
And according to the method for acquiring the integral characteristic value of the r-th connected domain, acquiring the integral characteristic value of each connected domain.
Step S6: and obtaining a defect area according to the integral characteristic value, and determining the quality of the surface of the precision injection molding blank.
Specifically, according to the overall characteristic value of each connected domain, each connected domain is analyzed to determine whether each connected domain is a defect region, and the preset defect judgment threshold value is set to be 0.4 according to the embodiment of the invention, and an implementer can set the preset defect judgment threshold value according to the actual situation, so that the implementation is not limited. And when the integral characteristic value is smaller than or equal to a preset defect judging threshold value, taking the corresponding connected domain as a defect area. To this end, a defective region in the gradation image is determined.
Further, the precision injection molding blank having the defective region is determined to have a surface quality problem, and therefore, the precision injection molding blank having the defective region is reprocessed, and it is determined that the precision injection molding blank has a uniform high-quality surface, and the reliability of producing plastic parts from the precision injection molding blank is improved.
Meanwhile, the raised defect areas and the stain areas are accurately distinguished, so that the appearance, the function and the quality of the precise injection molding blank can reach the expected level. The visual detection method provided by the embodiment of the invention can accurately distinguish the raised defect area from the spot area, accurately detect the quality of the surface of the precision injection molding blank and ensure the high quality of the precision injection molding blank.
The present invention has been completed.
In summary, the embodiment of the invention acquires the gray image, analyzes the gray value, gradient value and area of the connected domain of the pixel point in the connected domain according to the visual detection method, and acquires the characteristic factor; further analyzing the position change, gradient value and gradient value of the boundary closed edge line of the connected domain to obtain a gloss value; finally, analyzing the gray value of the edge pixel point in the sub-region, the boundary edge line and the area of the sub-region to obtain a change degree value; and obtaining an integral characteristic value through the characteristic factor, the glossiness value and the change value, determining a defect area, and judging the quality of the surface of the precision injection molding blank. The invention obtains the integral characteristic value by a visual detection method, accurately detects the defect area of the precision injection molding embryo, accurately judges the surface quality of the precision injection molding embryo, and ensures the consistent high quality of the surface of the precision injection molding embryo.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (10)

1. The visual detection method for the surface quality of the precision injection molding embryo is characterized by comprising the following steps of:
acquiring a gray level image of the surface of a precision injection mold blank;
classifying edge pixel points in each connected domain in the gray image according to the gray value in the gray image to obtain edge pixel classes in each connected domain; acquiring characteristic factors of each connected domain according to the duty ratio of the edge pixel points in each connected domain, the area of each connected domain and the fluctuation of the number of the edge pixel points of each edge pixel class in each connected domain;
acquiring a gloss degree value of each connected domain according to the position change between adjacent edge pixel points on a boundary closed edge line of each connected domain and the gradient value of each edge pixel point on the boundary closed edge line and the gradient value fluctuation condition of each edge pixel point in each connected domain;
acquiring a contour change value of each sub-region according to the gray value difference between adjacent pixel points in each sub-region and the boundary edge line length and area of each sub-region; wherein, the subarea represents a non-connected domain and each connected domain in the gray image; acquiring a change degree value of each connected domain according to the profile change value difference between each connected domain and the non-connected domain;
acquiring the overall characteristic value of each connected domain according to the characteristic factor, the glossiness value and the change value of each connected domain;
and obtaining a defect area according to the integral characteristic value, and determining the quality of the surface of the precision injection molding blank.
2. The visual inspection method for surface quality of precision injection molding blanks according to claim 1, wherein the method for obtaining edge pixels comprises the steps of:
and acquiring non-closed edge lines in each connected domain, and dividing edge pixel points with the same gray value in the non-closed edge lines in each connected domain into the same class as edge pixel classes in each connected domain.
3. The visual inspection method for surface quality of precision injection molding blanks according to claim 1, wherein the characteristic factors are obtained by the following steps:
taking the ratio of the total number of the edge pixel points in each communication domain to the total number of the pixel points in each communication domain as the duty ratio of the edge pixel points in each communication domain;
acquiring the number of edge pixel points of each edge pixel class in each connected domain as the first number of each edge pixel class;
acquiring information entropy of edge pixel points in each connected domain according to the first quantity and the total quantity of the edge pixel points in each connected domain;
and acquiring the characteristic factors of each connected domain according to the duty ratio of the edge pixel point in each connected domain, the area of each connected domain and the information entropy of the edge pixel point in each connected domain.
4. The visual inspection method for surface quality of precision injection molding blanks according to claim 3, wherein the calculation formula of the characteristic factors is as follows:
wherein T is r Is the characteristic factor of the r connected domain; d (D) r The total number of edge pixel points in the r-th connected domain; q (Q) r The total number of the pixel points in the r-th connected domain; s is(s) r Is the area of the r-th connected domain; u is the total number of edge pixel classes in the r-th connected domain; h r,u A first number of the ith edge pixel class in the ith connected domain;the duty ratio of the edge pixel point in the (r) th connected domain; />Information entropy of the edge pixel point in the (r) th connected domain; ln is a logarithmic function based on a natural constant e.
5. The visual inspection method for surface quality of precision injection molding blanks according to claim 1, wherein the method for obtaining the gloss value is as follows:
for a boundary closed edge line of any connected domain, taking any edge pixel point on the boundary closed edge line as an initial point, and acquiring a change slope between each edge pixel point on the boundary closed edge line and the position of the adjacent next edge pixel point as a target slope;
acquiring a variance of a target slope as a first characteristic value of the connected domain;
acquiring a gradient value average value of each edge pixel point on the boundary closed edge line as a second gradient value;
taking the reciprocal of the second gradient value as a second characteristic value of the connected domain;
acquiring gradient value variance of each edge pixel point in the connected domain as a third characteristic value of the connected domain;
and taking the product of the first characteristic value, the second characteristic value and the third characteristic value of the connected domain as the gloss level value of the connected domain.
6. The visual inspection method for surface quality of precision injection molding blanks according to claim 1, wherein the contour change value obtaining method comprises the following steps:
for any subarea, acquiring the absolute value of the difference value of the gray value between each pixel point in the subarea and each adjacent pixel point as an adjacent gray difference value;
acquiring the average value of adjacent gray difference values in the subarea as the surface complexity in the subarea;
acquiring the number of edge pixel points on a boundary edge line of the sub-region, and taking the number as the length of the boundary edge line of the sub-region;
taking the ratio of the length of the boundary edge line of the subarea to the area of the subarea as the contour coefficient of the subarea;
and taking the ratio of the surface complexity and the contour coefficient in the subarea as the contour change value of the subarea.
7. The visual inspection method of surface quality of precision injection molding blanks according to claim 6, wherein the calculation formula of the variation value is:
wherein E is r Is the variation degree value of the r connected domain; gamma ray Surface complexity for non-connected domains; p is p Is the profile coefficient of the non-connected domain;is the profile variation value of the non-connected domain; gamma ray r The surface complexity of the r-th connected domain; p is p r The profile coefficient of the r-th connected domain; />The profile variation value of the r-th connected domain; i is an absolute function.
8. The visual inspection method of surface quality of precision injection molding blanks according to claim 1, wherein the calculation formula of the integral characteristic value is as follows:
in the method, in the process of the invention,is the integral characteristic value of the r connected domain; t (T) r Is the characteristic factor of the r connected domain; w (w) r The gloss level value of the (r) th connected domain; e (E) r Is the variation degree value of the r connected domain; tanh is a hyperbolic tangent function.
9. The visual inspection method for surface quality of precision injection molding blanks according to claim 1, wherein the method for obtaining defect areas according to the overall characteristic values and determining the quality of the surfaces of the precision injection molding blanks comprises the following steps:
when the overall characteristic value is smaller than or equal to a preset defect judging threshold value, the corresponding connected domain is used as a defect area;
the precision injection molding embryo with the defective region was judged to have a surface quality problem.
10. The visual inspection method for surface quality of precision injection molding blanks according to claim 1, wherein the method for obtaining the connected domain is as follows: and acquiring the connected domain in the gray level image through a connected domain marking algorithm.
CN202311769056.9A 2023-12-21 2023-12-21 Visual detection method for surface quality of precision injection mold embryo Active CN117635595B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311769056.9A CN117635595B (en) 2023-12-21 2023-12-21 Visual detection method for surface quality of precision injection mold embryo

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311769056.9A CN117635595B (en) 2023-12-21 2023-12-21 Visual detection method for surface quality of precision injection mold embryo

Publications (2)

Publication Number Publication Date
CN117635595A CN117635595A (en) 2024-03-01
CN117635595B true CN117635595B (en) 2024-04-09

Family

ID=90037753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311769056.9A Active CN117635595B (en) 2023-12-21 2023-12-21 Visual detection method for surface quality of precision injection mold embryo

Country Status (1)

Country Link
CN (1) CN117635595B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116843678A (en) * 2023-08-28 2023-10-03 青岛冠宝林活性炭有限公司 Hard carbon electrode production quality detection method
CN117173189A (en) * 2023-11-03 2023-12-05 南通江华机械有限公司 Visual inspection system for polishing effect of aluminum alloy surface
CN117252882A (en) * 2023-11-20 2023-12-19 苏州德费尔自动化设备有限公司 Cylinder head quality detection method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116843678A (en) * 2023-08-28 2023-10-03 青岛冠宝林活性炭有限公司 Hard carbon electrode production quality detection method
CN117173189A (en) * 2023-11-03 2023-12-05 南通江华机械有限公司 Visual inspection system for polishing effect of aluminum alloy surface
CN117252882A (en) * 2023-11-20 2023-12-19 苏州德费尔自动化设备有限公司 Cylinder head quality detection method and system

Also Published As

Publication number Publication date
CN117635595A (en) 2024-03-01

Similar Documents

Publication Publication Date Title
CN113570605B (en) Defect detection method and system based on liquid crystal display panel
CN110286124A (en) Refractory brick measuring system based on machine vision
CN117197141B (en) Method for detecting surface defects of automobile parts
CN115861291B (en) Chip circuit board production defect detection method based on machine vision
CN109685760B (en) MATLAB-based SLM powder bed powder laying image convex hull depression defect detection method
CN116030060B (en) Plastic particle quality detection method
CN114140679A (en) Defect fusion method, device, recognition system and storage medium
CN116912248B (en) Irregular hardware surface defect detection method based on computer vision
CN114723705A (en) Cloth flaw detection method based on image processing
CN116912261B (en) Plastic mold injection molding surface defect detection method
CN115100206B (en) Printing defect identification method for textile with periodic pattern
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN116664569B (en) Weld flash defect detection method
CN115620061A (en) Hardware part defect detection method and system based on image recognition technology
CN115546155A (en) Rivet size detection method based on machine vision
CN108022219B (en) Two-dimensional image gray level correction method
CN115953409A (en) Injection molding surface defect detection method based on image processing
CN108805854B (en) Method for rapidly counting tablets and detecting completeness of tablets in complex environment
CN114612441A (en) Plastic bottle defect detection method and system based on artificial intelligence and image processing
CN117635595B (en) Visual detection method for surface quality of precision injection mold embryo
JP7383722B2 (en) Method and system for defect detection in image data of target coatings
Georgieva et al. Identification of surface leather defects.
CN116519640A (en) Method for measuring surface glossiness of silica gel key based on machine vision system
CN115496762A (en) Textile technology-based dyeing defect identification method
WO2003010622A2 (en) Automatic separation of subject pixels using segmentation based on multiple planes of measurement data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant