A method and system for detecting defects in children's wooden toys based on image analysis
By using image analysis methods, initial images of children's wooden toys are obtained, and frequency domain processing and pixel value matrix analysis are performed to identify and filter out defect locations. This solves the defect problems existing in the production process of children's wooden toys, and improves product quality and customer experience.
Patent Information
- Application Number
- CN202610597555.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-24
AI Technical Summary
Children's wooden toys may have defects such as splinters, dents, bumps, and cracks during the production process, which can affect their lifespan and reduce the customer's purchasing experience.
An image-based analysis method is used to acquire an initial image, perform frequency domain analysis and denoising, construct a pixel value matrix, calculate the ratio coefficient of adjacent pixel values, filter out abnormal ratio coefficients, and determine the defect location.
Accurately identify and screen out defective wooden children's toys to prevent them from entering the market and improve the customer's buying experience.
Smart Images

Figure CN122453774A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image analysis technology, specifically to a defect detection method and system for children's wooden toys based on image analysis. Background Technology
[0002] Children's wooden toys refer to toys made primarily of natural wood that are suitable for children to play with. Children's wooden toys include building blocks, puzzles, and role-playing toys.
[0003] Children's wooden toys are produced by processing wood through steps such as cutting, punching, and assembling. However, during the production process, defects such as splinters, dents, bumps, and cracks may appear on the surface of children's wooden toys, affecting their quality. Children's wooden toys with defects have a shorter lifespan, and selling them would greatly reduce the customer's purchasing experience. Summary of the Invention
[0004] To address the aforementioned technical problems, this paper provides a defect detection method and system for children's wooden toys based on image analysis. This technical solution solves the problems mentioned in the background section.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A defect detection method for children's wooden toys based on image analysis, comprising: The initial image of the children's wooden toy is obtained, and the initial image of the children's wooden toy is preprocessed based on frequency domain analysis to obtain the image of the children's wooden toy to be analyzed; Obtain the pixel value matrix of the image to be analyzed, perform data calculations on the pixel value matrix of the image to be analyzed, and obtain the ratio coefficient between adjacent pixel values; The proportional coefficients between adjacent pixel values are compared and analyzed to obtain abnormal proportional coefficients between adjacent pixel values. Based on the row and column values of the pixel value matrix, the abnormal ratio coefficients between adjacent pixel values are filtered to determine the location of defects in children's wooden toys.
[0006] Preferably, the process of obtaining the initial image of the children's wooden toy, based on frequency domain analysis, and performing image preprocessing on the initial image of the children's wooden toy to obtain the image of the children's wooden toy to be analyzed specifically includes the following steps: Using an industrial camera, images of different planes of a children's wooden toy are acquired and processed to obtain initial images of the children's wooden toy, including initial images of different planes of the children's wooden toy; Perform data reading and processing on the industrial camera to obtain the parameters set when the industrial camera was taking pictures; Data analysis and processing are performed on the parameters set when the industrial camera is shooting to obtain the type of noise generated in the captured image; Based on the Fourier transform algorithm, the initial image of the children's wooden toy is processed by frequency domain transformation to obtain the frequency domain representation of the initial image; Based on the type of noise generated by the captured image, the frequency domain representation of the initial image is denoised to obtain the image of the children's wooden toy to be analyzed.
[0007] Preferably, the steps of obtaining the pixel value matrix of the image to be analyzed, performing data calculation processing on the pixel value matrix of the image to be analyzed, and obtaining the ratio coefficient between adjacent pixel values specifically include the following steps: The image of the children's wooden toy to be analyzed is binarized to obtain the grayscale image of the children's wooden toy to be analyzed; Data extraction processing is performed on the grayscale image of the children's wooden toy to be analyzed to obtain the dimensional data of the grayscale image to be analyzed, which includes the image height and image width of the grayscale image to be analyzed. A pixel value matrix of the grayscale image to be analyzed is constructed based on the dimensional data and pixel values of the grayscale image to be analyzed. The pixel values in the pixel value matrix of the grayscale image to be analyzed are arranged in the same way as the pixel values in the grayscale image to be analyzed. The pixel values in the pixel value matrix of the image to be analyzed are calculated and processed to obtain the ratio coefficient between adjacent pixel values.
[0008] Preferably, the step of calculating and processing the pixel values in the pixel value matrix of the image to be analyzed to obtain the ratio coefficient between adjacent pixel values specifically includes the following steps: The first data point in the top left corner of the pixel value matrix of the image to be analyzed is taken as the starting point for data calculation; Based on the starting point of the data calculation, the ratio calculation is performed on the adjacent pixel values in the same row and column of the starting point of the data calculation to obtain the ratio coefficient between adjacent pixel values. The ratio coefficient between adjacent pixel values includes the row ratio coefficient and the column ratio coefficient between adjacent pixel values. Using the row information of the pixel value matrix as a reference, the remaining pixel values in the pixel value matrix of the image to be analyzed are calculated according to the calculation method of the starting calculation point of the data, and the ratio coefficient between adjacent pixel values is obtained.
[0009] Preferably, the step of comparing and analyzing the ratio coefficients between adjacent pixel values to obtain abnormal ratio coefficients between adjacent pixel values specifically includes the following steps: Based on adjacent matrix row values or adjacent matrix column values, the ratio coefficients between adjacent pixel values are filtered to obtain a set of ratio coefficients with sorting information. The difference between adjacent data in the set of proportional coefficients with sorting information is calculated to obtain the difference between adjacent proportional coefficients. By comparing and analyzing the differences between adjacent proportional coefficients, abnormal proportional coefficients between adjacent pixel values can be obtained.
[0010] Preferably, the step of comparing and analyzing the differences between adjacent proportional coefficients to obtain the abnormal proportional coefficients between adjacent pixel values specifically includes the following steps: Plot the difference between adjacent scaling factors in a one-dimensional spatial coordinate system to obtain a one-dimensional spatial coordinate system containing the difference between adjacent scaling factors. Discreteness analysis is performed in a one-dimensional spatial coordinate system containing the difference between adjacent scaling factors; The region where the points in a one-dimensional spatial coordinate system with the largest clustering of adjacent scaling factor differences is set as the normal scaling factor region between adjacent pixel values. Points in a one-dimensional coordinate system containing the difference between adjacent scaling factors that are far from the normal scaling factor region between adjacent pixel values are set as abnormal scaling factors between adjacent pixel values.
[0011] Preferably, the step of filtering out abnormal ratio coefficients between adjacent pixel values based on the row and column values of the pixel value matrix to determine the defect location of the children's wooden toy specifically includes the following steps: Data extraction processing is performed on the abnormal ratio coefficients between adjacent pixel values to obtain the row and column values corresponding to the abnormal ratio coefficients; Construct a blank matrix with the same dimensions as the pixel value matrix of the image to be analyzed; The blank matrix is filled with the row and column values corresponding to the abnormal proportion coefficients to obtain the abnormal proportion coefficient matrix to be analyzed. Data comparison and analysis were performed on the abnormal proportion coefficient matrix to determine the location of defects in children's wooden toys.
[0012] Preferably, the process of performing data comparison and analysis on the anomaly ratio coefficient matrix to be analyzed to determine the defect location of the children's wooden toy specifically includes the following steps: The abnormal proportion coefficient matrix to be analyzed is judged and processed; If there are no other filled data near the data in the abnormal proportion coefficient matrix to be analyzed, the location of the filled data is not a defect location; If there are other filled data near the data filled in the abnormal proportion coefficient matrix to be analyzed, the location of the filled data is the defect location.
[0013] Furthermore, an image analysis-based defect detection system for children's wooden toys is proposed to implement the aforementioned image analysis-based defect detection method for children's wooden toys, including: The defect detection terminal is used to control the data transmission and information interaction between various modules. The defect detection terminal is used to control the various modules to perform image preprocessing, matrix calculation, matrix analysis and data filtering on the initial image of the children's wooden toy to determine the location of defects in the children's wooden toy. An industrial camera is used to acquire and process images of children's wooden toys to obtain initial images of the children's wooden toys; An image preprocessing module performs noise reduction processing on the initial image of the children's wooden toy in the frequency domain to obtain the image of the children's wooden toy to be analyzed; An abnormal proportion coefficient determination module is used to perform data calculation and data comparison on the pixel value matrix of the image to be analyzed, and to obtain the abnormal proportion coefficient between adjacent pixel values. The defect location determination module is used to perform data comparison processing on the abnormal ratio coefficient between adjacent pixel values to determine the defect location of the children's wooden toy.
[0014] Compared with existing technologies, the present invention provides a defect detection method and system for children's wooden toys based on image analysis, which has the following beneficial effects: This invention calculates the ratio coefficient between adjacent pixel values in the pixel value matrix of the image to be analyzed. Then, it compares the ratio coefficients between adjacent pixel values to identify abnormal ratio coefficients. Finally, it filters out the abnormal ratio coefficients between adjacent pixel values to obtain the defect location of children's wooden toys. The above method determines abnormal pixel values by calculating adjacent data in the pixel value matrix. Abnormal pixel values represent defects in children's wooden toys because when there is a defect in a wooden children's toy, the pixel value of the defect is different from the pixel value of other normal areas. Therefore, by determining the defect location of children's wooden toys through the ratio coefficient between adjacent pixel values, defective children's wooden toys can be screened out, preventing defective children's wooden toys from entering the market and improving the customer's purchasing experience. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating steps S100-S400 of a defect detection method for children's wooden toys based on image analysis proposed in this invention. Figure 2 This is a structural block diagram of a defect detection system for children's wooden toys based on image analysis proposed in this invention. Detailed Implementation
[0016] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0017] Reference Figure 1 As shown, a defect detection method for children's wooden toys based on image analysis includes: S100. Obtain the initial image of the children's wooden toy. Based on frequency domain analysis, perform image preprocessing on the initial image of the children's wooden toy to obtain the image of the children's wooden toy to be analyzed. S200. Obtain the pixel value matrix of the image to be analyzed, perform data calculation processing on the pixel value matrix of the image to be analyzed, and obtain the ratio coefficient between adjacent pixel values. S300: Compare and analyze the proportional coefficients between adjacent pixel values to obtain abnormal proportional coefficients between adjacent pixel values; S400: Based on the row and column values of the pixel value matrix, the abnormal ratio coefficients between adjacent pixel values are filtered to determine the defect location of children's wooden toys. Those skilled in the art will understand that children's wooden toys are made from wood through specific processing. During the production process, defects such as splinters, cracks, dents, and protrusions may appear on the surface of children's wooden toys. These defects will affect the lifespan of the children's wooden toys. If customers buy children's wooden toys with defects, it will reduce their shopping experience because the lifespan of children's wooden toys with defects is shorter than that of normal children's wooden toys. Therefore, in order to improve the customer's shopping experience, children's wooden toys are screened to remove those with defects, preventing them from entering the market and ensuring that customers purchase normal children's wooden toys, thereby improving the customer's shopping experience. Example 1
[0018] Step S100: Obtain the initial image of the children's wooden toy. Based on frequency domain analysis, perform image preprocessing on the initial image of the children's wooden toy to obtain the image to be analyzed. This specifically includes the following steps: S101. Based on an industrial camera, image acquisition and processing are performed on different planes of the children's wooden toy to obtain an initial image of the children's wooden toy, wherein the initial image of the children's wooden toy includes initial images of different planes of the children's wooden toy; S102. Perform data reading and processing on the industrial camera to obtain the parameters set when the industrial camera was shooting; S103. Perform data analysis and processing on the parameters set when the industrial camera is shooting to obtain the type of noise generated in the captured image; S104. Based on the Fourier transform algorithm, the initial image of the children's wooden toy is processed by frequency domain transformation to obtain the frequency domain representation of the initial image; S105. Based on the noise type generated by the captured image, perform noise reduction processing on the frequency domain representation of the initial image to obtain the image of the children's wooden toy to be analyzed; In this embodiment, to more accurately determine the defects of the children's wooden toy, it is necessary to preprocess the initial image of the children's wooden toy to remove noise, making the defect features in the initial image clearer and the subsequent analysis results more accurate. When the industrial camera captures the image, the equipment itself will affect the image, that is, the equipment will also generate some noise mixed into the initial image of the children's wooden toy. For example, ISO≤400, shutter speed≥1 / 500s: mainly Poisson noise + low-level Gaussian noise; ISO≥800, long exposure (>1 / 100s): mainly Gaussian thermal noise + dark current noise. Therefore, the noise present in the initial image of the children's wooden toy is determined by the parameters set when the industrial camera is captured. Then, the frequency domain representation of the initial image is denoised according to the characteristics of the noise in the frequency domain. After denoising is completed, the frequency domain representation of the denoised initial image is transformed by the inverse Fourier transform algorithm to obtain the image of the children's wooden toy to be analyzed. Example 2
[0019] Step S200: Obtain the pixel value matrix of the image to be analyzed. Perform data calculation processing on the pixel value matrix of the image to be analyzed to obtain the ratio coefficient between adjacent pixel values. This specifically includes the following steps: S201. Perform binarization processing on the image of the children's wooden toy to be analyzed to obtain the grayscale image of the children's wooden toy to be analyzed; It is understandable that binarization is performed on the image of the wooden toy to be analyzed in order to reduce the amount of computation. If the image of the wooden toy to be analyzed is not converted into a grayscale image, then it is necessary to calculate three channels in the image of the wooden toy to be analyzed, while a grayscale image only has one channel. Therefore, binarization is performed to reduce the amount of computation. S202. Perform data extraction processing on the grayscale image of the children's wooden toy to be analyzed, and obtain the dimensional data of the grayscale image to be analyzed. The dimensional data of the grayscale image to be analyzed includes the image height and image width of the grayscale image to be analyzed. S203. Construct a pixel value matrix of the image to be analyzed based on the dimensional data and pixel values of the grayscale image to be analyzed. The pixel values in the pixel value matrix of the image to be analyzed are arranged in the same way as the pixel values in the grayscale image to be analyzed. S204. Calculate and process the pixel values in the pixel value matrix of the image to be analyzed to obtain the ratio coefficient between adjacent pixel values; Specifically, step S204, calculating and processing the pixel values in the pixel value matrix of the image to be analyzed to obtain the ratio coefficient between adjacent pixel values, includes the following steps: S2041. Take the first data point in the top left corner of the pixel value matrix of the image to be analyzed as the starting point for data calculation; S2042. Based on the data starting calculation point, perform proportional calculation processing on the adjacent pixel values in the same row and column of the data starting calculation point to obtain the proportional coefficient between adjacent pixel values. The proportional coefficient between adjacent pixel values includes the row proportional coefficient and the column proportional coefficient between adjacent pixel values. S2043. Using the row information of the pixel value matrix as a reference, calculate and process the remaining pixel values in the pixel value matrix of the image to be analyzed according to the calculation method of the starting calculation point of the data, and obtain the ratio coefficient between adjacent pixel values. In this embodiment, if there are no defects in the children's wooden toy, then the pixel values of each part of the children's wooden toy should be approximately the same, and the ratio between adjacent pixel values should also be approximately the same. If there are defects in the children's wooden toy, then the pixel values at the defect location are different from the pixel values at the normal location. Therefore, by comparing adjacent data in the pixel value matrix, the ratio coefficient between adjacent pixel values is determined. If the analysis of the ratio coefficient determines that the pixel value corresponds to a defect, then the location of the defect in the children's wooden toy can be determined simply by the row and column values corresponding to the pixel value, thus achieving accurate and rapid defect location. Example 3
[0020] Step S300: Compare and analyze the ratio coefficients between adjacent pixel values to obtain abnormal ratio coefficients between adjacent pixel values. This specifically includes the following steps: S301. Based on adjacent matrix row values or adjacent matrix column values, filter the ratio coefficients between adjacent pixel values to obtain a set of ratio coefficients with sorting information. S302. Perform difference calculation on the pairwise adjacent data in the set of proportional coefficients with sorting information to obtain the difference value of adjacent proportional coefficients; It is understandable that if there are no defects in a children's wooden toy, then the pixel values of adjacent areas should be similar because the texture is the same. Therefore, the difference between adjacent data can be calculated. If there are defects, then the difference between the two will not meet the standard. If there are no defects, then the difference between the two will meet the standard. Therefore, by comparing the difference between adjacent proportional coefficients, it can be determined whether there are defects in the children's wooden toy. S303. Perform comparative analysis on the difference between adjacent proportional coefficients to obtain the abnormal proportional coefficients between adjacent pixel values. Specifically, step S303, which involves comparing and analyzing the differences between adjacent proportional coefficients to obtain abnormal proportional coefficients between adjacent pixel values, includes the following steps: S3031. Plot the difference between adjacent scaling coefficients in a one-dimensional spatial coordinate system to obtain a one-dimensional spatial coordinate system containing the difference between adjacent scaling coefficients. S3032. Perform discreteness analysis in a one-dimensional spatial coordinate system containing the difference between adjacent scaling coefficients; S3033. Set the region with the largest clustering of points in a one-dimensional spatial coordinate system containing the difference between adjacent scaling coefficients as the normal scaling coefficient region between adjacent pixel values. S3034. Points in a one-dimensional spatial coordinate system containing the difference between adjacent scaling coefficients that are far from the normal scaling coefficient region between adjacent pixel values are set as abnormal scaling coefficients between adjacent pixel values. In this embodiment, the defect area in the children's wooden toy is much smaller than the normal area. Therefore, the number of pixel values corresponding to the normal area is much greater than the number of pixel values corresponding to the defect area. That is, the difference in normal scaling coefficients is much greater than the difference in abnormal scaling coefficients. Since the pixel values corresponding to the normal area are approximate, the difference in normal scaling coefficients should converge to a certain position in the one-dimensional coordinate system, while the relationship between the difference in abnormal scaling coefficients and that position should be divergent. Therefore, based on the relationship between adjacent scaling coefficient differences in the one-dimensional coordinate system, the abnormal scaling coefficients between adjacent pixel values can be determined. Example 4
[0021] Step S400: Based on the row and column values of the pixel value matrix, the abnormal ratio coefficients between adjacent pixel values are filtered to determine the defect location of the children's wooden toy. This specifically includes the following steps: S401. Perform data extraction processing on the abnormal ratio coefficient between adjacent pixel values to obtain the row and column values corresponding to the abnormal ratio coefficient. S402. Construct a blank matrix with the same dimensions as the pixel value matrix of the image to be analyzed; S403. Fill the blank matrix with the row and column values corresponding to the abnormal proportion coefficients to obtain the abnormal proportion coefficient matrix to be analyzed. S404. Perform data comparison and analysis on the abnormal proportion coefficient matrix to be analyzed to determine the defect location of children's wooden toys. Step S404, which involves performing data comparison and analysis on the anomaly ratio coefficient matrix to be analyzed to determine the defect location of children's wooden toys, specifically includes the following steps: S4041. Perform judgment and processing on the abnormal proportion coefficient matrix to be analyzed; S4042. If there are no other filled data near the data in the abnormal proportion coefficient matrix to be analyzed, the location of the filled data is not a defect location. S4043. If there are other filled data near the filled data in the abnormal proportion coefficient matrix to be analyzed, the location of the filled data is the defect location. In this embodiment, the row and column values of the pixel value matrix are set according to the image height and image width of the grayscale image to be analyzed. That is, the row value of the pixel value matrix is the image width, and the column value is the image height. Since the pixel value of the image represents the image features, the features of the defect can be determined by comparing the pixel values. Then, the location of the defect can be determined based on the row and column values of the defect. It can be understood that the defect is a region, so the pixel value of the defect should be multiple, not just one pixel value. A single abnormal pixel value may be a stain feature. Therefore, it is necessary to analyze the filling data near the abnormal ratio coefficient. If there is other filling data nearby, it means that there are multiple abnormal features in this region, and then this region is the location of the defect. If there is no other filling data nearby, it means that there are no multiple abnormal features in this region, and only one abnormal pixel value. Then, the feature corresponding to this pixel value should be a stain. Once it is determined to be a defect, the location of the defect can be determined simply by the row and column values of the data.
[0022] In a specific embodiment, if there are large stains on the surface of a children's wooden toy, the area with the large stains will be identified as a defect location. In this case, an edge detection algorithm is used to further screen the children's wooden toys that have been identified as defective, and the edge features of the defects are analyzed. It can be understood that the edge features of defects are completely different from the edge features of stains. Therefore, by using an edge detection algorithm to distinguish between stains and defects, the children's wooden toys with stains are avoided from being identified as defective.
[0023] Reference Figure 2 As shown, an image analysis-based defect detection system for children's wooden toys is used to implement the image analysis-based defect detection method for children's wooden toys described above, including: The defect detection terminal is used to control the data transmission and information interaction between various modules. The defect detection terminal is used to control the various modules to perform image preprocessing, matrix calculation, matrix analysis and data filtering on the initial image of the children's wooden toy to determine the location of defects in the children's wooden toy. An industrial camera is used to acquire and process images of children's wooden toys to obtain initial images of the children's wooden toys; An image preprocessing module performs noise reduction processing on the initial image of the children's wooden toy in the frequency domain to obtain the image of the children's wooden toy to be analyzed; An abnormal proportion coefficient determination module is used to perform data calculation and data comparison on the pixel value matrix of the image to be analyzed, and to obtain the abnormal proportion coefficient between adjacent pixel values. The defect location determination module is used to perform data comparison processing on the abnormal ratio coefficient between adjacent pixel values to determine the defect location of the children's wooden toy.
[0024] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A defect detection method for children's wooden toys based on image analysis, characterized in that, include: The initial image of the children's wooden toy is obtained, and the initial image of the children's wooden toy is preprocessed based on frequency domain analysis to obtain the image of the children's wooden toy to be analyzed; Obtain the pixel value matrix of the image to be analyzed, perform data calculation processing on the pixel value matrix of the image to be analyzed, and obtain the ratio coefficient between adjacent pixel values; The proportional coefficients between adjacent pixel values are compared and analyzed to obtain abnormal proportional coefficients between adjacent pixel values. Based on the row and column values of the pixel value matrix, the abnormal ratio coefficients between adjacent pixel values are filtered to determine the location of defects in children's wooden toys.
2. The defect detection method for children's wooden toys based on image analysis according to claim 1, characterized in that, The process of obtaining an initial image of a children's wooden toy, and then performing image preprocessing on the initial image based on frequency domain analysis to obtain the image of the children's wooden toy to be analyzed, specifically includes the following steps: Using an industrial camera, images of different planes of a children's wooden toy are acquired and processed to obtain initial images of the children's wooden toy, including initial images of different planes of the children's wooden toy; Perform data reading and processing on the industrial camera to obtain the parameters set when the industrial camera was taking pictures; Data analysis and processing are performed on the parameters set when the industrial camera is shooting to obtain the type of noise generated in the captured image; Based on the Fourier transform algorithm, the initial image of the children's wooden toy is processed by frequency domain transformation to obtain the frequency domain representation of the initial image; Based on the type of noise generated by the captured image, the frequency domain representation of the initial image is denoised to obtain the image of the children's wooden toy to be analyzed.
3. The defect detection method for children's wooden toys based on image analysis according to claim 2, characterized in that, The steps of obtaining the pixel value matrix of the image to be analyzed, performing data calculations on the pixel value matrix of the image to be analyzed, and obtaining the ratio coefficient between adjacent pixel values specifically include the following steps: The image of the children's wooden toy to be analyzed is binarized to obtain the grayscale image of the children's wooden toy to be analyzed; Data extraction processing is performed on the grayscale image of the children's wooden toy to be analyzed to obtain the dimensional data of the grayscale image to be analyzed, which includes the image height and image width of the grayscale image to be analyzed. A pixel value matrix of the grayscale image to be analyzed is constructed based on the dimensional data and pixel values of the grayscale image to be analyzed. The pixel values in the pixel value matrix of the grayscale image to be analyzed are arranged in the same way as the pixel values in the grayscale image to be analyzed. The pixel values in the pixel value matrix of the image to be analyzed are calculated and processed to obtain the ratio coefficient between adjacent pixel values.
4. The defect detection method for children's wooden toys based on image analysis according to claim 3, characterized in that, The process of calculating and processing the pixel values in the pixel value matrix of the image to be analyzed to obtain the ratio coefficient between adjacent pixel values specifically includes the following steps: The first data point in the top left corner of the pixel value matrix of the image to be analyzed is taken as the starting point for data calculation; Based on the starting point of the data calculation, the ratio calculation is performed on the adjacent pixel values in the same row and column of the starting point of the data calculation to obtain the ratio coefficient between adjacent pixel values. The ratio coefficient between adjacent pixel values includes the row ratio coefficient and the column ratio coefficient between adjacent pixel values. Using the row information of the pixel value matrix as a reference, the remaining pixel values in the pixel value matrix of the image to be analyzed are calculated according to the calculation method of the starting calculation point of the data, and the ratio coefficient between adjacent pixel values is obtained.
5. The defect detection method for children's wooden toys based on image analysis according to claim 4, characterized in that, The step of comparing and analyzing the ratio coefficients between adjacent pixel values to obtain abnormal ratio coefficients between adjacent pixel values specifically includes the following steps: Based on adjacent matrix row values or adjacent matrix column values, the ratio coefficients between adjacent pixel values are filtered to obtain a set of ratio coefficients with sorting information. The difference between adjacent data in the set of proportional coefficients with sorting information is calculated to obtain the difference between adjacent proportional coefficients. By comparing and analyzing the differences between adjacent proportional coefficients, abnormal proportional coefficients between adjacent pixel values can be obtained.
6. The defect detection method for children's wooden toys based on image analysis according to claim 5, characterized in that, The step of comparing and analyzing the differences between adjacent proportional coefficients to obtain abnormal proportional coefficients between adjacent pixel values specifically includes the following steps: Plot the difference between adjacent scaling factors in a one-dimensional spatial coordinate system to obtain a one-dimensional spatial coordinate system containing the difference between adjacent scaling factors. Discreteness analysis is performed in a one-dimensional spatial coordinate system containing the difference between adjacent scaling factors; The region where the points in a one-dimensional spatial coordinate system with the largest clustering of adjacent scaling factor differences is set as the normal scaling factor region between adjacent pixel values. Points in a one-dimensional coordinate system containing the difference between adjacent scaling factors that are far from the normal scaling factor region between adjacent pixel values are set as abnormal scaling factors between adjacent pixel values.
7. The defect detection method for children's wooden toys based on image analysis according to claim 6, characterized in that, The process of filtering out abnormal ratio coefficients between adjacent pixel values based on the row and column values of the pixel value matrix to determine the location of defects in children's wooden toys specifically includes the following steps: Data extraction processing is performed on the abnormal ratio coefficients between adjacent pixel values to obtain the row and column values corresponding to the abnormal ratio coefficients; Construct a blank matrix with the same dimensions as the pixel value matrix of the image to be analyzed; The blank matrix is filled with the row and column values corresponding to the abnormal proportion coefficients to obtain the abnormal proportion coefficient matrix to be analyzed. Data comparison and analysis were performed on the abnormal proportion coefficient matrix to determine the location of defects in children's wooden toys.
8. A defect detection method for children's wooden toys based on image analysis according to claim 7, characterized in that, The process of performing data comparison and analysis on the anomaly ratio coefficient matrix to determine the location of defects in children's wooden toys includes the following steps: The abnormal proportion coefficient matrix to be analyzed is judged and processed; If there are no other filled data near the data in the abnormal proportion coefficient matrix to be analyzed, the location of the filled data is not a defect location; If there are other filled data near the data filled in the abnormal proportion coefficient matrix to be analyzed, the location of the filled data is the defect location.
9. A defect detection system for children's wooden toys based on image analysis, used to implement the defect detection method for children's wooden toys based on image analysis as described in any one of claims 1-8, characterized in that, include: The defect detection terminal is used to control the data transmission and information interaction between various modules. The defect detection terminal is used to control the various modules to perform image preprocessing, matrix calculation, matrix analysis and data filtering on the initial image of the children's wooden toy to determine the location of defects in the children's wooden toy. An industrial camera is used to acquire and process images of children's wooden toys to obtain initial images of the children's wooden toys; An image preprocessing module performs noise reduction processing on the initial image of the children's wooden toy in the frequency domain to obtain the image of the children's wooden toy to be analyzed; An abnormal proportion coefficient determination module is used to perform data calculation and data comparison on the pixel value matrix of the image to be analyzed, and to obtain the abnormal proportion coefficient between adjacent pixel values. The defect location determination module is used to perform data comparison processing on the abnormal ratio coefficient between adjacent pixel values to determine the defect location of the children's wooden toy.