A method for screening chemical materials
The method analyzes multiple frames of quartz material images to differentiate quartz crystals from mineral impurities through connectivity and texture analysis, addressing edge detection issues and enhancing screening efficiency.
Patent Information
- Application Number
- CN202510025483.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2045-01-08
AI Technical Summary
Current image processing methods fail to accurately separate and identify quartz crystals from mineral impurities in industrial materials due to issues with edge detection and segmentation, leading to inefficiencies in the screening process.
A method involving the analysis of multiple frames of quartz material images to determine the connectivity and texture features of regions, using techniques such as gradient analysis, edge detection, and texture regularity assessment to differentiate between quartz and mineral impurities, thereby improving the accuracy of impurity identification.
Enhances the precision of impurity detection and increases the efficiency of quartz material screening by accurately distinguishing between quartz crystals and mineral impurities, reducing misclassification and improving overall processing efficiency.
Smart Images

Figure CN119417855B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a chemical material screening method. Background Art
[0002] Chemical materials include raw materials, chemicals, additives, etc., which are used to produce chemical products or conduct chemical reactions. Common raw materials in chemical materials include quartz crystals, which are used to manufacture glass, ceramics and semiconductor materials. In the chemical industry, material screening of quartz crystals is a key step to ensure product quality and production efficiency. Therefore, material screening can directly affect the quality and production efficiency of chemical raw materials. Image processing technology can achieve accurate extraction and analysis of quartz crystal characteristics, thereby identifying quartz crystals and mineral foreign bodies in chemical raw materials, and by distinguishing quartz crystals from mineral foreign bodies, the work efficiency of quartz crystal screening can be improved.
[0003] Since chemical raw materials may be stacked and stuck together when being transported on conveyor belts, conventional image processing is to segment a single quartz chemical raw material image. Therefore, it is unable to solve the problem of adhesion between quartz crystals and difficulty in segmenting their edges, causing many quartz crystals to be mistakenly classified as mineral foreign bodies, thereby reducing the efficiency of quartz chemical raw material screening. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a method for screening chemical materials, the method comprising:
[0005] Acquire several frames of quartz chemical raw material images;
[0006] Obtain all connected domains in each frame of the quartz chemical raw material image; in any two frames of the quartz chemical raw material image, by analyzing the differences in position and grayscale between the connected domain and the surrounding connected domains, obtain the correspondence possibility between any two connected domains; based on the correspondence possibility, obtain the corresponding connected domain between any two frames of the quartz chemical raw material image;
[0007] According to the similarity of edge lines in the connected domain, the texture morphology regularity of the connected domain is obtained; the texture morphology regularity is corrected by the grayscale distribution between the pixel points on the edge line of the connected domain to obtain the possibility of foreign matter in the connected domain; the last frame of the quartz chemical raw material image is recorded as the target quartz chemical raw material image; by analyzing the change of the possibility of foreign matter in the corresponding connected domain in multiple frames of quartz chemical raw material images, the confidence of each connected domain in the target quartz chemical raw material image belonging to ore foreign matter is obtained; all connected domains in the target quartz chemical raw material image are screened by the confidence of belonging to ore foreign matter to obtain the ore foreign matter area;
[0008] Determine whether to conduct secondary screening of quartz chemical raw materials based on the proportion of foreign matter areas in the ore.
[0009] Preferably, in any two frames of quartz chemical raw material images, the possibility of correspondence between any two connected domains is obtained by analyzing the differences in position and grayscale between the connected domain and the surrounding connected domains, and the specific method includes:
[0010] For any connected domain in any frame of quartz chemical raw material image, obtain the neighborhood connected range of the connected domain;
[0011] The first Frame quartz chemical raw materials image The centroid of the connected domain is located at The corresponding pixel point on the vertical projection of the frame quartz chemical raw material image is recorded as The connected domain is frame quartz chemical raw material image on the target position; The centroid position of the connected domain is The connected domain is The Euclidean distance between the target positions on the frame quartz chemical raw material image is recorded as The connected domain and The target distance between connected domains;
[0012] The first The connected domain has the following neighboring connected domains: Connected domains and The Euclidean distance between the centroids of the connected domains is denoted as The first distance difference of the connected domain; The connected domain has the following neighboring connected domains: Connected domains and The Euclidean distance between the centroids of the connected domains is denoted as The second distance difference of the connected domain; The first distance difference between the connected components and the The absolute value of the difference between the second distance differences of the connected domains is recorded as The distance difference value of the connected domain; The connected domain has the following neighboring connected domains: The mean gray value of all pixels in the connected domain is The connected domain has the following neighboring connected domains: The absolute value of the difference between the mean gray values of all pixels in the connected domain is recorded as The grayscale difference value of the connected domain; The distance difference between the first connected domain and the The product of the grayscale difference values of the connected domains is recorded as The position grayscale difference of each connected domain; the inverse proportional value of the cumulative sum of the position grayscale differences of all connected domains in the neighborhood connectivity range is taken as the first The connected domain and The similarity of the position gray distribution between connected domains;
[0013] The first The connected domain and The reciprocal of the target distance between the connected domains is recorded as the first reciprocal; the The connected domain and The product of the similarity of the position grayscale distribution between the connected domains and the first reciprocal is taken as the The connected domain and The correspondence possibility between connected domains.
[0014] Preferably, the obtaining of the neighborhood connectivity range of the connected domain includes the following specific methods:
[0015] Preset a neighborhood parameter , obtaining the centroid positions of all connected domains in the frame quartz chemical raw material image; in the frame quartz chemical raw material image, sorting the Euclidean distances of the centroid positions between the connected domain and other connected domains from small to large to obtain a sorted connected domain sequence; sorting the top connected domains in the sorted connected domain sequence The connected domains constitute the neighborhood connected range of the connected domain.
[0016] Preferably, the method of obtaining the corresponding connected domain between any two frames of quartz chemical raw material images based on the corresponding possibility includes the following specific methods:
[0017] In the In the frame of quartz chemical raw material image, The connected domain with the largest correspondence possibility among the connected domains is taken as the Frame quartz chemical raw materials image The connected domain is The corresponding connected domains in the frame quartz chemical raw material image.
[0018] Preferably, the method of obtaining the texture morphology regularity of the connected domain according to the similarity of the edge lines in the connected domain includes the following specific methods:
[0019] For Frame quartz chemical raw materials image Connected domains are obtained by using the Canny edge detection algorithm. All edge lines in a connected domain;
[0020] First The first The first edge pixel on the edge line is the starting point, and the last edge pixel is the end point. The chain code algorithm is used to Encode the edge pixels on the edge line to obtain the The chain code vector of edge lines;
[0021] The first Combine any two edge lines in the connected domain to obtain the All edge line combinations in a connected domain;
[0022] For For any edge line combination in a connected domain, the cosine similarity between the chain code vector of the first edge line in the edge line combination and the chain code vector of the second edge line in the edge line combination is recorded as the texture morphology similarity factor of the edge line combination;
[0023] The first The mean value of the texture morphological similarity factor of all edge line combinations in the connected domain is taken as the The texture morphological regularity of a connected domain.
[0024] Preferably, the method of correcting the texture morphology regularity by the grayscale distribution between the pixels on the edge line of the connected domain to obtain the possibility of foreign matter in the connected domain includes the following specific methods:
[0025] For Frame quartz chemical raw materials image connected domain, according to The grayscale distribution of pixels on the edge line in the connected domain is obtained. Grayscale difference factor of connected domains;
[0026] The first The inverse of the texture morphology regularity of the connected domain is The normalized value of the product of the grayscale difference factors of the connected domains is taken as the The possibility of foreign objects in a connected domain.
[0027] Preferably, the The grayscale distribution of pixels on the edge line in the connected domain is obtained. The grayscale difference factor of a connected domain includes the following specific methods:
[0028] The first The first On the edge line The gray value of the edge pixel is The first On the edge line The absolute value of the difference between the grayscale values of edge pixels is recorded as The grayscale difference of the edge pixels; The cumulative sum of the grayscale differences of all edge pixels on all edge lines in the connected domain is recorded as Grayscale differences within the edge lines of connected domains;
[0029] For For any edge line combination in a connected domain, the absolute value of the difference between the mean grayscale value of all edge pixels on the first edge line of the edge line combination and the mean grayscale value of all edge pixels on the second edge line in the edge line combination is recorded as the grayscale mean difference of the edge line combination; The cumulative sum of the grayscale mean differences of all edge line combinations in the connected domain is recorded as The overall grayscale difference of the edge lines of the connected domains;
[0030] The first The grayscale difference within the edge line of the first connected domain is The sum of the overall grayscale differences of the edge lines of the connected domains is taken as the The gray level difference factor of the connected components.
[0031] Preferably, the method of obtaining the confidence of each connected domain in the target quartz chemical raw material image as a foreign matter belonging to ore by analyzing the change of the possibility of foreign matter in the corresponding connected domain in multiple frames of quartz chemical raw material images includes the following specific methods:
[0032] For the target quartz chemical raw material image connected domain, The connected domain is The probability of foreign matter in the corresponding connected domain in the first frame of quartz chemical raw material image is The connected domain is The absolute value of the difference between the foreign matter possibilities of the corresponding connected domains in the British chemical raw material image is recorded as The connected domain is The possible offset of foreign matter in the frame quartz chemical raw material image;
[0033] The first The cumulative sum of the possible offsets of foreign objects in all frames of the quartz chemical raw material image of the first connected domain is The normalized value of the product of the mean values of the foreign matter possibilities of the corresponding connected domains in all frames of the quartz chemical raw material image is used as the first connected domain in the target quartz chemical raw material image. The confidence level of each connected domain belongs to mineral foreign matter.
[0034] Preferably, the method of screening all connected domains in the target quartz chemical raw material image by the confidence level of ore foreign matter to obtain the ore foreign matter region includes the following specific methods:
[0035] Preset a foreign body threshold parameter , if the target quartz chemical raw material image The confidence that the connected domain is a mineral foreign body is greater than or equal to the threshold parameter , then the The connected domains are recorded as mineral foreign body areas.
[0036] Preferably, the method of determining whether to conduct secondary screening of the quartz chemical raw materials according to the proportion of the ore foreign matter area includes the following specific methods:
[0037] Preset a screening threshold parameter If the ratio between the total number of all pixels in all mineral foreign matter areas in the target quartz chemical raw material image and the number of all pixels in the target quartz chemical raw material image is greater than or equal to the screening threshold parameter , it is necessary to conduct secondary screening of the quartz chemical raw materials to be tested.
[0038] The beneficial effects of the technical solution of the present invention are as follows: the present invention obtains the possibility of foreign matter in a connected domain by analyzing the texture morphology and texture grayscale changes within the connected domain; and then analyzes the changes in the possibility of foreign matter in the connected domain in the quartz chemical raw material image in time series to determine the ore foreign matter area in the quartz chemical raw material image, thereby solving the problem that when a single quartz chemical raw material image is segmented, the edges of the quartz crystals are adhered to each other and the edges are difficult to segment; the ore foreign matter area is obtained more accurately, thereby improving the work efficiency of quartz chemical raw material screening. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A flow chart of the steps of a chemical material screening method of the present invention;
[0041] Figure 2 The present invention is a characteristic relationship flow chart of a chemical material screening method. DETAILED DESCRIPTION
[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a chemical material screening method proposed according to the present invention, its specific implementation, structure, characteristics and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0043] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0044] The specific scheme of a chemical material screening method provided by the present invention is described in detail below with reference to the accompanying drawings.
[0045] See also Figure 1 , which shows a flow chart of a method for screening chemical materials provided by an embodiment of the present invention, the method comprising the following steps:
[0046] Step S001: Acquire several frames of quartz chemical raw material images.
[0047] It should be noted that when screening chemical raw materials in the chemical industry, if there are many mineral foreign matters in the chemical raw materials, the chemical raw materials need to be screened for the second time. Quartz chemical raw materials will be stacked and stuck when they are transported on conveyor belts, and conventional image processing is to segment a single quartz chemical raw material image. Therefore, it is impossible to solve the problem of adhesion between quartz crystals and difficulty in segmenting their edges, which causes many quartz crystals to be mistakenly classified as mineral foreign matters, increasing the content of mineral foreign matters in chemical raw materials, thereby reducing the work efficiency of chemical raw material screening.
[0048] Specifically, we first need to collect several frames of quartz chemical raw material images. The specific process is as follows:
[0049] It should be noted that, since image acquisition may be affected by ambient light, the image brightness may be uneven and the contrast may be insufficient. Therefore, a closed acquisition device is used to acquire video images. The specific operations are as follows:
[0050] The chemical raw materials to be tested are placed on a conveyor belt, and a closed collection device is arranged above the conveyor belt. The collection device consists of an industrial camera, a light source and a sealed box. The industrial camera in the collection device obtains video images of quartz chemical raw materials, and the video image acquisition duration is selected as 10s. FFmpeg video editing software is used to decompose the video images of quartz chemical raw materials into several frames of quartz chemical raw material images.
[0051] Among them, for any frame of quartz chemical raw material image, adaptive histogram equalization is used to perform image enhancement to balance the overall brightness of the image and improve the contrast; adaptive histogram equalization is a prior art and will not be described in detail in this embodiment.
[0052] So far, several frames of quartz chemical raw material images are obtained through the above method.
[0053] Step S002: Obtain all connected domains in each frame of the quartz chemical raw material image; in any two frames of the quartz chemical raw material image, by analyzing the differences in position and grayscale between the connected domain and the surrounding connected domains, obtain the correspondence possibility between any two connected domains; based on the correspondence possibility, obtain the corresponding connected domain between any two frames of the quartz chemical raw material image.
[0054] It should be noted that, since quartz chemical raw materials will be stacked and adhered when being transported on a conveyor belt, edge adhesion will occur between quartz crystals in any frame of the quartz chemical raw material image. However, since the conveyor belt will shake during transportation, it will be separated from the connected domains in other frames of the quartz chemical raw material image. Therefore, it is necessary to determine the corresponding relationship between the connected domains in each frame of the quartz chemical raw material image. Since the shaking will only cause a slight edge separation between the connected domain and the surrounding connected domains, it will not change the position distribution between each other, and the grayscale value of the surrounding connected domains will not change. Therefore, by analyzing the changes in the position and grayscale between the connected domain and the surrounding connected domains, the corresponding connected domains are obtained in several frames of the quartz chemical raw material image.
[0055] Preferably, for any frame of quartz chemical raw material image, a gradient image of the frame of quartz chemical raw material image is obtained, and a watershed segmentation algorithm is performed on the gradient image to obtain multiple regions in the quartz chemical raw material image, and each region is taken as a connected domain, thereby obtaining several connected domains in the quartz chemical raw material image.
[0056] Among them, the watershed segmentation algorithm is a prior art and will not be described in detail in this embodiment.
[0057] Preferably, in some implementations of the embodiments of the present invention, in any two frames of quartz chemical raw material images, by analyzing the differences in position and grayscale between the connected domain and the surrounding connected domains, the specific method for obtaining the possibility of correspondence between any two connected domains is:
[0058] For any connected domain in any frame of quartz chemical raw material image, obtain the neighborhood connected range of the connected domain;
[0059] The first Frame quartz chemical raw materials image The centroid of the connected domain is located at The corresponding pixel point on the vertical projection of the frame quartz chemical raw material image is recorded as The connected domain is frame quartz chemical raw material image on the target position; The centroid position of the connected domain is The connected domain is The Euclidean distance between the target positions on the frame quartz chemical raw material image is recorded as The connected domain and The target distance between connected domains;
[0060] The first The connected domain has the following neighboring connected domains: Connected domains and The Euclidean distance between the centroids of the connected domains is denoted as The first distance difference of the connected domain; The connected domain has the following neighboring connected domains: Connected domains and The Euclidean distance between the centroids of the connected domains is denoted as The second distance difference of the connected domain; The first distance difference between the connected components and the The absolute value of the difference between the second distance differences of the connected domains is recorded as The distance difference value of the connected domains;
[0061] The first The connected domain has the following neighboring connected domains: The mean gray value of all pixels in the connected domain is The connected domain has the following neighboring connected domains: The absolute value of the difference between the mean gray values of all pixels in the connected domain is recorded as The grayscale difference value of the connected domain; The distance difference between the first connected domain and the The product of the grayscale difference values of the connected domains is recorded as The position grayscale difference of connected domains;
[0062] The inverse proportional value of the cumulative sum of the position grayscale differences of all connected domains in the neighborhood connectivity range is used as the first The connected domain and The similarity of the position gray distribution between connected domains;
[0063] The first The connected domain and The reciprocal of the target distance between the connected domains is recorded as the first reciprocal; the The connected domain and The product of the similarity of the position grayscale distribution between the connected domains and the first reciprocal is taken as the The connected domain and The possibility of correspondence between connected domains;
[0064] The specific formula is:
[0065]
[0066] In the formula, Indicates The connected domain and The possibility of correspondence between connected domains; Indicates The connected domain and The target distance between connected domains; Represents the number of all connected domains in the neighborhood connectivity range of the connected domain; Indicates The connected domain has the following neighboring connected domains: The connected domain and The Euclidean distance between the centroid positions of the connected domains; Indicates The connected domain has the following neighboring connected domains: The connected domain and The Euclidean distance between the centroid positions of the connected domains; Indicates The connected domain has the following neighboring connected domains: The mean gray value of all pixels in a connected domain; Indicates The connected domain has the following neighboring connected domains: The mean gray value of all pixels in a connected domain; Indicates taking the absolute value; represents an exponential function with a natural constant as base;
[0067] It should be noted that Indicates The distance difference value of the connected domains; Indicates Grayscale difference value of connected domains; Indicates The position grayscale difference of connected domains; Indicates The connected domain and The similarity of the position gray distribution between connected domains.
[0068] Preferably, in some implementations of the embodiments of the present invention, the specific method for obtaining the neighborhood connectivity range of the connected domain is:
[0069] Preset a neighborhood parameter , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. Depends on the specific implementation situation;
[0070] Obtain the centroid positions of all connected domains in the frame quartz chemical raw material image; in the frame quartz chemical raw material image, sort the Euclidean distances of the centroid positions between the connected domain and other connected domains from small to large to obtain a sorted connected domain sequence; The connected domains constitute the neighborhood connected range of the connected domain.
[0071] Preferably, in some implementations of the embodiments of the present invention, the specific method for obtaining the corresponding connected domain between any two frames of quartz chemical raw material images based on the corresponding possibility is:
[0072] In the In the frame of quartz chemical raw material image, The connected domain with the largest correspondence possibility among the connected domains is taken as the Frame quartz chemical raw materials image The connected domain is The corresponding connected domains in the frame quartz chemical raw material image.
[0073] So far, the corresponding connected domains between any two frames of quartz chemical raw material images are obtained through the above method.
[0074] Step S003: according to the similarity of the edge lines in the connected domain, the texture morphology regularity of the connected domain is obtained; the texture morphology regularity is corrected by the grayscale distribution between the pixel points on the edge line of the connected domain to obtain the possibility of foreign matter in the connected domain; the last frame of the quartz chemical raw material image is recorded as the target quartz chemical raw material image; by analyzing the change of the possibility of foreign matter in the corresponding connected domain in multiple frames of quartz chemical raw material images, the confidence of each connected domain in the target quartz chemical raw material image belonging to ore foreign matter is obtained; all connected domains in the target quartz chemical raw material image are screened by the confidence of belonging to ore foreign matter to obtain the ore foreign matter area.
[0075] 1. Obtain the texture morphological regularity of the connected domain.
[0076] It should be noted that the surface of quartz crystal is usually smooth and bright, with natural edges or naturally formed regular textures. Therefore, the number of edge lines inside its surface texture in the edge detection image is small, and the edge lines are regularly distributed, that is, the extension directions of the edge lines are highly similar; while the surface of mineral foreign matter has obvious roughness or granularity, so its surface texture is messy. Therefore, the number of edge lines inside its edge detection image is large, and the edge lines are messily distributed, that is, the extension directions of the edge lines are different.
[0077] Preferably, in some implementations of the embodiments of the present invention, the specific method for obtaining the texture morphology regularity of the connected domain according to the similarity of the edge lines in the connected domain is:
[0078] For Frame quartz chemical raw materials image Connected domains are obtained by using the Canny edge detection algorithm. All edge lines in a connected domain;
[0079] First The first The first edge pixel on the edge line is the starting point, and the last edge pixel is the end point. The chain code algorithm is used to Encode the edge pixels on the edge line to obtain the The chain code vector of edge lines;
[0080] The first Combine any two edge lines in the connected domain to obtain the All edge line combinations in a connected domain;
[0081] For For any edge line combination in a connected domain, the cosine similarity between the chain code vector of the first edge line in the edge line combination and the chain code vector of the second edge line in the edge line combination is recorded as the texture morphology similarity factor of the edge line combination;
[0082] The first The mean value of the texture morphological similarity factor of all edge line combinations in the connected domain is taken as the The regularity of texture morphology of connected domains;
[0083] The specific formula is:
[0084]
[0085] In the formula, Indicates The regularity of texture morphology of connected domains; Indicates All edge line combinations in a connected domain; Indicates The first The chain code vector of the first edge line in the edge line combination; Indicates The first The chain code vector of the second edge line in the edge line combination; Indicates The first The cosine similarity between the chain code vector of the first edge line and the chain code vector of the second edge line in the edge line combination.
[0086] Among them, the Canny edge detection algorithm and the chain code algorithm are existing technologies, and this embodiment will not be described in detail here.
[0087] At this point, the texture morphological regularity of the connected domain is obtained.
[0088] 2. Obtain the possibility of foreign objects in the connected domain.
[0089] It should be noted that since there will be some sulfide ore foreign bodies in the quartz chemical raw material image, they are consistent with the surface texture characteristics of quartz crystals and also have certain texture regularity, which makes it impossible to accurately distinguish the two by only distinguishing the connected domains through texture morphological regularity; but since there is obvious color difference on the surface of sulfide ore foreign bodies, the grayscale difference between the pixels on its edge line is large, and the grayscale mean difference between the edge lines is also large; then, the texture morphological regularity can be corrected through the grayscale distribution between the pixels on the edge line to obtain the possibility of foreign bodies in the connected domain.
[0090] Preferably, in some implementations of the embodiments of the present invention, the texture morphology regularity is corrected by the grayscale distribution between the pixels on the edge line of the connected domain, and the specific method for obtaining the possibility of foreign matter in the connected domain is:
[0091] For Frame quartz chemical raw materials image connected domain, according to The grayscale distribution of pixels on the edge line in the connected domain is obtained. Grayscale difference factor of connected domains;
[0092] The first The inverse of the texture morphology regularity of the connected domain is The normalized value of the product of the grayscale difference factors of the connected domains is taken as the The possibility of foreign bodies in a connected domain;
[0093] The specific formula is:
[0094]
[0095] In the formula, Indicates The possibility of foreign bodies in a connected domain; Indicates The regularity of texture morphology of connected domains; Indicates Grayscale difference factor of connected domains; represents the linear normalization function.
[0096] Preferably, in some implementations of the embodiments of the present invention, obtaining the The specific method of calculating the grayscale difference factor of a connected domain is:
[0097] The first The first On the edge line The gray value of the edge pixel is The first On the edge line The absolute value of the difference between the grayscale values of edge pixels is recorded as The grayscale difference of the edge pixels; The cumulative sum of the grayscale differences of all edge pixels on all edge lines in the connected domain is recorded as Grayscale differences within the edge lines of connected domains;
[0098] For For any edge line combination in a connected domain, the absolute value of the difference between the mean grayscale value of all edge pixels on the first edge line of the edge line combination and the mean grayscale value of all edge pixels on the second edge line in the edge line combination is recorded as the grayscale mean difference of the edge line combination; The cumulative sum of the grayscale mean differences of all edge line combinations in the connected domain is recorded as The overall grayscale difference of the edge lines of the connected domains;
[0099] The first The grayscale difference within the edge line of the first connected domain is The sum of the overall grayscale differences of the edge lines of the connected domains is taken as the Grayscale difference factor of connected domains;
[0100] The specific formula is:
[0101]
[0102] In the formula, Indicates Grayscale difference factor of connected domains; Indicates The number of all edge lines in a connected domain; Indicates The first The number of all edge pixels on an edge line; Indicates The first On the edge line Gray value of edge pixels; Indicates The first On the edge line Gray value of edge pixels; Indicates All edge line combinations in a connected domain; Indicates The first The mean grayscale value of all edge pixels on the first edge line in the edge line combination; Indicates The first The mean grayscale value of all edge pixels on the second edge line in the edge line combination; Indicates taking the absolute value.
[0103] in, Indicates Grayscale differences within the edge lines of connected domains; Indicates The overall grayscale difference of the edge lines of the connected domains.
[0104] At this point, the possibility of foreign objects in the connected domain is obtained.
[0105] 3. Obtain the confidence that each connected domain in the target quartz chemical raw material image belongs to mineral foreign matter.
[0106] It should be noted that, since quartz chemical raw materials will be stacked and adhered when being transported on a conveyor belt, edge adhesion will occur between quartz crystals in any frame of the quartz chemical raw material image, resulting in a greater possibility of foreign matter in a certain connected domain; however, since the conveyor belt will shake during transportation, it will be separated from the connected domain in other frames of the quartz chemical raw material image, and the possibility of the connected domain being a foreign matter in the quartz chemical raw material image will decrease, indicating that the connected domain is not a mineral foreign matter at this time. Therefore, only when the possibility of a connected domain being a foreign matter in all frames of the quartz chemical raw material image remains relatively large and the difference between them is small, it indicates that the connected domain is a mineral foreign matter.
[0107] Preferably, in some implementations of the embodiments of the present invention, by analyzing the change in the possibility of foreign matter in the corresponding connected domains in multiple frames of quartz chemical raw material images, a specific method for obtaining the confidence level of each connected domain in the target quartz chemical raw material image as a foreign matter in the ore is as follows:
[0108] The last frame of quartz chemical raw material image is recorded as the target quartz chemical raw material image;
[0109] For the target quartz chemical raw material image connected domain, The connected domain is The probability of foreign matter in the corresponding connected domain in the first frame of quartz chemical raw material image is The connected domain is The absolute value of the difference between the foreign matter possibilities of the corresponding connected domains in the British chemical raw material image is recorded as The connected domain is The possible offset of foreign matter in the frame quartz chemical raw material image;
[0110] The first The cumulative sum of the possible offsets of foreign objects in all frames of the quartz chemical raw material image of the first connected domain is The normalized value of the product of the mean values of the foreign matter possibilities of the corresponding connected domains in all frames of the quartz chemical raw material image is used as the first connected domain in the target quartz chemical raw material image. The confidence level of the connected domains belonging to mineral foreign bodies;
[0111] The specific formula is:
[0112]
[0113] In the formula, Indicates the target quartz chemical raw material image The connected domain is the confidence level of mineral foreign matter; Indicates The average value of the possibility of foreign matter in the corresponding connected domain of the connected domain in all frames of quartz chemical raw material images; Indicates the number of all frames of quartz chemical raw material images; Indicates The connected domain is The possibility of foreign matter in the corresponding connected domain in the frame quartz chemical raw material image; Indicates The connected domain is The possibility of foreign matter in the corresponding connected domain in the British chemical raw material image; Indicates taking the absolute value; represents the linear normalization function;
[0114] in, Indicates The connected domain is The foreign matter in the frame of the quartz chemical raw material image may be offset.
[0115] At this point, the confidence level of each connected domain in the target quartz chemical raw material image belonging to ore foreign matter is obtained.
[0116] 4. Get the ore foreign body area.
[0117] Preferably, in some implementations of the embodiments of the present invention, all connected domains in the target quartz chemical raw material image are screened by the confidence level of the ore foreign matter, and the specific method for obtaining the ore foreign matter region is:
[0118] Preset a foreign body threshold parameter , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. Depends on the specific implementation situation;
[0119] If the target quartz chemical raw material image The confidence that the connected domain is a mineral foreign body is greater than or equal to the threshold parameter , then the The connected domains are recorded as mineral foreign body areas.
[0120] So far, all the ore foreign matter areas in the target quartz chemical raw material image are obtained through the above method.
[0121] Step S004: Determine whether to conduct secondary screening of the quartz chemical raw materials based on the proportion of the ore foreign matter area.
[0122] Preferably, in some implementations of the embodiments of the present invention, the specific method for determining whether to perform secondary screening on the quartz chemical raw materials according to the proportion of the ore foreign matter area is:
[0123] Preset a screening threshold parameter , wherein this embodiment is based on This example is described as an example, and this embodiment is not specifically limited. Depends on the specific implementation situation;
[0124] If the ratio between the total number of all pixels in all mineral foreign matter areas in the target quartz chemical raw material image and the number of all pixels in the target quartz chemical raw material image is greater than or equal to the screening threshold parameter , it is necessary to conduct secondary screening of the quartz chemical raw materials to be tested.
[0125] See also Figure 2 , which shows a characteristic relationship flow chart of a chemical material screening method.
[0126] At this point, this embodiment is completed.
[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for screening chemical materials, characterized in that: The method comprises the following steps: Acquire several frames of quartz chemical raw material images; Acquire all connected domains in each frame of the quartz chemical raw material image, wherein a gradient image of the frame of the quartz chemical raw material image is acquired, a watershed segmentation algorithm is performed on the gradient image, and multiple regions in the quartz chemical raw material image are obtained, and each region is regarded as a connected domain; in any two frames of the quartz chemical raw material image, by analyzing the difference in position and grayscale between the connected domain and the surrounding connected domains, the correspondence possibility between any two connected domains is acquired; based on the correspondence possibility, the corresponding connected domain between any two frames of the quartz chemical raw material image is acquired; According to the similarity of edge lines in the connected domain, the texture morphology regularity of the connected domain is obtained; the texture morphology regularity is corrected by the grayscale distribution between the pixel points on the edge line of the connected domain to obtain the possibility of foreign matter in the connected domain; the last frame of the quartz chemical raw material image is recorded as the target quartz chemical raw material image; by analyzing the change of the possibility of foreign matter in the corresponding connected domain in multiple frames of quartz chemical raw material images, the confidence of each connected domain in the target quartz chemical raw material image belonging to ore foreign matter is obtained; all connected domains in the target quartz chemical raw material image are screened by the confidence of belonging to ore foreign matter to obtain the ore foreign matter area; Determine whether to conduct secondary screening of quartz chemical raw materials based on the proportion of foreign matter areas in the ore; The method of obtaining the correspondence possibility between any two connected domains by analyzing the difference in position and grayscale between the connected domain and the surrounding connected domains in any two frames of quartz chemical raw material images includes: For any connected domain in any frame of quartz chemical raw material image, obtain the neighborhood connected range of the connected domain; The first Frame quartz chemical raw material image The centroid of the connected domain is located at The corresponding pixel point on the vertical projection of the frame quartz chemical raw material image is recorded as The connected domain is frame quartz chemical raw material image on the target position; The centroid position of the connected domain is The connected domain is The Euclidean distance between the target positions on the frame quartz chemical raw material image is recorded as The connected domain and The target distance between connected domains; The first The connected domain has the following neighboring connected domains: Connected domains and The Euclidean distance between the centroids of the connected domains is denoted as The first distance difference of the connected domain; The connected domain has the following neighboring connected domains: Connected domains and The Euclidean distance between the centroids of the connected domains is denoted as The second distance difference of the connected domain; The first distance difference between the connected components and the The absolute value of the difference between the second distance differences of the connected domains is recorded as The distance difference value of the connected domain; The connected domain has the following neighboring connected domains: The mean gray value of all pixels in the connected domain is The connected domain has the following neighboring connected domains: The absolute value of the difference between the mean gray values of all pixels in the connected domain is recorded as The grayscale difference value of the connected domain; The distance difference between the first connected domain and the The product of the grayscale difference values of the connected domains is recorded as The position grayscale difference of each connected domain; the inverse proportional value of the cumulative sum of the position grayscale differences of all connected domains in the neighborhood connectivity range is taken as the first The connected domain and The similarity of the position gray distribution between connected domains; The first The connected domain and The reciprocal of the target distance between the connected domains is recorded as the first reciprocal; the The connected domain and The product of the similarity of the position grayscale distribution between the connected domains and the first reciprocal is taken as the The connected domain and The possibility of correspondence between connected domains; The specific method of obtaining the neighborhood connectivity range of the connected domain includes: Preset a neighborhood parameter , obtaining the centroid positions of all connected domains in the frame quartz chemical raw material image; in the frame quartz chemical raw material image, sorting the Euclidean distances of the centroid positions between the connected domain and other connected domains from small to large to obtain a sorted connected domain sequence; sorting the top connected domains in the sorted connected domain sequence The connected domains constitute the neighborhood connected range of the connected domain; The specific method of obtaining the corresponding connected domain between any two frames of quartz chemical raw material images based on the corresponding possibility includes: In the In the frame of quartz chemical raw material image, The connected domain with the largest correspondence possibility among the connected domains is taken as the Frame quartz chemical raw material image The connected domain is The corresponding connected domains in the frame quartz chemical raw material image.
2. A chemical material screening method according to claim 1, characterized in that: The specific method of obtaining the texture morphology regularity of the connected domain according to the similarity of the edge lines in the connected domain is as follows: For Frame quartz chemical raw materials image Connected domains are obtained by using the Canny edge detection algorithm. All edge lines in a connected domain; First The first The first edge pixel on the edge line is the starting point, and the last edge pixel is the end point. The chain code algorithm is used to Encode the edge pixels on the edge line to obtain the The chain code vector of edge lines; The first Combine any two edge lines in the connected domain to obtain the All edge line combinations in a connected domain; For For any edge line combination in a connected domain, the cosine similarity between the chain code vector of the first edge line in the edge line combination and the chain code vector of the second edge line in the edge line combination is recorded as the texture morphology similarity factor of the edge line combination; The first The mean value of the texture morphological similarity factor of all edge line combinations in the connected domain is taken as the The texture morphological regularity of a connected domain.
3. A chemical material screening method according to claim 2, characterized in that: The method of correcting the texture morphology regularity by the grayscale distribution between the pixels on the edge line of the connected domain to obtain the possibility of foreign matter in the connected domain includes: For Frame quartz chemical raw materials image connected domain, according to The grayscale distribution of pixels on the edge line in the connected domain is obtained. Grayscale difference factor of connected domains; The first The inverse of the texture morphology regularity of the connected domain is The normalized value of the product of the grayscale difference factors of the connected domains is taken as the The possibility of foreign objects in a connected domain.
4. A chemical material screening method according to claim 3, characterized in that: According to the The grayscale distribution of pixels on the edge line in the connected domain is obtained. The grayscale difference factor of a connected domain includes the following specific methods: The first The first On the edge line The gray value of the edge pixel is The first On the edge line The absolute value of the difference between the grayscale values of edge pixels is recorded as The grayscale difference of the edge pixels; The cumulative sum of the grayscale differences of all edge pixels on all edge lines in the connected domain is recorded as Grayscale differences within the edge lines of connected domains; For For any edge line combination in a connected domain, the absolute value of the difference between the mean grayscale value of all edge pixels on the first edge line of the edge line combination and the mean grayscale value of all edge pixels on the second edge line in the edge line combination is recorded as the grayscale mean difference of the edge line combination; The cumulative sum of the grayscale mean differences of all edge line combinations in the connected domain is recorded as The overall grayscale difference of the edge lines of the connected domains; The first The grayscale difference within the edge line of the first connected domain is The sum of the overall grayscale differences of the edge lines of the connected domains is taken as the The gray level difference factor of the connected components.
5. A chemical material screening method according to claim 1, characterized in that: The method of analyzing the change of the possibility of foreign matter in the corresponding connected domains in the multiple frames of quartz chemical raw material images to obtain the confidence of each connected domain in the target quartz chemical raw material image as a foreign matter in the ore includes the following specific methods: For the target quartz chemical raw material image connected domain, The connected domain is The probability of foreign matter in the corresponding connected domain in the first frame of quartz chemical raw material image is The connected domain is The absolute value of the difference between the foreign matter possibilities of the corresponding connected domains in the British chemical raw material image is recorded as The connected domain is The possible offset of foreign matter in the frame quartz chemical raw material image; The first The cumulative sum of the possible offsets of foreign objects in all frames of the quartz chemical raw material image of the first connected domain is The normalized value of the product of the mean values of the foreign matter possibilities of the corresponding connected domains in all frames of the quartz chemical raw material image is used as the first connected domain in the target quartz chemical raw material image. The confidence level of the connected domains belongs to mineral foreign bodies.
6. A chemical material screening method according to claim 1, characterized in that: The method of screening all connected domains in the target quartz chemical raw material image by the confidence degree of ore foreign matter to obtain the ore foreign matter region includes the following specific methods: Preset a foreign body threshold parameter , if the target quartz chemical raw material image The confidence that the connected domain is a mineral foreign body is greater than or equal to the threshold parameter , then the The connected domains are recorded as mineral foreign body areas.
7. A chemical material screening method according to claim 1, characterized in that: The specific method of determining whether to conduct secondary screening of quartz chemical raw materials according to the proportion of foreign matter areas in the ore is as follows: Preset a screening threshold parameter If the ratio between the total number of all pixels in all mineral foreign matter areas in the target quartz chemical raw material image and the number of all pixels in the target quartz chemical raw material image is greater than or equal to the screening threshold parameter , it is necessary to conduct secondary screening of the quartz chemical raw materials to be tested.
Citation Information
Patent Citations
Video data acquisition method and system for fish sorting
CN118864800A
Foreign matter detection method for coal mine belt conveyor
CN119006466A