CN115479904A - Method and system for rapidly detecting feed tannin - Google Patents

Method and system for rapidly detecting feed tannin Download PDF

Info

Publication number
CN115479904A
CN115479904A CN202211341220.1A CN202211341220A CN115479904A CN 115479904 A CN115479904 A CN 115479904A CN 202211341220 A CN202211341220 A CN 202211341220A CN 115479904 A CN115479904 A CN 115479904A
Authority
CN
China
Prior art keywords
detected
tannin
image
solution
calibration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211341220.1A
Other languages
Chinese (zh)
Other versions
CN115479904B (en
Inventor
彭凯
陈冰
黄文�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Animal Science of Guangdong Academy of Agricultural Sciences
Original Assignee
Institute of Animal Science of Guangdong Academy of Agricultural Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Animal Science of Guangdong Academy of Agricultural Sciences filed Critical Institute of Animal Science of Guangdong Academy of Agricultural Sciences
Priority to CN202211341220.1A priority Critical patent/CN115479904B/en
Publication of CN115479904A publication Critical patent/CN115479904A/en
Application granted granted Critical
Publication of CN115479904B publication Critical patent/CN115479904B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N1/00Sampling; Preparing specimens for investigation
    • G01N1/28Preparing specimens for investigation including physical details of (bio-)chemical methods covered elsewhere, e.g. G01N33/50, C12Q
    • G01N1/286Preparing specimens for investigation including physical details of (bio-)chemical methods covered elsewhere, e.g. G01N33/50, C12Q involving mechanical work, e.g. chopping, disintegrating, compacting, homogenising
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N1/00Sampling; Preparing specimens for investigation
    • G01N1/28Preparing specimens for investigation including physical details of (bio-)chemical methods covered elsewhere, e.g. G01N33/50, C12Q
    • G01N1/38Diluting, dispersing or mixing samples
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/27Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands using photo-electric detection ; circuits for computing concentration
    • G01N21/274Calibration, base line adjustment, drift correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/58Extraction of image or video features relating to hyperspectral data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/20Identification of molecular entities, parts thereof or of chemical compositions
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N1/00Sampling; Preparing specimens for investigation
    • G01N1/28Preparing specimens for investigation including physical details of (bio-)chemical methods covered elsewhere, e.g. G01N33/50, C12Q
    • G01N1/286Preparing specimens for investigation including physical details of (bio-)chemical methods covered elsewhere, e.g. G01N33/50, C12Q involving mechanical work, e.g. chopping, disintegrating, compacting, homogenising
    • G01N2001/2866Grinding or homogeneising

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biochemistry (AREA)
  • Pathology (AREA)
  • Immunology (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Analytical Chemistry (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Mathematical Physics (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The disclosure provides a method and a system for rapidly detecting feed tannin, wherein a tannin standard solution is obtained, and the tannin concentration of the tannin standard solution is recorded as a standard concentration; extracting a preset amount of tannin standard solution; grinding the feed to be detected, and adding water to dilute the feed to be detected to obtain a solution to be detected; acquiring a hyperspectral image of the solution to be detected as an image to be detected; after the preset amount of tannin standard solution is added into the solution to be detected, acquiring a hyperspectral image of the solution to be detected as a calibration image; denoising by using a convolutional neural network in the process of acquiring the hyperspectral image; carrying out spectrum calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image; and calculating the tannin content of the solution to be detected according to the calibration value, thereby realizing the beneficial effect of reducing the large-scale industrial production cost.

Description

Method and system for rapidly detecting feed tannin
Technical Field
The disclosure belongs to the field of data processing, and particularly relates to a method and a system for quickly detecting feed tannin.
Background
The method for detecting the tannin content according to the hyperspectral image information is an efficient and rapid means in food science, agricultural science and safety monitoring science. The three-dimensional convolution neural network is used for extracting the hyperspectral image characteristics to obtain the characteristic vector, the vector is used as input to learn the probability distribution of the pixel value in a supervision or semi-supervision mode, and although certain feasibility exists, the time cost is large, and the expansion of the industrial production scale is not facilitated. Patent document No. CN113959961B provides a method and a system for detecting tannin additive anti-counterfeiting based on hyperspectral image, which are suitable for being used as a feed quality control method, but the method still highly depends on the method processes of image preprocessing correction, image data adjustment, target detection, abnormal target judgment and the like, still cannot get rid of the cost constraint of large convolutional neural network with large data volume, large calculation cost and high time consumption, and is difficult to adapt when being applied to large-scale industrial production.
Disclosure of Invention
The present invention is directed to a method and a system for rapidly detecting tannin in feed, so as to solve one or more technical problems in the prior art and provide at least one of a beneficial choice and a creative condition.
The disclosure provides a method and a system for rapidly detecting feed tannin, wherein a tannin standard solution is obtained, and the tannin concentration of the tannin standard solution is recorded as a standard concentration; extracting a preset amount of tannin standard solution; grinding the feed to be detected, and adding water to dilute the feed to be detected to obtain a solution to be detected; acquiring a hyperspectral image of the solution to be detected as an image to be detected; after the preset amount of tannin standard solution is added into the solution to be detected, acquiring a hyperspectral image of the solution to be detected as a calibration image; denoising by using a convolutional neural network in the process of acquiring the hyperspectral image; carrying out spectrum calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image; and calculating the tannin content of the solution to be detected according to the calibration value.
In order to achieve the above object, according to an aspect of the present disclosure, there is provided a method for rapidly detecting feed tannin, the method comprising the steps of:
obtaining a tannin standard solution, and recording the tannin concentration of the tannin standard solution as a standard concentration;
extracting a preset amount of tannin standard solution;
grinding the feed to be detected, and adding water to dilute the feed to be detected to obtain a solution to be detected;
acquiring a hyperspectral image of the solution to be detected as an image to be detected;
after the preset amount of tannin standard solution is added into the solution to be detected, acquiring a hyperspectral image of the solution to be detected as a calibration image;
denoising by using a convolutional neural network in the process of acquiring the hyperspectral image;
carrying out spectrum calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image;
and calculating the tannin content of the solution to be detected according to the calibration value.
Further, the method for obtaining the tannin standard solution comprises the following steps: dissolving tannin standard substance in distilled water to obtain tannin water solution with concentration of 0.2mg/mL as tannin standard solution.
Further, the liquid volume of the preset amount of tannin standard solution is less than one sixteenth to one twelfth of the liquid volume of the solution to be detected or the liquid volume after the preset amount of tannin standard solution is added into the solution to be detected.
Further, the liquid volume of the solution to be detected is equal to the liquid volume of the solution to be detected after the preset amount of the tannin standard solution is added into the solution to be detected.
Further, the method for denoising by using the convolutional neural network in the process of acquiring the hyperspectral image comprises the following steps: denoising Hyperspectral images using the SDeCNN algorithm (see articles: maffei, alessandro & Haut, juan & Paoletti, mercedes & Plaza, javier & Bruzzone, lorenzo & Plaza, antonio. (2019). A Single Model CNN for Hyperspectral Image denoising. IEEE Transactions on Geoscience and Remote sensing PP. -14.10.1109/TGRS.2019.2952062.).
Further, the method for acquiring the hyperspectral image of the solution specifically comprises the following steps:
the method for obtaining the hyperspectral image of the solution is applied to obtaining the image to be detected and the calibration image, wherein the solution refers to the solution to be detected or a solution obtained by adding the preset amount of tannin standard solution into the solution to be detected;
the method comprises the following steps of uniformly placing a solution on a plane, and then acquiring a hyperspectral image of the solution by using a hyperspectral imaging technology;
the shape and the size of the obtained hyperspectral images are uniform, the shape and the size of the three-dimensional tensor are [ n, m, w ], the dimension of the first dimension is n, the dimension of the second dimension is m, the dimension of the third dimension is w, the serial numbers of the first dimension are i, i belongs to [1,n ], the serial numbers of the second dimension are j, j belongs to [1,m ], the serial numbers of the third dimension are t, t belongs to [1,w ], the coordinates of elements with the serial numbers of the first dimension being i, the serial numbers of the second dimension being j and the serial numbers of the third dimension being t in the hyperspectral images are represented through (i, j, t), the shape and the size of the hyperspectral images are visually described through the three-dimensional tensor, the first dimension and the second dimension represent a two-dimensional plane pixel information coordinate axis, and the third dimension is a wavelength information coordinate axis.
Further, the method for performing spectrum calibration on the image to be detected and the calibration image to obtain the calibration values of the image to be detected and the calibration image specifically comprises the following steps:
recording the image to be detected as Dtens, the calibration image as Btens, the numerical value of an element with a coordinate of (i, j, t) in the Dtens as Dtens (i, j, t), and the numerical value of an element with a coordinate of (i, j, t) in the Btens as Btens (i, j, t);
respectively segmenting the image to be detected and the calibration image along a third dimension of a hyperspectral image, wherein the segmenting along the third dimension of the hyperspectral image is as follows: the shape and the size of the hyperspectral image as a three-dimensional tensor are [ n, m, w ] and the dimension of the third dimension is w, the hyperspectral image is divided into w matrixes with the size of n multiplied by m according to the serial number t of the third dimension, the matrix with the serial number of the third dimension being t in the hyperspectral image is recorded as a t matrix, the t matrix after Btens is segmented along the third dimension of the hyperspectral image is Btens (t), and the t matrix after Dtens is segmented along the third dimension of the hyperspectral image is Dtens (t);
for each t matrix in Btens, respectively calculating an arithmetic mean value of each row element and an arithmetic mean value of each column element in the t matrix, sorting the arithmetic mean values of each row element in the t matrix to select a row sequence number of a row as a median as a measured row number of the t matrix, sorting the arithmetic mean values of each column element in the t matrix to select a column sequence number of a column as a median as a measured column number of the t matrix, composing the measured row number of the t matrix and the measured column number of the t matrix into measured coordinates of the t matrix, and regarding a value of an element in the t matrix corresponding to the measured coordinates of the t matrix as a measured value of the t matrix, which can be used as a row and column coordinate to locate in the matrix to obtain a value of an element in a corresponding position, thereby segmenting the measured coordinates of each t matrix and measured values of the element thereof as a sequence of the same sequence number as a measured value of a hyperspectral image sequence, which is a hyperspectral image sequence and which is obtained by taking the measured values of the hyperspectral image sequence as a hyperspectral image sequence The content and the conditions of dispersion, dissolution and absorption interfere with the fluctuation of the hyperspectral image);
according to the calibration sequence, respectively selecting a calibration coordinate and a calibration value of a t matrix in the calibration sequence, recording the calibration value of the t matrix as B (t), selecting a numerical value of an element corresponding to the calibration coordinate of the t matrix in the Dtens (t) as D (t), thereby obtaining B (t) and D (t) corresponding to each t, and calculating a formula of a calibration value R of the image to be detected and the calibration image as follows:
Figure 359326DEST_PATH_IMAGE002
wherein the function lop () represents an exponential function based on the square root of the product of n times m (calculating the calibration values of the to-be-detected image and the calibration image is used to measure the mathematical difference of the effect of the even or uneven distribution of tannin on hyperspectrum versus the mathematical difference without the fluctuation interference of tannin), wherein the function lop () uses an exponential function based on the square root of the product of n times m, and abandons the accuracy limit caused by the fixed constant form in the base of n × m compared with the conventional exponential way based on the constant of 2, 10 or e, etc. so that the exponential way simultaneously changes with the matrix size in the form of variable, so that the degree of calibration between the to-be-detected image and the calibration image is improved, and more accurate, and the calibration value can thereby calculate the tannin content of the to-be-detected solution more accurately).
Further, according to the calibration value, the method for calculating the tannin content of the solution to be detected comprises the following steps:
obtaining the tannin content of the tannin standard solution and recording the tannin content as bui, making the tannin content of the solution to be detected be dui, recording the calibration value of the image to be detected and the calibration image as R, and obtaining the numerical value of the tannin content of the solution to be detected by dui = R × bui.
The present disclosure also provides a fodder tannin rapid detection system, a fodder tannin rapid detection system includes: the processor executes the computer program to realize the steps in the method for quickly detecting the feed tannin, the system for quickly detecting the feed tannin can be run in computing devices such as a desktop computer, a notebook computer, a palm computer, a cloud data center and the like, the executable system can include, but is not limited to, the processor, the memory and a server cluster, and the processor executes the computer program to run in the units of the following systems:
the solution preparation unit is used for obtaining a tannin standard solution, recording the tannin concentration of the tannin standard solution as a standard concentration, extracting the preset amount of the tannin standard solution, and grinding the feed to be detected and adding water to dilute the feed to be detected to obtain a solution to be detected;
the hyperspectral image acquisition unit is used for acquiring a hyperspectral image of the solution to be detected as an image to be detected, adding the preset amount of tannin standard solution into the solution to be detected, acquiring the hyperspectral image of the solution to be detected as a calibration image, and denoising the hyperspectral image by using a convolutional neural network in the process of acquiring the hyperspectral image;
the spectrum calibration unit is used for performing spectrum calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image;
and the tannin content calculating unit is used for calculating the tannin content of the solution to be detected according to the calibration value.
The beneficial effect of this disclosure does: the disclosure provides a method and a system for rapidly detecting feed tannin, wherein a tannin standard solution is obtained, and the tannin concentration of the tannin standard solution is recorded as a standard concentration; extracting a preset amount of tannin standard solution; grinding the feed to be detected, and adding water to dilute the feed to be detected to obtain a solution to be detected; acquiring a hyperspectral image of the solution to be detected as an image to be detected; after the preset amount of tannin standard solution is added into the solution to be detected, acquiring a hyperspectral image of the solution to be detected as a calibration image; denoising by using a convolutional neural network in the process of acquiring the hyperspectral image; carrying out spectrum calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image; and calculating the tannin content of the solution to be detected according to the calibration value, thereby realizing the beneficial effect of reducing the cost of large-scale industrial production.
Drawings
The foregoing and other features of the present disclosure will become more apparent from the detailed description of the embodiments shown in conjunction with the drawings in which like reference characters designate the same or similar elements throughout the several views, and it is apparent that the drawings in the following description are merely some examples of the present disclosure and that other drawings may be derived therefrom by those skilled in the art without the benefit of any inventive faculty, and in which:
FIG. 1 is a flow chart of a method for rapidly detecting tannin in feed;
fig. 2 is a system structure diagram of a feed tannin rapid detection system.
Detailed Description
The conception, specific structure and technical effects of the present disclosure will be clearly and completely described below in conjunction with the embodiments and the accompanying drawings to fully understand the objects, aspects and effects of the present disclosure. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
Fig. 1 is a flow chart of a method for rapidly detecting feed tannin according to the present invention, and a method and a system for rapidly detecting feed tannin according to an embodiment of the present invention are described below with reference to fig. 1.
The disclosure provides a method for quickly detecting tannin in feed, which specifically comprises the following steps:
obtaining a tannin standard solution, and recording the tannin concentration of the tannin standard solution as a standard concentration;
extracting a preset amount of tannin standard solution;
grinding the feed to be detected, and adding water to dilute the feed to be detected to obtain a solution to be detected;
acquiring a hyperspectral image of the solution to be detected as an image to be detected;
after the preset amount of tannin standard solution is added into the solution to be detected, acquiring a hyperspectral image of the solution to be detected as a calibration image; denoising by using a convolutional neural network in the process of acquiring the hyperspectral image;
performing spectral calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image;
and calculating the tannin content of the solution to be detected according to the calibration value.
Further, the method for obtaining the tannin standard solution comprises the following steps: dissolving tannin standard substance in distilled water to obtain tannin water solution with concentration of 0.2mg/mL as tannin standard solution.
Further, the liquid volume of the preset amount of tannin standard solution is less than one sixteenth to one twelfth of the liquid volume of the solution to be detected or the liquid volume after the preset amount of tannin standard solution is added into the solution to be detected.
Further, the liquid volume of the solution to be detected is equal to the liquid volume of the solution to be detected after the preset amount of the tannin standard solution is added into the solution to be detected.
Further, the method for denoising by using the convolutional neural network in the process of acquiring the hyperspectral image comprises the following steps: denoising Hyperspectral images using the SDeCNN algorithm (see articles: maffei, alessandro & Haut, juan & Paoletti, mercedes & Plaza, javier & Bruzzone, lorenzo & Plaza, antonio. (2019). A Single Model CNN for Hyperspectral Image denoising. IEEE Transactions on Geoscience and Remote sensing PP. -14.10.1109/TGRS.2019.2952062.).
Further, the method for acquiring the hyperspectral image of the solution specifically comprises the following steps:
the method for obtaining the hyperspectral image of the solution is applied to obtaining the image to be detected and the calibration image, wherein the solution refers to the solution to be detected or a solution obtained by adding the preset amount of tannin standard solution into the solution to be detected;
uniformly placing the solution on a plane, and then acquiring a hyperspectral image of the solution by using a hyperspectral imaging technology;
the shape and the size of the obtained hyperspectral images are uniform, the hyperspectral images are three-dimensional tensors, the shape and the size of the three-dimensional tensor are [ n, m, w ], the number of the dimension in the first dimension is n, the number of the dimension in the second dimension is m, the dimension in the third dimension is w, the number of the first dimension is i, i belongs to [1,n ], the number of the second dimension is j, j belongs to [1,m ], the number of the third dimension is t, t belongs to [1,w ], and the coordinates of elements with the first dimension number of i, the second dimension number of j and the third dimension number of t in the hyperspectral images are expressed by (i, j, t).
Further, the method for obtaining the calibration value of the image to be detected and the calibration image by performing spectrum calibration on the image to be detected and the calibration image specifically comprises the following steps:
recording the image to be detected as Dtens, the calibration image as Btens, the numerical value of an element with the coordinate of (i, j, t) in the Dtens as Dtens (i, j, t), and the numerical value of an element with the coordinate of (i, j, t) in the Btens as Btens (i, j, t);
respectively segmenting the image to be detected and the calibration image along a third dimension of a hyperspectral image, wherein the segmenting along the third dimension of the hyperspectral image is as follows: the shape and the size of the hyperspectral image as a three-dimensional tensor are [ n, m, w ] and the dimension of the third dimension is w, the hyperspectral image is divided into w matrixes with the size of n multiplied by m according to the serial number t of the third dimension, the matrix with the serial number t of the third dimension in the hyperspectral image is marked as the t-th matrix, btens is used as the t-th matrix after being segmented along the third dimension of the hyperspectral image, and Dtens is used as the t-th matrix after being segmented along the third dimension of the hyperspectral image;
for each t matrix in Btens, respectively calculating the arithmetic mean value of each row element and the arithmetic mean value of each column element in the t matrix, sorting the arithmetic mean values of each row element in the t matrix to select the row sequence number of the row as a median as the measurement row sequence number of the t matrix, sorting the arithmetic mean values of each column element in the t matrix to select the column sequence number of the column as a median as the measurement column sequence number of the t matrix, forming the measurement row sequence number of the t matrix and the measurement column sequence number of the t matrix into the measurement coordinate of the t matrix, and using the value of the element in the t matrix corresponding to the measurement coordinate of the t matrix as the measurement value of the t matrix, thereby taking the measurement coordinate of each t matrix and the sequence of which the measurement values are elements and are formed by the same sequence of sequence numbers t as the measurement sequence;
according to the calibration sequence, respectively selecting a calibration coordinate and a calibration value of a t matrix in the calibration sequence, recording the calibration value of the t matrix as B (t), selecting a numerical value of an element corresponding to the calibration coordinate of the t matrix in the Dtens (t) as D (t), thereby obtaining B (t) and D (t) corresponding to each t, and calculating a formula of a calibration value R of the image to be detected and the calibration image as follows:
Figure DEST_PATH_IMAGE004
wherein the function lop () represents an exponential function that computes the base as the square root of the product of n times m.
Further, according to the calibration value, the method for calculating the tannin content of the solution to be detected comprises the following steps:
obtaining the tannin content of the tannin standard solution and recording the tannin content as bui, making the tannin content of the solution to be detected be dui, recording the calibration value of the image to be detected and the calibration image as R, and obtaining the numerical value of the tannin content of the solution to be detected by dui = R × bui.
The feed tannin rapid detection system runs in any computing equipment of a desktop computer, a notebook computer, a palm computer or a cloud data center, and the computing equipment comprises: the system comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to realize the steps in the method for quickly detecting the feed tannin, and the system which can run can comprise, but is not limited to, the processor, the memory and a server cluster;
still include the automation equipment among a fodder tannin rapid detection system, the automation equipment is used for the ratio of automatic solution and its chemical index to detect.
The embodiment of this disclosure provides a fodder tannin rapid detection system, as shown in fig. 2, the fodder tannin rapid detection system of this embodiment includes: a processor, a memory and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above embodiment of the method for rapidly detecting feed tannins when executing the computer program, the processor executing the computer program to run in the following units of the system:
the solution preparation unit is used for obtaining a tannin standard solution, recording the tannin concentration of the tannin standard solution as a standard concentration, extracting the preset amount of the tannin standard solution, and grinding the feed to be detected and diluting the feed with water to obtain a solution to be detected;
the hyperspectral image acquisition unit is used for acquiring a hyperspectral image of the solution to be detected as an image to be detected, adding the preset amount of tannin standard solution into the solution to be detected, acquiring the hyperspectral image of the solution to be detected as a calibration image, and denoising the hyperspectral image by using a convolutional neural network in the process of acquiring the hyperspectral image;
the spectrum calibration unit is used for performing spectrum calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image;
and the tannin content calculating unit is used for calculating the tannin content of the solution to be detected according to the calibration value.
Preferably, all undefined variables in the present invention may be threshold values set manually if they are not defined explicitly.
The feed tannin rapid detection system can be operated in computing equipment such as a desktop computer, a notebook computer, a palm computer and a cloud data center. The feed tannin rapid detection system comprises, but is not limited to, a processor and a memory. It is understood by those skilled in the art that the example is only an example of a method and system for fast detecting a feed tannin, and does not constitute a limitation to the method and system for fast detecting a feed tannin, and may include more or less components than the above, or some components may be combined, or different components may be included, for example, the system for fast detecting a feed tannin may further include an input and output device, a network access device, a bus, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete component Gate or transistor logic, discrete hardware components, etc. The general processor can be a microprocessor or the processor can be any conventional processor and the like, the processor is a control center of the feed tannin rapid detection system, and various interfaces and lines are utilized to connect various subareas of the whole feed tannin rapid detection system.
The memory can be used for storing the computer program and/or the module, and the processor realizes various functions of the feed tannin rapid detection method and system by running or executing the computer program and/or the module stored in the memory and calling the data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The disclosure provides a method and a system for rapidly detecting feed tannin, wherein a tannin standard solution is obtained, and the tannin concentration of the tannin standard solution is recorded as a standard concentration; extracting a preset amount of tannin standard solution; grinding the feed to be detected, and adding water to dilute the feed to be detected to obtain a solution to be detected; acquiring a hyperspectral image of the solution to be detected as an image to be detected; after the preset amount of tannin standard solution is added into the solution to be detected, acquiring a hyperspectral image of the solution to be detected as a calibration image; denoising by using a convolutional neural network in the process of acquiring the hyperspectral image; carrying out spectrum calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image; and calculating the tannin content of the solution to be detected according to the calibration value, thereby realizing the beneficial effect of reducing the large-scale industrial production cost.
Although the description of the present disclosure has been rather exhaustive and particularly described with respect to several illustrated embodiments, it is not intended to be limited to any such details or embodiments or any particular embodiments, so as to effectively encompass the intended scope of the present disclosure. Furthermore, the foregoing description of the present disclosure has been presented in terms of embodiments foreseen by the inventors for purposes of providing a useful description, and enabling one of ordinary skill in the art to devise equivalent variations of the present disclosure that are not presently foreseen.

Claims (9)

1. A method for rapidly detecting tannin in feed is characterized by comprising the following steps:
obtaining a tannin standard solution, and recording the tannin concentration of the tannin standard solution as a standard concentration;
extracting a preset amount of tannin standard solution;
grinding the feed to be detected, and adding water to dilute the feed to be detected to obtain a solution to be detected;
acquiring a hyperspectral image of the solution to be detected as an image to be detected;
after the preset amount of tannin standard solution is added into the solution to be detected, acquiring a hyperspectral image of the solution to be detected as a calibration image;
denoising by using a convolutional neural network in the process of acquiring the hyperspectral image;
performing spectral calibration on the image to be detected and the calibration image to obtain calibration values of the image to be detected and the calibration image;
and calculating the tannin content of the solution to be detected according to the calibration value.
2. The method for rapidly detecting the feed tannin according to claim 1, wherein the method for obtaining the tannin standard solution comprises the following steps: dissolving tannin standard substance in distilled water to obtain tannin water solution with concentration of 0.2mg/mL as tannin standard solution.
3. The method as claimed in claim 1, wherein the liquid volume of the tannin standard solution in the preset amount is less than one twelfth of the liquid volume of the solution to be detected or the tannin standard solution in the preset amount added to the solution to be detected.
4. The method as claimed in claim 1, wherein the liquid volume of the solution to be detected is equal to the liquid volume of the solution to be detected after the predetermined amount of tannin standard solution is added to the solution to be detected.
5. The method for rapidly detecting the feed tannin according to claim 1, wherein the method for denoising by using a convolutional neural network in the process of acquiring the hyperspectral image comprises the following steps: denoising the hyperspectral image by using an SDeCNN algorithm.
6. The method for rapidly detecting the feed tannin according to claim 1, wherein the method for acquiring the hyperspectral image of the solution specifically comprises the following steps:
the method for obtaining the hyperspectral image of the solution is applied to obtaining the image to be detected and the calibration image, wherein the solution refers to the solution to be detected or a solution obtained by adding the preset amount of tannin standard solution into the solution to be detected;
the method comprises the following steps of uniformly placing a solution on a plane, and then acquiring a hyperspectral image of the solution by using a hyperspectral imaging technology;
the shape and the size of the obtained hyperspectral images are uniform, the hyperspectral images are three-dimensional tensors, the shape and the size of the three-dimensional tensor are [ n, m, w ], the number of the dimension in the first dimension is n, the number of the dimension in the second dimension is m, the dimension in the third dimension is w, the number of the first dimension is i, i belongs to [1,n ], the number of the second dimension is j, j belongs to [1,m ], the number of the third dimension is t, t belongs to [1,w ], and the coordinates of elements with the first dimension number of i, the second dimension number of j and the third dimension number of t in the hyperspectral images are expressed by (i, j, t).
7. The method for rapidly detecting the tannin in the feed according to claim 6, wherein the method for performing spectrum calibration on the image to be detected and the calibration image to obtain the calibration values of the image to be detected and the calibration image comprises the following specific steps:
recording the image to be detected as Dtens, the calibration image as Btens, the numerical value of an element with the coordinate of (i, j, t) in the Dtens as Dtens (i, j, t), and the numerical value of an element with the coordinate of (i, j, t) in the Btens as Btens (i, j, t);
and respectively segmenting the image to be detected and the calibration image along the third dimension of the hyperspectral image, wherein the segmenting along the third dimension of the hyperspectral image is as follows: the shape and the size of the hyperspectral image as a three-dimensional tensor are [ n, m, w ] and the dimension of the third dimension is w, the hyperspectral image is divided into w matrixes with the size of n multiplied by m according to the serial number t of the third dimension, the matrix with the serial number t of the third dimension in the hyperspectral image is marked as the t-th matrix, btens is used as the t-th matrix after being segmented along the third dimension of the hyperspectral image, and Dtens is used as the t-th matrix after being segmented along the third dimension of the hyperspectral image;
for each t matrix in Btens, respectively calculating the arithmetic mean value of each row element and the arithmetic mean value of each column element in the t matrix, sorting the arithmetic mean values of each row element in the t matrix to select the row sequence number of the row as a median as the measurement row sequence number of the t matrix, sorting the arithmetic mean values of each column element in the t matrix to select the column sequence number of the column as a median as the measurement column sequence number of the t matrix, forming the measurement row sequence number of the t matrix and the measurement column sequence number of the t matrix into the measurement coordinate of the t matrix, and using the value of the element in the t matrix corresponding to the measurement coordinate of the t matrix as the measurement value of the t matrix, thereby taking the measurement coordinate of each t matrix and the sequence of which the measurement values are elements and are formed by the same sequence of sequence numbers t as the measurement sequence;
according to the calibration sequence, respectively selecting a calibration coordinate and a calibration value of a t matrix in the calibration sequence, recording the calibration value of the t matrix as B (t), selecting a numerical value of an element corresponding to the calibration coordinate of the t matrix in the Dtens (t) as D (t), thereby obtaining B (t) and D (t) corresponding to each t, and calculating a formula of a calibration value R of the image to be detected and the calibration image as follows:
Figure DEST_PATH_IMAGE001
wherein the function lop () represents an exponential function that computes the base as the square root of the product of n times m.
8. The method for rapidly detecting the tannin in the feed as claimed in claim 1, wherein the method for calculating the tannin content of the solution to be detected according to the calibration value comprises the following steps:
obtaining the tannin content of the tannin standard solution and recording the tannin content as bui, making the tannin content of the solution to be detected be dui, recording the calibration value of the image to be detected and the calibration image as R, and obtaining the numerical value of the tannin content of the solution to be detected by dui = R × bui.
9. The utility model provides a fodder tannin rapid detection system, its characterized in that, a fodder tannin rapid detection system operates in desktop computer, notebook computer or any computing equipment in high in the clouds data center, computing equipment includes: a processor, a memory and a computer program stored in the memory and running on the processor, the processor implementing the steps of a method for rapid detection of feed tannins according to any one of claims 1 to 8 when executing the computer program;
still include the automation equipment among a fodder tannin rapid detection system, the automation equipment is used for the ratio of automatic solution and its chemical index to detect.
CN202211341220.1A 2022-10-31 2022-10-31 Method and system for rapidly detecting feed tannin Active CN115479904B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211341220.1A CN115479904B (en) 2022-10-31 2022-10-31 Method and system for rapidly detecting feed tannin

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211341220.1A CN115479904B (en) 2022-10-31 2022-10-31 Method and system for rapidly detecting feed tannin

Publications (2)

Publication Number Publication Date
CN115479904A true CN115479904A (en) 2022-12-16
CN115479904B CN115479904B (en) 2023-02-14

Family

ID=84396508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211341220.1A Active CN115479904B (en) 2022-10-31 2022-10-31 Method and system for rapidly detecting feed tannin

Country Status (1)

Country Link
CN (1) CN115479904B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116067964A (en) * 2023-03-06 2023-05-05 广东省农业科学院动物科学研究所 Method and system for promoting fish muscle embrittlement by utilizing condensed tannin

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19729546C1 (en) * 1997-07-10 1998-12-10 Karlsruhe Forschzent Process for measuring chromium in tannin solutions and calculation of the chromium concentration in leather, as well as the use of the process
WO2007041755A1 (en) * 2005-10-07 2007-04-19 The Australian Wine Research Institute Hyperspectral imaging of contaminants in products and processes of agriculture
EP1990617A1 (en) * 2007-05-09 2008-11-12 FOSS Analytical A/S Determination of tannins in vinefication products
US20120001094A1 (en) * 2006-10-27 2012-01-05 University Of South Florida Deep-uv led and laser induced fluorescence detection and monitoring of trace organics in potable liquids
EP2405258A2 (en) * 2010-07-09 2012-01-11 Fraunhofer Gesellschaft zur Förderung der angewandten Wissenschaft E.V. Training method for an adaptive evaluation algorithm, hyperspectral measuring device and device for applying an operating material
CN103336968A (en) * 2013-05-28 2013-10-02 中国矿业大学 Hyperspectral data dimension reduction method based on tensor distance patch calibration
CN113959961A (en) * 2021-12-22 2022-01-21 广东省农业科学院动物科学研究所 Hyperspectral image-based tannin additive anti-counterfeiting detection method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19729546C1 (en) * 1997-07-10 1998-12-10 Karlsruhe Forschzent Process for measuring chromium in tannin solutions and calculation of the chromium concentration in leather, as well as the use of the process
WO2007041755A1 (en) * 2005-10-07 2007-04-19 The Australian Wine Research Institute Hyperspectral imaging of contaminants in products and processes of agriculture
US20120001094A1 (en) * 2006-10-27 2012-01-05 University Of South Florida Deep-uv led and laser induced fluorescence detection and monitoring of trace organics in potable liquids
EP1990617A1 (en) * 2007-05-09 2008-11-12 FOSS Analytical A/S Determination of tannins in vinefication products
EP2405258A2 (en) * 2010-07-09 2012-01-11 Fraunhofer Gesellschaft zur Förderung der angewandten Wissenschaft E.V. Training method for an adaptive evaluation algorithm, hyperspectral measuring device and device for applying an operating material
CN103336968A (en) * 2013-05-28 2013-10-02 中国矿业大学 Hyperspectral data dimension reduction method based on tensor distance patch calibration
CN113959961A (en) * 2021-12-22 2022-01-21 广东省农业科学院动物科学研究所 Hyperspectral image-based tannin additive anti-counterfeiting detection method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116067964A (en) * 2023-03-06 2023-05-05 广东省农业科学院动物科学研究所 Method and system for promoting fish muscle embrittlement by utilizing condensed tannin

Also Published As

Publication number Publication date
CN115479904B (en) 2023-02-14

Similar Documents

Publication Publication Date Title
CN109886928B (en) Target cell marking method, device, storage medium and terminal equipment
US10115187B2 (en) Apparatus and processes for classifying and counting corn kernels
Kalantar et al. A deep learning system for single and overall weight estimation of melons using unmanned aerial vehicle images
CN110705718A (en) Model interpretation method and device based on cooperative game and electronic equipment
CN109272546B (en) Fry length measuring method and system
CN115479904B (en) Method and system for rapidly detecting feed tannin
CN111862222B (en) Target detection method and electronic equipment
CN111398176A (en) Water body water color abnormity remote sensing identification method and device based on pixel scale characteristics
CN112906816A (en) Target detection method and device based on optical differential and two-channel neural network
CN114862929A (en) Three-dimensional target detection method and device, computer readable storage medium and robot
CN112233076A (en) Structural vibration displacement measurement method and device based on red round target image processing
CN111539910B (en) Rust area detection method and terminal equipment
CN113781511B (en) Conveyor belt edge wear detection method, conveyor belt edge wear detection device, computer equipment and storage medium
CN107316296A (en) A kind of method for detecting change of remote sensing image and device based on logarithmic transformation
Zhang et al. A novel image detection method for internal cracks in corn seeds in an industrial inspection line
CN116205918B (en) Multi-mode fusion semiconductor detection method, device and medium based on graph convolution
CN112396021A (en) High-altitude dangerous object detection method and device and storage medium
Patel et al. Deep Learning-Based Plant Organ Segmentation and Phenotyping of Sorghum Plants Using LiDAR Point Cloud
CN108564571B (en) Image area selection method and terminal equipment
Hu et al. Estimation of wheat tiller density using remote sensing data and machine learning methods
CN113326925A (en) Density graph regression-based flower amount statistical method, system, equipment and medium for convolutional neural network
CN113408670B (en) Image classification method and device
CN113688845B (en) Feature extraction method and device suitable for hyperspectral remote sensing image and storage medium
CN111583317B (en) Image alignment method and device and terminal equipment
CN117237729A (en) Crop classification method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant