CN113870179A - Honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile map reconstruction - Google Patents

Honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile map reconstruction Download PDF

Info

Publication number
CN113870179A
CN113870179A CN202110958828.8A CN202110958828A CN113870179A CN 113870179 A CN113870179 A CN 113870179A CN 202110958828 A CN202110958828 A CN 202110958828A CN 113870179 A CN113870179 A CN 113870179A
Authority
CN
China
Prior art keywords
honey
honey pomelo
pomelo
pomelos
longitudinal
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.)
Pending
Application number
CN202110958828.8A
Other languages
Chinese (zh)
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.)
Zhejiang University ZJU
Huanan Industrial Technology Research Institute of Zhejiang University
Original Assignee
Zhejiang University ZJU
Huanan Industrial Technology Research Institute of Zhejiang University
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 Zhejiang University ZJU, Huanan Industrial Technology Research Institute of Zhejiang University filed Critical Zhejiang University ZJU
Priority to CN202110958828.8A priority Critical patent/CN113870179A/en
Publication of CN113870179A publication Critical patent/CN113870179A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/08Measuring arrangements characterised by the use of optical techniques for measuring diameters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20192Edge enhancement; Edge preservation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30188Vegetation; Agriculture

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 Analysis (AREA)

Abstract

The invention discloses a honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile reconstruction. The method comprises the following steps: the method comprises the steps of obtaining a multi-view outline drawing of the honey pomelos after edge detection, connected domain marking, maximum connected domain solving and coordinate space conversion by utilizing an original image of the honey pomelos continuously and iteratively collected by a built image collection system, finally carrying out equal-interval surface segmentation and equal-interval weft fitting on the outline drawing to obtain the transverse diameter of the honey pomelos, and obtaining the longitudinal diameter of the honey pomelos by fitting the circle centers of the equal-interval wefts and judging. The honey pomelo damage prevention method can avoid damage to honey pomelos, and saves time and labor; meanwhile, the limitation that the longitudinal and transverse diameters of the honey pomelos are influenced by the acquisition visual angle based on single image measurement can be further solved by utilizing the multi-visual-angle profile map, so that more scientific and objective longitudinal and transverse diameter fruit shape parameters are provided for the honey pomelos in the aspect of external quality grading.

Description

Honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile map reconstruction
Technical Field
The invention relates to a honey pomelo longitudinal and transverse diameter measuring method, in particular to a honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile reconstruction.
Background
China is the country with the largest planting area of pomelos in the world, and the yield is the first world. The fruit shape characteristic detection can realize the classification of the external quality of the fruits and the elimination of malformed fruits. The longitudinal diameter and the transverse diameter of honey pomelos are one of the important parameters of fruit shapes (GB/T12947-. The traditional manual measurement mode is time-consuming and labor-consuming, has a plurality of subjective influence factors, utilizes an image processing technology to measure the longitudinal and transverse diameters of the honey pomelos through multi-view profile reconstruction, has the advantages of non-contact, rapidness, no damage and the like, and has important practical application value for external quality grading of the honey pomelos.
The honey pomelo longitudinal and transverse diameter size needs to be measured after longitudinal and transverse cutting, but the method not only can cause irreversible damage to the honey pomelo, but also cannot meet the requirements of nondestructive and rapid speed in the external quality grading production process of the honey pomelo.
Octopus et al (2001) (Octopus, should be construed and bin. apple image low-level processing and size detection [ J ] Zhejiang agricultural science, 2001(04):38-41.) after searching and refining contour lines by using a chain symbol method, the vertical diameter and the transverse diameter of an apple are obtained by using the minimum circumscribed rectangle, and the result shows that the correlation coefficient between the measured size and the actual size reaches 0.955.
Widehua et al (2011) (Shen Bao, widehua, Yi Jianjun. apple diameter detection technology [ J ] based on minimum circumcircle method, agricultural research, 2011,33(12): 131-.
Gongchang et al (2013) (Gongchang, smart, Huangjie, poplar billow. research on a grapefruit size detection system based on machine vision [ J ] agricultural machinery research, 2013,35(11):22-25) collects a single image of a single grapefruit fruit by using a single color camera, obtains a target image after image preprocessing, obtains four boundary points of the top, the bottom, the left and the right by adopting a line-by-line scanning mode, and obtains an average relative error of a transverse diameter of 2.43% and an average relative error of a longitudinal diameter of 2.30% after correcting by using a machine vision spherical object detection error principle.
Yangmmin (2016) (Yangmmin. Potato three-dimensional surface reconstruction method based on multiple contour maps research [ D ]. Zhejiang university, 2016.) A potato three-dimensional skeleton is synthesized by using contour maps of a plurality of potatoes in different postures, and meanwhile, the influence of different numbers of pictures on surface fitting to form a potato three-dimensional model is researched.
Bought, skilful, etc. (2018) (rich, high-thriving, songwen, should be stand for, xu hui.) a three-dimensional modeling method of potato based on contour images [ P ]. CN 108053485A, 2018.05.18.) discloses a three-dimensional modeling method of potato based on contour images, which uses feature points to form a skeleton and finally builds a three-dimensional model, and the volume correlation coefficient of the three-dimensional modeling method reaches 0.968.
Most honey pomelos are in shapes with small top and large bottom, which are far away from ellipsoids, and the traditional minimum circumcircle detection method cannot give consideration to the accuracy of transverse diameter and longitudinal diameter.
Disclosure of Invention
In order to solve the problems and requirements in the background art, the invention provides a honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile reconstruction.
The technical scheme of the invention is as follows:
the invention comprises the following steps:
1) constructing an image acquisition system: the image acquisition system comprises a rotary storage platform, a honey pomelo, an RGB camera, an illumination box, a data transmission line and a host;
the rotary storage platform, the honey pomelos and the RGB camera are all positioned in the illumination box, the honey pomelos are placed on the rotary storage platform and rotate along with the uniform rotation of the rotary storage platform, the RGB camera is placed on one side of the rotary storage platform, the optical axis of the RGB camera points to the honey pomelos, and the RGB camera is connected with the host through a data transmission line;
2) establishing a world coordinate system: using the rotation central axis of the rotary platform as X of the world coordinate systemWAxis, Z of the world coordinate systemWThe axis coincides with the RGB camera optical axis and points towards the RGB camera, Y of the world coordinate systemWThe axes are determined by a right-hand coordinate system;
3) image acquisition: rotating the rotary storage platform, and collecting a plurality of original images I of the current honey pomelos by the RGB camera at equal time intervals; (ii) a
4) Acquiring a honey pomelo multi-view profile P: sequentially carrying out edge detection, marking of connected domains, maximum connected domain solving and coordinate space conversion on a plurality of original images I of the current honey pomelos to obtain a honey pomelo multi-view profile;
5) obtaining honey pomelo equally spaced wefts;
6) and (3) obtaining the transverse diameter of the honey pomelo: sequentially traversing n-1 honey pomelo equispaced wefts, calculating the diameter of each honey pomelo equispaced weft, and taking the maximum diameter as the maximum transverse diameter of the current honey pomelo;
7) obtaining a honey pomelo longitudinal axis fitting line;
8) calculating the longitudinal diameter of honey pomelos;
9) and (3) judging malformed fruits: calculating the included angle theta between the fitting line L of the longitudinal axes of the honey pomelos and the vertical line, and when the included angle theta is larger than a preset threshold value thetadWhen the current honey pomelo is a malformed fruit, the length of the maximum transverse diameter and the length of the longitudinal diameter of the current honey pomelo are recorded as negative numbers; otherwise, the value is not changed.
The step 4) is specifically as follows:
4.1) edge detection: converting an original image I into a gray image G, and detecting the edge contour of the gray image G to obtain a noisy edge contour image E';
4.2) labeling connected domains: traversing each pixel point of the noisy edge contour image E', detecting the connectivity of other pixel points and any pixel point according to 8 fields of the pixel, marking the region which accords with 8 connectivity as the same connected domain, and obtaining each connected domain;
4.3) solving the maximum connected domain: traversing each connected domain, obtaining the largest connected domain and storing the largest connected domain as an edge contour image E;
4.4) converting coordinate space; performing coordinate space conversion on each pixel point of the edge contour image E to obtain an edge contour image F after coordinate conversion; for any pixel point (x, y) in the edge profile image E, rotating around a rotating shaft of the rotating object placing platform to obtain a three-dimensional space point coordinate (x) of the pixel pointw,yw,zw) The coordinate conversion is performed by the following formula:
xw=x
y′=y-y0
yw=y′*cos(θ)-z*sin(θ)
zw=y′*sin(θ)+z*cos(θ)
wherein x represents the abscissa value of the pixel (x, y), y represents the ordinate value of the pixel (x, y), and y0Representing a vertical symmetry axis of the current edge contour image E, y' representing a longitudinal coordinate value of a pixel point (x, y) before rotation, and theta representing an angle rotated by the rotary storage platform when the original image I corresponding to the current edge contour image E is collected;
4.5) iteratively solving a multi-view profile: and repeating the steps 4.1) to 4.4) on the rest original image I to obtain edge contour images F after coordinate conversion of all the original images I, and combining the edge contour images F after coordinate conversion to obtain a honey pomelo multi-view contour image P.
The step 5) is specifically as follows:
in the interval [ MinXw,MaxXw]N equal divisions are carried out on the multi-view profile P of the honey pomelo, wherein MinXwX representing minimum in honey pomelo multi-view profile PWAxial coordinate value, MaxXwX representing the maximum in the multi-view profile P of honey pomeloWObtaining n-1 honey pomelo equidistant sections, generating intersection points between the n-1 honey pomelo equidistant sections and the honey pomelo multi-view profile P, fitting the intersection points between the same honey pomelo equidistant sections and the honey pomelo multi-view profile P by using a minimum circumscribed circle, obtaining n-1 honey pomelo equidistant wefts and obtaining a honey pomelo multi-view weft profile Q;
the step 7) is specifically as follows:
7.1) equally spaced weft threads l for the ith honey pomeloiCenter O of the equally spaced latitude line of the ith honey pomeloiX of (2)WCoordinate value XWiObtained by the following formula:
Figure BDA0003221388150000031
wherein floor denotes a down-rounding function, (i ═ 1, 2.., n-1);
7.2) repeating the step 7.1) on the n-1 honey pomelo equally spaced wefts to obtain the circle centers of the n-1 honey pomelo equally spaced wefts, and obtaining a honey pomelo longitudinal axis fitting line L by utilizing straight line fitting.
The step 8) is specifically as follows:
8.1) average distance discrimination: in the profile Q of the multi-angle latitude lines of the honey pomelos, the region (MinX) of the longitudinal axis fitting line L of the honey pomelos is calculatedw,MaxXw]The contour line average distance of all points; for any point P on the fitted line L of the longitudinal axis of the honey pomeloiFind the point PiTo a radius threshold rdThe average of the distances between points on the range of the honey pomelo contour is taken as point PiMean distance of contour line of (Meand)iWherein the contour line of honey pomelo is composed of multi-view edge contour line in the contour diagram Q of honey pomelo multi-view latitude line and honey pomelo equal interval latitude line;
8.2) marking the top point and the bottom point of the longitudinal axis: according to the set distance threshold value PdAfter judging and marking the average distance of the contour lines of all the points, obtaining a longitudinal axis vertex set and a longitudinal axis bottom point set, wherein the average distance of the contour lines of all the points in the longitudinal axis vertex set and the longitudinal axis bottom point set is greater than zero and less than or equal to a distance threshold value PdThen selecting X from the vertex set of the vertical axisWSelecting X from the set of the vertex points of the vertical axis as the point with the maximum axial coordinate valueWThe point with the minimum axial coordinate value is used as a bottom point of the longitudinal axis;
8.3) calculating the longitudinal diameter of the honey pomelo: and (4) calculating the Euclidean distance between the top point of the longitudinal axis and the bottom point of the longitudinal axis and taking the Euclidean distance as the length of the longitudinal diameter of the current honey pomelo.
The invention has the beneficial effects that:
the honey pomelo damage prevention method can avoid damage to honey pomelos, and saves time and labor; meanwhile, the limitation that the longitudinal and transverse diameters of the honey pomelos are influenced by the acquisition visual angle based on single image measurement can be further solved by utilizing the multi-visual-angle profile map, so that more scientific and objective longitudinal and transverse diameter fruit shape parameters are provided for the honey pomelos in the aspect of external quality grading.
The invention provides a method for obtaining the transverse diameter of honey pomelos by performing equal-interval surface segmentation and equal-interval weft fitting based on a honey pomelo contour map, and fitting the circle centers of the equal-interval wefts and judging.
Drawings
FIG. 1 is an overall flow chart of the present invention.
Fig. 2 is a layout of an image acquisition system of the present invention.
Fig. 3 is an original image of the present invention.
FIG. 4 is a noisy edge profile image of the present invention.
FIG. 5 is an edge profile image of the present invention.
Fig. 6 is a multi-view profile of a honey pomelo of the present invention.
Fig. 7 is a weft contour plot of honey pomelos of the present invention at equal intervals.
FIG. 8 is a schematic diagram of the vertical axis apex and vertical axis apex marking of the present invention
In the figure: 1. the system comprises a rotary storage platform, 2, honey pomelos, 3, RGB cameras, 4, an illumination box, 5, a data transmission line, 6 and a host.
Detailed Description
The invention is further illustrated by the following figures and examples.
The invention selects citrus fruit honey pomelo as an embodiment:
as shown in fig. 1, the present invention comprises the steps of:
1) as shown in fig. 2, the image acquisition system was set up: the image acquisition system comprises a rotary storage platform 1, a honey pomelo 2, an RGB camera 3, an illumination box 4, a data transmission line 5 and a host 6;
the rotary storage platform 1, the honey pomelos 2 and the RGB camera 3 are all positioned in the illumination box 4, the honey pomelos 2 are placed on the rotary storage platform 1, the honey pomelos 2 rotate along with the uniform rotation of the rotary storage platform 1, the RGB camera 3 is placed on one side of the rotary storage platform 1, the optical axis of the RGB camera 3 points to the honey pomelos 2, and the RGB camera 3 is connected with the host computer 6 through the data transmission line 5;
2) establishing a world coordinate system: as shown in FIG. 2, the rotation center axis of the rotatable platform 1 is used as X of the world coordinate systemWAxis, Z of the world coordinate systemWThe axis coincides with the optical axis of the RGB camera 3 and points towards the RGB camera 3, Y of the world coordinate systemWThe axes are determined by a right-hand coordinate system;
3) image acquisition: rotating the rotary object placing platform 1, and collecting a plurality of original images I of the current honey pomelos 2 at equal time intervals by the RGB camera 3; in specific implementation, for the currently placed honey pomelo 2, the rotating speed of the rotary storage platform 1 is controlled to be 5 °/s, the RGB camera 3 collects a color image every 1s, and the color image is recorded as an original image I, as shown in fig. 3;
4) acquiring a honey pomelo multi-view profile P: sequentially carrying out edge detection, connected domain marking, maximum connected domain solving and coordinate space conversion on a plurality of original images I of the current honey pomelos 2 to obtain a honey pomelo multi-view profile;
the step 4) is specifically as follows:
4.1) edge detection: converting an original image I into a gray image G, and detecting the edge contour of the gray image G by using a canny operator to obtain a noise-containing edge contour image E', as shown in FIG. 4;
4.2) labeling connected domains: traversing each pixel point of the noisy edge contour image E', detecting the connectivity of other pixel points and any pixel point according to 8 fields of the pixel, marking the region which accords with 8 connectivity as the same connected domain, and obtaining each connected domain;
4.3) solving the maximum connected domain: traversing each connected domain, finding out the largest connected domain and storing the largest connected domain as an edge contour image E, as shown in FIG. 5; simultaneously sequentially traversing each pixel point of the edge contour image E, and correspondingly storing the coordinates of the pixel points to a first array X and a second array Y;
4.4) converting coordinate space; setting each pixel point of the edge contour image EPerforming standard space conversion to obtain an edge contour image F after coordinate conversion; for any pixel point (X, Y) in the edge contour image E, wherein X belongs to X, Y belongs to Y, the three-dimensional space point coordinate (X) of the pixel point is obtained by rotating around the rotating shaft of the rotary object placing platform 1w,yw,zw) The coordinate conversion is performed by the following formula:
xw=x
y′=y-y0
yw=y′*cos(θ)-z*sin(θ)
zw=y′*sin(θ)+z*cos(θ)
wherein, (x, y) represents the pixel coordinate of any pixel point in the current edge contour image E, x represents the abscissa value of the pixel point (x, y), y represents the ordinate value of the pixel point (x, y)0Represents the vertical symmetry axis of the current edge profile image E, y' represents the ordinate value of the pixel point (x, y) before rotation (i.e. when the platform 1 is rotated in the initial state), θ represents the angle that the platform 1 rotates when the original image I corresponding to the current edge profile image E is collected, (x is the vertical symmetry axis of the current edge profile image E), and θ represents the angle that the platform 1 rotates when the original image I corresponding to the current edge profile image E is collectedw,yw,zw) Representing the three-dimensional space point coordinates of the rotated pixel points (x, y);
4.5) iteratively solving a multi-view profile: repeating the steps 4.1) to 4.4) on the rest original images I to obtain edge contour images F after the coordinate transformation of all the original images I, wherein the collection of the honey pomelos is set to continuously obtain 36 original images of the current honey pomelos in the embodiment. Combining all the edge contour images F after the coordinate conversion to obtain a honey pomelo multi-view contour image P, as shown in FIG. 6;
5) obtaining honey pomelo equally spaced wefts: along XWAxial direction in interval [ MinX ]w,MaxXw]N equal divisions are carried out on the multi-view profile P of the honey pomelo, wherein MinXwX representing minimum in honey pomelo multi-view profile PWAxial coordinate value, MaxXwX representing the maximum in the multi-view profile P of honey pomeloWObtaining n-1 honey pomelo equal-interval sections, generating intersection points between the n-1 honey pomelo equal-interval sections and the honey pomelo multi-view profile P, and fitting the same honey by using the minimum circumscribed circleCrossing points are generated between the grapefruit equidistant section and the honey pomelo multi-view contour map P to obtain n-1 honey pomelo equidistant wefts and obtain a honey pomelo multi-view weft contour map Q; this embodiment is divided into 27 weft yarns, i.e., n-28, as shown in fig. 7.
6) And (3) obtaining the transverse diameter of the honey pomelo: sequentially traversing n-1 equidistant wefts of the honey pomelo multi-view weft contour diagram Q, calculating the diameter of each equidistant weft of the honey pomelos, and taking the maximum diameter as the maximum transverse diameter of the current honey pomelo;
7) obtaining a honey pomelo longitudinal axis fitting line:
the step 7) is specifically as follows:
7.1) equally spaced weft threads l for the ith honey pomeloiWith a coordinate of the center of the circle of Oi(XWi,YWi,ZWi) Center O of the equally spaced latitude line of the ith honey pomeloiX of (2)WCoordinate value XWiObtained by the following formula:
Figure BDA0003221388150000061
wherein floor denotes a down-rounding function, (i ═ 1, 2.., n-1);
7.2) repeating the step 7.1) on n-1 honey pomelo equally spaced wefts to obtain the circle centers of the n-1 honey pomelo equally spaced wefts, and obtaining a honey pomelo longitudinal axis fitting line L by utilizing straight line fitting;
8) and (3) obtaining the longitudinal diameter of the honey pomelo:
the step 8) is specifically as follows:
8.1) average distance discrimination: in the outline Q of the multi-angle latitude line of the honey pomelo, calculating the fitting line L of the longitudinal axis of the honey pomelo along XwInterval in axial direction [ MinX ]w,MaxXw]The contour line average distance of all points; for any point P on the fitted line L of the longitudinal axis of the honey pomeloiFind the point PiTo a radius threshold rdThe average of the distances between points on the range of the honey pomelo contour is taken as point PiMean distance of contour line of (Meand)iWherein the outline of honey pomelo is composed of multi-view edge outline of honey pomelo multi-view weft outline Q and honey pomelo equal interval weftThe components are combined together;
8.2) marking the top point and the bottom point of the longitudinal axis: according to the set distance threshold value PdAfter judging and marking the average distance of the contour lines of all the points, obtaining a longitudinal axis vertex set and a longitudinal axis bottom point set, wherein the average distance of the contour lines of all the points in the longitudinal axis vertex set and the longitudinal axis bottom point set is greater than zero and less than or equal to a distance threshold value PdThen selecting X from the vertex set of the vertical axisWSelecting X from the set of the vertex points of the vertical axis as the point with the maximum axial coordinate valueWThe point with the minimum axial coordinate value is used as a bottom point of the longitudinal axis; if Meandi0 denotes a point PiClose to the center of the honey pomelo (such as P)1Dots) or away from the outline of a honey pomelo (e.g. P)2Point), i.e. no honey pomelo contour line is present near the point, no P is markedi(ii) a If Meandi>PdRepresents a point PiCloser to the outline of the honey pomelo (e.g. P)3Point), no mark point Pi(ii) a If 0 < Meandi≤PdThen the minimum Meand is preservediCorresponding PiA dot, indicating that the dot is located on the surface of the outline of a honey pomelo (e.g. P)4Point), marking two points of the vertex of the longitudinal axis and the bottom point of the longitudinal axis together; the schematic diagram is shown in FIG. 8;
8.3) calculating the longitudinal diameter of the honey pomelo: solving the Euclidean distance between two points of the top point of the longitudinal axis and the bottom point of the longitudinal axis and taking the Euclidean distance as the length of the longitudinal diameter of the current honey pomelo;
9) and (3) judging malformed fruits: calculating the included angle theta between the fitting line L of the longitudinal axes of the honey pomelos and the vertical line, and when the included angle theta is larger than a preset threshold value thetadWhen the current honey pomelo is a malformed fruit, the length of the maximum transverse diameter and the length of the longitudinal diameter of the current honey pomelo are recorded as negative numbers; otherwise, the value is not changed.

Claims (5)

1. A honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile reconstruction is characterized by comprising the following steps:
1) constructing an image acquisition system: the image acquisition system comprises a rotary storage platform (1), a honey pomelo (2), an RGB (red, green and blue) camera (3), an illumination box (4), a data transmission line (5) and a host (6);
the rotary storage platform (1), the honey pomelos (2) and the RGB camera (3) are all located in the illumination box (4), the honey pomelos (2) are placed on the rotary storage platform (1), the honey pomelos (2) rotate along with the uniform rotation of the rotary storage platform (1), the RGB camera (3) is placed on one side of the rotary storage platform (1), the optical axis of the RGB camera (3) points to the honey pomelos (2), and the RGB camera (3) is connected with the host (6) through the data transmission line (5);
2) establishing a world coordinate system: the rotation central axis of the rotary object placing platform (1) is taken as X of a world coordinate systemWAxis, Z of the world coordinate systemWThe axis coincides with the optical axis of the RGB camera (3) and points towards the RGB camera (3), Y of the world coordinate systemWThe axes are determined by a right-hand coordinate system;
3) image acquisition: rotating the rotary object placing platform (1), and collecting a plurality of original images I of the current honey pomelos (2) at equal time intervals by the RGB camera (3); (ii) a
4) Acquiring a honey pomelo multi-view profile P: sequentially carrying out edge detection, connected domain marking, maximum connected domain solving and coordinate space conversion on a plurality of original images I of the current honey pomelos (2) to obtain a honey pomelo multi-view profile;
5) obtaining honey pomelo equally spaced wefts;
6) and (3) obtaining the transverse diameter of the honey pomelo: sequentially traversing n-1 honey pomelo equispaced wefts, calculating the diameter of each honey pomelo equispaced weft, and taking the maximum diameter as the maximum transverse diameter of the current honey pomelo;
7) obtaining a honey pomelo longitudinal axis fitting line;
8) calculating the longitudinal diameter of honey pomelos;
9) and (3) judging malformed fruits: calculating the included angle theta between the fitting line L of the longitudinal axes of the honey pomelos and the vertical line, and when the included angle theta is larger than a preset threshold value thetadWhen the current honey pomelo is a malformed fruit, the length of the maximum transverse diameter and the length of the longitudinal diameter of the current honey pomelo are recorded as negative numbers; otherwise, the value is not changed.
2. The method for measuring the vertical and horizontal diameters of the honey pomelos based on the multi-view profile reconstruction as claimed in claim 1, wherein the step 4) is specifically as follows:
4.1) edge detection: converting an original image I into a gray image G, and detecting the edge contour of the gray image G to obtain a noisy edge contour image E';
4.2) labeling connected domains: traversing each pixel point of the noisy edge contour image E', detecting the connectivity of other pixel points and any pixel point according to 8 fields of the pixel, marking the region which accords with 8 connectivity as the same connected domain, and obtaining each connected domain;
4.3) solving the maximum connected domain: traversing each connected domain, obtaining the largest connected domain and storing the largest connected domain as an edge contour image E;
4.4) converting coordinate space; performing coordinate space conversion on each pixel point of the edge contour image E to obtain an edge contour image F after coordinate conversion; for any pixel point (x, y) in the edge profile image E, rotating around a rotating shaft of the rotating object placing platform (1) to obtain a three-dimensional space point coordinate (x) of the pixel pointw,yw,zw) The coordinate conversion is performed by the following formula:
xw=x
y′=y-y0
yw=y′*cos(θ)-z*sin(θ)
zw=y′*sin(θ)+z*cos(θ)
wherein x represents the abscissa value of the pixel (x, y), y represents the ordinate value of the pixel (x, y), and y0Representing a vertical symmetry axis of the current edge contour image E, y' representing a longitudinal coordinate value of a pixel point (x, y) before rotation, and theta representing a rotating angle of the rotary storage platform (1) when the original image I corresponding to the current edge contour image E is collected;
4.5) iteratively solving a multi-view profile: and repeating the steps 4.1) to 4.4) on the rest original image I to obtain edge contour images F after coordinate conversion of all the original images I, and combining the edge contour images F after coordinate conversion to obtain a honey pomelo multi-view contour image P.
3. The method for measuring the vertical and horizontal diameters of the honey pomelos based on the multi-view profile reconstruction as claimed in claim 1, wherein the step 5) is specifically as follows:
in the interval [ MinXw,MaxXw]N equal divisions are carried out on the multi-view profile P of the honey pomelo, whereinMinXwX representing minimum in honey pomelo multi-view profile PWAxial coordinate value, MaxXwX representing the maximum in the multi-view profile P of honey pomeloWAnd obtaining n-1 honey pomelo equidistant sections by using the axis coordinate values, generating intersection points between the n-1 honey pomelo equidistant sections and the honey pomelo multi-view profile P, fitting the intersection points between the same honey pomelo equidistant sections and the honey pomelo multi-view profile P by using a minimum circumscribed circle, obtaining n-1 honey pomelo equidistant wefts, and obtaining the honey pomelo multi-view weft profile Q.
4. The method for measuring the vertical and horizontal diameters of the honey pomelos based on the multi-view profile reconstruction as claimed in claim 1, wherein the step 7) is specifically as follows:
7.1) equally spaced weft threads l for the ith honey pomeloiCenter O of the equally spaced latitude line of the ith honey pomeloiX of (2)WCoordinate value XWiObtained by the following formula:
Figure FDA0003221388140000021
wherein floor denotes a down-rounding function, (i ═ 1, 2.., n-1);
7.2) repeating the step 7.1) on the n-1 honey pomelo equally spaced wefts to obtain the circle centers of the n-1 honey pomelo equally spaced wefts, and obtaining a honey pomelo longitudinal axis fitting line L by utilizing straight line fitting.
5. The method for measuring the vertical and horizontal diameters of the honey pomelos based on the multi-view profile reconstruction as claimed in claim 1, wherein the step 8) is specifically as follows:
8.1) average distance discrimination: in the profile Q of the multi-angle latitude lines of the honey pomelos, the region (MinX) of the longitudinal axis fitting line L of the honey pomelos is calculatedw,MaxXw]The contour line average distance of all points; for any point P on the fitted line L of the longitudinal axis of the honey pomeloiFind the point PiTo a radius threshold rdThe average of the distances between points on the range of the honey pomelo contour is taken as point PiContour line averaging ofDistance meaandiWherein the contour line of honey pomelo is composed of multi-view edge contour line in the contour diagram Q of honey pomelo multi-view latitude line and honey pomelo equal interval latitude line;
8.2) marking the top point and the bottom point of the longitudinal axis: according to the set distance threshold value PdAfter judging and marking the average distance of the contour lines of all the points, obtaining a longitudinal axis vertex set and a longitudinal axis bottom point set, wherein the average distance of the contour lines of all the points in the longitudinal axis vertex set and the longitudinal axis bottom point set is greater than zero and less than or equal to a distance threshold value PdThen selecting X from the vertex set of the vertical axisWSelecting X from the set of the vertex points of the vertical axis as the point with the maximum axial coordinate valueWThe point with the minimum axial coordinate value is used as a bottom point of the longitudinal axis;
8.3) calculating the longitudinal diameter of the honey pomelo: and (4) calculating the Euclidean distance between the top point of the longitudinal axis and the bottom point of the longitudinal axis and taking the Euclidean distance as the length of the longitudinal diameter of the current honey pomelo.
CN202110958828.8A 2021-08-20 2021-08-20 Honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile map reconstruction Pending CN113870179A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110958828.8A CN113870179A (en) 2021-08-20 2021-08-20 Honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile map reconstruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110958828.8A CN113870179A (en) 2021-08-20 2021-08-20 Honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile map reconstruction

Publications (1)

Publication Number Publication Date
CN113870179A true CN113870179A (en) 2021-12-31

Family

ID=78987874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110958828.8A Pending CN113870179A (en) 2021-08-20 2021-08-20 Honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile map reconstruction

Country Status (1)

Country Link
CN (1) CN113870179A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115035184A (en) * 2022-06-13 2022-09-09 浙江大学 Honey pomelo volume estimation method based on lateral multi-view reconstruction
CN115330878A (en) * 2022-10-18 2022-11-11 山东特联信息科技有限公司 Tank mouth visual positioning method for tank car

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115035184A (en) * 2022-06-13 2022-09-09 浙江大学 Honey pomelo volume estimation method based on lateral multi-view reconstruction
CN115035184B (en) * 2022-06-13 2024-05-28 浙江大学 Honey pomelo volume estimation method based on lateral multi-view reconstruction
CN115330878A (en) * 2022-10-18 2022-11-11 山东特联信息科技有限公司 Tank mouth visual positioning method for tank car

Similar Documents

Publication Publication Date Title
CN108827316B (en) Mobile robot visual positioning method based on improved Apriltag
CN104897062B (en) Visual measurement method and device for shape and position deviation of part non-coplanar parallel holes
CN107358627B (en) Fruit size detection method based on Kinect camera
CN113870179A (en) Honey pomelo longitudinal and transverse diameter measuring method based on multi-view profile map reconstruction
CN105335973B (en) Apply to the visual processing method of strip machining production line
CN109900711A (en) Workpiece, defect detection method based on machine vision
CN107392929B (en) Intelligent target detection and size measurement method based on human eye vision model
CN110286124A (en) Refractory brick measuring system based on machine vision
CN110288561A (en) Refractory brick surface scratch recognition methods based on frequency filtering enhancing
CN111583114B (en) Automatic measuring device and measuring method for pipeline threads
CN104167003A (en) Method for fast registering remote-sensing image
CN113989379B (en) Hub welding seam three-dimensional characteristic measuring device and method based on linear laser rotation scanning
CN104268602A (en) Shielded workpiece identifying method and device based on binary system feature matching
CN116416250B (en) Finished product detecting system of fast food canned product production line
CN109813725A (en) A kind of large scale glue defect inspection method
CN112884880B (en) Line laser-based honey pomelo three-dimensional modeling device and method
CN110608685A (en) Object size rapid measurement method based on raspberry pie
CN115345876B (en) Bolt thread defect detection method based on ultrasonic image
CN109341524A (en) A kind of optical fiber geometric parameter detection method based on machine vision
CN113379824B (en) Quasi-circular fruit longitudinal and transverse diameter measuring method based on double-view-point cloud registration
CN104614372B (en) Detection method of solar silicon wafer
CN111161227B (en) Target positioning method and system based on deep neural network
Ma et al. Rapid estimation of apple phenotypic parameters based on 3D reconstruction
CN104881652B (en) A kind of line number automatic testing method based on corncob male features
Cao Detection of fruit surface defects based on machine vision

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