CN115222732B - Injection molding process anomaly detection method based on big data analysis and color difference detection - Google Patents

Injection molding process anomaly detection method based on big data analysis and color difference detection Download PDF

Info

Publication number
CN115222732B
CN115222732B CN202211118443.1A CN202211118443A CN115222732B CN 115222732 B CN115222732 B CN 115222732B CN 202211118443 A CN202211118443 A CN 202211118443A CN 115222732 B CN115222732 B CN 115222732B
Authority
CN
China
Prior art keywords
color
injection molding
value
color difference
difference
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
CN202211118443.1A
Other languages
Chinese (zh)
Other versions
CN115222732A (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.)
Huimin County Yellow River Advanced Technology Research Institute
Original Assignee
Huimin County Yellow River Advanced Technology Research Institute
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 Huimin County Yellow River Advanced Technology Research Institute filed Critical Huimin County Yellow River Advanced Technology Research Institute
Priority to CN202211118443.1A priority Critical patent/CN115222732B/en
Publication of CN115222732A publication Critical patent/CN115222732A/en
Application granted granted Critical
Publication of CN115222732B publication Critical patent/CN115222732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

The invention relates to the technical field of image processing, in particular to an injection molding process abnormity detection method based on big data analysis and color difference detection, which comprises the steps of obtaining the category of attribute vectors of batch injection molding parts, establishing a mapping table of color difference generation reasons corresponding to each category of attribute vectors, calculating the color difference range value of the injection molding parts to be detected, obtaining the category of the attribute vectors of each injection molding part to be detected, obtaining an unknown region on the injection molding part to be detected, wherein the unknown region cannot be used for clearly judging whether color difference exists or not, so as to obtain the position coordinate of a light source in the unknown region, adjusting the orientation of the light source according to the position coordinate, re-obtaining the category of the current attribute vector of the injection molding part to be detected, and determining the color difference generation reason corresponding to each category of current attribute vector according to the mapping table.

Description

Injection molding process anomaly detection method based on big data analysis and color difference detection
Technical Field
The invention relates to the technical field of image processing, in particular to an injection molding process abnormity detection method based on big data analysis and color difference detection.
Background
In the production process flow of the injection molding part, an upper mold of a mold needs to be debugged first, color debugging machine product inspection is carried out after the debugging is finished, product inspection is finished for trial production, and during product inspection, the main inspection content is whether the appearance, the structure and the color of a product are poor.
The color of the product is poor mainly because the produced injection molding part has color difference, wherein the color difference means that the surface color and the glossiness of the injection molding part are changed, and the appearance and the quality of the injection molding part are influenced by the existence of the color difference, so that the production is influenced.
In the injection molding process, the reasons for generating the chromatic aberration mainly include material pollution, unreasonable setting of control parameters of the production process, defects of injection molding equipment, pollutants such as dust, oil stain and the like in the equipment, and chromatic aberration characteristics under the influence of different reasons are different, in the prior art, when the chromatic aberration of an injection molding part is detected, the injection molding part with obvious chromatic aberration can be easily observed from an acquired image, but some chromatic aberration is relatively weak and is not easy to identify, particularly, the chromatic aberration caused by the change of glossiness can be obviously detected only under a specific light source angle, so that when the detection is carried out by utilizing the traditional threshold segmentation technology or edge detection technology, a chromatic aberration area is difficult to segment due to the uneven illumination, the reason for the chromatic aberration cannot be quickly and accurately judged, the production efficiency is influenced, and therefore, an injection molding process abnormity detection method based on big data analysis and chromatic aberration detection is needed.
Disclosure of Invention
The invention provides an injection molding process abnormity detection method based on big data analysis and color difference detection, which is characterized in that the position coordinate of an unknown area to which a light source needs to be oriented is obtained according to an obtained color difference degree value, then the orientation of the light source is adjusted according to the position coordinate, then the category of the current attribute vector of each injection molding piece to which the light source is adjusted to face is obtained, and the reason for generating the color difference corresponding to the category of the current attribute vector is obtained according to a mapping table, so that the problems that the abnormal reason cannot be rapidly and accurately judged and the production efficiency is influenced when the existing manual color difference normal detection is carried out are solved.
The injection molding process abnormity detection method based on big data analysis and color difference detection adopts the following technical scheme: the method comprises the following steps:
s1, obtaining an image containing a plurality of injection-molded parts, and segmenting the image to obtain a plurality of color regions with different pixel values;
s2, obtaining the color difference characteristics of all color areas of each injection molding piece; acquiring a difference degree value of the color difference characteristics according to every two color difference characteristics, distributing an attribute vector to each injection molding according to all the difference degree values, and acquiring the category of the attribute vector of each injection molding according to the attribute vectors of all the injection molding;
s3, acquiring a color difference generation reason corresponding to each type of attribute vector according to the type of the attribute vector of each injection molding part, and establishing a mapping table of each type of attribute vector and the type reason corresponding to each type of attribute vector;
s4, repeating the steps S1 and S2, obtaining the category and a plurality of color areas to which the attribute vector of the injection molding piece to be tested under the current light source orientation belongs, obtaining the color deviation degree value of each color area of the injection molding piece to be tested, and setting the color area smaller than the preset threshold value of the color deviation degree value as a color difference-free area; acquiring a brightness map of an image of an injection molding part to be tested, performing low-pass filtering processing on the brightness map, acquiring a first gray value of each pixel point in a non-color difference area in the processed brightness map and a second gray value of each pixel point in the brightness map before processing, acquiring an illumination abnormal degree value corresponding to each pixel point on the brightness map according to the first gray value and the second gray value, and acquiring an illumination drift degree value of each color area of the injection molding part to be tested by using the illumination abnormal degree value; calculating the color difference degree value of each color area of the injection molding part to be tested according to the color deviation degree value and the illumination drift degree value;
s5, obtaining a plurality of color areas of which the color difference degree values of the injection molding part to be detected are located in two preset threshold value intervals and recording the color areas as unknown areas, obtaining the difference value between the average value of the two threshold values and the color difference degree value of each unknown area, and taking the square value of each difference value and the maximum membership value of the attribute vector of the corresponding category in each unknown area as weights, and carrying out weighted summation on the center point coordinate of each unknown area to obtain the position coordinate of the light source required to face;
s6, changing the orientation of the light source according to the position coordinates, repeating the steps from S1 to S3 to obtain the category of the current attribute vector of the injection molding piece to be tested after the orientation of the light source is changed, and obtaining the color difference generation reason corresponding to each category of current attribute vector according to the mapping table.
Preferably, the step of segmenting the image into a plurality of color regions of different pixel values comprises:
carrying out fuzzy processing on the acquired image;
and dividing the blurred image into a plurality of regions by using a superpixel segmentation algorithm, wherein the pixel values in each region are similar, and each region is a color region.
Preferably, the step of obtaining the color difference characteristic of all color regions of each injection molded part comprises:
obtaining an average pixel value of each color region of each injection molded part;
carrying out mean shift clustering on the average pixel values of all color areas of each injection molding part to obtain color characteristics of various color categories;
and the set of all the color characteristics is the color difference characteristics of the injection molding.
Preferably, the step of obtaining a difference degree value of the color difference features according to every two color difference features, allocating an attribute vector to each injection molding according to all the difference degree values, and obtaining the category to which the attribute vector of each injection molding belongs according to the attribute vectors of all the injection molding comprises:
taking each color difference characteristic as a node, and calculating the difference degree value of the two color difference characteristics according to the edge weight of the two nodes;
constructing a graph structure data according to all the difference degree values;
and distributing an attribute vector to each injection molding part by using a graph embedding algorithm according to the graph structure data, and clustering the attribute vectors of all injection molding parts to obtain the category of the attribute vector of each injection molding part.
Preferably, the step of obtaining the color deviation degree value of each color area of the injection molding part to be tested comprises the following steps:
acquiring the average pixel value of all pixel points in each color area;
the average pixel value of the preset chromatic aberration-free injection molding piece is a standard pixel value;
and calculating the Euclidean distance between the average pixel value of each color area and the standard pixel value, wherein the Euclidean distance is the color deviation degree value.
Preferably, the step of obtaining the first gray value of each pixel point in the processed brightness map without the color difference region includes:
acquiring coordinates of pixel points in a no-color-difference area in the processed brightness image and corresponding gray values;
fitting a two-dimensional Gaussian mixture model by using an EM (effective velocity) algorithm according to the pixel point coordinates and the corresponding gray value;
the gray value corresponding to each pixel point on the two-dimensional Gaussian mixture model is the first gray value when the pixel point has no color difference.
Preferably, the step of obtaining the illumination abnormal degree value corresponding to each pixel point on the luminance map according to the first gray value and the second gray value includes:
calculating the illumination anomaly degree value according to the following formula (1):
Figure DEST_PATH_IMAGE001
(1)
wherein, the first and the second end of the pipe are connected with each other,
Figure 937481DEST_PATH_IMAGE002
representing coordinates as𝑝The pixel point is at a first gray value in a non-color difference area of the filtered brightness map,
Figure DEST_PATH_IMAGE003
representing coordinates as
Figure 988351DEST_PATH_IMAGE004
And a second gray value of the pixel point on the brightness graph before filtering.
Preferably, the step of obtaining the illumination drift degree value of each color area of the injection molding piece to be tested by using the illumination abnormal degree value comprises the following steps:
and acquiring the mean value of the illumination abnormal degree values of all the pixel points in each color area according to the illumination abnormal degree values, wherein the mean value is the illumination drift degree value of each color area.
Preferably, the step of acquiring the position coordinates to which the light source needs to be oriented includes:
acquiring position coordinates of the light source required to face according to the following formula (2), wherein the position coordinates are P:
Figure DEST_PATH_IMAGE005
(2)
wherein the content of the first and second substances,
Figure 363969DEST_PATH_IMAGE006
representing a normalized coefficient; n represents the number of color areas with the color difference degree within two threshold values;
Figure DEST_PATH_IMAGE007
the mean of two thresholds representing the degree of difference;
Figure 470072DEST_PATH_IMAGE008
representing the maximum membership degree of the injection molding part where the ith color area is located in a certain type of attribute vector;
Figure DEST_PATH_IMAGE009
a value representing a degree of color difference of an ith color region,
Figure 693374DEST_PATH_IMAGE010
an attribute vector representing the injection molded part in which the ith color region is located,
Figure DEST_PATH_IMAGE011
represents the coordinates of the center point in the ith color area.
The invention has the beneficial effects that: the invention discloses an injection molding process anomaly detection method based on big data analysis and color difference detection, which comprises the steps of obtaining a color deviation degree value and an illumination drift degree value of a color area corresponding to each injection molding image, obtaining a color difference degree value according to the color deviation degree value and the illumination drift degree value, distributing attribute vectors to each injection molding, dividing the attribute vectors of all injection molding into categories, obtaining an area which cannot be clearly judged whether color difference exists by utilizing the color difference degree value, obtaining a position coordinate of a light source which needs to face to an unknown area, adjusting the orientation of the light source according to the position coordinate, obtaining the color area of the injection molding and the category of the current attribute vector of the injection molding again, determining a color difference generation reason corresponding to each category of current attribute vectors according to a mapping table which is established in advance for each category of attribute vectors and corresponding color difference generation reasons, ensuring that the light source is faced to the area which cannot be determined each time when the direction of the light source is changed by purposefully changing the direction of the light source, determining an area which generates a big probability, ensuring that the position which generates the color difference and the cause of injection molding can be accurately obtained after the light source is changed, and improving the accuracy of the color difference of the abnormal detection of the process.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of the general steps of an embodiment of a method for injection molding process anomaly detection based on big data analysis and color difference detection in accordance with the present invention;
FIG. 2 is a flowchart of the method of FIG. 1 for obtaining the attribute vector and the class to which the attribute vector belongs.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the injection molding process anomaly detection method based on big data analysis and color difference detection of the present invention is shown in fig. 1, and the method comprises:
s1, collecting an image of an injection molding part, and segmenting the image to obtain a plurality of color regions with different pixel values: specifically, a batch of produced injection molding parts are placed on a platform together to form an array, the array is placed in a detection device, the detection device comprises a light source, the light source can move and change the position on a circular track, the track is circular by a camera, the plane of the track is parallel to the surface of the platform, injection molding parts with obvious chromatic aberration can be easily observed from a collected image, but some chromatic aberration is relatively weak and is not easy to identify, especially the chromatic aberration caused by the change of glossiness can be obviously observed under a specific light source angle, so that only a single light source is used for lighting, and the chromatic aberration area can be accurately estimated as far as possible according to the distribution of the color of the injection molding parts under simple illumination; if the light sources are too many, the illumination distribution is complex, on one hand, the color difference areas are not easy to distinguish, on the other hand, the color difference distribution is not good, the light sources are not estimated to overlook at a certain downward depression angle and irradiate on the injection molding part, and then the RGB images of the injection molding part are acquired downwards through overlooking of the camera; specifically, before the image is segmented to obtain a plurality of color regions, the acquired RGB image is input into a semantic segmentation network to obtain the semantic regions of the injection molding parts, the connected domain of each injection molding part is obtained through connected domain segmentation, so that a single injection molding part is extracted from a plurality of injection molding parts, and then the RGB image is segmented to obtain the plurality of color regions.
Specifically, the step of segmenting the image into a plurality of color regions in S1 includes: s11, blurring the acquired image: specifically, a 3 × 3 gaussian kernel is used to blur the RGB image to remove high-frequency noise in the image, and then, the blurred image is divided into a plurality of regions by using an SLIC superpixel segmentation algorithm, where pixel values in each region are similar, and the regions are color regions.
S2, obtaining the color difference characteristics of all color areas of each injection molding piece; and acquiring a difference degree value of the color difference characteristics according to every two color difference characteristics, allocating an attribute vector to each injection molding according to all the difference degree values, and acquiring the category of the attribute vector of each injection molding according to the attribute vectors of all the injection molding.
Since there are multiple color regions on the injection-molded part, some color regions may be the same color, the color regions belonging to the same color are merged or classified into a category, specifically, as shown in fig. 2, the step of obtaining the color difference characteristics of all color regions of each injection-molded part includes: s21, obtaining an average pixel value of each color area in all color areas of each injection molding; s22, performing mean shift clustering on average pixel values in all color regions of each injection molding part, wherein clustering results show color characteristics of a plurality of color categories, and assuming that K color categories are obtained, namely dividing all color regions on all injection molding parts into K color categories, wherein each color category represents one color, different color categories represent different colors, and each color category comprises one or more color regions; s23, all color areas of each color category are obtained first, the average value of the average pixel values of all the color areas of each color category is the color feature of the color category, and the set of the color features of all the color categories is the color difference feature of the injection molding part.
Specifically, the steps of acquiring a difference degree value of the color difference features according to every two color difference features, allocating an attribute vector to each injection molding part according to all the difference degree values, and acquiring the category of the attribute vector of each injection molding part according to the attribute vectors of all the injection molding parts comprise: s24, taking each color difference characteristic as a node, calculating the difference degree value of the two color difference characteristics according to the edge weight values of the two nodes, specifically, assuming that any two color difference characteristics are respectively
Figure 665878DEST_PATH_IMAGE012
Figure DEST_PATH_IMAGE013
Features of chromatic aberration
Figure 417540DEST_PATH_IMAGE012
Figure 359957DEST_PATH_IMAGE013
Is a collection of some color features, then
Figure 47552DEST_PATH_IMAGE012
Figure 925378DEST_PATH_IMAGE013
The difference degree value of (A) is as follows:
Figure 757812DEST_PATH_IMAGE014
wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE015
representing characteristics of chromatic aberration
Figure 926756DEST_PATH_IMAGE016
The a-th color feature of (1);
Figure DEST_PATH_IMAGE017
representing characteristics of chromatic aberration
Figure 498552DEST_PATH_IMAGE018
The b-th color feature of (1);
Figure DEST_PATH_IMAGE019
Figure 314323DEST_PATH_IMAGE020
to represent
Figure 932255DEST_PATH_IMAGE016
Figure 701628DEST_PATH_IMAGE018
The number of medium color features;
Figure DEST_PATH_IMAGE021
to represent
Figure 892045DEST_PATH_IMAGE015
And
Figure 721460DEST_PATH_IMAGE017
l2 norm of (d);
Figure 577421DEST_PATH_IMAGE022
the larger the difference in color characteristics between the two color difference characteristics.
And S25, constructing graph structure data according to all the difference degree values.
S26, distributing an attribute vector to each injection molding part by using a graph embedding algorithm according to graph structure data, specifically, firstly selecting 1 Node, artificially distributing an M-dimensional 0 vector to the Node, wherein the vector is the attribute vector of the Node, artificially distributing different M other nodes, artificially distributing an M-dimensional attribute vector to the M nodes respectively, ensuring that the Euclidean distance of the attribute vectors of any two nodes in the M +1 nodes is equal to the difference degree value of the two nodes, calling the M +1 nodes as fixed nodes which correspond to M known M-dimensional attribute vectors, keeping the attribute vectors of the fixed nodes unchanged, distributing an M-dimensional attribute vector to each other Node (namely, a chromatic aberration characteristic) by using the graph embedding algorithm according to the graph structure data, such as a Node2vec algorithm, distributing an attribute vector to each chromatic aberration characteristic, and storing the attribute vector of each injection molding part into a large data system because one part corresponds to one chromatic aberration characteristic; clustering the attribute vectors of all injection molding parts to obtain the category of each injection molding part to which the attribute vector belongs, specifically: and performing mean shift clustering on the attribute vectors of all injection molding parts to obtain a plurality of attribute vectors of different categories, namely the attribute vector of each category corresponds to a set of some injection molding parts, namely the injection molding parts in the same attribute vector category form a set of injection molding parts.
S3, according to the category of the attribute vector of each injection molding piece, obtaining the color difference generation reason corresponding to each type of attribute vector, and establishing a mapping table of each type of attribute vector and the corresponding color difference generation reason.
Specifically, the method for constructing the mapping table comprises the following steps: the method comprises the steps of distributing an attribute vector to each injection molding part through color difference characteristics in a big data system, clustering all injection molding parts according to the attribute vectors to obtain injection molding part sets of multiple categories, enabling professionals to diagnose injection molding process and overhaul equipment to determine the reason of the color difference of the injection molding parts in each category of injection molding part set when a batch of injection molding parts are produced, further determining the reason of the color difference of the injection molding parts in each category of injection molding part sets, recording the reason of the color difference and the mean value of all attribute vectors in the attribute vector category where the injection molding parts are located, and constructing a mapping table of the mean value of all attribute vectors in each attribute vector category and the reason of the color difference.
S4, repeating the steps S1 and S2, obtaining the category and a plurality of color areas to which the attribute vector of the injection molding piece to be tested under the current light source orientation belongs, obtaining the color deviation degree value of each color area of the injection molding piece to be tested, and setting the color area smaller than the preset threshold value of the color deviation degree value as a color difference-free area; acquiring a brightness map of an image of an injection molding part to be tested, performing low-pass filtering processing on the brightness map, acquiring a first gray value of each pixel point in a non-color difference area in the processed brightness map and a second gray value of each pixel point in the brightness map before processing, acquiring an illumination abnormal degree value corresponding to each pixel point on the brightness map according to the first gray value and the second gray value, and acquiring an illumination drift degree value of each color area of the injection molding part to be tested by using the illumination abnormal degree value; and calculating the color difference degree value of each color area of the injection molding part to be tested according to the color deviation degree value and the illumination drift degree value, wherein the product of the color deviation degree value and the illumination drift degree value is the color difference degree value of each color area of the injection molding part to be tested.
Specifically, a color deviation degree value of each color area of the injection molding part to be tested is obtained, the color area with a preset threshold value smaller than the color deviation degree value is set as a color difference-free area, specifically, most of the injection molding part is considered to have no color difference, and based on the color deviation degree value, the color areas with the color deviation degree value smaller than the preset threshold value are obtained first, so that the total area of the color areas is larger than 0.5 time of the image area, and the color areas smaller than the threshold value are called as initial color difference-free areas; because the pixel value of each pixel point is a three-dimensional vector, and the three dimensions correspond to three RGB channels, the average pixel value of each color region is also a three-dimensional vector, and therefore, the average value of the pixel values of all the pixel points in each color region is obtained first, and the average value is the average pixel value of all the pixel points in each color region; manually acquiring an average pixel value of the non-chromatic-aberration injection molding part in advance, wherein the average pixel value is called a standard pixel value; and then, calculating the Euclidean distance between the average pixel value of each color area and the standard average pixel value, wherein the Euclidean distance is the color deviation degree value, and the greater the color deviation degree value is, the greater the possibility of color difference existing in the color area is.
Specifically, a brightness graph of the image is obtained, low-pass filtering processing is carried out on the brightness graph, a first gray value of each pixel point in a non-color difference area in the processed brightness graph and a second gray value of each pixel point in the brightness graph before processing are obtained, an illumination abnormal degree value corresponding to each pixel point on the brightness graph is obtained according to the first gray value and the second gray value, and an illumination drift degree value of each color area of the injection molding part to be tested is obtained by utilizing the illumination abnormal degree value.
The method comprises the following steps of obtaining a brightness image of an image, carrying out low-pass filtering processing on the brightness image, and obtaining a first gray value of each pixel point of a non-color difference area in the processed brightness image, wherein the step of obtaining the first gray value comprises the following steps: converting an image of the injection molding part from an RGB color space to an HSV color space, and obtaining a brightness map of the image in the HSV color space; normalizing the gray value of each pixel value in the brightness graph to [0,1], and performing low-pass filtering on the brightness graph by using a 13 multiplied by 13 Gaussian convolution kernel to obtain a filtering result which can be regarded as illumination distribution on the surface of an injection molding part; acquiring coordinates of pixel points in a color difference-free area in the brightness image after the low-pass filtering processing and corresponding gray values; fitting a two-dimensional Gaussian mixture model by using an EM algorithm according to the pixel point coordinates and the corresponding gray value, wherein the injection molding part is illuminated by a single light source, so that the illumination distribution is not complex, and the Gaussian mixture model can accurately represent the illumination value distribution, namely the illumination value of the surface of each injection molding part is the corresponding gray value of each pixel point on the two-dimensional Gaussian mixture model; meanwhile, the gray value corresponding to each pixel point on the two-dimensional Gaussian mixture model is the first gray value when the pixel point has no color difference.
Specifically, the step of obtaining the illumination abnormal degree value corresponding to each pixel point on the luminance graph according to the first gray value and the second gray value includes: calculating the illumination anomaly degree value according to the following formula (1):
Figure 665332DEST_PATH_IMAGE001
(1)
wherein the content of the first and second substances,
Figure 759190DEST_PATH_IMAGE002
representing coordinates as𝑝The pixel point is at a first gray value in a no-color-difference region of the filtered luminance map,
Figure 25086DEST_PATH_IMAGE003
representing coordinates as
Figure 368342DEST_PATH_IMAGE004
And the second gray value of the pixel point on the brightness graph before filtering.
Specifically, the mean value of the illumination abnormal degree values of all the pixel points in each color region is obtained according to the illumination abnormal degree values, the mean value is the illumination drift degree value of each color region, the color drift degree value obtained in the step S2 is multiplied by the illumination drift degree value obtained in the step S3, and the product of the color drift degree value and the illumination drift degree value is the color difference degree value of each color region.
S5, according to each color area and a color difference degree value of injection molding to be detected, obtaining a plurality of color areas with the color difference degree values in two preset threshold intervals and marking the color areas as unknown areas, obtaining a difference value between an average value of the two thresholds and the color difference degree value of each unknown area, taking a square value of each difference value and a maximum membership value of an attribute vector of a corresponding category in each unknown area as weights, and carrying out weighted summation on coordinates of a center point of each unknown area to obtain position coordinates towards which a light source needs to face.
Specifically, the step of acquiring the position coordinates to which the light source needs to be oriented in S5 includes:
acquiring position coordinates to which the light source needs to be oriented according to the following formula (2), wherein the position coordinates are P:
Figure DEST_PATH_IMAGE023
(2)
wherein, the first and the second end of the pipe are connected with each other,
Figure 964671DEST_PATH_IMAGE006
representing a normalized coefficient; n represents the number of color areas with the color difference degree within two threshold values;
Figure 444194DEST_PATH_IMAGE007
the mean of two thresholds representing the degree of difference;
Figure 864680DEST_PATH_IMAGE008
representing the maximum membership degree of the injection molding part where the ith color area is located in a certain type of attribute vector;
Figure 429653DEST_PATH_IMAGE009
a value representing a degree of color difference of an ith color region,
Figure 610099DEST_PATH_IMAGE010
an attribute vector representing the injection molded part in which the ith color region is located,
Figure 944128DEST_PATH_IMAGE011
represents the coordinates of the center point in the ith color area,
Figure 57488DEST_PATH_IMAGE024
indicating the difference between th and the degree of color difference of the i-th color region,
Figure 109758DEST_PATH_IMAGE024
the smaller the size, the less obvious or uncertain whether the color difference of the ith color region is a color difference-free region
Figure DEST_PATH_IMAGE025
The larger the size, the more the light source needs to be directed to the area.
Calculated according to the following formula (3)
Figure 297157DEST_PATH_IMAGE008
Figure 734960DEST_PATH_IMAGE026
(3)
Wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE027
Figure 982402DEST_PATH_IMAGE028
represent
Figure DEST_PATH_IMAGE029
The L2 norm of (c), assuming there are a set of B classes of injection molded parts
Figure 475962DEST_PATH_IMAGE030
Represents the mean of all attribute vectors of the B-th class set in the B-class set,
Figure 654003DEST_PATH_IMAGE028
temporary attribute vector representing injection molding part where ith color region is located
Figure 962624DEST_PATH_IMAGE010
The euclidean distance to the center of the attribute vector for the set of the b-th category,
Figure 912126DEST_PATH_IMAGE028
the smaller the distance between the two is, the closer the two are,
Figure DEST_PATH_IMAGE031
the larger the injection molding part in which the ith color region is located is, the more likely the injection molding part belongs to the property vector set of the b-th category (namely the injection molding part set of the b-th category), and therefore
Figure 749107DEST_PATH_IMAGE031
The injection molding part in which the ith color region is located is the degree of membership in the b-th class of injection molding part set.
Wherein the content of the first and second substances,
Figure 91358DEST_PATH_IMAGE008
to represent
Figure 736710DEST_PATH_IMAGE032
Represents the maximum degree of membership of the injection molding in which the ith color zone is located in the B classes.
S6, changing the orientation of the light source according to the position coordinates, repeating the steps S1 to S3 to obtain the type of the current attribute vector of the injection molding piece to be tested after the orientation of the light source is changed, and obtaining the color difference generation reason corresponding to each type of current attribute vector according to the mapping table.
Therefore, the reason for generating the chromatic aberration is obtained once when a batch of injection molding parts are produced, then the category of the attribute vector of each current injection molding part is stored into a big data system, the method is continuously repeated after the next batch of injection molding parts are produced, and the mapping table is updated once after W (W = 1000) batch of injection molding parts are detected.
In summary, the invention provides an injection molding process anomaly detection method based on big data analysis and color difference detection, which includes obtaining a color deviation degree value and an illumination drift degree value of a color area corresponding to each injection molding image, obtaining a color difference degree value according to the color deviation degree value and the illumination drift degree value, simultaneously distributing an attribute vector to each injection molding, dividing the attribute vectors of all injection molding into categories, obtaining an area which cannot be clearly judged whether color difference exists by using the color difference degree value, obtaining a position coordinate of a light source which needs to face an unknown area, adjusting the orientation of the light source according to the position coordinate, obtaining the color area of the injection molding and the category of the current attribute vector of the injection molding again, determining a color difference generation reason corresponding to each category of current attribute vectors according to a mapping table which is established in advance for each category of attribute vectors and corresponding color difference generation reasons, ensuring that the area which cannot be determined color difference is faced each time when the direction of the light source is changed by purposefully changing the direction of the light source, further determining a large probability generation area, and ensuring that injection molding process anomaly detection can be achieved by accurately obtaining the position which can generate color difference when the light source is changed as little as possible and improving the color difference detection accuracy of the process anomaly detection.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.

Claims (7)

1. An injection molding process abnormity detection method based on big data analysis and color difference detection is characterized by comprising the following steps:
s1, obtaining an image containing a plurality of injection-molded parts, and segmenting the image to obtain a plurality of color regions with different pixel values;
s2, obtaining the color difference characteristics of all color areas of each injection molding piece; acquiring a difference degree value of the color difference characteristics according to every two color difference characteristics, distributing an attribute vector to each injection molding according to all the difference degree values, and acquiring the category of the attribute vector of each injection molding according to the attribute vectors of all the injection molding;
s3, acquiring a color difference generation reason corresponding to each type of attribute vector according to the category of the attribute vector of each injection molding piece, and establishing a mapping table of each type of attribute vector and the corresponding color difference generation reason;
s4, repeating the steps S1 and S2, obtaining the category and a plurality of color areas to which the attribute vector of the injection molding piece to be tested under the current light source orientation belongs, obtaining the color deviation degree value of each color area of the injection molding piece to be tested, and setting the color area smaller than the preset threshold value of the color deviation degree value as a color difference-free area; acquiring a brightness map of an image of the injection molding part to be tested, performing low-pass filtering processing on the brightness map, acquiring a first gray value of each pixel point in a non-color difference area in the processed brightness map and a second gray value of each pixel point in the brightness map before processing, acquiring an illumination abnormal degree value corresponding to each pixel point on the brightness map according to the first gray value and the second gray value, and acquiring an illumination drift degree value of each color area of the injection molding part to be tested by using the illumination abnormal degree value; calculating the color difference degree value of each color area of the injection molding to be tested according to the color deviation degree value and the illumination drift degree value, and acquiring the color deviation degree value: acquiring the average pixel value of all pixel points in each color area; the average pixel value of the preset non-chromatic aberration injection molding piece is a standard pixel value; calculating the Euclidean distance between the average pixel value of each color area and the standard pixel value, wherein the Euclidean distance is the color deviation degree value; calculating the illumination abnormal degree value according to the following formula (1):
Figure DEST_PATH_IMAGE002
(1)
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE004
representing coordinates as𝑝The pixel point is at a first gray value in a no-color-difference region of the filtered luminance map,
Figure DEST_PATH_IMAGE006
representing coordinates as
Figure DEST_PATH_IMAGE008
A second gray value of the pixel point on the brightness graph before filtering;
s5, obtaining a plurality of color areas of which the color difference degree values of the injection molding part to be detected are located in two preset threshold value intervals and recording the color areas as unknown areas, obtaining the difference value between the average value of the two threshold values and the color difference degree value of each unknown area, and taking the square value of each difference value and the maximum membership value of the attribute vector of the corresponding category in each unknown area as weights, and carrying out weighted summation on the center point coordinate of each unknown area to obtain the position coordinate of the light source required to face;
s6, changing the orientation of the light source according to the position coordinates, repeating the steps from S1 to S3 to obtain the category of the current attribute vector of the injection molding piece to be tested after the orientation of the light source is changed, and obtaining the color difference generation reason corresponding to each category of current attribute vector according to the mapping table.
2. The injection molding process abnormality detection method based on big data analysis and color difference detection according to claim 1, wherein the step of segmenting the image to obtain a plurality of color regions of different pixel values includes:
carrying out fuzzy processing on the acquired image;
and dividing the blurred image into a plurality of regions by using a superpixel segmentation algorithm, wherein the pixel values in each region are similar, and each region is a color region.
3. The injection molding process anomaly detection method based on big data analysis and color difference detection according to claim 1, wherein the step of obtaining the color difference characteristics of all color regions of each injection molded part comprises:
obtaining an average pixel value of each color region of each injection molded part;
carrying out mean shift clustering on the average pixel values of all the color areas of each injection molding part to obtain color characteristics of multiple color categories;
and the set of all the color characteristics is the color difference characteristic of the injection molding.
4. The injection molding process abnormality detection method based on big data analysis and color difference detection according to claim 1, characterized in that the step of obtaining a difference degree value of color difference features according to every two color difference features, allocating an attribute vector to each injection molding according to all the difference degree values, and obtaining a category to which the attribute vector of each injection molding belongs according to the attribute vectors of all the injection molding comprises:
taking each color difference characteristic as a node, and calculating the difference degree value of the two color difference characteristics according to the edge weight of the two nodes;
constructing a graph structure data according to all the difference degree values;
and distributing an attribute vector to each injection molding part by using a graph embedding algorithm according to the graph structure data, and clustering the attribute vectors of all injection molding parts to obtain the category of the attribute vector of each injection molding part.
5. The injection molding process anomaly detection method based on big data analysis and color difference detection according to claim 1, wherein the step of obtaining the first gray value of each pixel point of the color difference-free area in the processed luminance graph comprises:
acquiring coordinates of pixel points in a no-color-difference area in the processed brightness image and corresponding gray values;
fitting a two-dimensional Gaussian mixture model by using an EM (effective velocity) algorithm according to the pixel point coordinates and the corresponding gray value;
the gray value corresponding to each pixel point on the two-dimensional Gaussian mixture model is the first gray value when the pixel point has no color difference.
6. The injection molding process anomaly detection method based on big data analysis and color difference detection according to claim 1, wherein the step of obtaining the illumination drift degree value of each color area of the injection molded part to be detected by using the illumination anomaly degree value comprises the following steps:
and acquiring the mean value of the illumination abnormal degree values of all the pixel points in each color area according to the illumination abnormal degree values, wherein the mean value is the illumination drift degree value of each color area.
7. The injection molding process abnormality detection method based on big data analysis and color difference detection according to claim 1, wherein the step of obtaining the position coordinates to which the light source needs to be directed includes:
acquiring position coordinates to which the light source needs to be oriented according to the following formula (2), wherein the position coordinates are P:
Figure DEST_PATH_IMAGE010
(2)
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE012
represents a normalized coefficient; n represents the number of color regions with the color difference degree within two threshold values;
Figure DEST_PATH_IMAGE014
the mean of two thresholds representing the degree of difference;
Figure DEST_PATH_IMAGE016
representing the maximum membership degree of the injection molding part where the ith color area is located in a certain type of attribute vector;
Figure DEST_PATH_IMAGE018
a value indicating a degree of color difference of the ith color area,
Figure DEST_PATH_IMAGE020
an attribute vector representing the injection molded part in which the ith color region is located,
Figure DEST_PATH_IMAGE022
representing the coordinates of the center point in the ith color region.
CN202211118443.1A 2022-09-15 2022-09-15 Injection molding process anomaly detection method based on big data analysis and color difference detection Active CN115222732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211118443.1A CN115222732B (en) 2022-09-15 2022-09-15 Injection molding process anomaly detection method based on big data analysis and color difference detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211118443.1A CN115222732B (en) 2022-09-15 2022-09-15 Injection molding process anomaly detection method based on big data analysis and color difference detection

Publications (2)

Publication Number Publication Date
CN115222732A CN115222732A (en) 2022-10-21
CN115222732B true CN115222732B (en) 2022-12-09

Family

ID=83617079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211118443.1A Active CN115222732B (en) 2022-09-15 2022-09-15 Injection molding process anomaly detection method based on big data analysis and color difference detection

Country Status (1)

Country Link
CN (1) CN115222732B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114905712A (en) * 2022-07-19 2022-08-16 南通三信塑胶装备科技股份有限公司 Injection molding machine control method based on computer vision

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127780B (en) * 2016-06-28 2019-01-18 华南理工大学 A kind of curved surface defect automatic testing method and its device
CN206848190U (en) * 2017-07-03 2018-01-05 北京大恒图像视觉有限公司 A kind of printed color device for detecting difference based on color sorter
KR20200067851A (en) * 2017-10-05 2020-06-12 바스프 코팅스 게엠베하 Method and system for determining multiple color quality indicators for color control of paint
CN114565614B (en) * 2022-05-02 2022-07-19 武汉华塑亿美工贸有限公司 Injection molding surface defect analysis method and system based on machine vision
CN114758185B (en) * 2022-06-16 2022-08-16 南通倍佳机械科技有限公司 Injection molding parameter control method and system based on gray level chromatic aberration
CN114842008B (en) * 2022-07-04 2022-10-21 南通三信塑胶装备科技股份有限公司 Injection molding part color difference detection method based on computer vision

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114905712A (en) * 2022-07-19 2022-08-16 南通三信塑胶装备科技股份有限公司 Injection molding machine control method based on computer vision

Also Published As

Publication number Publication date
CN115222732A (en) 2022-10-21

Similar Documents

Publication Publication Date Title
CN115082683B (en) Injection molding defect detection method based on image processing
CN111815601B (en) Texture image surface defect detection method based on depth convolution self-encoder
CN108562589B (en) Method for detecting surface defects of magnetic circuit material
CN108765373B (en) Insulator abnormity automatic detection method based on integrated classifier online learning
CN109596634B (en) Cable defect detection method and device, storage medium and processor
CN109658381B (en) Method for detecting copper surface defects of flexible IC packaging substrate based on super-pixels
CN116205919B (en) Hardware part production quality detection method and system based on artificial intelligence
CN109829914A (en) The method and apparatus of testing product defect
CN109523529B (en) Power transmission line defect identification method based on SURF algorithm
CN108181316B (en) Bamboo strip defect detection method based on machine vision
CN114757900A (en) Artificial intelligence-based textile defect type identification method
CN103543394A (en) Discharge ultraviolet imaging quantization parameter extraction method of high-voltage electric equipment
CN113724231A (en) Industrial defect detection method based on semantic segmentation and target detection fusion model
CN113221881B (en) Multi-level smart phone screen defect detection method
CN110415296B (en) Method for positioning rectangular electric device under shadow illumination
CN111476758A (en) Defect detection method and device for AMO L ED display screen, computer equipment and storage medium
CN113591948A (en) Defect pattern recognition method and device, electronic equipment and storage medium
CN115272350A (en) Method for detecting production quality of computer PCB mainboard
CN114820625A (en) Automobile top block defect detection method
CN112381751A (en) Online intelligent detection system and method based on image processing algorithm
CN114155226A (en) Micro defect edge calculation method
JP2005537578A (en) Paper characterization
CN110717910B (en) CT image target detection method based on convolutional neural network and CT scanner
CN115222732B (en) Injection molding process anomaly detection method based on big data analysis and color difference detection
CN114202544B (en) Complex workpiece defect detection method based on self-encoder

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