A method, apparatus, equipment, and medium for calibrating a straight running track on a playground based on vision technology.

By placing markers on the playground and using image target detection technology and least squares iterative optimization algorithm, the track line coordinate sequence is automatically calculated, which solves the problems of low efficiency and low accuracy of traditional manual calibration and achieves efficient and accurate track calibration.

CN119540353BActive Publication Date: 2025-11-14恒鸿达(福建)体育科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411630708.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-11-14
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

Traditional manual marking of straight running tracks on playgrounds is inefficient, inaccurate, and costly, making it difficult to meet the needs of large-scale competitions.

Method used

Markers are placed on the runway, and image target detection technology and least squares method combined with iterative optimization algorithms are used to automatically calculate the runway line coordinate sequence. Confirmation and fine-tuning are then performed using a user-friendly interface design.

Benefits of technology

It significantly improves calibration efficiency and accuracy, reduces labor costs, shortens calibration time by 80%, and improves accuracy by 50%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540353B_ABST
    Figure CN119540353B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, equipment, and medium for calibrating a straight running track on a playground based on visual technology, comprising: Step 1, placing markers and cameras on the track, with the cameras capturing real-time video of the entire track and capturing the video stream; Step 2, preprocessing the video and detecting the positions of the markers; Step 3, using a trained target detection algorithm model to detect and locate the markers in the video image in real time, obtaining the marker coordinates; Step 4, calculating the track line coordinate sequence based on the detected marker positions; This invention solves the problems of low efficiency, low accuracy, and high cost in the traditional manual calibration process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication, and in particular to a method, apparatus, equipment and medium for calibrating a straight running track on a playground based on visual technology. Background Technology

[0002] AI-powered visual timing technology has been widely adopted in top-level sporting events. For example, in sprint events, this technology can record crucial data such as athletes' start reaction time, running speed, and sprint time. This data provides coaches with valuable training insights, helping them to better develop and adjust training plans. Meanwhile, spectators can also view athletes' performance and rankings in real time on a large screen.

[0003] Therefore, in short-distance races like the 50-meter or 100-meter dash in track and field, the accurate marking of track lines and lanes is crucial when using AI visual timing technology. This marking information can be used to detect whether athletes have false starts, crossed the finish line, or accurately determine the finish line arrival time. However, the traditional marking process relies on manual operation. Staff members use handheld devices (such as tablets) to view the images captured by cameras and manually mark the coordinates of the track lines. This process is time-consuming, error-prone, and the marking results may vary between different personnel.

[0004] Existing manual calibration methods have the following shortcomings: First, they are inefficient, as the manual calibration process is time-consuming and difficult to meet the needs of large-scale competitions; second, they are not accurate, as human subjective factors will lead to inconsistencies in the calibration results, affecting the accuracy of subsequent data analysis; and third, they are costly, as they require professional personnel to operate, increasing labor costs. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for marking a straight running track on a playground based on vision technology. Markers are placed at key locations on the track, and image target detection technology is used to detect and identify the markers. Then, an algorithm is used to calculate an accurate sequence of track line coordinates, which solves the problems of low efficiency, low accuracy and high cost of the traditional manual marking process.

[0006] In a first aspect, the present invention provides a method for calibrating a straight running track on a playground based on visual technology, comprising:

[0007] Step 1: Place markers and cameras on the runway. The cameras will capture the entire runway video in real time.

[0008] Step 2: Preprocess the video and detect the location of markers;

[0009] Step 3: Using a trained target detection algorithm model, the target detection algorithm model is used to detect and locate the markers in the video image in real time, obtaining the marker coordinates (x, y), denoted as (x1, y1), (x2, y2), ..., (x... n ,y n ), n is a positive integer;

[0010] Step 4: Calculate the runway line coordinate sequence based on the detected marker positions;

[0011] The specific method for calculating the runway line coordinate sequence is as follows: the least squares method is used to fit the straight line equation of the runway line, and the fitting accuracy is improved by iterative optimization algorithm.

[0012] The least squares method is as follows: for the coordinates of the markers, fit the equation of the straight line; define the error function of the perpendicular distance from the coordinates of the markers to the fitted straight line, and fit the optimal straight line equation parameters of the runway line;

[0013] The iterative optimization algorithm is as follows: the least squares method is used to initially fit the linear equation; residual calculation is performed, that is, the distance of each coordinate point relative to the linear equation is calculated; outlier removal is performed, that is, based on the residual value, a convergence threshold is set, and outliers with residual values ​​greater than the convergence threshold are removed; the coordinate points after outlier removal are refitted using the least squares method to obtain the refitted linear equation.

[0014] Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

[0015] Furthermore, the arrangement of markers and cameras on the runway specifically involves placing triangular cones as markers at the required calibration points, placing a camera directly in front of the center of the runway, and during filming, the camera views downwards from above, moving back and forth on the runway to capture the entire runway to be filmed, with the runway occupying the largest portion of the frame in the captured image.

[0016] Furthermore, step 4 specifically involves:

[0017] The least squares method specifically involves fitting a straight line equation y = ax + b to the coordinates of the marker (x, y), where a is the slope and b is the intercept.

[0018] Define an error function for each marker coordinate (x) i ,y i The error is defined as the perpendicular distance from the point to the fitted line, where i is any positive integer from 1 to n:

[0019] ∈ i =y i -(ax i +b)

[0020] The total error is expressed as: Find the set of a that minimizes the total error E(a, b). n and b n Afterwards, regarding a n and b n Differentiating each equation and setting them to 0, we obtain the system of linear equations:

[0021]

[0022] Solve these two equations to fit the optimal straight line equation parameters a0 and b0 for the runway:

[0023]

[0024] The iterative optimization algorithm is specifically as follows:

[0025] The least squares method is used to initially fit the linear equation y = a0x + b0; residual calculation is then performed, that is, the distance of each coordinate point relative to the linear equation is calculated, assuming the coordinates of each marker (x...) are... i y i The residual of ) is:

[0026] r i =|y i -(a0x i +b0)|

[0027] Outlier removal involves setting a convergence threshold based on the residual value and removing outliers whose residual value exceeds the convergence threshold.

[0028] The coordinates after removing outliers are refitted using the least squares method to obtain the refitted straight line equation y = a1x + b1.

[0029] Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

[0030] Furthermore, steps 5 and 6 are also included;

[0031] Step 5 specifically involves mapping the runway line coordinate sequence to the user terminal. The user terminal can display the real-time image from the camera and show the video stream captured by the camera. After calculating the coordinate sequence, the image corresponding to each coordinate is mapped to the user terminal in the form of a video stream. The user can confirm or adjust the coordinate sequence through the user terminal.

[0032] Step 6 specifically involves sending the determined coordinate sequence to the business processing system.

[0033] Secondly, the present invention provides a device for calibrating a straight running track on a playground based on visual technology, comprising:

[0034] Image acquisition module, image processing module, target detection module, coordinate calculation module;

[0035] Image acquisition module: Markers and cameras are placed on the runway. The cameras capture video of the entire runway in real time and capture the video stream.

[0036] Image processing module: preprocesses the video and detects the location of markers;

[0037] Target detection module: Employs a trained target detection algorithm model to detect and locate targets in video images in real time, obtaining the target coordinates (x, y), denoted as (x1, y1), (x2, y2), ..., (x...). n ,y n ), n is a positive integer;

[0038] Coordinate calculation module: Calculates the runway line coordinate sequence based on the detected marker positions;

[0039] The specific method for calculating the runway line coordinate sequence is as follows: the least squares method is used to fit the straight line equation of the runway line, and then an iterative optimization algorithm is used for calculation.

[0040] The least squares method is as follows: for the coordinates of the markers, fit the equation of the straight line; define the error function of the perpendicular distance from the coordinates of the markers to the fitted straight line, and fit the optimal straight line equation parameters of the runway line;

[0041] The iterative optimization algorithm is as follows: the least squares method is used to initially fit the linear equation; residual calculation is performed, that is, the distance of each coordinate point relative to the linear equation is calculated; outlier removal is performed, that is, based on the residual value, a convergence threshold is set, and outliers with residual values ​​greater than the convergence threshold are removed; the coordinate points after outlier removal are refitted using the least squares method to obtain the refitted linear equation.

[0042] Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

[0043] Furthermore, the arrangement of markers and cameras on the runway specifically involves placing triangular cones as markers at the required calibration points, placing a camera directly in front of the center of the runway, and during filming, the camera views downwards from above, moving back and forth on the runway to capture the entire runway to be filmed, with the runway occupying the largest portion of the frame in the captured image.

[0044] Furthermore, the coordinate calculation module specifically comprises:

[0045] The least squares method specifically involves fitting a straight line equation y = ax + b to the coordinates of the marker (x, y), where a is the slope and b is the intercept.

[0046] Define an error function for each marker coordinate (x) i ,y i The error is defined as the perpendicular distance from the point to the fitted line, where i is any positive integer from 1 to n:

[0047] ∈ i =y i -(ax i +b)

[0048] The total error is expressed as: Find the set of a that minimizes the total error E(a, b). n and b n Afterwards, regarding a n and b n Differentiating each equation and setting them to 0, we obtain the system of linear equations:

[0049]

[0050] Solve these two equations to fit the optimal straight line equation parameters a0 and b0 for the runway:

[0051]

[0052] The iterative optimization algorithm is specifically as follows:

[0053] The least squares method is used to initially fit the linear equation y = a0x + b0; residual calculation is then performed, that is, the distance of each coordinate point relative to the linear equation is calculated, assuming the coordinates of each marker (x...) are... i y i The residual of ) is:

[0054] ri =|y i -(a0x i +b0)|

[0055] Outlier removal involves setting a convergence threshold based on the residual value and removing outliers whose residual value exceeds the convergence threshold.

[0056] The coordinates after removing outliers are refitted using the least squares method to obtain the refitted straight line equation y = a1x + b1.

[0057] Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

[0058] Furthermore, it also includes a user interface module and a data transmission module;

[0059] The user interface module specifically maps the track line coordinate sequence to the user terminal. The user terminal can display the real-time image from the camera, show the video stream captured by the camera, and map the image corresponding to each coordinate after calculating the coordinate sequence to the user terminal in the form of a video stream. The user can confirm or adjust the coordinate sequence through the user terminal.

[0060] Specifically, the data transmission module sends the determined coordinate sequence to the business processing system.

[0061] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.

[0062] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0063] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:

[0064] This application provides a method, apparatus, equipment, and medium for calibrating a straight running track on a playground based on visual technology. By introducing computer vision technology, specific visual markers are set on the track, and computer vision technology is used to detect and identify these markers. Combined with image processing and computer graphics algorithms, the track line can be accurately and automatically calibrated, which significantly improves calibration efficiency and accuracy and reduces labor costs.

[0065] This invention employs high-precision image target detection technology and intelligent coordinate calculation algorithms to ensure accurate identification of markers and quickly calculate the runway line coordinate sequence based on the marker positions. The user-friendly interface design facilitates the confirmation and fine-tuning of coordinate points. This invention also has real-time data transmission capabilities, ensuring that calibration results can be applied to business processing in a timely manner.

[0066] This invention utilizes image target detection technology to automatically detect and identify identifiable image markers at key locations on the runway, and then calculates a precise sequence of runway line coordinates using an algorithm. Finally, the calculation results are mapped to a user interface for user confirmation or fine-tuning, ultimately achieving rapid and accurate runway line calibration.

[0067] This invention uses the least squares method to fit the straight line equation of the runway line and improves the fitting accuracy through an iterative optimization algorithm. This iterative optimization process can significantly reduce the influence of noise points, thereby improving the accuracy of the straight line fitting. Especially when the camera angle is not ideal or the markers are not placed completely accurately, the iterative optimization algorithm can effectively improve the final calibration accuracy.

[0068] By adopting the technical solution of this invention, firstly, efficiency can be improved: automated calibration significantly improves work efficiency and reduces manual intervention; secondly, accuracy can be improved: compared with manual calibration, the calibration accuracy of this invention is higher and the error is smaller; thirdly, reliability can be improved: this invention has strong robustness and can adapt to complex and changing outdoor environments; fourthly, user experience can be enhanced: the user-friendly interface design makes the calibration process more convenient and efficient; and fifthly, costs can be reduced: manual calibration requires professional personnel to operate, while the technical solution of this invention saves labor costs during calibration. Experimental results show that compared with traditional manual calibration methods, this invention shortens the calibration time by 80% and improves the calibration accuracy by 50%.

[0069] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0070] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0071] Figure 1 This is a flowchart of the method of the present invention;

[0072] Figure 2 This is a schematic diagram of the structure of the device of the present invention;

[0073] Figure 3This is a schematic diagram of the structure of Embodiment 5 of the present invention. Detailed Implementation

[0074] This application provides a method, apparatus, equipment, and medium for calibrating straight running tracks on playgrounds based on vision technology, which solves the problems of low efficiency, low accuracy, and high cost in the traditional manual calibration process.

[0075] Example 1

[0076] like Figure 1 As shown, the method for calibrating a straight running track on a playground based on visual technology is as follows:

[0077] Step 1: Place markers and cameras on the runway. The cameras will capture the entire runway video in real time.

[0078] The arrangement of markers and cameras on the track specifically involves placing triangular cones as markers at the required calibration points and placing a camera 3 meters high in front of the center of the track to capture real-time video streams of the track.

[0079] During filming, the camera looks down from above and moves back and forth on the runway to capture the entire runway that needs to be filmed, with the runway occupying the largest portion of the frame in the captured footage.

[0080] Step 2: Preprocess the video and detect the location of markers;

[0081] The video preprocessing specifically involves performing noise reduction, enhancement, geometric correction, and other preprocessing on the acquired video images to improve image quality.

[0082] Step 3: Place markers (triangular pyramids) at the required calibration points, train a target detection algorithm model to recognize the markers (triangular pyramids), and use the target detection algorithm model to detect and locate the markers in the video image in real time, obtaining the marker coordinates, denoted as (x1, y1), (x2, y2), ..., (x... n ,y n );

[0083] The target detection is performed using the YOLOv5 algorithm, which is characterized by fast detection speed and high accuracy.

[0084] Step 4: Calculate the runway line coordinate sequence based on the detected marker positions;

[0085] The specific method for calculating the runway line coordinate sequence is to use the least squares method to fit the straight line equation of the runway line and then use an iterative optimization algorithm for calculation.

[0086] The least squares method specifically involves fitting a straight line equation y = ax + b for the coordinates of the marker (x, y), where a is the slope and b is the intercept.

[0087] Define an error function for each marker coordinate (x) i ,y i The error is defined as the perpendicular distance from the point to the fitted line, where i is any positive integer from 1 to n:

[0088] ∈ i =y i -(ax i +b)

[0089] The total error is expressed as:

[0090] After finding the set of a and b that minimizes the total error E(a, b), then for a n and b n Differentiating each equation and setting them to 0, we obtain the system of linear equations:

[0091] Solve these two equations to fit the optimal straight line equation parameters a0 and b0 for the runway:

[0092]

[0093] The iterative optimization algorithm is specifically as follows:

[0094] The least squares method is used to initially fit the linear equation y = a0x + b0; residual calculation is then performed, that is, the distance of each coordinate point relative to the linear equation is calculated, assuming each coordinate point (x... i y i The residual of ) is:

[0095] r i =|y i -(a0x i +b0)|

[0096] The residual represents the degree of deviation of each marker point from the fitted line;

[0097] Outlier removal involves setting a convergence threshold based on the residual value and removing outliers whose residual value exceeds the convergence threshold.

[0098] The coordinates after removing outliers are refitted using the least squares method to obtain the refitted straight line equation y = a1x + b1.

[0099] Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

[0100] The termination condition of the algorithm is:

[0101] The iterative process will stop in one of the following two situations: 1. The residual change at all points is less than the set threshold, indicating that the fitting result has stabilized; 2. The maximum number of iterations is reached to ensure that the algorithm does not fall into an infinite loop.

[0102] Step 5: Map the runway line coordinate sequence to the user terminal, where the user confirms or adjusts the coordinate sequence.

[0103] Specifically, the track line coordinate sequence is mapped to the user terminal, which can display the real-time image from the camera and show the video stream captured by the camera. After the coordinate sequence is calculated, the image corresponding to each coordinate is mapped to the user terminal in the form of a video stream. The user can confirm or adjust the coordinate sequence through the user terminal.

[0104] The coordinate points on the user's screen are presented as circles, and users can adjust the track line coordinate sequence by dragging the circles.

[0105] Step 6: Send the determined coordinate sequence to the business processing system for subsequent timing and data analysis.

[0106] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2.

[0107] Example 2

[0108] This embodiment provides a device, such as Figure 2 As shown, it includes:

[0109] Image acquisition module, image processing module, target detection module, coordinate calculation module, user interface module, and data transmission module;

[0110] Image acquisition module: Markers and cameras are placed on the runway. The cameras capture video of the entire runway in real time and capture the video stream.

[0111] Image processing module: preprocesses the video and detects the location of markers;

[0112] Target detection module: Employs a trained target detection algorithm model to detect and locate targets in video images in real time, obtaining the target coordinates (x, y), denoted as (x1, y1), (x2, y2), ..., (x...). n ,y n ), n is a positive integer;

[0113] Coordinate calculation module: Calculates the runway line coordinate sequence based on the detected marker positions;

[0114] The specific method for calculating the runway line coordinate sequence is as follows: the least squares method is used to fit the straight line equation of the runway line, and then an iterative optimization algorithm is used for calculation.

[0115] The least squares method is as follows: for the coordinates of the markers, fit the equation of the straight line; define the error function of the perpendicular distance from the coordinates of the markers to the fitted straight line, and fit the optimal straight line equation parameters of the runway line;

[0116] The iterative optimization algorithm is as follows: the least squares method is used to initially fit the linear equation; residual calculation is performed, that is, the distance of each coordinate point relative to the linear equation is calculated; outlier removal is performed, that is, based on the residual value, a convergence threshold is set, and outliers with residual values ​​greater than the convergence threshold are removed; the coordinate points after outlier removal are refitted using the least squares method to obtain the refitted linear equation.

[0117] Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

[0118] User interface module: Maps the track line coordinate sequence to the user terminal. The user terminal can display the real-time image from the camera, show the video stream captured by the camera, and map the image corresponding to each coordinate after calculating the coordinate sequence to the user terminal in the form of a video stream. The user can confirm or adjust the coordinate sequence through the user terminal.

[0119] Data transmission module: Sends the determined coordinate sequence to the business processing system.

[0120] Since the apparatus described in Embodiment 2 of the present invention is an apparatus used to implement the method of Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in Embodiment 1 of the present invention, and therefore will not be described again here. All apparatuses used in the method of Embodiment 1 of the present invention fall within the scope of protection of the present invention.

[0121] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to Embodiment 1, as detailed in Embodiment 3.

[0122] Example 3

[0123] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement any of the implementation methods in Embodiment 1.

[0124] Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application.

[0125] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 4.

[0126] Example 4

[0127] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1.

[0128] Based on the same inventive concept, this application also provides a side-end computing box, as detailed in Embodiment 5.

[0129] Example 5

[0130] This embodiment includes the modules described in Embodiment 2 and a hardware edge computing box, such as... Figure 3 As shown, it includes:

[0131] Image acquisition module, image processing module, target detection module, coordinate calculation module, user interface module, data transmission module, and edge computing power box;

[0132] The modules are connected through data interfaces to form a closed-loop automated calibration process.

[0133] The image acquisition module transmits the video stream to the image processing module, then to the target detection module. The processed data is used by the coordinate calculation module to calculate the coordinate sequence, and then displayed to the user for confirmation or fine-tuning through the user interface module. Finally, the data transmission module sends the results to the business processing system. The image processing module, target detection module, and coordinate calculation module are located in the edge computing box. The coordinate data adjusted by the user will be transmitted back to the edge computing box for calculation.

[0134] The technical solutions provided in this application embodiment have at least the following technical effects or advantages: The method, device, equipment and medium for automatic room management of the internal training base of a commercial bank provided in this application embodiment comprehensively consider factors such as the number of trainees, training type, training time, training class and personnel level, and intelligently and automatically allocate accommodation rooms, solving the problem of time-consuming and labor-intensive manual room allocation, and can greatly improve the efficiency of room management.

[0135] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0136] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0137] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0138] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0139] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for calibrating a straight running track on a playground based on visual technology, characterized in that, include: Step 1: Place markers and cameras on the runway. The cameras will capture the entire runway video in real time. Step 2: Preprocess the video and detect the location of markers; Step 3: Using a trained target detection algorithm model, the target detection algorithm model is used to detect and locate the markers in the video image in real time, obtaining the marker coordinates (x, y), denoted as (x1, y1), (x2, y2), ..., (x... n ,y n ), n is a positive integer; Step 4: Calculate the runway line coordinate sequence based on the detected marker positions; The specific method for calculating the runway line coordinate sequence is as follows: the least squares method is used to fit the straight line equation of the runway line, and then an iterative optimization algorithm is used for calculation. The least squares method is as follows: for the coordinates of the markers, fit the equation of the straight line; define the error function of the perpendicular distance from the coordinates of the markers to the fitted straight line, and fit the optimal straight line equation parameters of the runway line; The iterative optimization algorithm is as follows: the least squares method is used to initially fit the linear equation; residual calculation is performed, that is, the distance of each coordinate point relative to the linear equation is calculated; outlier removal is performed, that is, based on the residual value, a convergence threshold is set, and outliers with residual values ​​greater than the convergence threshold are removed. The coordinates of the points after outliers are removed are refitted using the least squares method to obtain the refitted line equation. Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

2. The method for calibrating a straight running track on a playground based on visual technology according to claim 1, characterized in that, The arrangement of markers and cameras on the runway specifically involves placing triangular cones as markers at the required calibration points and placing a camera directly in front of the center of the runway. When taking pictures, the camera looks down from above and moves back and forth on the runway to capture the entire runway that needs to be captured, with the runway occupying the largest portion of the frame in the captured image.

3. The method for calibrating a straight running track on a playground based on visual technology according to claim 1, characterized in that, Step 4 specifically involves: The least squares method specifically involves fitting a straight line equation y = ax + b to the coordinates of the marker (x, y), where a is the slope and b is the intercept. Define an error function for each marker coordinate (x) i ,y i The error is defined as the perpendicular distance from the point to the fitted line, where i is any positive integer from 1 to n: ∈ i =y i -(ax i +b) The total error is expressed as: Find the set of a that minimizes the total error E(a, b). n and b n Afterwards, regarding a n and b n Differentiating each equation and setting them to 0, we obtain the system of linear equations: Solve these two equations to fit the optimal straight line equation parameters a0 and b0 for the runway: The iterative optimization algorithm is specifically as follows: The least squares method is used to initially fit the linear equation y = a0x + b0; residual calculation is then performed, that is, the distance of each coordinate point relative to the linear equation is calculated, assuming the coordinates of each marker (x...) are... i y i The residual of ) is: r i =|y i -(a0x i +b0)| Outlier removal involves setting a convergence threshold based on the residual value and removing outliers whose residual value exceeds the convergence threshold. The coordinates after removing outliers are refitted using the least squares method to obtain the refitted straight line equation y = a1x + b1. Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

4. The method for calibrating a straight running track on a playground based on visual technology according to claim 1, characterized in that, It also includes steps 5 and 6; Step 5 specifically involves mapping the runway line coordinate sequence to the user terminal. The user terminal can display the real-time image from the camera and show the video stream captured by the camera. After calculating the coordinate sequence, the image corresponding to each coordinate is mapped to the user terminal in the form of a video stream. The user can confirm or adjust the coordinate sequence through the user terminal. Step 6 specifically involves sending the determined coordinate sequence to the business processing system.

5. A device for calibrating a straight running track on a playground based on vision technology, characterized in that, include: Image acquisition module, image processing module, target detection module, coordinate calculation module; Image acquisition module: Markers and cameras are placed on the runway. The cameras capture video of the entire runway in real time and capture the video stream. Image processing module: preprocesses the video and detects the location of markers; Target detection module: Employs a trained target detection algorithm model to detect and locate targets in video images in real time, obtaining the target coordinates (x, y), denoted as (x1, y1), (x2, y2), ..., (x...). n ,y n ), n is a positive integer; Coordinate calculation module: Calculates the runway line coordinate sequence based on the detected marker positions; The specific method for calculating the runway line coordinate sequence is as follows: the least squares method is used to fit the straight line equation of the runway line, and then an iterative optimization algorithm is used for calculation. The least squares method is as follows: for the coordinates of the markers, fit the equation of the straight line; define the error function of the perpendicular distance from the coordinates of the markers to the fitted straight line, and fit the optimal straight line equation parameters of the runway line; The iterative optimization algorithm is as follows: the least squares method is used to initially fit the linear equation; residual calculation is performed, that is, the distance of each coordinate point relative to the linear equation is calculated; outlier removal is performed, that is, based on the residual value, a convergence threshold is set, and outliers with residual values ​​greater than the convergence threshold are removed. The coordinates of the points after outliers are removed are refitted using the least squares method to obtain the refitted line equation. Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

6. The device for calibrating a straight running track on a playground based on visual technology according to claim 5, characterized in that, The arrangement of markers and cameras on the runway specifically involves placing triangular cones as markers at the required calibration points and placing a camera directly in front of the center of the runway. When taking pictures, the camera looks down from above and moves back and forth on the runway to capture the entire runway that needs to be captured, with the runway occupying the largest portion of the frame in the captured image.

7. The device for calibrating a straight running track on a playground based on vision technology according to claim 5, characterized in that, The coordinate calculation module is specifically as follows: The least squares method specifically involves fitting a straight line equation y = ax + b to the coordinates of the marker (x, y), where a is the slope and b is the intercept. Define an error function for each marker coordinate (x) i ,y i The error is defined as the perpendicular distance from the point to the fitted line, where i is any positive integer from 1 to n: ∈ i =y i -(ax i +b) The total error is expressed as: Find the set of a that minimizes the total error E(a, b). n and b n Afterwards, regarding a n and b n Differentiating each equation and setting them to 0, we obtain the system of linear equations: Solve these two equations to fit the optimal straight line equation parameters a0 and b0 for the runway: The iterative optimization algorithm is specifically as follows: The least squares method is used to initially fit the linear equation y = a0x + b0; residual calculation is then performed, that is, the distance of each coordinate point relative to the linear equation is calculated, assuming the coordinates of each marker (x...) are... i y i The residual of ) is: r i =|y i -(a0x i +b0)| Outlier removal involves setting a convergence threshold based on the residual value and removing outliers whose residual value exceeds the convergence threshold. The coordinates after removing outliers are refitted using the least squares method to obtain the refitted straight line equation y = a1x + b1. Repeat the residual calculation, outlier removal, and refitting process, setting an upper limit for the number of iterations. Within this upper limit, the iterative optimization algorithm terminates when the change in the residual of the refitted line is less than the set convergence threshold, or when the set upper limit for the number of iterations is reached.

8. The device for calibrating a straight running track on a playground based on vision technology according to claim 5, characterized in that, It also includes a user interface module and a data transmission module; The user interface module specifically maps the track line coordinate sequence to the user terminal. The user terminal can display the real-time image from the camera, show the video stream captured by the camera, and map the image corresponding to each coordinate after calculating the coordinate sequence to the user terminal in the form of a video stream. The user can confirm or adjust the coordinate sequence through the user terminal. Specifically, the data transmission module sends the determined coordinate sequence to the business processing system.

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 processor executes the program, it implements the method as described in any one of claims 1 to 4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Airport runway foreign matter detection method and system

    CN116434142A

  • Automatic listing method based on moving target in panoramic video and related device

    CN116824457A