CN114838664A - In-situ pileus size measuring method based on black-skin termitomyces albuminosus - Google Patents
In-situ pileus size measuring method based on black-skin termitomyces albuminosus Download PDFInfo
- Publication number
- CN114838664A CN114838664A CN202210776560.0A CN202210776560A CN114838664A CN 114838664 A CN114838664 A CN 114838664A CN 202210776560 A CN202210776560 A CN 202210776560A CN 114838664 A CN114838664 A CN 114838664A
- Authority
- CN
- China
- Prior art keywords
- image
- pileus
- contour
- color space
- thallus
- 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
Links
- 241001327916 Termitomyces albuminosus Species 0.000 title claims abstract description 93
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000011065 in-situ storage Methods 0.000 title claims description 27
- 238000012545 processing Methods 0.000 claims abstract description 36
- 238000012216 screening Methods 0.000 claims abstract description 35
- 238000003708 edge detection Methods 0.000 claims abstract description 12
- 238000012625 in-situ measurement Methods 0.000 claims abstract description 11
- 230000002452 interceptive effect Effects 0.000 claims abstract description 5
- 241001237975 Termitomyces Species 0.000 claims description 22
- 238000006243 chemical reaction Methods 0.000 claims description 11
- 230000011218 segmentation Effects 0.000 claims description 6
- 238000000691 measurement method Methods 0.000 claims description 5
- 238000007781 pre-processing Methods 0.000 claims description 5
- 150000001875 compounds Chemical class 0.000 claims description 3
- 238000003709 image segmentation Methods 0.000 claims description 3
- 241001052560 Thallis Species 0.000 claims 4
- WFJIVOKAWHGMBH-UHFFFAOYSA-N 4-hexylbenzene-1,3-diol Chemical compound CCCCCCC1=CC=C(O)C=C1O WFJIVOKAWHGMBH-UHFFFAOYSA-N 0.000 claims 2
- 238000005259 measurement Methods 0.000 abstract description 18
- 230000002829 reductive effect Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 7
- 235000001674 Agaricus brunnescens Nutrition 0.000 description 5
- 241000894006 Bacteria Species 0.000 description 4
- 241000222680 Collybia Species 0.000 description 4
- 238000012549 training Methods 0.000 description 3
- 230000000670 limiting effect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 239000002689 soil Substances 0.000 description 2
- 241000222485 Agaricales Species 0.000 description 1
- 241000222382 Agaricomycotina Species 0.000 description 1
- 208000035240 Disease Resistance Diseases 0.000 description 1
- 241000233866 Fungi Species 0.000 description 1
- 241000287828 Gallus gallus Species 0.000 description 1
- 241000590002 Helicobacter pylori Species 0.000 description 1
- 241000993288 Oudemansiella Species 0.000 description 1
- 241000222433 Tricholomataceae Species 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000036772 blood pressure Effects 0.000 description 1
- 238000009395 breeding Methods 0.000 description 1
- 230000001488 breeding effect Effects 0.000 description 1
- 239000000428 dust Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 210000001156 gastric mucosa Anatomy 0.000 description 1
- 238000003306 harvesting Methods 0.000 description 1
- 229940037467 helicobacter pylori Drugs 0.000 description 1
- 239000012535 impurity Substances 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 230000002401 inhibitory effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 235000013372 meat Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 235000016709 nutrition Nutrition 0.000 description 1
- 230000035764 nutrition Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20172—Image enhancement details
- G06T2207/20192—Edge enhancement; Edge preservation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a pileus size in-situ measurement method based on black-skin termitomyces albuminosus, which comprises the steps of obtaining a thallus image, carrying out binarization to obtain a binarization processing image, and carrying out edge detection on the binarization processing image to obtain an interfering pileus edge profile; acquiring center coordinate points of the interfered pileus edge profile, calculating the center coordinate values, acquiring Euclidean distances between each profile point and the center coordinate points according to the center coordinate points and the center coordinate values, and screening and removing the profile points of which the Euclidean distances do not accord with a preset value to obtain a primary pileus edge profile; obtaining a plurality of contour distances between the initial circle center and the preselected pixel point and the primary pileus edge contour, screening the plurality of contour distances to obtain a target pixel point and a target contour distance, then fitting to obtain a fitting pileus, and obtaining the real pileus size according to the fitting pileus. The pileus size of the black termitomyces albuminosus is calculated through the automatically acquired thallus image, so that the measurement workload is reduced, and the measurement efficiency is improved.
Description
Technical Field
The invention relates to the technical field of size measurement of black termitomyces albuminosus, in particular to a pileus size in-situ measurement method based on the black termitomyces albuminosus.
Background
Collybia nigricans (Oudemansiella rapanipies) belongs to the genus Basidiomycotina, class Hymenomycetes, order Agaricales, family Tricholomataceae. The chicken is tender in meat quality, delicious in taste and rich in nutrition, has the values of reducing blood pressure, inhibiting helicobacter pylori, repairing gastric mucosa and the like, is popular with consumers, and is bound to cultivate a new variety with short growth cycle, strong disease resistance and good quality in order to meet the requirements of people on high-quality black-skin termitomyces albuminosus.
The size of the pileus is the key point that the production and breeding process of the black-skin termitomyces albuminosus must pay attention to, the growth density and the growth speed of the black-skin termitomyces albuminosus can be known by observing the size of the pileus, and whether the current environment is optimal or not can be deduced reversely according to the growth density and the growth speed, and particularly, at present, the industrial cultivation is emphasized, the accurate measurement is carried out on the black-skin termitomyces albuminosus pileus grown on a mushroom bed, whether the black-skin termitomyces albuminosus pileus is in the optimal harvesting time or not is judged, and the precondition that the black-skin termitomyces albuminosus pileus is picked by a machine is utilized.
Because the pileus of the black Collybia albuminosa is approximately circular, the currently measured pileus of the black Collybia albuminosa is usually described by diameter, the adopted method mostly depends on manual naked eyes and vernier calipers to carry out manual measurement, the workload is large, the efficiency is low, the measurement error is large, the method is not suitable for large-scale use, and the large-scale industrial production of the black Collybia albuminosa is hindered to a certain extent.
Disclosure of Invention
Based on the above, the invention aims to provide an in-situ measuring method for the pileus size based on black termitomyces albuminosus, which is used for solving the technical problems that the manual pileus measurement is carried out by means of naked eyes and a vernier caliper, so that the workload is large, the efficiency is low, the measurement error is large, and the method is not suitable for large-scale use.
The application provides a pileus size in-situ measurement method based on black skin termitomyces albuminosus, which is realized by a pileus size in-situ measurement device, wherein the pileus size in-situ measurement device comprises a basal basin mechanism and a measurement mechanism arranged above the basal basin mechanism;
the measuring mechanism comprises a guide assembly, a support assembly and a camera assembly, the support assembly is slidably connected with the guide assembly, the camera assembly is arranged above the support assembly, the camera assembly is slidably connected with the support assembly, the guide assembly is arranged on two sides of the culture basin and arranged along the length direction of the culture basin, the camera assembly comprises a camera, and the camera is perpendicular to the bottom surface of the culture basin;
the in-situ measuring device for the size of the pileus further comprises a control unit arranged on the supporting assembly, the control unit is connected with the measuring mechanism to control the measuring mechanism to slide along the guide assembly, the control unit is further connected with the camera assembly to control the camera assembly to slide relative to the supporting assembly, and the control unit is further connected with the camera to control the camera to acquire a thallus image of each black skin termitomyces albuminosus growing in the culture pot;
the in-situ measuring method for the size of the pileus is applied to a control unit, and comprises the following steps:
acquiring a thallus image of each black skin termitomyces albuminosus growing in a culture pot, carrying out image binarization on the thallus image to obtain a binarization processing image, obtaining a foreground image and a background image according to the binarization processing image, wherein the foreground image is a pileus image, the background image is an earthing image, and carrying out edge detection on the binarization processing image according to the pileus image and the earthing image to obtain an interfering pileus edge profile which comprises an original profile of the black skin termitomyces albuminosus and an edge profile associated with the original profile;
acquiring a central coordinate point of the interfered pileus edge profile, acquiring the Euclidean distance between each contour point in the interfered pileus edge profile and the central coordinate point according to the central coordinate point, and screening the Euclidean distance between each contour point and the central coordinate point once to acquire a primary pileus edge profile;
the method comprises the steps of obtaining a plurality of preselected pixel points within a preset pixel range by taking a center coordinate point as an initial circle center and a unit pixel as an interval, obtaining the initial circle center and the contour distance between each candidate circle center and an edge contour of a primary pileus by taking the preselected pixel points as candidate circle centers, carrying out secondary screening on the obtained initial circle center and the contour distance between each candidate circle center and the edge contour of the primary pileus to obtain a target circle center and a target contour distance, fitting the target circle center and the target contour distance respectively as a fitting circle center and a fitting radius to obtain a fitting pileus corresponding to black skin termitomyces albuminosus, and measuring the fitting pileus to obtain the real pileus size of the black skin termitomyces albuminosus.
According to the in-situ measuring method for the size of the pileus based on the black skin termitomyces albuminosus, the control unit controls the measuring mechanism to move so as to drive the camera to move to automatically acquire the thallus images of all the black skin termitomyces albuminosus arranged in the culture basin, and then the size of the pileus of the black skin termitomyces albuminosus is calculated through the automatically acquired thallus images, so that the technical scheme that manual measurement is needed in the traditional technology is replaced, the workload is reduced, and the measuring efficiency is improved. Specifically, the thallus image is subjected to image binarization to obtain a binarization processing image, then image noise in the binarization processing image is removed, the accuracy of automatic measurement data is improved, and then edge detection is performed on the binarization processing image to obtain an interfered pileus edge profile, so that the original profile of the black skin termitomyces albuminosus and the edge profile associated with the original profile are determined, and the obtained pileus image is ensured to be a complete image; the method is characterized by comprising the steps of firstly screening by combining the pixel point and the outline distance to obtain a primary pileus edge outline, secondly screening the primary pileus edge outline to obtain a fitting pileus corresponding to the black-skin termitomyces albuminosus, and then measuring the fitting pileus to obtain the real pileus size of the black-skin termitomyces albuminosus.
In addition, the in-situ measuring method for the pileus size based on the black skin termitomyces albuminosus can also have the following additional technical characteristics:
further, the step of screening the euclidean distance between each contour point and the central coordinate point once to obtain the primary pileus edge contour includes:
grouping Euclidean distances between each contour point and the central coordinate point according to a first preset group distance to obtain a plurality of groups of Euclidean distances;
acquiring the number of contour points in each set of Euclidean distances, sequentially calculating the ratio of the number of contour points in each set of Euclidean distances to the total number of contour points, selecting the highest ratio from the obtained multiple groups of ratios, and judging whether the highest ratio is smaller than a preset value;
if the highest ratio is smaller than the preset value, selecting two ratios adjacent to the highest ratio and overlapping, and judging whether the overlapped ratio is smaller than the preset value or not;
if the superposed ratio is smaller than the preset value, selecting two ratios adjacent to the superposed ratio and superposing again, and returning to the step of judging whether the superposed ratio is smaller than the preset value or not until the superposed ratio is not smaller than the preset value;
acquiring a threshold value of the Euclidean distance corresponding to the superposed ratio when the superposed ratio is not less than a preset value, and respectively taking the threshold value as a maximum candidate radius and a minimum candidate radius;
taking the central coordinate point as a circle center, respectively taking the maximum candidate radius and the minimum candidate radius as radii to make a circle to obtain a maximum candidate circle and a minimum candidate circle, and determining a region between the maximum candidate circle and the minimum candidate circle as a candidate region;
removing all contour points except the candidate area in the interfered pileus edge contour to obtain a primary pileus edge contour.
Further, the step of performing secondary screening on the obtained initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour to obtain a target circle center and a target contour distance includes:
grouping the initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour according to a second preset group distance to obtain a plurality of groups of Euclidean distances, wherein the second preset group distance is smaller than the first preset group distance;
the method comprises the steps of obtaining the number of contour points in each set of Euclidean distances, calculating the ratio of the number of contour points in each set of Euclidean distances to the total number of contour points, taking the Euclidean distance corresponding to the highest ratio as a target contour distance, and taking the circle center corresponding to the target contour distance as the target circle center.
Further, the step of performing image binarization on the thallus image to obtain a binarized image comprises the steps of:
acquiring an original color space of each thallus image, and performing color space conversion on the thallus images to convert the original color space of the thallus images into a target color space so as to obtain target color space thallus images;
and segmenting the target color space thallus image according to a maximum inter-class variance method, and performing image binarization on the segmented target color space thallus image to obtain an image after binarization processing.
Further, in the step of obtaining the original color space of each bacteria image, and performing color space conversion on the bacteria image to convert the original color space of the bacteria image into the target color space to obtain the target color space bacteria image:
the original color space is an RGB color space, the target color space is an HSI color space, and a conversion formula of color space conversion is as follows:
in the formula, H represents hue, S represents saturation, I represents brightness, R represents red value, G represents green value, and B represents blue value.
Further, the step of segmenting the target color space thallus image according to the maximum inter-class variance method comprises the following steps:
acquiring a hue component of the HSI color space;
and determining a segmentation threshold value of the target color space thallus image by combining the hue component through a maximum inter-class variance method, and segmenting the target color space thallus image according to the segmentation threshold value.
Further, the step of obtaining a foreground image and a background image from the binarized processed image comprises:
acquiring a binarization processing image;
judging whether the binaryzation processing image has image noise according to the image quality;
and if the image noise exists in the binarized image, performing closed operation on the binarized image, and performing open operation on the image after closed operation to remove a connected domain and background noise in the binarized image to obtain a foreground image and a background image.
Further, the step of obtaining an image of the cell of each of the termitomyces nigripes growing in the culture pot may be preceded by:
acquiring original image data of pileus growing in a culture pot;
carrying out image preprocessing on the original image data to improve the contrast of the original image data to obtain high-contrast image data;
the method for improving the contrast of the original image data comprises the following steps:
normalizing the original image data to make a brightness level of the original image data meet a threshold;
wherein, the normalized formula is as follows:
in the formula (I), the compound is shown in the specification,representing the normalized value of each pixel, x representing the value of each pixel in the input original image, min representing the minimum value of all pixels in the original image, max representing the maximum value of all pixels in the original image,is the number of the chips to be 255,is 0.
Further, after the step of performing image preprocessing on the original image data to improve the contrast of the original image data to obtain high-contrast image data, the method includes:
inputting the high-contrast image data into a pre-trained black skin termitomyces recognition model for data processing to obtain image position coordinates of each pileus;
and carrying out image segmentation on the high-contrast image data according to the image position coordinates to obtain a thallus image of the black skin termitomyces albuminosus corresponding to each pileus.
Drawings
FIG. 1 is a schematic structural view of an in-situ apparatus for measuring the size of a pileus in accordance with the present invention;
FIG. 2 is an enlarged view of a portion of area A of FIG. 1;
FIG. 3 is a flow chart of a method for in situ measurement of pileus size in a first embodiment of the present invention;
FIG. 4 is a flow chart of a method for in situ measurement of pileus size in a second embodiment of the present invention;
FIG. 5 is a schematic representation of a single Black termitomyces albuminosus cut by bounding box in accordance with the present invention;
FIG. 6 is a schematic diagram of a binarized image according to the present invention;
FIG. 7 is a flowchart of step S207 in the second embodiment of the present invention;
FIG. 8 is a diagram illustrating an implementation process of step S207 in the second embodiment of the present invention;
FIG. 9 is a flowchart of step S209 in the second embodiment of the present invention;
FIG. 10 is a schematic view of the primary pileus edge profile of a second embodiment of the invention;
FIG. 11 is a schematic diagram of a best-fit circle obtained by fitting according to a second embodiment of the present invention;
FIG. 12 is a schematic diagram showing the best-fit circle marked on the thallus image according to the second embodiment of the present invention;
fig. 13 is a flowchart of step S208 in the second embodiment of the present invention.
Description of main structural symbols:
the following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully hereinafter with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In order to solve the problem of measuring the black-skin termitomyces pileus growing on a mushroom bed and realize the online monitoring of the growth process of the black-skin termitomyces, the invention provides a in-situ measuring method for the size of the termitomyces pileus based on the black-skin termitomyces, so as to solve the problem and realize the in-situ online automatic measurement of the growth condition of the black-skin termitomyces pileus.
Referring to fig. 1 and 2, the in-situ measuring device for the size of pileus based on black skin termitomyces albuminosus in the present application is shown in a schematic structural view, and as can be seen from fig. 1 and 2, the in-situ measuring device for the size of pileus based on black skin termitomyces albuminosus comprises a base basin mechanism and a measuring mechanism arranged above the base basin mechanism;
the base basin mechanism is including cultivateing basin 100, cultivates basin 100 and is used for cultivateing black skin termitomyces albuminosus, and is concrete, be equipped with mushroom bed 500 in the cultivation basin 100, be used for growing the cultivation black skin termitomyces albuminosus, this application is used for carrying out the normal position to the size of growing at the black skin termitomyces albuminosus of mushroom bed 500 and measures, can not cause adverse effect to the normal growth of black skin termitomyces albuminosus promptly, can be at the growth in-process of black skin termitomyces albuminosus, carry out real-time supervision to it, need not to take black skin termitomyces albuminosus and let it break away from original growth environment, can understand, original growth environment includes original growth soil.
The measuring mechanism comprises a guide component, a support component and a camera component, wherein the support component is slidably connected with the guide component, the camera component is arranged above the support component, the camera component is slidably connected with the support component, the guide component is arranged on two sides of the culture basin 100 and arranged along the length direction of the culture basin 100, the camera component comprises a camera support 600 and a camera 800 arranged on the camera support 600, the camera 800 is vertically arranged on the bottom surface of the culture basin 100, specifically, a lens of the camera 800 is vertically opposite to the bottom surface of the culture basin 100 from top to bottom, and further, in the application, the camera 800 adopts an industrial camera;
as a specific example, the guide assembly includes two guide rails 200 spaced apart from each other, the two guide rails 200 are disposed above the cultivation pot 100, the support assembly includes a support rod 300, and the camera support 600 is disposed on the support rod 300. The in-situ measuring device for the size of the pileus further comprises a sliding assembly for connecting the guide assembly and the supporting assembly, the sliding assembly comprises two pulley blocks 400, each pulley block 400 comprises a plurality of pulleys, two ends of each supporting rod 300 are respectively provided with one pulley block 400, and the sliding connection between the supporting assembly and the guide assembly is realized through the sliding of the pulley blocks 400.
The in-situ measuring device for the size of the pileus further comprises a control unit 700 arranged on the support assembly, the control unit 700 is connected with the measuring mechanism to control the measuring mechanism to slide along the guide assembly, the control unit 700 is further connected with the camera assembly to control the camera assembly to slide relative to the support assembly, the control unit 700 is further connected with the camera 800 to control the camera 800 to acquire a thallus image of each black skin termitomyces albuminosus growing in the culture pot 100, and specifically, the control unit 700 is an MCU.
In this application, slide along the direction subassembly through control measuring mechanism to control camera 800 acquires the real-time data of black skin termitomyces albuminosus, is used for tracking the growth data of black skin termitomyces albuminosus through the timely processing of control unit 700 to data again, realizes the on-line monitoring to black skin termitomyces albuminosus growth process.
Example one
Referring to fig. 3, a method for in-situ measurement of pileus size based on termitomyces nigricans according to a first embodiment of the present invention is shown, and the method includes steps S101-S103:
s101, acquiring a thallus image of each black skin termitomyces growing in a culture pot, carrying out image binarization on the thallus image to obtain a binarization processing image, obtaining a foreground image and a background image according to the binarization processing image, wherein the foreground image is a pileus image, the background image is an earthing image, and carrying out edge detection on the binarization processing image according to the pileus image and the earthing image to obtain an interfering pileus edge profile which comprises an original profile of the black skin termitomyces and an edge profile associated with the original profile.
S102, acquiring a central coordinate point of the interfered pileus edge profile, acquiring the Euclidean distance between each contour point in the interfered pileus edge profile and the central coordinate point according to the central coordinate point, and screening the Euclidean distance between each contour point and the central coordinate point once to acquire the primary pileus edge profile.
S103, taking the center coordinate point as an initial circle center, taking the unit pixel as an interval to obtain a plurality of preselected pixel points within a preset pixel range, taking the preselected pixel points as candidate circle centers, obtaining the initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour, performing secondary screening on the obtained initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour to obtain a target circle center and a target contour distance, fitting the target circle center and the target contour distance respectively as a fitting circle center and a fitting radius to obtain a fitting pileus corresponding to the black skin termitomyces albuminosus, and measuring the fitting pileus to obtain the real pileus size of the black skin termitomyces albuminosus.
In summary, in the in-situ measuring method for the size of the pileus of the black skin termitomyces in the above embodiments of the present invention, the control unit controls the movement of the measuring mechanism to drive the camera to move so as to automatically acquire the thallus images of all the black skin termitomyces arranged in the culture basin, and then the size of the pileus of the black skin termitomyces is calculated through the automatically acquired thallus images, so that the technical scheme of manual measurement in the conventional technology is replaced, the workload is reduced, and the measuring efficiency is improved. Specifically, the thallus image is subjected to image binarization to obtain a binarization processing image, then image noise in the binarization processing image is removed, the accuracy of automatic measurement data is improved, and then edge detection is performed on the binarization processing image to obtain an interfered pileus edge profile, so that the original profile of the black skin termitomyces albuminosus and the edge profile associated with the original profile are determined, and the obtained pileus image is ensured to be a complete image; the method comprises the steps of firstly screening by combining the pixel point and the outline distance to obtain a primary pileus edge outline, secondly screening the primary pileus edge outline to obtain a real pileus size corresponding to black-skin termitomyces, and then measuring a fitting pileus to obtain the real pileus size of the black-skin termitomyces.
Example two
Referring to fig. 4, a method for in-situ measurement of pileus size based on termitomyces nigricans according to a second embodiment of the present invention is shown, and the method includes steps S201 to S209:
s201, acquiring original image data of pileus growing in the culture pot.
S202, image preprocessing is carried out on the original image data to improve the contrast of the original image data to obtain high-contrast image data.
The method for improving the contrast of the original image data comprises the following steps:
normalizing the original image data to make a brightness level of the original image data meet a threshold;
wherein, the normalized formula is as follows:
in the formula (I), the compound is shown in the specification,representing the normalized value of each pixel point, x representing each image in the input original imageThe value of a pixel, min represents the minimum value of all pixel points in the original image, max represents the maximum value of all pixel points in the original image,is the number of the chips to be 255,is 0.
S203, inputting the high-contrast image data into a pre-trained black skin termitomyces albuminosus recognition model for data processing so as to obtain the image position coordinates of each pileus.
Specifically, the training step of the black skin termitomyces albuminosus recognition model comprises the following steps:
the method comprises the steps of obtaining RGB pictures of the black termitomyces albuminosus planted in a mushroom bed at different moments as input data, marking the black termitomyces albuminosus in the RGB pictures by using a square frame in a manual mode, and then sending the black termitomyces albuminosus into a black termitomyces albuminosus recognition model for training, so that the black termitomyces albuminosus recognition model is obtained.
S204, carrying out image segmentation on the high-contrast image data according to the image position coordinates to obtain a thallus image of the black skin termitomyces albuminosus corresponding to each pileus.
In this embodiment, the position coordinates of each black termitomyces albuminosus fruiting body in the training are obtained through a trained black termitomyces albuminosus identification model; as shown in fig. 5, a rectangular bounding box is drawn for each black termitomyces albuminosus entity by position coordinates, and the bounding box is used as a boundary to perform cropping in fig. 5, so as to obtain a picture (such as a, b, c and d in fig. 5) containing a single black termitomyces albuminosus entity, and the segmented picture (such as a in fig. 5 and b in fig. 5) is converted from the RGB color space to the HSI color space.
S205, obtaining an original color space of each thallus image according to the thallus images, and performing color space conversion on the thallus images to convert the original color spaces of the thallus images into target color spaces so as to obtain target color space thallus images.
As a specific example, the original color space is an RGB color space, the target color space is an HSI color space, and the conversion formula of the color space conversion is as follows:
in the formula, H represents hue, S represents saturation, I represents brightness, R represents red value, G represents green value, and B represents blue value.
And S206, segmenting the target color space thallus image according to the maximum inter-class variance method, and performing image binarization on the segmented target color space thallus image to obtain an image after binarization processing.
Specifically, a hue component of an HSI color space is obtained;
and determining a segmentation threshold of the thallus image in the target color space by combining a maximum inter-class variance method with the tone component, and segmenting the thallus image in the target color space according to the segmentation threshold.
The global OTSU algorithm, also called maximum inter-class variance method or Daluy method, is based on the basic idea of dividing the image into two parts, namely target and background, calculating the maximum inter-class variance value corresponding to the gray value of the pixel, and taking the threshold corresponding to the maximum inter-class variance value as the optimal threshold.
Setting the optimal threshold value asT,TThe image is divided into a target and a background. Wherein the ratio of the target points to the total image isW 0 Average gray value ofU 0 (ii) a The number of background points in the image isW 1 Average gray value ofU 1 Then, then
W 0 + W 1 =1
The total mean gray value of the image is then:
U=W 0 U 0 +W 1 U 1
the between-class variance is:
g=W
0
(U
0
-U)
2
+W
1
(U
1
-U)
2
can be equivalent to:
g=W
0
W
1
(U
0
-U
1
)
2
after the threshold is determined, the H component is segmented and binarized to obtain fig. 6.
And S207, obtaining a foreground image and a background image according to the binarization processing image, wherein the foreground image is a pileus image, the background image is an earthing image, and edge detection is performed on the binarization processing image according to the pileus image and the earthing image to obtain an interfering pileus edge profile which comprises an original profile of the black skin termitomyces albuminosus and an edge profile associated with the original profile.
Specifically, as shown in fig. 7 and 8, the step "obtaining the foreground image and the background image from the binarized processed image" may specifically include steps S2071 to S2074:
s2071, a binarized image is acquired.
S2072, determining whether the binarized image has image noise according to the image quality.
If the image noise exists in the binarization processing image, executing step S2073;
if the binarized image has no image noise, executing step S2074;
and S2073, performing closed operation on the binarized image, and performing open operation on the image after the closed operation to remove a connected domain and background noise in the binarized image to obtain a foreground image and a background image.
And S2074, directly obtaining the foreground image and the background image from the binarized image without processing the binarized image.
Referring to fig. 6 and 8, as can be seen from fig. 6, there are many image noise points in the foreground image and the background image, that is, there are many image noise points in the pileus image and the soil covering image, it should be further explained that, in the embodiment of the present application, since the influence of impurities such as dust on the pileus image is negligible on the experimental result, the contents in the pileus image are pileus. After the closing operation is performed on fig. 6, the opening operation is performed to remove the connected domain and the background noise to obtain the foreground image and the background image, specifically as shown in a and b in fig. 8, a in fig. 8 is a schematic diagram after the connected domain is removed, b in fig. 8 is a schematic diagram after the background is removed, then the canny edge detection operator is used to perform edge detection to obtain the pileus edge profile with interference, specifically as shown in c in fig. 8, and c in fig. 8 is a schematic diagram of the pileus edge profile with interference obtained by performing edge detection through the edge detection operator.
S208, acquiring a central coordinate point of the interfered pileus edge profile, acquiring the Euclidean distance between each contour point in the interfered pileus edge profile and the central coordinate point according to the central coordinate point, and screening the Euclidean distance between each contour point and the central coordinate point once to acquire the primary pileus edge profile.
Specifically, referring to fig. 13, the step of performing one-time screening on the euclidean distance between each contour point and the center coordinate point to obtain the primary pileus edge contour includes steps S2081 to S2087:
s2081, grouping Euclidean distances between each contour point and the central coordinate point according to a first preset group distance to obtain multiple groups of Euclidean distances;
s2082, acquiring the number of contour points in each set of Euclidean distances, sequentially calculating the ratio of the number of contour points in each set of Euclidean distances to the total number of contour points, selecting the highest ratio from the obtained multiple sets of ratios, and judging whether the highest ratio is smaller than a preset value;
s2083, if the highest ratio is smaller than the preset value, selecting two ratios adjacent to the highest ratio, superposing the two ratios, and judging whether the superposed ratio is smaller than the preset value or not;
s2084, if the ratio after superposition is smaller than the preset value, selecting two ratios adjacent to the ratio after superposition, superposing again, and returning to the step of judging whether the ratio after superposition is smaller than the preset value until the ratio after superposition is not smaller than the preset value;
s2085, obtaining a threshold value of the Euclidean distance corresponding to the superposed ratio when the superposed ratio is not less than a preset value, and taking the threshold value as a maximum candidate radius and a minimum candidate radius respectively;
s2086, taking the central coordinate point as a circle center, respectively taking the maximum candidate radius and the minimum candidate radius as radii to make a circle, obtaining a maximum candidate circle and a minimum candidate circle, and determining a region between the maximum candidate circle and the minimum candidate circle as a candidate region;
and S2087, removing all contour points except the candidate area in the interference pileus edge contour to obtain a primary pileus edge contour.
Referring to FIG. 10, the central coordinate point (W/2, H/2) of c in FIG. 8 is taken, wherein W is the width dimension of the bounding box of c in FIG. 8, and H is the height dimension of the bounding box of c in FIG. 8. Calculating the Euclidean distance from the center coordinate point to each contour point on the edge contour in FIG. 8, clustering contour points with different Euclidean distances by using a preset group distance, for example, clustering contour points with different Euclidean distances by using 5 as the minimum Euclidean distance and 10 as the first preset group distance to obtain a plurality of categories with the Euclidean distances of 5,15,25,35,45, …, respectively, counting the number of the edge points gathered in each category, calculating the proportion of the edge points occupying all pixels, and obtaining a sequence D arranged in sequence i With D i Middle-scale highest packet D n For the beginning, if D n If the Euclidean distance exceeds 50%, the corresponding minimum Euclidean distance and the maximum Euclidean distance are used as candidate ranges RL and RH of the radius, otherwise, D is calculated n-1 、D n And D n+1 If the proportion of the three groups is more than 50%, the minimum Euclidean distance and the maximum Euclidean distance corresponding to the three groups are used as candidate ranges RL and RH of the radius, otherwise, D is calculated n-2 、D n-1 、D n 、D n+1 And D n+2 Five packets are accounted for until the condition of more than 50% is met. Taking RL and RH as the minimum candidate radius and the maximum candidate radius, respectively, to make a circle to obtain a minimum candidate circle and a maximum candidate circle, as shown in a in fig. 10, specifically, in a in fig. 10, an outline a is the maximum candidate circle, an outline B is the minimum candidate circle, in c in fig. 8, an area having an euclidean distance from a center coordinate point greater than RL but less than RH is determined as a candidate area, and edge pixel points having the euclidean distance from the center coordinate point greater than RH or less than RL are removed to obtain a primary pileus edge outline, so as to obtain B in fig. 10.
S209, taking the center coordinate point as an initial circle center, taking the unit pixel as an interval to obtain a plurality of preselected pixel points within a preset pixel range, taking the preselected pixel points as candidate circle centers, obtaining the initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour, performing secondary screening on the obtained initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour to obtain a target circle center and a target contour distance, fitting the target circle center and the target contour distance respectively as a fitting circle center and a fitting radius to obtain a fitting pileus corresponding to the black skin termitomyces albuminosus, and measuring the fitting pileus to obtain the real pileus size of the black skin termitomyces albuminosus.
As a specific example, it can be understood that, the primary pileus edge contour obtained in step S207 and having the interference is obtained by removing contour pixel points that are "obviously not in line with" contour requirements after the primary screening in step S208, and the primary pileus edge contour is obtained by removing contour pixel points that are "obviously not in line with" contour requirements macroscopically, so that the screening time and the screening strength are shortened for the secondary screening, and the accuracy of the secondary screening result is improved, and the "primary screening" can be understood as "sea-picking" the primary pileus edge contour from the pileus edge contour having the interference; and then, performing secondary screening on the primary pileus edge profile in the step S209 to obtain the target circle center and the target profile distance, so as to obtain a fitted pileus corresponding to the black skin termitomyces albuminosus through fitting, wherein the secondary screening can be understood as "carefully selecting" the fitted pileus from the primary pileus edge profile, and the fitted pileus is measured to obtain the real pileus size of the black skin termitomyces albuminosus.
In this embodiment, the center coordinate point of the interfered pileus edge contour is generally the geometric center of the rectangular bounding box, and since there may be a deviation when the rectangular bounding box is marked, so that the geometric center of the rectangular bounding box is not necessarily the geometric center of the black-skin termitomyces albuminosus pileus, an error may exist between the primary pileus edge contour obtained by the center coordinate point of the interfered pileus edge contour and the real contour of the black-skin termitomyces albuminosus, in order to eliminate the error, the contour center closest to the real contour of the black-skin termitomyces albuminosus needs to be obtained as the center coordinate point, and the "secondary screening" in this application is a screening process designed to find the contour center closest to the real contour of the black-skin termitomyces albuminosus. Specifically, a central coordinate point is used as a base point, unit pixels are used as intervals to radiate outwards to form a preset pixel range, a plurality of preselected pixel points in the preset pixel range are obtained, in this embodiment, the unit pixel is radiated outward to obtain a plurality of preselected pixel points, because the black termitomyces albuminosus is already attached to the black termitomyces albuminosus to the greatest extent in the process of selecting the black termitomyces albuminosus in the rectangular bounding box, the difference between the center coordinate point and the outline center of the real outline of the black termitomyces albuminosus is not very large, which is generally an error of the unit pixel, at this time, and screening candidate circle centers formed by the preselected pixel points and an initial circle center formed by the central coordinate points to obtain a target circle center corresponding to the outline center of the real outline of the black termitomyces albuminosus, and fitting according to the distance between the target circle center and the target outline to obtain a fitting circle corresponding to the fitting pileus. In this embodiment, since the normal shape of the cap of the black skin termitomyces albuminosus belongs to a circle, the edge contour of the fitted cap obtained by fitting the circle belongs to the edge contour of the real fungus body.
It should be further noted that, as a specific example, the real pileus size of the black skin termitomyces albuminosus obtained by the measurement method of the present application has a size error compared with the actual pileus size, but since the error belongs to a reasonable error in the measurement process and is within an allowable range of the measurement error, the real pileus size of the black skin termitomyces albuminosus obtained by the measurement method of the present application can be used as the actual pileus size.
Specifically, as shown in fig. 9, in step S209, the step of performing secondary screening on the obtained initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour to obtain the target circle center and the target contour distance includes S2091 to S2092:
s2091, grouping the initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour according to a second preset group distance to obtain a plurality of groups of Euclidean distances.
As a specific example, in order to improve the screening accuracy of the secondary screening, the second preset group pitch is smaller than the first preset group pitch. As can be seen from the example in the present embodiment, the first preset bank distance is 10 pixels, and the second preset bank distance is 1 pixel.
S2092, the number of contour points in each set of Euclidean distances is obtained, the ratio of the number of contour points in each set of Euclidean distances to the total number of contour points is calculated, the Euclidean distance corresponding to the highest ratio is taken as a target contour distance, and the circle center corresponding to the target contour distance is taken as a target circle center.
Referring to fig. 10 and fig. 11, the center coordinate point (W/2, H/2) of fig. 10 is obtained, it should be noted that the center coordinate point of fig. 10 is consistent with the center coordinate point of c in fig. 8, the center coordinate point (W/2, H/2) of fig. 10 is taken as the center, the distance from the edge contour to each circle center in fig. 10 when n × n points in the range of n × n pixels around the center are taken as the circle centers is calculated, and the obtained distances from the plurality of contours are grouped and clustered by taking the unit pixel as the second preset group distance, that is, 1 pixel is taken as the group distance to cluster the circle centers to the edge contour, the number of the edge points collected in each category is counted, the proportion of the edge points occupying all pixels is calculated, the coordinate of the circle center when the proportion is the highest is taken as the final coordinate of the circle center of the fitting circle, that is the target circle center of the fitting circle, and the distance from the pixel point is taken as the fitting radius of the fitting circle, referring to fig. 11, a best-fit circle is obtained by fitting according to the final coordinate of the center of the circle and the fitting radius, the best-fit circle is the final shape of the black termitomyces albuminosus cover, and the best-fit circle is marked on the thallus image, as shown in fig. 12.
And according to the camera calibration result, calculating the size of the black termitomyces albuminosus pileus by using the calibration parameters and the pixels occupied by the radius obtained in the step. Specifically, the measuring method can identify the black termitomyces albuminosus with the height within the range of 12-62mm, and the low height indicates that the black termitomyces albuminosus is small and easily submerged by noise, and in addition, the identification significance is not great. Because the monocular camera has no way to accurately acquire the depth, the actual distance represented by each unit pixel point is calculated by considering that the calibration plate is placed at the middle position of 37mm in the range of 12mm-62mm, then the pixel distance from a certain point on the boundary of the fitting circle to the center of the circle is calculated according to the fitting circle obtained in the embodiment, and then the actual distance represented by each unit pixel point is multiplied. It should be further noted that, in the actual use process of the method, since the actual distances represented by each unit pixel point at the 62mm position and the 37mm position are different, but the difference is small, and is within the allowable range of the experimental error, the distance at the 37mm position is approximate to the distance at the 62mm position by the present application. The content of the prior art is calculated by calibrating the parameters, and related data can be consulted for understanding, which is not described in detail herein.
In summary, in the in-situ measuring method for the size of the pileus of the black skin termitomyces in the above embodiments of the present invention, the control unit controls the movement of the measuring mechanism to drive the camera to move so as to automatically acquire the thallus images of all the black skin termitomyces arranged in the culture basin, and then the size of the pileus of the black skin termitomyces is calculated through the automatically acquired thallus images, so that the technical scheme of manual measurement in the conventional technology is replaced, the workload is reduced, and the measuring efficiency is improved. Specifically, the thallus image is subjected to image binarization to obtain a binarization processing image, then image noise in the binarization processing image is removed, the accuracy of automatic measurement data is improved, and then edge detection is performed on the binarization processing image to obtain an interfered pileus edge profile, so that the original profile of the black skin termitomyces albuminosus and the edge profile associated with the original profile are determined, and the obtained pileus image is ensured to be a complete image; the method is characterized by comprising the steps of firstly screening by combining the pixel point and the profile distance to obtain a primary pileus edge profile, secondly screening the primary pileus edge profile to obtain a fitting pileus corresponding to the black-skin termitomyces albuminosus, and then measuring the fitting pileus to obtain the real pileus size of the black-skin termitomyces albuminosus.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (9)
1. The in-situ measuring method for the dimension of the pileus based on the black skin termitomyces albuminosus is characterized by being realized by an in-situ measuring device for the dimension of the pileus, wherein the in-situ measuring device for the dimension of the pileus comprises a basal basin mechanism and a measuring mechanism arranged above the basal basin mechanism;
the measuring mechanism comprises a guide assembly, a support assembly and a camera assembly, the support assembly is slidably connected with the guide assembly, the camera assembly is arranged above the support assembly, the camera assembly is slidably connected with the support assembly, the guide assembly is arranged on two sides of the culture basin and arranged along the length direction of the culture basin, the camera assembly comprises a camera, and the camera is perpendicular to the bottom surface of the culture basin;
the in-situ measuring device for the size of the pileus further comprises a control unit arranged on the supporting assembly, the control unit is connected with the measuring mechanism to control the measuring mechanism to slide along the guide assembly, the control unit is further connected with the camera assembly to control the camera assembly to slide relative to the supporting assembly, and the control unit is further connected with the camera to control the camera to acquire a thallus image of each black skin termitomyces albuminosus growing in the culture pot;
the in-situ measuring method for the size of the pileus is applied to a control unit, and comprises the following steps:
acquiring a thallus image of each black skin termitomyces albuminosus growing in a culture pot, carrying out image binarization on the thallus image to obtain a binarization processing image, obtaining a foreground image and a background image according to the binarization processing image, wherein the foreground image is a pileus image, the background image is an earthing image, and carrying out edge detection on the binarization processing image according to the pileus image and the earthing image to obtain an interfering pileus edge profile which comprises an original profile of the black skin termitomyces albuminosus and an edge profile associated with the original profile;
acquiring a central coordinate point of the interfered pileus edge profile, acquiring the Euclidean distance between each contour point in the interfered pileus edge profile and the central coordinate point according to the central coordinate point, and screening the Euclidean distance between each contour point and the central coordinate point once to acquire a primary pileus edge profile;
the method comprises the steps of obtaining a plurality of preselected pixel points within a preset pixel range by taking a center coordinate point as an initial circle center and a unit pixel as an interval, obtaining the initial circle center and the contour distance between each candidate circle center and an edge contour of a primary pileus by taking the preselected pixel points as candidate circle centers, carrying out secondary screening on the obtained initial circle center and the contour distance between each candidate circle center and the edge contour of the primary pileus to obtain a target circle center and a target contour distance, fitting the target circle center and the target contour distance respectively as a fitting circle center and a fitting radius to obtain a fitting pileus corresponding to black skin termitomyces albuminosus, and measuring the fitting pileus to obtain the real pileus size of the black skin termitomyces albuminosus.
2. The in-situ pileus dimension measurement method based on black skin termitomyces albuminosus according to claim 1, wherein the step of screening the Euclidean distance between each contour point and the central coordinate point for one time to obtain a primary pileus edge contour comprises:
grouping Euclidean distances between each contour point and the central coordinate point according to a first preset group distance to obtain a plurality of groups of Euclidean distances;
acquiring the number of contour points in each set of Euclidean distances, sequentially calculating the ratio of the number of contour points in each set of Euclidean distances to the total number of contour points, selecting the highest ratio from the obtained multiple groups of ratios, and judging whether the highest ratio is smaller than a preset value;
if the highest ratio is smaller than the preset value, selecting two ratios adjacent to the highest ratio and overlapping, and judging whether the overlapped ratio is smaller than the preset value or not;
if the superposed ratio is smaller than the preset value, selecting two ratios adjacent to the superposed ratio and superposing again, and returning to the step of judging whether the superposed ratio is smaller than the preset value or not until the superposed ratio is not smaller than the preset value;
acquiring a threshold value of the Euclidean distance corresponding to the superposed ratio when the superposed ratio is not less than a preset value, and respectively taking the threshold value as a maximum candidate radius and a minimum candidate radius;
taking the central coordinate point as a circle center, respectively taking the maximum candidate radius and the minimum candidate radius as radii to make a circle to obtain a maximum candidate circle and a minimum candidate circle, and determining a region between the maximum candidate circle and the minimum candidate circle as a candidate region;
removing all contour points except the candidate area in the interfered pileus edge contour to obtain a primary pileus edge contour.
3. The termitomyces nigricans-based pileus dimension in-situ measurement method as claimed in claim 2, wherein the step of performing secondary screening on the obtained initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour to obtain a target circle center and a target contour distance comprises:
grouping the initial circle center and the contour distance between each candidate circle center and the primary pileus edge contour according to a second preset group distance to obtain a plurality of groups of Euclidean distances, wherein the second preset group distance is smaller than the first preset group distance;
the method comprises the steps of obtaining the number of contour points in each set of Euclidean distances, calculating the ratio of the number of contour points in each set of Euclidean distances to the total number of contour points, taking the Euclidean distance corresponding to the highest ratio as a target contour distance, and taking the circle center corresponding to the target contour distance as the target circle center.
4. The in-situ measuring method for the pileus size based on the black skin termitomyces albuminosus according to claim 1, wherein the step of performing image binarization on the thallus image to obtain a binarized image comprises the steps of:
acquiring an original color space of each thallus image, and performing color space conversion on the thallus images to convert the original color space of the thallus images into a target color space so as to obtain target color space thallus images;
and segmenting the target color space thallus image according to a maximum inter-class variance method, and performing image binarization on the segmented target color space thallus image to obtain an image after binarization processing.
5. The in-situ measurement method for the size of the pileus of termitomyces albuminosus according to claim 4, wherein in the step of obtaining the thalli image in the target color space by obtaining the original color space of each thalli image and performing color space conversion on the thalli image to convert the original color space of the thalli image into the target color space:
the original color space is an RGB color space, the target color space is an HSI color space, and a conversion formula of color space conversion is as follows:
in the formula, H represents hue, S represents saturation, I represents brightness, R represents red value, G represents green value, and B represents blue value.
6. The in-situ mycoderm size measuring method based on black skin termitomyces albuminosus according to claim 5, wherein the step of segmenting the target color space thallus image according to the maximum inter-class variance method comprises:
acquiring a hue component of the HSI color space;
and determining a segmentation threshold value of the target color space thallus image by combining the hue component through a maximum inter-class variance method, and segmenting the target color space thallus image according to the segmentation threshold value.
7. The in-situ mycoderm size measuring method based on black skin termitomyces albuminosus according to claim 1, wherein the step of obtaining the foreground image and the background image according to the binarization processing image comprises:
acquiring a binarization processing image;
judging whether the binaryzation processing image has image noise according to the image quality;
and if the image noise exists in the binarized image, performing closed operation on the binarized image, and performing open operation on the image after closed operation to remove a connected domain and background noise in the binarized image to obtain a foreground image and a background image.
8. The in situ pileus size measurement method based on black skin termitomyces albuminosus according to claim 1, wherein the step of obtaining the image of the cell of each black skin termitomyces albuminosus grown in the culture pot is preceded by:
acquiring original image data of pileus growing in a culture pot;
carrying out image preprocessing on the original image data to improve the contrast of the original image data to obtain high-contrast image data;
the method for improving the contrast of the original image data comprises the following steps:
normalizing the original image data to make a brightness level of the original image data meet a threshold;
wherein, the normalized formula is as follows:
in the formula (I), the compound is shown in the specification,representing the normalized value of each pixel, x representing the value of each pixel in the input original image, min representing the minimum value of all pixels in the original image, max representing the maximum value of all pixels in the original image,is the number of the chips to be 255,is 0.
9. The in-situ pileus dimension measurement method based on termitomyces nigricans according to claim 8, wherein the step of performing image preprocessing on the raw image data to improve the contrast of the raw image data to obtain high-contrast image data is followed by the steps of:
inputting the high-contrast image data into a pre-trained black skin termitomyces recognition model for data processing to obtain image position coordinates of each pileus;
and carrying out image segmentation on the high-contrast image data according to the image position coordinates to obtain a thallus image of the black skin termitomyces albuminosus corresponding to each pileus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210776560.0A CN114838664B (en) | 2022-07-04 | 2022-07-04 | In-situ pileus size measuring method based on black-skin termitomyces albuminosus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210776560.0A CN114838664B (en) | 2022-07-04 | 2022-07-04 | In-situ pileus size measuring method based on black-skin termitomyces albuminosus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114838664A true CN114838664A (en) | 2022-08-02 |
CN114838664B CN114838664B (en) | 2022-09-23 |
Family
ID=82574782
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210776560.0A Active CN114838664B (en) | 2022-07-04 | 2022-07-04 | In-situ pileus size measuring method based on black-skin termitomyces albuminosus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114838664B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115760853A (en) * | 2023-01-06 | 2023-03-07 | 山东常生源生物科技股份有限公司 | Edible fungus image identification method |
CN116434225A (en) * | 2023-06-12 | 2023-07-14 | 江西农业大学 | Automatic acquisition method and system for bacterial cover morphological data |
CN117611657A (en) * | 2024-01-22 | 2024-02-27 | 江西农业大学 | Pleurotus eryngii volume calculation method |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10253522A (en) * | 1997-03-10 | 1998-09-25 | Mitsubishi Chem Corp | Image processing method |
JP2012185591A (en) * | 2011-03-04 | 2012-09-27 | Fuji Xerox Co Ltd | Image processing apparatus, information providing system, and program |
CN104535588A (en) * | 2014-12-24 | 2015-04-22 | 河海大学常州校区 | Egg freshness nondestructive testing system based on Android system and egg freshness nondestructive testing method |
JP2016110444A (en) * | 2014-12-08 | 2016-06-20 | 国立大学法人静岡大学 | Eyeball identification apparatus and eyeball identification method |
EP3113078A1 (en) * | 2015-07-03 | 2017-01-04 | Ricoh Company, Ltd. | Method and system for detecting regular shape |
CN108171693A (en) * | 2017-12-27 | 2018-06-15 | 合肥市雅视智能科技有限公司 | A kind of method of automatic detection poor quality mushroom |
CN108805875A (en) * | 2018-04-17 | 2018-11-13 | 上海大学 | White mushroom position identifies and pushes over the method for selecting in direction |
CN109345554A (en) * | 2018-09-12 | 2019-02-15 | 南京农业大学 | A kind of adhesion mushroom vision in-situ measuring method based on RGB-D camera |
CN109341524A (en) * | 2018-10-17 | 2019-02-15 | 上海理工大学 | A kind of optical fiber geometric parameter detection method based on machine vision |
CN111445511A (en) * | 2020-03-24 | 2020-07-24 | 杭州东信北邮信息技术有限公司 | Method for detecting circle in image |
CN111445482A (en) * | 2020-03-24 | 2020-07-24 | 上海第二工业大学 | Segmentation and identification method of overlapped agaricus bisporus |
CN112669304A (en) * | 2021-01-05 | 2021-04-16 | 天津大学 | Pollen detection method based on digital image processing technology |
CN113223027A (en) * | 2021-04-13 | 2021-08-06 | 山东师范大学 | Immature persimmon segmentation method and system based on PolarMask |
CN114018202A (en) * | 2021-11-08 | 2022-02-08 | 绍兴职业技术学院 | Novel algorithm for rapidly evaluating roundness |
-
2022
- 2022-07-04 CN CN202210776560.0A patent/CN114838664B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10253522A (en) * | 1997-03-10 | 1998-09-25 | Mitsubishi Chem Corp | Image processing method |
JP2012185591A (en) * | 2011-03-04 | 2012-09-27 | Fuji Xerox Co Ltd | Image processing apparatus, information providing system, and program |
JP2016110444A (en) * | 2014-12-08 | 2016-06-20 | 国立大学法人静岡大学 | Eyeball identification apparatus and eyeball identification method |
CN104535588A (en) * | 2014-12-24 | 2015-04-22 | 河海大学常州校区 | Egg freshness nondestructive testing system based on Android system and egg freshness nondestructive testing method |
EP3113078A1 (en) * | 2015-07-03 | 2017-01-04 | Ricoh Company, Ltd. | Method and system for detecting regular shape |
CN108171693A (en) * | 2017-12-27 | 2018-06-15 | 合肥市雅视智能科技有限公司 | A kind of method of automatic detection poor quality mushroom |
CN108805875A (en) * | 2018-04-17 | 2018-11-13 | 上海大学 | White mushroom position identifies and pushes over the method for selecting in direction |
CN109345554A (en) * | 2018-09-12 | 2019-02-15 | 南京农业大学 | A kind of adhesion mushroom vision in-situ measuring method based on RGB-D camera |
CN109341524A (en) * | 2018-10-17 | 2019-02-15 | 上海理工大学 | A kind of optical fiber geometric parameter detection method based on machine vision |
CN111445511A (en) * | 2020-03-24 | 2020-07-24 | 杭州东信北邮信息技术有限公司 | Method for detecting circle in image |
CN111445482A (en) * | 2020-03-24 | 2020-07-24 | 上海第二工业大学 | Segmentation and identification method of overlapped agaricus bisporus |
CN112669304A (en) * | 2021-01-05 | 2021-04-16 | 天津大学 | Pollen detection method based on digital image processing technology |
CN113223027A (en) * | 2021-04-13 | 2021-08-06 | 山东师范大学 | Immature persimmon segmentation method and system based on PolarMask |
CN114018202A (en) * | 2021-11-08 | 2022-02-08 | 绍兴职业技术学院 | Novel algorithm for rapidly evaluating roundness |
Non-Patent Citations (1)
Title |
---|
甘泉等: "基于图像处理的圆形工件尺寸检测方法", 《黑龙江工业学院学报(综合版)》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115760853A (en) * | 2023-01-06 | 2023-03-07 | 山东常生源生物科技股份有限公司 | Edible fungus image identification method |
CN116434225A (en) * | 2023-06-12 | 2023-07-14 | 江西农业大学 | Automatic acquisition method and system for bacterial cover morphological data |
CN116434225B (en) * | 2023-06-12 | 2023-08-11 | 江西农业大学 | Automatic acquisition method and system for bacterial cover morphological data |
CN117611657A (en) * | 2024-01-22 | 2024-02-27 | 江西农业大学 | Pleurotus eryngii volume calculation method |
CN117611657B (en) * | 2024-01-22 | 2024-04-23 | 江西农业大学 | Pleurotus eryngii volume calculation method |
Also Published As
Publication number | Publication date |
---|---|
CN114838664B (en) | 2022-09-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114838664B (en) | In-situ pileus size measuring method based on black-skin termitomyces albuminosus | |
CN109308697B (en) | Leaf disease identification method based on machine learning algorithm | |
CN108181316B (en) | Bamboo strip defect detection method based on machine vision | |
CN106846344B (en) | A kind of image segmentation optimal identification method based on the complete degree in edge | |
CN105678806B (en) | A kind of live pig action trail automatic tracking method differentiated based on Fisher | |
CN109255757B (en) | Method for segmenting fruit stem region of grape bunch naturally placed by machine vision | |
CN108875747B (en) | Machine vision-based imperfect wheat grain identification method | |
CN107945200B (en) | Image binarization segmentation method | |
Lü et al. | Leaf area measurement based on image processing | |
CN108564124A (en) | A kind of magnaporthe grisea spore microimage detection recognition methods based on support vector machines | |
CN111753577A (en) | Apple identification and positioning method in automatic picking robot | |
CN108662977A (en) | A kind of refractory brick geometric dimension measurement method | |
CN107256547A (en) | A kind of face crack recognition methods detected based on conspicuousness | |
CN110288561A (en) | Refractory brick surface scratch recognition methods based on frequency filtering enhancing | |
CN103679173A (en) | Method for detecting image salient region | |
CN106683098B (en) | A kind of dividing method of overlapped blades image | |
CN116721391B (en) | Method for detecting separation effect of raw oil based on computer vision | |
CN115018844A (en) | Plastic film quality evaluation method based on artificial intelligence | |
CN114049365A (en) | Visual segmentation and identification method for agaricus bisporus | |
CN103729621B (en) | Plant leaf image automatic recognition method based on leaf skeleton model | |
CN107657620A (en) | A kind of method and system of textured metal freezing region recognition | |
Zhang et al. | An automated bacterial colony counting system | |
CN109961044A (en) | CHN method interest method for extracting region based on shape information and convolutional neural networks | |
CN107239761B (en) | Fruit tree branch pulling effect evaluation method based on skeleton angular point detection | |
CN111369497B (en) | Walking type tree fruit continuous counting method and device |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231205 Address after: 343400 Luoxing Industrial Park, Yongxin Industrial Development Zone, Ji'an City, Jiangxi Province Patentee after: Jiangxi Fansheng Modern Agricultural Technology Co.,Ltd. Address before: No. 1101, Zhimin Avenue, Nanchang City, Jiangxi Province Patentee before: JIANGXI AGRICULTURAL University |