Beacon detection method and device for high-pressure formed diaphragm, electronic equipment and storage medium
By acquiring diaphragm feature images and combining image recognition technology to identify beacon areas, the problem of low detection efficiency and accuracy of high-pressure molded diaphragm beacons is solved, automatic detection is realized, and consistency and stability of diaphragm molding quality are improved. .
Patent Information
- Application Number
- CN202411120547.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-15
AI Technical Summary
In the prior art, the beacon detection efficiency and accuracy of high-pressure molded diaphragms are low, relying on manual detection, and have low efficiency and insufficient accuracy.
By acquiring multiple feature images on the diaphragm, using an image recognition model to identify the beacon area, determine the beacon position and size, and combining denoising, enhanced contrast and filtered edge detection methods, identify and correct the image, and then calculate the average position of the beacon and size to determine whether the beacon is qualified.
It improves the efficiency and accuracy of beacon detection, realizes automatic detection, reduces manual intervention, and improves the consistency and stability of diaphragm molding quality.
Smart Images

Figure CN118968005A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of molded diaphragms, and in particular to a beacon detection method, device, electronic equipment and computer-readable storage medium for high-pressure molded diaphragms. Background Art
[0002] High pressure molded diaphragm is an important component used in electronic products, automotive parts and other fields. In the manufacturing process of high pressure molded diaphragm, the position of the beacon is an important parameter to ensure the quality and performance of the diaphragm after molding. The process of placing a flat film in a high pressure mold for molding, that is, the film is stretched into a 3D shape through high pressure and vacuum. The upper mold plate can be molded without contacting the diaphragm, and the molded structure is 3D solid.
[0003] In the related art, during the high-pressure forming process of the diaphragm, the beacon of the diaphragm forming is manually inspected to determine whether the beacon of the formed diaphragm is qualified, but the efficiency and accuracy of manual inspection are low.
[0004] In view of this, how to provide a beacon detection method, device, electronic device and computer-readable storage medium for a molded membrane with high detection efficiency and high accuracy has become a problem that needs to be solved by those skilled in the art. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a beacon detection method, device, electronic device and computer-readable storage medium for a high-pressure molded diaphragm, which can improve the efficiency and accuracy of beacon detection of the diaphragm during use.
[0006] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0007] In one aspect, the present invention provides a beacon detection method for a high pressure molded diaphragm, comprising:
[0008] Acquire a plurality of characteristic images corresponding to the beacons on the product film;
[0009] Performing beacon area recognition on each of the characteristic images to determine the beacon area corresponding to each of the characteristic images;
[0010] Determine the beacon position and beacon size of the corresponding feature image according to the beacon area corresponding to each of the feature images;
[0011] The beacon detection result of the beacon on the product film is determined according to the beacon position and beacon size of each of the characteristic images.
[0012] In an exemplary embodiment, the performing beacon area recognition on each of the feature images to determine the beacon area corresponding to each of the feature images includes:
[0013] Using a pre-established image recognition model to recognize each of the characteristic images, and determining a normal characteristic image, a deformed characteristic image, and a high-reflection characteristic image;
[0014] Correcting the deformed characteristic image to obtain a corrected characteristic image;
[0015] Performing high reflection removal processing on the high reflection characteristic image to obtain a high reflection removal characteristic image;
[0016] The normal characteristic image, the corrected characteristic image and the high-reflection-removed characteristic image are respectively identified to determine the beacon area corresponding to the corresponding characteristic image.
[0017] In an exemplary embodiment, the identifying the normal feature image, the corrected feature image, and the high-reflection-removed feature image respectively, and determining the beacon area corresponding to the corresponding feature image, includes:
[0018] A pre-established diaphragm beacon area recognition model is used to perform beacon area recognition on the normal feature image, the corrected feature image and the de-high-reflection feature image respectively, and the beacon area corresponding to the corresponding feature image is determined; wherein the diaphragm beacon area recognition model is pre-trained based on multiple historical standard feature images corresponding to the beacon of the diaphragm.
[0019] In an exemplary embodiment, the identifying the normal feature image, the corrected feature image, and the high-reflection-removed feature image respectively, and determining the beacon area corresponding to the corresponding feature image, includes:
[0020] Performing edge detection on the normal feature image using a filtering edge detection method to obtain a beacon contour of the normal feature image;
[0021] Obtaining a beacon area of the normal feature image according to the beacon contour of the normal feature image;
[0022] Performing edge detection on the correction feature image using the filtering edge detection method to obtain a beacon outline of the correction feature image;
[0023] Obtaining a beacon region of the correction feature image according to the beacon contour of the correction image;
[0024] A pre-established diaphragm beacon area recognition model is used to perform beacon area recognition on the high-reflection-removed feature image to determine the beacon area of the high-reflection-removed feature image; wherein the diaphragm beacon area recognition model is pre-trained based on multiple historical standard feature images corresponding to the beacons of the diaphragm.
[0025] In an exemplary embodiment, determining the beacon position and beacon size of the corresponding feature image according to the beacon area corresponding to each of the feature images includes:
[0026] For each beacon region corresponding to each of the characteristic images, graying the beacon region of the characteristic image to obtain a binary image of the beacon region;
[0027] Extracting the overall beacon image from the beacon region binary image;
[0028] Segmenting the overall beacon image to obtain a plurality of image blocks;
[0029] The beacon position and beacon size of the feature image are determined according to the position coordinates of each pixel in each of the image blocks.
[0030] In an exemplary embodiment, determining the beacon detection result of the beacon on the product film according to the beacon position and beacon size of each of the characteristic images includes:
[0031] Averaging the beacon positions of each of the feature images to obtain an average beacon position of the beacon;
[0032] Averaging the beacon sizes of each of the feature images to obtain an average beacon size of the beacons;
[0033] When the average beacon position is within the preset position range and the average beacon size is within the preset size range, it is determined that the beacon on the product film is qualified.
[0034] In an exemplary embodiment, it also includes:
[0035] Defect recognition is performed on the film image of the product film to determine defect information of the product film.
[0036] Another aspect of the present invention provides a beacon detection device for a high pressure molded diaphragm, comprising:
[0037] An acquisition module, used to acquire multiple characteristic images corresponding to the beacons on the product film;
[0038] An identification module, used to identify the beacon area for each of the characteristic images, and determine the beacon area corresponding to each of the characteristic images;
[0039] A first determination module, configured to determine a beacon position and a beacon size corresponding to each of the characteristic images according to a beacon area corresponding to each of the characteristic images;
[0040] The second determination module is used to determine the beacon detection result of the beacon on the product film according to the beacon position and beacon size of each of the characteristic images.
[0041] Another aspect of the present invention provides an electronic device, comprising:
[0042] Memory for storing computer programs;
[0043] A processor is used to implement the steps of the beacon detection method for the high pressure molded diaphragm as described above when executing the computer program.
[0044] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the beacon detection method for the high pressure molded diaphragm as described above are implemented.
[0045] It can be seen from the above technical solutions that the beneficial effects of the embodiments of the present invention are:
[0046] A beacon detection method for a high-pressure formed diaphragm is provided in an embodiment of the present invention, comprising: acquiring multiple feature images corresponding to beacons on a product diaphragm; performing beacon area identification on each feature image to determine the beacon area corresponding to each feature image; determining the beacon position and beacon size of the corresponding feature image based on the beacon area corresponding to each feature image; and determining the beacon detection result of the beacon on the product diaphragm based on the beacon position and beacon size of each feature image.
[0047] It can be seen that in the embodiment of the present invention, for the beacon of the product diaphragm, multiple characteristic images corresponding to the beacon can be obtained, and the beacon area of each characteristic image can be identified. The beacon position and beacon size of each characteristic image are determined according to the beacon area, and then the beacon position and beacon size of each characteristic image are combined to further determine the beacon detection result of the beacon on the product diaphragm; the present invention can improve the efficiency and accuracy of beacon detection of diaphragms.
[0048] In addition, the present invention also provides corresponding implementation devices, electronic devices and computer-readable storage media for the beacon detection method of high-pressure molded diaphragms, further making the method more practical, and the devices, electronic devices and computer-readable storage media have corresponding advantages.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. 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 creative work.
[0051] Figure 1 A schematic flow chart of a beacon detection method for a high pressure molded diaphragm provided by an embodiment of the present invention;
[0052] Figure 2 A diaphragm image provided by an embodiment of the present invention;
[0053] Figure 3 A beacon region binarization image provided by an embodiment of the present invention;
[0054] Figure 4 An overall beacon diagram provided for an embodiment of the present invention;
[0055] Figure 5 A curve diagram of the size change of a diaphragm at different positions before and after high pressure provided by an embodiment of the present invention;
[0056] Figure 6 A schematic structural diagram of a beacon detection device for a high pressure molded diaphragm provided by an embodiment of the present invention;
[0057] Figure 7 A schematic structural diagram of a diaphragm high pressure forming device provided by an embodiment of the present invention;
[0058] Figure 8 For Figure 7 Side view;
[0059] Fig. 9 For Figure 7 Top view diagram;
[0060] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0061] Fig.11 A schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The embodiments of the present invention provide a beacon detection method, device, electronic device and computer-readable storage medium for a high-pressure molded diaphragm, which can improve the efficiency and accuracy of beacon detection of the diaphragm during use.
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] Please refer to Figure 1 , Figure 1 A schematic flow chart of a beacon detection method for a high pressure molded diaphragm provided by an embodiment of the present invention. The beacon detection method for a high pressure molded diaphragm comprises:
[0065] S110: Acquire multiple characteristic images corresponding to the beacons on the product film;
[0066] It should be noted that for different products, a membrane image can be obtained for each membrane of the product, and there may be multiple beacons in the membrane (such as Figure 2 As shown in the figure, a diaphragm image includes multiple beacons), so for each beacon, multiple feature images corresponding to the beacon can be obtained.
[0067] In practical applications, the images of the product membrane under various types of light sources can be obtained. Specifically, the coaxial light source can be used to highlight the defects such as bubbles and cracks on the membrane surface and the contour features of the beacon area to avoid reflections; the positioning mark features of the membrane and mold, white spots, wrinkles and other defect features can be obtained through double-sided large-surface light; the internal features of the beacon and other light-transmitting features can be obtained through the backlight source.
[0068] After obtaining each film image of the product film, for each film image, a characteristic image corresponding to each beacon in the film is acquired, thereby obtaining a plurality of characteristic images corresponding to each beacon on the product film.
[0069] It can be understood that the size of the corresponding standard beacon template image can be determined in advance for each beacon, and the size of the standard beacon target image can be recorded as w, h. In the embodiment of the present invention, a membrane is taken as an example for explanation, and each sub-image area in the membrane image (the size of the sub-image area is greater than w*h) can be determined, and one sub-image area corresponds to one beacon. For each sub-image area, the left side of the upper left corner of the sub-image area (x, y) can be calculated, and the sub-image area is cropped using a standard beacon target image that matches the beacon corresponding to the sub-image area. The standard beacon target image is moved once at a preset interval, so that after each movement, a sub-image corresponding to the standard beacon target image is cropped from the sub-image area. The size of the cropped sub-image is consistent with the size of the standard beacon target image, so that multiple sub-images can be obtained by cropping, and then the similarity between each sub-image and the standard beacon target image is calculated, and the sub-image with the highest similarity is found from each sub-image, and the center coordinates (x_max, y_max) of the sub-image and the width w and height h of the sub-image are recorded, so that a characteristic image of a beacon is determined from the membrane image. The above method is used for each membrane image, and multiple characteristic images corresponding to the beacon can be obtained. Of course, each beacon can use the above method to obtain multiple characteristic images corresponding to the beacon.
[0070] S120: performing beacon region recognition on each feature image to determine the beacon region corresponding to each feature image;
[0071] It should be noted that after each characteristic image of the beacon of the product membrane is obtained, the beacon area of the characteristic image can be determined by identifying each characteristic image. In practical applications, each characteristic image can be pre-processed by denoising, enhancing contrast, etc., and then the beacon area of the pre-processed characteristic image can be identified to improve the recognition accuracy.
[0072] In practical applications, this can be achieved in the following ways:
[0073] Using a pre-established image recognition model to recognize each feature image, determine the normal feature image, the deformed feature image and the high-reflection feature image;
[0074] Correcting the deformed characteristic image to obtain a corrected characteristic image;
[0075] Performing high-reflection removal processing on the high-reflection feature image to obtain a high-reflection removal feature image;
[0076] The normal characteristic image, the corrected characteristic image and the high-reflection-removed characteristic image are identified respectively, and the beacon area corresponding to the corresponding characteristic image is determined.
[0077] It should be noted that in the embodiment of the present invention, multiple normal sample feature images, multiple deformed sample feature images and multiple high-reflection sample feature images can be pre-acquired, each feature image is added with a corresponding type label, and then the decision tree classification model is trained using each sample image to obtain an image recognition model.
[0078] In the embodiment of the present invention, each feature image corresponding to the beacon of the product film can be pre-processed by denoising, contrast enhancement, etc., and then the pre-processed feature images can be classified and identified using the trained image recognition model. Each feature image can be classified according to normal, deformed, and high-reflection, and each normal feature image, each deformed feature image, and each high-reflection feature image can be determined. For each deformed feature image, a standard feature image corresponding to the beacon can be obtained, and then the relationship between the standard feature image and the deformed feature image can be used to determine the correction coefficient, and the stretching amount and / or offset angle can be determined based on the standard feature image and the deformed feature image, so as to determine the correction coefficient, and the deformed feature image can be calibrated using the correction coefficient to obtain the corrected feature image.
[0079] For each high-reflection feature image, the high-reflection feature image can be de-reflected to obtain a de-reflected feature image. In practical applications, a pre-established de-reflection model can be used to de-reflect the high-reflection feature image, wherein the training process of the de-reflection model can be:
[0080] Various possible reflective images and normal images are collected in advance, and some normal images are used to synthesize reflective state images to obtain corresponding reflective images, thereby increasing the sample size of reflective images; for each reflective image, the features of the reflective image are obtained; then a recurrent network is trained according to each reflective image and the corresponding features, and the reflection removal effect is gradually improved, thereby obtaining a de-reflection model.
[0081] Specifically, after obtaining the corrected feature image and the high reflection removed feature image, the normal feature image, the corrected feature image and the high reflection removed feature image are further identified respectively to determine the beacon area corresponding to the corresponding feature image.
[0082] Further, in one embodiment, the process of respectively identifying the normal characteristic image, the corrected characteristic image and the high-reflection-free characteristic image and determining the beacon area corresponding to the corresponding characteristic image may include:
[0083] A pre-established diaphragm beacon area recognition model is used to perform beacon area recognition on the normal feature image, the corrected feature image and the de-high-reflection feature image, respectively, to determine the beacon area corresponding to the corresponding feature image; wherein the diaphragm beacon area recognition model is pre-trained based on multiple historical standard feature images of the diaphragm.
[0084] It should be noted that, in the embodiment of the present invention, multiple historical standard feature images corresponding to the beacon of the diaphragm can be pre-acquired for model training to obtain a diaphragm beacon area recognition model, and then the diaphragm beacon area recognition model is used to perform beacon area recognition on each normal feature image, each correction feature image and each de-high-reflection feature image, so as to obtain the beacon area corresponding to the normal feature image, the beacon area corresponding to the correction feature image, and the beacon area corresponding to the de-high-reflection image.
[0085] It is understandable that, due to the large number of characteristic images, all characteristic images use the diaphragm beacon area recognition model to identify the beacon area, which may take a long time. Therefore, in order to improve the recognition efficiency, in one embodiment, the above-mentioned process of respectively identifying the normal characteristic image, the corrected characteristic image and the high-reflection-free characteristic image to determine the beacon area corresponding to the corresponding characteristic image may include:
[0086] The filter edge detection method is used to perform edge detection on the normal feature image to obtain the beacon contour of the normal feature image;
[0087] According to the beacon contour of the normal feature image, a beacon area of the normal feature image is obtained;
[0088] The filter edge detection method is used to perform edge detection on the correction feature image to obtain the beacon contour of the correction feature image;
[0089] According to the beacon contour of the corrected image, a beacon area of the corrected feature image is obtained;
[0090] A pre-established diaphragm beacon area recognition model is used to perform beacon area recognition on the high-reflection feature image to determine the beacon area of the high-reflection feature image; wherein the diaphragm beacon area recognition model is pre-trained based on multiple historical standard feature images of the diaphragm.
[0091] It should be noted that, since the interference between the normal feature image and the corrected feature image is small, the Sobel filter edge detection method can be used to extract the beacon contours of the normal feature image and the corrected feature image respectively, to obtain the beacon contour corresponding to the normal feature image and the beacon contour corresponding to the corrected feature image, and then determine the beacon area of the normal feature image and the beacon area of the corrected feature image based on the beacon contours.
[0092] Since the number of high-reflection feature images is usually small, and there will still be certain interference in the high-reflection feature images after removing the high reflection, the beacon area of the high-reflection feature images can be identified by using a pre-established second diaphragm beacon area recognition model to determine the beacon area in the high-reflection feature images.
[0093] S130: determining the beacon position and beacon size of the corresponding feature image according to the beacon area corresponding to each feature image;
[0094] It should be noted that, in practical applications, after obtaining the beacon area corresponding to each characteristic image, the beacon position and beacon size of the corresponding characteristic image can be further obtained according to the beacon area.
[0095] An implementation method in the embodiment of the present invention is as follows:
[0096] For the beacon area corresponding to each feature image, the beacon area of the feature image is grayed to obtain a binary image of the beacon area;
[0097] Extracting the overall beacon image from the binary image of the beacon area;
[0098] Segment the overall beacon image to obtain multiple image blocks;
[0099] According to the position coordinates of each pixel in each image block, the beacon position and beacon size of the feature image are determined.
[0100] It should be noted that, for each feature image, the beacon region in the feature image can be grayed to obtain a binary image of the beacon region (such as Figure 3 The beacon region binary image is processed by projection analysis to obtain the overall beacon image of each adjacent pattern contained in the beacon (as shown in grayImage). Figure 4 ), where the binarization process may include: determining a segmentation threshold threshold (which may be determined by the OTSU algorithm), based on the segmentation threshold beacon region binary image binaryImage, the initial value of all pixels in the beacon region binary image is 0 (background), and traversing each pixel (x, y) in the beacon region binary image, and performing the following operations:
[0101] If grayImage(x, y) > threshold: Set binaryImage(x, y) to 1 (foreground).
[0102] Thus, an initialized beacon region binary image is obtained, and noise can also be filtered out of the beacon region binary image. Specifically, the beacon region binary image can be first expanded and then corroded to remove noise, thereby improving the accuracy of the extracted overall beacon image.
[0103] Then, the connected domain analysis method can be used to segment the overall beacon image to obtain multiple image blocks. Specifically, the center coordinates of the overall beacon image can be determined based on the position coordinates of each pixel in each image block, and the left side of the center can be determined as the beacon position of the characteristic image; the maximum and minimum values on the X-axis and the maximum and minimum values on the Y-axis can be determined based on the position coordinates of each pixel in each image block, and the beacon size of the characteristic image can be determined based on the maximum and minimum values on the X-axis and the maximum and minimum values on the Y-axis.
[0104] It should also be noted that in actual applications, the beacon area can be segmented according to the following process:
[0105] 1. Grayscale the beacon area image (grayImage);
[0106] 2. Apply projection analysis to obtain the overall area extraction of adjacent patterns;
[0107] 3. Determine the segmentation threshold (through the OTSU algorithm);
[0108] 4. Initialize the binary image binaryImage of the beacon area based on the segmentation threshold, and the initial value of all pixels is 0 (background);
[0109] 5. For each pixel (x, y) in grayImage, perform the following operations:
[0110] If grayImage(x, y) > threshold: set binaryImage(x, y) to 1 (foreground);
[0111] 6. Apply morphological operations to filter out some noise;
[0112] The binary image binaryImage of the sub-image region is first expanded and then eroded;
[0113] 7. Apply connected component analysis to further process the segmentation results:
[0114] Initialize an array labels to store the label of each pixel, with an initial value of 0 (not accessed);
[0115] Initialize the number of connected domains count to 0;
[0116] Traverse each pixel (x, y) in the filtered beacon area binary image:
[0117] IF labels[x][y] is 0 (not visited): THEN increase count ii;
[0118] Call the LabelComponent function, passing in (x, y), count and labels;
[0119] Among them, the LabelComponent function flow is as follows:
[0120] Set labels[x][y] to count (labeling the current pixel);
[0121] Add the neighbors of the current pixel to the queue to be processed (for BFS) or recursively visit (for DFS);
[0122] For each neighbor (nx, ny):
[0123] If nx, ny are within the image range and labels[nx][ny] is 0:
[0124] Set labels[nx][ny] to count;
[0125] Depending on the search strategy, add (nx, ny) to the pending list or call recursively;
[0126] Get the labeled image labels;
[0127] 9. Return the binaryImage of each sub-region and the processed segmentation result labels.
[0128] Through the above process, each segmented image block can be obtained.
[0129] S140: Determine the beacon detection result of the beacon on the product film according to the beacon position and beacon size of each characteristic image.
[0130] It should be noted that after obtaining the beacon position and beacon size corresponding to each characteristic image corresponding to the beacon, the beacon position and beacon size of each characteristic image can be combined to obtain the final beacon position and the final beacon size, and then the beacon detection result of the corresponding beacon on the product membrane can be determined according to the final beacon position and the final beacon size.
[0131] In practical applications, for different beacons on different product membranes, a preset position range and a preset size range corresponding to the beacon on the product membrane can be set, and a corresponding relationship between product membrane-beacon-preset position range and preset size range can be established. Specifically, the beacon position of each characteristic image can be averaged to obtain the average beacon position of the beacon as the final beacon position of the beacon; the beacon size of each characteristic image can be averaged to obtain the average beacon size of the beacon as the final beacon size of the beacon, and then according to the beacon in the product membrane, the preset position range and preset size range corresponding to the beacon of the product membrane are matched from the pre-established corresponding relationship between product membrane-beacon-preset position range and preset size range, and further judge whether the average beacon position is within the corresponding preset position range, and judge whether the average beacon size is within the corresponding preset beacon size range. When the average beacon position is within the preset position range and the average beacon size is within the preset size range, it is determined that the beacon on the product membrane is qualified. Of course, if the average beacon position is not within the preset position range, and / or the average beacon size is not within the preset size range, it means that the beacon on the product film is unqualified, that is, the beacon is offset.
[0132] In addition, in practical applications, the stability of the molding process can be further analyzed based on the dimensional change information at different positions on the molded diaphragm. The dimensional changes at different positions of the diaphragm before and after high pressure are as follows: Figure 5 As shown, line A represents the length and line B represents the width.
[0133] It should also be noted that in the above-mentioned S120, in the process of using a pre-established image recognition model to recognize each feature image and determine the normal feature image, the deformed feature image and the high-reflection feature image, multiple normal sample feature images, multiple deformed sample feature images and multiple high-reflection sample feature images can be obtained in advance, each feature image is added with a corresponding type label, and then the image recognition model (i.e., the decision tree model) is obtained by training the decision tree classification model using each sample image. Specifically, it can be done in the following ways:
[0134] 1. Manually mark the areas where features need to be extracted from each pre-acquired diaphragm image, and perform traditional feature extraction on each marked area:
[0135] 1) Through connected domain analysis, independent shapes after edge detection are identified by applying connected domain analysis;
[0136] 2) Calculate the features of each shape: area, perimeter, center point;
[0137] 3) Calculate shape descriptors based on shape features: circularity, rectangularity, etc.
[0138] 4) Apply Gabor filter to obtain texture features: energy, variance, etc.;
[0139] 2. Integrate the feature data set and annotate the status. The annotation items are: reflection and deformation.
[0140] 3. Train the decision tree model:
[0141] 1) Load the training data set trainData and the corresponding labels trainLabels;
[0142] 2) Define the maximum depth maxDepth;
[0143] 3) Call the ExtractFeatures function and pass in train_data, train_labels and max_depth;
[0144] 4) Get the sorted feature list sorted_features;
[0145] 5) Obtain the top 5 ranked features as the final feature information.
[0146] Among them, the function BuildDecisionTree(data, labels, max_depth) is defined:
[0147] a. If all instances in the dataset data belong to the same category, or the maximum depth max_depth is reached:
[0148] i. Return a leaf node containing the category;
[0149] b. Calculate the initial entropy of the data set Entropy(data);
[0150] c. Initialize the best information gain best_gain = 0;
[0151] d. For each feature in the dataset:
[0152] i. For each possible value of feature:
[0153] I. Split the data set into subsets based on value;
[0154] II. Calculate the entropy of the subset Entropy(subset) ;
[0155] III. Calculate information gain gain = current entropy - (subset size / data set size) * subset entropy;
[0156] IV. If gain > best_gain, record best_gain and best feature best_feature;
[0157] e. If best_gain is 0, return the current node as a leaf node, containing the main category of the data set;
[0158] f. Create an internal node for each possible value of best_feature;
[0159] g. For each value, recursively call the BuildDecisionTree function, passing in the corresponding subset and max_depth-1;
[0160] h. Set the results of all recursive calls as child nodes of the current node;
[0161] i. Returns the decision tree node.
[0162] Among them, the function FeatureImportance(model) is defined as:
[0163] a. Initialize the feature importance array importances
[0164] b. Traverse each node of the decision tree:
[0165] i. If node is an internal node:
[0166] I. Calculate the information gain of the node;
[0167] II. Accumulate information gain to the importance of the corresponding features;
[0168] c. Normalize the importances array;
[0169] d. Return the feature importance array importances.
[0170] Among them, define the function ExtractFeatures(train_data, train_labels)
[0171] a. Call the BuildDecisionTree function and pass in train_data and train_labels;
[0172] b. Get the trained decision tree model;
[0173] c. Call the FeatureImportance function and pass in the model;
[0174] d. Get the feature importance array importances;
[0175] e. Sort features by importance;
[0176] f. Return the sorted feature list.
[0177] Modeling of the classification model using the sorted features (0: high reflection; 1: deformation; 2: normal).
[0178] In one embodiment, in order to further improve the quality of product film detection, the method may further include:
[0179] Defect recognition is performed on the film image of the product film to determine the defect information of the product film.
[0180] It can be understood that in addition to detecting the beacon position and beacon size of the beacon on the product membrane, the image processing algorithm can also be used to detect the appearance of the product membrane and identify defect information, such as detecting whether there are bubbles, white spots, wrinkles, cracks and other undesirable phenomena.
[0181] In practical applications, deep learning technologies, such as convolutional neural networks (CNN) and other deep learning models, can be used to extract features from images. These features can effectively capture the defect information on the diaphragm surface and improve the accuracy and efficiency of detection. That is, diaphragm sample images with different defects can be obtained in advance. The sample images are provided with corresponding label information, including the defect type, etc. The neural network is trained using the information of each diaphragm sample to obtain the corresponding defect recognition module, and then the defect recognition model is used to perform defect recognition on the diaphragm image of the product diaphragm, thereby identifying the corresponding defect information.
[0182] Furthermore, corresponding defect judgment standards can be set in advance according to customer requirements / internal enterprise standards, and the obtained defect information can be compared with the defect judgment standards to determine the overall quality of the appearance.
[0183] In addition, after obtaining the beacon detection results and defect information of the product membrane, the beacon detection results and the defect information can also be displayed. Specifically, the beacon detection results and the defect information can be displayed through a user interface so that the user can perform subsequent processing in a timely manner.
[0184] It can be seen that in the embodiment of the present invention, for the beacon of the product diaphragm, multiple characteristic images corresponding to the beacon can be obtained, and the beacon area of each characteristic image can be identified. The beacon position and beacon size of each characteristic image are determined according to the beacon area, and then the beacon position and beacon size of each characteristic image are combined to further determine the beacon detection result of the beacon on the product diaphragm; the present invention can improve the efficiency and accuracy of beacon detection of diaphragms.
[0185] In addition, the method provided by the embodiment of the present invention can effectively solve the problem of beacon offset and other appearance defects in high-pressure molded diaphragms. The method has the advantages of simple operation, high accuracy, high efficiency, etc., can improve the quality and efficiency of diaphragm production, and is conducive to improving the consistency and stability of products. It is helpful to improve the product quality management level of enterprises, so this technical solution has a broad market demand in the field of quality control.
[0186] In addition, as people's requirements for product appearance quality continue to increase, the detection of appearance defects has also become an important demand. This technical solution can not only detect beacon position deviation, but also detect other appearance defects, such as surface scratches, deformation, etc. Therefore, in the field of product appearance quality control, this technical solution also has broad application prospects.
[0187] The present invention also provides a corresponding device for the beacon detection method of the high-pressure molded diaphragm, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware. The beacon detection device of the high-pressure molded diaphragm provided by the present invention is introduced below. The device is used to implement the beacon detection method of the high-pressure molded diaphragm provided by the present invention. In this embodiment, the beacon detection device of the high-pressure molded diaphragm may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete the beacon detection method of the high-pressure molded diaphragm disclosed in the above embodiment. The program module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the execution process of the beacon detection device of the high-pressure molded diaphragm in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The beacon detection device of the high-pressure molded diaphragm described below and the beacon detection method based on the high-pressure molded diaphragm described above can be referred to each other.
[0188] From the perspective of functional modules, see Figure 6 , Figure 6 A structural diagram of a beacon detection device for a high pressure molded diaphragm provided by the present invention in a specific embodiment, the device may include:
[0189] An acquisition module 11 is used to acquire a plurality of characteristic images corresponding to the beacons on the product film;
[0190] The recognition module 12 is used to perform beacon area recognition on each feature image and determine the beacon area corresponding to each feature image;
[0191] A first determination module 13, used to determine the beacon position and beacon size of the corresponding feature image according to the beacon area corresponding to each feature image;
[0192] The second determination module 14 is used to determine the beacon detection result of the beacon on the product film according to the beacon position and beacon size of each characteristic image.
[0193] In one embodiment, the identification module 12 includes:
[0194] A first recognition unit is used to recognize each feature image using a pre-established image recognition model to determine a normal feature image, a deformed feature image, and a high-reflection feature image;
[0195] A correction unit, used for correcting the deformed characteristic image to obtain a corrected characteristic image;
[0196] A high reflection removal unit is used to remove the high reflection of the high reflection feature image to obtain a high reflection feature removal image;
[0197] The second recognition unit is used to recognize the normal characteristic image, the corrected characteristic image and the high-reflection-removed characteristic image respectively, and determine the beacon area corresponding to the corresponding characteristic image.
[0198] In one embodiment, the second identification unit is used to:
[0199] A pre-established diaphragm beacon area recognition model is used to perform beacon area recognition on normal feature images, corrected feature images and de-high-reflection feature images, respectively, to determine the beacon area corresponding to the corresponding feature image; wherein the diaphragm beacon area recognition model is pre-trained based on multiple historical standard feature images corresponding to the beacons of the diaphragm.
[0200] In one embodiment, the second identification unit includes:
[0201] A first detection subunit is used to perform edge detection on the normal feature image using a filter edge detection method to obtain a beacon contour of the normal feature image;
[0202] A first determining subunit is used to obtain a beacon area of the normal feature image according to the beacon contour of the normal feature image;
[0203] A second detection subunit is used to perform edge detection on the correction feature image using a filter edge detection method to obtain a beacon contour of the correction feature image;
[0204] A second determination subunit is used to obtain a beacon area of a correction feature image according to a beacon contour of the correction image;
[0205] The identification subunit is used to use a pre-established diaphragm beacon area identification model to perform beacon area identification on the high-reflection feature image to determine the beacon area of the high-reflection feature image; wherein the diaphragm beacon area identification model is pre-trained based on multiple historical standard feature images corresponding to the beacons of the diaphragm.
[0206] In one implementation, the first determining module 13 includes:
[0207] A processing unit, for graying the beacon region of each feature image corresponding to each beacon region, to obtain a binary image of the beacon region;
[0208] An extraction unit, used for extracting an overall beacon image from a beacon region binary image;
[0209] A segmentation unit, used for segmenting the whole beacon image to obtain a plurality of image blocks;
[0210] The first determining unit is used to determine the beacon position and beacon size of the feature image according to the position coordinates of each pixel in each image block.
[0211] In one implementation, the second determining module 14 includes:
[0212] A first calculation unit is used to average the beacon positions of each feature image to obtain an average beacon position of the beacon;
[0213] A second calculation unit is used to average the beacon size of each feature image to obtain an average beacon size of the beacon;
[0214] The second determination unit is used to determine that the beacon on the product film is qualified when the average beacon position is within a preset position range and the average beacon size is within a preset size range.
[0215] In one embodiment, it further includes:
[0216] The defect recognition module is used to perform defect recognition on the film image of the product film and determine the defect information of the product film.
[0217] In practical applications, the above device can be integrated into the IML film high pressure molding equipment to realize the detection of the film beacon position and beacon size, as well as automatic detection of product appearance and other issues, and improve the accuracy of visual inspection by enriching the detection mechanism of visual inspection and optimizing the visual inspection procedure. Among them, the structural diagram of the IML film high pressure molding equipment is shown in the figure. Figures 7 to 9 shown.
[0218] It should be noted that the beacon detection device for the high-pressure molded diaphragm provided in the actual example of the present invention has the same beneficial effects as the beacon detection method for the high-pressure molded diaphragm provided in the above-mentioned embodiment, and for the specific introduction of the beacon detection method for the high-pressure molded diaphragm involved in the embodiment of the present invention, please refer to the above-mentioned embodiment, and this application will not repeat it here.
[0219] The beacon detection device for the high-pressure molded diaphragm mentioned above is described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, which is described from the perspective of hardware. Fig.10 A structural diagram of an electronic device provided in an embodiment of the present application, such as Fig.10 As shown, the electronic device includes: a memory 20 for storing a computer program;
[0220] The processor 21 is used to implement the steps of the beacon detection method for the high pressure molded diaphragm in the above embodiment when executing the computer program.
[0221] The electronic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0222] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0223] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the memory 20 may be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 20 may also be an external storage device of an electronic device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. Further, the memory 20 may also include both an internal storage unit of an electronic device and an external storage device. The memory 20 may not only be used to store application software and various types of data installed in the electronic device, such as: the code of the program in the process of executing the beacon detection method of the high-pressure molded diaphragm, etc., but also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, the relevant steps of the beacon detection method of the high-pressure molded diaphragm disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to (data corresponding to the beacon detection result of the high pressure molded diaphragm) etc.
[0224] In some embodiments, the electronic device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26. Among them, the display screen 22 and the input / output interface 23, such as a keyboard, belong to the user interface, and the optional user interface may also include a standard wired interface, a wireless interface, and the like. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, and the like. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 24 may optionally include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, and the like, which are generally used to establish a communication connection between the electronic device and other electronic devices. The communication bus 26 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, and the like. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0225] Those skilled in the art will understand that Fig.10 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure.
[0226] It is understandable that if the beacon detection method of the high pressure molded diaphragm in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes.
[0227] Based on this, Fig.11As shown, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program 31 is stored. When the computer program 31 is executed by a processor, the steps of the beacon detection method for the high-pressure molded diaphragm are implemented as described above.
[0228] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0229] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0230] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A beacon detection method for a high pressure molded diaphragm, characterized in that: include: Acquire a plurality of characteristic images corresponding to the beacons on the product film; Performing beacon area recognition on each of the characteristic images to determine the beacon area corresponding to each of the characteristic images; Determine the beacon position and beacon size of the corresponding feature image according to the beacon area corresponding to each of the feature images; The beacon detection result of the beacon on the product film is determined according to the beacon position and the beacon size of each of the characteristic images.
2. The beacon detection method of high pressure molded diaphragm according to claim 1, characterized in that: The performing beacon area recognition on each of the feature images to determine the beacon area corresponding to each of the feature images includes: Using a pre-established image recognition model to recognize each of the characteristic images, and determining a normal characteristic image, a deformed characteristic image, and a high-reflection characteristic image; Correcting the deformed characteristic image to obtain a corrected characteristic image; Performing high reflection removal processing on the high reflection characteristic image to obtain a high reflection removal characteristic image; The normal characteristic image, the corrected characteristic image and the high-reflection-removed characteristic image are respectively identified to determine the beacon area corresponding to the corresponding characteristic image.
3. The beacon detection method of high pressure molded diaphragm according to claim 2, characterized in that: The step of respectively identifying the normal feature image, the corrected feature image, and the high-reflection-removed feature image to determine the beacon area corresponding to the corresponding feature image includes: A pre-established diaphragm beacon area recognition model is used to perform beacon area recognition on the normal feature image, the corrected feature image and the de-high-reflection feature image respectively, and the beacon area corresponding to the corresponding feature image is determined; wherein the diaphragm beacon area recognition model is pre-trained based on multiple historical standard feature images corresponding to the beacon of the diaphragm.
4. The beacon detection method of high pressure molded diaphragm according to claim 2, characterized in that: The step of respectively identifying the normal feature image, the corrected feature image, and the high-reflection-removed feature image to determine the beacon area corresponding to the corresponding feature image includes: Performing edge detection on the normal feature image using a filtering edge detection method to obtain a beacon contour of the normal feature image; Obtaining a beacon area of the normal feature image according to the beacon contour of the normal feature image; Performing edge detection on the correction feature image using the filtering edge detection method to obtain a beacon outline of the correction feature image; Obtaining a beacon region of the correction feature image according to the beacon contour of the correction image; A pre-established diaphragm beacon area recognition model is used to perform beacon area recognition on the high-reflection-removed feature image to determine the beacon area of the high-reflection-removed feature image; wherein the diaphragm beacon area recognition model is pre-trained based on multiple historical standard feature images corresponding to the beacons of the diaphragm.
5. The beacon detection method of high pressure molded diaphragm according to claim 1, characterized in that: The step of determining the beacon position and beacon size of the corresponding feature image according to the beacon area corresponding to each feature image includes: For each beacon region corresponding to each of the characteristic images, graying the beacon region of the characteristic image to obtain a binary image of the beacon region; Extracting the overall beacon image from the beacon region binary image; Segmenting the overall beacon image to obtain a plurality of image blocks; The beacon position and beacon size of the feature image are determined according to the position coordinates of each pixel in each of the image blocks.
6. The beacon detection method for a high pressure molded film according to any one of claims 1 to 5, characterized in that: The step of determining the beacon detection result of the beacon on the product film according to the beacon position and beacon size of each of the characteristic images includes: Averaging the beacon positions of each of the feature images to obtain an average beacon position of the beacon; Averaging the beacon sizes of each of the feature images to obtain an average beacon size of the beacons; When the average beacon position is within the preset position range and the average beacon size is within the preset size range, it is determined that the beacon on the product film is qualified.
7. The beacon detection method of high pressure molded diaphragm according to claim 6, characterized in that: Also includes: Defect recognition is performed on the film image of the product film to determine defect information of the product film.
8. A beacon detection device for a high pressure molded diaphragm, characterized in that: include: An acquisition module, used to acquire multiple characteristic images corresponding to the beacons on the product film; An identification module, used to identify the beacon area for each of the characteristic images, and determine the beacon area corresponding to each of the characteristic images; A first determination module, configured to determine a beacon position and a beacon size corresponding to each of the characteristic images according to a beacon area corresponding to each of the characteristic images; The second determination module is used to determine the beacon detection result of the beacon on the product film according to the beacon position and beacon size of each of the characteristic images.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the beacon detection method for a high pressure molded diaphragm according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the beacon detection method for a high-pressure molded diaphragm according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Information transmitting method and device
CN107729958A
Positioning method and device
CN115187769A
Identification information identification method, electronic equipment and storage medium
CN117669616A
