A method and system for detecting tiger stripe defects in injection molded parts based on image processing
Through image processing technology, the surface image of the injection molded parts was analyzed, and the continuity, similarity and periodicity indicators of the tiger skin pattern area were calculated, which solved the problem of strong subjectivity of artificial detection and realized the automatic and accurate detection of the tiger skin pattern defects of the injection molded parts.
Patent Information
- Application Number
- CN202210346783.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In the prior art, the defect detection of tiger skin pattern in injection molded parts relies on artificial testing, which is highly subjective and inaccurate, making it prone to omissions.
Using an image-based processing method, by acquiring the surface image of the injection molded parts, analyzing the grayscale value change curve and central point distribution of the abnormal areas, calculating the continuity, similarity and periodicity indicators, and automatically judging the tiger skin pattern area.
It improves the accuracy of detection of tiger skin defects and realizes automated and objective detection results.
Smart Images

Figure CN114723702B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tiger stripe defect detection, and in particular to a method and system for detecting tiger stripe defects in injection molded parts based on image processing. Background Art
[0002] Tiger skin pattern is a surface defect with wavy stripes. The stripes are approximately perpendicular to the melt flow direction, that is, approximately perpendicular to the injection direction of the injection molded part. They form an imprint with different gloss on the surface of the injection molded part, which looks like tiger skin, hence the name tiger skin pattern. Tiger skin pattern often appears on injection molded parts with thin walls or large flow rates. The tiger skin pattern that appears on the injection molded part will change periodically, and the tiger skin pattern is divided into light and dark areas. The light area has high gloss, while the dark area has poor gloss.
[0003] The current method for detecting tiger stripe defects on injection molded parts generally relies on manual inspection to determine whether tiger stripe defects exist on the surface of the injection molded parts. However, this manual inspection method is highly subjective and does not analyze and judge based on the principles of tiger stripe defect formation. Therefore, it may lead to inaccurate detection results or omissions. Summary of the Invention
[0004] The present invention provides a method and system for detecting tiger stripe defects in injection molded parts based on image processing, which is used to solve the problem that the existing technology cannot accurately detect tiger stripe defects. The technical solution adopted is as follows:
[0005] In a first aspect, an embodiment of the present invention provides a method and system for detecting tiger stripe defects in injection molded parts based on image processing, comprising the following steps:
[0006] Acquire surface images of injection molded parts;
[0007] Obtaining abnormal regions corresponding to the injection molded part surface image according to the injection molded part surface image;
[0008] Based on the grayscale value change curve of each sub-abnormal region corresponding to each abnormal region in the pouring direction of the injection molded part and the standard curve corresponding to the grayscale value change curve, determine whether there is a bright area and a dark area in each sub-abnormal region; if so, calculate the center point of the bright area and the center point of the dark area in each sub-abnormal region; superimpose the center points in a direction perpendicular to the pouring direction of the injection molded part to obtain a center point image corresponding to each abnormal region; and based on the center point image, obtain the bright area stripes and the dark area stripes in each abnormal region in the direction perpendicular to the pouring direction of the injection molded part;
[0009] According to the number of center points of the bright areas on each bright area stripe and the number of center points of the dark areas on each dark area stripe in a direction perpendicular to the pouring direction of the injection molded part, the continuity index of the bright area stripe and the continuity index of the dark area stripe in each abnormal area are obtained;
[0010] According to the width values of each bright area on each bright area stripe and the width values of each dark area on each dark area stripe, the width similarity index of the bright area stripes and the width similarity index of the dark area stripes in each abnormal area are obtained; according to the positions where the bright area stripes and the dark area stripes appear in each abnormal area, the periodicity index of the bright area stripes and the periodicity index of the dark area stripes in each abnormal area are obtained;
[0011] According to the continuity index, the similarity index and the periodicity index, it is determined whether each abnormal area corresponding to the surface image of the injection molded part is a tiger stripe area.
[0012] The present invention also provides an injection molded part tiger stripe defect detection system based on image processing, comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the above-mentioned injection molded part tiger stripe defect detection method based on image processing.
[0013] The present invention obtains a continuity index of the light area stripes and a continuity index of the dark area stripes in each abnormal area based on the number of center points of the bright areas on each light area stripe and the number of center points of the dark areas on each dark area stripe in a direction perpendicular to the casting direction of the injection molded part; obtains a width similarity index of the light area stripes and a width similarity index of the dark area stripes in each abnormal area based on the width values of each light area on each light area stripe and the width values of each dark area on each dark area stripe; obtains a periodicity index of the light area stripes and a periodicity index of the dark area stripes in each abnormal area based on the positions at which the light area stripes and the dark area stripes appear in each abnormal area; and determines whether each abnormal area corresponding to the surface image of the injection molded part is a tiger stripe area based on the continuity index, the similarity index and the periodicity index. The method for detecting tiger stripe defects on injection-molded parts provided by the present invention is an automatic method for detecting tiger stripe defects. The method uses the continuity index, similarity index, and periodicity index of the bright area stripes and the bright area stripes in each abnormal area as a basis for judging whether each abnormal area corresponding to the surface image of the injection-molded part is a tiger stripe area. Compared with manual tiger stripe defect detection methods, this detection method can improve the accuracy of tiger stripe defect detection.
[0014] Preferably, the method for obtaining each abnormal area corresponding to the surface image of the injection molded part includes:
[0015] Obtaining, based on the surface image of the injection-molded part, connected domains on the surface of the injection-molded part that are larger than a preset area threshold;
[0016] Performing block processing on each connected domain to obtain a sub-connected domain corresponding to each connected domain; performing permutation entropy calculation on each sub-connected domain to obtain an abnormal sub-connected domain in each connected domain;
[0017] The abnormal sub-connected domains are spliced to obtain abnormal regions corresponding to the surface image of the injection molded part.
[0018] Preferably, the method for obtaining the grayscale value change curve of each sub-abnormal region corresponding to each abnormal region in the pouring direction of the injection molded part and the standard curve corresponding to the grayscale value change curve includes:
[0019] Superimposing a plurality of grayscale value sequences corresponding to each abnormal sub-region in a direction perpendicular to the pouring direction of the injection molded part to obtain a superimposed grayscale value sequence of each abnormal sub-region, and connecting each grayscale value in the superimposed grayscale value sequence to obtain a grayscale value change curve of each abnormal sub-region corresponding to each abnormal region in the pouring direction of the injection molded part;
[0020] The grayscale value change curve is evenly segmented, and the grayscale value mean corresponding to each segment in the grayscale value change curve is calculated; and a standard curve corresponding to the grayscale value change curve is obtained according to the grayscale value mean corresponding to each segment.
[0021] Preferably, the method for determining whether there are bright areas and dark areas in each abnormal sub-area includes:
[0022] The standard curve corresponding to the gray value change curve is moved up and down with equal gray levels in a direction perpendicular to the pouring direction of the injection molded part to obtain an upper standard curve corresponding to each gray value change curve and a lower standard curve corresponding to the gray value change curve;
[0023] Determine whether the upper standard curve and the lower standard curve divide the corresponding grayscale value change curve into three areas. If so, record the area above the upper standard curve as the bright area of the corresponding sub-abnormal area, and record the area below the lower standard curve as the dark area of the corresponding sub-abnormal area.
[0024] Preferably, the method for obtaining the continuity index of the bright area stripes and the continuity index of the dark area stripes in each abnormal area includes:
[0025] Clustering each center point on the center point image using a mean shift clustering algorithm to obtain each center point category area corresponding to each center point image and a category center corresponding to each center point category area;
[0026] Count the number of center points of the bright area and the number of center points of the dark area within the set area with the center of each category as the midpoint;
[0027] According to the number of center points in the bright area and the number of center points in the dark area, the regional stripe category corresponding to each center point category area is determined. If it is a bright area stripe, the continuity index of the bright area stripe is obtained according to the number of center points in the corresponding set area and the number of center points in the bright area; if it is a dark area stripe, the continuity index of the dark area stripe is obtained according to the number of center points in the corresponding set area and the number of center points in the dark area.
[0028] Preferably, the method for obtaining the width value of each bright area on each bright area stripe and the width value of each dark area on each dark area stripe includes:
[0029] According to the bright area stripes and dark area stripes corresponding to each abnormal area, each bright area on each bright area stripe and each dark area on each dark area stripe are obtained;
[0030] Obtain the longest line segment in each bright area that is parallel to the pouring direction of the injection molded part, and record the longest line segment as the width value of each bright area; obtain the longest line segment in each dark area that is parallel to the pouring direction of the injection molded part, and record the longest line segment as the width value of each dark area.
[0031] Preferably, the width similarity index of the corresponding bright area stripes in each abnormal area is calculated according to the following formula:
[0032]
[0033] Among them, W c is the width similarity index of the cth bright area stripe in any abnormal area, D is the number of bright areas on the cth bright area stripe, w d is the width of the dth bright area on the cth bright area stripe in the abnormal area, w d+1 is the width of the d+1th bright area on the cth bright area stripe in the abnormal area. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 The present invention is a flow chart of a method for detecting tiger stripe defects in injection molded parts based on image processing. DETAILED DESCRIPTION
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field fall within the scope of protection of the embodiments of the present invention.
[0037] 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 pertains.
[0038] This embodiment provides a method for detecting tiger stripe defects in injection molded parts based on image processing, which is described in detail as follows:
[0039] like Figure 1 As shown, the method for detecting tiger stripe defects in injection molded parts based on image processing includes the following steps:
[0040] Step S001: Acquire a surface image of an injection molded part.
[0041] Since tiger stripe defects are likely to appear on large injection-molded parts, the application scenario of this embodiment is large injection-molded parts, such as automobile bumpers, dashboards, door panels and other large injection-molded parts.
[0042] In this embodiment, an injection-molded part is placed on a platform, and a grayscale camera is used to capture an image of the surface of the injection-molded part. The captured image is a grayscale image. Before the grayscale camera captures the image, a parallel light position is arranged so that the parallel light illuminates the surface of the injection-molded part so that the surface of the injection-molded part is evenly illuminated. Then, the grayscale camera is arranged above the injection-molded part. The position of the grayscale camera must be parallel to the injection direction of the injection-molded part. Therefore, the grayscale camera captures the surface image of the injection-molded part from a top-down perspective, and the horizontal axis of the captured grayscale image is parallel to the injection direction.
[0043] In this embodiment, the selection of the grayscale camera, the position of the parallel light, and the distance between the grayscale camera and the injection molded part should all be set according to actual conditions.
[0044] Step S002 : obtaining abnormal regions corresponding to the injection molded part surface image according to the injection molded part surface image.
[0045] In this embodiment, the Canny edge detection algorithm is used to extract edges from the obtained injection molded part surface image to obtain an edge image of the injection molded part surface image. In this embodiment, the Canny edge detection algorithm is a well-known technology and is therefore not described in detail in this embodiment. As other implementation methods, other algorithms may be used to extract edges from the injection molded part surface image according to different needs, such as the Sobel edge detection algorithm or the Roberts edge detection algorithm.
[0046] In this embodiment, based on the edge image of the injection-molded part surface image obtained, the edge image of the injection-molded part surface image is processed by a connected domain segmentation algorithm, and the connected domains on the edge image of the injection-molded part surface image that are larger than a preset area threshold are segmented out to obtain connected domains on the injection-molded part surface that are larger than the preset area threshold. In this embodiment, the connected domains segmented out are all regular rectangular areas. In this embodiment, the preset area threshold needs to be set according to actual conditions.
[0047] As another implementation, different connected domain segmentation methods may be set according to different requirements. For example, each segmented connected domain may be a regular circle or an irregular shape.
[0048] In this embodiment, each connected domain obtained is subjected to block processing. The specific block processing process is: each connected domain is divided into multiple sub-connected domains of equal area, and the length of the sub-connected domain is set to n consecutive pixels and the width of the sub-connected domain is set to 1 pixel based on empirical values. Therefore, each sub-connected domain can be regarded as a grayscale value time series with a length of n. As other implementation methods, the length and width of the sub-connected domain need to be set according to actual conditions.
[0049] In this embodiment, a permutation entropy algorithm is performed on each sub-connected domain, and the results of the analysis are used to determine whether each sub-connected domain is an abnormal sub-connected domain. The specific permutation entropy algorithm analysis process is as follows: any sub-connected domain is selected, and the grayscale value time series corresponding to the sub-connected domain is recorded as:
[0050] X=[x(1),x(2),…x(n)]
[0051] Where X is the grayscale value time series corresponding to the sub-connected domain, x(1) is the first pixel in the grayscale value time series corresponding to the sub-connected domain, x(2) is the second pixel in the grayscale value time series corresponding to the sub-connected domain, x(n) is the nth pixel in the grayscale value time series corresponding to the sub-connected domain, and n is the number of pixels in the grayscale value time series corresponding to the sub-connected domain.
[0052] The phase space reconstruction delayed coordinate method is used to reconstruct the phase space of the i-th pixel point x(i) in X. The m sample points corresponding to x(i) are taken to obtain the reconstruction vector of the m-dimensional space corresponding to x(i) and the phase space matrix corresponding to X. The elements in the reconstruction vector of the m-dimensional space corresponding to x(i) are arranged in ascending order, and the probability of each arrangement is calculated. Based on the probability of each arrangement, the permutation entropy of the normalized grayscale value time series corresponding to the sub-connected domain is calculated.
[0053] Therefore, by performing the above analysis on each sub-connected domain, the permutation entropy of the grayscale value time series corresponding to each sub-connected domain can be obtained after normalization; the size of the permutation entropy can reflect the regularity of the grayscale value time series corresponding to each sub-connected domain, and the regularity of the grayscale value time series can reflect the abnormality of each sub-connected domain; the value of the permutation entropy of the grayscale value time series corresponding to the normal sub-connected domain after normalization is small, and the corresponding grayscale value time series is relatively simple and regular; the value of the permutation entropy of the grayscale value time series corresponding to the abnormal sub-connected domain after normalization is large, and the corresponding grayscale value time series is relatively complex and random.
[0054] In this embodiment, when the value of the permutation entropy of the grayscale value time series corresponding to the sub-connected domain after normalization is greater than 0.6, the sub-connected domain is determined to be an abnormal sub-connected domain; when the value of the permutation entropy of the grayscale value time series corresponding to the sub-connected domain after normalization is not greater than 0.6, the sub-connected domain is determined to be a normal sub-connected domain; in this embodiment, each abnormal sub-connected domain is processed by a splicing algorithm, and each connected domain that is greater than the preset first connected domain threshold after splicing is recorded as each abnormal area corresponding to the surface image of the injection molded part.
[0055] In this embodiment, the splicing algorithm and the permutation entropy algorithm are both well-known technologies and are therefore not described in detail in this embodiment. As other implementations, different methods for obtaining abnormal sub-connected domains can also be set according to different needs. For example, when the permutation entropy value of the grayscale value time series corresponding to the sub-connected domain is greater than 0.7 after normalization, the sub-connected domain is determined to be an abnormal sub-connected domain.
[0056] Step S003, based on the grayscale value change curve of each sub-abnormal region corresponding to each abnormal region in the casting direction of the injection molded part and the standard curve corresponding to the grayscale value change curve, determine whether there is a bright area and a dark area in each sub-abnormal region, and if so, calculate the center point of the bright area and the center point of the dark area in each sub-abnormal region; superimpose the center points in the direction perpendicular to the casting direction of the injection molded part to obtain the center point image corresponding to each abnormal region; based on the center point image, obtain the bright area stripes and dark area stripes in each abnormal region in the direction perpendicular to the casting direction of the injection molded part.
[0057] In this embodiment, it is not possible to determine whether each abnormal region obtained above is a tiger stripe defect, so each abnormal region is subsequently analyzed to determine the probability that each abnormal region is a tiger stripe defect.
[0058] In this embodiment, since each abnormal region is a large area, in order to reduce the computational complexity of subsequent analysis, each abnormal region is evenly divided in the pouring direction of the injection molded part to obtain a sub-abnormal region corresponding to each abnormal region; the width of the sub-abnormal region is a continuous pixel points, so the sub-abnormal region is composed of a grayscale value time series, and the a grayscale value sequences corresponding to the sub-abnormal region are superimposed in the direction perpendicular to the pouring direction of the injection molded part to obtain the superimposed grayscale value sequence of each sub-abnormal region, and the grayscale values on the superimposed grayscale value sequence are connected to obtain the grayscale value change curve of each sub-abnormal region corresponding to each abnormal region in the pouring direction of the injection molded part.
[0059] In this embodiment, superimposing a grayscale value sequences corresponding to the sub-abnormal regions in a direction perpendicular to the casting direction of the injection molded part can amplify the grayscale value variation amplitude of each sub-abnormal region corresponding to each abnormal region in the casting direction of the injection molded part, which is beneficial to subsequent analysis.
[0060] In this embodiment, each grayscale value change curve is equally segmented, and the grayscale value mean corresponding to each segment in each grayscale value change curve is calculated; the grayscale value mean corresponding to each segment in each grayscale value change curve is sequentially connected in the casting direction of the injection molded part to obtain a standard curve corresponding to the grayscale value change curve; as other implementation methods, different methods can also be adopted to segment each grayscale value change curve according to different needs. For example, two different lengths can be selected to alternately segment each grayscale value change curve.
[0061] In this embodiment, the standard curve corresponding to the grayscale value change curve is shifted up and down by equal grayscale levels along a direction perpendicular to the casting direction of the injection molded part, thereby obtaining an upper standard curve corresponding to each grayscale value change curve and a lower standard curve corresponding to the grayscale change curve; a determination is made as to whether the upper standard curve and the lower standard curve corresponding to each grayscale value change curve divide the corresponding grayscale value change curve into three regions. If so, the region above the upper standard curve is recorded as the bright region of the corresponding sub-abnormal region, and the region below the lower standard curve is recorded as the dark region of the corresponding sub-abnormal region. In this embodiment, when the standard curve corresponding to the grayscale value change curve is shifted up and down by equal grayscale levels along a direction perpendicular to the casting direction of the injection molded part, the magnitude of the shifted grayscale level needs to be set according to actual conditions.
[0062] In this embodiment, the center point positions of the bright area and the dark area of each sub-abnormal area are calculated respectively, the center point of the bright area is marked as 1, and the center point of the dark area is marked as 2. The center point positions of the bright area and the dark area of each sub-abnormal area corresponding to each abnormal area are superimposed in the direction perpendicular to the casting direction of the injection molded part to obtain the center point image corresponding to each abnormal area; the center points on the center point image corresponding to each abnormal area are clustered using the mean shift clustering algorithm to obtain the center point category area corresponding to each center point image and the category center corresponding to each center point category area; the set area with the center of each category as the midpoint is statistically analyzed. The number of bright area center points and the number of dark area center points in the domain are determined. When the number of bright area center points in the set area of the center point category area is greater than the number of dark area center points, the bright areas corresponding to the center points of each bright area are expanded in the direction perpendicular to the pouring direction of the injection molded part to obtain bright area stripes in the direction perpendicular to the pouring direction of the injection molded part. When the number of bright area center points in the set area of the center point category area is less than the number of dark area center points, the dark areas corresponding to the center points of each dark area are expanded in the direction perpendicular to the pouring direction of the injection molded part to obtain dark area stripes in the direction perpendicular to the pouring direction of the injection molded part.
[0063] In this embodiment, through the above analysis process, the bright area stripes and dark area stripes in each abnormal area in the direction perpendicular to the casting direction of the injection molded part can be obtained; in this embodiment, the image overlay processing and the image expansion processing are both well-known technologies, so this embodiment will not be described in detail.
[0064] Step S004 , obtaining the continuity index of the bright area stripes and the continuity index of the dark area stripes in each abnormal area based on the number of center points of the bright area on each bright area stripe and the number of center points of the dark area on each dark area stripe in a direction perpendicular to the casting direction of the injection molded part.
[0065] In this embodiment, the continuity index of the corresponding bright area stripes and dark area stripes in each abnormal area is calculated based on the number of bright area center points and the number of dark area center points in the set area with the center of each category as the midpoint and the number of center points in each center point category area. The specific process of calculating the continuity index is: based on the above process, the dark area stripes and the bright area stripes corresponding to each abnormal area in the direction perpendicular to the casting direction of the injection molded part are obtained; when it is a dark area stripe, the corresponding center point category area before the dark area stripe is expanded in the direction perpendicular to the casting direction of the injection molded part is obtained; the dark area stripes in the set area of the center point category area are counted. The number of center points in the area and the number of center points in the center point category area are calculated, and the ratio of the number of center points in the dark area within the set area of the center point category area to the number of center points in the center point category area is calculated to obtain the continuity index corresponding to the dark area stripes in the direction perpendicular to the casting direction of the injection molded part; and the number of center points in the dark area within the set area of the center point category area is positively correlated with the continuity index corresponding to the dark area stripes, and the number of center points in the center point category area is negatively correlated with the continuity index corresponding to the dark area stripes; and the continuity index indicates that the higher the continuity of the representative stripes, the greater the probability that the stripes are tiger stripes.
[0066] When it is a bright area stripe, obtain the corresponding center point category area before the bright area stripe is expanded in the direction perpendicular to the casting direction of the injection molded part, count the number of bright area center points in the set area of the center point category area and the number of center points in the center point category area, calculate the ratio of the number of bright area center points in the set area of the center point category area to the number of center points in the center point category area, and obtain the continuity index corresponding to the bright area stripe in the direction perpendicular to the casting direction of the injection molded part; and the number of bright area center points in the set area of the center point category area is positively correlated with the continuity index corresponding to the dark area stripes, and the number of center points in the center point category area is negatively correlated with the continuity index corresponding to the bright area stripes.
[0067] In this embodiment, through the above process of calculating the continuity index, the continuity index of the bright area stripes and the continuity index of the dark area stripes corresponding to each abnormal area in the direction perpendicular to the casting direction of the injection molded part can be obtained.
[0068] Step S005: Obtain a width similarity index of the bright area stripes and a width similarity index of the dark area stripes in each abnormal area based on the width values of each bright area on each bright area stripe and the width values of each dark area on each dark area stripe; obtain a periodicity index of the bright area stripes and a periodicity index of the dark area stripes in each abnormal area based on the positions at which the bright area stripes and the dark area stripes appear in each abnormal area.
[0069] In this embodiment, after the continuity of the bright area stripes and the dark area stripes in each abnormal area is analyzed, the width similarity index of the bright area stripes and the dark area stripes in each abnormal area is analyzed. In this embodiment, based on the bright area stripes and the dark area stripes corresponding to each abnormal area, each bright area on each bright area stripe and each dark area on each dark area stripe is obtained; the longest line segment parallel to the casting direction of the injection molded part in each bright area is obtained, and the longest line segment parallel to the casting direction of the injection molded part in each bright area is recorded as the width value of each bright area; the longest line segment parallel to the casting direction of the injection molded part in each dark area is obtained, and the longest line segment parallel to the casting direction of the injection molded part in each bright area is recorded as the width value of each dark area.
[0070] In this embodiment, based on the width values of each bright area on each bright area stripe in each abnormal area and the width values of each dark area on each dark area stripe in each abnormal area, a width similarity index of the bright area stripes and a width similarity index of the dark area stripes in each abnormal area are obtained; and the smaller the width similarity index, the greater the probability of being tiger stripes. The width similarity index of the bright area stripes in each abnormal area is calculated according to the following formula:
[0071]
[0072] Among them, W c is the width similarity index of the cth bright area stripe in any abnormal area, D is the number of bright areas on the cth bright area stripe, w d is the width of the dth bright area on the cth bright area stripe in the abnormal area, w d+1 is the width of the d+1th bright area on the cth bright area stripe in the abnormal area.
[0073] In this embodiment, based on the calculation process of the width similarity index of the bright area stripes in each abnormal area, the width similarity index of the dark area stripes in each abnormal area can be obtained, but in the calculation process, the width similarity index is obtained based on the maximum width value of each dark area on the dark area stripes in the casting direction of the injection molded part.
[0074] In this embodiment, after analyzing the continuity of the light region stripes and the dark region stripes in each abnormal region and the similarity of the width of the light region stripes and the dark region stripes in each abnormal region, the periodic indicators in each abnormal region are further analyzed. In this embodiment, the light region stripes and the dark region stripes in each abnormal region are marked one by one in the order in which each abnormal region appears along the pouring direction of the injection molded part. In this embodiment, the light region stripes are marked as α, the dark region stripes are marked as β, and the region that is neither a light region stripe nor a dark region stripe is marked as γ. Therefore, a sequence of α, β, and γ can be obtained for each abnormal region.
[0075] In this embodiment, according to the periodicity of the standard tiger stripes, a sequence of the standard tiger stripes with respect to α and β is obtained, and the sequence of the standard tiger stripes with respect to α and β is recorded as […αβαβαβαβαβαβαβ…]; according to the sequence of α, β, and γ of each abnormal region and the sequence of the standard tiger stripes with respect to α and β, a normalized permutation entropy value corresponding to the sequence of each abnormal region and a normalized permutation entropy value corresponding to the sequence of the standard tiger stripes are obtained; according to the normalized permutation entropy value corresponding to the sequence of each abnormal region and the normalized permutation entropy value corresponding to the sequence of the standard tiger stripes, a periodicity index of each abnormal region is obtained; and the permutation entropy value corresponding to the sequence of each abnormal region is positively correlated with the periodicity index of each abnormal region, and the permutation entropy value corresponding to the sequence of the standard tiger stripes is negatively correlated with the periodicity index of each abnormal region; in this embodiment, the closer the value of the periodicity index of each abnormal region is to 1, the greater the probability that tiger stripes appear in the abnormal region; the periodicity index of each abnormal region is calculated according to the following formula:
[0076]
[0077] Among them, R is the periodic index of any abnormal area, is the normalized permutation entropy value corresponding to the abnormal region sequence, is the normalized permutation entropy value corresponding to the standard tiger pattern sequence.
[0078] Step S006 , judging whether each abnormal area corresponding to the surface image of the injection molded part is a tiger stripe area based on the continuity index, the similarity index and the periodicity index.
[0079] In this embodiment, whether each abnormal region corresponding to the surface image of the injection molded part is a tiger stripe region is determined based on the continuity index of the light region stripes and the continuity index of the dark region stripes in each abnormal region, the width similarity index of the light region stripes and the width similarity index of the dark region stripes in each abnormal region, and the periodicity index of each abnormal region. In this embodiment, when the three conditions of the continuity index of the light region stripes and the continuity index of the dark region stripes in each abnormal region are greater than the continuity threshold, the width similarity index of the light region stripes and the width similarity index of the dark region stripes in each abnormal region are less than the width similarity threshold, and the periodicity index of each abnormal region is greater than the periodicity threshold are met at the same time, the abnormal region is determined to be a tiger stripe region.
[0080] This embodiment obtains a continuity index of the light area stripes and a continuity index of the dark area stripes in each abnormal area based on the number of center points of the bright areas on each light area stripe and the number of center points of the dark areas on each dark area stripe in a direction perpendicular to the casting direction of the injection molded part; obtains a width similarity index of the light area stripes and a width similarity index of the dark area stripes in each abnormal area based on the width values of each bright area on each light area stripe and the width values of each dark area on each dark area stripe; obtains a periodicity index of the light area stripes and a periodicity index of the dark area stripes in each abnormal area based on the positions at which the light area stripes and the dark area stripes appear in each abnormal area; and determines whether each abnormal area corresponding to the surface image of the injection molded part is a tiger stripe area based on the continuity index, similarity index, and periodicity index. The method for detecting tiger stripe defects in injection molded parts provided in this embodiment is an automatic method for detecting tiger stripe defects. The present invention uses the continuity index, similarity index, and periodicity index of the bright area stripes and the bright area stripes in each abnormal area as the basis for determining whether each abnormal area corresponding to the surface image of the injection molded part is a tiger stripe area. Compared with manual tiger stripe defect detection methods, this detection method can improve the accuracy of tiger stripe defect detection.
[0081] The image processing-based tiger stripe defect detection system for injection molded parts of this embodiment includes a memory and a processor. The processor executes a computer program stored in the memory to implement the above-mentioned image processing-based tiger stripe defect detection method for injection molded parts.
[0082] It should be noted that the order of the above-mentioned embodiments of the present invention is for description only and does not represent the advantages or disadvantages of the embodiments. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results.
Claims
1. A method for detecting tiger stripe defects in injection molded parts based on image processing, characterized in that: The method includes the following steps Steps: Acquire surface images of injection molded parts; Obtaining abnormal regions corresponding to the injection molded part surface image according to the injection molded part surface image; Based on the grayscale value change curve of each sub-abnormal region corresponding to each abnormal region in the pouring direction of the injection molded part and the standard curve corresponding to the grayscale value change curve, determine whether there is a bright area and a dark area in each sub-abnormal region; if so, calculate the center point of the bright area and the center point of the dark area in each sub-abnormal region; superimpose the center points in a direction perpendicular to the pouring direction of the injection molded part to obtain a center point image corresponding to each abnormal region; and based on the center point image, obtain the bright area stripes and the dark area stripes in each abnormal region in the direction perpendicular to the pouring direction of the injection molded part; According to the number of center points of the bright areas on each bright area stripe and the number of center points of the dark areas on each dark area stripe in a direction perpendicular to the pouring direction of the injection molded part, the continuity index of the bright area stripe and the continuity index of the dark area stripe in each abnormal area are obtained; Based on the width values of each bright area on each bright area stripe and the width values of each dark area on each dark area stripe, the width similarity index of the bright area stripes and the width similarity index of the dark area stripes in each abnormal area are obtained; based on the positions of the bright area stripes and the dark area stripes in each abnormal area, the periodicity index of each abnormal area is obtained; According to the continuity index, the similarity index and the periodicity index, determining whether each abnormal area corresponding to the surface image of the injection molded part is a tiger stripe area; The method for obtaining the grayscale value change curve of each sub-abnormal region corresponding to each abnormal region in the pouring direction of the injection molded part and the standard curve corresponding to the grayscale value change curve includes: Superimposing a plurality of grayscale value sequences corresponding to each abnormal sub-region in a direction perpendicular to the pouring direction of the injection molded part to obtain a superimposed grayscale value sequence of each abnormal sub-region, and connecting each grayscale value in the superimposed grayscale value sequence to obtain a grayscale value change curve of each abnormal sub-region corresponding to each abnormal region in the pouring direction of the injection molded part; The grayscale value change curve is evenly segmented, and the grayscale value mean corresponding to each segment in the grayscale value change curve is calculated; and a standard curve corresponding to the grayscale value change curve is obtained according to the grayscale value mean corresponding to each segment; The method for determining whether there are bright areas and dark areas in each abnormal sub-area includes: The standard curve corresponding to the gray value change curve is moved up and down with equal gray levels in a direction perpendicular to the pouring direction of the injection molded part to obtain an upper standard curve corresponding to each gray value change curve and a lower standard curve corresponding to the gray value change curve; Determine whether the upper standard curve and the lower standard curve divide the corresponding grayscale value change curve into three regions; if so, record the region above the upper standard curve as the bright region of the corresponding sub-abnormal region, and record the region below the lower standard curve as the dark region of the corresponding sub-abnormal region; The method for obtaining the continuity index of the bright area stripes and the continuity index of the dark area stripes in each abnormal area includes: Clustering each center point on the center point image using a mean shift clustering algorithm to obtain each center point category area corresponding to each center point image and a category center corresponding to each center point category area; Count the number of center points of the bright area and the number of center points of the dark area within the set area with the center of each category as the midpoint; According to the number of center points in the bright area and the number of center points in the dark area, the regional stripe category corresponding to each center point category area is determined. If it is a bright area stripe, the continuity index of the bright area stripe is obtained according to the number of center points in the corresponding set area and the number of center points in the bright area; if it is a dark area stripe, the continuity index of the dark area stripe is obtained according to the number of center points in the corresponding set area and the number of center points in the dark area.
2. The method for detecting tiger stripe defects of injection molded parts based on image processing according to claim 1, wherein: The method for obtaining each abnormal area corresponding to the surface image of the injection molded part includes: Obtaining, based on the surface image of the injection-molded part, connected domains on the surface of the injection-molded part that are larger than a preset area threshold; Performing block processing on each connected domain to obtain a sub-connected domain corresponding to each connected domain; performing permutation entropy calculation on each sub-connected domain to obtain an abnormal sub-connected domain in each connected domain; The abnormal sub-connected domains are spliced to obtain abnormal regions corresponding to the surface image of the injection molded part.
3. The method for detecting tiger stripe defects of injection molded parts based on image processing according to claim 1, wherein: The method for obtaining the width value of each bright area on each bright area stripe and the width value of each dark area on each dark area stripe includes: According to the bright area stripes and dark area stripes corresponding to each abnormal area, each bright area on each bright area stripe and each dark area on each dark area stripe are obtained; Obtain the longest line segment in each bright area that is parallel to the pouring direction of the injection molded part, and record the longest line segment as the width value of each bright area; obtain the longest line segment in each dark area that is parallel to the pouring direction of the injection molded part, and record the longest line segment as the width value of each dark area.
4. The method for detecting tiger stripe defects in injection molded parts based on image processing according to claim 1, wherein: The width similarity index of the corresponding bright area stripes in each abnormal area is calculated according to the following formula: Among them, W c is the width similarity index of the cth bright area stripe in any abnormal area, D is the number of bright areas on the cth bright area stripe, w d is the width of the dth bright area on the cth bright area stripe in the abnormal area, w d+1 is the width of the d+1th bright area on the cth bright area stripe in the abnormal area.
5. A tiger stripe defect detection system for injection molded parts based on image processing, comprising a memory and a processor, characterized in that: The processor executes the computer program stored in the memory to implement the method for detecting tiger stripe defects in injection molded parts based on image processing as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Fringe identification and information detection method used for visible light imaging locating
CN107169952A
Quality classification method and system for injection molding PC board with smooth surface
CN114155230A