A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography
By combining colloidal gold immunotomography with image segmentation and concentration analysis algorithms, the problem of high cost and long time detection of methyl isosalus in the prior art is solved, and fast and accurate on-site detection is achieved, which improves the immediacy and sensitivity of the detection.
Patent Information
- Application Number
- CN202411902930.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-12-23
AI Technical Summary
In the prior art, the detection method of methyl isosalophenone relies on laboratory gas chromatography, which is costly, long time and limited by the site, making it difficult to detect quickly and accurately on site, and is inconvenient in color analysis, which affects sensitivity and reliability.
Colloidal gold immunotogramming method is used to combine image segmentation, feature analysis and concentration analysis algorithms to accurately identify detection lines and control lines through color-producing image processing, and obtain color feature data to achieve rapid and accurate detection of methyl isosalophen concentration.
It realizes the completion of methyl isosalose detection in a short time, which is simple and easy to standardize and automate, improves the immediacy, accuracy and sensitivity of the detection, reduces manual errors, and enhances the reliability and objectivity of the detection.
Smart Images

Figure CN119738561B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pesticide residue detection. Specifically, it relates to a method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography. Background Art
[0002] The hygiene detection items of fruits and vegetables generally include sulfite, nitrite, heavy metals, pathogenic bacteria and pesticide residues. Among them, pesticide residues are listed as the primary detection items and can most directly reflect the quality problems of vegetables. As a highly toxic soil insecticide, isofenphos-methyl is widely used for controlling nematodes and underground pests on crops such as corn and wheat due to its broad insecticidal spectrum and long residual effect. Currently, isofenphos-methyl has been listed as one of the pesticides prohibited in vegetable production and is also listed as one of the pesticide varieties for quantitative monitoring of vegetable pesticide residues. Therefore, the accuracy of isofenphos-methyl pesticide detection data is particularly important.
[0003] In the prior art, most detections are carried out through laboratories such as gas chromatography. Detection by laboratories such as gas chromatography is a conventional method for detecting isofenphos-methyl, with advantages such as high sensitivity, accurate results, and good repeatability, and has become an indispensable conventional means for isofenphos-methyl detection. However, laboratory detection is expensive, time-consuming and limited by the site. Moreover, it is not convenient to analyze the colors of the test line and the control line, not easy to capture the minute changes in colors, increasing the influence of external interference factors and reducing the sensitivity and reliability of the detection. Compared with the laboratory detection method, the rapid detection method of isofenphos-methyl colloidal gold immunochromatography is a detection method that has been widely applied and developed rapidly in recent years. Because for food safety supervision of agricultural and sideline products wholesale markets and supermarket food retail outlets, and even for the self-management of operators, on-site sampling and rapid detection are required. As the first step in discovering food safety problems, on-site rapid detection plays an irreplaceable role.
[0004] In view of the problems in the related art, no effective solution has been proposed yet. Summary of the Invention
[0005] Aiming at the deficiencies of the prior art, the present invention provides a method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography, which solves the problems mentioned in the above background art that most detections in the prior art are carried out through laboratories such as gas chromatography. Detection by laboratories such as gas chromatography is a conventional method for detecting isofenphos-methyl, with advantages such as high sensitivity, accurate results, and good repeatability, and has become an indispensable conventional means for isofenphos-methyl detection. However, laboratory detection is expensive, time-consuming and limited by the site. Moreover, it is not convenient to analyze the colors of the test line and the control line, not easy to capture the minute changes in colors, increasing the influence of external interference factors and reducing the sensitivity and reliability of the detection.
[0006] To achieve the above object, the present invention is realized through the following technical solutions:
[0007] A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography, the method for detecting isofenphos-methyl in fruits and vegetables comprising the following steps:
[0008] S1. Prepare a colloidal gold immunochromatography reagent strip, and detect isofenphos-methyl in fruits and vegetables based on the colloidal gold immunochromatography reagent strip;
[0009] S2. Obtain a color development image of the colloidal gold immunochromatography reagent strip, and process the color development image to obtain a color development characteristic image;
[0010] S3. Segment the obtained color development characteristic image based on an image segmentation algorithm to determine the positions of the test line and the control line of the colloidal gold immunochromatography reagent strip, and obtain the color of the test line and the color of the control line;
[0011] S4. Analyze the color of the test line and the color of the control line based on a feature analysis algorithm to obtain the color feature data of the test line and the color feature data of the control line;
[0012] S5. Compare and analyze the color feature data of the test line and the color feature data of the control line based on a concentration analysis algorithm to obtain the concentration of isofenphos-methyl in fruits and vegetables;
[0013] Segmenting the obtained color development characteristic image based on an image segmentation algorithm to determine the positions of the test line and the control line of the colloidal gold immunochromatography reagent strip, and obtaining the color of the test line and the color of the control line includes the following steps:
[0014] S31. Input the color development characteristic image and initialize the parameters of the image segmentation algorithm;
[0015] S32. Generate multiple candidate segmentation thresholds in the color development characteristic image, calculate the fitness value of each candidate segmentation threshold, and record the initial optimal candidate segmentation threshold;
[0016] S33. Perform boundary correction on the initial optimal candidate segmentation threshold, calculate the fitness of each candidate segmentation threshold, and record the current optimal candidate segmentation threshold and the fitness value;
[0017] S34. Based on the current optimal candidate segmentation threshold, generate a reverse candidate segmentation threshold using the lens imaging reverse learning strategy, and based on the greedy strategy, save the current optimal candidate segmentation threshold;
[0018] S35. Based on the current optimal candidate segmentation threshold, segment the color development region, identify and determine the positions and boundaries of the test line and the control line in the colloidal gold immunochromatography reagent strip;
[0019] S36. Extract the color information of the test line and the control line from the segmented colloidal gold immunochromatographic test strip according to their positions.
[0020] S37. Determine whether the iteration termination condition is satisfied. If it is satisfied, output the final segmentation result; if not, return to step S33 to continue optimizing the segmentation process.
[0021] Furthermore, preparing a colloidal gold immunochromatographic test strip and detecting isofenphos-methyl in fruits and vegetables based on the colloidal gold immunochromatographic test strip include the following steps:
[0022] S11. Under reaction conditions, combine the prepared anti-isofenphos-methyl antibody with gold nanoparticles to generate a colloidal gold-labeled antibody.
[0023] S12. Coat the colloidal gold-labeled antibody on the sample pad part of the test strip, and coat fixed antigens and antibodies on the test line and the control line of the test strip respectively to obtain a colloidal gold immunochromatographic test strip.
[0024] S13. Extract the fruit and vegetable samples with a preset solvent to obtain an extraction solution of isofenphos-methyl, and add the extraction solution to the sample addition hole of the colloidal gold immunochromatographic test strip for detection.
[0025] Furthermore, generating a reverse candidate segmentation threshold using a lens imaging reverse learning strategy based on the current best candidate segmentation threshold, and saving the current optimal candidate segmentation threshold based on a greedy strategy include the following steps:
[0026] S341. Determine the upper and lower bounds of the search space of the current best candidate segmentation threshold, and initialize the current best candidate segmentation threshold.
[0027] S342. Based on the lens imaging reverse learning strategy, calculate the reverse candidate segmentation threshold according to the current best candidate segmentation threshold and the upper and lower bounds of the search space.
[0028] S343. Based on the greedy strategy, compare the fitness values of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold.
[0029] S344. If the fitness value of the reverse candidate segmentation threshold is greater than the fitness value of the current best candidate segmentation threshold, use the reverse candidate segmentation threshold as the current optimal candidate segmentation threshold; if the fitness value of the reverse candidate segmentation threshold is less than or equal to the fitness value of the current best candidate segmentation threshold, use the current best candidate segmentation threshold as the current optimal candidate segmentation threshold and save it.
[0030] Furthermore, the formula for calculating the reverse candidate segmentation threshold is:
[0031] ;
[0032] In the formula, is expressed as the reverse candidate segmentation threshold;
[0033] M is expressed as the current best candidate segmentation threshold;
[0034] U R is expressed as the upper bound of the search space;
[0035] L R is expressed as the lower bound of the search space;
[0036] K is expressed as the scaling factor.
[0037] Furthermore, based on the greedy strategy, comparing the fitness values of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold includes the following steps:
[0038] S3431. Initialize the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination based on the cross-entropy method;
[0039] S3432. Optimize each candidate segmentation threshold in the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination respectively. Each time, select an unoptimized candidate segmentation threshold, and keep the other candidate segmentation thresholds unchanged as the current best candidate segmentation threshold;
[0040] S3433. Compare the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, and calculate their respective fitness values;
[0041] S3434. If the fitness value of the reverse candidate segmentation threshold combination is greater than the fitness value of the current best candidate segmentation threshold combination, update the current best candidate segmentation threshold combination as the reverse candidate segmentation threshold combination; otherwise, keep the current best candidate segmentation threshold combination unchanged;
[0042] S3435. If there are still unoptimized candidate segmentation thresholds, continue to repeat steps S3432 to S3434 based on the greedy strategy until all candidate segmentation thresholds have been optimized.
[0043] Furthermore, analyzing the color of the detection line and the color of the control line based on the feature analysis algorithm to obtain the color feature data of the detection line and the color feature data of the control line includes the following steps:
[0044] S41. Evaluate the color features in the chromogenic feature image using a feature analysis algorithm, select the color features in the chromogenic feature image based on the evaluation results and the feature screening rules, and use the color features as the preliminary feature subset;
[0045] Among them, the color features include the test line color features and the control line color features;
[0046] S42. Initialize the parameters of the feature analysis algorithm, calculate each test line color feature and control line color feature through the color feature extraction formula, and calculate the fitness value of each test line color feature and control line color feature according to the color similarity metric;
[0047] S43. Calculate the adjustment speed, optimization direction, and random perturbation of each test line color feature and control line color feature respectively;
[0048] S44. Calculate the step size scaling factor according to the exponential non-linear decrease, and update the adjustment amplitude and color feature value of each test line color feature and control line color feature;
[0049] S45. Perform genetic operations on each test line color feature and control line color feature to increase the diversity of the color features;
[0050] S46. Calculate the fitness value of each test line color feature and control line color feature after iteration, select several optimal test line color features and control line color features to form elite features, perform elite chaotic mutation on the elite features, calculate the fitness of the mutated elite features, and compare with the original elite features, and retain the best elite features;
[0051] S47. Judge whether the maximum number of iterations is reached. If so, output the best elite features as the color feature data of the test line and the color feature data of the control line; if not, return to step S43 to continue optimization.
[0052] Further, performing elite chaotic mutation on the elite features includes the following steps:
[0053] S461. After each iteration is completed, select several optimal test line color features and control line color features to form an elite feature set, and construct an elite space according to the upper and lower limits of each dimension of the elite features;
[0054] S462. Use the mapping formula to map each dimension of the elite features from the elite space to the chaotic space to obtain chaotic features, and perform chaotic mapping on each dimension of the chaotic features according to the preset chaotic mutation probability to generate new chaotic features;
[0055] S463. Remap the new chaotic features back to the elite space through the inverse mapping formula to obtain new elite features, compare the fitness values of the original elite features and the mutated elite features, retain the elite feature with the highest fitness, and enter the next generation of optimization.
[0056] Further, the mapping formula is:
[0057] ;
[0058] In the formula, H i,j represents the chaotic feature value of the i th elite feature in the j th dimension;
[0059] B i,j represents the current color feature value of the i th elite feature in the j th dimension;
[0060] D i,j represents the elite feature value of the i th elite feature in the j th dimension;
[0061] D u,j represents the upper limit of the elite feature value of the j th dimension.
[0062] Further, comparing and analyzing the color feature data of the test line and the color feature data of the control line based on the concentration analysis algorithm to obtain the concentration of isofenphos-methyl in fruits and vegetables includes the following steps:
[0063] S51. Randomly generate an initial color feature data set, calculate the corresponding objective function value for each color feature data in the initial color feature set, perform a fast non-dominated sort on the color feature data, calculate its crowding degree, and form a sorted preferred color feature set;
[0064] S52. Based on the tournament selection method, select the color feature with the highest fitness from the preferred color feature set and copy it to form a new color feature set;
[0065] S53. Perform crossover and mutation operations on the new color feature set, eliminate the color feature data that does not meet the constraint conditions, retain the color feature data that meets the concentration detection constraint conditions, and use the initialization function to regenerate the color feature data that meets the concentration detection constraint conditions;
[0066] S54, merging the parent color feature data set with the child color feature data set to form a new preferred color feature set, and removing duplicate color feature data, retaining unique color feature data, to form a feature set without duplicate color feature data;
[0067] S55, performing fast non-dominated sorting on the feature set of non-repeated color feature data, and calculating its congestion degree to obtain a new feature set of non-repeated color feature data;
[0068] S56, determine whether the current number of iterations has reached a preset maximum value, if not, return to step S52 to continue iterating, if reached, stop iterating and go to step S57;
[0069] S57. Output the final optimal color feature data set as the result of the color feature comparison analysis of the detection line and the control line, and obtain the concentration of methyl isothioate in fruits and vegetables.
[0070] Furthermore, based on the tournament selection method, the color feature with the highest fitness is selected from the preferred color feature set, and the color feature is copied to form a new color feature set, which includes the following steps:
[0071] S521, defining a fitness function related to color features, and calculating a fitness value for each color feature data;
[0072] S522, preset the tournament scale, randomly select a number of color feature data from the preferred color feature set, use them as participants of the current round of the tournament, calculate the fitness of the number of color feature data, and select the color feature data with the highest fitness as the winner of the current round of the tournament;
[0073] S523, copying the color feature data with the highest fitness selected in the tournament and putting it into a new color feature data set, repeating the tournament selection and copying process multiple times until the new color feature set reaches a predetermined size;
[0074] S524: Perform crossover and mutation operations on the new color feature set, and generate a final new color feature set.
[0075] The beneficial effects of the present invention are:
[0076] 1. The present invention uses a colloidal gold immunochromatographic test strip for the detection of isofenphos-methyl, combined with color development image processing, enabling the completion of the entire detection process within a short time, avoiding complex pretreatment steps, and being more convenient compared with traditional methods such as chromatography or mass spectrometry. Through color development reactions and the acquisition of color development images, the presence of the target substance can be quickly and intuitively reflected, thereby improving the immediacy and response speed of detection. Through the preparation of the test strip and the processing of color development images, combined with a concentration analysis algorithm, the entire detection process is simple, easy to standardize, and automate. Since the colloidal gold immunochromatographic method is simple to operate and has a low cost, it is thus convenient for popularization and application in grass-roots laboratories and even on-site rapid detections.
[0077] 2. The present invention accurately identifies and locates the positions of the test line and the control line through an image segmentation algorithm, which can reduce the errors caused by manual judgment, make the confirmation of the positions more accurate, and improve the accuracy and repeatability of detection.
[0078] 3. The present invention analyzes the colors of the test line and the control line through a feature analysis algorithm to obtain color feature data. It can more sensitively capture the minute changes in color, reduce the influence of external interference factors, and enhance the sensitivity and reliability of detection.
[0079] 4. The present invention compares and analyzes the color feature data of the test line and the control line through a concentration analysis algorithm. Compared with traditional subjective visual comparison methods, it can more precisely quantify the concentration changes of isofenphos-methyl and ensure the objectivity of the detection results. Description of the Drawings
[0080] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0081] Figure 1 It is a flowchart of a method for detecting isofenphos-methyl in fruits and vegetables based on the colloidal gold immunochromatographic method according to an embodiment of the present invention. Detailed Embodiments
[0082] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all of the embodiments.
[0083] In the description of the present invention, unless otherwise specified, "a plurality of" means two or more. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0084] According to an embodiment of the present invention, a method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography is provided.
[0085] The present invention will be further described in conjunction with the accompanying drawings and specific embodiments. As Figure 1 shown, the method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to an embodiment of the present invention includes the following steps:
[0086] S1. Prepare a colloidal gold immunochromatographic test strip and detect isofenphos-methyl in fruits and vegetables based on the colloidal gold immunochromatographic test strip;
[0087] S2. Obtain a color development image of the colloidal gold immunochromatographic test strip and process the color development image to obtain a color development characteristic image;
[0088] Specifically, obtain the color development image of the colloidal gold immunochromatographic test strip through an image acquisition device. For example:
[0089] Digital camera: It can be used to photograph the color development part of the colloidal gold immunochromatographic test strip.
[0090] Smartphone camera: The resolution of modern mobile phone cameras is high enough to be used to obtain the color development image, which is convenient for on-site or portable detection.
[0091] Special color development scanner: Some professional laboratories or detection equipment may be equipped with special scanners or imaging devices dedicated to collecting color development images, which can provide higher image accuracy and consistency.
[0092] Specifically, the color development image refers to the image of the color development area on the colloidal gold immunochromatographic test strip. When the test line and control line on the test strip show color, photograph this area through the image acquisition device, and the formed digital image is the color development image, including:
[0093] Test line (T line): This is the color development area for detecting the target substance (such as isofenphos-methyl). When the target substance is present, a color change will appear on the test line.
[0094] Control line (C line): This is a reference line used to verify whether the test strip works properly. It usually shows color all the time, indicating that the test system is effective.
[0095] Background area: In addition to the test line and control line, the color development image may also include the background area on the test strip where there is no color change.
[0096] S3. Segment the obtained color development feature image based on the image segmentation algorithm, determine the positions of the test line and the control line of the colloidal gold immunochromatographic test strip, and obtain the color of the test line and the color of the control line;
[0097] S4. Analyze the color of the test line and the color of the control line based on the feature analysis algorithm to obtain the color feature data of the test line and the color feature data of the control line;
[0098] S5. Compare and analyze the color feature data of the test line and the color feature data of the control line based on the concentration analysis algorithm to obtain the concentration of isofenphos-methyl in fruits and vegetables;
[0099] Segmenting the obtained color development feature image based on the image segmentation algorithm, determining the positions of the test line and the control line of the colloidal gold immunochromatographic test strip, and obtaining the color of the test line and the color of the control line include the following steps:
[0100] S31. Input the color development feature image and initialize the parameters of the image segmentation algorithm;
[0101] S32. Generate multiple candidate segmentation thresholds in the color development feature image, calculate the fitness value of each candidate segmentation threshold, and record the initial best candidate segmentation threshold;
[0102] S33. Perform boundary correction on the initial best candidate segmentation threshold, calculate the fitness of each candidate segmentation threshold, and record the current best candidate segmentation threshold and the fitness value;
[0103] S34. Based on the current best candidate segmentation threshold, generate reverse candidate segmentation thresholds using the lens imaging reverse learning strategy, and based on the greedy strategy, save the current optimal candidate segmentation threshold;
[0104] S35. Based on the current optimal candidate segmentation threshold, segment the color development region, identify and determine the positions and boundaries of the test line and the control line in the colloidal gold immunochromatographic test strip;
[0105] S36. According to the positions of the test line and the control line in the segmented colloidal gold immunochromatographic test strip, extract the color information of the test line and the control line;
[0106] S37. Determine whether the iteration termination condition is satisfied. If it is satisfied, output the final segmentation result. If it is not satisfied, return to step S33 to continue optimizing the segmentation process.
[0107] To facilitate the understanding of the above technical solution of the present invention, the following will give a detailed description of the present invention in the actual process of segmenting the obtained color development feature image based on the image segmentation algorithm, determining the positions of the test line and the control line of the colloidal gold immunochromatographic test strip, and obtaining the color of the test line and the color of the control line.
[0108] Step 1. 1) Input the color development feature image: Input the color development image taken from the colloidal gold immunochromatographic test strip into the system. Image size: 640×480 pixels. Color mode: RGB (Red, Green, Blue) mode.
[0109] 2) Initialize the segmentation algorithm parameters: Population size: 50. Maximum number of iterations: 100. Predation behavior weight: 1.5. Swarm behavior weight: 1.2. Entropy measure parameter: Use the Otsu method (maximum between-class variance method) as the fitness function to define the threshold optimization objective for segmentation.
[0110] Step 2. 1) Generate candidate segmentation thresholds: Generate several candidate thresholds on the gray histogram of the color development feature image. Threshold generation range: Gray value 0 - 255. Initial number of candidate segmentation thresholds: 10 candidate thresholds, which are [50, 75, 100, 125, 150, 175, 200, 225, 250] respectively.
[0111] 2) Fitness calculation: Calculate the fitness of each candidate threshold based on the entropy measure. The threshold with a higher fitness is more suitable for segmentation.
[0112] Calculation formula: The between-class variance formula in the Otsu method can be used, and the goal is to maximize the between-class variance.
[0113] Record the initial optimal threshold: The fitness corresponding to the threshold 125 is 0.89, and the initial optimal threshold is 125.
[0114] Step 3. 1) Boundary correction: Perform boundary correction on the initial optimal threshold (125), and use the range of ±5 around it as the new candidate thresholds. The new candidate segmentation thresholds are [120, 122, 124, 126, 128, 130].
[0115] 2) Recalculate the fitness: Calculate the fitness of these corrected thresholds. The new optimal threshold is 126, and the corresponding fitness is 0.91.
[0116] Step 4. 1) Lens imaging reverse learning strategy: Generate the reverse threshold for the current optimal threshold 126: Reverse threshold = 255 - 126 = 129. Then the reverse candidate segmentation threshold is
[129] .
[0117] 2) Greedy strategy: Compare the fitness of the current candidate threshold (126) and the reverse candidate threshold (129). Fitness calculation: The fitness of the threshold 126 is 0.91, and the fitness of the threshold 129 is 0.88. Retain the current optimal threshold 126.
[0118] Step Five: 1) Divide the color development area: Use the current optimal candidate threshold of 126 to perform gray-scale segmentation on the color development feature image, and extract the color development area of the colloidal gold immunochromatographic test strip.
[0119] 2) Identify the test line and the control line: Determine the positions and boundaries of the test line and the control line by analyzing the morphological features in the segmentation result. Boundary positions of the test line and the control line: The test line is located at pixels 300 - 340 of the image, and the control line is located at pixels 400 - 440.
[0120] Step Six: Extract color features: Use the average values of the RGB channels to extract the color features of the test line and the control line. Color features of the test line: R = 140, G = 100, B = 60. Color features of the control line: R = 160, G = 110, B = 70.
[0121] Step Seven: Judge the termination condition: Check whether the maximum number of iterations or the threshold convergence condition is reached. The current number of iterations is 5, and the fitness is stable at 0.91. The termination condition is met.
[0122] Output the segmentation result: Output the final segmentation results of the test line and the control line and their boundary positions, and save the color feature data of the test line and the control line.
[0123] Specifically, the image segmentation algorithm is an improved remora optimization algorithm combined with cross-entropy for multi-threshold image segmentation. First, introduce the lens reflection learning strategy to generate lens reverse solutions in the search space, and select the best solution according to the greedy strategy to improve the population diversity of the algorithm and its ability to jump out of local optima, and enhance the convergence speed. Second, propose an adaptive weight factor to provide adaptive perturbation to remora individuals and improve the exploration performance.
[0124] Preferably, preparing a colloidal gold immunochromatographic test strip and detecting isofenphos-methyl in fruits and vegetables based on the colloidal gold immunochromatographic test strip includes the following steps:
[0125] S11. Under reaction conditions, combine the prepared anti-isofenphos-methyl antibody with gold nanoparticles to generate a colloidal gold-labeled antibody;
[0126] S12. Coat the colloidal gold-labeled antibody on the sample pad part of the test strip, and coat fixed antigens and antibodies on the test line and the control line of the test strip respectively to obtain a colloidal gold immunochromatographic test strip;
[0127] S13. Extract the fruits and vegetable samples with a preset solvent to obtain an extraction solution of isofenphos-methyl, and add the extraction solution to the sample injection hole of the colloidal gold immunochromatographic test strip for detection.
[0128] It should be noted that the extraction of isofenphos-methyl from fruits and vegetables includes:
[0129] 1) Wash the fruit and vegetable samples to be tested with deionized water to remove dust and impurities attached to the surface.
[0130] 2) Use scissors or a knife to cut the sample into small pieces and place a certain weight (e.g. 10 g) of the sample in a mortar.
[0131] 3) Add a certain volume of extraction solution (such as acetonitrile or methanol solution, usually 5-10 times the weight of the sample) to thoroughly homogenize the sample.
[0132] 4) After homogenization, the mixture is passed through filter paper or centrifuged (e.g., 4000 rpm, 10 minutes) to remove solid residues to obtain a clear extract.
[0133] It should be explained that the colloidal gold immunochromatographic reagent strip prepared for detection includes:
[0134] 1) Preparation of colloidal gold-labeled antibodies: Under reaction conditions, the prepared anti-isothiophene-methyl antibodies are combined with gold nanoparticles to generate colloidal gold-labeled antibodies. According to the project content, the particle size of the gold nanoparticles is adjusted (by changing the ratio of chloroauric acid and trisodium citrate) and the stability (by adding glutathione and other templates for regulation).
[0135] 2) Assemble the test strip: Apply the colloidal gold-labeled antibody to the sample pad of the test strip, apply the fixed antigen (simulating the methyl isoflavone antigen) to the test line of the test strip, and apply the antibody (usually an antibody used to verify whether the reaction is successful, such as anti-mouse antibody) to the control line.
[0136] It should be explained that the rapid detection of methyl isoflavone using colloidal gold immunochromatographic reagent strips includes:
[0137] 1) Take an appropriate amount of extract (e.g. 100 µL) and add it to the predetermined dilution buffer and mix well.
[0138] 2) Add the mixed extract dropwise to the sample well of the reagent strip and let it sit for several minutes (usually 5-10 minutes).
[0139] 3) Wait for the capillary action of the test strip to make the liquid migrate upward along the test strip, and the colloidal gold labeled antibody will bind to methyl isoflavone in the extract. If methyl isoflavone is present, it will inhibit the binding of the antibody to the antigen on the test line, causing the color of the test line to become lighter or disappear.
[0140] Preferably, based on the current best candidate segmentation threshold, the reverse candidate segmentation threshold is generated by using the lens imaging reverse learning strategy, and based on the greedy strategy, the current best candidate segmentation threshold is saved, which includes the following steps:
[0141] S341. Determine the upper and lower bounds of the search space for the current best candidate segmentation threshold, and initialize the current best candidate segmentation threshold;
[0142] S342. Based on the lens imaging reverse learning strategy, calculate the reverse candidate segmentation threshold according to the current best candidate segmentation threshold and the upper and lower bounds of the search space;
[0143] S343. Based on the greedy strategy, compare the fitness values of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold;
[0144] S344. If the fitness value of the reverse candidate segmentation threshold is greater than the fitness value of the current best candidate segmentation threshold, then use the reverse candidate segmentation threshold as the current optimal candidate segmentation threshold; if the fitness value of the reverse candidate segmentation threshold is less than or equal to the fitness value of the current best candidate segmentation threshold, then use the current best candidate segmentation threshold as the current optimal candidate segmentation threshold and save it.
[0145] Specifically, the greedy strategy is the greedy algorithm, which is an algorithm strategy based on local optimal selection and is applicable to solving optimization problems. This algorithm selects the currently seemingly optimal solution at each step, hoping to finally obtain the global optimal solution through the accumulation of local optimal solutions.
[0146] Preferably, the formula for calculating the reverse candidate segmentation threshold is:
[0147] ;
[0148] In the formula, represents the reverse candidate segmentation threshold;
[0149] M represents the current best candidate segmentation threshold;
[0150] U R represents the upper bound of the search space;
[0151] L R represents the lower bound of the search space;
[0152] K represents the scaling factor.
[0153] Preferably, based on the greedy strategy, comparing the fitness values of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold includes the following steps:
[0154] S3431. Based on the cross-entropy method, initialize the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination;
[0155] S3432. For each candidate segmentation threshold in the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, perform optimization separately. Each time, select an unoptimized candidate segmentation threshold, and keep the other candidate segmentation thresholds unchanged as the current best candidate segmentation thresholds.
[0156] S3433. Compare the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, and calculate their respective fitness values.
[0157] S3434. If the fitness value of the reverse candidate segmentation threshold combination is greater than the fitness value of the current best candidate segmentation threshold combination, update the current best candidate segmentation threshold combination as the reverse candidate segmentation threshold combination; otherwise, keep the current best candidate segmentation threshold combination unchanged.
[0158] S3435. If there are still unoptimized candidate segmentation thresholds, based on the greedy strategy, continue to repeat steps S3432 to S3434 until all candidate segmentation thresholds have been optimized.
[0159] To facilitate the understanding of the above technical solution of the present invention, the following will give a detailed description of comparing the fitness values of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold based on the greedy strategy in the actual process of the present invention.
[0160] Step 1. 1) Initialize the current best candidate segmentation threshold combination: Assume that the current best segmentation threshold combination obtained through preliminary calculation is [125, 140, 200], where each value represents the best segmentation threshold of the image in three different regions.
[0161] 2) Generate the reverse candidate segmentation threshold combination: Use the lens imaging reverse learning strategy to generate the reverse segmentation threshold combination. Assume that the reverse candidate segmentation threshold combination is [130, 145, 180], that is, each candidate segmentation threshold is generated by taking 255 minus the current segmentation threshold.
[0162] Step 2. 1) In each iteration, for each candidate segmentation threshold in the current best segmentation threshold combination and the reverse candidate segmentation threshold combination, use the cross-entropy method for optimization. During optimization, each time select an unoptimized candidate segmentation threshold, and keep the other thresholds unchanged.
[0163] 2) Example: The current optimization threshold: 125 (i.e., the first threshold of the current best segmentation threshold combination). During optimization, first keep the other segmentation thresholds of the current best segmentation threshold combination [125, 140, 200] unchanged, and only optimize the threshold 125. Assume that in this optimization, the threshold 125 is changed to 127 through local search, resulting in an improvement in the fitness value. The updated current best segmentation threshold combination is [127, 140, 200].
[0164] Step 3: 1) Use the cross - entropy method to calculate the fitness values of the current best segmentation threshold combination [125, 140, 200] and the reverse candidate segmentation threshold combination [130, 145, 180] respectively. Assume the cross - entropy calculation results are as follows:
[0165] Fitness value of the current best candidate segmentation threshold combination: 0.88.
[0166] Fitness value of the reverse candidate segmentation threshold combination: 0.85.
[0167] 2) Compare the results: Since 0.88 > 0.85, the current best segmentation threshold combination is better than the reverse segmentation threshold combination. Therefore, temporarily keep the current combination unchanged.
[0168] Step 4: Processing of fitness comparison results: According to the greedy strategy, if the fitness value of the reverse segmentation threshold combination is greater than the current combination, update it to the reverse combination; otherwise, keep the current combination. At this time, the fitness value of the current combination is better than that of the reverse combination, so no update is made and the current combination [127, 140, 200] is kept.
[0169] Step 5: 1) Continue to optimize the unoptimized candidate thresholds: Conduct similar optimization for the remaining candidate segmentation thresholds. For example, next optimize the threshold 140 while keeping other thresholds unchanged. Assume the value is updated to 142 after optimization.
[0170] 2) Update the current best candidate segmentation threshold combination: The updated combination may be [127, 142, 200].
[0171] 3) Repeat steps S3432 to S3434 until all candidate segmentation thresholds have been optimized. Assume the final segmentation threshold combination is [127, 142, 198], and the fitness value reaches 0.90 at this time.
[0172] By gradually optimizing each candidate segmentation threshold through the greedy strategy and calculating the fitness value using the cross - entropy method, the optimization efficiency of the segmentation threshold can be effectively improved. The finally obtained best segmentation threshold combination [127, 142, 198] shows the highest fitness value in actual segmentation, ensuring the accuracy and stability of image segmentation.
[0173] Specifically, cross - entropy is used to measure the difference information between two probability distributions. The minimum cross - entropy method determines the segmentation threshold by minimizing the cross - entropy between the original image and its segmented image. The lower the cross - entropy value, the higher the certainty and the greater the homogeneity.
[0174] Preferably, analyzing the color of the detection line and the color of the control line based on the feature analysis algorithm to obtain the color feature data of the detection line and the color feature data of the control line includes the following steps:
[0175] S41. Use the feature analysis algorithm to evaluate the color features in the color development feature image, select the color features in the color development feature image based on the evaluation results and the feature screening rules, and use the color features as the preliminary feature subset;
[0176] Among them, the color features include the detection line color features and the control line color features;
[0177] S42. Initialize the parameters of the feature analysis algorithm, calculate each detection line color feature and control line color feature through the color feature extraction formula, and calculate the fitness value of each detection line color feature and control line color feature according to the color similarity metric;
[0178] S43. Calculate the adjustment speed, optimization direction and random perturbation of each detection line color feature and control line color feature respectively;
[0179] S44. Calculate the step size scaling factor according to the exponential non-linear decrease, and update the adjustment amplitude and color feature value of each detection line color feature and control line color feature;
[0180] S45. Perform genetic operations on each detection line color feature and control line color feature to increase the diversity of the color features;
[0181] S46. Calculate the fitness value of each detection line color feature and control line color feature after iteration, select several optimal detection line color features and control line color features to form elite features, perform elite chaotic mutation on the elite features, calculate the fitness of the mutated elite features, and compare with the original elite features, and retain the best elite features;
[0182] S47. Judge whether the maximum number of iterations is reached. If so, output the best elite features as the color feature data of the detection line and the color feature data of the control line; if not, return to step S43 to continue optimization.
[0183] To facilitate the understanding of the above technical solutions of the present invention, the following will describe in detail the analysis of the color of the detection line and the color of the control line by the feature analysis algorithm in the actual process of the present invention to obtain the color feature data of the detection line and the color feature data of the control line.
[0184] Step 1. 1) Input of the color development feature image:
[0185] Input the color development feature image. Assume that the image size is 1024×768 pixels and the RGB color mode is adopted.
[0186] 2) Feature analysis algorithm selection:
[0187] Use the minimum redundancy maximum correlation to evaluate the color features of the chromogenic feature image. The minimum redundancy maximum correlation aims to find the features that are most relevant to the label (test line or control line) and have the least redundancy. Specifically, it screens features by maximizing the correlation and minimizing the redundancy.
[0188] 3) Feature screening rules:
[0189] According to the minimum redundancy maximum correlation algorithm, first calculate the mutual information between each color feature (such as the mean and standard deviation of the R, G, and B color channels) and the label, and screen out the features with the maximum correlation and the least redundancy as the preliminary feature subset.
[0190] 4) Preliminary feature subset: Assume that the features of the test line preliminarily screened out are R detect = 150, G detect = 120, B detect = 80].
[0191] The features of the control line are R control = 160, G control = 130, B control = 90].
[0192] Step 2: 1) Initialize the parameters: Population size of the krill herd algorithm: 50; Maximum number of iterations: 100; Initial step size: 0.1.
[0193] 2) Color feature extraction formula: Use the RGB average value to calculate the color features of each test line and control line.
[0194] 3) Color similarity measurement: Use the Euclidean distance to measure the color feature similarity between the test line and the control line.
[0195] ;
[0196] In the formula, Sim ( C detect , C control ) represents the distance value between the color features of the test line and the control line. The larger the value, the greater the color difference between the two.
[0197] R detect represents the intensity value of the red channel in the color features of the test line.
[0198] R control Represents the intensity value of the red channel in the control line color feature.
[0199] G detect Represents the intensity value of the green channel in the test line color feature.
[0200] G control Represents the intensity value of the green channel in the control line color feature.
[0201] B detect Represents the intensity value of the blue channel in the test line color feature.
[0202] B control Represents the intensity value of the blue channel in the control line color feature.
[0203] 4) Fitness value calculation: The fitness value is inversely proportional to the color similarity. The fitness value formula is:
[0204] ;
[0205] In the formula, Fitness Represents the fitness value.
[0206] Sim ( C detect , C control ) Represents the distance value between the test line color feature and the control line color feature. The larger the value, the greater the color difference between the two.
[0207] Assume that the calculated results are: the initial fitness of the test line is 0.75, and the initial fitness of the control line is 0.78.
[0208] Step 3. 1) Adjustment speed: Use the current color feature value and the step size to calculate the adjustment speed of each color feature.
[0209] ;
[0210] In the formula, v represents the adjustment speed of the color feature. α Represents the current iteration step size, that is, the step size used in the current iteration. Δ C Represents the color feature change amount.
[0211] 2) Optimization direction: Determine the optimization direction of each feature according to the gradient of the fitness value. If the red channel of the test line needs to increase, the corresponding optimization direction is positive.
[0212] 3) Random perturbation: Introduce a 3% random perturbation to make the optimization process of features random and increase the exploration space.
[0213] Step 4: 1) Step size scaling factor: Based on the exponential non-linear decreasing strategy, the step size scaling formula is:
[0214] ;
[0215] In the formula, α represents the current iteration step size. α 0 represents the initial step size, which is the initial step size value at the beginning of the iteration. The initial step size is set to 0.1, that is, the step size used in the initial stage of the iteration is 0.1. e represents the base of the natural logarithm, that is, e≈2.718, which is the basic constant of the exponential function. t represents the number of iterations. k represents the scaling factor, which is used to control the rate of step size decrease. The scaling factor is k =0.05.
[0216] 2) Color feature value update:
[0217] According to the scaled step size, update the color feature values of the detection line and the control line. Assume that after 10 iterations, the feature of the detection line becomes R detect =148, G detect =118, B detect =78].
[0218] Step 5: 1) Crossover operation: Randomly select two features (such as the red and blue channels) for gene crossover to generate new candidate features.
[0219] 2) Mutation operation: Mutate some color features, and the mutation rate is set to 5% to ensure the diversity of features during the optimization process.
[0220] Step 6: 1) Elite feature selection: Select the 5 features with the highest fitness values as elite features.
[0221] 2) Elite chaos mutation: Use the mapping formula for elite chaos mutation. Assume that the red channel of the detection line mutates from 150 to 149 after mutation. This mutation value is obtained through formula adjustment or random perturbation.
[0222] Step 7: 1) Judge whether the maximum number of iterations is reached: When the current number of iterations reaches 100 times, stop the iteration.
[0223] 2) Output the best elite features:
[0224] The finally obtained color features of the test line are R detect = 149, G detect = 119, B detect = 79].
[0225] The finally obtained color features of the control line are R control = 158, G control = 127, B control = 88].
[0226] Specifically, the feature analysis algorithm is a two-stage hybrid feature selection algorithm based on minimum redundancy maximum correlation and improved krill herd algorithm, that is, the minimum redundancy maximum correlation algorithm is used to evaluate the feature
[0227] importance to screen out a gene subset with high correlation and low redundancy. Then, combined with the improved krill herd algorithm to iteratively optimize the features. The krill herd algorithm is a meta-heuristic swarm intelligence algorithm. In order to enable the krill herd algorithm to handle the feature selection problem, the present invention uses the coding conversion principle to discretize it, and in order to further improve the global search ability of the krill herd algorithm, step size non-linear decreasing and elite particle local search are used to improve it.
[0228] Preferably, elite chaotic mutation of elite features includes the following steps:
[0229] S461. After each iteration is completed, select several optimal color features of the test line and the control line to form an elite feature set, and construct an elite space according to the upper and lower limits of each dimension of the elite features;
[0230] It should be explained that in each round of algorithm iteration, the performance of a group of color feature combinations is evaluated, and their fitness values in the detection task are measured. For example, the fitness value may depend on the contrast, clarity, and classification accuracy of the color features. According to these fitness values, several color combinations with the best performance are selected, called the elite feature set. This elite feature set contains the optimal color combinations of the test line and the control line. The elite space can be regarded as a multi-dimensional space of the value range of the elite features in each dimension. For example:
[0231] Suppose each color feature is represented by RGB values, then the elite features may be different RGB color combinations.
[0232] In the elite space, each dimension (R, G, B) has an upper and lower limit (such as the R value range, G value range, and B value range in the optimal color combination).
[0233] S462. Map each dimension of the elite features from the elite space to the chaotic space using a mapping formula (i.e., the Fuch chaotic mapping, which has greater chaos than the Logistic mapping and the Tent chaotic mapping, and any tiny initial difference will result in a large difference in the results), obtaining chaotic features, and perform chaotic mapping on each dimension of the chaotic features according to a preset chaotic mutation probability to generate new chaotic features;
[0234] It should be noted that, in order to further explore more possible feature combinations, chaotic mapping is used to break the limitation of the local optimal solution. Chaotic mapping is a characteristic of a nonlinear system, which shows highly irregular and pseudo-random behavior within a certain period of time.
[0235] S463. Remap the new chaotic features back to the elite space through the inverse mapping formula to obtain new elite features, compare the fitness values of the original elite features and the mutated elite features, and retain the elite feature with the highest fitness value to enter the next generation of optimization.
[0236] It should be noted that the newly generated chaotic features need to be remapped back to the elite space through the inverse mapping formula. For example, the RGB combination after chaotic mutation can be remapped back to the standard color feature value range through the reverse formula. After generating new elite features, the fitness values of these features will be evaluated again and compared with the original elite features. If the fitness of the new chaotic features is higher, it will replace the original elite features and be retained in the next round of iteration.
[0237] Preferably, the mapping formula is:
[0238] ;
[0239] In the formula, H i,j represents the chaotic feature value of the i th elite feature in the j th dimension;
[0240] B i,j represents the current color feature value of the i th elite feature in the j th dimension;
[0241] D i,j represents the elite feature value of the i th elite feature in the j th dimension;
[0242] D u,j represents the jUpper limit of the elite eigenvalue of the dimension.
[0243] It should be noted that after each iteration, the top several optimal color features are selected to form an elite population, and the upper and lower limits of each dimension of the elite population form an elite space, that is, the elite space = ( D l1,u1 , … D l2,u2 , … D lj,uj )
[0244] Preferably, comparing and analyzing the color feature data of the test line and the color feature data of the control line based on the concentration analysis algorithm to obtain the concentration of isofenphos-methyl in fruits and vegetables includes the following steps:
[0245] S51. Randomly generate an initial color feature data set, calculate the corresponding objective function value for each color feature data in the initial color feature set, and perform a fast non-dominated sorting on the color feature data, calculate its crowding degree, and form a sorted preferred color feature set;
[0246] It should be noted that the initial data set is constructed starting from a set of random color features. For example, these color features can be represented by RGB values or other color models (such as HSV). Each data point represents a combination of color features. Each combination of color features will have a corresponding objective function value, which can be defined according to its detection effect (such as detection accuracy, signal-to-noise ratio, contrast, etc.). These values will be used as fitness values. Using the fast non-dominated sorting algorithm, the color feature combinations are divided into different priorities (Pareto fronts). Non-dominated sorting is used to find the optimal solutions under multiple objective functions (solutions that are not dominated by other solutions in all objectives). The crowding degree is used to further distinguish solutions at the same sorting level to ensure that those solutions with a wider distribution are retained to increase diversity.
[0247] S52. Based on the tournament selection method, select the color feature with the highest fitness from the preferred color feature set and copy it to form a new color feature set;
[0248] Specifically, the tournament selection method is a commonly used individual selection method in genetic algorithms (GA) and evolutionary algorithms, used to select individuals with higher fitness from the current population to enter the next generation. It selects the winners by simulating a "tournament" in a small group of individuals.
[0249] It should be noted that from the sorted preferred color feature set, the tournament selection method is used to select the individuals with the highest fitness for replication. In each selection process, several color features are randomly selected, and the color feature with the highest fitness among them is selected for retention and replication. The purpose of doing this is to retain the optimal solution while maintaining the diversity of the population and avoiding premature convergence.
[0250] S53. Perform crossover and mutation operations on the new color feature set, eliminate the color feature data that does not meet the constraint conditions, retain the color feature data that meets the concentration detection constraint conditions, and use the initialization function to regenerate the color feature data that meets the concentration detection constraint conditions;
[0251] It should be noted that the crossover operation simulates gene recombination and combines two color features to generate a new combination. For example, we can exchange some RGB values of one color feature with some RGB values of another color feature to generate a new color feature. The mutation operation is a small random change to the color feature, such as slightly adjusting the RGB values or the saturation of the color. The mutation operation increases the diversity of the solution and prevents the algorithm from falling into a local optimal solution. In the concentration detection of fruits and vegetables, there are specific constraint conditions (for example, the contrast of the color feature cannot be lower than a certain threshold). It is necessary to eliminate the color features that do not meet these constraint conditions and regenerate new features that meet the conditions.
[0252] S54. Merge the parental color feature data set and the offspring color feature data set to form a new preferred color feature set, eliminate the duplicate color feature data, and retain the unique color feature data to form a feature set without duplicate color feature data;
[0253] It should be noted that the offspring color feature set generated by the mutation and crossover operations is merged with the parental color feature set to form a new preferred color feature set. To avoid redundancy and waste of computing resources, it is necessary to remove the duplicate color feature data and retain the unique color features to form a set without duplicate data.
[0254] S55. Perform fast non-dominated sorting on the feature set without duplicate color feature data and calculate its crowding degree to obtain a new feature set without duplicate color feature data;
[0255] It should be noted that the fast non-dominated sorting is performed again on the color feature set without duplicates to determine the hierarchy of the new preferred solutions. Calculate the crowding degree of each feature point to ensure that the color feature combinations evenly distributed in the search space are retained, which helps to conduct a more comprehensive exploration in the next iteration.
[0256] S56. Determine whether the current iteration count has reached a preset maximum value. If not, return to step S52 to continue the iteration. If so, stop the iteration and proceed to step S57;
[0257] S57. Output the final optimal color feature dataset as the result of the color feature comparison and analysis between the detection line and the control line, and obtain the concentration of isofenphos-methyl in the fruits and vegetables.
[0258] Specifically, the concentration analysis algorithm is the improved NSGA-II algorithm. NSGA-II (Non-dominated Sorting Genetic Algorithm II) is a classic multi-objective optimization algorithm. When dealing with multi-objective optimization problems, it can effectively find the solution set that meets the multi-objective requirements. The present invention improves the basic NSGA-II algorithm, designs an effective integer coding method, and introduces a duplicate removal operation.
[0259] Preferably, based on the tournament selection method, the color feature with the highest fitness is selected from the preferred color feature set and copied to form a new color feature set, which includes the following steps:
[0260] S521. Define a fitness function related to the color feature and calculate the fitness value of each color feature data;
[0261] S522. Preset the tournament selection scale, randomly select several color feature data from the preferred color feature set, use them as the participants in the current round of the tournament, calculate the fitness of the several color feature data, and select the color feature data with the highest fitness as the winner of this round of the tournament;
[0262] S523. Copy the color feature data with the highest fitness selected in the tournament and put it into the new color feature dataset. Repeat the tournament selection and copying process multiple times until the new color feature set reaches the predetermined size;
[0263] S524. Perform crossover and mutation operations on the new color feature set and generate the final new color feature set.
[0264] In summary, by means of the above technical solutions of the present invention, the present invention accurately identifies and locates the positions of the detection line and the control line through an image segmentation algorithm, which can reduce the errors caused by manual judgment, make the confirmation of the position more accurate, and improve the accuracy and repeatability of detection. The present invention analyzes the colors of the detection line and the control line through a feature analysis algorithm to obtain color feature data. It can capture the minute changes in color more sensitively, reduce the influence of external interference factors, and enhance the sensitivity and reliability of detection. The present invention compares and analyzes the color feature data of the detection line and the control line through a concentration analysis algorithm. Compared with the traditional subjective visual comparison method, it can more accurately quantify the concentration change of isofenphos-methyl and ensure the objectivity of the detection result.
[0265] The foregoing is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography, characterized in that, The detection method of isofenphos-methyl in fruits and vegetables includes the following steps: S1. Prepare a colloidal gold immunochromatographic test strip, and detect isofenphos-methyl in fruits and vegetables based on the colloidal gold immunochromatographic test strip; S2. Obtain the color development image of the colloidal gold immunochromatographic test strip, and process the color development image to obtain a color development characteristic image; S3. Segment the obtained color development characteristic image based on an image segmentation algorithm, determine the positions of the test line and the control line of the colloidal gold immunochromatographic test strip, and obtain the color of the test line and the color of the control line; S4. Analyze the color of the test line and the color of the control line based on a feature analysis algorithm to obtain the color feature data of the test line and the color feature data of the control line; S5. Compare and analyze the color feature data of the test line and the color feature data of the control line based on a concentration analysis algorithm to obtain the concentration of isofenphos-methyl in fruits and vegetables; The step of segmenting the obtained color development characteristic image based on an image segmentation algorithm, determining the positions of the test line and the control line of the colloidal gold immunochromatographic test strip, and obtaining the color of the test line and the color of the control line includes the following steps: S31. Input the color development characteristic image and initialize the parameters of the image segmentation algorithm; S32. Generate multiple candidate segmentation thresholds in the color development characteristic image, calculate the fitness value of each candidate segmentation threshold, and record the initial best candidate segmentation threshold; S33. Perform boundary correction on the initial best candidate segmentation threshold, calculate the fitness of each candidate segmentation threshold, and record the current best candidate segmentation threshold and the fitness value; S34. Based on the current best candidate segmentation threshold, generate a reverse candidate segmentation threshold using the lens imaging reverse learning strategy, and based on the greedy strategy, save the current optimal candidate segmentation threshold; S35. Based on the current optimal candidate segmentation threshold, segment the color development area, identify and determine the positions and boundaries of the test line and the control line in the colloidal gold immunochromatographic test strip; S36. According to the positions of the test line and the control line in the segmented colloidal gold immunochromatographic test strip, extract the color information of the test line and the control line; S37. Determine whether the iteration termination condition is satisfied. If it is satisfied, output the final segmentation result. If it is not satisfied, return to step S33 to continue optimizing the segmentation process.
2. The method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 1, wherein, The step of preparing a colloidal gold immunochromatographic test strip and detecting isofenphos-methyl in fruits and vegetables based on the colloidal gold immunochromatographic test strip includes the following steps: S11. Under reaction conditions, combine the prepared anti-isofenphos-methyl antibody with gold nanoparticles to generate a colloidal gold-labeled antibody; S12. Coat the colloidal gold-labeled antibody on the sample pad part of the test strip, and coat fixed antigens and antibodies on the test line and the control line of the test strip respectively to obtain a colloidal gold immunochromatographic test strip; S13. Extract the fruit and vegetable sample with a preset solvent to obtain an extraction solution of isofenphos-methyl, and drop the extraction solution into the sample adding hole of the colloidal gold immunochromatographic test strip for detection.
3. A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 1, wherein The step of generating a reverse candidate segmentation threshold using the lens imaging reverse learning strategy based on the current best candidate segmentation threshold and saving the current optimal candidate segmentation threshold based on the greedy strategy includes the following steps: S341. Determine the upper and lower bounds of the search space for the current best candidate segmentation threshold, and initialize the current best candidate segmentation threshold; S342. Based on the lens imaging reverse learning strategy, calculate the reverse candidate segmentation threshold according to the current best candidate segmentation threshold and the upper and lower bounds of the search space; S343. Based on the greedy strategy, compare the fitness values of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold; S344. If the fitness value of the reverse candidate segmentation threshold is greater than the fitness value of the current best candidate segmentation threshold, use the reverse candidate segmentation threshold as the current optimal candidate segmentation threshold. If the fitness value of the reverse candidate segmentation threshold is less than or equal to the fitness value of the current best candidate segmentation threshold, use the current best candidate segmentation threshold as the current optimal candidate segmentation threshold and save it.
4. The detection method of isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 3, characterized in that The formula for calculating the reverse candidate segmentation threshold is: ; In the formula, is expressed as the reverse candidate segmentation threshold; M Denoted as the current best candidate segmentation threshold; U R Represents the upper bound of the search space; L R Represents the lower bound of the search space; K Expressed as a scale factor.
5. A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 4, characterized in that The step of comparing the fitness values of the current best candidate segmentation threshold and the newly generated reverse candidate segmentation threshold based on the greedy strategy includes the following steps: S3431. Based on the cross-entropy method, initialize the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination; S3432. For each candidate segmentation threshold in the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, perform optimization respectively. Each time, select an unoptimized candidate segmentation threshold, and keep the other candidate segmentation thresholds unchanged as the current best candidate segmentation threshold; S3433. Compare the current best candidate segmentation threshold combination and the newly generated reverse candidate segmentation threshold combination, and calculate their respective fitness values; S3434. If the fitness value of the reverse candidate segmentation threshold combination is greater than the fitness value of the current best candidate segmentation threshold combination, update the current best candidate segmentation threshold combination as the reverse candidate segmentation threshold combination. Otherwise, keep the current best candidate segmentation threshold combination unchanged; S3435. If there are still unoptimized candidate segmentation thresholds, continue to repeat steps S3432 to S3434 based on the greedy strategy until all candidate segmentation thresholds have been optimized.
6. The detection method of isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 1, wherein The step of analyzing the color of the detection line and the color of the control line based on the feature analysis algorithm to obtain the color feature data of the detection line and the color feature data of the control line includes the following steps: S41. Use the feature analysis algorithm to evaluate the color features in the chromogenic feature image, select the color features in the chromogenic feature image based on the evaluation results and the feature screening rules, and use the color features as the preliminary feature subset; Among them, the color features include the detection line color features and the control line color features; S42. Initialize the parameters of the feature analysis algorithm, calculate each detection line color feature and control line color feature through the color feature extraction formula, and calculate the fitness value of each detection line color feature and control line color feature according to the color similarity metric; S43. Calculate the adjustment speed, optimization direction, and random perturbation of each detection line color feature and control line color feature respectively; S44. Calculate the step size scaling factor according to the exponential non-linear decrease, and update the adjustment amplitude and color feature values of each detection line color feature and control line color feature; S45. Perform genetic operations on each detection line color feature and control line color feature to increase the diversity of color features; S46. Calculate the fitness values of each detection line color feature and control line color feature after iteration, select several optimal detection line color features and control line color features to form elite features, perform elite chaotic mutation on the elite features, calculate the fitness of the mutated elite features, and compare with the original elite features, and retain the best elite features; S47. Determine whether the maximum number of iterations is reached. If so, output the best elite features as the color feature data of the detection line and the color feature data of the control line; if not, return to step S43 to continue optimization.
7. A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 6, wherein, The elite chaotic mutation of the elite features includes the following steps: S461. After each iteration is completed, select several optimal detection line color features and control line color features to form an elite feature set, and construct an elite space according to the upper and lower limits of each dimension of the elite features; S462. Use the mapping formula to map each dimension of the elite features from the elite space to the chaotic space to obtain chaotic features, and perform chaotic mapping on each dimension of the chaotic features according to the preset chaotic mutation probability to generate new chaotic features; S463. Remap the new chaotic features back to the elite space through the inverse mapping formula to obtain new elite features, compare the fitness values of the original elite features and the mutated elite features, retain the elite features with the highest fitness, and enter the next generation of optimization.
8. A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 7, characterized in that, The mapping formula is: ; In the formula, H i,j is expressed as the chaotic feature value of the i th elite feature in the j dimension; B i,j Denoted as the i current color feature value of the j elite feature in the dimension; D i,j Denoted as the i elite feature value of the j elite feature in the D u,j Denoted as the j upper limit of the elite eigenvalue of the dimension.
9. A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 1, wherein The comparison and analysis of the color feature data of the detection line and the color feature data of the control line based on the concentration analysis algorithm to obtain the concentration of isofenphos-methyl in fruits and vegetables includes the following steps: S51. Randomly generate an initial color feature data set, calculate the corresponding objective function value for each color feature data in the initial color feature data set, perform fast non-dominated sorting on the color feature data, calculate its crowding degree, and form a sorted preferred color feature set; S52. Based on the tournament selection method, select the color feature with the highest fitness from the preferred color feature set and copy it to form a new color feature set; S53. Perform crossover and mutation operations on the new color feature set, eliminate the color feature data that does not meet the constraint conditions, retain the color feature data that meets the concentration detection constraint conditions, and use the initialization function to regenerate the color feature data that meets the concentration detection constraint conditions; S54. Merge the parent color feature data set and the offspring color feature data set to form a new preferred color feature set, eliminate the duplicate color feature data, retain the unique color feature data, and form a feature set without duplicate color feature data; S55. Perform fast non-dominated sorting on the feature set without duplicate color feature data, and calculate its crowding degree to obtain a new feature set without duplicate color feature data; S56. Determine whether the current iteration count has reached the preset maximum value. If not, return to step S52 to continue the iteration. If so, stop the iteration and go to step S57; S57. Output the final optimal color feature dataset as the result of the color feature comparison and analysis between the detection line and the control line, and obtain the concentration of isofenphos-methyl in the fruits and vegetables.
10. A method for detecting isofenphos-methyl in fruits and vegetables based on colloidal gold immunochromatography according to claim 9, characterized in that The steps of selecting the color feature with the highest fitness from the preferred color feature set based on the tournament selection method and replicating it to form a new color feature set are as follows: S521. Define a fitness function related to the color feature and calculate the fitness value of each color feature data; S522. Preset the tournament scale for selection, randomly select several color feature data from the preferred color feature set, use them as the participants in the current round of the tournament, calculate the fitness of the several color feature data, and select the color feature data with the highest fitness as the winner of this round of the tournament; S523. Replicate the color feature data with the highest fitness selected in the tournament and put it into the new color feature dataset. Repeat the tournament selection and replication process multiple times until the new color feature set reaches the predetermined size; S524. Perform crossover and mutation operations on the new color feature set and generate the final new color feature set.
Citation Information
Patent Citations
Dynamic and quantitative immunochromatographic test strip test method
CN104142395A
Fast image signal segmentation method based on immunochromatography test paper card
CN109035273A