Method and device for controlling usage amount of mineral separation foaming agent
By automatically adjusting the amount of foaming agent through image acquisition and analysis technology, the problem of limited frequency of manual observation is solved, and real-time optimization of foaming agent dosage is achieved, which improves metal recovery rate and reduces production costs.
Patent Information
- Application Number
- CN202510936400.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-28
AI Technical Summary
In the metal flotation process, the amount of frother used needs to be adjusted in real time to adapt to the complex flotation process conditions. However, existing technologies rely on manual observation, which limits the frequency and timeliness of adjustments, thus affecting metal recovery rate and production costs.
An image acquisition device is used to automatically acquire foam feature images. The images are then transmitted and analyzed without compression by an image processing and analysis unit. Nonlocal mean filtering, watershed algorithm, and YOLOv8 algorithm are used to calculate bubble features and automatically adjust the amount of foaming agent.
It enables automatic optimization and adjustment of foaming agent dosage, reduces the labor intensity of operators, improves metal recovery rate, and reduces reagent consumption costs.
Smart Images

Figure BDA0005488078350000021 
Figure BDA0005488078350000031 
Figure BDA0005488078350000033
Abstract
Description
Technical Field
[0001] This invention relates to a method and apparatus for controlling the amount of frother used in mineral processing, belonging to the field of intelligent detection and control. Background Art
[0002] In the metal flotation process, the main functions of frothers include: 1. Forming a hydrated layer on the bubble surface, increasing the bubble's viscosity, stability, and mechanical strength; 2. Reducing the surface tension at the gas-liquid interface, allowing bubbles to have appropriate size and lifespan, and controlling the bubble coalescence rate; 3. Generating bubbles to adsorb hydrophobic mineral particles, thus achieving metal recovery; 4. Influencing the rising and escaping speeds of bubbles, thereby affecting the metal recovery yield; 5. Frothers coexisting with collectors in micelles affect the critical micelle concentration of the collector, and can also emulsify or accelerate the dissolution of the collector, thus affecting its effectiveness; 6. The amount of frother used has a significant impact on the separation and recovery of valuable mineral particles.
[0003] The dosage of frother needs to be appropriate; otherwise, it will adversely affect the pulp characteristics, metal recovery rate, and production costs. Furthermore, the properties of flotation minerals and process conditions in industrial settings are complex and variable, and the optimal dosage is not static. Therefore, optimizing and adjusting the flotation frother dosage in real time, and adjusting the dosage as needed based on the flotation process conditions, helps improve the recovery rate of metal flotation operations and processes, reduces reagent consumption costs, and improves overall economic efficiency.
[0004] Currently, in industrial production, flotation operators mainly adjust the amount of frother used by manually observing characteristics such as the quantity, size, viscosity, lifespan (co-agglomeration rate), and flow velocity of the foam. Due to the limited frequency of observation, the frequency and timeliness of adjustments cannot be guaranteed. Summary of the Invention
[0005] This invention provides a method and apparatus for controlling the amount of frother used in mineral processing, which solves the problems of limited frequency of manual foam observation and the inability to guarantee the frequency and timeliness of manual adjustment of the amount of frother used.
[0006] This invention is achieved through the following technical solutions:
[0007] A method for controlling the dosage of a mineral processing frother includes:
[0008] S1: Automatically acquire foam feature images through an image acquisition device, and transmit the acquired images to the image processing and analysis unit after uncompressing them;
[0009] S2: The foam characteristic data analyzed by the image processing and analysis unit includes: foam quantity, size, toughness, survival time, and flow velocity. The analysis process includes:
[0010] Step 1: Use a nonlocal mean filtering algorithm to filter out signal noise and useless pixels;
[0011] Step 2: Using the watershed algorithm and its improved algorithm, select a reference coordinate system and set standard dimensions; divide graphic elements and mark bubble objects;
[0012] Step 3: Use the YOLOv8 algorithm to track and mark objects and analyze bubble features;
[0013] S3: Calculate the absolute values and trends of the relevant parameters obtained from S2, and calculate and output the adjustment values for the dosage of the medicine;
[0014] S4: The reagent adjustment equipment adjusts the amount of foaming agent according to the reagent usage adjustment value.
[0015] In step S2, when calculating the bubble flow velocity, for two consecutive frames of images, the IOU algorithm is first used for matching to determine the same bubble in the two frames.
[0016] The specific process of the first step of S2 is as follows:
[0017] 1) For each pixel p, select the neighborhood Np and the search range Ω;
[0018] 2) For each pixel q within the search range, calculate the similarity weight w(p,q):
[0019]
[0020] 3) Calculate the denoised pixel values based on the weights w(p,q):
[0021]
[0022] Where Np and Nq represent the neighborhood centered at pixels p and q; Ω represents the Euclidean distance between pixels p and q; h represents the filtering parameter controlling similarity, with larger values resulting in slower weight decay; I(q) represents the original value of pixel q; Z(p) represents the normalization factor, ensuring the sum of weights is 1, and its calculation formula is as follows, where Ω represents the pixel range:
[0023]
[0024] The specific process of the second step of S2 is as follows:
[0025] 1) Calculate the gradient
[0026] The watershed algorithm treats the gradient image as terrain, with higher gradient values corresponding to "peaks" and lower gradient values corresponding to "valleys." The gradient calculation formula is as follows:
[0027]
[0028] in: and These represent the gradients of the image in the horizontal and vertical directions, respectively.
[0029] 2) Mark the initial seed point
[0030] The watershed algorithm uses the initial seed point as the starting point for segmentation, and the seed point is generated by finding local minima.
[0031]
[0032] Where M(x,y) is a binary seed image, where a pixel value of 1 indicates that the point belongs to the seed region, and a pixel value of 0 indicates the background; f(x,y) represents the pixel value of the input image. For a pixel (x,y), it is considered a local minimum if the following conditions are met:
[0033]
[0034] Where (i,j) represents the neighborhood offset, and {-1,0,1}\{(0,0)} represents the eight neighborhoods excluding itself (top, bottom, left, right and four diagonals);
[0035] 3) Mark the output image
[0036] The labeled output image L(x,y) is obtained through the following steps:
[0037] Iterate through each pixel in the image:
[0038] If the current pixel value is 1, check if it is connected to a marked pixel;
[0039] If they are connected, assign the same tag value;
[0040] If the connection is broken, a new tag value is created.
[0041] After traversal, each connected component has a unique tag value;
[0042] 4) Output the watershed image
[0043] For each pixel (x, y), determine whether the pixel's label value is different from that of its neighboring pixels. If so, mark the pixel as a boundary. The formula is as follows:
[0044]
[0045] Where N(x,y) is the connected region of pixel (x,y), L(x,y) is the pixel label value, and W(x,y) is the output watershed image, with a value of 1 indicating a boundary and 0 indicating a non-boundary.
[0046] The specific process of step three in S2 is as follows:
[0047] 1) Count the bubble diameter
[0048] Using the boundary information of the YOLO V8 detection box, the diameter of each bubble is calculated and classified.
[0049] Let the coordinates of the four vertices of the YOLOv8 output detection box be (xmin, ymin), (xmin, ymax), (xmax, ymin), and (xmax, ymax), then the bubble diameter is:
[0050] D = max(x) max -x min ,y max -y min )
[0051] Define the standard diameters of large and small bubbles as Dsmall and Dlarge, respectively. Then, the classification rules for large, medium, and small bubbles are as follows:
[0052] Small bubbles: D <= Dsmall
[0053] Medium bubbles: Dsmall <D<D large
[0054] Large air bubble: D>=Dlarge
[0055] 2) Statistical analysis of bubble sizes (large, medium, small)
[0056] Count the number of bubbles of different categories in each frame of the image, and let the bubble classification result set be:
[0057] C = {c1, c2, ..., c} N}
[0058] Where c i Given the subclasses ∈ {small, medium, large}, the quantities Nsmall, Nmedium, and Nlarge in the three categories are respectively:
[0059]
[0060] 3) Calculate the bubble flow velocity
[0061] For two consecutive frames of images, the IOU algorithm is first used to match and identify the same bubble in the two frames.
[0062] set up For the bubbles in frame t-1, If the bubble is in frame t, then the IOU can be represented as:
[0063]
[0064] Wherein, the denominator is the union of the bubble image ranges, and the numerator is the intersection of the bubble image ranges;
[0065] The matching rules are as follows:
[0066]
[0067] Where threshold is the matching threshold, with a value of 0.5;
[0068] Suppose that the center of the same bubble in frames t and t+1 can be obtained using YOLO v8, and is (xt, yt) and (xt+1, yt+1), then the velocity of the bubble is:
[0069]
[0070] Where Δt is the inter-frame time interval;
[0071] 4) Calculate bubble lifespan
[0072] The bubble's lifespan is calculated by the number of frames it remains in within the frame sequence.
[0073] Suppose the bubble appears in frame ti and disappears in frame tn, existing for a total of ni frames, with an inter-frame time interval of Δt. Then the duration T is:
[0074] T = (n-1) × Δt.
[0075] A device for controlling the dosage of a mineral processing frother includes: a high-definition rapid industrial image acquisition unit, an image transmission unit, an image processing and analysis unit, a process parameter analysis and control output calculation unit, and a reagent dosage adjustment control unit. The high-definition rapid industrial image acquisition unit captures foam images, which are then transmitted uncompressed to the image processing and analysis unit via the image transmission unit. The image processing and analysis unit analyzes and processes characteristic data, including the quantity, size, toughness, survival time, and flow velocity of the foam, and transmits this data to the process parameter analysis and control output calculation unit. The process parameter analysis and control output calculation unit calculates the absolute values and trends of the relevant parameters, calculates the adjustment value for the reagent dosage, and outputs the reagent adjustment signal to the reagent adjustment device in the reagent dosage adjustment control unit to adjust the dosage of the frother.
[0076] The high-definition high-speed industrial image acquisition unit includes: a high-definition industrial camera, a lens, a protective part, a mounting bracket, an illumination part, and an information acquisition part. The high-definition industrial camera has high resolution and high frame rate; the protective part has a sealed dustproof and high light transmittance function, and creates a black box environment for the acquisition unit; the mounting bracket has vibration damping function; and the information acquisition part transmits images without compression.
[0077] The image transmission unit includes network transmission equipment and cables, including: switches, optical modules, network cables, and optical fibers.
[0078] The image processing and analysis unit includes a processor with a GPU or CPU, a storage device, and image processing and analysis software mounted on it. It can be a front-end terminal device or a centralized server. It can analyze information of one or more image acquisition objects, display and transmit information of the original image, the processed image, the analysis process information, and the analysis result data. It can be displayed in a distributed manner or in a centralized manner, and also has data communication functions.
[0079] This invention automatically acquires images, analyzes foam characteristics, and adjusts the amount of foaming agent used after algorithm calculation, achieving automatic optimization and control of the agent dosage as needed, while reducing the labor intensity of operators. Detailed Implementation
[0080] This invention addresses the shortcomings of existing methods that rely on manual observation and adjustment of foaming agents, and proposes a method and apparatus for controlling the amount of foaming agent used in mineral processing.
[0081] The device consists of the following parts:
[0082] 1. High-definition industrial camera, lens, protective components, mounting bracket, lighting components, and information acquisition components. The high-definition industrial camera features high resolution and high frame rate; the protective components are sealed and dustproof with high light transmittance, creating a black box environment for the acquisition unit to prevent image distortion from natural light; the mounting bracket has vibration damping functions to reduce interference from industrial equipment vibrations on the image; the information acquisition components transmit images without compression, consuming significant network bandwidth, but preserving image information to the greatest extent possible.
[0083] 2. Image Transmission Section. This includes network transmission equipment and cables, such as switches, optical modules, network cables, and optical fibers.
[0084] 3. Image Processing and Analysis Unit. This includes a processor with a GPU or CPU, storage devices, and image processing and analysis software running on it. It can be a front-end terminal device or a centralized server. It can analyze information from single or multiple image acquisition objects. It can display and transmit information about the original images, processed images, analysis process information, and analysis results. It can perform distributed or centralized display. It also has data communication capabilities.
[0085] 4. Process parameter analysis and control output calculation unit.
[0086] 5. Dosage Adjustment and Control Unit. This unit controls the dosage of the foaming agent, outputting a dosage adjustment signal to the dosage adjustment equipment.
[0087] in:
[0088] Image Processing and Analysis Unit
[0089] The data analyzed by the image processing and analysis unit mainly includes characteristics such as the number, size, toughness, survival time (aggregation rate), and flow velocity of the foam.
[0090] The analysis process includes:
[0091] Step 1: Filter out signal noise and useless pixels, for example, by using a nonlocal mean filtering algorithm.
[0092] Nonlocal mean filtering removes noise by calculating a weighted average of the set of similar pixels for each pixel p in the image. The weights are determined by the similarity of the pixel blocks, which is calculated based on Euclidean distance.
[0093] I. Weight Calculation
[0094] For image I, the weight w(p,q) represents the similarity between pixel p and pixel q, and is calculated using the following formula:
[0095]
[0096] in:
[0097] 1. Np, Nq represent the neighborhood centered at pixels p and q;
[0098] 2. This represents the Euclidean distance between pixels p and q.
[0099] 3.h represents the filtering parameter that controls similarity; the larger the value, the slower the weight decays.
[0100] 4. Z(p) represents the normalization factor, ensuring that the sum of the weights is 1. Its calculation formula is as follows, where Ω represents the pixel range:
[0101]
[0102] II. Noise Removal
[0103] The denoised pixel value I'(p) is calculated using a weighted average:
[0104]
[0105] in:
[0106] 1. w(p,q): Weights calculated based on pixel similarity.
[0107] 2. I(q): The original value of pixel q.
[0108] III. Complete Process
[0109] 1. For each pixel p, select the neighborhood Np and the search range Ω.
[0110] 2. For each pixel q within the search range, calculate the similarity weight w(p,q):
[0111]
[0112] 3. Calculate the denoised pixel values based on the weights w(p,q):
[0113]
[0114] The neighborhood Np is 3x3, the search range Ω is 21x21, and the filter parameter h = 10.
[0115] Step 2: Select a reference coordinate system and set standard dimensions; divide the graphic elements and mark the bubble objects. For example, the watershed algorithm and its improved algorithms can be used.
[0116] I. Calculating the gradient
[0117] The watershed algorithm treats the gradient image as terrain, with higher gradient values corresponding to "peaks" and lower gradient values corresponding to "valleys." The gradient calculation formula is as follows:
[0118]
[0119] in: and These represent the gradients of the image in the horizontal and vertical directions, respectively.
[0120] II. Marking the initial seed point
[0121] The watershed algorithm requires an initial seed point as the starting point for segmentation. The seed point is generated by finding local minima.
[0122]
[0123] Where M(x,y) is a binary seed image, where a pixel value of 1 indicates that the point belongs to the seed region, and a pixel value of 0 indicates the background; f(x,y) represents the pixel value of the input image. For a pixel (x,y), it is considered a local minimum if the following conditions are met:
[0124]
[0125] Where (i,j) represents the neighborhood offset, { -1,0,1}\{(0,0)} This indicates that it does not include its eight neighboring regions (top, bottom, left, right, and four diagonals).
[0126] III. Marking the output image
[0127] The labeled output image L(x,y) is obtained through the following steps:
[0128] Iterate through each pixel in the image:
[0129] If the current pixel value is 1, check if it is connected to a marked pixel.
[0130] If they are connected, assign the same tag value;
[0131] If the connection is broken, a new tag value is created.
[0132] After the traversal is complete, each connected region will have a unique tag value.
[0133] IV. Output the watershed image
[0134] For each pixel (x, y), determine if its label value differs from that of its neighboring pixels. If so, mark the pixel as a boundary. The formula is as follows:
[0135]
[0136] Where N(x,y) is the connected region of pixel (x,y), L(x,y) is the pixel label value, and W(x,y) is the output watershed image, with a value of 1 indicating a boundary and 0 indicating a non-boundary.
[0137] Step 3: Track the marked objects and analyze the bubble features. For example, the YOLOv8 algorithm can be used.
[0138] I. Statistical analysis of bubble diameter
[0139] Using the boundary information of the YOLO V8 detection box, the diameter of each bubble is calculated and classified.
[0140] Let the coordinates of the four vertices of the YOLOv8 output detection box be (xmin, ymin), (xmin, ymax), (xmax, ymin), and (xmax, ymax). Then the diameter of the bubble is (approximately the larger side length):
[0141] D = max(x) max -x min ,y max -y min )
[0142] Define the standard diameters of large and small bubbles as Dsmall and Dlarge, respectively. Then, the classification rules for large, medium, and small bubbles are as follows:
[0143] Small bubbles: D <= Dsmall
[0144] Medium bubbles: Dsmall <D<D large
[0145] Large air bubble: D>=Dlarge
[0146] II. Statistical analysis of bubble sizes (large, medium, small)
[0147] Count the number of bubbles of different categories in each frame of the image, and let the bubble classification result set be:
[0148] C = {c1, c2, ..., c} N}
[0149] Where c i Given the subclasses ∈ {small, medium, large}, the quantities Nsmall, Nmedium, and Nlarge in the three categories are respectively:
[0150]
[0151] III. Calculating bubble flow velocity
[0152] For two consecutive frames of images, the IOU algorithm is first used for matching to identify the same bubble in the two frames.
[0153] set up For the bubbles in frame t-1, If the bubble is in frame t, then the IOU can be represented as:
[0154]
[0155] Where the denominator is the union of the bubble image ranges, and the numerator is the intersection of the bubble image ranges, the matching rule is:
[0156]
[0157] Where threshold is the matching threshold, with a value of 0.5.
[0158] Suppose that the center of the same bubble in frames t and t+1 can be obtained using YOLO v8, and is (xt, yt) and (xt+1, yt+1), then the velocity of the bubble is:
[0159]
[0160] Where Δt is the inter-frame time interval.
[0161] IV. Calculating bubble survival time
[0162] Based on the IOU algorithm in the previous section, it can be confirmed whether bubbles in two consecutive frames are the same bubble. Therefore, the bubble's lifespan can be calculated by the number of frames the bubble persists in the frame sequence.
[0163] Suppose the bubble appears in frame ti and disappears in frame tn, existing for a total of ni frames, with an inter-frame time interval of Δt. Then the duration T is:
[0164] T = (n-1) × Δt
[0165] Process parameter analysis and control output calculation unit
[0166] Calculate the absolute values and trends of relevant parameters, and calculate the adjustment values for drug usage:
[0167] 1. The total number of bubbles in the image is n, and the following parameters are defined:
[0168] ① The trend of foam quantity change = (the number of foams at time T - the number of foams at time T') / (T - T');
[0169] ②The size of the foam, s, is the sum of the sizes of all foams in the image, divided by n.
[0170] ③ The trend of foam size change Δs = (foam size at time T - foam size at time T') / (T - T')
[0171] ④ Foam flow velocity v = Sum of all foam flow velocities in the graph / n
[0172] ⑤ Trend of foam flow velocity:
[0173] Δv = (foam flow velocity at time T - foam flow velocity at time T') / (T - T')
[0174] ⑥ Bubble survival time t = Sum of the survival times of all bubbles in the graph / n
[0175] ⑦ Trends in the lifespan of bubbles:
[0176] Δt = (Bubble survival time at time T - Bubble survival time at time T') / (T - T')
[0177] 2. Define a state vector x containing the following: number of bubbles (n), trend of number change (Δn), bubble size (s), trend of size change (Δs), bubble flow velocity (v), trend of bubble flow velocity change (Δv), bubble survival time (t), and trend of bubble survival time change (Δt):
[0178] x=[n,Δn,s,Δs,v,Δv,t,Δt] T
[0179] 3. Define the control input vector u:
[0180] u = [u n u s u v u t ] T
[0181] in:
[0182] u n Adjustments based on the number and trend of bubbles.
[0183] u s Adjustments to the size and trend of bubbles.
[0184] u v : Adjustment amount for the flow speed and changing trend of bubbles.
[0185] u t Adjustments to the bubble's lifespan and trend.
[0186] 4. Let the current foaming agent dosage be Q. Define the following for each of the following: foam quantity (n), quantity change trend (Δn), foam size (s), size change trend (Δs), foam flow velocity (v), foam flow velocity change trend (Δv), foam lifespan (t), and foam lifespan change trend (Δt):
[0187] 1) Number of bubbles n:
[0188] Upper limit: n max Lower limit: n min f(n),
[0189]
[0190] Where A n is a coefficient.
[0191] 2) Trend of foam quantity change Δn:
[0192] Upper limit: Δn max Lower limit: Δn min f(Δn),
[0193]
[0194] Where A Δn is a coefficient.
[0195] 3) Foam size s:
[0196] Upper limit: s max Lower limit: s min f(s),
[0197]
[0198] Where A s is a coefficient.
[0199] 4) Trend of foam size change Δs:
[0200] Upper limit: Δs max Lower limit: Δs min f(Δs),
[0201]
[0202] Where A Δs is a coefficient.
[0203] 5) Foam flow velocity v:
[0204] Upper limit: v max Lower limit: v min f(v),
[0205]
[0206] Where A v is a coefficient.
[0207] 6) Trend of foam flow velocity change Δv:
[0208] Upper limit: Δv max Lower limit: Δv min f(Δv),
[0209]
[0210] Where A Δv is a coefficient.
[0211] 7) Foam survival time t:
[0212] Upper limit: t max Lower limit: t minf(t),
[0213]
[0214] Where A t is a coefficient.
[0215] 8) Trend of bubble survival time Δt:
[0216] Upper limit: Δt max Lower limit: Δt min f(Δt),
[0217]
[0218] Where A Δt is a coefficient.
[0219] Define matrix M based on the above content:
[0220]
[0221] Define matrix K:
[0222]
[0223] 5. The formula for calculating the control output matrix u is as follows:
[0224]
[0225] in:
[0226] u n Adjustments based on the number and trend of bubbles;
[0227] u s Adjustments based on bubble size and its changing trend;
[0228] u v Adjustments to the bubble flow rate and its changing trend;
[0229] u t Adjustments to the bubble's lifespan and trend.
Claims
1. A method for controlling the dosage of mineral processing frother, characterized in that: The following steps are involved: S1: Automatically acquire foam feature images through an image acquisition device, and transmit the acquired images to the image processing and analysis unit after uncompressing them; S2: The foam characteristic data analyzed by the image processing and analysis unit includes: foam quantity, size, toughness, survival time, and flow velocity. The analysis process includes: Step 1: Use a nonlocal mean filtering algorithm to filter out signal noise and useless pixels; Step 2: Using the watershed algorithm and its improved algorithm, select a reference coordinate system and set standard dimensions; divide graphic elements and mark bubble objects; Step 3: Use the YOLOv8 algorithm to track and mark objects and analyze bubble features; S3: Calculate the absolute values and trends of the relevant parameters obtained from S2, and calculate and output the adjustment values for the dosage of the drug in the dosing adjustment equipment; S4: The reagent adjustment equipment adjusts the amount of foaming agent according to the reagent usage adjustment value.
2. The method for controlling the dosage of a mineral processing frother according to claim 1, characterized in that: In step S2, when calculating the bubble flow velocity, for two consecutive frames of images, the IOU algorithm is first used for matching to determine the same bubble in the two frames.
3. The method for controlling the dosage of a mineral processing frother according to claim 1, characterized in that: The specific process of the first step of S2 is as follows: 1) For each pixel p, select the neighborhood Np and the search range Ω; 2) For each pixel q within the search range, calculate the similarity weight w(p,q): 3) Calculate the denoised pixel values based on the weights w(p,q): Where Np and Nq represent the neighborhood centered at pixels p and q; Ω represents the Euclidean distance between pixels p and q; h represents the filtering parameter controlling similarity, with larger values resulting in slower weight decay; I(q) represents the original value of pixel q; Z(p) represents the normalization factor, ensuring the sum of weights is 1, and its calculation formula is as follows, where Ω represents the pixel range:
4. The method for controlling the dosage of a mineral processing frother according to claim 1, characterized in that: The specific process of the second step of S2 is as follows: 1) Calculate the gradient The watershed algorithm treats the gradient image as terrain, with higher gradient values corresponding to "peaks" and lower gradient values corresponding to "valleys." The gradient calculation formula is as follows: in: and These represent the gradients of the image in the horizontal and vertical directions, respectively. 2) Mark the initial seed point The watershed algorithm uses the initial seed point as the starting point for segmentation, and the seed point is generated by finding local minima. Where M(x,y) is a binary seed image, where a pixel value of 1 indicates that the point belongs to the seed region, and a pixel value of 0 indicates the background; f(x,y) represents the pixel value of the input image. For a pixel (x,y), it is considered a local minimum if the following conditions are met: Where (i,j) represents the neighborhood offset, and {-1,0,1}\{(0,0)} represents the eight neighborhoods excluding itself (top, bottom, left, right and four diagonals); 3) Mark the output image The labeled output image L(x,y) is obtained through the following steps: Iterate through each pixel in the image: If the current pixel value is 1, check if it is connected to a marked pixel; If they are connected, assign the same tag value; If the connection is broken, a new tag value is created. After traversal, each connected component has a unique tag value; 4) Output the watershed image For each pixel (x, y), determine whether the pixel's label value is different from that of its neighboring pixels. If so, mark the pixel as a boundary. The formula is as follows: Where N(x,y) is the connected region of pixel (x,y), L(x,y) is the pixel label value, and W(x,y) is the output watershed image, with a value of 1 indicating a boundary and 0 indicating a non-boundary.
5. The method for controlling the dosage of a mineral processing frother according to claim 1, characterized in that: The specific process of step three in S2 is as follows: 1) Count the bubble diameter Using the boundary information of the YOLO V8 detection box, the diameter of each bubble is calculated and classified; Let the coordinates of the four vertices of the YOLOv8 output detection box be (xmin, ymin), (xmin, ymax), (xmax, ymin), and (xmax, ymax), then the bubble diameter is: D=max(x max -x min ,y max -y min ) Define the standard diameters of large and small bubbles as Dsmall and Dlarge, respectively. Then, the classification rules for large, medium, and small bubbles are as follows: Small bubbles: D <= Dsmall Medium bubbles: Dsmall <D<D large Large air bubble: D>=Dlarge 2) Statistical analysis of bubble sizes (large, medium, small) Count the number of bubbles of different categories in each frame of the image, and let the bubble classification result set be: C={c1,c2,...,c N } Where c i Given the subclasses ∈ {small, medium, large}, the quantities Nsmall, Nmedium, and Nlarge in the three categories are respectively: 3) Calculate the bubble flow velocity For two consecutive frames of images, the IOU algorithm is first used to match and identify the same bubble in the two frames. set up For the bubbles in frame t-1, If the bubble is in frame t, then the IOU can be represented as: Wherein, the denominator is the union of the bubble image ranges, and the numerator is the intersection of the bubble image ranges; The matching rules are as follows: Where threshold is the matching threshold, with a value of 0.5; Suppose that the center of the same bubble in frames t and t+1 can be obtained using YOLO v8, and is (xt, yt) and (xt+1, yt+1), then the velocity of the bubble is: Where Δt is the inter-frame time interval; 4) Calculate bubble lifespan The bubble's lifespan is calculated by the number of frames it remains in within the frame sequence. Suppose the bubble appears in frame ti and disappears in frame tn, existing for a total of ni frames, with an inter-frame time interval of Δt. Then the duration T is: T = (n-1) × Δt.
6. A device for controlling the amount of mineral processing frother used, characterized in that: include: The system comprises a high-definition, high-speed industrial image acquisition unit, an image transmission unit, an image processing and analysis unit, a process parameter analysis and control output calculation unit, and a reagent dosage adjustment control unit. The high-definition, high-speed industrial image acquisition unit captures foam images, which are then transmitted uncompressed to the image processing and analysis unit via the image transmission unit. The image processing and analysis unit analyzes and processes characteristic data, including the quantity, size, toughness, survival time, and flow velocity of the foam, and transmits this data to the process parameter analysis and control output calculation unit. This unit calculates the absolute values and trends of the relevant parameters, calculates the adjustment value for the reagent dosage, and outputs the reagent adjustment signal to the reagent adjustment equipment in the reagent dosage adjustment control unit to adjust the amount of foaming agent used.
7. The device for controlling the dosage of mineral processing frother according to claim 6, characterized in that: The high-definition high-speed industrial image acquisition unit includes: a high-definition industrial camera, a lens, a protective part, a mounting bracket, an illumination part, and an information acquisition part. The high-definition industrial camera has high resolution and high frame rate; the protective part has a sealed dustproof and high light transmittance function, and creates a black box environment for the acquisition unit; the mounting bracket has vibration damping function; and the information acquisition part transmits images without compression.
8. The device for controlling the amount of mineral processing frother used according to claim 6, characterized in that: The image transmission unit includes network transmission equipment and cables.
9. The device for controlling the amount of mineral processing frother used according to claim 8, characterized in that: The network transmission equipment and cables include: switches, optical modules, network cables, and optical fibers.
10. The device for controlling the amount of mineral processing frother used according to claim 6, characterized in that: The image processing and analysis unit includes a processor with a GPU or CPU, a storage device, and image processing and analysis software mounted on it. It can be a front-end terminal device or a centralized server. It can analyze information of one or more image acquisition objects, display and transmit information of the original image, the processed image, the analysis process information, and the analysis result data. It can be displayed in a distributed manner or in a centralized manner, and also has data communication functions.