A method for measuring the vertical and horizontal diameters of pomelo based on multi-view contour image reconstruction

By using a multi-view contour map reconstruction method, an image acquisition system was built and multi-view contour map processing was performed. This solved the problems of time-consuming, labor-intensive, and inaccurate traditional methods, and achieved non-destructive, fast, and accurate measurement of the longitudinal and transverse diameters of pomelos, which is suitable for external quality grading of pomelos.

CN113870179BInactive Publication Date: 2025-02-11ZHEJIANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110958828.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-20
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN113870179B_ABST
    Figure CN113870179B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for measuring the vertical and horizontal diameters of honey pomelo based on reconstruction of a multi-view contour map. The method comprises: using the constructed image acquisition system to continuously iterate the original image of honey pomelo, after edge detection, connected domain marking, maximum connected domain acquisition, and coordinate space conversion, a multi-view contour map of honey pomelo is obtained, and finally the contour map is divided into equally spaced surfaces and equally spaced latitudes are fitted to obtain the horizontal diameter of the honey pomelo, and the vertical diameter of the honey pomelo is obtained by fitting the center of the equally spaced latitudes and distinguishing them. The present invention can avoid damage to the honey pomelo, saving time and effort; at the same time, the use of multi-view contour maps can further solve the limitation that the vertical and horizontal diameters of honey pomelo measured based on a single image are affected by the acquisition perspective, thereby providing more scientific and objective vertical and horizontal diameter fruit shape parameters for honey pomelo in terms of external quality grading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for measuring the vertical and horizontal diameters of honey pomelo, and in particular to a method for measuring the vertical and horizontal diameters of honey pomelo based on multi-viewing angle contour image reconstruction. Background Art

[0002] my country has the largest area of ​​pomelo in the world, and its output ranks first in the world. Fruit shape feature detection can realize the grading of the external quality of fruits and eliminate deformed fruits. The longitudinal and transverse diameters of honey pomelo are one of the important parameters of fruit shape (GB / T12947-2008 Fresh Citrus), and are also an important basis for the external quality grading of honey pomelo. Traditional manual measurement methods are time-consuming and labor-intensive, with many subjective factors. The use of image processing technology to measure the longitudinal and transverse diameters of honey pomelo through multi-view contour reconstruction has the advantages of non-contact, fast, and non-destructive, and has important practical application value for the external quality grading of honey pomelo.

[0003] To obtain the longitudinal and transverse diameters of the pomelo, it is necessary to cut the pomelo longitudinally and transversely and then measure them. However, this method will not only cause irreversible damage to the pomelo, but also fail to meet the requirements of non-destructive and rapid external quality grading in the production process of the pomelo.

[0004] Zhang Wenying et al. (2001) (Zhang Wenying, Ying Yibin. Low-level processing and size detection of apple images [J]. Journal of Zhejiang Agricultural Sciences, 2001(04):38-41.) used the chain method to search and refine the contour line, and then used the minimum circumscribed rectangle to calculate the longitudinal and transverse diameters of the apple. The results showed that the correlation coefficient between the measured size and the actual size reached 0.955.

[0005] Wei Xinhua et al. (2011) (Shen Baoguo, Wei Xinhua, Yin Jianjun. Apple diameter detection technology based on the minimum circumscribed circle method [J]. Agricultural Mechanization Research, 2011, 33(12): 131-134.) collected 144 images of 12 sample apples and measured the apple diameter using the minimum circumscribed circle method. The correlation coefficient of the fitting equation reached 0.988.

[0006] Gong Changlai et al. (2013) (Gong Changlai, Luo Cong, Huang Jiexian, Yang Dongtao. Research on grapefruit size detection system based on machine vision [J]. Agricultural Mechanization Research, 2013, 35(11): 22-25) used a single color camera to collect a single pomelo image, and obtained the target image after image preprocessing. The top, bottom, leftmost and rightmost boundary points were obtained by line scanning. The average relative error of the horizontal diameter was 2.43% and the average relative error of the vertical diameter was 2.30% after correction using the error principle of spherical object detection by machine vision.

[0007] Yang Yaomin (2016) (Yang Yaomin. Research on potato three-dimensional surface reconstruction method based on multiple contour images [D]. Zhejiang University, 2016.) used multiple contour images of potatoes in different postures to synthesize the potato three-dimensional skeleton, and at the same time explored the influence of different numbers of images on the surface fitting to form a potato three-dimensional model.

[0008] Rao Xiuqin et al. (2018) (Rao Xiuqin, Gao Yingwang, Song Chenbo, Ying Yibin, Xu Huirong. A potato three-dimensional modeling method based on contour image [P]. CN108053485 A, 2018.05.18.) disclosed a potato three-dimensional modeling method based on contour image, which uses feature points to form a skeleton and finally builds a three-dimensional model, and its volume correlation coefficient reaches 0.968.

[0009] Most pomeloes are small on top and large on the bottom, which is far from an ellipsoid. The traditional minimum circumscribed circle detection method cannot take into account the accuracy of both the horizontal and vertical diameters. Summary of the invention

[0010] In order to solve the problems and needs in the background technology, the present invention provides a method for measuring the longitudinal and transverse diameters of pomelo based on multi-view contour image reconstruction.

[0011] The technical solution of the present invention is as follows:

[0012] The present invention comprises the following steps:

[0013] 1) Build the image acquisition system: The image acquisition system includes a rotating storage platform, pomelo, RGB camera, light box, data transmission line and host;

[0014] The rotating storage platform, honey pomelo and RGB camera are all located in the illumination box. The honey pomelo is placed on the rotating storage platform, and the honey pomelo rotates with the uniform rotation of the rotating storage platform. The RGB camera is placed on one side of the rotating storage platform and the optical axis of the RGB camera points to the honey pomelo. The RGB camera is connected to the host through a data transmission line;

[0015] 2) Establish the world coordinate system: Use the rotation center axis of the rotating platform as the X coordinate system of the world coordinate system. W Axis, Z of the world coordinate system W The axis coincides with the optical axis of the RGB camera and points to the RGB camera. The Y axis of the world coordinate system W The axes are determined by a right-hand coordinate system;

[0016] 3) Image acquisition: rotating the rotating storage platform, and the RGB camera collects multiple original images I of the current honey pomelo at equal time intervals;

[0017] 4) Obtaining a multi-view contour image P of honey pomelo: performing edge detection, marking connected domains, obtaining the maximum connected domain, and coordinate space conversion on multiple original images I of the current honey pomelo in turn to obtain a multi-view contour image of the honey pomelo;

[0018] 5) Obtaining equally spaced latitude lines of honey pomelo;

[0019] 6) Obtaining the transverse diameter of the pomelo: traverse n-1 equally spaced latitudes of the pomelo in sequence, calculate the diameter of each equally spaced latitude of the pomelo, and take the largest diameter as the maximum transverse diameter of the current pomelo;

[0020] 7) Obtaining the vertical axis fitting line of honey pomelo;

[0021] 8) Determine the vertical diameter of the pomelo;

[0022] 9) Deformed fruit judgment: Calculate the angle θ between the vertical axis fitting line L and the vertical line of the honey pomelo. When the angle θ is greater than the preset threshold θ d When the current honey pomelo is a deformed fruit, the maximum horizontal and vertical diameters of the current honey pomelo are recorded as negative numbers; otherwise, they remain unchanged.

[0023] The step 4) is specifically as follows:

[0024] 4.1) Edge detection: Convert an original image I into a grayscale image G, then detect the edge contour of the grayscale image G to obtain a noisy edge contour image E′;

[0025] 4.2) Marking connected domains: Traverse each pixel of the noisy edge contour image E′. For any pixel, detect the connectivity between the remaining pixels and the pixel according to the 8-domain of the pixel. The areas that meet the 8-connectivity are marked as the same connected domain, and each connected domain is obtained;

[0026] 4.3) Finding the largest connected domain: traverse each connected domain, find the largest connected domain and save the largest connected domain as the edge contour image E;

[0027] 4.4) Coordinate space transformation: Perform coordinate space transformation on each pixel point of the edge contour image E to obtain the edge contour image F after coordinate transformation; for any pixel point (x, y) in the edge contour image E, rotate around the rotation axis of the rotating platform to obtain the three-dimensional space point coordinates (x w ,y w , z w ), coordinate transformation is performed using the following formula:

[0028] x w =x

[0029] y′=y-y0

[0030] y w=y′*cos(θ)-z*sin(θ)

[0031] z w =y′*sin(θ)+z*cos(θ)

[0032] Wherein, x represents the horizontal coordinate value of the pixel point (x, y), y represents the vertical coordinate value of the pixel point (x, y), y0 represents the vertical symmetry axis of the current edge contour image E, y′ represents the vertical coordinate value of the pixel point (x, y) before rotation, and θ represents the angle of rotation of the rotating placement platform when collecting the original image I corresponding to the current edge contour image E;

[0033] 4.5) Iteratively obtain the multi-view contour image: Repeat steps 4.1) to 4.4) for the remaining original images I to obtain the edge contour images F after coordinate transformation of all original images I, and combine all the edge contour images F after coordinate transformation to obtain the multi-view contour image P of honey pomelo.

[0034] The step 5) is specifically as follows:

[0035] In the interval [MinX w , MaxX w ] divide the pomelo multi-view contour map P into n equal parts, where MinX w represents the smallest X in the multi-view contour map P of honey pomelo W Axis coordinate value, MaxX w Indicates the largest X in the multi-view contour map P of honey pomelo W Axis coordinate values ​​are obtained, n-1 equally spaced sections of honey pomelo are obtained, and intersection points are generated between n-1 equally spaced sections of honey pomelo and the honey pomelo multi-view contour map P. The intersection points are generated between the same equally spaced sections of honey pomelo and the honey pomelo multi-view contour map P using the minimum circumscribed circle fitting, and n-1 equally spaced latitude lines of honey pomelo are obtained, and the honey pomelo multi-view latitude line contour map Q is obtained;

[0036] The step 7) is specifically as follows:

[0037] 7.1) For the i-th equally spaced latitude line l i , the center of the i-th equally spaced latitude line of pomelo is O i X W Coordinate value X Wi Calculated by the following formula:

[0038]

[0039] Wherein, floor represents the floor rounding function, (i=1, 2, ..., n-1);

[0040] 7.2) Repeat step 7.1) for n-1 equally spaced latitudes of honey pomelo to obtain the centers of n-1 equally spaced latitudes of honey pomelo, and obtain the honey pomelo longitudinal axis fitting line L by linear fitting.

[0041] The step 8) is specifically as follows:

[0042] 8.1) Average distance discrimination: In the multi-view latitude contour map Q of honey pomelo, calculate the vertical axis fitting line L of honey pomelo in the interval [MinX w , MaxX w ]; for any point P on the vertical axis fitting line L of honey pomelo i , find the point P i To the radius threshold r d The average distance between the points on the pomelo contour line within the range is recorded as point P i The average distance of the contour lines i , where the honey pomelo contour line is composed of the multi-perspective edge contour lines in the honey pomelo multi-perspective latitude contour map Q and the honey pomelo equally spaced latitude lines;

[0043] 8.2) Mark the vertical axis vertex and vertical axis bottom point: according to the set distance threshold P d After judging and marking the average distance of the contour lines of all points, the vertical axis vertex set and the vertical axis bottom point set are obtained, where the average distance of the contour lines of all points in the vertical axis vertex set and the vertical axis bottom point set is greater than zero and less than or equal to the distance threshold P d , and then select X from the vertical axis vertex set W The point with the largest axis coordinate value is taken as the vertical axis vertex, and the X axis is selected from the vertical axis bottom point set. W The point with the smallest axis coordinate value is taken as the bottom point of the vertical axis;

[0044] 8.3) Calculate the longitudinal diameter of the pomelo: Calculate the Euclidean distance between the top and bottom of the longitudinal axis and use it as the longitudinal diameter of the current pomelo.

[0045] The beneficial effects of the present invention are:

[0046] The present invention can avoid damage to the honey pomelo, saving time and effort; at the same time, the use of multi-view contour images can further solve the limitation that the vertical and horizontal diameters of the honey pomelo measured based on a single image are affected by the acquisition viewing angle, thereby providing more scientific and objective vertical and horizontal diameter fruit shape parameters for the external quality grading of the honey pomelo.

[0047] The invention obtains the horizontal diameter of the pomelo by performing equally spaced surface segmentation and equally spaced latitude fitting based on the pomelo contour map, and proposes a method for obtaining the vertical diameter of the pomelo by fitting the center of the equally spaced latitude and then determining it. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is the overall flow chart of the present invention.

[0049] Figure 2 It is a layout diagram of the image acquisition system of the present invention.

[0050] Figure 3 It is the original image of the present invention.

[0051] Figure 4 It is the noisy edge contour image of the present invention.

[0052] Figure 5 It is the edge contour image of the present invention.

[0053] Figure 6 It is a multi-viewing perspective outline diagram of the honey pomelo of the present invention.

[0054] Figure 7 It is a honey pomelo equally spaced latitude diagram of the present invention.

[0055] Figure 8 This is a schematic diagram of marking the vertical axis vertex and the vertical axis bottom point of the present invention.

[0056] In the figure: 1. Rotating storage platform, 2. Pomelo, 3. RGB camera, 4. Lighting box, 5. Data transmission line, 6. Host. DETAILED DESCRIPTION

[0057] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0058] The present invention selects citrus fruit pomelo as an example:

[0059] like Figure 1 As shown, the present invention comprises the following steps:

[0060] 1) If Figure 2 As shown, an image acquisition system is constructed: the image acquisition system includes a rotating storage platform 1, a honey pomelo 2, an RGB camera 3, a lighting box 4, a data transmission line 5 and a host 6;

[0061] The rotating storage platform 1, the honey pomelo 2 and the RGB camera 3 are all located in the illumination box 4. The honey pomelo 2 is placed on the rotating storage platform 1, and the honey pomelo 2 rotates with the uniform rotation of the rotating storage platform 1. The RGB camera 3 is placed on one side of the rotating storage platform 1 and the optical axis of the RGB camera 3 points to the honey pomelo 2. The RGB camera 3 is connected to the host 6 via a data transmission line 5;

[0062] 2) Establish the world coordinate system: Figure 2 As shown, the rotation center axis of the rotating storage platform 1 is used as the X coordinate system of the world coordinate system. W Axis, Z of the world coordinate system W The axis coincides with the optical axis of RGB camera 3 and points to RGB camera 3. The Y axis of the world coordinate system WThe axes are determined by a right-hand coordinate system;

[0063] 3) Image acquisition: The rotating storage platform 1 is rotated, and the RGB camera 3 collects multiple original images I of the current honey pomelo 2 at equal time intervals; in the specific implementation, for the currently placed honey pomelo 2, the rotation speed of the rotating storage platform 1 is controlled to be 5° / s, and the RGB camera 3 collects a color image every 1s, and the color image is recorded as the original image I, such as Figure 3 As shown;

[0064] 4) Acquisition of a multi-view contour map P of honey pomelo: edge detection, connected domain marking, maximum connected domain determination, and coordinate space conversion are performed on multiple original images I of the current honey pomelo 2 in sequence to obtain a multi-view contour map of honey pomelo;

[0065] Step 4) is specifically as follows:

[0066] 4.1) Edge detection: Convert an original image I into a grayscale image G, and then use the canny operator to detect the edge contour of the grayscale image G to obtain a noisy edge contour image E′, as shown in Figure 4 As shown;

[0067] 4.2) Marking connected domains: Traverse each pixel of the noisy edge contour image E′. For any pixel, detect the connectivity between the remaining pixels and the pixel according to the 8-domain of the pixel. The areas that meet the 8-connectivity are marked as the same connected domain, and each connected domain is obtained;

[0068] 4.3) Finding the largest connected domain: Traverse each connected domain, find the largest connected domain and save it as the edge contour image E, such as Figure 5 As shown; at the same time, each pixel point of the edge contour image E is traversed in turn, and its coordinates are correspondingly saved in the first array X and the second array Y;

[0069] 4.4) Coordinate space transformation: Perform coordinate space transformation on each pixel point of the edge contour image E to obtain the edge contour image F after coordinate transformation; for any pixel point (x, y) in the edge contour image E, where x∈X, y∈Y, rotate around the rotation axis of the rotating platform 1 to obtain the three-dimensional space point coordinates (x w ,y w , z w ), coordinate transformation is performed using the following formula:

[0070] x w =x

[0071] y′=y-y0

[0072] y w =y′*cos(θ)-z*sin(θ)

[0073] z w =y′*sin(θ)+z*cos(θ)

[0074] Wherein, (x, y) represents the pixel coordinates of any pixel point in the current edge contour image E, x represents the horizontal coordinate value of the pixel point (x, y), y represents the vertical coordinate value of the pixel point (x, y), y0 represents the vertical symmetry axis of the current edge contour image E, y′ represents the vertical coordinate value of the pixel point (x, y) before rotation (i.e., when the rotating placement platform 1 is in the initial state), θ represents the angle of rotation of the rotating placement platform 1 when the original image I corresponding to the current edge contour image E is collected, (x w ,y w , z w ) represents the coordinates of the pixel point (x, y) in three-dimensional space after rotation;

[0075] 4.5) Iteratively obtain multi-view contour images: Repeat steps 4.1) to 4.4) for the remaining original images I to obtain the edge contour images F after coordinate transformation of all original images I. In this embodiment, the collection of honey pomelo is set to continuously obtain 36 original images of the current honey pomelo. After combining all the edge contour images F after coordinate transformation, the honey pomelo multi-view contour image P is obtained, as shown in FIG. Figure 6 As shown;

[0076] 5) Obtaining equally spaced latitude lines: along X W The axis direction is in the interval [MinX w , MaxX w ] divide the pomelo multi-view contour map P into n equal parts, where MinX w represents the smallest X in the multi-view contour map P of honey pomelo W Axis coordinate value, MaxX w Indicates the largest X in the multi-view contour map P of honey pomelo W The axis coordinate value is obtained, and n-1 equally spaced sections of honey pomelo are obtained. The intersection points are generated between the n-1 equally spaced sections of honey pomelo and the honey pomelo multi-view contour map P. The intersection points are generated between the same equally spaced sections of honey pomelo and the honey pomelo multi-view contour map P by fitting the minimum circumscribed circle, and n-1 equally spaced latitudes of honey pomelo are obtained to obtain the honey pomelo multi-view latitude contour map Q. In this embodiment, the latitudes are evenly divided into 27, that is, n=28, as Figure 7 shown.

[0077] 6) Obtaining the horizontal diameter of the pomelo: traverse the n-1 equally spaced latitudes of the pomelo in the multi-view latitude contour map Q of the pomelo in sequence, calculate the diameter of each equally spaced latitude of the pomelo, and take the largest diameter as the maximum horizontal diameter of the current pomelo;

[0078] 7) Obtaining the vertical axis fitting line of honey pomelo:

[0079] Step 7) is specifically as follows:

[0080] 7.1) For the i-th equally spaced latitude line l i , the center coordinates of which are O i (X Wi , Y Wi , Z Wi ), the center of the i-th equally spaced latitude line of pomelo i X W Coordinate value X Wi Calculated by the following formula:

[0081]

[0082] Wherein, floor represents the rounding down function, (i=1,2,...,n-1);

[0083] 7.2) Repeat step 7.1) for n-1 equally spaced latitudes of honey pomelo to obtain the center of the n-1 equally spaced latitudes of honey pomelo, and obtain the honey pomelo longitudinal axis fitting line L by linear fitting;

[0084] 8) Determination of the vertical diameter of pomelo:

[0085] Step 8) is specifically as follows:

[0086] 8.1) Average distance discrimination: In the multi-view latitude contour map Q of pomelo, calculate the average distance between the vertical axis fitting line L of pomelo and the vertical axis fitting line L along the X axis. w The interval in the axis direction [MinX w , MaxX w ]; for any point P on the vertical axis fitting line L of honey pomelo i , find the point P i To the radius threshold r d The average distance between the points on the pomelo contour line within the range is recorded as point P i The average distance of the contour lines i , where the honey pomelo contour line is composed of the multi-perspective edge contour lines in the honey pomelo multi-perspective latitude contour map Q and the honey pomelo equally spaced latitude lines;

[0087] 8.2) Mark the vertical axis vertex and vertical axis bottom point: according to the set distance threshold P d After judging and marking the average distance of the contour lines of all points, the vertical axis vertex set and the vertical axis bottom point set are obtained, where the average distance of the contour lines of all points in the vertical axis vertex set and the vertical axis bottom point set is greater than zero and less than or equal to the distance threshold P d , and then select X from the vertical axis vertex set W The point with the largest axis coordinate value is taken as the vertical axis vertex, and the X axis is selected from the vertical axis bottom point set. W The point with the smallest axis coordinate value is taken as the bottom point of the vertical axis; if Mean i =0, indicating point Pi Close to the center of the pomelo (such as point P1) or far away from the outline of the pomelo (such as point P2), there is no outline of the pomelo near this point, so P is not marked. i ;If Meand i >P d , which indicates point P i If it is close to the outline of the pomelo (such as point P3), point P is not marked. i ;If 0<Meand i ≤P d , then save the smallest Meand i The corresponding P i Point means that the point is located on the surface of the pomelo contour line (such as point P4), and two points are marked: the vertical axis vertex and the vertical axis bottom point; the schematic diagram is as follows Figure 8 As shown;

[0088] 8.3) Calculate the longitudinal diameter of the honey pomelo: calculate the Euclidean distance between the vertex and the bottom of the longitudinal axis and use it as the longitudinal diameter of the current honey pomelo;

[0089] 9) Deformed fruit judgment: Calculate the angle θ between the vertical axis fitting line L and the vertical line of the honey pomelo. When the angle θ is greater than the preset threshold θ d When the current honey pomelo is a deformed fruit, the maximum horizontal and vertical diameters of the current honey pomelo are recorded as negative numbers; otherwise, they remain unchanged.

Claims

1. A method for measuring the longitudinal and transverse diameters of honey pomelo based on multi-view contour image reconstruction, characterized in that: The following steps are involved: 1) Building an image acquisition system: The image acquisition system includes a rotating 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 rotating storage platform (1), the honey pomelo (2) and the RGB camera (3) are all located in the illumination box (4). The honey pomelo (2) is placed on the rotating storage platform (1). The honey pomelo (2) rotates along with the uniform rotation of the rotating storage platform (1). The RGB camera (3) is placed on one side of the rotating storage platform (1) and the optical axis of the RGB camera (3) points to the honey pomelo (2). The RGB camera (3) is connected to the host (6) via a data transmission line (5); 2) Establish the world coordinate system: Take the rotation center axis of the rotating platform (1) as the X coordinate system of the world coordinate system. W Axis, Z of the world coordinate system W The axis coincides with the optical axis of the RGB camera (3) and points to the RGB camera (3). The Y axis of the world coordinate system W The axes are determined by a right-hand coordinate system; 3) Image acquisition: the rotating storage platform (1) is rotated, and the RGB camera (3) acquires a plurality of original images I of the current honey pomelo (2) at equal time intervals; 4) Obtaining a multi-view contour image P of honey pomelo: performing edge detection, connecting domain marking, maximum connecting domain determination, and coordinate space conversion on multiple original images I of the current honey pomelo (2) in turn to obtain a multi-view contour image of honey pomelo; 5) Obtaining equally spaced latitude lines of honey pomelo; 6) Obtaining the transverse diameter of the pomelo: traverse n-1 equally spaced latitudes of the pomelo in sequence, calculate the diameter of each equally spaced latitude of the pomelo, and take the largest diameter as the maximum transverse diameter of the current pomelo; 7) Obtaining the vertical axis fitting line of honey pomelo; 8) Determine the vertical diameter of the pomelo; 9) Deformed fruit judgment: Calculate the angle θ between the vertical axis fitting line L and the vertical line of the honey pomelo. When the angle θ is greater than the preset threshold θ d When the current honey pomelo is a deformed fruit, the maximum horizontal and vertical diameters of the current honey pomelo are recorded as negative numbers; otherwise, they remain unchanged.

2. According to claim 1, a method for measuring the vertical and horizontal diameters of honey pomelo based on multi-view contour image reconstruction is characterized in that: The step 4) is specifically as follows: 4.1) Edge detection: Convert an original image I into a grayscale image G, then detect the edge contour of the grayscale image G to obtain a noisy edge contour image E′; 4.2) Marking connected domains: Traverse each pixel of the noisy edge contour image E′. For any pixel, detect the connectivity between the remaining pixels and the pixel according to the 8-domain of the pixel. The areas that meet the 8-connectivity are marked as the same connected domain, and each connected domain is obtained; 4.3) Finding the largest connected domain: traverse each connected domain, find the largest connected domain and save the largest connected domain as the edge contour image E; 4.4) Coordinate space conversion: coordinate space conversion is performed on each pixel point of the edge contour image E to obtain the edge contour image F after coordinate conversion; for any pixel point (x, y) in the edge contour image E, the three-dimensional space point coordinates (x, y) of the pixel point are obtained by rotating around the rotation axis of the rotating platform (1) w ,y w , z w ), coordinate transformation is performed using the following formula: x w =x y′=y-y0 and w =y′*cos(θ)-z*sin(θ) With w =y′*sin(θ)+z*cos(θ) Wherein, x represents the horizontal coordinate value of the pixel point (x, y), y represents the vertical coordinate value of the pixel point (x, y), y0 represents the vertical symmetry axis of the current edge contour image E, y′ represents the vertical coordinate value of the pixel point (x, y) before rotation, and θ represents the angle of rotation of the rotating placement platform (1) when acquiring the original image I corresponding to the current edge contour image E; 4.5) Iteratively obtain the multi-view contour image: Repeat steps 4.1) to 4.4) for the remaining original images I to obtain the edge contour images F after coordinate transformation of all original images I, and combine all the edge contour images F after coordinate transformation to obtain the multi-view contour image P of honey pomelo.

3. The method for measuring the longitudinal and transverse diameters of honey pomelo based on multi-view contour image reconstruction according to claim 1, characterized in that: The step 5) is specifically as follows: In the interval [MinX w , MaxX w ] divide the pomelo multi-view contour map P into n equal parts, where MinX w represents the smallest X in the multi-view contour map P of honey pomelo W Axis coordinate value, MaxX w Indicates the largest X in the multi-view contour map P of honey pomelo W Axis coordinate values ​​are obtained, n-1 equally spaced sections of honey pomelo are obtained, and intersection points are generated between n-1 equally spaced sections of honey pomelo and the honey pomelo multi-view contour map P. The intersection points are generated between the same equally spaced sections of honey pomelo and the honey pomelo multi-view contour map P using the minimum circumscribed circle fitting, and n-1 equally spaced latitude lines of honey pomelo are obtained, and the honey pomelo multi-view latitude line contour map Q is obtained; 4. The method for measuring the longitudinal and transverse diameters of honey pomelo based on multi-view contour image reconstruction according to claim 1, characterized in that: The step 7) is specifically as follows: 7.1) For the i-th equally spaced latitude line l i , the center of the i-th equally spaced latitude line of pomelo is O i X W Coordinate value X Wi Calculated by the following formula: Wherein, floor represents the floor rounding function, (i=1, 2, ..., n-1); 7.2) Repeat step 7.1) for n-1 equally spaced latitudes of honey pomelo to obtain the centers of n-1 equally spaced latitudes of honey pomelo, and obtain the honey pomelo longitudinal axis fitting line L by linear fitting.

5. The method for measuring the longitudinal and transverse diameters of honey pomelo based on multi-view contour image reconstruction according to claim 1, characterized in that: The step 8) is specifically as follows: 8.1) Average distance discrimination: In the multi-view latitude contour map Q of honey pomelo, calculate the vertical axis fitting line L of honey pomelo in the interval [MinX w , MaxX w ]; for any point P on the vertical axis fitting line L of honey pomelo i , find the point P i To the radius threshold r d The average distance between the points on the pomelo contour line within the range is recorded as point P i The average distance of the contour lines i , where the honey pomelo contour line is composed of the multi-perspective edge contour lines in the honey pomelo multi-perspective latitude contour map Q and the honey pomelo equally spaced latitude lines; 8.2) Mark the vertical axis vertex and vertical axis bottom point: according to the set distance threshold P d After judging and marking the average distance of the contour lines of all points, the vertical axis vertex set and the vertical axis bottom point set are obtained, where the average distance of the contour lines of all points in the vertical axis vertex set and the vertical axis bottom point set is greater than zero and less than or equal to the distance threshold P d , and then select X from the vertical axis vertex set W The point with the largest axis coordinate value is taken as the vertical axis vertex, and the X axis is selected from the vertical axis bottom point set. W The point with the smallest axis coordinate value is taken as the bottom point of the vertical axis; 8.3) Calculate the longitudinal diameter of the pomelo: Calculate the Euclidean distance between the top and bottom of the longitudinal axis and use it as the longitudinal diameter of the current pomelo.

Citation Information

Patent Citations

  • Profile-image-based potato three-dimensional modeling method

    CN108053485A

  • Honey pomelo longitudinal section and transverse section peel thickness measuring method based on image processing

    CN113763266A