An image recognition system and method for marking mobile phone exteriors
By adopting a picture recognition system in the detection of glass surface defects of smartphones and using machine vision automatic detection, the problems of low efficiency and high cost in the prior art are solved, and high accuracy and efficient defect detection are achieved.
Patent Information
- Application Number
- CN202210205903.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-03-03
AI Technical Summary
In the detection of glass surface defects in smartphones, there is a high labor intensity, high production cost, low efficiency in manual testing, and it is difficult to ensure the high accuracy and reliability of the detection results, especially in harsh production environments.
A picture recognition system for mobile phone appearance marking is adopted, including image preprocessing module, image segmentation module, feature extraction module and network training module. Through automatic detection of machine vision, the quality inspection efficiency of mobile phone accessories is improved and production costs are reduced.
It realizes high accuracy and reliability of mobile phone appearance defect detection, improves detection efficiency, reduces production costs, and is suitable for data processing and analysis in large-scale production.
Smart Images

Figure CN114612399B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of mobile phone detection, and in particular relates to a picture recognition system and method for mobile phone appearance markings. Background Art
[0002] The big data stream generated by smartphone glass surface defect detection and manufacturing process aggregation shows the characteristics of large volume, multiple categories, fast speed, high uncertainty and difficulty in identification, which usually leads to the failure of traditional defect detection and quality diagnosis methods. Compared with manual inspection, the mobile phone appearance defect detection algorithm based on deep learning can control the production quality of products through real-time quality inspection, effectively improve the production efficiency of enterprises, reduce human resources, and reduce production costs. It provides new ideas for the processing and analysis of big data in the large-scale production process of smartphones and promotes the agglomeration and development of the smartphone industry.
[0003] At present, mobile phone manufacturers generally use manual inspection methods to detect various defects of mobile phone partitions. This inspection method has many disadvantages due to the interference of human factors, such as high labor intensity, high production cost and low efficiency, which makes manual inspection work monotonous and boring. It is difficult to ensure the high accuracy and reliability of the inspection results by hand feeling and visual inspection. The lack of unified inspection standards causes inconsistency in product inspection. The use of partial sampling for inspection will cause inaccurate statistics and it is difficult to avoid missed inspections. In some harsh production environments, manual inspection cannot be carried out. Manual inspection cannot timely and accurately count the inspection data, so that the data cannot be analyzed in time to regulate product production. Summary of the invention
[0004] In view of this, the present invention provides a picture recognition system and method for mobile phone appearance markings, which has the reliability, rapidity and stability of computer combined with human vision machine vision automatic detection, improves the quality inspection efficiency of mobile phone accessories, and reduces production costs. It is specifically implemented by the following technical solutions.
[0005] In a first aspect, the present invention provides a picture recognition system for mobile phone appearance markings, comprising:
[0006] An image preprocessing module is used to obtain an area of interest marked by a user on the appearance of a mobile phone. The area of interest is a subset of the image to be detected, which is a partial area extracted from the image. The partial area is composed of multiple irregular shapes.
[0007] An image segmentation module is used to segment the image to be detected into two or more non-overlapping areas according to the similarity criteria of preset grayscale, color, texture and shape features;
[0008] The feature extraction module is used to segment the image into regions according to the connected components as the target object for subsequent feature extraction. The two-connected components are the pixels connected together according to the preset rules in the binary image. The grayscale threshold segmentation is used to extract the region below the target value and convert it into a binary image. The connected domain analysis is performed according to the pixel adjacency mode, and small noise points are removed according to the area size.
[0009] The network training module is used for the mapping relationship from input to output of data. Through training, the best mapping function that best reflects the target task is found. High-dimensional abstract features are used to represent low-dimensional target features. The network training module includes convolutional layers and pooling layers. Each layer includes training parameters. Each layer extracts a feature of the input data through a convolution kernel from multiple feature maps. Each feature map contains multiple neurons, and different neurons are interconnected. The convolutional layer is used to extract the features of the input data. Convolutional layers of different sizes represent receptive fields of different sizes. The pooling layer obtains the maximum value from the sub-matrix of the input matrix, and the average pooling obtains the mean from the input matrix.
[0010] As a further improvement of the above technical solution, the image preprocessing module includes a denoising unit, which uses two structural elements of different sizes to perform a top-hat transform on the image. First, a structural element with a size larger than the sand grain point is selected to perform a top-hat transform on the image to be tested, so that the residual sand grain points and noise points are highlighted. Then, a structural element with a size smaller than the sand grain point is selected to perform a top-hat exchange on the image to be tested, and the difference between the two top-hat transformations is used as the output result of the preprocessing enhancement.
[0011] As a further improvement of the above technical solution, the image preprocessing module also includes a support line processing unit, which is used to simply divide the silk screen area and the screen area, extract and extend the support lines of the screen area, and then remove the support lines covering the silk screen area to obtain a complete support line area to be removed, wherein the support lines in the image are thin lines that run through the cover of the smartphone near the upper and lower ends, and the contact part is the back of the image.
[0012] As a further improvement of the above technical solution, the execution process of the support line processing unit includes the following steps:
[0013] Operate the camera to take a photo in a dark environment with zero light input, and obtain the offset G of each pixel, expressed as f E (x,y)=K*i(x,y)t+G, where f E (x, y) is the grayscale value of the pixel obtained in a dark environment, K is the conversion relationship, the unit is grayscale / electron, i(x, y) is the dark current of a specific pixel in a dark field, t is the time it takes for the line scan camera to acquire one frame or one line, and G is the offset value of the image;
[0014] Under uniform illumination conditions, an object with a flat surface is imaged once to obtain a bright field image. The expression for bright field correction is: E0 (x,y)=η(x,y)X0+K*i(x,y)t+G, where f E0 (x, y) is the pixel grayscale value obtained under uniform illumination, η(x, y) is the conversion sensitivity relationship of a specific pixel to light, and X0 is the brightness constant;
[0015] When shooting a corrected image in the actual environment, the change in brightness X(x,y) represents the image characteristics, and the expression is: f(x,y)=η(x,y)X(x,y)+K*i(x,y)t+G. According to the above expression, we can get X0 is a constant, f E0 (x, y) is known, and the grayscale function of the pixels in the acquired graphics is multiplied by a uniform value to make an overall grayscale change to the entire image without losing the detailed information of the image.
[0016] As a further improvement of the above technical solution, the convolutional layer performs the following process on the entire input matrix:
[0017] An element-by-element dot product is performed between a submatrix of the input matrix and the receptive field, where the receptive field is the filter kernel, and the initial weight value of the receptive field is randomly generated, and the bias is set according to the configuration of the network;
[0018] The weights of the receptive field and the bias of the network are trained using the stochastic gradient descent algorithm. The size of the submatrix is equal to the size of the receptive field, but the receptive field is smaller than the input matrix. The multiplied values are summed and the bias is added to the summed value.
[0019] As a further improvement of the above technical solution, the execution process of the image segmentation module is as follows: the image f(x, y) consists of two parts: background and foreground. A grayscale threshold T is determined according to the expression Pixels are classified. Any point (x, y) that satisfies the input image function is called a target point and is labeled as 1. The remaining pixels are called background points and are labeled as 0. The target area and the background area of the image are segmented using grayscale segmentation. When T is a constant, g(x, y) is a binary image after threshold processing.
[0020] As a further improvement of the above technical solution, during the detection process, the background image of the object to be inspected before being transported to the detection platform and the image to be inspected transported to the detection platform are photographed in real time, the two images are integrated into the same size and matched, and residual processing is performed pixel by pixel to obtain the final residual denoising effect image, g(x,y)=f1(x,y)-f2(x,y), g(x,y) represents the pixel value of the effect image after residual denoising, f1(x,y) is the pixel value of the image to be inspected, and f2(x,y) is the pixel value of the background image of the detection platform.
[0021] As a further improvement of the above technical solution, the execution process of the network training module includes the following steps:
[0022] Input the preprocessed curved transparent sample image into the network, and extract the image features through the convolutional neural network to generate a feature map;
[0023] The feature map is input into the RPN network to generate a series of candidate boxes and map them to the feature map generated by the convolutional neural network. The generated candidate regions are used as the input of the ROI pooling layer. The candidate regions passing through the ROI pooling layer will generate feature maps of fixed sizes.
[0024] The fixed-size feature map after the ROI Pooling layer is input into the fully connected layer for classification and position correction.
[0025] In a second aspect, the present invention further provides a method for image recognition of mobile phone appearance markings, comprising the following steps:
[0026] Obtaining the region of interest of the appearance of the mobile phone marked by the user, where the region of interest is a subset of the image to be detected, which is a partial region extracted from the image, and the partial region is composed of multiple irregular shapes;
[0027] The image to be detected is divided into two or more non-overlapping areas according to the preset similarity criteria of grayscale, color, texture and shape features;
[0028] The area segmented from the image is used as the target object for subsequent feature extraction according to the connected components. The two-way components are used to mark the pixels connected together according to the preset rules in the binary image. The grayscale threshold segmentation is used to extract the area below the target value and convert it into a binary image. The connected domain analysis is performed according to the pixel adjacency mode, and small noise points are removed according to the area size.
[0029] The mapping relationship between data from input to output, through training, finds the best mapping function that best reflects the target task, and uses high-dimensional abstract features to represent low-dimensional target features. The network training module includes convolutional layers and pooling layers. Each layer includes training parameters. Each layer extracts a feature of the input data through a convolution kernel from multiple feature maps. Each feature map contains multiple neurons, and different neurons are interconnected. The convolutional layer is used to extract the features of the input data. Convolutional layers of different sizes represent receptive fields of different sizes. The pooling layer obtains the maximum value from the sub-matrix of the input matrix, and the average pooling obtains the mean from the input matrix.
[0030] The present invention provides a system and method for image recognition of mobile phone appearance markings, which has the following beneficial effects compared with the prior art:
[0031] By obtaining the region of interest marked by the user on the appearance of the mobile phone, the region of interest is a subset of the image to be detected, which is a partial area extracted from the image. The partial area is composed of multiple irregular shapes. The image to be detected is divided into two or more non-overlapping areas according to the preset similarity criteria of grayscale, color, texture and shape features. The area segmented from the image is used as the target object for subsequent feature extraction according to the connected components. The two-way components are marked as pixels connected together according to preset rules in the binary image. The mapping relationship of data from input to output is used to find the best mapping function that best reflects the target task through training. High-dimensional abstract features are used to represent low-dimensional target features. The network training module includes convolutional layers and pooling layers, which solves the problems of single data samples and small data volume in the actual production process. Different data amplifications are used to increase the data volume, make the data samples richer, and improve the precision and accuracy of defective part extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 It is a structural block diagram of the picture recognition system for mobile phone appearance marking of the present invention;
[0034] Figure 2 FIG. 1 is a diagram showing the execution process of the support line processing unit of the present invention;
[0035] Figure 3 is a diagram of the execution process of the network training module of the present invention;
[0036] Figure 4The present invention is a flow chart of a method for image recognition of mobile phone appearance markings. DETAILED DESCRIPTION
[0037] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0038] See also Figure 1 The present invention provides a picture recognition system for mobile phone appearance markings, comprising:
[0039] An image preprocessing module is used to obtain an area of interest marked by a user on the appearance of a mobile phone. The area of interest is a subset of the image to be detected, which is a partial area extracted from the image. The partial area is composed of multiple irregular shapes.
[0040] An image segmentation module is used to segment the image to be detected into two or more non-overlapping areas according to the similarity criteria of preset grayscale, color, texture and shape features;
[0041] The feature extraction module is used to segment the image into regions according to the connected components as the target object for subsequent feature extraction. The two-connected components are the pixels connected together according to the preset rules in the binary image. The grayscale threshold segmentation is used to extract the region below the target value and convert it into a binary image. The connected domain analysis is performed according to the pixel adjacency mode, and small noise points are removed according to the area size.
[0042] The network training module is used for the mapping relationship from input to output of data. Through training, the best mapping function that best reflects the target task is found. High-dimensional abstract features are used to represent low-dimensional target features. The network training module includes convolutional layers and pooling layers. Each layer includes training parameters. Each layer extracts a feature of the input data through a convolution kernel from multiple feature maps. Each feature map contains multiple neurons, and different neurons are interconnected. The convolutional layer is used to extract the features of the input data. Convolutional layers of different sizes represent receptive fields of different sizes. The pooling layer obtains the maximum value from the sub-matrix of the input matrix, and the average pooling obtains the mean from the input matrix.
[0043] In this embodiment, the image preprocessing module includes a denoising unit, which uses two structural elements of different sizes to perform a top-hat transformation on the image. First, a structural element with a size larger than the sand grain point is selected to perform a top-hat transformation on the image to be tested, so that the residual sand grain points and noise points are protruded, and then a structural element with a size smaller than the sand grain point is selected to perform a top-hat exchange on the image to be tested, and the difference between the two top-hat transformations is used as the output result of the preprocessing enhancement. The image preprocessing module also includes a support line processing unit, which is used to simply divide the silk screen area and the screen area, extract and extend the support lines of the screen area, and then remove the support lines covering the silk screen area by difference to obtain a complete support line area to be removed, wherein the support lines in the image are thin lines that run through the cover of the smartphone near the upper and lower ends, and the contact part is the back of the image.
[0044] It should be noted that the convolutional layer performs the following process in the entire input matrix: perform element-by-element dot product between the submatrix of the input matrix and the receptive field, the receptive field is the filter kernel, the initial weight value of the receptive field is randomly generated, and the bias is set according to the configuration of the network; the weight of the receptive field and the bias of the network are trained using the stochastic gradient descent algorithm, the size of the submatrix is equal to the size of the receptive field, but the receptive field is smaller than the input matrix, the multiplied values are summed, and the bias is added to the summed value. The execution process of the image segmentation module is: the image f(x, y) consists of two parts, the background and the foreground. Determine a grayscale threshold T, according to the expression Pixels are classified. Any point (x, y) that satisfies the input image function is called a target point and is labeled as 1. The remaining pixels are called background points and are labeled as 0. The target area and the background area of the image are segmented using grayscale segmentation. When T is a constant, g(x, y) is a binary image after threshold processing.
[0045] It should be understood that the appearance defects of curved transparent glass have high requirements for the imaging system. High-quality source images are the basis for improving the robustness of subsequent detection algorithms. Good source images have the characteristics of target and background separation and high contrast, uniform image brightness, and are conducive to subsequent image processing. The background needs to be uniform and not interfere with the target image, and for highly reflective targets, it is not required to be overexposed. The noise of the detection image has been effectively suppressed after the improved top hat transform filter processing, and the grayscale image of the protruding sand area is obtained. The next step is to use the threshold segmentation technology to convert the pre-processed image into a binary image. In order to segment more complete sand points, threshold selection is the key. The difficulty of segmentation is that for most images, it is easy to miss when the threshold is large, and the noise is completely removed when the threshold is small, and it is difficult to get a perfect effect. In order to adapt to the differences between different images and achieve better segmentation effects, the threshold t is expressed by t=k*max(f d ) is selected, where f dThis is the result of the detection image after the improved top hat transformation filtering. k is a constant, indicating that the threshold t is f d Multiples of the maximum response grayscale value. In order to accurately detect sand grain points and eliminate interference, the targets can be further screened out based on the geometric characteristics of the sand grain area, using features such as area, aspect ratio and grayscale value.
[0046] See also Figure 2 Optionally, the execution process of the support line processing unit includes the following steps:
[0047] S20: Operate the camera to take a photo in a dark environment with zero light input, and obtain the offset G of each pixel, expressed as f E (x,y)=K*i(x,y)t+G, where f E (x, y) is the grayscale value of the pixel obtained in a dark environment, K is the conversion relationship, the unit is grayscale / electron, i(x, y) is the dark current of a specific pixel in a dark field, t is the time it takes for the line scan camera to acquire one frame or one line, and G is the offset value of the image;
[0048] S21: Under uniform illumination conditions, an object with a flat surface is imaged once to obtain a bright field image. The expression for bright field correction is: f E0 (x,y)=η(x,y)X0+K*i(x,y)t+G, where f E0 (x, y) is the pixel grayscale value obtained under uniform illumination, η(x, y) is the conversion sensitivity relationship of a specific pixel to light, and X0 is the brightness constant;
[0049] S22: Shoot a corrected image in the actual environment. The change in brightness X(x,y) represents the image characteristics. The expression is: f(x,y)=η(x,y)X(x,y)+K*i(x,y)t+G. According to the above expression, we can get X0 is a constant, f E0 (x, y) is known, and the grayscale function of the pixels in the acquired graphics is multiplied by a uniform value to make an overall grayscale change to the entire image without losing the detailed information of the image.
[0050] In this embodiment, during the detection process, the background image of the object to be detected before being transported to the detection platform and the image to be detected being transported to the detection platform are photographed in real time, the two images are integrated into the same size and matched, and residual processing is performed pixel by pixel to obtain the final residual denoising effect map, g(x,y)=f1(x,y)-f2(x,y), g(x,y) represents the pixel value of the effect map after residual denoising, f1(x,y) is the pixel value of the image to be detected, and f2(x,y) is the pixel value of the background image of the detection platform. The support line mainly has the characteristics that the grayscale range of the thin line overlaps with the background, and there is no obvious overlap with the silk screen area and the screen area. The method of removing the pixels at a fixed position during processing is not feasible. The support line must be accurately extracted based on the characteristics of the support line and then denoised.
[0051] It should be noted that after extracting the support lines, the support lines are removed. Directly removing the support lines will leave traces on the image, limiting the processing of subsequent defect detection. The support line area is covered and filled with the grayscale values of the surrounding background pixels to construct a restored mobile phone glass cover image, leaving sufficient processing space for subsequent defect detection. Due to the existence of the support lines, the serious impact of the mean filter is that it will lower the grayscale values of the surrounding pixels, darken the background as a whole, and cause serious interference to the defect extraction. The median filter effect makes the support lines completely removed, but at the edge of the silk screen where the pixel grayscale suddenly changes, the silk screen area will spread to both sides and blur the silk screen boundary.
[0052] See also Figure 3 Optionally, the execution process of the network training module includes the following steps:
[0053] S30: input the preprocessed curved transparent sample image into the network, extract image features through the convolutional neural network to generate a feature map;
[0054] S31: Input the feature map into the RPN network, generate a series of candidate boxes and map them to the feature map generated by the convolutional neural network, and use the generated candidate area as the input of the ROI pooling layer. The candidate area after the ROI pooling layer will generate a feature map of a fixed size;
[0055] S32: The fixed-size feature map after the ROI Pooling layer is input into the fully connected layer for classification and position correction.
[0056] In this embodiment, target detection needs to go through two stages of training and testing, and the preparation of data and network initialization parameter settings will be completed before training. The Faster R-CNN algorithm is usually pre-trained on the ImageNet data set to initialize the network and fine-tune the network parameters. The newly added network layer is randomly initialized using a Gaussian distribution function, where the standard deviation and mean are 0.01 and 0, respectively. The update speed of the weights during network training is related to the learning rate of the network. If the value is set too large, it will cause overfitting, and if it is too small, it will cause the network to decline too slowly. The learning rate is generally set according to the rules of 1, 0.5, 0.1, 0.01, 0.005, etc., but the specific situation needs to be compared and judged in combination with the sample and network situation. When the learning rate is set too large, the loss first decreases with the increase of the number of iterations and then does not converge. When the learning rate is set small, the loss decreases with the number of iterations and converges but shrinks slowly. The appropriate learning rate will converge quickly, and the network training model has the best effect at this time.
[0057] See also Figure 4 The present invention also provides a method for image recognition of mobile phone appearance markings, comprising the following steps:
[0058] S40: obtaining an area of interest of the appearance of the mobile phone marked by the user, where the area of interest is a subset of the image to be detected, which is a partial area extracted from the image, and the partial area is composed of multiple irregular shapes;
[0059] S41: Segmenting the image to be detected into two or more non-overlapping regions according to a preset similarity criterion of grayscale, color, texture and shape features;
[0060] S42: The region segmented from the image is used as the target object for subsequent feature extraction according to the connected components, and the two-way components are the pixels connected together according to the preset rules in the binary image. The grayscale threshold segmentation is used to extract the region below the target value and convert it into a binary image, and the connected domain analysis is performed according to the pixel adjacency mode, and small noise points are removed according to the area size;
[0061] S43: The mapping relationship between data from input to output. Through training, the best mapping function that best reflects the target task is found. High-dimensional abstract features are used to represent low-dimensional target features. The network training module includes convolutional layers and pooling layers. Each layer includes training parameters. Each layer extracts a feature of the input data through a convolution kernel from multiple feature maps. Each feature map contains multiple neurons, and different neurons are interconnected. The convolutional layer is used to extract the features of the input data. Convolutional layers of different sizes represent receptive fields of different sizes. The pooling layer obtains the maximum value from the sub-matrix of the input matrix, and the average pooling obtains the mean from the input matrix.
[0062] In this embodiment, the sub-matrix summarized by the input matrix is convolved with the value of the receptive field and the bias is added and assigned to the corresponding position of the output, which reduces the size of the input data, thereby reducing the computational cost. The additional parameter of the convolution layer is the stride of the convolution, which defines the number of times the column and row pixels of the receptive field slide on the width and height of the input matrix at a time. A larger stride will reduce the number of times the receptive field is applied and a smaller output size. In order to reduce the spatial size of the input matrix, CNN introduces a pooling layer that uses the downsampling principle, with two different options: maximum pooling and average pooling. Maximum pooling obtains the maximum value from the sub-matrix of the input matrix, while average pooling obtains the mean value from the input matrix, so as to improve the accuracy and detection efficiency of mobile phone appearance recognition.
[0063] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.
[0064] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0065] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A picture recognition system for mobile phone appearance markings, characterized in that: include: An image preprocessing module is used to obtain an area of interest marked by a user on the appearance of a mobile phone. The area of interest is a subset of the image to be detected, which is a partial area extracted from the image. The partial area is composed of multiple irregular shapes. An image segmentation module is used to segment the image to be detected into two or more non-overlapping areas according to the similarity criteria of preset grayscale, color, texture and shape features; The feature extraction module is used to segment the image into regions according to the connected components as the target object for subsequent feature extraction. The two-connected components are the pixels connected together according to the preset rules in the binary image. The grayscale threshold segmentation is used to extract the region below the target value and convert it into a binary image. The connected domain analysis is performed according to the pixel adjacency mode, and small noise points are removed according to the area size. The network training module is used for the mapping relationship from input to output of data. Through training, the best mapping function that best reflects the target task is found. High-dimensional abstract features are used to represent low-dimensional target features. The network training module includes convolutional layers and pooling layers. Each layer includes training parameters. Each layer extracts a feature of the input data through a convolution kernel from multiple feature maps. Each feature map contains multiple neurons, and different neurons are interconnected. The convolutional layer is used to extract the features of the input data. Convolutional layers of different sizes represent receptive fields of different sizes. The pooling layer obtains the maximum value from the submatrix of the input matrix, and the average pooling obtains the mean value from the input matrix. The image preprocessing module also includes a support line processing unit, which is used to simply divide the silk screen area and the screen area, extract and extend the support lines of the screen area, and then remove the support lines covering the silk screen area by subtraction to obtain a complete support line area to be removed, wherein the support lines in the image are thin lines running through the cover of the smartphone near the upper and lower ends, and the contact part is the back of the image; The execution process of the support line processing unit includes the following steps: Operate the camera to take a photo in a dark environment with zero light input, and obtain the offset of each pixel , the expression is ,in is the pixel gray value obtained in a dark environment, For the conversion relationship, the unit is grayscale / electron, is the dark current of a specific pixel in dark field, The time to acquire one frame or line for a line scan camera, is the offset value of the image; Under uniform illumination conditions, an object with a flat surface is imaged once to obtain a bright field image. The expression for bright field correction is: ,in is the pixel grayscale value obtained under uniform illumination, is the sensitivity relationship of a specific pixel to light conversion, is the brightness constant; Take a corrected image of the actual environment, the brightness The change represents the image feature, and the expression is: According to the above expression, we can get , is a constant, It is known that in the collected graphics, the grayscale function of the pixels is multiplied by a uniform value to make an overall grayscale change on the entire image without losing the detailed information of the image.
2. The image recognition system for mobile phone appearance marking according to claim 1, characterized in that: The image preprocessing module includes a denoising unit. The denoising unit uses two structural elements of different sizes to perform a top-hat transform on the image. First, a structural element with a size larger than the sand grain point is selected to perform a top-hat transform on the image to be tested, so that the residual sand grain points and noise points can be protruded. Then, a structural element with a size smaller than the sand grain point is selected to perform a top-hat exchange on the image to be tested, and the difference between the two top-hat transformations is used as the output result of the preprocessing enhancement.
3. The image recognition system for mobile phone appearance marking according to claim 1, characterized in that: The convolutional layer performs the following process on the entire input matrix: An element-by-element dot product is performed between a submatrix of the input matrix and the receptive field, where the receptive field is the filter kernel, and the initial weight value of the receptive field is randomly generated, and the bias is set according to the configuration of the network; The weights of the receptive field and the bias of the network are trained using the stochastic gradient descent algorithm. The size of the submatrix is equal to the size of the receptive field, but the receptive field is smaller than the input matrix. The multiplied values are summed and the bias is added to the summed value.
4. The image recognition system for mobile phone appearance marking according to claim 1, characterized in that: The execution process of the image segmentation module is as follows: It consists of two parts: background and foreground. Determine a grayscale threshold , according to the expression To classify pixels, any point that satisfies the input image function is called the target point and marked as 1, and the remaining pixels are called background points and marked as 0. The image target area and background area are segmented by grayscale segmentation. When is a constant, is a binary image after threshold processing.
5. The image recognition system for mobile phone appearance marking according to claim 4, characterized in that: During the inspection process, the background image of the object to be inspected before being transported to the inspection table and the image to be inspected transported to the inspection table are photographed in real time. The two images are integrated into the same size and matched. The residual processing is performed pixel by pixel to obtain the final residual denoising effect image. , Represents the pixel value of the residual denoising effect image, is the pixel value of the image to be tested, is the pixel value of the background image of the detection platform.
6. The image recognition system for mobile phone appearance marking according to claim 1, characterized in that: The execution process of the network training module includes the following steps: Input the preprocessed curved transparent sample image into the network, and extract the image features through the convolutional neural network to generate a feature map; The feature map is input into the RPN network to generate a series of candidate boxes and map them to the feature map generated by the convolutional neural network. The generated candidate regions are used as the input of the ROI pooling layer. The candidate regions passing through the ROI pooling layer will generate feature maps of fixed sizes. The fixed-size feature map after the ROI Pooling layer is input into the fully connected layer for classification and position correction.
7. A method for image recognition of mobile phone appearance marks in a system for image recognition of mobile phone appearance marks according to any one of claims 1 to 6, characterized in that: The steps include: Obtaining the region of interest of the appearance of the mobile phone marked by the user, where the region of interest is a subset of the image to be detected, which is a partial region extracted from the image, and the partial region is composed of multiple irregular shapes; The image to be detected is divided into two or more non-overlapping areas according to the preset similarity criteria of grayscale, color, texture and shape features; The area segmented from the image is used as the target object for subsequent feature extraction according to the connected components. The two-way components are used to mark the pixels connected together according to the preset rules in the binary image. The grayscale threshold segmentation is used to extract the area below the target value and convert it into a binary image. The connected domain analysis is performed according to the pixel adjacency mode, and small noise points are removed according to the area size. The mapping relationship between data from input to output, through training, finds the best mapping function that best reflects the target task, and uses high-dimensional abstract features to represent low-dimensional target features. The network training module includes convolutional layers and pooling layers. Each layer includes training parameters. Each layer extracts a feature of the input data through a convolution kernel from multiple feature maps. Each feature map contains multiple neurons, and different neurons are interconnected. The convolutional layer is used to extract the features of the input data. Convolutional layers of different sizes represent receptive fields of different sizes. The pooling layer obtains the maximum value from the sub-matrix of the input matrix, and the average pooling obtains the mean from the input matrix.
Citation Information
Patent Citations
Orchard disease and insect monitoring and early warning method and system
CN112418112A
Method for identifying transparent tube type, pathological tube type and mucus silk in urinary sediment
CN112598620A