Table tennis ball roundness detection system, electronic equipment and readable storage medium
By designing a ping-pong roundness detection system, using high-resolution cameras and image processing algorithms, the problem of insufficient measurement accuracy of ping-pong ball size in the prior art is solved, and roundness and diameter measurement of micron-level precision is achieved, and production efficiency and product quality are improved.
Patent Information
- Application Number
- CN202510345168.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The prior art has limited accuracy in measuring the geometric dimensions and shape characteristics of table tennis balls and cannot meet the strict standards for table tennis size requirements in international competitions.
A ping-pong roundness detection system was designed, and the table tennis image was collected using a high-resolution camera and bottom light source adjustment system. The outline model of the ping-pong ball was extracted through image processing and contour analysis algorithms, and its roundness index was calculated, and whether it complies with production standards.
The micron-level accuracy measurement of the roundness and diameter of the table tennis ball is achieved, which improves detection accuracy and production efficiency, reduces manual intervention, and is suitable for large-scale production.
Smart Images

Figure CN120160561A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of table tennis production quality control and precision detection, and particularly to a table tennis roundness detection system, an electronic device, and a readable storage medium. Background Art
[0002] Currently, most technologies on the market focus on the object detection and tracking of table tennis balls. The core purpose of these existing technologies is to identify the position of the table tennis ball in the image through computer vision algorithms and perform simple object tracking. Generally, these technologies rely on traditional image processing methods, such as edge detection, morphological operations, etc., combined with basic object localization algorithms, to complete the rough detection and position tracking of the table tennis ball.
[0003] However, the accuracy of these technologies in measuring the geometric dimensions (such as diameter) and shape characteristics (such as roundness) of table tennis balls is very limited. The existing detection technologies are mainly applied to the morphological recognition of table tennis balls and do not delve into the refined dimension and shape detection. The accuracy is usually concentrated at the centimeter level and cannot meet the requirements of micron-level accuracy. Especially in the field of international competitions, the size requirements for table tennis balls are very strict, and even a tiny error may affect subsequent use or pass judgment. Summary of the Invention
[0004] In view of the above problems, the present invention is proposed to provide a table tennis roundness detection system, an electronic device, and a readable storage medium that overcome or at least partially solve the above problems.
[0005] The present invention provides a table tennis roundness detection system, including:
[0006] A table tennis ball image acquisition module, which is used to collect the original image of the table tennis ball through a high-resolution camera and backlight technology when illuminating the table tennis ball in a closed space and using a bottom light source adjustment system; the bottom light source adjustment system penetrates from the bottom of the table tennis ball and illuminates the entire surface of the table tennis ball;
[0007] A table tennis ball image preprocessing module, which is used to perform image processing on the original image of the table tennis ball to obtain an image of the table tennis ball to be measured;
[0008] A roundness index measurement module, which is used to extract the contour model of the table tennis ball from the image of the table tennis ball to be measured and calculate the roundness index of the table tennis ball according to the extracted contour model of the table tennis ball;
[0009] A roundness qualification evaluation module, which is used to evaluate 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 the ideal circle.
[0010] Optionally, the table tennis ball image preprocessing module is further used for:
[0011] Perform Gaussian denoising, grayscale processing, contrast enhancement processing, binarization processing, and graphic bit operation processing on the original table tennis image to obtain the table tennis image to be measured.
[0012] Optionally, the table tennis image preprocessing module is further configured to:
[0013] In the Gaussian denoising process, use the Gaussian function as the weight coefficient, and for each pixel point in the original table tennis image, calculate the weighted average of the pixels around the pixel point as the new pixel value to obtain the table tennis Gaussian denoised image.
[0014] Optionally, the table tennis image preprocessing module is further configured to:
[0015] Convert the table tennis Gaussian denoised image into a grayscale image;
[0016] Calculate the histogram and cumulative distribution function of the grayscale image;
[0017] Normalize the cumulative distribution function to a preset grayscale level range;
[0018] According to the normalized cumulative distribution function, replace each pixel value of the histogram with a new pixel value to obtain the contrast enhanced image.
[0019] Optionally, the table tennis image preprocessing module is further configured to:
[0020] Binarize the contrast enhanced image according to a preset pixel value threshold to obtain a binarized image, and extract the table tennis foreground image;
[0021] Perform an opening operation on the table tennis foreground image to remove the bad noise generated by binarization in the foreground, and obtain the table tennis image to be measured.
[0022] Optionally, the roundness index measurement module is further configured to:
[0023] Adopt the Canny edge detection algorithm to extract the contour model of the table tennis from the table tennis image to be measured, and analyze and calculate the distance between two edge points on the table tennis contour model multiple times as the table tennis diameter, and calculate the average value of the table tennis diameter.
[0024] Optionally, the roundness index measurement module is further configured to:
[0025] Apply Gaussian filtering to the table tennis image to be measured for smoothing processing;
[0026] Calculate the gradient magnitude and direction of each pixel point of the smoothed image, and perform non-maximum suppression on the gradient magnitude to refine the edge;
[0027] Compare the gradient magnitude of each pixel with the gradient magnitudes of two neighboring pixels along the gradient direction, and at the same time use a preset high gradient magnitude threshold and a low gradient magnitude threshold to determine strong edges and weak edges, and obtain the contour model of the table tennis ball by connecting the weak edges and the strong edges;
[0028] Select the largest contour in the table tennis ball contour model as the foreground of the table tennis ball;
[0029] Apply the minimum fitting matrix to the table tennis ball foreground to measure the diameter of the table tennis ball in a certain direction;
[0030] Rotate the table tennis ball foreground through the affine transformation matrix so that different directions of the table tennis ball can be measured;
[0031] For the table tennis ball foreground after each rotation, apply the minimum fitting matrix again, and calculate the distance between two edge points as the diameter of the table tennis ball in this direction;
[0032] Repeat the above rotation and measurement steps, calculate the mean value of the table tennis ball diameters in multiple directions, and obtain the mean value of the table tennis ball diameter.
[0033] Optionally, the roundness qualification evaluation module is further configured to:
[0034] Calculate the roundness error between the table tennis ball and the ideal circle according to the diameter and the mean value of the diameter of the table tennis ball, and determine whether the roundness error is within a preset qualified error range.
[0035] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the electronic device executes the computer program, it loads the table tennis ball roundness detection system according to any one of the embodiments of the present invention.
[0036] The present invention also provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it loads the table tennis ball roundness detection system according to any one of the embodiments of the present invention.
[0037] The present invention has the following advantages:
[0038] The ping-pong ball roundness detection system of the present invention uses a bottom light source to illuminate the ping-pong ball, and the light penetrates from the bottom of the ping-pong ball and illuminates its entire surface. Through image processing and contour analysis algorithms, the image of the ping-pong ball under the illumination of the light source is captured and analyzed, and the contour of the ping-pong ball is extracted from the processed image. According to the extracted contour information, the roundness index of the ping-pong ball is calculated. The roundness detection is achieved by comparing the contour with the ideal circle, and the calculated roundness index is output for evaluating whether the roundness of the ping-pong ball meets the standard. The ping-pong ball roundness detection system of the present invention has a fully automated detection process, can quickly process and provide real-time feedback results. During the production process, continuous monitoring of the roundness and diameter of each ping-pong ball can be realized, significantly improving production efficiency and reducing manual intervention, which makes the application of the system in large-scale production more feasible. And a series of image processing optimizations of the ping-pong ball roundness detection system for the ping-pong ball image solve the influence of external interference on the measurement results, further improving the measurement accuracy and stability of the system. And a special device layout method combined with a high-resolution industrial camera is used to capture the ping-pong ball image, ensuring that the image quality is sufficient to support micron-level precise measurement, and combined with a high-precision image processing algorithm, micron-level measurement of the roundness and diameter of the ping-pong ball is realized, improving the accuracy of roundness qualification evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 FIG. is a structural block diagram of a ping-pong ball roundness detection system provided by an embodiment of the present invention;
[0040] Figure 2 FIG. is a schematic diagram of a Gaussian denoised ping-pong ball provided by an embodiment of the present invention;
[0041] Figure 3 FIG. is a schematic diagram of a grayscale processed ping-pong ball provided by an embodiment of the present invention;
[0042] Figure 4 FIG. is a schematic diagram of a binarized ping-pong ball provided by an embodiment of the present invention;
[0043] Figure 5 FIG. is a schematic diagram of a ping-pong ball processed by graphic bit operation provided by an embodiment of the present invention;
[0044] Figure 6 FIG. is a schematic diagram of a Canny edge detection ping-pong ball contour model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0046] Refer to Figure 1, showing a structural block diagram of a table tennis roundness detection system provided in an embodiment of the present invention, which may specifically include the following modules:
[0047] A table tennis ball image acquisition module, which is used to collect the original image of the table tennis ball through a high-resolution camera and backlight technology when illuminating the table tennis ball in a closed space and using a bottom light source adjustment system; the bottom light source adjustment system penetrates from the bottom of the table tennis ball and illuminates the entire surface of the table tennis ball;
[0048] A table tennis ball image preprocessing module, which is used to perform image processing on the original image of the table tennis ball to obtain an image of the table tennis ball to be measured;
[0049] A roundness index measurement module, which is used to extract the contour model of the table tennis ball from the image of the table tennis ball to be measured and calculate the roundness index of the table tennis ball according to the extracted contour model of the table tennis ball;
[0050] A roundness qualification evaluation module, which is used to evaluate 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 the ideal circle.
[0051] The table tennis roundness detection system developed by the present invention has a fully automated detection process, can quickly process and give real-time feedback on the results. During the production process, continuous monitoring of the roundness and diameter of each table tennis ball can be achieved. Specifically, the table tennis roundness detection system of the present invention 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 combined action of these modules, when illuminating the table tennis ball with a bottom light source, the light penetrates from the bottom of the table tennis ball and illuminates its entire surface, the table tennis roundness detection system captures and analyzes the image of the table tennis ball under the illumination of the light source through image processing and contour analysis algorithms, 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, and realizes roundness detection by comparing the contour with the ideal circle, and outputs the calculated roundness index for evaluating whether the roundness of the table tennis ball meets the standard.
[0052] Among them, 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. To overcome the influence brought by factors such as shooting angle and illumination, the present invention adopts a closed space and a bottom light source adjustment system, and uses preprocessing means such as image denoising and contrast enhancement to maximize the image quality.
[0053] In an embodiment of the present invention, the table tennis ball image preprocessing module is further used for:
[0054] Performing Gaussian denoising processing, grayscale processing, contrast enhancement processing, binarization processing, and graphic bit operation processing on the original image of the table tennis ball to obtain an image of the table tennis ball to be measured.
[0055] The ping-pong ball roundness detection system of the present invention not only has a fully automated detection process, can quickly process and provide real-time feedback on the results, but also its ping-pong ball image preprocessing module effectively improves the quality of the original image through a series of advanced image processing techniques, including Gaussian denoising, grayscale conversion, contrast enhancement, binarization, and graphic bit operation processing. Refer to Figures 2 - 5 . These preprocessing steps ensure that even in complex or changing environments, the captured ping-pong ball images can achieve high clarity and high contrast, thus providing a reliable basis for subsequent accurate contour extraction and roundness index calculation. This high-quality image processing ability is closely combined with the fully automated detection function of the system, enhancing the measurement accuracy and reliability of the system and further guaranteeing product quality.
[0056] In an embodiment of the present invention, the ping-pong ball image preprocessing module is further configured to:
[0057] In the Gaussian denoising process, the Gaussian function is used as the weight coefficient, and for each pixel point in the original ping-pong ball image, the weighted average of the pixels around the pixel point is calculated as the new pixel value to obtain the Gaussian denoised ping-pong ball image.
[0058] In this embodiment, denoising methods such as Gaussian blur and mean filtering can be used to reduce the interference of image noise. Among them, Gaussian blur is a linear filtering method that uses the Gaussian function as the weight coefficient. For each pixel point, Gaussian blur calculates the weighted average 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, which controls the degree of blur.
[0061] In an embodiment of the present invention, the ping-pong ball image preprocessing module is further configured to:
[0062] Convert the Gaussian denoised ping-pong ball image into a grayscale image;
[0063] Calculate the histogram and cumulative distribution function of the grayscale image;
[0064] Normalize the cumulative distribution function to a preset grayscale level 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, through techniques such as histogram equalization, the details of the image are enhanced, making the contour of the table tennis ball clearer. Specifically, first, calculate the histogram of the image, and then calculate the cumulative distribution function.
[0067]
[0068] By normalizing the CDF to the range [0, L - 1] (where L is the number of gray levels, such as 256), the new gray value is obtained:
[0069] s(i) = round((L - 1)·CDF(i))
[0070] After generating the equalized image, the equalized image is generated by replacing each pixel value f(x, y) in the original image with the new pixel value s(f(x, y)).
[0071] In an embodiment of the present invention, the table tennis ball image preprocessing module is further configured to:
[0072] Binarize the contrast-enhanced image according to a preset pixel value threshold to obtain a binarized image, and extract the table tennis ball foreground image;
[0073] Perform an opening operation on the table tennis ball foreground image to remove the bad noise generated by binarization in the foreground, and obtain the table tennis ball image to be measured.
[0074] In this embodiment, the image is grayscale processed and then binarized 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, and IR, IG, and IB are the values of the three RGB channels respectively.
[0076]
[0077] x and y are the two-dimensional coordinates of the pixel, and f(x, y) represents the pixel value of the two-dimensional coordinates. If this value is greater than the threshold T, it is 255, otherwise it is 0.
[0078] After binarization, further use graphic bit operations to remove the bad noise generated by binarization in the foreground. The formula used is;
[0079] O(I, S) = D(E(I, S), S)
[0080] Where:
[0081] O(I, S) is the image after the opening operation;
[0082] E(I, S) is the result of the image I after the erosion operation;
[0083] D(I, S) is the result after the dilation operation on the image I.
[0084] In an embodiment of the present invention, the roundness index measurement module is further configured to:
[0085] Adopt the Canny edge detection algorithm to extract the contour model of the table tennis ball from the image to be measured of the table tennis ball, and analyze and calculate the distance between two edge points on the contour model of the table tennis ball multiple times as the diameter of the table tennis ball, and calculate the average value of the diameters of the table tennis ball.
[0086] In an embodiment of the present invention, the roundness index measurement module is further configured to:
[0087] Apply Gaussian filtering to the image to be measured of the table tennis ball for smoothing processing;
[0088] Calculate the gradient magnitude and direction of each pixel point of the smoothed image, and perform non-maximum suppression on the gradient magnitude to refine the edges;
[0089] Compare the gradient magnitude of each pixel with the gradient magnitudes of two neighboring pixels along the gradient direction, and at the same time use a preset high gradient magnitude threshold and a low gradient magnitude threshold to determine strong edges and weak edges, and obtain the contour model of the table tennis ball by connecting the weak edges and the strong edges;
[0090] Select the largest contour in the contour model of the table tennis ball as the foreground of the table tennis ball;
[0091] Apply the minimum fitting matrix to the foreground of the table tennis ball to measure the diameter of the table tennis ball in a certain direction;
[0092] Rotate the foreground of the table tennis ball through the affine transformation matrix so that different directions of the table tennis ball can be measured;
[0093] For the foreground of the table tennis ball after each rotation, apply the minimum fitting matrix again to find the distance between two edge points as the diameter of the table tennis ball in this direction;
[0094] Repeat the above rotation and measurement steps, calculate the average value of the diameters of the table tennis ball in multiple directions, and obtain the average value of the diameters of the table tennis ball.
[0095] The ping-pong ball roundness detection system of the present invention not only has a fully automated detection process, can quickly process and provide real-time feedback on 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 steps such as Gaussian filtering for smoothing, gradient calculation, and non-maximum suppression to effectively extract the contour model of the ping-pong ball from the image to be measured. Further, by applying the minimum fitting matrix to the foreground of the ping-pong ball and using an affine transformation matrix to rotate the foreground of the ping-pong ball, the precise measurement of the diameters of the ping-pong ball in different directions is achieved. This process is repeated to calculate the average value of the diameters of the ping-pong ball in multiple directions, ensuring the consistency and accuracy of the diameter measurement. The combination of this high-precision measurement ability and the fully automated detection function of the system enables continuous monitoring of the roundness and diameter of each ping-pong ball during the production process, not only significantly improving production efficiency but also greatly reducing the need for manual intervention, making the application of the system in large-scale production more efficient and feasible. In addition, due to the improvement of the measurement accuracy, the system can better guarantee the product quality.
[0096] Specifically, referring to Figure 6 , the contour of the ping-pong ball is extracted using algorithms such as Canny edge detection:
[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 the horizontal and vertical Sobel operators, I is the smoothed image, and Gx and Gy are the gradient components.
[0102] Gradient magnitude and direction:
[0103]
[0104] Non-maximum suppression is performed on the gradient magnitude to thin the edges. For each pixel, its gradient magnitude is compared with two neighboring pixels along the gradient direction. Two thresholds (high threshold and low threshold) are used to determine strong edges and weak edges. Finally, the weak edges are connected to the strong edges to finally determine the edges.
[0105] The steps for calculating the diameter of the ping-pong ball include:
[0106] ① First, find the largest contour in the figure, which is the foreground of the ping-pong ball;
[0107] ②Measure the diameter of the table tennis ball in a certain direction through the minimum fitting matrix;
[0108] ③Rotate the foreground through the affine matrix, and then find the distance between two edge points through the minimum fitting matrix as the diameter of the table tennis ball. Repeat the above operations to find the average value of the table tennis ball diameter.
[0109] In an embodiment of the present invention, the roundness qualification evaluation module is further configured to:
[0110] Calculate the roundness error between the table tennis ball and the ideal circle according to the diameter and the average value of the diameter of the table tennis ball, and determine whether the roundness error is within a preset qualified error range.
[0111] In this embodiment, the roundness qualification evaluation module ensures the product quality by comparing the actual measurement data of the table tennis ball with the parameters of the ideal circle. Specifically, based on the previously calculated diameter and its average value of the table tennis ball, the module can calculate the roundness error of each table tennis ball relative to the ideal circle. And compare the calculated roundness error with the preset qualified error range to determine whether the table tennis ball meets the strict production standards. If the roundness error is within the preset range, it indicates that the roundness of the table tennis ball meets the production standards; otherwise, if it is not within this range, it is regarded as not meeting the production standards. This process realizes the automatic evaluation of the quality of the table tennis ball, enabling the table tennis ball roundness detection system to have a fully automated detection process, which can quickly process and provide real-time feedback, significantly improving production efficiency and reducing manual intervention, making the application of the system in large-scale production more feasible.
[0112] The present invention has the following advantages:
[0113] 1. Automated and efficient detection process
[0114] The system of the present invention has a fully automated detection process, which can quickly process and provide real-time feedback. During the production process, continuous monitoring of the roundness and diameter of each table tennis ball can be achieved, significantly improving production efficiency and reducing manual intervention. This makes the application of the system in large-scale production more feasible.
[0115] High-efficiency detection can quickly complete the diameter measurement and roundness judgment of the table tennis ball, shorten the detection cycle, increase the turnover speed of the production line, thereby improving 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, and helping to deeply analyze and optimize the production process.
[0116] 2. High adaptability and flexibility
[0117] Due to the modular design, the system can flexibly adapt to the production environment and working conditions. The system can be widely applied to different production scenarios and has strong versatility.
[0118] 3. Applications of High-Resolution Industrial Cameras
[0119] The present invention uses high-resolution industrial cameras to capture images of table tennis balls, ensuring that the image quality is sufficient to support micron-level precise measurements. The selection and optimization of these cameras provide hardware support for measurement accuracy and are one of the technical bases of the present invention.
[0120] 4. Efficient Image Processing Methods
[0121] The present invention adopts a series of image processing optimization techniques, including image denoising, contrast enhancement, edge detection, etc. In particular, Gaussian denoising is introduced to solve the influence of external interference on the measurement results and further improve the measurement accuracy and stability of the system.
[0122] 5. Micron-Level Roundness and Diameter Measurement Accuracy and Judgment Analysis
[0123] One of the core innovations of the present invention is to use high-precision image processing algorithms and equipment to achieve micron-level measurement of the roundness and diameter of table tennis balls. By combining high-resolution cameras and optimized algorithms, the accuracy has reached a level that cannot be compared with traditional measurement methods. This accuracy can meet the stringent requirements of the precision manufacturing industry for dimensional measurement. Especially in the process of table tennis manufacturing, micron-level accuracy is crucial.
[0124] Roundness is one of the important indicators to evaluate whether the geometric shape of a table tennis ball meets the standard. The present invention extracts the edge contour of the table tennis ball and uses algorithms such as Canny edge detection to extract the contour model of the table tennis ball to calculate the roundness. The diameter is calculated by analyzing the distance between two contour points to judge whether the roundness of the table tennis ball meets the production requirements. In order to achieve high-precision diameter measurement, the present invention rotates the foreground through an affine matrix and then obtains the distance between two edge points as the diameter of the table tennis ball through the minimum fitting matrix. Repeat the above operation to obtain the average value of the table tennis ball diameter and accurately calculate the average diameter of the sphere.
[0125] 6. High-Precision Calculation and Error Analysis:
[0126] Micron-level accuracy measurement requires the system to accurately control various error sources. The present invention conducts systematic error analysis and proposes corresponding compensation strategies to ensure the consistency of measurement results under different conditions.
[0127] In addition, the present 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 dimensional measurement, such as precision machinery, optical components, electronic components, etc.
[0128] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to load the table tennis roundness detection system according to any one of the embodiments of the present invention.
[0129] Specifically, the electronic device includes: a memory and a processor. The memory and the processor are communicatively connected via a bus. A computer program is stored in the memory, and the computer program can run on the processor, thereby loading the table tennis roundness detection system according to any one of the first aspects of the embodiments of the present invention.
[0130] The memory may include a random access memory (RAM) or may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0131] The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0132] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium, on which a computer program / instructions are stored. When the computer program / instructions are executed by a processor, the table tennis roundness detection system according to any one of the first aspects of the embodiments of the present invention is loaded.
[0133] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.
[0134] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices, electronic devices, storage media, or computer program products. Therefore, the embodiments of the present invention can take the form of all-hardware embodiments, all-software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0135] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and purposes of the present invention. The scope of the present invention is defined by the claims and their equivalents.
[0136] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article, or terminal device comprising the said element.
[0137] The above has introduced in detail a table tennis roundness detection system, an electronic device, and a readable storage medium provided by the present invention. Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application. The above embodiments are only preferred embodiments given to fully illustrate the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or transformations made by those skilled in the art on the basis of the present invention are within the protection scope of the present invention.
Claims
1. A table tennis ball roundness detection system, characterized in that: include: A table tennis ball image acquisition module is used to acquire the original image of the table tennis ball through a high-resolution camera and backlight technology when the table tennis ball is illuminated in a confined space and by a bottom light source adjustment system; the bottom light source adjustment system penetrates from the bottom of the table tennis ball and illuminates the entire surface of the table tennis ball; 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 to be measured image, and calculate the roundness index of the table tennis ball according to the extracted contour model of the table tennis ball; The roundness qualification assessment module is used to assess whether the roundness of a table tennis ball meets the production standard based on the difference between the roundness index of the table tennis ball and the ideal circle.
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 point in the original table tennis image, a weighted average value of pixels around the pixel point is calculated as a new pixel value to obtain a table tennis Gaussian denoised image.
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 table tennis Gaussian denoised image to 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; The table tennis foreground image is opened 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, and the distance between two edge points on the table tennis ball contour model is analyzed and calculated multiple times as the table tennis ball diameter, and the mean diameter of the table tennis ball is calculated.
7. The table tennis ball roundness detection system according to claim 4, characterized in that: The roundness index measurement module is also used for: Apply Gaussian filtering to smooth the table tennis image to be measured; 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 two neighboring pixels along the gradient direction, and use the preset high gradient magnitude threshold and low gradient magnitude threshold to determine the strong edge and the weak edge, and obtain the outline model of the table tennis ball by connecting the weak edge with the strong edge; Select the largest contour in the ping-pong ball contour model as the foreground of the ping-pong ball; Apply the minimum fit matrix to the ping-pong ball foreground and 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 rotated ping-pong ball foreground, the minimum fitting matrix is applied again to find 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, calculate the average of the diameters of the ping-pong ball in multiple directions, and obtain the average diameter of the ping-pong ball.
8. The table tennis ball roundness detection system according to claim 1, characterized in that: The roundness conformity assessment module is also used to: According to the diameter and the 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 qualified error range.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the electronic device executes the computer program, the table tennis ball roundness detection system according to any one of claims 1 to 8 is loaded.
10. 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 as described in any one of claims 1 to 8 is loaded.
Citation Information
Patent Citations
Image acquiring and processing method based on FPGA (field programmable gate array) serving as control core
CN102663758A
Grinding crack diameter measurement method based on steel ball grinding crack gradient
CN103712565A
An image denoising method based on depth learning and multi-scale image enhancement
CN109410127A
Riveting hole roundness error detection device and method based on machine vision
CN117091530A
Multi-variety steel ball diameter mutual difference measuring equipment and method
CN118347417A