CN110751687A - Apple size grading method based on computer vision minimum and maximum circles - Google Patents

Apple size grading method based on computer vision minimum and maximum circles Download PDF

Info

Publication number
CN110751687A
CN110751687A CN201910873279.7A CN201910873279A CN110751687A CN 110751687 A CN110751687 A CN 110751687A CN 201910873279 A CN201910873279 A CN 201910873279A CN 110751687 A CN110751687 A CN 110751687A
Authority
CN
China
Prior art keywords
apple
diameter
circle
minimum
maximum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910873279.7A
Other languages
Chinese (zh)
Other versions
CN110751687B (en
Inventor
房胜
张琛
李哲
郑继业
沈宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University of Science and Technology
Original Assignee
Shandong University of Science and Technology
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 Shandong University of Science and Technology filed Critical Shandong University of Science and Technology
Priority to CN201910873279.7A priority Critical patent/CN110751687B/en
Publication of CN110751687A publication Critical patent/CN110751687A/en
Application granted granted Critical
Publication of CN110751687B publication Critical patent/CN110751687B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses an apple size grading method based on a computer vision minimum maximum circle, and particularly relates to the field of apple grading based on image processing. Before the maximum diameter and the minimum diameter of the apple are solved, profile information is obtained by local self-adaptive threshold segmentation and edge extraction, then a noise profile is deleted, and the cross section profile of the apple is reserved; the principle of a minimum circumcircle is utilized when the maximum diameter of the cross section of the apple is solved, and the principle of a maximum inscribed circle is utilized when the minimum diameter is solved; after the ratio of the maximum diameter to the minimum diameter is obtained, whether the maximum diameter can represent the size of the apple is judged, and the maximum diameter which cannot accurately represent the size of the apple is represented by the diameter of the circle with the same area. The apple size grading method based on the minimum and maximum circles of computer vision provided by the invention can be used for grading according to the national standard and simultaneously considering the actual size of the apple, has objectivity, and provides reference for subsequent abundant grading methods.

Description

Apple size grading method based on computer vision minimum and maximum circles
Technical Field
The invention relates to the field of apple grading based on image processing, in particular to an apple size grading method based on a computer vision minimum maximum circle.
Background
Along with the improvement of the economy and consumption level of China, the fruit grading requirement is larger and larger, and meanwhile, the agricultural modernization also puts higher requirements on the grading method. The apple is the fruit with the largest planting area and the highest yield in China, and the apple classification has important significance for storage and sale of the apple. The indexes of apple grading are generally the size, color and defects of apples, and China is in a conversion stage from manual grading to mechanical grading on the grading indexes, wherein the size grading can be realized by grading the weight through mechanical equipment, but the color and defect grading is still mostly carried out manually at present. The automatic grading of colors and defects is difficult to realize by singly depending on mechanical equipment, but can be combined with an image processing technology, and meanwhile, the size grading can also be realized by the technology, and the three indexes simultaneously depend on the image processing technology to grade, so that the cost can be saved, the process can be reduced, and the possibility of fault occurrence of the grading equipment can be reduced.
The apple classification by utilizing the image has great application value and research prospect, and researchers also carry out research to a certain extent on the three indexes. The basis of size classification in the three indexes is the "maximum cross-sectional diameter" in the national standard, wherein the diameter can be understood as the average diameter or the maximum diameter, but the maximum diameter is generally defaulted in the actual classification process. At present, the apple size classification method is relatively simple, the classification error is large, for example, the most common minimum circumscribed rectangle method in documents, experiments prove that the minimum circumscribed rectangle method can obtain an accurate result when detecting the maximum diameter of a regular circle or ellipse, but because the apple is in an irregular approximate ellipse shape, errors of different levels exist when detecting the maximum diameter, and therefore, the method used under ideal conditions is not suitable for being used in the actual classification process. In the actual classification process, many problems occur, wherein the more general technical difficulty problems mainly include:
(1) illumination change: the apple is a non-planar object but is similar to a sphere, so that the brightness of the center and the periphery of the apple is different under the same light source condition, and the detection effect is influenced; the light source or environment settings are not consistent under different grading conditions, and the general applicability of the same method or parameter is poor.
(2) The maximum cross section of the apple and the distance between the lens are changed: the apples of different sizes have different heights and are influenced by the imaging mode, the imaging of the cross sections of the same size on different heights is inconsistent, the cross sections close to the lens have larger areas on the collected images, the detection accuracy is influenced to a certain degree, and the closer the lens is to the apples, the larger the influence is.
(3) The problem of abnormal fruits is as follows: the shape of the apple can be similar to an ellipse, the length of a long axis is similar to that of a short axis in general, the maximum diameter can better reflect the size of the apple, but the long axis of some apples is obviously larger than the short axis, so that the apples with the larger maximum diameter are not necessarily larger than the apples with the smaller maximum diameter, and the maximum diameter cannot reflect the real size of the apples. Therefore, other methods are needed for size classification of apples with a large difference between the maximum diameter and the minimum diameter.
Among the above difficult problems, the special-shaped fruit problem is the most challenging, and the difficulty is firstly that the apple is not a regular ellipse, and the major axis and the minor axis are difficult to calculate by a conventional method; secondly, how to scientifically reflect the size of the apple under the condition of large difference of the long axis and the short axis.
The major axis is understood to be the maximum diameter of the apple and the minor axis is understood to be the minimum diameter of the apple. The current method for sizing the apple is limited to the maximum diameter of the apple, but the maximum diameter cannot accurately express the size of the heteropod. Therefore, designing a method which can not only accurately measure the maximum diameter, but also judge the size grade of the apple according to objective conditions is still a difficult problem.
Disclosure of Invention
The invention aims to solve the defects, and provides an apple size grading method which respectively obtains the maximum diameter and the minimum diameter of an apple by using the minimum circumscribed circle and the maximum inscribed circle, analyzes the regular degree of the shape of the apple by combining the actual condition of the apple, judges whether the size of the apple can be represented by the maximum diameter, and provides a diameter representation method of the apple which does not meet the conditions.
The invention specifically adopts the following technical scheme:
an apple size grading method based on computer vision minimum and maximum circles comprises the following steps:
step 1: inputting an image to be detected, and extracting the cross section of the apple and the outline of noise from the image;
step 2: calculating the maximum diameter on the preserved cross section profile of the apple by using a minimum circumcircle method;
and step 3: calculating the minimum diameter on the preserved cross section profile of the apple by using a maximum inscribed circle method;
and 4, step 4: the ratio of the minimum diameter to the maximum diameter is calculated, and the diameter of the apple is calculated by judging the calculation mode of the diameter of the apple according to the ratio;
and 5: the apples were sized according to apple diameter.
Preferably, the step 1 specifically comprises the following steps:
step 1.1: graying and filtering and denoising an image to be detected;
step 1.2: performing local self-adaptive threshold segmentation on the image, and extracting an apple cross section and a noise profile;
step 1.3: and traversing all the profiles, deleting the noise profile, and keeping the cross section profile of the apple.
Preferably, the step 2 specifically includes the following steps:
step 2.1: traversing all points of the cross section contour of the apple, determining four points on the upper, lower, left and right outermost sides, and solving the circle center and the radius of a minimum circle surrounding the four points;
step 2.2: traversing all points of the cross section contour of the apple, checking whether the points are outside the boundary of the circle obtained in the previous step, if the points are outside the boundary, performing the step 2.3, and if no points are outside the boundary, performing the step 2.4;
step 2.3: respectively combining the point which is farthest away from the circle center outside the boundary with the previous four points, wherein each combination still has four points, respectively determining a minimum circle which surrounds the four points in the combination by each combination, judging whether the point outside the combination is in the circle, if not, continuously solving a minimum circumscribed circle determined by the next combination, and if so, performing the step 2.2 on the basis of the circle determined by the four points in the combination;
step 2.4: the diameter of the circle is the diameter of the minimum circumscribed circle of the outline of the apple, namely the maximum diameter of the apple.
Preferably, the step 3 specifically includes the following steps:
step 3.1: determining the circle center traversal range of the maximum inscribed circle, and taking points at equal distances on the outline of the cross section of the apple as a new outline;
step 3.2: initializing the diameter of the maximum inscribed circle to be 0, traversing the points in the range, and if the minimum distance from the current point to the cross section outline of the apple is greater than the recorded diameter of the maximum inscribed circle, determining the point to be the center of the new maximum inscribed circle, wherein the minimum distance is the diameter of the maximum inscribed circle;
step 3.3: the minimum diameter of the apple is the maximum diameter of the inscribed circle of the cross section profile of the apple.
Preferably, the step 4 specifically includes the following steps:
step 4.1: the ratio of the minimum diameter to the maximum diameter of the apple is calculated, if the ratio is not less than a threshold value, the step 4.2 is carried out, and if the ratio is less than the threshold value, the step 4.3 is carried out;
step 4.2: the measured diameter of the apple is the maximum diameter of the apple;
step 4.3: and (4) calculating the area of the area surrounded by the outline of the apple, and calculating the diameter of the circle with the equal area, wherein the diameter of the measured apple is the diameter of the circle with the equal area.
The invention has the following beneficial effects:
the method is based on the angle of analyzing the maximum diameter and the minimum diameter of an apple image, the maximum diameter and the minimum diameter of an apple are respectively solved by using a minimum circumscribed circle and a maximum inscribed circle, the regular degree of the shape of the apple is analyzed by combining the actual condition of the apple, whether the size of the apple can be represented by the maximum diameter or not is judged, and a diameter representation method of the apple which does not meet the condition is given;
according to the method, the size of the apples with regular shapes is classified according to the maximum diameter method which is defaulted in the market, the diameter of the equal-area circle of the apple image is used as the classification basis for the apples with the shapes which do not meet the requirements, the actual size of the apples can be reflected more objectively by combining the two methods, the market requirements can be better met, and reference is provided for enriching the classification method according to the actual situation.
Drawings
FIG. 1 is a block flow diagram of the present method;
FIG. 2a is a gray scale image of an apple;
FIG. 2b is a graph of the result of local adaptive threshold segmentation of an apple gray scale map;
FIG. 3a is a cross-sectional view of an apple;
FIG. 3b is an extracted view of the cross-sectional profile of an apple;
FIG. 4a is a schematic view of a minimum circumscribed circle simulating a full apple shape;
FIG. 4b is a schematic view of the minimum circumscribed circle of a fuller apple shape
FIG. 4c is a schematic view of a minimum circumscribed circle simulating the oblate shape of an apple
FIG. 5 is a schematic view of the cross-section of an apple with a minimum circumscribed circle;
FIG. 6 is a schematic view of a maximum inscribed circle simulating an apple shape;
fig. 7 is a schematic view of the largest inscribed circle of the cross section of an apple.
Detailed Description
The following description of the embodiments of the present invention will be made with reference to the accompanying drawings:
as shown in fig. 1, the apple size classification method based on the minimum and maximum circles of computer vision, based on the step 1, includes the following specific steps:
step 1.1: graying and filtering and denoising an image to be detected;
step 1.2: performing local self-adaptive threshold segmentation on the image, and extracting an apple cross section and a noise profile;
step 1.3: and traversing all the profiles, deleting the noise profile, and keeping the cross section profile of the apple.
In mathematical sense, the minimum circumscribed circle diameter and the maximum inscribed circle diameter can represent the maximum diameter and the minimum diameter of an apple, and the minimum circumscribed circle and the maximum inscribed circle are calculated according to the outline of the apple, so that the preprocessing aims at extracting the outline of the cross section of the apple.
In the apple grading process, the light reflectivity is reduced from the center to the periphery under the influence of the shape of the apple, and in order to ensure that the method has better adaptability, a local self-adaptive Gaussian segmentation method which is less influenced by illumination change is adopted. Firstly, graying an image to be detected as shown in fig. 2a, removing noise by using median filtering, and then adopting local adaptive Gaussian segmentation. The local adaptive Gaussian partition sets a processing window as a rectangular moving window, sets r as the radius of the processing window, (x, y) as pixel coordinates, I (x, y) as input pixel values, mu shown in formula (1) as a pixel mean value in the window, and sigma shown in formula (2)2In order to obtain the variance of pixels in the window, T in equation (3) is a local threshold after segmentation in the window, K is a constant greater than 0, and g (x, y) in equation (4) is a pixel value after segmentation.
Figure BDA0002203505620000041
Figure BDA0002203505620000042
T=μ+K×σ (3)
Figure BDA0002203505620000043
The apple profile shown in fig. 2b can be obtained by dividing the formula (4), but the profile is a thick profile, noise exists inside and outside the profile, an accurate profile needs to be extracted when the diameter of the circumcircle inscribed circle is obtained, and the inner layer profile of the thick profile can be used for calculating the maximum and minimum diameter of the cross section through experiments.
The outline information is extracted by an edge extraction method, and then the outer outline of the rough outline and the interference of the internal and external noises of the apple need to be eliminated. The size of the outline is recorded in the process of extracting the outline information, at this time, the outline is traversed, and the maximum outline and the outline with the size lower than the threshold value are deleted, as shown in fig. 3a and 3b, the maximum outline and the outline with the size lower than the threshold value are reserved cross-section outlines of the apples.
Based on the step 2, the maximum diameter of the preserved apple cross section profile is obtained by a minimum circumcircle method, and the maximum diameter of the apple can be obtained after the apple profile is obtained. 4a, 4b, 4c, the solid line represents the simulated apple shape, the dashed line represents the solid line shape minimum circumscribed circle, and r is the minimum circumscribed circle radius. The maximum diameter of the cross section of the apple can be known by combining mathematical knowledge to be equal to the diameter of the minimum circumcircle of the cross section, so that the maximum diameter is obtained according to the principle of the minimum circumcircle. The obtaining of the maximum diameter needs to be realized by iteratively solving a circumscribed circle, and specifically comprises the following steps:
step 2.1: traversing all points of the cross section contour of the apple, determining four points on the upper, lower, left and right outermost sides, and solving the circle center and the radius of a minimum circle surrounding the four points;
① because four points are not collinear, a maximum triangle can be determined from the four points, i.e. when the four points are not collinear, the problem of finding the minimum circumcircle of the triangle can be solved, and it is assumed that the three vertexes of the triangle are respectively A (x)1,y1),B(x2,y2),C(x3,y3),A1、A2、B1、B2、C1、C2And a, b, c and p are intermediate variables set by the simplified formula, x in the coordinates (x, y) of the center O is obtained by the formula (5), y is obtained by the formula (6), and the radius R is obtained by the formula (7):
let A1=2*(x2-x1);B1=2*(y2-y1);C1=x2 2+y2 2-x1 2-y1 2
A2=2*(x3-x2);B2=2*(y3-y2);C2=x3 2+y3 2-x2 2-y2 2
Then
Figure BDA0002203505620000051
Figure BDA0002203505620000052
Order to
Figure BDA0002203505620000053
Figure BDA0002203505620000054
Then
Figure BDA0002203505620000055
② again go through all points of the contour to check if any are outside the boundaries of the circle found in the previous step, i.e. the distance from the center of the contour is larger than the radius R.
③ if no point is outside the boundary, the circle is the minimum circumscribed circle of the cross section and the diameter is the maximum diameter of the cross section, if some point is outside the boundary, the point E outside the boundary farthest from the center of the circle is combined with the previous four points A, B, C, D respectively, each combination is 4 points containing the point E, the minimum circle surrounding 4 points is determined by the point combination ABCE, whether the point D outside the combination is in the circle is determined, if not, the minimum circle determined by the ACDE combination is solved continuously, whether the point B outside the combination is in the circle is determined, the process is repeated until the point outside a certain combination is in the minimum circumscribed circle determined by the combination, the circle is the new minimum circumscribed circle of the cross section, the next solution is continued by the new point combination, ②③ is repeated until no point is outside the boundary, and the minimum circumscribed circle of the cross section of the apple shown in figure 5 is obtained, and the diameter is the maximum diameter of the measured apple.
In the aspect of solving the minimum diameter of the apple, the invention utilizes the principle of the maximum inscribed circle. As shown in FIG. 6, is composed ofIn the case of an apple cross section, this is not a polygon in the usual sense, so that the maximum inscribed circle here is also not an inscribed circle in the conventional sense, but only the maximum circle inside the cross section of the apple, where r is1To simulate the maximum radius of the fruit shape, r2The radius of the largest inscribed circle.
According to the invention, the maximum inscribed circle of the cross section of the apple is solved by traversing the circle center, so that the possible area of the circle center of the maximum inscribed circle is determined, and the efficiency of solving the maximum inscribed circle is improved. The maximum diameter of the special-shaped fruit can be obviously larger than the minimum diameter, but the proportion of the maximum diameter and the minimum diameter can be limited within a certain range, a proportion coefficient is obtained by utilizing the limit of the range, the product of the maximum diameter and the proportion coefficient is used as the size of a structural element B, and then the structural element B is used for corroding the cross section A of the apple as a formula (8) so as to eliminate the region where the center of a circle cannot exist, wherein a is a point in the region, B is a point in the region, and B is a formulaaFor translation of the structuring element B with respect to the point a
Figure BDA0002203505620000061
In order to continue to reduce the amount of computation, points are taken equidistant from the cross-sectional profile as profile points for finding the largest inscribed circle.
After the circle center traversal range and the contour are determined, initializing the maximum inscribed circle radius, traversing the points in the range, and if the minimum distance from the current point to the contour is greater than the recorded maximum inscribed circle radius, the point is the new maximum inscribed circle center, the minimum distance is the maximum inscribed circle radius, namely the minimum radius of the measured apple, and the maximum inscribed circle is shown in fig. 7.
Finding the ratio of the minimum diameter to the maximum diameter, as shown in formula (9), determining the diameter d of the apple according to a judgment threshold T, wherein d is1Minimum circumscribed circle diameter, d2Is the diameter of a circle with the same area as the cross section of the apple
Figure BDA0002203505620000062
(1) If the ratio is not less than the judgment threshold, the maximum diameter is significant and can represent the diameter of the apple;
(2) if the ratio is smaller than the judgment threshold, the maximum diameter cannot represent the size of the apple, the area of the cross section needs to be calculated, and the diameter of the circle with the same area is calculated to be used as a grading basis of the apple to be detected.
Step 2.2: and traversing all points of the cross section contour of the apple, checking whether the points are outside the boundary of the circle obtained in the previous step, if the points are outside the boundary, performing the step 2.3, and if no point is outside the boundary, performing the step 2.4.
Step 2.3: and (3) respectively combining the point which is farthest away from the circle center outside the boundary with the previous four points, wherein each combination still has four points, determining a minimum circle which surrounds the four points in the combination by each combination, judging whether the point outside the combination is in the circle, if not, continuously solving a minimum circumscribed circle determined by the next combination, and if so, performing the step 2.2 on the basis of the circle determined by the four points in the combination.
Step 2.4: the diameter of the circle is the diameter of the minimum circumscribed circle of the outline of the apple, namely the maximum diameter of the apple.
Based on the step 3, the method comprises the following specific steps when the minimum diameter is obtained on the reserved cross section profile of the apple by using the maximum inscribed circle method:
step 3.1: determining the circle center traversal range of the maximum inscribed circle, and taking points at equal distances on the outline of the cross section of the apple as a new outline;
step 3.2: initializing the diameter of the maximum inscribed circle to be 0, traversing the points in the range, and if the minimum distance from the current point to the cross section outline of the apple is greater than the recorded diameter of the maximum inscribed circle, determining the point to be the center of the new maximum inscribed circle, wherein the minimum distance is the diameter of the maximum inscribed circle;
step 3.3: the minimum diameter of the apple is the maximum diameter of the inscribed circle of the cross section profile of the apple.
Based on the above step 4, when the ratio of the minimum diameter to the maximum diameter is obtained, the calculation method of judging the diameter of the apple according to the ratio to obtain the diameter of the apple comprises the following specific steps:
step 4.1: the ratio of the minimum diameter to the maximum diameter of the apple is calculated, if the ratio is not less than a threshold value, the step 4.2 is carried out, and if the ratio is less than the threshold value, the step 4.3 is carried out;
step 4.2: the measured diameter of the apple is the maximum diameter of the apple;
step 4.3: calculating the area of the area surrounded by the outline of the apple, and calculating the diameter of the circle with the same area, wherein the diameter of the measured apple is the diameter of the circle with the same area;
and 5: the apples were sized according to apple diameter.
It is to be understood that the above description is not intended to limit the present invention, and the present invention is not limited to the above examples, and those skilled in the art may make modifications, alterations, additions or substitutions within the spirit and scope of the present invention.

Claims (5)

1. An apple size grading method based on computer vision minimum and maximum circles is characterized by comprising the following steps:
step 1: inputting an image to be detected, and extracting the cross section of the apple and the outline of noise from the image;
step 2: calculating the maximum diameter on the preserved cross section profile of the apple by using a minimum circumcircle method;
and step 3: calculating the minimum diameter on the preserved cross section profile of the apple by using a maximum inscribed circle method;
and 4, step 4: the ratio of the minimum diameter to the maximum diameter is calculated, and the diameter of the apple is calculated by judging the calculation mode of the diameter of the apple according to the ratio;
and 5: the apples were sized according to apple diameter.
2. The apple size grading method based on the computer vision minimum maximum circle as claimed in claim 1, wherein the step 1 comprises the following steps:
step 1.1: graying and filtering and denoising an image to be detected;
step 1.2: performing local self-adaptive threshold segmentation on the image, and extracting an apple cross section and a noise profile;
step 1.3: and traversing all the profiles, deleting the noise profile, and keeping the cross section profile of the apple.
3. The apple size grading method based on the computer vision minimum maximum circle as claimed in claim 1, wherein the step 2 comprises the following steps:
step 2.1: traversing all points of the cross section contour of the apple, determining four points on the upper, lower, left and right outermost sides, and solving the circle center and the radius of a minimum circle surrounding the four points;
step 2.2: traversing all points of the cross section contour of the apple, checking whether the points are outside the boundary of the circle obtained in the previous step, if the points are outside the boundary, performing the step 2.3, and if no points are outside the boundary, performing the step 2.4;
step 2.3: respectively combining the point which is farthest away from the circle center outside the boundary with the previous four points, wherein each combination still has four points, respectively determining a minimum circle which surrounds the four points in the combination by each combination, judging whether the point outside the combination is in the circle, if not, continuously solving a minimum circumscribed circle determined by the next combination, and if so, performing the step 2.2 on the basis of the circle determined by the four points in the combination;
step 2.4: the diameter of the circle is the diameter of the minimum circumscribed circle of the outline of the apple, namely the maximum diameter of the apple.
4. The apple size grading method based on the computer vision minimum maximum circle as claimed in claim 1, wherein the step 3 comprises the following steps:
step 3.1: determining the circle center traversal range of the maximum inscribed circle, and taking points at equal distances on the outline of the cross section of the apple as a new outline;
step 3.2: initializing the diameter of the maximum inscribed circle to be 0, traversing the points in the range, and if the minimum distance from the current point to the cross section outline of the apple is greater than the recorded diameter of the maximum inscribed circle, determining the point to be the center of the new maximum inscribed circle, wherein the minimum distance is the diameter of the maximum inscribed circle;
step 3.3: the minimum diameter of the apple is the maximum diameter of the inscribed circle of the cross section profile of the apple.
5. The apple size grading method based on the computer vision minimum maximum circle as claimed in claim 1, wherein the step 4 comprises the following steps:
step 4.1: the ratio of the minimum diameter to the maximum diameter of the apple is calculated, if the ratio is not less than a threshold value, the step 4.2 is carried out, and if the ratio is less than the threshold value, the step 4.3 is carried out;
step 4.2: the measured diameter of the apple is the maximum diameter of the apple;
step 4.3: and (4) calculating the area of the area surrounded by the outline of the apple, and calculating the diameter of the circle with the equal area, wherein the diameter of the measured apple is the diameter of the circle with the equal area.
CN201910873279.7A 2019-09-17 2019-09-17 Apple size grading method based on computer vision minimum and maximum circle Active CN110751687B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910873279.7A CN110751687B (en) 2019-09-17 2019-09-17 Apple size grading method based on computer vision minimum and maximum circle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910873279.7A CN110751687B (en) 2019-09-17 2019-09-17 Apple size grading method based on computer vision minimum and maximum circle

Publications (2)

Publication Number Publication Date
CN110751687A true CN110751687A (en) 2020-02-04
CN110751687B CN110751687B (en) 2023-05-26

Family

ID=69276536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910873279.7A Active CN110751687B (en) 2019-09-17 2019-09-17 Apple size grading method based on computer vision minimum and maximum circle

Country Status (1)

Country Link
CN (1) CN110751687B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112053395A (en) * 2020-08-31 2020-12-08 华中科技大学 Machine vision-based mushroom shape and size detection method
CN115170476A (en) * 2022-06-08 2022-10-11 郑州卓润电子科技有限公司 Printed circuit board defect detection method based on image processing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101153851A (en) * 2007-06-15 2008-04-02 中国农业大学 Apple detection classification method based on machine vision
CN101620060A (en) * 2009-08-13 2010-01-06 上海交通大学 Automatic detection method of particle size distribution
CN203484349U (en) * 2013-08-06 2014-03-19 中国包装和食品机械有限公司 Root material length grader
CN108876773A (en) * 2018-06-06 2018-11-23 杭州电子科技大学 LED glass lamp cup aperture online test method based on machine vision
CN109871900A (en) * 2019-03-06 2019-06-11 哈尔滨理工大学 The recognition positioning method of apple under a kind of complex background based on image procossing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101153851A (en) * 2007-06-15 2008-04-02 中国农业大学 Apple detection classification method based on machine vision
CN101620060A (en) * 2009-08-13 2010-01-06 上海交通大学 Automatic detection method of particle size distribution
CN203484349U (en) * 2013-08-06 2014-03-19 中国包装和食品机械有限公司 Root material length grader
CN108876773A (en) * 2018-06-06 2018-11-23 杭州电子科技大学 LED glass lamp cup aperture online test method based on machine vision
CN109871900A (en) * 2019-03-06 2019-06-11 哈尔滨理工大学 The recognition positioning method of apple under a kind of complex background based on image procossing

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘新庭等: "基于最小外接圆直径的苹果分级研究" *
卢丹;王丽丽;郑纪业;陈振学;林英杰;王风云;: "基于图像处理的双孢蘑菇分级方法研究" *
杨习文: "基于机器视觉的苹果尺寸分级技术研究" *
骆伟;: "基于计算机视觉的纽荷尔脐橙图像形状识别方法研究" *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112053395A (en) * 2020-08-31 2020-12-08 华中科技大学 Machine vision-based mushroom shape and size detection method
CN115170476A (en) * 2022-06-08 2022-10-11 郑州卓润电子科技有限公司 Printed circuit board defect detection method based on image processing

Also Published As

Publication number Publication date
CN110751687B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
CN116721106B (en) Profile flaw visual detection method based on image processing
CN110097034B (en) Intelligent face health degree identification and evaluation method
CN110349126B (en) Convolutional neural network-based marked steel plate surface defect detection method
CN113450307B (en) Product edge defect detection method
CN111310558B (en) Intelligent pavement disease extraction method based on deep learning and image processing method
CN114842017B (en) HDMI cable surface quality detection method and system
CN111862064B (en) Silver wire surface flaw identification method based on deep learning
CN117078672B (en) Intelligent detection method for mobile phone screen defects based on computer vision
CN115239704B (en) Accurate detection and repair method for wood surface defects
CN112651968B (en) Wood board deformation and pit detection method based on depth information
CN115797354B (en) Method for detecting appearance defects of laser welding seam
CN112862744B (en) Intelligent detection method for internal defects of capacitor based on ultrasonic image
CN110136130A (en) A kind of method and device of testing product defect
CN115082451B (en) Stainless steel soup ladle defect detection method based on image processing
CN111160451A (en) Flexible material detection method and storage medium thereof
CN114820625B (en) Automobile top block defect detection method
CN114926407A (en) Steel surface defect detection system based on deep learning
CN113435460A (en) Method for identifying brilliant particle limestone image
CN114549441A (en) Sucker defect detection method based on image processing
CN111161237A (en) Fruit and vegetable surface quality detection method, storage medium and sorting device thereof
CN114723709A (en) Tunnel disease detection method and device and electronic equipment
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN110751687B (en) Apple size grading method based on computer vision minimum and maximum circle
CN111325738A (en) Intelligent detection method and system for peripheral cracks of transverse hole
CN107610119A (en) The accurate detection method of steel strip surface defect decomposed based on histogram

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