A machine vision-based areca nut slicing trajectory calculation method

By using a machine vision-based method for calculating the trajectory of areca nut slices, the problem of inaccurate positioning in the areca nut slicing process was solved, enabling rapid, accurate, and efficient production of areca nut slices. This method is suitable for automated production in the areca nut slicing process.

CN115641351BActive Publication Date: 2026-01-02HUNAN UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211327483.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2026-01-02
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

The existing areca nut slicing process suffers from low production efficiency, poor slice quality, and inaccurate positioning. In particular, mechanical positioning methods cannot adapt to individual differences in areca nuts, leading to frequent instances of off-cut or missed slices.

Method used

A method for identifying areca nuts using a machine vision-based groove trajectory algorithm is proposed, which includes original image acquisition, image preprocessing, threshold segmentation, contour recognition, and slice trajectory calculation. The major axis, minor axis, perimeter, and area of ​​the areca nut are obtained through image recognition algorithm, and the final slice trajectory is determined by combining weighted scoring rules.

Benefits of technology

It enables rapid, accurate, and non-destructive positioning of areca nut slices, improving slice quality and production efficiency, adapting to the needs of different factories, and meeting the real-time slicing requirements of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115641351B_ABST
    Figure CN115641351B_ABST
Patent Text Reader

Abstract

The application provides a kind of based on machine vision's areca nut slice trajectory calculation method, it is related to areca nut processing technical field, the method includes the following steps: original image acquisition;Filtering denoising, color space conversion and channel separation in image preprocessing;Threshold segmentation obtains binary image and carries out filling connected domain;Contour recognition carries out edge detection to areca nut image to identify the characteristic parameters such as long axis, short axis, perimeter, area, minimum circumscribed rectangle of areca nut;Slice trajectory calculation uses slice trajectory calculation method based on back height value and notch length value to obtain areca nut trajectory parameter set, finally, according to weight algorithm, the optimal slice trajectory line of areca nut is comprehensively evaluated.According to the areca nut slice trajectory calculation method based on machine vision provided in the application, the purpose is to overcome the problem that mechanical positioning cannot be accurately positioned to the optimal slice trajectory line during the areca nut slicing process, improve the areca nut slicing quality, and meet the real-time slicing requirements of the production line.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of betel nut processing, and particularly relates to a betel nut slicing track calculation method based on machine vision. BACKGROUND

[0002] Betel nut slicing is an important process in the processing of food betel nuts, and its technology directly affects the shape and quality of finished edible betel nuts. At present, the manual handheld knife cutting method is still mainly used in the betel nut slicing process, which has low production efficiency and is time-consuming and labor-intensive. Some enterprises have adopted mechanical slicing, but due to the individual differences of betel nuts, it is difficult to find the central cutting surface of the betel nuts, which affects the taste, sensory, sales and other aspects of the betel nuts, and seriously restricts the further development of the betel nut industry.

[0003] For example, the invention with the announcement number CN104772777A discloses a full-automatic betel nut equal slicing machine, which mainly discloses that the vibration disc surface is controlled by a PLC system to vibrate and drop the seeds, a U-shaped positioning groove is used to position the betel nuts, and the inner tapered hole is used to support the two ends of the betel nuts, so that the betel nuts are relatively moved with the slicing blade to perform the slicing action. In this method, a mechanical positioning method is used for the betel nuts, and the slicing blade cannot be flexibly adjusted to the optimal slicing line relative to the positioning groove. Due to the great individual differences of the betel nuts, the positioning is not accurate enough and is prone to cutting deviation or omission. Therefore, the machine is not ideal in actual betel nut processing and still has a large room for improvement. The use of machine vision technology can effectively avoid the problem of inaccurate positioning caused by the individual differences of the betel nuts. The rapidness, accuracy and non-destructiveness of image recognition have advantages that other technologies do not have. How to practically apply the machine vision technology to the betel nut slicing process has become a problem to be solved in the field. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a betel nut slicing track calculation method based on machine vision, which at least to some extent overcomes the problem of inaccurate positioning to the optimal slicing track line in the betel nut slicing process and improves the quality of the betel nut slicing.

[0005] To achieve the above purpose, the technical scheme adopted by the present application is as follows:

[0006] The present application provides a betel nut slicing track calculation method based on machine vision, which comprises the following steps:

[0007] Original image acquisition: acquiring the original image of the betel nut located on the production line;

[0008] Image preprocessing: filtering the betel nut image and converting it to the HSV color space, separating the H channel, S channel and V channel into three single-channel images, and obtaining the S single-channel image;

[0009] Threshold segmentation: threshold segmentation is performed on the S channel image to obtain a binary image, and the connected domains in the binary image are filled by using a flood fill algorithm and image morphological processing to remove holes and small connected domains;

[0010] Contour recognition: the edge detection operator is used to detect and recognize the areca nut contour image, and the effective contour of the areca nut is extracted to calculate the long axis A, short axis B, perimeter P, area S of the areca nut region RegionDiff, and the minimum circumscribed rectangle of the outer contour is obtained.

[0011] Slice trajectory calculation: the areca nut contour image is used to calculate a set of slice trajectory preselected lines, each preselected line set is scored by weight, and the score of each preselected line combination is calculated after weighting, and the final slice trajectory line of the areca nut is determined according to the scores.

[0012] In some embodiments, in the original image acquisition step, when the areca nut approaches the photoelectric switch, the photoelectric switch triggers the industrial CCD camera to acquire an image, and the image acquisition mode is trigger acquisition.

[0013] In some embodiments, in the image preprocessing step, the filtering processing adopts median filtering, which replaces the gray value of the pixel point with the median value of the gray values of the neighboring pixels of the image pixel point, so that the pixel values around the pixel are close to the true values, thereby eliminating isolated noise points; the median filtering calculation formula is as follows:

[0014] p(i,j)=Median{f(i-m,j-m)},m=3,5,7...

[0015] In the formula: P(i,j) is the gray value of the processed image at point (i,j); f(i,j) is the original image gray value.

[0016] In some embodiments, in the image preprocessing step, the image is converted to the HSV color space, and the conversion formula is as follows:

[0017]

[0018]

[0019]

[0020] v=m

[0021] In the formula: r, g, b are respectively the red component, green component and blue component in the RGB image; h, s, v are respectively the hue component, saturation component and brightness component in the converted HSV color space image.

[0022] In some embodiments, in the threshold segmentation step, the threshold of image binarization is determined by Otsu adaptive threshold segmentation, and the calculation formula is as follows:

[0023] w0=N0 / (M×N)

[0024] w1=N1 / (M×N)

[0025] N0+N1=(M×N)

[0026] w0+w1=1

[0027] μ=w0*μ0+w1*μ1

[0028] g=w0(μ0-μ)+w1(μ1-μ) 2 2

[0029] The threshold T that maximizes the inter-class variance is obtained by traversal method; in the formula: M×N is the size of the image; N0 is the number of pixels in the image whose gray value is less than the threshold T; N1 is the number of pixels whose gray value is greater than the threshold T; ω0 is the proportion of the number of foreground pixels to the whole image; μ0 is the average gray of the foreground pixels to the whole image; ω1 is the proportion of the number of background pixels to the whole image; μ1 is the average gray of the background pixels to the whole image; μ is the total average gray of the image; and g is the inter-class variance.

[0030] In some embodiments, in the threshold segmentation step, the betel nut is segmented from the background image according to the following formula:

[0031]

[0032] In the formula, T is the binarization threshold, Image3(x, y) is the gray value of the pixel at position (x, y) in the image, x represents the X-axis coordinate of the betel nut image, and y represents the Y-axis coordinate of the betel nut image.

[0033] In some embodiments, in the contour recognition step, the specific steps are as follows:

[0034] Calculate the minimum circumscribed rectangle: extract the features of the long axis A and the short axis B of the betel nut region RegionDiff, construct the minimum circumscribed rectangle of the region RegionDiff, and calculate the long axis and short axis of the minimum circumscribed rectangle, that is, the long axis A and the short axis B, to obtain the long axis and short axis of the minimum circumscribed rectangle by using the following calculation formula.

[0035]

[0036]

[0037] y n = f(x n )

[0038]

[0039]

[0040] In the formula: L, W are the length and width of the circumscribed rectangle respectively; (x0, y0) and (x5, y5) are the axis coordinates of the circumscribed rectangle; (x n ,y n ), (x m ,y m ) are the coordinates of the four vertices of the rectangle respectively, and f(x) is the areca outer contour curve function.

[0041] Extract the perimeter: extract the feature of the perimeter P, and use the chain rule to obtain the length of the areca: P = sqrt(2)*Nd+NX+NY;

[0042] Extract the area: extract the feature of the area S, and set the length of each pixel point as a unit 1, then the area is:

[0043]

[0044] In the formula: (x, y) represents the image coordinates; Q represents the areca region RegionDiff.

[0045] In some embodiments, in the slice trajectory calculation step, two different sets of weight scoring rules are used for the back height value and the cutting length value respectively, and when the back height value or the cutting length value is between the given values in the table, the specific score obtained based on linear interpolation between the two score scores.

[0046] Compared with the prior art, the method has the beneficial effects that: the method overcomes the problem that the optimal slice trajectory line cannot be accurately positioned by relying on mechanical positioning in the areca slicing process, effectively solves the problem of inaccurate areca cutting line positioning, quickly and accurately obtains the areca slice trajectory without damage, and improves the areca slice quality.

[0047] 1、The image recognition algorithm is adopted to recognize the areca, the slice trajectory is calculated by setting the back height and cutting length threshold, and finally the self-defined weight algorithm is used to comprehensively determine the areca slice preselected line, the weight scoring table can be customized and changed according to the seed shape of different enterprises, and the applicability is strong.

[0048] 2、Compared with the existing mechanical positioning and slicing method, the detection algorithm has the advantages of simple overall algorithm, high efficiency, good repeatability and the like, and meets the needs of real-time online identification, stability and reliability of the existing production line. BRIEF DESCRIPTION OF DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some embodiments of the present application, and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0050] Figure 1 Flow chart of the areca nut slicing trajectory calculation method of the present application;

[0051] Figure 2 Specific processing steps and corresponding processed images of the present application; wherein (a) is the original image collected by an industrial camera; (b) is the image after filtering processing of (a); (c) is the HSV color space image of (b); (d) is the S single channel image of (c); (e) is the image after Otsu threshold segmentation of (d); (f) is the image after performing flood fill on (e); (g) is the contour image of areca nut detected after edge detection of (f); (h) is the minimum circumscribed rectangle image corresponding to areca nut of (g); (i) is the slicing trajectory image generated from (h);

[0052] Figure 3 Identification image of areca nut outer contour parameter extraction of the present application;

[0053] Figure 4 Block diagram of areca nut slicing trajectory calculation of the present application;

[0054] Figure 5 Schematic diagram of trajectory set line calculation of the present application; wherein (a) is to obtain four offset points A, B, C and D on the head and tail analysis line; (b) is to obtain B1, B2, C1 and C2 offset points; (c) is to obtain A set line; (d) is to obtain D set line; (e) is to obtain B set line; (f) is to obtain C set line. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0056] Embodiment one

[0057] Referring to Figures 1-5 In one specific embodiment, the embodiment of the present application provides a machine vision-based areca nut slicing track calculation method, comprising the following steps:

[0058] S1, original image acquisition: acquiring an original areca nut image located on a production line, denoted as Image0, as shown in Figure 2 (a);

[0059] Wherein, a CCD industrial camera can be used to take an image of the areca nut on the production line;

[0060] Specifically, when the areca nut approaches the photoelectric switch, the photoelectric switch triggers the industrial CCD camera to acquire an image, and the image acquisition mode is trigger acquisition;

[0061] S2, image preprocessing:

[0062] S2.1 filters the areca nut image Image0 to obtain an image Image1, as shown in Figure 2 (b);

[0063] Wherein, the filtering process uses median filtering, that is, the median value of the gray values of the image pixel points in the neighborhood is used to replace the gray value of the pixel point, so that the pixel values around are close to the true value, thereby eliminating isolated noise points. The median filtering calculation formula is as follows:

[0064] p(i,j) = Median{f(i-m,j-m)}, m = 3, 5, 7...

[0065] Wherein: p(i,j) is the gray value of the processed image at point (i,j); f(i,j) is the original image gray value;

[0066] S2.2 converts the areca nut image Image1 to HSV color space, as shown in Figure 2 (c);

[0067] Wherein, the HSV color space contains three single-channel images of H channel, S channel and V channel respectively, and the color space conversion formula is as follows:

[0068]

[0069]

[0070]

[0071] v = m

[0072] In the formula: r, g, b are respectively red component, green component, blue component in RGB image; h, s, v are respectively hue component, saturation component, brightness component in converted HSV color space;

[0073] The above single channel operation: namely single channel image, commonly known as gray scale image, each pixel point can only have one value to represent color, pixel value is between 0 and 255, 0 is black, 255 is white, and intermediate value is some different levels of gray;

[0074] S2.3 separates color space to obtain S single channel image, denoted as Image2, as shown in Figure 2 (d);

[0075] S3, threshold segmentation: Otsu adaptive threshold segmentation is performed on the betel image Image2 to obtain a binary image, denoted as Image3, as shown in Figure 2 (e);

[0076] Wherein, the threshold value of image binarization is determined by Otsu (maximum inter-class variance method) of adaptive threshold segmentation, and the calculation formula is as follows:

[0077] w0=N0 / (M×N)

[0078] w1=N1 / (M×N)

[0079] N0+N1=(M×N)

[0080] w0+w1=1

[0081] μ=w0*μ0+w1*μ1

[0082] g=w0(μ0-μ) 2 +w1(μ1-μ) 2

[0083] The maximum threshold T of inter-class variance is obtained by using traversal method;

[0084] In the formula: M×N is the size of the image; N0 is the number of pixels whose gray value is less than the threshold value T in the image; N1 is the number of pixels whose gray value is greater than the threshold value T; ω0 is the proportion of foreground pixel points in the whole image; μ0 is the average gray of foreground pixel points in the whole image; ω1 is the proportion of background pixel points in the whole image; μ1 is the average gray of background pixel points in the whole image; μ is the total average gray of the image; g is the inter-class variance;

[0085] Wherein, the betel is segmented from the background image, so

[0086]

[0087] In the formula: T is the threshold value of binary segmentation, Image3(x, y) is the gray value of the pixel at position (x, y) in the image; x represents the coordinate of the X-axis of the areca image, and y represents the coordinate of the Y-axis of the areca image;

[0088] The areca image Image3 is subjected to a flood fill algorithm and image morphological processing to remove holes and small connected domains, to obtain an image, denoted as Image4, as shown in Figure 2 (f); the connected domain in the binary image is subjected to image filling to reduce image interference contours, wherein the binary operation: that is, the binary of the image, is to set the gray value of the pixel on the image to 0 or 255, that is, to present a clear visual effect of only black and white for the entire image;

[0089] S4, contour recognition: the edge detection operator is used to detect and recognize the areca contour image, and the effective contour of the areca region RegionDiff is extracted to calculate the long axis A, the short axis B, the perimeter P, the area S, and the minimum circumscribed rectangle of the outer contour is obtained;

[0090] That is, the areca image Image4 is subjected to edge detection using the Canny edge operator to obtain the areca region RegionDiff, that is, the contour of the areca; denoted as Image5, as shown in Figure 2 (g), the outer contour is drawn;

[0091] The long axis A, the short axis B, the perimeter P, and the area S of the areca region RegionDiff are calculated for the areca contour image Image5, as shown in Figure 3 The specific steps are as follows:

[0092] S4.1, calculate the minimum circumscribed rectangle: the features of the long axis A and the short axis B of the areca region RegionDiff are extracted, and the minimum circumscribed rectangle is constructed for the region RegionDiff, denoted as Image6, as shown in Figure 2 (h), the long side and the short side of the minimum circumscribed rectangle correspond to the long axis A and the short axis B, respectively, and the long axis G and the short axis E of the minimum circumscribed rectangle are calculated using the following calculation formula:

[0093]

[0094]

[0095] y n =f(x n )

[0096]

[0097]

[0098] wherein: L, W are the length and width of the circumscribed rectangle respectively; (x0, y0) and (x5, y5) are the axis coordinates of the circumscribed rectangle; (x n ,y n ), (x m ,y m ) are the coordinates of the four vertices of the rectangle respectively, and f(x) is the function of the outer contour curve of the betel nut.

[0099] S4.2, extracting the circumference: extracting the features of the circumference P, the circumference refers to the contour length of the betel nut, and the length of the betel nut is obtained by using the chain rule: P = sqrt(2) * Nd + NX + NY;

[0100] S4.3, extracting the area: extracting the features of the area S, the area of the betel nut describes the size of the contour area of the betel nut, that is, the number of all pixel points belonging to the betel nut in the image. For the region RegionDiff, let the length of each pixel point be unit 1, then the area is:

[0101]

[0102] wherein: (x, y) represents the image coordinates; Q represents the betel nut region RegionDiff;

[0103] S5, slice trajectory calculation:

[0104] The slice trajectory preselected line set is calculated for the betel nut contour image, each preselected line set is scored by weight, the score of each preselected line combination is calculated after weighting, and the final slice trajectory line of the betel nut is determined according to the scores;

[0105] Specifically, the slice trajectory preselected line set is calculated for the betel nut contour image Image6, the center axis of the betel nut is obtained through the axis coordinates of the circumscribed rectangle, the head analysis line and the tail analysis line are obtained by setting the head and tail to the same proportion, the midpoint of the betel nut on the head analysis line is taken, and A point and D point are obtained by taking the midpoint of the betel nut on the tail analysis line and taking the point proportion of 0.2, as shown in Figure 5 (a); the B point is on the tail analysis line, and B1 and B2 points are generated by setting the interval of 100 pixels, and C1 and C2 points are generated in the same way, as shown in Figure 5 (b); AAB n line set is obtained by connecting B1 and B2 on the tail analysis line, respectively, as shown in Figure 5 (c); and DC n line set is generated in the same way, as shown in Figure 5(d) as shown, taking B point as the center of the circle, rotating BA line with an interval of 2°, calculating the tangent length and the height of BA line. When the tangent length is less than the lower limit of the tangent length or the height is less than the lower limit of the height, the rotation of BA line stops, and the tangent length L and the height H are calculated according to the following formula:

[0106]

[0107]

[0108] wherein: L is the tangent length value; H is the height value; (x A ,y A ) is the coordinate of A point; (x B ,y B ) is the coordinate of B point; (x F ,y F ) is the coordinate of F point; δ is the upper limit of the tangent length, and μ is the upper limit of the height, so as to obtain BA line, and all BA lines form a BA line set, and B1A line set, B2A line set, CD line set, C1D line set, and C2D line set are generated in the same manner; the preselected line set rotated by B, B1, and B2 points is a B set, as shown in Figure 5 (e) ; the preselected line set rotated by C, C1, and C2 points is a C set, as shown in Figure 5 (f) ;

[0109] The tangent length value and the height value are used to set threshold values, the preselected lines in all generated sets are filtered, the preselected lines with a height less than 8 mm or higher than 14 mm and a tangent length less than 38 mm or higher than 66 mm are excluded, the remaining preselected line sets are grouped into four combination sets of A+D, A+C, D+B, and B+C, the preselected lines in the sets are scored by using a height weight score table and a tangent length weight score table, and the preselected lines in the set with the highest score are determined as the final slice track line of the betel nut. Understandably, the method overcomes the problem that the optimal slice track line cannot be accurately positioned by relying on mechanical positioning in the betel nut slicing process, effectively solves the problem of inaccurate positioning of the betel nut slicing line, quickly and accurately obtains the betel nut slice track without damage, and improves the quality of the betel nut slice. The visual recognition method is simple, accurate, and stable, and meets the real-time slicing requirements of the production line. As shown in Figure 2 (i), two different weight score rules are used for the height value and the tangent length value, and when the height value or the tangent length value is between the given values in the table, the specific score obtained by linear interpolation between the two score scores is taken;

[0110] The weight score table is as follows:

[0111] Table 1 Tangent length weight score table

[0112]

[0113] Table 2 Back High Weighted Score Table

[0114]

[0115] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0116] The principles and implementations of the present application are described in the specific examples herein, and the above examples are only used to help understand the method of the present application and its core idea. The above description is only the preferred embodiments of the present application. It should be noted that due to the limited nature of the language expression, there are objectively infinite specific structures, and for ordinary skilled persons in the technical field, without departing from the principles of the present application, a number of improvements, refinements or changes can be made, or the above technical features can be combined in an appropriate manner; these improvements, refinements, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, shall be regarded as the protection scope of the present application.

Claims

1. A method for calculating the trajectory of areca nut slices based on machine vision, characterized in that, Includes the following steps: Raw image acquisition: Acquire raw images of areca nuts located on the production line; Image preprocessing: The areca nut image is filtered and converted to the HSV color space, separating the H channel, S channel and V channel into three single-channel images, and obtaining the S single-channel image; Thresholding segmentation: Thresholding segmentation is performed on the S-channel image to obtain a binarized image. The connected components in the binary image are filled using the flood fill algorithm and image morphology processing to remove holes and small connected components. Contour recognition: The contour image of areca nut is detected and identified using the edge detection operator. Its effective contour is extracted, and the major axis A, minor axis B, perimeter P, and area S of the areca nut region RegionDiff are calculated to obtain the minimum bounding rectangle of the outer contour. Slice trajectory calculation: Calculate a set of pre-selected slice trajectories from the areca nut contour image, assign weights to each set of pre-selected lines, calculate the combined score of each pre-selected line after weighting, and determine the final slice trajectory line of the areca nut based on the scores. The specific steps in the contour recognition process are as follows: Calculate the minimum bounding rectangle: Extract the features of the major axis A and minor axis B of the RegionDiff of the areca palm region, construct the minimum bounding rectangle for the RegionDiff, and the long side and short side of the minimum bounding rectangle are the corresponding major axis A and minor axis B. Calculate the coordinates G and E of the major axis midline of the minimum bounding rectangle using the following formula. ; In the formula: L and W are the length and width of the circumscribed rectangle, respectively; (x0, y0) and (x5, y5) are the coordinates of the axes of the circumscribed rectangle; (x n ,y n ), (x m ,y m ) are the coordinates of the four vertices of the rectangle, and the function f(x) is the outer contour curve function of the areca nut. Perimeter Extraction: Extract the features of perimeter P and use the chain rule to obtain the length of the areca nut: P = sqrt(2) * Nd + NX + NY; Area Extraction: Extract the feature of area S. Assuming the length of each pixel is 1 unit, the area is: ; In the formula: (x,y) represents the image coordinates; Q represents the areca nut region RegionDiff.

2. The method for calculating the trajectory of areca nut slices based on machine vision according to claim 1, characterized in that, In the original image acquisition step, when the areca nut approaches the photoelectric switch, the photoelectric switch immediately triggers the industrial CCD camera to acquire a frame of image. The image acquisition method is trigger-based acquisition.

3. The method for calculating the trajectory of areca nut slices based on machine vision according to claim 1, characterized in that, In the image preprocessing step, the filtering process uses median filtering, which replaces the gray value of a pixel with the median gray value of its neighborhood, making the surrounding pixel values ​​closer to the true values ​​and thus eliminating isolated noise points. The formula for median filtering is as follows: ; In the formula: P(i,j)——the gray value of the processed image at point (i,j); f(i,j)——the gray value of the original image.

4. The method for calculating the trajectory of areca nut slices based on machine vision according to claim 1, characterized in that, In the image preprocessing step, the image is converted to the HSV color space using the following formula: ; ; ; ; In the formula: r, b—represent the red, green, and blue components in the RGB image, respectively; h, s, and v—represent the chroma, saturation, and lightness components in the converted HSV color space image, respectively.

5. The method for calculating the trajectory of areca nut slices based on machine vision according to claim 1, characterized in that, In the threshold segmentation step, the Otsu method for adaptive threshold segmentation is used to determine the image. The threshold value is calculated using the following formula: ; The threshold T that maximizes the inter-class variance is obtained by traversal; where: M×N——is the size of the image; N0——is the number of pixels in the image whose gray value is less than the threshold T; N1——is the number of pixels whose gray value is greater than the threshold T; ω0——is the proportion of foreground pixels to the whole image; μ0——is the proportion of foreground pixels to the average gray value of the whole image. ω1—The proportion of background pixels to the entire image; μ1—The average gray level of background pixels to the entire image; μ—The total average gray level of the image; g—The inter-class variance.

6. The method for calculating the trajectory of areca nut slices based on machine vision according to claim 5, characterized in that, In the threshold segmentation step, the areca nut is segmented from the background image using the following formula: ; In the formula: T is the binarization segmentation threshold, Image3(x,y) is the gray value of the pixel at position (x,y) in the image: x represents the X-axis coordinate of the areca image, and y represents the Y-axis coordinate of the areca image.

7. The method for calculating the trajectory of areca nut slices based on machine vision according to claim 1, characterized in that, In the slice trajectory calculation step, two different weighted scoring rules are used for the back height value and the cutting length value. When the back height value or the cutting length value is between the given values ​​in the table, its value is the specific score obtained by linear interpolation between the two scoring scores.

Citation Information

Patent Citations

  • Full-automatic areca catechu equal slicer

    CN104772777A