A metal can intelligent perception method and system based on human-computer interaction
Through the intelligent perception method of metal can based on human-computer interaction, using image preprocessing and edge detection technology, combined with user interaction to adjust feature values, the problem of difficulty in detection in a multi-metal environment is solved, and high accuracy and Targeted metal can inspection.
Patent Information
- Application Number
- CN202311439925.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2043-10-31
AI Technical Summary
Traditional metal detectors have difficulty accurately detecting fixed metal objects, such as metal cans, in multiple metals.
Using a metal can intelligent perception method based on human-computer interaction, the characteristic threshold value when there is no metal can be detected in advance, and the user is detected in real time to adjust the characteristic value, and the threshold value is compared to determine the existence of the metal can. The method includes image preprocessing, edge detection and feature extraction, and uses manual adjustment to improve detection accuracy.
It realizes high accuracy detection for specific metal objects, overcomes the difficulty of detection in a multi-metal environment in traditional technology, and provides highly targeted and accurate metal can detection capabilities.
Smart Images

Figure CN117409225B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of metal detection, and in particular to a metal can intelligent sensing method and system based on human-computer interaction. Background Art
[0002] In general methods, metal is detected mainly through metal detection instruments, which include a transmitting coil and a receiving coil. When current is connected to the transmitting coil, electromagnetic induction can be generated to produce a primary field. If there is metal in the environment, the metal is conductive and can interfere with the electromagnetic field of the transmitting coil, forming a secondary field, which in turn causes the electromagnetic field in the space to change. As a result, the electromagnetic field in the environment is different when there are metal objects and when there are no metal objects. This difference is picked up by the receiving coil, which can generate different induced voltages when there are no metal objects. The control device can identify the presence of metal objects in the environment based on the size of the induced voltage and then send out a signal prompt.
[0003] However, if you want to detect a fixed metal object among multiple metals, such as a metal can, it cannot be achieved by using a metal detector. Summary of the invention
[0004] The embodiments of the present invention provide a metal can intelligent perception method and system based on human-computer interaction, which can detect specific metal objects with strong pertinence and high accuracy.
[0005] The present invention provides a metal can intelligent perception method based on human-computer interaction, the method comprising:
[0006] Pre-acquire a first characteristic threshold value indicating that there is no metal can in the detection area;
[0007] Detecting the detection area in real time to obtain a second characteristic value;
[0008] Sending the acquired second characteristic value to the human-computer interaction terminal, instructing the human-computer interaction terminal to modify the second characteristic value;
[0009] Receiving a third characteristic value sent by the human-computer interaction terminal, wherein the third characteristic value is obtained by modifying the second characteristic value by a user;
[0010] Comparing the first characteristic threshold and the third characteristic value to determine whether the metal can exists in the detection area;
[0011] The detection result is sent to the human-computer interaction terminal.
[0012] In one embodiment, the step of pre-acquiring a first characteristic threshold indicating that there is no metal can in the detection area includes:
[0013] photographing the detection area to obtain a corresponding image;
[0014] Performing image enhancement processing, image grayscale processing and image filtering processing on the image;
[0015] Traversing all image segmentation methods of the image, selecting the best segmentation method, and generating a plurality of sub-images accordingly;
[0016] Performing edge detection on the plurality of sub-images by using an edge detection algorithm;
[0017] Perform feature extraction on the edge-detected image to obtain a first feature threshold.
[0018] In one embodiment, traversing all image segmentation methods of the image and selecting the best segmentation method includes:
[0019] Each time the segmentation method is traversed, the number of pixels in each gray level of each sub-image is counted and the pixel set is divided;
[0020] Calculate the proportion of the pixel set in each gray level in the entire gray level;
[0021] According to the proportion, the probability normal distribution of each pixel is obtained, the entire grayscale is traversed, and the inter-class probability of each grayscale value is calculated;
[0022] The segmentation method with the largest inter-class probability is selected as the best segmentation method.
[0023] In one embodiment, the first feature threshold is an image edge pixel;
[0024] The obtaining of the first feature threshold comprises:
[0025] Perform canny edge detection on the preprocessed image and calculate the gradient amplitude and gradient direction of the image;
[0026] According to the best segmentation method, the edge pixels of the image are obtained.
[0027] In one embodiment, the gradient amplitude The gradient direction c = arctan2(a,b), where a is the partial derivative of the image in the x direction and b is the partial derivative of the image in the y direction.
[0028] In one embodiment, obtaining edge pixels of the image according to the optimal segmentation method includes:
[0029] After determining the best segmentation method, a sub-image including the metal can is selected from the entire image;
[0030] Count the edge pixels in the sub-image containing the metal can;
[0031] Add up the edge pixels of each sub-image.
[0032] In one embodiment, selecting the sub-image including the metal can from the entire image includes:
[0033] Pre-acquire the pixel value of the metal can in the image;
[0034] According to the pixel value, a sub-image containing the pixel value is selected from the entire image.
[0035] In one embodiment, comparing the first characteristic threshold and the third characteristic value to determine whether the metal can exists in the detection area includes:
[0036] It is determined whether the third characteristic value is greater than the first characteristic threshold value, and if so, it is determined that the metal can exists in the detection area.
[0037] In one embodiment, the second characteristic value Wherein, N is the number of rows of the multiple sub-images in the image; M is the number of columns of the multiple sub-images in the image; and xj(k) is the eigenvalue of the sub-image in the jth column and the kth row.
[0038] On the other hand, the present application provides a metal can intelligent sensing system based on human-computer interaction, the system comprising:
[0039] A first acquisition module is used to pre-acquire a first characteristic threshold value representing that there is no metal can in the detection area;
[0040] A second acquisition module, used for detecting the detection area in real time and acquiring a second characteristic value;
[0041] A transmission module, used to send the acquired second characteristic value to the human-computer interaction terminal, and instruct the human-computer interaction terminal to modify the second characteristic value;
[0042] A receiving module, configured to receive a third characteristic value sent by the human-computer interaction terminal, wherein the third characteristic value is obtained by modifying the second characteristic value by a user;
[0043] A judgment module, used for comparing the first characteristic threshold and the third characteristic value to determine whether the metal can exists in the detection area;
[0044] A sending module is used to send the detection result to the human-computer interaction terminal.
[0045] In the embodiment of the present invention, by pre-acquiring a first characteristic threshold value indicating that there is no metal can in the detection area and real-time detecting the second characteristic value obtained by the detection area, the second characteristic value is manually improved to obtain a more accurate third characteristic value, and by comparing the first characteristic threshold value and the third characteristic value, it is determined that the metal can exists in the detection area. Compared with the detection using a metal detector in the traditional technology, this solution can detect specific metal objects, which is highly targeted and accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0047] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0048] Figure 1 This is a schematic diagram of the implementation process of a metal can intelligent perception method based on human-computer interaction according to an embodiment of the present invention;
[0049] Figure 2 This is a structural diagram of a metal can intelligent sensing system based on human-computer interaction according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions 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 only 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0051] like Figure 1 As shown, the present invention provides a metal can intelligent perception method based on human-computer interaction, characterized in that the method includes:
[0052] Step 101, pre-acquire a first characteristic threshold indicating that there is no metal can in the detection area;
[0053] Step 102, real-time detection of the detection area to obtain a second characteristic value;
[0054] Step 103, sending the acquired second characteristic value to the human-computer interaction terminal, instructing the human-computer interaction terminal to modify the second characteristic value;
[0055] Step 104, receiving a third characteristic value sent by the human-computer interaction terminal, wherein the third characteristic value is obtained by modifying the second characteristic value by the user;
[0056] Step 105, comparing the first characteristic threshold and the third characteristic value to determine whether there is a metal can in the detection area;
[0057] Step 106, sending the detection result to the human-computer interaction terminal.
[0058] In this embodiment, in step 101, the specific method of obtaining the first characteristic threshold is:
[0059] Step 1011, photographing the inspection area with a camera to obtain an image including the inspection area, wherein the image does not include the metal can;
[0060] Step 1012, then preprocessing the image, the preprocessing includes image enhancement processing, image grayscale processing and image filtering processing;
[0061] Among them, image enhancement processing includes the following methods:
[0062] 1. Histogram equalization: The histogram represents the statistics between each gray level in a digital image and its frequency of occurrence. The histogram can give a description of the overall distribution of the image, the gray range of the image, and the approximate distribution of the gray levels. Transforming the histogram of the original image into a histogram with a fixed frequency of each gray value is called histogram equalization, which is effective for images with a narrow dynamic range and unclear colors.
[0063] 2. Contrast enhancement: When the image is underexposed or overexposed, or the image recording device has a narrow range, there will be a problem of insufficient contrast. Therefore, it is necessary to transform the image grayscale and expand the grayscale range of the image to achieve the purpose of image enhancement.
[0064] 3. Median filtering: The idea of median filtering is to sort the grayscale values of pixels in the window, and use the middle value after sorting as the grayscale value of the pixel in the center of the window. This type of filtering is also a smoothing filter.
[0065] 4. Wavelet transform image enhancement: Wavelet transform can change the relevant wavelet parameters during image decomposition and reconstruction. It has good localization characteristics in spatial domain and rate domain, and uses gradually finer time domain or spatial domain steps for high frequencies.
[0066] Image grayscale processing includes the following:
[0067] 1. Maximum value method: directly take the value of the largest component among the three components R, G, and B (0 is considered the smallest and 255 is considered the largest). The formula is: R=G=B=max(R, G, B).
[0068] 2. Average value method: take the average value of the three components R, G, and B. The formula is: R = G = B = (R + G + B) / 3.
[0069] 3. Weighted average method: According to the importance and other indicators, the three components are weighted averaged with different weights. Since the human eye is most sensitive to green and least sensitive to blue, a more reasonable grayscale image can be obtained by weighted averaging the three components of RGB according to the following formula:
[0070] Image filtering includes the following:
[0071] 1. Mean filtering: It is the most commonly used method in image processing. From the frequency domain point of view, mean filtering is a low-pass filter. High-frequency signals will be removed, so it can help eliminate sharp noise in the image and achieve image smoothing, blurring and other functions.
[0072] 2. Median filtering: Median filtering is also one of the most common means of eliminating image noise, especially for eliminating salt and pepper noise. The effect of median filtering is better than that of mean filtering.
[0073] 3. Gaussian filtering: Gaussian filtering is a method that is often used in image processing. It is an image processing method generated based on Gaussian function, mainly used for Gaussian blur of images.
[0074] 4. Bilateral filtering: Bilateral filtering is a nonlinear filtering method that can well preserve edge information and has the characteristics of fast calculation.
[0075] Step 1013, traverse all image segmentation methods of the image, such as 1*2, 1*3, ..., N*M, and select the best segmentation method, which requires that only a small number of sub-images can contain the metal can; in addition to this segmentation method, there are other preferred segmentation methods, which will be explained in detail below.
[0076] Step 1014, performing edge detection on the multiple sub-images by using an edge detection algorithm, wherein the Canny edge detection algorithm is preferably used to obtain the shapes of each object in the image;
[0077] Step 1015, extracting features from the image that has undergone pre-processing edge detection to obtain a first feature threshold. This step will be described in detail below.
[0078] In step 102, the second characteristic value is obtained in the same manner as the first characteristic threshold, which will not be repeated here.
[0079] In step 103, since the machine is easily disturbed by other objects in the image during the recognition process, resulting in a slightly lower accuracy, manual adjustment is required, specifically:
[0080] The second characteristic value is sent to the human-computer interaction terminal, and the user can modify the second characteristic value through the human-computer interaction interface, where the second characteristic value Where N is the number of rows of multiple sub-images in the image; M is the number of columns of multiple sub-images in the image; xj(k) is the eigenvalue of the sub-image in the jth column and the kth row. The user can modify the parameters to adjust the second eigenvalue.
[0081] In step 104, after the user modifies the parameters, a third eigenvalue is generated and the third eigenvalue is fed back.
[0082] In step 105, the third characteristic value is received, and the first characteristic threshold and the third characteristic value are compared, specifically: whether the third characteristic value is greater than the first characteristic threshold is determined, and if so, it is determined that there is a metal can in the detection area.
[0083] In step 106, the detection result is finally sent to the human-computer interaction terminal to inform the user.
[0084] Therefore, by pre-acquiring the first characteristic threshold value indicating that there is no metal can in the detection area and the second characteristic value obtained by real-time detection of the detection area, the second characteristic value is manually improved to obtain a more accurate third characteristic value, and the first characteristic threshold value and the third characteristic value are compared to determine whether there is a metal can in the detection area. Compared with the traditional technology of using metal detectors for detection, this solution can detect specific metal objects, with strong pertinence and high accuracy.
[0085] In one embodiment, all image segmentation methods of the image are traversed to select the best segmentation method, including:
[0086] Each time the segmentation method is traversed, the number of pixels in each gray level after the threshold segmentation of each sub-image is counted to divide the pixel set;
[0087] Calculate the proportion of the pixel set in each gray level in the entire gray level;
[0088] According to the ratio, the probability distribution of each pixel in the entire image is obtained, the entire grayscale is traversed, and the inter-class probability of the foreground and background at the current grayscale value is calculated;
[0089] Calculate the thresholds corresponding to the intra-class and inter-class variances, and select the gray level with the largest inter-class variance as the best segmentation method.
[0090] In this embodiment, the preferred solution of the above step 1013 is to select the best segmentation method according to the gray level distribution, and the process is as follows:
[0091] Each segmentation will generate a different number of sub-images. The number of pixels in each gray level of each sub-image is counted to divide the pixel set, where the gray level can be [0-255].
[0092] Then calculate the proportion of the pixel set in each gray level in the entire gray level, distribute the proportion of each gray level normally to display it in a two-dimensional coordinate system, and calculate the inter-class probability of the current gray value; select the segmentation method with the largest inter-class probability as the best segmentation method.
[0093] In one embodiment, the first feature threshold is an image edge pixel;
[0094] Obtaining the first feature threshold includes:
[0095] Perform canny edge detection on the preprocessed image and calculate the gradient amplitude and gradient direction of the image;
[0096] Perform non-maximum suppression to refine the image edge and retain the local maximum gradient of the image;
[0097] A double threshold is selected according to the optimal threshold, and the double threshold is used to obtain the edge pixels of the image.
[0098] In this embodiment, this solution preferably obtains the edges in the image through canny edge detection. The canny edge detection algorithm can identify as many actual edges in the image as possible, and the probability of missing the real edge and the probability of falsely detecting the non-edge are as small as possible.
[0099] After obtaining the image edge, the image gradient magnitude and gradient direction. In image processing, when calculating the gradient magnitude of an image, the Sobel operator or Prewitt operator can be used to calculate the first-order derivative of the image, and then the gradient magnitude is calculated according to the definition of the gradient. The gradient direction of an image refers to the rate of change of a certain pixel point in the image in the x and y directions, that is, the direction in which the directional derivative at this point takes the maximum value along this direction 1. In this scheme, the gradient magnitude The gradient direction c = arctan2(a,b), where a is the partial derivative of the image in the x direction and b is the partial derivative of the image in the y direction.
[0100] When the best segmentation method is determined, a sub-image containing the metal can is selected from the entire image; specifically, pixel values of the metal can in the image are obtained in advance; and according to the pixel values, a sub-image containing the pixel values is selected from the entire image.
[0101] The edge pixels in the sub-image containing the metal can are counted, and finally the edge pixels of each sub-image are added to obtain the first feature threshold.
[0102] On the other hand, the present application provides a metal can intelligent sensing system based on human-computer interaction, the system comprising:
[0103] The first acquisition module 201 is used to pre-acquire a first characteristic threshold value indicating that there is no metal can in the detection area;
[0104] The second acquisition module 202 is used to detect the detection area in real time and obtain the second characteristic value;
[0105] The transmission module 203 is used to send the acquired second characteristic value to the human-computer interaction terminal, and instruct the human-computer interaction terminal to modify the second characteristic value;
[0106] A receiving module 204 is used to receive a third characteristic value sent by the human-computer interaction terminal, wherein the third characteristic value is obtained by modifying the second characteristic value by the user;
[0107] A judgment module 205, used to compare the first characteristic threshold and the third characteristic value to determine whether there is a metal can in the detection area;
[0108] The sending module 206 is used to send the detection result to the human-computer interaction terminal.
[0109] In this embodiment, in the first acquisition module 201, the specific method of acquiring the first characteristic threshold is:
[0110] The detection area is photographed by a camera to obtain an image including the detection area, and the image does not include the metal can;
[0111] Then the image is preprocessed, including image enhancement, image grayscale and image filtering.
[0112] Among them, image enhancement processing includes the following methods:
[0113] 1. Histogram equalization: The histogram represents the statistics between each gray level in a digital image and its frequency of occurrence. The histogram can give a description of the overall distribution of the image, the gray range of the image, and the approximate distribution of the gray levels. Transforming the histogram of the original image into a histogram with a fixed frequency of each gray value is called histogram equalization, which is effective for images with a narrow dynamic range and unclear colors.
[0114] 2. Contrast enhancement: When the image is underexposed or overexposed, or the image recording device has a narrow range, there will be a problem of insufficient contrast. Therefore, it is necessary to transform the image grayscale and expand the grayscale range of the image to achieve the purpose of image enhancement.
[0115] 3. Median filtering: The idea of median filtering is to sort the grayscale values of pixels in the window, and use the middle value after sorting as the grayscale value of the pixel in the center of the window. This type of filtering is also a smoothing filter.
[0116] 4. Wavelet transform image enhancement: Wavelet transform can change the relevant wavelet parameters during image decomposition and reconstruction. It has good localization characteristics in spatial domain and rate domain, and uses gradually finer time domain or spatial domain steps for high frequencies.
[0117] Image grayscale processing includes the following:
[0118] 1. Maximum value method: directly take the value of the largest component among the three components R, G, and B (0 is considered the smallest and 255 is considered the largest). The formula is: R=G=B=max(R, G, B).
[0119] 2. Average value method: take the average value of the three components R, G, and B. The formula is: R = G = B = (R + G + B) / 3.
[0120] 3. Weighted average method: According to the importance and other indicators, the three components are weighted averaged with different weights. Since the human eye is most sensitive to green and least sensitive to blue, a more reasonable grayscale image can be obtained by weighted averaging the three components of RGB according to the following formula:
[0121] Image filtering includes the following:
[0122] 1. Mean filtering: It is the most commonly used method in image processing. From the frequency domain point of view, mean filtering is a low-pass filter. High-frequency signals will be removed, so it can help eliminate sharp noise in the image and achieve image smoothing, blurring and other functions.
[0123] 2. Median filtering: Median filtering is also one of the most common means of eliminating image noise, especially for eliminating salt and pepper noise. The effect of median filtering is better than that of mean filtering.
[0124] 3. Gaussian filtering: Gaussian filtering is a method that is often used in image processing. It is an image processing method generated based on Gaussian function, mainly used for Gaussian blur of images.
[0125] 4. Bilateral filtering: Bilateral filtering is a nonlinear filtering method that can well preserve edge information and has the characteristics of fast calculation.
[0126] Traverse all image segmentation methods of the image, such as 1*2, 1*3, ..., N*M, and select the best segmentation method, which requires that only a small number of sub-images can contain the metal can; in addition to this segmentation method, there are other preferred segmentation methods, which will be explained in detail below.
[0127] Perform edge detection on multiple sub-images by using an edge detection algorithm, wherein the canny edge detection algorithm is preferably used to obtain the shapes of each object in the image;
[0128] Perform feature extraction on the image that has undergone preprocessing edge detection to obtain a first feature threshold. This step will be described in detail below.
[0129] In the second acquisition module 202, the second characteristic value is acquired in the same manner as the first characteristic threshold, which will not be repeated here.
[0130] In the transmission module 203, since the machine is easily disturbed by other objects in the image during the recognition process, resulting in a slightly lower accuracy, manual adjustment is required, specifically:
[0131] The second characteristic value is sent to the human-computer interaction terminal, and the user can modify the second characteristic value through the human-computer interaction interface, where the second characteristic value Where N is the number of rows of multiple sub-images in the image; M is the number of columns of multiple sub-images in the image; xj(k) is the eigenvalue of the sub-image in the jth column and the kth row. The user can modify the parameters to adjust the second eigenvalue.
[0132] In the receiving module 204, after the user modifies the parameters, a third characteristic value is generated and the third characteristic value is fed back.
[0133] In the judgment module 205, the third characteristic value is received, and the first characteristic threshold and the third characteristic value are compared, specifically: whether the third characteristic value is greater than the first characteristic threshold is judged, and if so, it is determined that there is a metal can in the detection area.
[0134] In the sending module 206, the detection result is finally sent to the human-computer interaction terminal to inform the user.
[0135] Therefore, by pre-acquiring the first characteristic threshold value indicating that there is no metal can in the detection area and the second characteristic value obtained by real-time detection of the detection area, the second characteristic value is manually improved to obtain a more accurate third characteristic value, and the first characteristic threshold value and the third characteristic value are compared to determine whether there is a metal can in the detection area. Compared with the traditional technology of using metal detectors for detection, this solution can detect specific metal objects, with strong pertinence and high accuracy.
[0136] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0137] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0138] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A metal can intelligent perception method based on human-computer interaction, characterized in that: The method comprises: Pre-acquire a first characteristic threshold value indicating that there is no metal can in the detection area; Detecting the detection area in real time to obtain a second characteristic value; Sending the acquired second characteristic value to the human-computer interaction terminal, instructing the human-computer interaction terminal to modify the second characteristic value; Receiving a third characteristic value sent by the human-computer interaction terminal, wherein the third characteristic value is obtained by modifying the second characteristic value by a user; Comparing the first characteristic threshold and the third characteristic value to determine whether the metal can exists in the detection area; Sending the detection result to the human-computer interaction terminal; The step of pre-acquiring a first characteristic threshold indicating that there is no metal can in the detection area comprises: photographing the detection area to obtain a corresponding image; Performing image enhancement processing, image grayscale processing and image filtering processing on the image; Traversing all image segmentation methods of the image, selecting the best segmentation method, and generating a plurality of sub-images accordingly; Performing edge detection on the plurality of sub-images by using an edge detection algorithm; Perform feature extraction on the edge-detected image to obtain a first feature threshold; The second eigenvalue Wherein, N is the number of rows of the multiple sub-images in the image; M is the number of columns of the multiple sub-images in the image; and xj(k) is the eigenvalue of the sub-image in the jth column and the kth row.
2. The method according to claim 1, characterized in that The traversing all image segmentation methods of the image and selecting the best segmentation method includes: Each time the segmentation method is traversed, the number of pixels in each gray level of each sub-image is counted and the pixel set is divided; Calculate the proportion of the pixel set in each gray level in the entire gray level; According to the proportion, the probability normal distribution of each pixel is obtained, the entire grayscale is traversed, and the inter-class probability of each grayscale value is calculated; The segmentation method with the largest inter-class probability is selected as the best segmentation method.
3. The method according to claim 1, characterized in that The first feature threshold is the image edge pixel; The obtaining of the first feature threshold comprises: Perform canny edge detection on the preprocessed image and calculate the gradient amplitude and gradient direction of the image; According to the best segmentation method, the edge pixels of the image are obtained.
4. The method according to claim 3, characterized in that The gradient amplitude The gradient direction c = arctan2(a,b), where a is the partial derivative of the image in the x direction and b is the partial derivative of the image in the y direction.
5. The method according to claim 3, characterized in that: The step of obtaining edge pixels of the image according to the optimal segmentation method includes: After determining the best segmentation method, a sub-image including the metal can is selected from the entire image; Count the edge pixels in the sub-image containing the metal can; Add up the edge pixels of each sub-image.
6. The method according to claim 5, characterized in that The selecting the sub-image containing the metal can from the whole image includes: Pre-acquire the pixel value of the metal can in the image; According to the pixel value, a sub-image containing the pixel value is selected from the entire image.
7. The method according to claim 1, characterized in that The comparing the first characteristic threshold and the third characteristic value to determine whether the metal can exists in the detection area comprises: It is determined whether the third characteristic value is greater than the first characteristic threshold value, and if so, it is determined that the metal can exists in the detection area.
8. A system for implementing the metal can intelligent perception method based on human-computer interaction as claimed in claim 1, characterized in that: The system comprises: A first acquisition module is used to pre-acquire a first characteristic threshold value representing that there is no metal can in the detection area; A second acquisition module, used for detecting the detection area in real time and acquiring a second characteristic value; A transmission module, used to send the acquired second characteristic value to the human-computer interaction terminal, and instruct the human-computer interaction terminal to modify the second characteristic value; A receiving module, configured to receive a third characteristic value sent by the human-computer interaction terminal, wherein the third characteristic value is obtained by modifying the second characteristic value by a user; A judgment module, used for comparing the first characteristic threshold and the third characteristic value to determine whether the metal can exists in the detection area; A sending module is used to send the detection result to the human-computer interaction terminal.
Citation Information
Patent Citations
Metal element identification method and device
CN111882507A