Texture feature measurement method based on particle density
Technical Field
The invention belongs to the technical field of froth flotation, and particularly relates to a texture feature measurement method in a zinc flotation process.
Background
The froth flotation is a mineral separation method widely used at home and abroad, and the method can effectively separate target minerals according to the difference between the hydrophilicity and the hydrophobicity of the surfaces of the minerals. In the froth flotation process, target minerals and gangue symbiotic with the target minerals are ground into particles with proper sizes and then sent into a flotation tank, different mineral particle surface properties are adjusted by adding medicaments, and meanwhile, the particles are continuously stirred and blown in the flotation process, so that a large number of bubbles with characteristic information such as different sizes, forms and textures are formed in ore pulp, useful mineral particles are adhered to the surfaces of the bubbles, the bubbles carry the mineral particles to rise to the surfaces of the flotation tank to form bubble layers, and gangue minerals are left in the ore pulp, and therefore mineral separation is achieved. Because the flotation process has long flow, an undefined internal mechanism, a plurality of influence factors, a plurality of related variables, severe nonlinearity, incapability of on-line detection of process indexes and the like, the flotation process mainly depends on manual visual observation of the bubble state on the surface of the flotation tank to complete on-site operation, the production mode has strong subjectivity, objective evaluation and cognition of the flotation bubble state are difficult to realize, the situations of frequent fluctuation of flotation production indexes, severe loss of mineral raw materials, large medicament consumption, low resource recovery rate and the like are caused, particularly in the present day that high-grade mineral resources are increasingly deficient, the flotation mineral source components are complex, the mineral taste is low, and the manual operation of flotation production is difficult to effectively carry out. Machine vision is applied to the flotation process, the flotation bubble image is analyzed by using a digital image processing technology, objective description of the bubble state can be realized, and then the relation between the bubble characteristic parameters and the process indexes is further searched and analyzed, so that the production automation of the flotation process is promoted. Flotation bubbles present a special texture state along with the difference of the flotation state, the texture of a bubble image is the comprehensive reflection of the roughness, the contrast and the viscosity of the bubble surface, the method is closely related to flotation production operation variables such as dosage, ventilation quantity and the like, the concentrate grade, the tailing content and other flotation production indexes, the current bubble texture information extraction method mainly extracts local features, the problems of insufficient extraction precision, no consideration of bubble surface particles in the texture extraction process and the like exist, the working condition is difficult to accurately reflect, in fact, a plurality of ores or magazine small particles are often attached to the bubble surface to cause the roughness of the bubble surface, the quantity and the distribution density of the small particles are closely related to the zinc concentrate grade, the problem of the bubble surface particles is not considered in the previous research, and a new texture feature measurement method based on the particle density is provided, according to the method, the bubble image is extracted based on the digital image acquisition system arranged on the site, then the particle areas on the surface of the bubbles are accurately extracted, the density among the particle areas is quantitatively measured, the new texture feature particle density is defined to reflect the texture features of the whole image, the limitation of the traditional texture feature extraction method is effectively avoided, and therefore the working condition is more accurately judged and the medicine adding is effectively guided.
Disclosure of Invention
The invention aims to provide a texture feature measuring method based on particle concentration, in flotation production, the surface texture of flotation bubbles is important visual information reflecting the ore grade, is closely related to the flotation working condition, and directly reflects the mineralization degree of a bubble layer. Aiming at the problem that the grain on the surface of bubbles is not considered in the extraction of the texture features of the existing flotation bubble images, the grain density of the texture feature measurement method is defined. According to the method, firstly, bubble images are segmented, interesting bubbles are extracted, then particle areas on the surfaces of the bubbles are extracted, and analysis and explanation are carried out on how the particle density reflects the working condition, so that the method can more accurately regulate and control the mineral grade and guide flotation production.
The adopted technical scheme comprises the following steps:
the method comprises the following steps: collecting bubble videos of zinc flotation by using a flotation field image acquisition system, converting the bubble videos into continuous images, and performing data preprocessing on the acquired zinc flotation image data as follows:
1) rejecting erroneous data that exceeds a normal variation threshold;
2) removing incomplete data;
step two: converting the bubble image from an RGB color image into a gray image to obtain a gray matrix A of the image:
egfthe gray value corresponding to each pixel point in the gray image is represented, wherein g is equal to N, f is equal to N, N is equal to (400, 800).
Step three: in the bubble image, the conventional bubble shape is smooth in surface, the highlight point is positioned at the top end of the convex curved surface of a single bubble, the highlight point area presents the minimum gray value, the gray value gradually increases downwards by taking the highlight point as the center, and the maximum gray value is reached when the highlight point reaches the bubble boundary; in fact, the bubbles are often attached with some ore or magazine small particles, which cause the surface of the bubbles to be rough and uneven, and the quantity and distribution density of the small particles are related to the dosage and the zinc concentrate grade;
firstly, dividing bubbles, dividing the bubbles by a watershed method to obtain h individual bubbles, storing a gray matrix of each bubble to obtain a gray matrix set B ═ B of each bubble1,b2,b3,...,bλ,...,bh},bλIs the lambda-th bubble gray value matrix, h is the total number of the bubbles after segmentation, in the single bubble image set after the segmentation, screens out the bubble that the bubble size is greater than 1200 pixel values, be the region of interest promptly, for the bubble after the screening, replaces the grey scale value of this bubble highlight point part with the grey scale mean value of single bubble, obtains to detect bubble gray matrix set C ═ { C ═ of bubble gray matrix set C ═ of { C ═ of detecting1,c2,c3,...,cε,...,cKK is the number of bubbles meeting the bubble size requirement.
Step four: detection of particle area:
1. in the non-particle area, the bubble surface is smooth, and the change range of the gray value is in the gradual change range;
2. the change of the gray value in the particle area exceeds the gradual change range;
the particle region was extracted using the following steps:
s1: defining a searching mode of a particle area for the bubbles after segmentation and screening: for bubble cεTaking eight directions of 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees and 315 degrees, forming an array by gray values of all pixel points in any direction in the bubble, wherein the maximum width of a single bubble is a finite value, and the row number of the leftmost pixel point of the bubble in the gray matrix is HmThe column number of the rightmost pixel point of the bubble in the gray matrix is HnH from bubble gray matrix at search timemThe columns start searching from left to right and from top to bottom from the bubble upper half boundary, the initial search direction is 270 °;
s2: marking a trip point:
(1) setting the threshold value of gray gradation to [0,8 ]]Firstly, starting to search from the 270-degree direction by taking the leftmost pixel point of the boundary of the upper half part of the bubble as a starting point, taking the step length as 1, defining the modulus of the difference value of the next gray value and the current gray value as a gray gradient value in the 270-degree direction, comparing the gray gradient value with a threshold value, and marking the position of the current gray value as a jump point d if the gray gradient value exceeds the threshold value1The position is expressed in cartesian coordinates as: (x)1,y1) The column H where the first trip point is located0Is denoted as the left boundary of the particle region, where Hm<...<H0<H1<H2<...<Hk<Hk+1<Hk+2<...<Hn,H1Is H0The first column, and so on, in this search from H0Column search to the right through Hk+2When the column is not searched for a trip point, Hk+1Column is the right boundary of this granular area;
(2) from H1Is listed to HkBetween columns, each column is searched from top to bottom in 270 deg. direction to obtain two jump points, and in H th search1When the column is arranged, the jumping points of the ray directions of 90 degrees and 270 degrees are recorded as d2And d3Taking the midpoint of the positions of the two jump points as a position center divergence point o1(ii) a Diverging from the central point o by position1Starting the search to both sides in the ray directions of 0 DEG and 180 DEG as starting points, and marking the position d of the nearest jump point4,d5(ii) a Starting to search from the position divergence central point to two sides in the ray directions of 45 degrees and 225 degrees, and marking the position d of the nearest jump point6,d7(ii) a Starting to search from the position divergence center point to two sides in the ray directions of 135 degrees and 315 degrees, and marking the position d of the nearest jump point8,d9;
S3: extraction of particle region:
for bubble cεFrom H1The position of the column diverges from the center point o18 trip points, H, are obtained2,H3,...,HkThe position of the column diverges from the center point o2,o3,...,okRespectively obtaining 8 jumping points, the particle area obtains 8k jumping points in total, if 8k<24, the region is noise, and is not considered, when 8k is more than or equal to 24, the 8k transition points are connected in sequence to obtain a particle region which is marked as Dr(r∈a)。
Step five: determination of the position of the center point of the particle region:
for the particle region D
rThe number of the transition points of the grain region is recorded as t
rI.e. the zone boundary has t
rA vertex with coordinates of (x)
i,y
i),i=1,2,...,t
rVertex, point
And vertex (x)
1,y
1) Similarly, the area of the particle region is shown by the following formula:
center point coordinates of particle region
As shown in the following formula:
repeating the step four to search out all particle areas in the gray value matrix of the single bubble in the bubble set to be detected, and regarding the bubble c
εCounting the number L of particle regions
εThen, the coordinates of the center point of each particle region are determined
Defining primary neighborhood region, secondary neighborhood region and other neighborhood regions by the straight line distance between the central points of different particle regions, and aligning the particle region P
uU ∈ a, defined as follows:
wherein v belongs to a and v is not equal to u;
marking particle region PuThe number of the first-level neighborhood region is quThe number of the second-level neighborhood region is suAnd the number of other neighborhood regions is wuThen there is qu+su+wu=Lε-1; the weights of the number of the first-level neighborhood regions, the number of the second-level neighborhood regions and the number of the other neighborhood regions are respectively set to be 0.6, 0.3 and 0.1, so that the bubble c is treatedεDefining the grain density Z of the texture feature quantityεThe expression is as follows:
the particle concentration G of the whole image is defined as shown in the following formula:
step six: the working condition is judged according to the particle concentration:
when the bubble is in the state I, the surface texture of the bubble is fine, the medicament is excessive, and the mineral particles carried in the bubble exceed the carrying capacity of the bubble to break the bubble in large quantity, so that the medicament waste is serious and the concentrate grade is low;
when the flotation device is in the state II, a proper amount of flotation reagents are used, the flotation performance is good, and the flotation production efficiency is highest;
when the pulp is in the state III, the pulp viscosity is low, the addition amount of the medicament is insufficient, the ore content of bubbles is less, the water content is high, and the concentrate grade is low.
In the second step, the bubble image is converted into a gray level image from an RGB color image, and a gray level matrix A of the image is obtained, wherein N belongs to (400, 800).
The invention defines new texture feature particle density to reflect the texture feature of the whole image, effectively avoids the limitation of the traditional texture feature extraction method, and effectively overcomes the influence of the uneven illumination phenomenon of the flotation field on the texture feature extraction, thereby more accurately judging the working condition and effectively guiding the dosing.
Drawings
FIG. 1 is a flow chart of a texture feature measurement method based on particle concentration.
Fig. 2 is a schematic diagram of the region of the particles extracted at S3 in step four.
Detailed Description
FIG. 1 is a flow chart of the present invention.
The method comprises the following steps: collecting bubble videos of zinc flotation by using a flotation field image acquisition system, converting the bubble videos into continuous images, and performing data preprocessing on the acquired zinc flotation image data as follows:
1) rejecting erroneous data that exceeds a normal variation threshold;
2) removing incomplete data;
step two: converting the bubble image from an RGB color image into a gray image to obtain a gray matrix A of the image:
egfthe gray value corresponding to each pixel point in the gray image is represented, wherein g is equal to N, f is equal to N, N is equal to (400, 800).
Step three: in the bubble image, the conventional bubble shape is smooth in surface, the highlight point is positioned at the top end of the convex curved surface of a single bubble, the highlight point area presents the minimum gray value, the gray value gradually increases downwards by taking the highlight point as the center, and the maximum gray value is reached when the highlight point reaches the bubble boundary; in fact, the bubbles are often attached with some ore or magazine small particles, which cause the surface of the bubbles to be rough and uneven, and the quantity and distribution density of the small particles are related to the dosage and the zinc concentrate grade;
firstly, dividing bubbles, dividing the bubbles by a watershed method to obtain h individual bubbles, storing a gray matrix of each bubble to obtain a gray matrix set B ═ B of each bubble1,b2,b3,...,bλ,...,bh},bλIs the lambda-th bubble gray value matrix, h is the total number of the bubbles after segmentation, in the single bubble image set after the segmentation, screens out the bubble that the bubble size is greater than 1200 pixel values, be the region of interest promptly, for the bubble after the screening, replaces the grey scale value of this bubble highlight point part with the grey scale mean value of single bubble, obtains to detect bubble gray matrix set C ═ { C ═ of bubble gray matrix set C ═ of { C ═ of detecting1,c2,c3,...,cε,...,cKK is the number of bubbles meeting the bubble size requirement.
Step four: detection of particle area:
1. in the non-particle area, the bubble surface is smooth, and the change range of the gray value is in the gradual change range;
2. the change of the gray value in the particle area exceeds the gradual change range;
the particle region was extracted using the following steps:
s1: defining a searching mode of a particle area for the bubbles after segmentation and screening: for bubble cεTaking eight directions of 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees and 315 degrees, forming an array by gray values of all pixel points in any direction in the bubble, wherein the maximum width of a single bubble is a finite value, and the row number of the leftmost pixel point of the bubble in the gray matrix is HmThe column number of the rightmost pixel point of the bubble in the gray matrix is HnH from bubble gray matrix at search timemThe column starts searching from left to right and from top to bottom starting from the bubble top half boundary, the initial search direction is 270 °.
S2: marking a trip point:
(1) setting the threshold value of gray gradation to [0,8 ]]Firstly, starting to search from the 270-degree direction by taking the leftmost pixel point of the boundary of the upper half part of the bubble as a starting point, taking the step length as 1, defining the modulus of the difference value of the next gray value and the current gray value as a gray gradient value in the 270-degree direction, comparing the gray gradient value with a threshold value, and marking the position of the current gray value as a jump point d if the gray gradient value exceeds the threshold value1The position is expressed in cartesian coordinates as: (x)1,y1) The column H where the first trip point is located0Is denoted as the left boundary of the particle region, where Hm<...<H0<H1<H2<...<Hk<Hk+1<Hk+2<...<Hn,H1Is H0The first column, and so on, in this search from H0Column search to the right through Hk+2When the column is not searched for a trip point, Hk+1Column is the right boundary of this granular area;
(2) from H1Is listed to HkBetween columns, each column from top to bottomSearching in 270 deg direction to obtain two jump points, and searching in the H th1When the column is arranged, the jumping points of the ray directions of 90 degrees and 270 degrees are recorded as d2And d3Taking the midpoint of the positions of the two jump points as a position center divergence point o1(ii) a Diverging from the central point o by position1Starting the search to both sides in the ray directions of 0 DEG and 180 DEG as starting points, and marking the position d of the nearest jump point4,d5(ii) a Starting to search from the position divergence central point to two sides in the ray directions of 45 degrees and 225 degrees, and marking the position d of the nearest jump point6,d7(ii) a Starting to search from the position divergence center point to two sides in the ray directions of 135 degrees and 315 degrees, and marking the position d of the nearest jump point8,d9;
S3: extraction of particle region:
for bubble cεFrom H1The position of the column diverges from the center point o18 trip points, H, are obtained2,H3,...,HkThe position of the column diverges from the center point o2,o3,...,okRespectively obtaining 8 jumping points, the particle area obtains 8k jumping points in total, if 8k<24, the region is noise, and is not considered, when 8k is more than or equal to 24, the 8k transition points are connected in sequence to obtain a particle region which is marked as Dr(r ∈ a), FIG. 2 is a schematic diagram of the extracted particle region.
Step five: determination of the position of the center point of the particle region:
for the particle region D
rThe number of the transition points of the grain region is recorded as t
rI.e. the zone boundary has t
rA vertex with coordinates of (x)
i,y
i),i=1,2,...,t
rVertex, point
And vertex (x)
1,y
1) Similarly, the area of the particle region is shown by the following formula:
center point coordinates of particle region
As shown in the following formula:
repeating the step four to search out all particle areas in the gray value matrix of the single bubble in the bubble set to be detected, and regarding the bubble c
εCounting the number L of particle regions
εThen, the coordinates of the center point of each particle region are determined
Defining primary neighborhood region, secondary neighborhood region and other neighborhood regions by the straight line distance between the central points of different particle regions, and aligning the particle region P
uU ∈ a, defined as follows:
wherein v belongs to a and v is not equal to u;
marking particle region PuThe number of the first-level neighborhood region is quThe number of the second-level neighborhood region is suAnd the number of other neighborhood regions is wuThen there is qu+su+wu=Lε-1; the weights of the number of the first-level neighborhood regions, the number of the second-level neighborhood regions and the number of the other neighborhood regions are respectively set to be 0.6, 0.3 and 0.1, so that the bubble c is treatedεDefining the grain density Z of the texture feature quantityεThe expression is as follows:
the particle concentration G of the whole image is defined as shown in the following formula:
step six: the working condition is judged according to the particle concentration:
when the bubble is in the state I, the surface texture of the bubble is fine, the medicament is excessive, and the mineral particles carried in the bubble exceed the carrying capacity of the bubble to break the bubble in large quantity, so that the medicament waste is serious and the concentrate grade is low;
when the flotation device is in the state II, a proper amount of flotation reagents are used, the flotation performance is good, and the flotation production efficiency is highest;
when the pulp is in the state III, the pulp viscosity is low, the addition amount of the medicament is insufficient, the ore content of bubbles is less, the water content is high, and the concentrate grade is low.
In the second step, the bubble image is converted into a gray level image from an RGB color image, and a gray level matrix A of the image is obtained, wherein N belongs to (400, 800).
The invention defines new texture feature particle density to reflect the texture feature of the whole image, effectively avoids the limitation of the traditional texture feature extraction method, and effectively overcomes the influence of the uneven illumination phenomenon of the flotation field on the texture feature extraction, thereby more accurately judging the working condition and effectively guiding the dosing.