Billiards target quick identification method and system
By leveraging the synergy of a dual-camera setup and a machine vision platform, the distortion of billiard ball images is quickly cropped and corrected. Combined with masking and binarization to filter noise, rapid and accurate identification of billiard ball numbers is achieved, meeting the intelligent requirements of billiard sports equipment systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN QIDEBAO TECH CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-05-15
AI Technical Summary
In billiards, existing technologies struggle to quickly identify and correct the imaging distortion of multiple small target balls, and they also have difficulty accurately identifying the ball numbers. This is especially true when there are many targets under complex motion patterns, making existing methods inefficient.
A dual-camera setup is used to acquire multi-angle images, which are then quickly cropped and converted in color gamut using a machine vision platform. Elliptic distortion correction, masking, and binarization are then applied to filter noise. Finally, the ball number is identified through mean averaging.
It enables rapid and accurate identification of billiard ball imaging distortion correction and ball number, improves the speed of cut conversion, adapts to intelligent referee recognition, and solves the problem of rapid identification under complex rules in multi-object ball sports.
Smart Images

Figure CN119863610B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent recognition technology for target detection imaging correction, and more specifically, to a method and system for rapid recognition of billiard targets. Background Technology
[0002] Currently, with the rapid development of billiards and its intelligentization, the intelligentization of billiards equipment systems and intelligent referee recognition methods are becoming increasingly important. In multi-target ball sports, billiards is characterized by complex movement patterns, small targets, and a large number of targets, making rapid identification of billiard targets and ball numbers crucial. Specifically, issues such as how to acquire multi-angle images of the target billiard ball and detect target imaging distortion and improve cropping conversion speed, how to correct target imaging distortion, how to add masks to remove noise and obtain the overall outline area of the filtered billiard ball, how to identify the outline and ball number of the billiard ball, and how to quickly calculate and identify the specific ball number of the target billiard ball from the outline area remain to be solved. Therefore, it is necessary to propose a rapid billiards target recognition method and system to at least partially solve the problems existing in the current technology. Summary of the Invention
[0003] The summary of this invention introduces a series of simplified concepts, which will be further explained in detail in the detailed description section. The summary of this invention does not mean that it attempts to limit the key features and essential technical features of the claimed technical solution, nor does it mean that it attempts to determine the scope of protection of the claimed technical solution.
[0004] To at least partially solve the above problems, the present invention provides a method for rapid identification of billiard targets, comprising:
[0005] The S100 acquires multi-angle images of the target billiard ball through a dual-camera setup, quickly crops the images and performs the first color gamut conversion through a machine vision platform, and corrects elliptic distortion to obtain a true circular image of the billiard ball with elliptic distortion correction.
[0006] S200: Add a mask to the elliptic distortion-corrected true circle image of the billiard ball imaging, perform the first binarization process and filter noise, and obtain the overall outline area of the denoised billiard ball.
[0007] S300 performs a second color gamut conversion and a second binarization process in the overall outline area of the billiard ball to identify the white area of the billiard ball outline, filter noise in the white area, and calculate and identify the size of the ball number.
[0008] The S400, based on the elliptical distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, removes the white area and filters noise, performs mean averaging on the remaining color area of the billiard ball outline, and quickly calculates and identifies the specific number of the target billiard ball.
[0009] Preferably, S100 includes:
[0010] S101 captures multi-angle images of multiple target billiard balls using a dual-camera setup, and quickly crops the multi-angle images of the target billiard balls using a machine vision platform to obtain a cropped matrix region image.
[0011] S102, Perform the first color gamut conversion on the cropped matrix region image to obtain the color gamut converted matrix region image;
[0012] S103, based on the color gamut conversion image of the matrix region, perform elliptic distortion correction on the elliptic distortion matrix region of the billiard ball image in the color gamut conversion image of the matrix region, and obtain a true circular correction image of the elliptic distortion of the billiard ball image.
[0013] Preferably, S200 includes:
[0014] S201, Add a mask to the elliptic distortion correction image of the billiard ball to cover the non-billiard ball area and obtain the color gamut conversion mask image of the billiard ball.
[0015] S202: By performing the first binarization process on the color gamut conversion mask image of the billiard ball, the overall outline of the billiard ball is identified, and noise is filtered out to obtain the overall outline region of the denoised billiard ball.
[0016] Preferably, S300 includes:
[0017] S301, perform a second color gamut conversion in the overall outline area of the noise-filtering billiard ball to obtain the color gamut converted billiard ball outline area;
[0018] S302, based on the color gamut conversion of the billiard ball outline area, performs a second binarization process, identifies the white area of the billiard ball outline and filters noise in the white area, and calculates and identifies the size of the ball number;
[0019] The parameters of the white area of the billiard ball outline include: the shape of the white area of the billiard ball outline, the perimeter of the white area of the billiard ball outline, and the area of the white area of the billiard ball outline.
[0020] Preferably, S400 includes:
[0021] S401. Based on the elliptic distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, the white area is removed and noise is filtered out, leaving only the billiard ball outline area to obtain the remaining color area of the billiard ball outline.
[0022] S402, perform a mean-average operation on the remaining color area of the billiard ball outline to obtain the average value of the remaining color; quickly calculate and identify the specific ball number of the target billiard ball based on the average value of the remaining color.
[0023] This invention provides a rapid billiards target recognition system, comprising:
[0024] The rapid cropping ellipse distortion correction module acquires multi-angle images of the target billiard ball through a dual-camera setup, rapidly crops the images and performs the first color gamut conversion through a machine vision platform, and then performs elliptic distortion correction to obtain a true round image of the billiard ball with elliptic distortion correction.
[0025] The mask processing noise filtering module adds a mask to the elliptical distortion correction image of the billiard ball, performs the first binarization process and filters noise, and obtains the overall outline area of the noise-filtered billiard ball.
[0026] The color gamut conversion and outline size recognition module performs a second color gamut conversion and a second binarization process in the overall outline area of the noise-filtering billiard ball to identify the white area of the billiard ball outline, filter noise in the white area, and calculate and recognize the size of the ball number.
[0027] The regional mean ball number recognition module, based on the elliptical distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, removes the white area and filters noise, performs mean calculation on the remaining color area of the billiard ball outline, and quickly calculates and identifies the specific ball number of the target billiard ball.
[0028] Preferably, the fast ellipse distortion correction module includes:
[0029] The machine vision fast cropping unit captures multi-angle images of multiple target billiard balls using a dual-camera setup, and then rapidly crops these multi-angle images of the target billiard balls using a machine vision platform to obtain a cropped matrix region image.
[0030] The matrix region color gamut conversion unit performs the first color gamut conversion on the cropped matrix region image to obtain the matrix region color gamut converted image.
[0031] The billiards imaging elliptic correction unit corrects the elliptic distortion matrix region of the billiards image in the matrix region color gamut conversion image based on the matrix region color gamut conversion image, and obtains a true circular correction image of the elliptic distortion of the billiards image.
[0032] Preferably, the mask processing noise filtering module includes:
[0033] A mask is added to the elliptic distortion correction image of the billiard ball imaging to cover the non-billiard ball area and obtain the color gamut conversion mask image of the billiard ball.
[0034] The contour recognition and noise filtering unit performs a first binarization process on the billiard ball color gamut conversion mask image to identify the overall contour of the billiard ball, filter noise, and obtain the overall contour region of the noise-filtered billiard ball.
[0035] Preferably, the color gamut conversion contour size recognition module includes:
[0036] The outline region color gamut conversion unit performs a second color gamut conversion in the overall outline region of the noise-filtering billiard ball to obtain the color gamut converted outline region of the billiard ball.
[0037] The white recognition unit in the conversion area performs a second binarization process based on the color gamut conversion of the billiard ball outline area, identifies the white area of the billiard ball outline, filters noise in the white area, and calculates and identifies the size of the ball.
[0038] The parameters of the white area of the billiard ball outline include: the shape of the white area of the billiard ball outline, the perimeter of the white area of the billiard ball outline, and the area of the white area of the billiard ball outline.
[0039] Preferably, the regional mean ball number recognition module includes:
[0040] The remaining color region filtering unit, based on the true circular correction image of the elliptical distortion of the billiard ball image and the parameters of the white region of the billiard ball outline, removes the white region and filters noise, retaining only the billiard ball outline region, thus obtaining the remaining color region of the billiard ball outline.
[0041] The mean-based ball number recognition unit performs a mean-based calculation on the remaining color area of the billiard ball outline to obtain the average value of the remaining colors; based on the average value of the remaining colors, it quickly calculates and identifies the specific ball number of the target billiard ball.
[0042] The beneficial effects of the above technical solution include:
[0043] This invention provides a method and system for rapid target billiards recognition. It acquires multi-angle images of the target billiards using a dual-camera setup, rapidly crops the images and performs a first color gamut conversion using a machine vision platform, and corrects elliptic distortion to obtain a properly rounded image of the billiards. A mask is added to this properly rounded image, and a first binarization process is performed to filter noise, obtaining the overall outline region of the denoised billiards. A second color gamut conversion and a second binarization process are performed within this denoised outline region to identify the white area of the billiards outline, filter noise in this area, and calculate and identify the size of the billiards. Based on the properly rounded image and the white area of the billiards outline, the system identifies the target billiards. This system can quickly calculate and identify the specific ball number of a target billiard ball by removing white areas and filtering noise, averaging the remaining color area of the billiard ball outline, and acquiring multi-angle images of the target billiard ball to detect image distortion and improve cropping conversion speed. It can correct image distortion, add masks to remove noise, and obtain the overall outline area of the filtered billiard ball. It can identify the outline and ball number of the billiard ball. It can quickly calculate and identify the specific ball number of a target billiard ball within the outline area. It is adaptable to intelligent billiard sports equipment systems and intelligent referee recognition, and can solve the problem of rapid identification of billiard ball targets and numbers in multi-target ball sports, characterized by complex movement patterns, small size, and large number of targets.
[0044] The present invention relates to a method and system for rapid identification of billiard targets. Other advantages, objectives and features of the present invention will be partly apparent from the following description, and partly understood by those skilled in the art through study and practice of the invention. Attached Figure Description
[0045] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0046] Figure 1 This is a diagram of an embodiment of the billiards target rapid identification method and system of the present invention.
[0047] Figure 2 This is a diagram illustrating an application embodiment of the billiards target rapid identification method and system of the present invention.
[0048] Figure 3 This is a diagram illustrating another application embodiment of the billiards target rapid identification method and system of the present invention. Detailed Implementation
[0049] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, so that those skilled in the art can implement it based on the specification; as shown in the figures, the present invention provides a method for rapid identification of billiard targets, including:
[0050] The S100 acquires multi-angle images of the target billiard ball through a dual-camera setup, quickly crops the images and performs the first color gamut conversion through a machine vision platform, and corrects elliptic distortion to obtain a true circular image of the billiard ball with elliptic distortion correction.
[0051] S200: Add a mask to the elliptic distortion-corrected true circle image of the billiard ball imaging, perform the first binarization process and filter noise, and obtain the overall outline area of the denoised billiard ball.
[0052] S300 performs a second color gamut conversion and a second binarization process in the overall outline area of the billiard ball to identify the white area of the billiard ball outline, filter noise in the white area, and calculate and identify the size of the ball number.
[0053] The S400, based on the elliptical distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, removes the white area and filters noise, performs mean averaging on the remaining color area of the billiard ball outline, and quickly calculates and identifies the specific number of the target billiard ball.
[0054] The principle and effect of the above technical solution are as follows: This invention provides a method for rapid identification of billiard balls, including: acquiring multi-angle images of the target billiard ball through a dual-camera group; rapidly cropping the image and performing a first color gamut conversion through a machine vision platform, and performing elliptic distortion correction to obtain a true circular correction image of the billiard ball image; adding a mask to the true circular correction image of the billiard ball image, performing a first binarization process and filtering noise to obtain the overall outline region of the denoised billiard ball; performing a second color gamut conversion and a second binarization process in the overall outline region of the denoised billiard ball to identify the white area of the billiard ball outline, filtering noise in the white area, and calculating and identifying the size of the ball; based on the true circular correction image of the billiard ball image and the parameters of the white area of the billiard ball outline, removing the white area and filtering noise, and retrieving the remaining outline of the billiard ball. The color region is averaged to quickly calculate and identify the specific ball number of the target billiard ball; it can acquire multi-angle images of the target billiard ball and detect target imaging distortion and improve cropping conversion speed; it can correct target imaging distortion, add masks to remove noise and obtain the overall outline area of the filtered billiard ball; it can identify the outline and size of the billiard ball; it can quickly calculate and identify the specific ball number of the target billiard ball from the outline area; it can adapt to the intelligent billiard sports equipment system and intelligent referee recognition, and can solve the problem of rapid identification of billiard target and ball number in multi-target ball sports target recognition with complex billiard movement patterns, small targets, and large numbers; the following steps 1-12 are the program logic of the billiard target rapid identification and color selection algorithm of this invention, and the program processes the image according to the execution order of 1234-abcd:
[0055] 1. Image cropping size: This accelerates recognition and reduces computational load;
[0056] 2. Maintaining a fixed size during scaling: The efficiency of modifying the cropping size is significantly improved, and the complexity affected by subsequent algorithm parameters is significantly reduced;
[0057] 3. Gaussian blur processing: Select the Gaussian blur kernel parameters for image processing to reduce noise and brightness variations in the image due to the influence of light.
[0058] 4. Sphere outline recognition:
[0059] a. Adding a mask: Set the shape and size of the mask to cover irrelevant areas in the image, reducing computation and completely eliminating image information in irrelevant areas; b. Color gamut conversion: Convert the original BGR color gamut to LAB and HSV color gamuts. These two color gamuts can better binarize the image to distinguish the outline of the sphere. By fusing and comparing the results of the LAB and HSV color gamuts, the outline can be obtained better; c. Image binarization: Empirically set the upper and lower limits of LAB and HSV corresponding to the optical definitions, and use these values to binarize the image, turning a color image into a black and white image; d. Edge detection: Perform edge detection on the binarized image to find all the outlines in the image; e. Contour filtering: Filter and filter all the outlines obtained from edge detection, based on the contour closure shape, contour length, and contour area; set corresponding minimum thresholds. Contours smaller than this value are judged as noise and deleted. This yields the final outline of the sphere; f. Image fusion: Fuse the filtered outlines with the original image to obtain an image where only the areas of the sphere have pixels;
[0060] 5. White Contour Recognition: Identifying the white contours on the sphere to obtain a binary image, used to determine the size: a. Color Gamut Conversion: The image (BGR) from step 4.f is converted again using LAB and HSV color gamuts; these two color gamuts can better binarize the image to distinguish the white areas of the sphere; b. Binarization: New upper and lower limits for LAB and HSV corresponding to optical definitions are empirically set, and the image is binarized using these values, turning a color image into a black and white image; c. Edge Detection: Edge detection is performed on the binarized image to find all white contours in the image; d. Contour Filtering: All contours obtained from edge detection are filtered and selected based on contour closure shape, contour length, and contour area; corresponding minimum thresholds are set. Contours smaller than this value are judged as noise and deleted. This yields the final white contours of the sphere; e. Size Recognition: The size of the sphere is determined by calculation parameters, including the number of white areas, area, arc length, aspect ratio of the approximate rectangle, and perimeter-area ratio;
[0061] 6. Color Outline Recognition: Identifying the color outlines on the spheres yields a binary image, which is used to determine the sphere's number.
[0062] a. Color Gamut Conversion: The 4.f image (BGR) is then converted again using LAB and HSV color gamuts. These two color gamuts provide better binarization of the image, allowing for better differentiation of the white areas of the sphere;
[0063] b. Binarization of images: Empirically set new upper and lower limits for LAB and HSV corresponding to optical definitions, and use these values to binarize the image, turning a color image into a black and white image;
[0064] c. Edge detection: Perform edge detection on the binarized image to find all white outlines in the image;
[0065] d. Contour Filtering: All contours obtained from edge detection are filtered and selected based on contour closure shape, contour length, and contour area; corresponding minimum thresholds are set. Contours smaller than this value are judged as noise and deleted. This yields the final contour of the colored region of the sphere.
[0066] 7. Image Fusion: Based on the binary image and corresponding contour obtained in steps 4, 5, and 6, debinarization and image bitwise operations are performed to obtain an image in which only the color areas retain the original color, while other areas are all black;
[0067] 8. Color Calculation: Based on the image in step 7, edge detection is performed to obtain the color contour location information. The average color of the sphere is calculated within the contour area.
[0068] 9. Color Prediction: The average color value obtained in step 8 is increased in the elastic range size; the average color value corresponds to the LAB and HSV values; increasing the elastic range size includes: weakening the recognition requirements and reducing the inability to determine the color due to changes in light or angle that cause the average color value to be out of the database; then compare it with the color range values of the balls learned in advance in the database. When the average value falls into the range value in the database after the elastic increase, it indicates that the ball may be a certain ball in the database.
[0069] 10. Ball Number Judgment: Based on the results of the size and color prediction, logically determine the final result of the ball; if it cannot be determined clearly, return the most likely ball number and the truth value of the result; true indicates that the result is correct, false indicates that the result is uncertain;
[0070] 11. Final Ball Number Determination: Since two cameras are used, each ball will provide two results, including the ball number and the veracity of the result. Based on the above results, the most likely ball number is determined by logical judgment. If the recognition results of two images are consistent, the result is output; otherwise, the final result is determined according to logical judgment.
[0071] 12. Regarding the learning of the ball color range in the database: The average color is obtained through the above algorithm. The maximum and minimum values of the average values obtained from multiple angles of the ball are taken as the color range. Since the lighting environment is different due to different camera installation positions, two sets of parameters are used for the calculation of the algorithm in steps 1-12 above.
[0072] In one embodiment, S100 includes:
[0073] S101 captures multi-angle images of multiple target billiard balls using a dual-camera setup, and quickly crops the multi-angle images of the target billiard balls using a machine vision platform to obtain a cropped matrix region image.
[0074] S102, Perform the first color gamut conversion on the cropped matrix region image to obtain the color gamut converted matrix region image;
[0075] S103, based on the color gamut conversion image of the matrix region, perform elliptic distortion correction on the elliptic distortion matrix region of the billiard ball image in the color gamut conversion image of the matrix region, and obtain a true circular correction image of the elliptic distortion of the billiard ball image.
[0076] The principle and effect of the above technical solution are as follows: Multiple target billiard balls are captured from various angles using a dual-camera system. These multi-angle images are then rapidly cropped using a machine vision platform to obtain a cropped matrix region image. A first color gamut conversion is performed on the cropped matrix region image to obtain a color gamut converted image. Based on the color gamut converted image, the elliptic distortion matrix region of the billiard ball image in the color gamut converted image is corrected to obtain a true-rounded correction image of the billiard ball's elliptic distortion. The process of rapidly cropping the multi-angle images of the target billiard balls using a machine vision platform to obtain the cropped matrix region image includes: the machine vision platform... The multi-angle image of the target billiard ball first identifies the billiard ball outline in areas where the billiard ball color and background color do not overlap. For areas where the billiard ball color and background color overlap, the non-overlapping areas are extended and filled into complete circles using circular arcs. These complete circles are then quickly cropped to obtain a cropped matrix region image. Based on the color gamut conversion image of the matrix region, the elliptic distortion matrix region of the billiard ball image in the color gamut conversion image is corrected to obtain a corrected elliptic distortion image of the billiard ball image. This includes: detecting and calculating the distance between the imaging point of the first camera in the dual-camera group and the first target billiard ball, obtaining the first imaging distance of the first target billiard ball; detecting and calculating... The angle between the central optical axis of the first camera and the center point of the first target billiard ball is used to obtain the first imaging angle of the first target billiard ball; the distance between the imaging point of the second camera and the first target billiard ball is detected and calculated to obtain the second imaging distance of the first target billiard ball; the angle between the central optical axis of the second camera and the center point of the first target billiard ball is detected and calculated to obtain the second imaging angle of the first target billiard ball; based on the first imaging distance and the first imaging angle of the first target billiard ball, the first ellipticity distortion of the first target billiard ball image is calculated; based on the second imaging distance and the second imaging angle of the first target billiard ball, the second ellipticity distortion of the first target billiard ball image is calculated; based on the first ellipticity distortion... The process involves calculating the first adjustment ratio for circular restoration; calculating the second adjustment ratio for circular restoration based on the second eccentricity of elliptic distortion; adjusting the elliptic distortion of the first target billiard ball image according to the ratio range formed by the first and second adjustment ratios for circular restoration, until the elliptic distortion of the first target billiard ball image reaches the set circular restoration degree, so that the elliptic distortion of the first target billiard ball image is restored to a circular shape, and performing true circular correction of the elliptic distortion of the first target billiard ball image; and so on, performing true circular correction of the elliptic distortion of the second target billiard ball image until all target billiard ball images are truly circularly corrected, and obtaining the true circularly corrected image of the billiard ball image.
[0077] In one embodiment, S200 includes:
[0078] S201, Add a mask to the elliptic distortion correction image of the billiard ball to cover the non-billiard ball area and obtain the color gamut conversion mask image of the billiard ball.
[0079] S202: By performing the first binarization process on the color gamut conversion mask image of the billiard ball, the overall outline of the billiard ball is identified, and noise is filtered out to obtain the overall outline region of the denoised billiard ball.
[0080] The principle and effect of the above technical solution are as follows: a mask is added to the elliptical distortion correction image of the billiard ball to cover the non-billiard ball area, and the color gamut conversion mask image of the billiard ball is obtained; by performing the first binarization processing on the color gamut conversion mask image of the billiard ball, the overall outline of the billiard ball is identified, and noise is filtered to obtain the overall outline area of the noise-filtered billiard ball.
[0081] In one embodiment, S300 includes:
[0082] S301, perform a second color gamut conversion in the overall outline area of the noise-filtering billiard ball to obtain the color gamut converted billiard ball outline area;
[0083] S302, based on the color gamut conversion of the billiard ball outline area, performs a second binarization process, identifies the white area of the billiard ball outline and filters noise in the white area, and calculates and identifies the size of the ball number;
[0084] The parameters of the white area of the billiard ball outline include: the shape of the white area of the billiard ball outline, the perimeter of the white area of the billiard ball outline, and the area of the white area of the billiard ball outline.
[0085] The principle and effect of the above technical solution are as follows: A second color gamut conversion is performed on the overall outline area of the billiard ball to obtain the color gamut converted billiard ball outline area; based on the color gamut converted billiard ball outline area, a second binarization process is performed to identify the white area of the billiard ball outline and filter noise in the white area, calculating and identifying the ball's size; the parameters of the white area of the billiard ball outline include: the shape, perimeter, and area of the white area of the billiard ball outline; based on the color gamut converted billiard ball outline area, the second binarization process is performed to identify the white area of the billiard ball outline, filter noise in the white area, and calculate and identify the ball's size, including: based on the color gamut converted billiard ball outline area, a second binarization process is performed to identify the white area of the billiard ball outline; based on the parameters of the white area of the billiard ball outline, noise in the white area is filtered, retaining the white area after noise filtering; based on the noise-filtered white area, the ball's size is calculated and identified.
[0086] In one embodiment, S400 includes:
[0087] S401. Based on the elliptic distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, the white area is removed and noise is filtered out, leaving only the billiard ball outline area to obtain the remaining color area of the billiard ball outline.
[0088] S402, perform a mean-average operation on the remaining color area of the billiard ball outline to obtain the average value of the remaining color; quickly calculate and identify the specific ball number of the target billiard ball based on the average value of the remaining color.
[0089] The principle and effect of the above technical solution are as follows: Based on the elliptical distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, the white area is removed and noise is filtered out, leaving only the billiard ball outline area to obtain the remaining color area of the billiard ball outline; the remaining color area of the billiard ball outline is averaged to obtain the average value of the remaining color; the specific ball number of the target billiard ball is quickly calculated and identified based on the average value of the remaining color; the specific ball number of the target billiard ball can be quickly calculated and identified from the billiard ball outline area; it can adapt to the intelligent billiard sports equipment system and intelligent referee recognition, and can solve the problem of rapid identification of billiard ball targets and ball numbers in multi-target ball sports target recognition with complex billiard ball movement patterns, small targets, and large numbers;
[0090] Logical judgment is made based on the color selection results from the dual cameras:
[0091] Because the angle at which the billiard ball reaches the camera varies and the reflectivity of the surface of different brands of billiard balls differs, the results from a single camera are prone to errors, especially in color judgment. Therefore, using dual cameras for shooting, detection, and recognition, followed by logical judgment of the detection and recognition results, significantly improves the accuracy of color selection and recognition.
[0092] The recognition result of a single camera includes the following information: 1. Large or small ball. The recognition result for large or small ball is unique, and this uniqueness reflects whether the ball being recognized is large or small; 2. The ball number recognition result is not accurate. For example, for ball number 11 (red), if a large area of the white part is aligned with the camera, while only a small ring of the colored area is visible, due to different lighting conditions, its average color may fall within the recognition range of multiple balls; the final color recognition result may be as follows: ball number 3, 11, 12, or 13; 3. The judgment result output in the final result; 4. The truth value reflects the degree of truthfulness of the recognition result.
[0093] Individual camera logic judgment:
[0094] Scenario 1: Ball number color recognition is unique; the final result is presented based on the identification of large and small numbers; for example:
[0095] Ball number and color: 3; Size: Small; Final result: Ball number 3; Truth value: True;
[0096] Ball color: 3; Size: Large; Final result: Ball number 11; Truth value: True;
[0097] Similarly, if the color is 11, then ball number 11 and ball number 3 have the same color, and the final result will vary depending on the size of the ball.
[0098] Scenario 2: The ball number and color are not unique, but the colors of the same size are all in the results;
[0099] Ball number and color: 3, 11, 12; Size: Small; Final result: Ball number 3; Truth value: True;
[0100] Ball number and color: 3, 11, 12; Size: Large; Final result: Ball number 11; Truth value: True;
[0101] Because 3 and 11 are the same color, according to the statistical analysis of recognition, when a group of the same color appears, the accuracy of the result is very high.
[0102] Scenario 3: The ball number color is not unique, and no balls of the same color appear in the results;
[0103] Color: 11, 12, 13; Size: Small; Final Result: Small Ball; Truth Value: False;
[0104] Color: 11, 12, 13; Size: Large; Final Result: Large Ball; Truth Value: False;
[0105] Scenario 4: No color recognition result:
[0106] Color: None; Size: Small; Final Result: Small Ball; Truth Value: False;
[0107] Color: None; Size: Large; Final Result: Large Ball; Truth Value: False;
[0108] The above is the judgment logic for the recognition result of a single camera;
[0109] Logical judgments are made based on the results from both cameras. These logical judgments include:
[0110] Due to actual installation conditions, the recognition results of camera B are generally more accurate. Therefore, when the results of cameras A and B are inconsistent, the result of camera B will be preferred.
[0111] Scenario 1: If the results from cameras A and B are consistent, output the result directly, and the truth value of the result is true;
[0112] Scenario 2: If both A and B result in a small or large ball, the truth value of this result is false.
[0113] Camera A: Color result; Camera B: Color result; Final result: Color from Camera B;
[0114] Camera A: No color result; Camera B: Color result; Final result: The color from Camera B;
[0115] Camera A: Color result; Camera B: No color result; Final result: Color from Camera A;
[0116] Scenario 3: The size of the results from cameras A and B is inconsistent. Output the size of camera B, and judge the color as follows. The true value of this result is false.
[0117] Camera A: Color result; Camera B: Color result; Final result: Color from Camera B;
[0118] Camera A: No color result; Camera B: Color result; Final result: The color from Camera B;
[0119] Camera A: Color result; Camera B: No color result; Final result: Color from Camera A;
[0120] Ball placement logic judgment: If the logic judgment of the dual cameras is true, the ball is placed first in the ball position that needs to ensure the accuracy of the result; otherwise, the ball is placed in the non-critical ball position in sequence.
[0121] The dual-camera setup significantly improves recognition efficiency and accuracy in various scenarios, such as recognizing a large number of rolling balls.
[0122] This invention provides a rapid billiards target recognition system, comprising:
[0123] The rapid cropping ellipse distortion correction module acquires multi-angle images of the target billiard ball through a dual-camera setup, rapidly crops the images and performs the first color gamut conversion through a machine vision platform, and then performs elliptic distortion correction to obtain a true round image of the billiard ball with elliptic distortion correction.
[0124] The mask processing noise filtering module adds a mask to the elliptical distortion correction image of the billiard ball, performs the first binarization process and filters noise, and obtains the overall outline area of the noise-filtered billiard ball.
[0125] The color gamut conversion and outline size recognition module performs a second color gamut conversion and a second binarization process in the overall outline area of the noise-filtering billiard ball to identify the white area of the billiard ball outline, filter noise in the white area, and calculate and recognize the size of the ball number.
[0126] The regional mean ball number recognition module, based on the elliptical distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, removes the white area and filters noise, performs mean calculation on the remaining color area of the billiard ball outline, and quickly calculates and identifies the specific ball number of the target billiard ball.
[0127] The principle and effect of the above technical solution are as follows: This invention provides a rapid billiards target recognition system, including: a rapid cropping ellipse distortion correction module 100, which acquires multi-angle images of the target billiards through a dual-camera group, rapidly crops the images and performs a first color gamut conversion through a machine vision platform, and performs elliptic distortion correction to obtain a true circular correction image of the billiards image with elliptic distortion; a mask processing noise filtering module 200, which adds a mask to the true circular correction image of the billiards image with elliptic distortion, performs a first binarization process and filters noise to obtain the overall outline area of the noise-filtered billiards; a color gamut conversion outline size recognition module 300, which performs a second color gamut conversion and a second binarization process in the overall outline area of the noise-filtered billiards, identifies the white area of the billiards outline, filters noise in the white area, and calculates and identifies the size of the ball; and a regional mean ball number recognition module 400, which, based on the true circular correction image of the billiards image with elliptic distortion and... The parameters of the white area of the billiard ball outline are used to remove the white area and filter noise. The remaining color area of the billiard ball outline is averaged to quickly calculate and identify the specific number of the target billiard ball. It can acquire multi-angle images of the target billiard ball and detect target imaging distortion and improve cropping conversion speed. It can correct target imaging distortion, add masks to remove noise, and obtain the overall outline area of the filtered billiard ball. It can identify the billiard ball outline and its size. It can quickly calculate and identify the specific number of the target billiard ball from the outline area. It can adapt to intelligent billiard sports equipment systems and intelligent referee recognition, and can solve the problem of quickly identifying billiard ball targets and numbers in multi-target ball sports with complex movement patterns, small targets, and a large number of targets. Steps 1-12 are the program logic of the billiard ball target rapid identification and color selection algorithm of this invention. The program processes the image according to the execution order 1234-abcd:
[0128] 1. Image cropping size: This accelerates recognition and reduces computational load;
[0129] 2. Maintaining a fixed size during scaling: The efficiency of modifying the cropping size is significantly improved, and the complexity affected by subsequent algorithm parameters is significantly reduced;
[0130] 3. Gaussian blur processing: Select the Gaussian blur kernel parameters for image processing to reduce noise and brightness variations in the image due to the influence of light.
[0131] 4. Sphere outline recognition:
[0132] a. Adding a mask: Set the shape and size of the mask to cover irrelevant areas in the image, reducing computation and completely eliminating image information in irrelevant areas; b. Color gamut conversion: Convert the original BGR color gamut to LAB and HSV color gamuts. These two color gamuts can better binarize the image to distinguish the outline of the sphere. By fusing and comparing the results of the LAB and HSV color gamuts, the outline can be obtained better; c. Image binarization: Empirically set the upper and lower limits of LAB and HSV corresponding to the optical definitions, and use these values to binarize the image, turning a color image into a black and white image; d. Edge detection: Perform edge detection on the binarized image to find all the outlines in the image; e. Contour filtering: Filter and filter all the outlines obtained from edge detection, based on the contour closure shape, contour length, and contour area; set corresponding minimum thresholds. Contours smaller than this value are judged as noise and deleted. This yields the final outline of the sphere; f. Image fusion: Fuse the filtered outlines with the original image to obtain an image where only the areas of the sphere have pixels;
[0133] 5. White Contour Recognition: Identifying the white contours on the sphere to obtain a binary image, used to determine the size: a. Color Gamut Conversion: The image (BGR) from step 4.f is converted again using LAB and HSV color gamuts; these two color gamuts can better binarize the image to distinguish the white areas of the sphere; b. Binarization: New upper and lower limits for LAB and HSV corresponding to optical definitions are empirically set, and the image is binarized using these values, turning a color image into a black and white image; c. Edge Detection: Edge detection is performed on the binarized image to find all white contours in the image; d. Contour Filtering: All contours obtained from edge detection are filtered and selected based on contour closure shape, contour length, and contour area; corresponding minimum thresholds are set. Contours smaller than this value are judged as noise and deleted. This yields the final white contours of the sphere; e. Size Recognition: The size of the sphere is determined by calculation parameters, including the number of white areas, area, arc length, aspect ratio of the approximate rectangle, and perimeter-area ratio;
[0134] 6. Color Outline Recognition: Identifying the color outlines on the spheres yields a binary image, which is used to determine the sphere's number.
[0135] a. Color Gamut Conversion: The 4.f image (BGR) is then converted again using LAB and HSV color gamuts. These two color gamuts provide better binarization of the image, allowing for better differentiation of the white areas of the sphere;
[0136] b. Binarization of images: Empirically set new upper and lower limits for LAB and HSV corresponding to optical definitions, and use these values to binarize the image, turning a color image into a black and white image;
[0137] c. Edge detection: Perform edge detection on the binarized image to find all white outlines in the image;
[0138] d. Contour Filtering: All contours obtained from edge detection are filtered and selected based on contour closure shape, contour length, and contour area; corresponding minimum thresholds are set. Contours smaller than this value are judged as noise and deleted. This yields the final contour of the colored region of the sphere.
[0139] 7. Image Fusion: Based on the binary image and corresponding contour obtained in steps 4, 5, and 6, debinarization and image bitwise operations are performed to obtain an image in which only the color areas retain the original color, while other areas are all black;
[0140] 8. Color Calculation: Based on the image in step 7, edge detection is performed to obtain the color contour location information. The average color of the sphere is calculated within the contour area.
[0141] 9. Color Prediction: The average color value obtained in step 8 is increased in the elastic range size; the average color value corresponds to the LAB and HSV values; increasing the elastic range size includes: weakening the recognition requirements and reducing the inability to determine the color due to changes in light or angle that cause the average color value to be out of the database; then compare it with the color range values of the balls learned in advance in the database. When the average value falls into the range value in the database after the elastic increase, it indicates that the ball may be a certain ball in the database.
[0142] 10. Ball Number Judgment: Based on the results of the size and color prediction, logically determine the final result of the ball; if it cannot be determined clearly, return the most likely ball number and the truth value of the result; true indicates that the result is correct, false indicates that the result is uncertain;
[0143] 11. Final Ball Number Determination: Since two cameras are used, each ball will provide two results, including the ball number and the veracity of the result. Based on the above results, the most likely ball number is determined by logical judgment. If the recognition results of two images are consistent, the result is output; otherwise, the final result is determined according to logical judgment.
[0144] 12. Regarding the learning of the ball color range in the database: The average color is obtained through the above algorithm. The maximum and minimum values of the average values obtained from multiple angles of the ball are taken as the color range. Since the lighting environment is different due to different camera installation positions, two sets of parameters are used for the calculation of the algorithm in steps 1-12 above.
[0145] In one embodiment, the fast ellipse distortion correction module includes:
[0146] The machine vision fast cropping unit captures multi-angle images of multiple target billiard balls using a dual-camera setup, and then rapidly crops these multi-angle images of the target billiard balls using a machine vision platform to obtain a cropped matrix region image.
[0147] The matrix region color gamut conversion unit performs the first color gamut conversion on the cropped matrix region image to obtain the matrix region color gamut converted image.
[0148] The billiards imaging elliptic correction unit corrects the elliptic distortion matrix region of the billiards image in the matrix region color gamut conversion image based on the matrix region color gamut conversion image, and obtains a true circular correction image of the elliptic distortion of the billiards image.
[0149] The principle and effect of the above technical solution are as follows: The rapid cropping ellipse distortion correction module includes: a machine vision rapid cropping unit, which captures multi-angle images of multiple target billiard balls using a dual-camera setup, and rapidly crops these images using a machine vision platform to obtain a cropped matrix region image; a matrix region color gamut conversion unit, which performs a first color gamut conversion on the cropped matrix region image to obtain a matrix region color gamut converted image; and a billiard ball imaging elliptic correction unit, which, based on the matrix region color gamut converted image, corrects the elliptic distortion matrix region of the billiard ball image in the matrix region color gamut converted image to obtain a true round correction image of the elliptic distortion in the billiard ball imaging; and the multi-angle cropping unit captures multiple target billiard balls. The image is quickly cropped using a machine vision platform to obtain a cropped matrix region image. This process includes: the machine vision platform first identifies the non-overlapping areas of the billiard ball's color and background color based on multi-angle images of the target billiard ball. For areas where the billiard ball's color and background color overlap, the non-overlapping areas are extended and filled with circular arcs to form a complete circle. This completed circle area is then quickly cropped to obtain the cropped matrix region image. Based on the color gamut conversion image of the matrix region, the elliptic distortion matrix area of the billiard ball image in the color gamut conversion image is corrected to obtain a corrected elliptic distortion image of the billiard ball image. This includes: separately detecting and calculating the imaging points of the first camera and the first... The system calculates the distance to the target billiard ball to obtain its first imaging distance; it detects and calculates the angle between the central optical axis of the first camera and the center point of the first target billiard ball to obtain its first imaging angle; it detects and calculates the distance between the imaging point of the second camera and the first target billiard ball to obtain its second imaging distance; it detects and calculates the angle between the central optical axis of the second camera and the center point of the first target billiard ball to obtain its second imaging angle; based on the first imaging distance and the first imaging angle of the first target billiard ball, it calculates the first ellipticity distortion of the first target billiard ball image; based on the second imaging distance and the second imaging angle of the first target billiard ball, it calculates the second ellipticity distortion of the first target billiard ball image. Based on the first eccentricity of elliptic distortion, calculate the first adjustment ratio for circular restoration; based on the second eccentricity of elliptic distortion, calculate the second adjustment ratio for circular restoration; based on the ratio range formed by the first and second adjustment ratios for circular restoration, adjust the elliptic distortion of the first target billiard ball image until the elliptic distortion of the first target billiard ball image reaches the set circular restoration degree, so that the elliptic distortion of the first target billiard ball image is restored to a perfect circle, and perform true circular correction of the elliptic distortion of the first target billiard ball image; sequentially perform true circular correction of the elliptic distortion of the second target billiard ball image until the elliptic distortion of all target billiard balls image is corrected, and obtain the true circular correction image of the elliptic distortion of the billiard ball image.
[0150] In one embodiment, the mask processing noise filtering module includes:
[0151] A mask is added to the elliptic distortion correction image of the billiard ball imaging to cover the non-billiard ball area and obtain the color gamut conversion mask image of the billiard ball.
[0152] The contour recognition and noise filtering unit performs a first binarization process on the billiard ball color gamut conversion mask image to identify the overall contour of the billiard ball, filter noise, and obtain the overall contour region of the noise-filtered billiard ball.
[0153] The principle and effect of the above technical solution are as follows: The mask processing noise filtering module includes: a mask adding region occlusion unit, which adds a mask to the elliptical distortion true circle correction image of the billiard ball imaging to cover the non-billiard ball area and obtain the billiard ball color gamut conversion mask image; and a contour recognition noise filtering unit, which performs the first binarization processing on the billiard ball color gamut conversion mask image to identify the overall contour of the billiard ball and filter noise to obtain the noise-filtered overall contour area of the billiard ball.
[0154] In one embodiment, the color gamut conversion contour size recognition module includes:
[0155] The outline region color gamut conversion unit performs a second color gamut conversion in the overall outline region of the noise-filtering billiard ball to obtain the color gamut converted outline region of the billiard ball.
[0156] The white recognition unit in the conversion area performs a second binarization process based on the color gamut conversion of the billiard ball outline area, identifies the white area of the billiard ball outline, filters noise in the white area, and calculates and identifies the size of the ball.
[0157] The parameters of the white area of the billiard ball outline include: the shape of the white area of the billiard ball outline, the perimeter of the white area of the billiard ball outline, and the area of the white area of the billiard ball outline.
[0158] The principle and effect of the above technical solution are as follows: The color gamut conversion outline size recognition module includes: an outline region color gamut conversion unit, which performs a second color gamut conversion in the overall outline region of the noise-filtering billiard ball to obtain the color gamut converted billiard ball outline region; a conversion region white recognition unit, which performs a second binarization process based on the color gamut converted billiard ball outline region to identify the white area of the billiard ball outline and filter noise in the white area, and calculate and recognize the size of the ball; the parameters of the white area of the billiard ball outline include: the shape of the white area of the billiard ball outline, the perimeter of the white area of the billiard ball outline, and the area of the white area of the billiard ball outline; the second binarization process based on the color gamut converted billiard ball outline region to identify the white area of the billiard ball outline, filter noise in the white area, and calculate and recognize the size of the ball includes: performing a second binarization process based on the color gamut converted billiard ball outline region to identify the white area of the billiard ball outline; filtering noise in the white area based on the parameters of the white area of the billiard ball outline, retaining the white area after noise filtering; and calculating and recognizing the size of the ball based on the noise-filtered white area.
[0159] In one embodiment, the regional mean ball number recognition module includes:
[0160] The remaining color region filtering unit, based on the true circular correction image of the elliptical distortion of the billiard ball image and the parameters of the white region of the billiard ball outline, removes the white region and filters noise, retaining only the billiard ball outline region, thus obtaining the remaining color region of the billiard ball outline.
[0161] The mean-based ball number recognition unit performs a mean-based calculation on the remaining color area of the billiard ball outline to obtain the average value of the remaining colors; based on the average value of the remaining colors, it quickly calculates and identifies the specific ball number of the target billiard ball.
[0162] The principle and effect of the above technical solution are as follows: The regional average ball number recognition module includes: a remaining color region filtering unit, which, based on the elliptical distortion correction image of the billiard ball and the parameters of the white region of the billiard ball outline, removes the white region and filters noise, retaining only the billiard ball outline region to obtain the remaining color region of the billiard ball outline; an average calculation ball number fast recognition unit, which performs an average calculation on the remaining color region of the billiard ball outline to obtain the average value of the remaining color; and quickly calculates and identifies the specific ball number of the target billiard ball based on the average value of the remaining color; it can quickly calculate and identify the specific ball number of the target billiard ball in the billiard ball outline region; it can adapt to the intelligent billiard sports equipment system and intelligent referee recognition, and can solve the problem of rapid identification of billiard ball targets and ball numbers in multi-target ball sports target recognition with complex billiard ball movement patterns, small targets, and large numbers;
[0163] Logical judgment is made based on the color selection results from the dual cameras:
[0164] Because the angle at which the billiard ball reaches the camera varies and the reflectivity of the surface of different brands of billiard balls differs, the results from a single camera are prone to errors, especially in color judgment. Therefore, using dual cameras for shooting, detection, and recognition, followed by logical judgment of the detection and recognition results, significantly improves the accuracy of color selection and recognition.
[0165] The recognition results from a single camera include the following information:
[0166] 1. Large or small ball: The identification result is unique, indicating whether the ball is large or small. 2. Inaccurate ball number identification: For example, for ball number 11 (red), if a large area of the white part is aligned with the camera, while only a small outer ring of the colored area is visible, the average color may fall within the identification range of multiple balls due to different lighting conditions. The final color identification result may be balls 3, 11, 12, or 13. 3. The final output judgment result. 4. The truth value reflects the degree of truthfulness of the identification result.
[0167] Individual camera logic judgment:
[0168] Scenario 1: Ball number color recognition is unique; the final result is presented based on the identification of large and small numbers; for example:
[0169] Ball number and color: 3; Size: Small; Final result: Ball number 3; Truth value: True;
[0170] Ball color: 3; Size: Large; Final result: Ball number 11; Truth value: True;
[0171] Similarly, if the color is 11, then ball number 11 and ball number 3 have the same color, and the final result will vary depending on the size of the ball.
[0172] Scenario 2: The ball number and color are not unique, but the colors of the same size are all in the results;
[0173] Ball number and color: 3, 11, 12; Size: Small; Final result: Ball number 3; Truth value: True;
[0174] Ball number and color: 3, 11, 12; Size: Large; Final result: Ball number 11; Truth value: True;
[0175] Because 3 and 11 are the same color, according to the statistical analysis of recognition, when a group of the same color appears, the accuracy of the result is very high.
[0176] Scenario 3: The ball number color is not unique, and no balls of the same color appear in the results;
[0177] Color: 11, 12, 13; Size: Small; Final Result: Small Ball; Truth Value: False;
[0178] Color: 11, 12, 13; Size: Large; Final Result: Large Ball; Truth Value: False;
[0179] Scenario 4: No color recognition result:
[0180] Color: None; Size: Small; Final Result: Small Ball; Truth Value: False;
[0181] Color: None; Size: Large; Final Result: Large Ball; Truth Value: False;
[0182] The above is the judgment logic for the recognition result of a single camera;
[0183] Logical judgments are made based on the results from both cameras. These logical judgments include:
[0184] Due to actual installation conditions, the recognition results of camera B are generally more accurate. Therefore, when the results of cameras A and B are inconsistent, the result of camera B will be preferred.
[0185] Scenario 1: If the results from cameras A and B are consistent, output the result directly, and the truth value of the result is true;
[0186] Scenario 2: If both A and B result in a small or large ball, the truth value of this result is false.
[0187] Camera A: Color result; Camera B: Color result; Final result: Color from Camera B;
[0188] Camera A: No color result; Camera B: Color result; Final result: The color from Camera B;
[0189] Camera A: Color result; Camera B: No color result; Final result: Color from Camera A;
[0190] Scenario 3: The size of the results from cameras A and B is inconsistent. Output the size of camera B, and judge the color as follows. The true value of this result is false.
[0191] Camera A: Color result; Camera B: Color result; Final result: Color from Camera B;
[0192] Camera A: No color result; Camera B: Color result; Final result: The color from Camera B;
[0193] Camera A: Color result; Camera B: No color result; Final result: Color from Camera A;
[0194] Ball placement logic judgment: If the logic judgment of the dual cameras is true, the ball is placed first in the ball position that needs to ensure the accuracy of the result; otherwise, the ball is placed in the non-critical ball position in sequence.
[0195] The dual-camera setup significantly improves recognition efficiency and accuracy in various scenarios, such as recognizing a large number of rolling balls.
[0196] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. Other modifications can be easily made by those skilled in the art. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A method for rapid identification of billiard targets, characterized in that, include: The S100 acquires multi-angle images of the target billiard ball through a dual-camera setup, quickly crops the images and performs the first color gamut conversion through a machine vision platform, and corrects elliptic distortion to obtain a true circular image of the billiard ball with elliptic distortion correction. S200: Add a mask to the elliptic distortion-corrected true circle image of the billiard ball imaging, perform the first binarization process and filter noise, and obtain the overall outline area of the denoised billiard ball. S300 performs a second color gamut conversion and a second binarization process in the overall outline area of the billiard ball to identify the white area of the billiard ball outline, filter noise in the white area, and calculate and identify the size of the ball number. S400, based on the elliptic distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, removes the white area and filters noise, performs mean averaging on the remaining color area of the billiard ball outline, and quickly calculates and identifies the specific number of the target billiard ball. S100 includes: S101 captures multi-angle images of multiple target billiard balls using a dual-camera setup, and quickly crops the multi-angle images of the target billiard balls using a machine vision platform to obtain a cropped matrix region image. S102, Perform the first color gamut conversion on the cropped matrix region image to obtain the color gamut converted matrix region image; S103, based on the color gamut conversion image of the matrix region, the elliptic distortion matrix region of the billiard ball image in the color gamut conversion image of the matrix region is corrected for elliptic distortion, and a true circular correction image of the elliptic distortion of the billiard ball image is obtained. The process of rapidly cropping multi-angle images of a target billiard ball using a machine vision platform to obtain a cropped matrix region image includes: First, the machine vision platform identifies the billiard ball outline in areas where the billiard ball's color and background color do not overlap. For areas where the billiard ball's color and background color overlap, the platform extends and completes these areas using circular arcs to form a fully extended circle. This fully extended circle is then rapidly cropped to obtain the cropped matrix region image. Next, based on the color gamut conversion image of the matrix region, the elliptic distortion matrix region of the billiard ball image in the color gamut conversion image is corrected to obtain a properly rounded image of the billiard ball's elliptic distortion correction. This includes: detecting and calculating the distance between the imaging point of the first camera in the dual-camera setup and the first target billiard ball to obtain the first imaging distance of the first target billiard ball; detecting and calculating the angle between the central optical axis of the first camera and the center point of the first target billiard ball to obtain the first imaging angle of the first target billiard ball; detecting and calculating the distance between the imaging point of the second camera and the first target billiard ball to obtain the second imaging distance of the first target billiard ball; and detecting and calculating the central optical axis of the second camera. The angle with the center point of the first target billiard ball, and the second imaging angle of the first target billiard ball; the first eccentricity of the elliptic distortion of the first target billiard ball image is calculated based on the first imaging distance and the first imaging angle of the first target billiard ball; the second eccentricity of the elliptic distortion of the first target billiard ball image is calculated based on the second imaging distance and the second imaging angle of the first target billiard ball; the first adjustment ratio for circular restoration is calculated based on the first eccentricity of the elliptic distortion; the second adjustment ratio for circular restoration is calculated based on the second eccentricity of the elliptic distortion; the elliptic distortion of the first target billiard ball image is adjusted according to the ratio range formed by the first and second adjustment ratios for circular restoration, until the elliptic distortion of the first target billiard ball image reaches the set circular restoration degree, so that the elliptic distortion of the first target billiard ball image is restored to a circle, and the true circular correction of the elliptic distortion of the first target billiard ball image is performed; the true circular correction of the elliptic distortion of the second target billiard ball image is performed sequentially until the elliptic distortion of all target billiard balls image is corrected, and the true circular correction image of the elliptic distortion of the billiard ball image is obtained.
2. The method for rapid identification of billiard targets according to claim 1, characterized in that, S200 includes: S201, Add a mask to the elliptic distortion correction image of the billiard ball to cover the non-billiard ball area and obtain the color gamut conversion mask image of the billiard ball. S202: By performing the first binarization process on the color gamut conversion mask image of the billiard ball, the overall outline of the billiard ball is identified, and noise is filtered out to obtain the overall outline region of the denoised billiard ball.
3. The method for rapid identification of billiard targets according to claim 1, characterized in that, The S300 includes: S301, perform a second color gamut conversion in the overall outline area of the noise-filtering billiard ball to obtain the color gamut converted billiard ball outline area; S302, based on the color gamut conversion of the billiard ball outline area, performs a second binarization process, identifies the white area of the billiard ball outline and filters noise in the white area, and calculates and identifies the size of the ball number; The parameters of the white area of the billiard ball outline include: the shape of the white area of the billiard ball outline, the perimeter of the white area of the billiard ball outline, and the area of the white area of the billiard ball outline.
4. The method for rapid identification of billiard targets according to claim 1, characterized in that, The S400 includes: S401. Based on the elliptic distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, the white area is removed and noise is filtered out, leaving only the billiard ball outline area to obtain the remaining color area of the billiard ball outline. S402, perform a mean-average operation on the remaining color area of the billiard ball outline to obtain the average value of the remaining color; quickly calculate and identify the specific ball number of the target billiard ball based on the average value of the remaining color.
5. A rapid target recognition system for billiard balls, characterized in that, include: The rapid cropping ellipse distortion correction module acquires multi-angle images of the target billiard ball through a dual-camera setup, rapidly crops the images and performs the first color gamut conversion through a machine vision platform, and then performs elliptic distortion correction to obtain a true round image of the billiard ball with elliptic distortion correction. The mask processing noise filtering module adds a mask to the elliptical distortion correction image of the billiard ball, performs the first binarization process and filters noise, and obtains the overall outline area of the noise-filtered billiard ball. The color gamut conversion and outline size recognition module performs a second color gamut conversion and a second binarization process in the overall outline area of the noise-filtering billiard ball to identify the white area of the billiard ball outline, filter noise in the white area, and calculate and recognize the size of the ball number. The regional mean ball number recognition module, based on the elliptical distortion correction image of the billiard ball and the parameters of the white area of the billiard ball outline, removes the white area and filters noise, performs mean calculation on the remaining color area of the billiard ball outline, and quickly calculates and identifies the specific ball number of the target billiard ball. The fast ellipse distortion correction module includes: The machine vision fast cropping unit captures multi-angle images of multiple target billiard balls using a dual-camera setup, and then rapidly crops these multi-angle images of the target billiard balls using a machine vision platform to obtain a cropped matrix region image. The matrix region color gamut conversion unit performs the first color gamut conversion on the cropped matrix region image to obtain the matrix region color gamut converted image. The billiards imaging elliptic correction unit corrects the elliptic distortion matrix region of the billiards image in the matrix region color gamut conversion image based on the matrix region color gamut conversion image, and obtains a true circular correction image of the elliptic distortion of the billiards imaging. The process of rapidly cropping multi-angle images of a target billiard ball using a machine vision platform to obtain a cropped matrix region image includes: First, the machine vision platform identifies the billiard ball outline in areas where the billiard ball's color and background color do not overlap. For areas where the billiard ball's color and background color overlap, the platform extends and completes these areas using circular arcs to form a fully extended circle. This fully extended circle is then rapidly cropped to obtain the cropped matrix region image. Next, based on the color gamut conversion image of the matrix region, the elliptic distortion matrix region of the billiard ball image in the color gamut conversion image is corrected to obtain a properly rounded image of the billiard ball's elliptic distortion correction. This includes: detecting and calculating the distance between the imaging point of the first camera in the dual-camera setup and the first target billiard ball to obtain the first imaging distance of the first target billiard ball; detecting and calculating the angle between the central optical axis of the first camera and the center point of the first target billiard ball to obtain the first imaging angle of the first target billiard ball; detecting and calculating the distance between the imaging point of the second camera and the first target billiard ball to obtain the second imaging distance of the first target billiard ball; and detecting and calculating the central optical axis of the second camera. The angle with the center point of the first target billiard ball, and the second imaging angle of the first target billiard ball; the first eccentricity of the elliptic distortion of the first target billiard ball image is calculated based on the first imaging distance and the first imaging angle of the first target billiard ball; the second eccentricity of the elliptic distortion of the first target billiard ball image is calculated based on the second imaging distance and the second imaging angle of the first target billiard ball; the first adjustment ratio for circular restoration is calculated based on the first eccentricity of the elliptic distortion; the second adjustment ratio for circular restoration is calculated based on the second eccentricity of the elliptic distortion; the elliptic distortion of the first target billiard ball image is adjusted according to the ratio range formed by the first and second adjustment ratios for circular restoration, until the elliptic distortion of the first target billiard ball image reaches the set circular restoration degree, so that the elliptic distortion of the first target billiard ball image is restored to a circle, and the true circular correction of the elliptic distortion of the first target billiard ball image is performed; the true circular correction of the elliptic distortion of the second target billiard ball image is performed sequentially until the elliptic distortion of all target billiard balls image is corrected, and the true circular correction image of the elliptic distortion of the billiard ball image is obtained.
6. The rapid billiard target recognition system according to claim 5, characterized in that, The mask processing noise filtering module includes: a mask adding region occlusion unit, which adds a mask to the elliptic distortion true circle correction image of the billiard ball imaging to cover the non-billiard ball area and obtain the billiard ball color gamut conversion mask image; The contour recognition and noise filtering unit performs a first binarization process on the billiard ball color gamut conversion mask image to identify the overall contour of the billiard ball, filter noise, and obtain the overall contour region of the noise-filtered billiard ball.
7. The rapid billiard target recognition system according to claim 5, characterized in that, The color gamut conversion and contour size recognition module includes: The outline region color gamut conversion unit performs a second color gamut conversion in the overall outline region of the noise-filtering billiard ball to obtain the color gamut converted outline region of the billiard ball. The white recognition unit in the conversion area performs a second binarization process based on the color gamut conversion of the billiard ball outline area, identifies the white area of the billiard ball outline, filters noise in the white area, and calculates and identifies the size of the ball. The parameters of the white area of the billiard ball outline include: the shape of the white area of the billiard ball outline, the perimeter of the white area of the billiard ball outline, and the area of the white area of the billiard ball outline.
8. The rapid target recognition system for billiard balls according to claim 5, characterized in that, The regional mean ball number recognition module includes: The remaining color region filtering unit, based on the true circular correction image of the elliptical distortion of the billiard ball image and the parameters of the white region of the billiard ball outline, removes the white region and filters noise, retaining only the billiard ball outline region, thus obtaining the remaining color region of the billiard ball outline. The mean-based ball number recognition unit performs a mean-based calculation on the remaining color area of the billiard ball outline to obtain the average value of the remaining colors; based on the average value of the remaining colors, it quickly calculates and identifies the specific ball number of the target billiard ball.