A table tennis ball roundness detection system, electronic equipment and readable storage medium

By combining a high-resolution camera and bottom light source with image processing technology, the outline model of the ping-pong ball is extracted, which solves the problem of insufficient measurement accuracy of the ping-pong ball, realizes micron-level roundness and diameter measurement, and improves the automation and production efficiency of the detection system.

CN120160561BActive Publication Date: 2025-10-17GUANGZHOU DOUBLE FISH SPORTS GOODS GRP +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510345168.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-10-17
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

Existing table tennis ball detection technology lacks accuracy in measuring the geometric size and shape characteristics of table tennis balls, and cannot meet the micron-level precision requirements. Especially in international competitions, where the size requirements for table tennis balls are strict, tiny errors may affect use and qualification judgment.

Method used

A high-resolution camera and backlight technology are used to capture images of table tennis balls, and the bottom light source adjustment system is used for lighting. The contour model of the table tennis ball is extracted through image preprocessing and contour analysis algorithm, the roundness index is calculated, and the roundness is evaluated by comparison with the ideal circle.

Benefits of technology

It achieves micron-level measurement accuracy for the roundness and diameter of table tennis balls, improves the automation level and production efficiency of the detection system, reduces manual intervention, and ensures that the quality of table tennis balls meets strict standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120160561B_ABST
    Figure CN120160561B_ABST
Patent Text Reader

Abstract

The present invention provides a table tennis ball roundness detection system, an electronic device, and a readable storage medium, comprising: utilizing a bottom light source to illuminate the table tennis ball, with the light penetrating from the bottom of the table tennis ball and illuminating its entire surface. Using image processing and contour analysis algorithms, an image of the table tennis ball under the light source is captured and analyzed, and the contour of the table tennis ball is extracted from the processed image. Based on the contour information, the roundness index of the table tennis ball is calculated. Roundness detection is achieved by comparing the difference between the contour and an ideal circle, and the calculated roundness index is used to evaluate whether the roundness of the table tennis ball meets the standard. The table tennis ball roundness detection system of the present invention is fully automated, which improves production efficiency, reduces manual intervention, and is suitable for large-scale production. External interference is resolved through image processing optimization, thereby improving accuracy and stability. A special equipment arrangement, combined with a high-resolution camera and a high-precision image processing algorithm, enables micron-level measurement and improves the accuracy of roundness qualification assessment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of table tennis production quality control and precision detection, and in particular to a table tennis roundness detection system, an electronic device and a readable storage medium. BACKGROUND

[0002] At present, most of the technologies on the market focus on the target detection and tracking of table tennis. The core purpose of these existing technologies is to identify the position of table tennis in the image through computer vision algorithm and to conduct simple target tracking. Generally, these technologies rely on traditional image processing methods such as edge detection, morphological operation, etc., combined with basic target positioning algorithm, which can complete the rough detection and position tracking of table tennis.

[0003] However, the precision of these technologies in measuring the geometric size (such as diameter) and shape characteristics (such as roundness) of table tennis is very limited. The existing detection technology is mainly applied to the morphological identification of table tennis and has not gone deep into the fine size and shape detection. The precision is usually in the centimeter level, which cannot meet the demand of micron-level precision. Especially in the field of international competitions, the size of table tennis is required to be very strict, and even a small error may affect the subsequent use or qualification judgment. SUMMARY

[0004] In view of the above problems, the present application is proposed in order to provide a table tennis roundness detection system, an electronic device and a readable storage medium which overcome the above problems or at least partially solve the above problems.

[0005] The present application provides a table tennis roundness detection system, comprising:

[0006] a table tennis image acquisition module, configured to acquire a table tennis original image through a high-resolution camera and backlight technology when a closed space and a bottom light source adjustment system are used to illuminate the table tennis; the bottom light source adjustment system penetrates from the bottom of the table tennis and illuminates the overall surface of the table tennis;

[0007] a table tennis image preprocessing module, configured to perform image processing on the table tennis original image to obtain a table tennis to-be-measured image;

[0008] a roundness index measurement module, configured to extract a contour model of the table tennis from the table tennis to-be-measured image, and calculate a roundness index of the table tennis according to the extracted contour model of the table tennis;

[0009] a roundness qualification evaluation module, configured to evaluate whether the roundness of the table tennis meets the production standard according to the difference between the roundness index of the table tennis and an ideal round.

[0010] Optionally, the table tennis image preprocessing module is further configured to:

[0011] The table tennis original image is subjected to Gaussian denoising processing, gray processing, contrast enhancement processing, binarization processing, and graphic bit operation processing to obtain a table tennis image to be measured.

[0012] Optionally, the table tennis image preprocessing module is further configured to:

[0013] In the Gaussian denoising processing, a Gaussian function is used as a weight coefficient, and for each pixel point in the table tennis original image, a weighted average value of the pixels around the pixel point is calculated as a new pixel value to obtain a table tennis Gaussian denoising image.

[0014] Optionally, the table tennis image preprocessing module is further configured to:

[0015] The table tennis Gaussian denoising image is converted into a gray image.

[0016] A histogram and a cumulative distribution function of the gray image are calculated.

[0017] The cumulative distribution function is normalized to a preset gray level range.

[0018] According to the normalized cumulative distribution function, each pixel value of the histogram is replaced by a new pixel value to obtain a contrast enhancement image.

[0019] Optionally, the table tennis image preprocessing module is further configured to:

[0020] The contrast enhancement image is binarized according to a preset pixel value threshold to obtain a binarized image, and a table tennis foreground image is extracted.

[0021] An open operation is performed on the table tennis foreground image to remove undesirable noise points in the foreground generated by the binarization to obtain a table tennis image to be measured.

[0022] Optionally, the roundness index measurement module is further configured to:

[0023] A Canny edge detection algorithm is used to extract a contour model of the table tennis from the table tennis image to be measured, and the distance between two edge points on the table tennis contour model is analyzed and calculated multiple times as the diameter of the table tennis, and a diameter mean value of the table tennis is calculated.

[0024] Optionally, the roundness index measurement module is further configured to:

[0025] Gaussian filtering is applied to the table tennis image to be measured for smoothing processing.

[0026] The gradient amplitude and direction of each pixel point of the smoothed image are calculated, and non-maximum suppression is performed on the gradient amplitude to refine the edges.

[0027] Compare the gradient magnitude of each pixel with the gradient magnitudes of its two neighboring pixels along the gradient direction, and use the preset high gradient magnitude threshold and low gradient magnitude threshold to determine strong and weak edges. Then, by connecting the weak edges with the strong edges, we can get the outline model of the ping-pong ball.

[0028] Select the largest outline in the ping-pong ball outline model as the foreground of the ping-pong ball;

[0029] Apply the minimum fitting matrix to the ping-pong ball foreground to measure the diameter of the ping-pong ball in a certain direction;

[0030] Rotate the table tennis foreground through the affine transformation matrix so that different directions of the table tennis ball can be measured;

[0031] For each rotation of the ping-pong ball foreground, the minimum fitting matrix is ​​applied again to calculate the distance between the two edge points as the diameter of the ping-pong ball in that direction;

[0032] Repeat the above rotation and measurement steps to calculate the average of the diameters of the ping-pong balls in multiple directions to obtain the average diameter of the ping-pong balls.

[0033] Optionally, the roundness qualification assessment module is further configured to:

[0034] Based on the diameter and mean diameter of the ping-pong ball, the roundness error between the ping-pong ball and the ideal circle is calculated, and it is determined whether the roundness error is within a preset acceptable error range.

[0035] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the electronic device executes the computer program, the table tennis ball roundness detection system as described in any one of the embodiments of the present invention is loaded.

[0036] The present invention also provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the table tennis ball roundness detection system as described in any one of the embodiments of the present invention is loaded.

[0037] The present invention includes the following advantages:

[0038] The table tennis ball roundness detection system of the present invention utilizes a bottom-mounted light source to illuminate the ball. Light penetrates from the bottom of the ball and illuminates its entire surface. Using image processing and contour analysis algorithms, the image of the ball under the light source is captured and analyzed, and the ball's contour is extracted from the processed image. Based on the extracted contour information, the ball's roundness index is calculated. Roundness detection is achieved by comparing the contour with the ideal circle. The calculated roundness index is output and used to assess whether the ball's roundness meets the standard. The table tennis ball roundness detection system of the present invention has a fully automated detection process that enables rapid processing and real-time feedback of results. During the production process, the roundness and diameter of each ball can be continuously monitored, significantly improving production efficiency and reducing manual intervention, making the system more feasible for large-scale production. Furthermore, the table tennis ball roundness detection system optimizes a series of image processing operations on the ball image, eliminating the impact of external interference on measurement results and further improving the system's measurement accuracy and stability. In addition, a special equipment layout is combined with a high-resolution industrial camera to capture the image of the table tennis ball, ensuring that the image quality is sufficient to support accurate measurement at the micron level. Combined with a high-precision image processing algorithm, the roundness and diameter of the table tennis ball can be measured at the micron level, improving the accuracy of the roundness qualification assessment. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a structural block diagram of a table tennis ball roundness detection system provided by an embodiment of the present invention;

[0040] Figure 2 1 is a schematic diagram of a table tennis ball with Gaussian denoising provided by an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of a table tennis ball processed in grayscale according to an embodiment of the present invention;

[0042] Figure 4 2. It is a schematic diagram of a table tennis ball subjected to binarization processing according to an embodiment of the present invention;

[0043] Figure 5 is a table tennis diagram of a graphics bit operation process provided by an embodiment of the present invention;

[0044] Figure 6 Schematic diagram of a table tennis ball contour model for Canny edge detection provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] Reference Figure 1, shows the structure block diagram of the table tennis ball roundness detection system provided in the embodiment of the application, and can specifically include the following modules:

[0047] The table tennis ball image acquisition module is used for acquiring the original image of the table tennis ball by using a high-resolution camera and backlight technology when the table tennis ball is illuminated by a bottom light source adjustment system in a closed space.

[0048] The table tennis ball image preprocessing module is used for image processing on the original image of the table tennis ball to obtain a to-be-measured image of the table tennis ball.

[0049] The roundness index measurement module is used for extracting a contour model of the table tennis ball from the to-be-measured image of the table tennis ball and calculating the roundness index of the table tennis ball according to the extracted contour model of the table tennis ball.

[0050] The roundness qualification evaluation module is used for evaluating whether the roundness of the table tennis ball meets the production standard according to the difference between the roundness index of the table tennis ball and an ideal circle.

[0051] The table tennis ball roundness detection system developed by the application has a fully automatic detection process and can quickly process and feedback the results in real time. In the production process, the roundness and diameter of each table tennis ball can be continuously monitored. Specifically, the table tennis ball roundness detection system of the application includes a table tennis ball image acquisition module, a table tennis ball image preprocessing module, a roundness index measurement module, and a roundness qualification evaluation module. Through the joint action of these modules, when the table tennis ball is illuminated by a bottom light source, the light penetrates from the bottom of the table tennis ball and illuminates the whole surface of the table tennis ball, the table tennis ball roundness detection system captures and analyzes the image of the table tennis ball under the light source through image processing and contour analysis algorithm, extracts the contour of the table tennis ball from the processed image, calculates the roundness index of the table tennis ball according to the extracted contour information, realizes the roundness detection by comparing the difference between the contour and the ideal circle, and outputs the calculated roundness index for evaluating whether the roundness of the table tennis ball meets the standard.

[0052] In the application, a high-resolution industrial camera and backlight technology are used for image acquisition to ensure that the quality of the image is sufficient to support micron-level precision analysis. In order to overcome the influence of factors such as shooting angle and light, the application uses a closed space and a bottom light source adjustment system, and uses image denoising, contrast enhancement and other preprocessing methods to maximize the image quality.

[0053] In an embodiment of the application, the table tennis ball image preprocessing module is further used for:

[0054] The original image of the table tennis ball is subjected to Gaussian denoising processing, gray processing, contrast enhancement processing, binarization processing, and graph bit operation processing to obtain the to-be-measured image of the table tennis ball.

[0055] The table tennis ball roundness detection system of the present application not only has a fully automatic detection process, can quickly process and real-time feedback results, but also its table tennis ball image preprocessing module effectively improves the quality of the original image through a series of advanced image processing techniques, including Gaussian denoising, gray scale conversion, contrast enhancement, binarization and graph bit operation processing, with reference to Figures 2-5 These preprocessing steps ensure that even in complex or changing environments, the collected table tennis ball images can achieve high definition and high contrast, thereby providing a reliable basis for subsequent accurate contour extraction and roundness index calculation. This high-quality image processing capability is closely combined with the fully automatic detection function of the system, so that the measurement accuracy and reliability of the system are also enhanced, further ensuring product quality.

[0056] In an embodiment of the present application, the table tennis ball image preprocessing module is further configured to:

[0057] In the Gaussian denoising process, a Gaussian function is used as a weight coefficient, and for each pixel point in the table tennis ball original image, the weighted average value of the surrounding pixels of the pixel point is calculated as a new pixel value to obtain a table tennis ball Gaussian denoising image.

[0058] In this embodiment, Gaussian blur, mean filtering and other denoising methods can be used to reduce image noise interference. Among them, Gaussian blur is a linear filtering method using a Gaussian function as a weight coefficient. For each pixel point, Gaussian blur calculates the weighted average value of its surrounding pixels, and the weight is determined by the Gaussian function. The Gaussian blur calculation formula is:

[0059]

[0060] where I blur (x, y) is the value of the blurred image at point (x, y), I(x+u, y+v) is the value of the original image at point (x+u, y+v), and σ is the standard deviation of the Gaussian function, controlling the blur degree.

[0061] In an embodiment of the present application, the table tennis ball image preprocessing module is further configured to:

[0062] convert the table tennis ball Gaussian denoising image into a gray scale image;

[0063] calculate the histogram and cumulative distribution function of the gray scale image;

[0064] normalize the cumulative distribution function to a preset gray scale range;

[0065] According to the normalized cumulative distribution function, replace each pixel value of the histogram with a new pixel value to obtain a contrast enhanced image.

[0066] In this embodiment, the image details are enhanced by histogram equalization and other techniques, so that the table tennis ball profile is more clear. Specifically, first, the histogram of the image is calculated, and then the cumulative distribution function is calculated.

[0067]

[0068] By normalizing the CDF to the range [0, L-1] (where L is the number of gray levels, such as 256), a new gray value is obtained:

[0069] s(i) = round((L-1)·CDF(i))

[0070] After generating the equalized image, the original image is replaced by the new pixel value s(f(x, y)) to generate the equalized image.

[0071] In an embodiment of the application, the table tennis image preprocessing module is further configured to:

[0072] According to the preset pixel value threshold, the contrast enhanced image is binarized to obtain a binarized image, and a table tennis ball foreground image is extracted.

[0073] The table tennis ball foreground image is subjected to an opening operation to remove undesirable noise points in the foreground generated by binarization, to obtain a table tennis ball image to be measured.

[0074] In this embodiment, the image is subjected to gray scale processing, and then binarization is performed to extract the foreground. The formula used is:

[0075] Igray = 0.299 * IR + 0.587 * IG + 0.114 * IB. Where Igray is the gray value, IR, IG and IB are the values of the RGB three channels.

[0076]

[0077] x, y are two-dimensional coordinates of pixels, f(x, y) represents the pixel value of the two-dimensional coordinates. If the value is greater than the threshold T, it is 255, otherwise it is 0.

[0078] After binarization, further graph bit operation is used to remove undesirable noise points in the foreground generated by binarization. The formula used is:

[0079] O(I, S) = D(E(I, S), S)

[0080] Where:

[0081] O(I, S) is the image after opening operation;

[0082] E(I, S) is the result of the image I after the erosion operation;

[0083] D(I,S) is the result of the image I after the inflation operation.

[0084] In an embodiment of the present application, the roundness index measurement module is further configured to:

[0085] The Canny edge detection algorithm is used to extract the contour model of the table tennis ball from the table tennis ball image to be measured, and the distance between two edge points on the contour model of the table tennis ball is analyzed and calculated multiple times as the diameter of the table tennis ball, and the average diameter of the table tennis ball is calculated.

[0086] In an embodiment of the present application, the roundness index measurement module is further configured to:

[0087] Gaussian filtering is applied to the table tennis ball image to be measured for smoothing processing;

[0088] The gradient amplitude and direction of each pixel point of the smoothed image are calculated, and non-maximum suppression is performed on the gradient amplitude to refine the edge;

[0089] The gradient amplitude of each pixel is compared with the gradient amplitudes of two adjacent pixels along the gradient direction, and a preset high gradient amplitude threshold and a low gradient amplitude threshold are used to determine strong edges and weak edges, and the contour model of the table tennis ball is obtained by connecting the weak edges and the strong edges;

[0090] The largest contour in the contour model of the table tennis ball is selected as the foreground of the table tennis ball;

[0091] The minimum fitting matrix is applied to the foreground of the table tennis ball to measure the diameter of the table tennis ball in a certain direction;

[0092] The foreground of the table tennis ball is rotated by an affine transformation matrix, so that different directions of the table tennis ball can be measured;

[0093] The minimum fitting matrix is applied to the foreground of the table tennis ball after each rotation to calculate the distance between two edge points as the diameter of the table tennis ball in that direction;

[0094] The above rotation and measurement steps are repeated to calculate the average diameter of the table tennis ball in multiple directions, and the average diameter of the table tennis ball is obtained.

[0095] The ping pong ball roundness detection system of the present application not only has a fully automated detection process, can quickly process and real-time feedback results, but also significantly improves the measurement accuracy through a series of precise image processing and analysis techniques. Specifically, the system uses the Canny edge detection algorithm combined with Gaussian filter smoothing processing, gradient calculation and non-maximum suppression steps, effectively extracts the contour model of the ping pong ball from the image to be measured. Further, by applying the minimum fitting matrix to the ping pong ball foreground and using the affine transformation matrix to rotate the ping pong ball foreground, the accurate measurement of the diameter of the ping pong ball in different directions is realized. This process is repeated to calculate the mean value of the diameter of the ping pong ball in multiple directions, ensuring the consistency and accuracy of the diameter measurement. This high-precision measurement capability combined with the fully automated detection function of the system can realize continuous monitoring of the roundness and diameter of each ping pong ball in the production process, not only significantly improving production efficiency, but also greatly reducing the need for manual intervention, making the system more efficient and feasible in large-scale production. In addition, due to the improvement of measurement accuracy, the system can better guarantee product quality.

[0096] Specifically, referring to Figure 6 , the contour of the ping pong ball is extracted using the Canny edge detection algorithm:

[0097]

[0098] where σ is the standard deviation of the Gaussian function.

[0099] Gradient calculation:

[0100] G x = I * S x , G y = I * S y

[0101] where Sx and Sy are horizontal and vertical Sobel operators, I is the smoothed image, and Gx and Gy are gradient components.

[0102] Gradient magnitude and direction:

[0103]

[0104] Non-maximum suppression is performed on the gradient magnitude to refine the edges. For each pixel, compare its gradient magnitude with the two neighboring pixels along the gradient direction. Two thresholds (high threshold and low threshold) are used to determine strong edges and weak edges. Finally, by connecting weak edges with strong edges, the final edges are determined.

[0105] The steps for calculating the diameter of the ping pong ball include:

[0106] ① First find the largest contour in the image, i.e. the foreground of the ping pong ball;

[0107] ②Measure the diameter of the ping pong ball in a certain direction by the least square fitting matrix;

[0108] ③Rotate the foreground by the affine matrix, then calculate the distance between the two edge points as the diameter of the ping pong ball by the least square fitting matrix, and repeat the above operation to obtain the mean diameter of the ping pong ball.

[0109] In an embodiment of the present application, the roundness qualification evaluation module is further configured to:

[0110] According to the diameter and the mean diameter of the ping pong ball, calculate the roundness error of the ping pong ball relative to the ideal circle, and determine whether the roundness error is within the preset qualified error range.

[0111] In this embodiment, the roundness qualification evaluation module ensures product quality by comparing the actual measurement data of the ping pong ball with the parameters of the ideal circle. Specifically, based on the previously calculated diameter of the ping pong ball and its mean value, the module can calculate the roundness error of each ping pong ball relative to the ideal circle. The calculated roundness error is compared with the preset qualified error range to determine whether the ping pong ball meets the strict production standards. If the roundness error is within the preset range, it indicates that the roundness of the ping pong ball meets the production standards; otherwise, if it is not within this range, it is considered not to meet the production standards. This process realizes the automatic evaluation of the quality of the ping pong ball, making the ping pong ball roundness detection system have a fully automated detection process, which can quickly process and feedback the results in real time, significantly improving production efficiency and reducing manual intervention, making the system more feasible for large-scale production.

[0112] The present application has the following advantages:

[0113] 1. Automated and efficient detection process

[0114] The system of the present application has a fully automated detection process, which can quickly process and feedback the results in real time. During production, continuous monitoring of the roundness and diameter of each ping pong ball can be achieved, significantly improving production efficiency and reducing manual intervention. This makes the system more feasible for large-scale production.

[0115] Efficient detection can quickly complete the diameter measurement and roundness judgment of the ping pong ball, shorten the detection period, improve the turnover speed of the production line, and thus improve the overall production efficiency. At the same time, the system can quickly collect a large amount of data, providing rich data support for quality control and product improvement, which helps in-depth analysis and optimization of the production process.

[0116] 2. High adaptability and flexibility

[0117] Due to the modular design, the system can flexibly adapt to production environments and working conditions. The system can be widely applied to different production scenarios and has strong versatility.

[0118] 3. Application of high-resolution industrial cameras

[0119] The invention employs high-resolution industrial cameras to capture images of table tennis balls, ensuring image quality sufficient to support micron-level precision measurements. The selection and optimization of these cameras provide hardware support for measurement accuracy, which is one of the technical foundations of the invention.

[0120] 4. Efficient image processing method

[0121] The invention employs a series of image processing optimization techniques, including image denoising, contrast enhancement, edge detection, etc. In particular, Gaussian denoising is introduced to address the impact of external interference on measurement results, further improving the system's measurement accuracy and stability.

[0122] 5. Micron-level roundness and diameter measurement accuracy and judgment analysis

[0123] One of the core innovations of the invention is the use of high-precision image processing algorithms and equipment to achieve micron-level table tennis ball roundness and diameter measurement. By combining high-resolution cameras and optimized algorithms, the precision has reached a level that traditional measurement methods cannot match. This precision can meet the stringent requirements of the precision manufacturing industry for size measurement, especially in the table tennis manufacturing process, where micron-level precision is crucial.

[0124] Roundness is one of the important indicators for evaluating whether the geometry of a table tennis ball meets the standard. The invention extracts the edge contour of the table tennis ball and uses Canny edge detection algorithms to extract the contour model to calculate the roundness. By analyzing the distance between two contour points, the diameter is calculated to determine whether the roundness of the table tennis ball meets the production requirements. To achieve high-precision diameter measurement, the invention rotates the foreground through an affine matrix, then calculates the distance between two edge points as the diameter of the table tennis ball using the least fitting matrix. The above operation is repeated to obtain the average diameter of the table tennis ball, and the average diameter of the sphere is accurately calculated.

[0125] 6. High-precision calculation and error analysis

[0126] Micron-level precision measurement requires the system to accurately control various error sources. The invention conducts systematic error analysis and proposes corresponding compensation strategies to ensure consistency of measurement results under different conditions.

[0127] In addition, the invention is particularly suitable for real-time monitoring and quality control of table tennis balls in automated production lines, and can also be widely applied to other industries that require high-precision size measurement, such as precision machinery, optical components, electronic components, etc.

[0128] Based on the same inventive concept, another embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to load the ping pong ball roundness detection system according to any one of the embodiments of the present application.

[0129] In particular, the electronic device comprises a memory and a processor, the memory and the processor are communicatively connected through a bus, and the memory stores a computer program which can be run on the processor to load the ping pong ball roundness detection system according to any one of the first aspect of the embodiments of the present application.

[0130] The memory can comprise a random access memory (RAM) and can also comprise a non-volatile memory such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0131] The aforementioned processor can be a general-purpose processor including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0132] Based on the same inventive concept, another embodiment of the present application provides a computer readable storage medium having stored thereon a computer program / instruction, wherein the computer program / instruction is executed by a processor to load the ping pong ball roundness detection system according to any one of the first aspect of the embodiments of the present application.

[0133] Each of the embodiments in the present specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be mutually referred to.

[0134] Those skilled in the art will understand that embodiments of the present application can be provided as methods, apparatus, electronic devices, storage media or computer program products. Accordingly, embodiments of the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0135] Although the embodiments of the present application have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, alternatives and variations to the embodiments can be made without departing from the principles and spirit of the application, the scope of which is defined by the claims and their equivalents.

[0136] Finally, it should be noted that, in the present document, relational terms such as first and second, and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0137] The above provides a table tennis ball roundness detection system, electronic device and readable storage medium, and the principle and implementation of the present application are described by using specific examples. The above embodiment is only used to help understand the method and core idea of the present application. For those skilled in the art, according to the idea of the present application, the specific implementation and application range can be changed. The above description should not be understood as a limitation of the present application. The above embodiment is only a preferred embodiment, and the protection scope of the present application is not limited to this. The equivalent replacement or transformation of the present application based on the present application is within the protection scope of the present application.

Claims

1. A table tennis ball roundness detection system, characterized in that: include: A table tennis ball image acquisition module, used to capture the original image of the table tennis ball using a high-resolution camera and backlight technology when the table tennis ball is illuminated in a confined space and using a bottom light source adjustment system that penetrates the bottom of the table tennis ball and illuminates its entire surface; The table tennis image preprocessing module is used to process the original table tennis image to obtain the table tennis image to be measured; A roundness index measurement module is used to extract a contour model of the table tennis ball from the table tennis ball image to be measured, and calculate the roundness index of the table tennis ball based on the extracted contour model of the table tennis ball; A roundness qualification assessment module is used to assess whether the roundness of a table tennis ball meets production standards based on the difference between the roundness index of the table tennis ball and the ideal circle; The roundness index measurement module is also used for: Apply Gaussian filtering to the table tennis image to be measured for smoothing; Calculate the gradient magnitude and direction of each pixel of the smoothed image, and perform non-maximum suppression on the gradient magnitude to refine the edge; Compare the gradient magnitude of each pixel with the gradient magnitudes of its two neighboring pixels along the gradient direction, and use the preset high gradient magnitude threshold and low gradient magnitude threshold to determine strong and weak edges. Then, by connecting the weak edges with the strong edges, we can get the outline model of the ping-pong ball. Select the largest outline in the ping-pong ball outline model as the foreground of the ping-pong ball; Apply the minimum fitting matrix to the ping-pong ball foreground to measure the diameter of the ping-pong ball in a certain direction; Rotate the table tennis foreground through the affine transformation matrix so that different directions of the table tennis ball can be measured; For each rotation of the ping-pong ball foreground, the minimum fitting matrix is ​​applied again to calculate the distance between the two edge points as the diameter of the ping-pong ball in that direction; Repeat the above rotation and measurement steps to calculate the average of the diameters of the ping-pong balls in multiple directions to obtain the average diameter of the ping-pong balls.

2. The table tennis ball roundness detection system according to claim 1, characterized in that: The table tennis image preprocessing module is also used for: The original table tennis image is subjected to Gaussian denoising, grayscale processing, contrast enhancement processing, binarization processing, and graphic bit operation processing to obtain the table tennis image to be measured.

3. The table tennis ball roundness detection system according to claim 2, characterized in that: The table tennis image preprocessing module is also used for: In the Gaussian denoising process, a Gaussian function is used as a weight coefficient. For each pixel in the original table tennis image, the weighted average of the pixels around the pixel is calculated as the new pixel value to obtain the Gaussian denoised image of the table tennis ball.

4. The table tennis ball roundness detection system according to claim 3, characterized in that: The table tennis image preprocessing module is also used for: Convert the ping pong ball Gaussian denoised image into a grayscale image; Calculate the histogram and cumulative distribution function of grayscale images; Normalize the cumulative distribution function to a preset grayscale range; According to the normalized cumulative distribution function, each pixel value of the histogram is replaced with a new pixel value to obtain a contrast enhanced image.

5. The table tennis ball roundness detection system according to claim 4, characterized in that: The table tennis image preprocessing module is also used for: Binarizing the contrast-enhanced image according to a preset pixel value threshold to obtain a binary image, and extracting the table tennis foreground image; An opening operation is performed on the table tennis foreground image to remove the bad noise points in the foreground caused by binarization, and the table tennis image to be measured is obtained.

6. The table tennis ball roundness detection system according to claim 1, characterized in that: The roundness index measurement module is also used for: The Canny edge detection algorithm is used to extract the contour model of the table tennis ball from the table tennis ball image to be measured. The distance between two edge points on the table tennis ball contour model is analyzed and calculated multiple times as the diameter of the table tennis ball, and the average diameter of the table tennis ball is calculated.

7. The table tennis ball roundness detection system according to claim 1, characterized in that: The roundness conformity assessment module is also used to: Based on the diameter and mean diameter of the ping-pong ball, the roundness error between the ping-pong ball and the ideal circle is calculated, and it is determined whether the roundness error is within a preset acceptable error range.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the electronic device executes the computer program, it loads the table tennis ball roundness detection system according to any one of claims 1 to 7.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the table tennis ball roundness detection system according to any one of claims 1 to 7 is loaded.

Citation Information

Patent Citations

  • Riveting hole roundness error detection device and method based on machine vision

    CN117091530A