Using Adaptive Object Model to Basketball Tracking Algorithm and Simulation

. The adaptive object model method is an eﬀective way to develop dynamic and conﬁgurable adaptive software. It has the characteristics of metamodel, description drive, and runtime reﬂection. First, the core idea of the adaptive object model is explained; then, the ﬁve modes of establishing the metamodel in the adaptive object model architecture, the model engine, and supporting tools are analyzed; and the basketball tracking algorithm of the adaptive object model is discussed. Secondly, a two-dimensional joint information strategy is proposed to improve the tracking eﬀect. When the basketball is in a very complex environment, there will always be some color information in the background that is the same as the target, which aﬀects the eﬀect of basketball tracking. Therefore, this paper proposes a Camshift tracking method based on the signiﬁcance of histograms, through real time. The basketball movement is compared with the background histogram to continuously adjust the basketball movement tracking model. These two methods can better establish the tracking model of the basketball adaptive object, reduce the interference of background information, and achieve the eﬀect of stable tracking of the target. The simulation experiment results show that the method proposed in this paper can eﬀectively improve the accuracy of the basketball goal model and achieve stable tracking of the goal.


Introduction
Adaptive object model is a hot research topic in knowledge engineering. It is a kind of knowledge representation model. e knowledge representation method that describes the structure and function of the object is used. is knowledge representation method is convenient to produce the knowledge object model based on the knowledge representation of the cabinet. Comprehensive use is of production information to transfer predicate logic semantic network and other inference mechanisms, which can form a flexible multiparadigm control inference system. is system not only has high reasoning efficiency and strong problem-solving ability and is suitable for solving complex problems, but also facilitates the realization of various learning functions and automatic acquisition of exploration knowledge. e adaptive object model is an abstract metamodel for the problem domain. It is a model for describing and defining the model. It is the first abstraction of the objects in the problem domain at a higher level of the model to form a model described by classes; after the second-time abstract [1,2], forming a metamodel described by metaclass, AOM uses metadata to describe the configuration information of a new or modified system and interprets and executes the object model established with metadata [3] at runtime. e interpretation of the model is to use runtime reflection technology to map metadata to the runtime description of the object model. By storing metadata in a database or XML format file instead of writing it in code, when business requirements change, you only need to modify the metadata description to reflect changes in requirements at runtime and change the way you write code to adapt to changing user needs. Simply put, changing the object model will change the system behavior accordingly [4,5]. End-user-driven development provides users with a stronger ability to create, customize, and extend the system; shortening the development and reducing the difficulty of communication between users and developers, domain experts can focus on building business models with rich domain knowledge [6,7]. Although the AOM method has many advantages, it also has disadvantages. For example, the object model is difficult to establish and understand the changes in the development method brought about by AOM. Developers do not directly develop an application system but provide development tools to domain experts to build object models and provide explanations. e mechanism is to interpret and execute this object model and automatically generate application systems [8,9]. e intelligent visual monitoring system integrates the shape information of the target model and can detect and track multiple targets. It can not only monitor the human target in real time but also analyze the human posture and collect a large amount of human-related information [10,11]. Intelligent monitoring is in complex environments, such as urban traffic, supermarkets, human-computer interaction, and behavior analysis. rough this intelligent monitoring system, multiangle monitoring of the target can be realized, the target is tracked in real time, and abnormal behaviors are detected, and then various emergencies are reported to the management system, greatly improving the safety factor of public places [12,13]. rough the cooperation of the camera and the computer, the recognition and detection of the moving target are realized, and the target is continuously tracked. e computer analyzes image information returned by the basketball collection device in real time, so as to obtain the movement characteristics of the target [14,15]. rough in-depth research on the theory of visual target tracking, significant research results have been achieved in the analysis and understanding of target motion behavior, intelligent traffic scene basketball monitoring, and intelligent target recognition [16,17]. e tracking of the sports target is to locate the position of the sports target by analyzing the basketball image sequence information. First, the target area is located through the moving target detection method, the target information is extracted, and the target model is established. en, the basketball image sequence information and the target model are integrated to locate the position of the moving target, and the target motion characteristics in the basketball image sequence are analyzed and predicted. To achieve accurate positioning is of the target in the basketball image sequence [18,19]. So far, there are many types of target tracking methods. According to the number of targets in the basketball image sequence, they can be divided into single target tracking and multiple target tracking. According to the characteristics of moving targets, they can be divided into rigid and nonrigid target tracking. e main idea of target tracking is still based on the idea of target matching, which mainly includes target tracking algorithms based on shape, region, color, and feature points [20,21]. e moving target tracking process can record the characteristics of the target movement in real time. Combining the motion characteristics with the filter can predict the position of the target at the next moment, which can improve the robustness of target tracking, so the target can be tracked in practical applications.
e algorithm is combined with the filter for application [22,23]. With the continuous in-depth research in the field of target recognition and tracking, many innovative algorithms have emerged, such as the target recognition and tracking algorithm based on machine learning [24], which transforms target tracking into a classification problem. Samples are trained for learning [25,26], and then the classifier is used to identify candidate targets to obtain target location information [27], which breaks the conventional improvement algorithm that builds accurate and complex target models to improve tracking accuracy. Instead of focusing on the construction of stable and efficient classifiers to improve the performance of target recognition and tracking algorithms [28,29], which also inject new ideas into the research direction of target recognition and tracking, this method requires, with a large number of samples as support, obtaining an efficient classifier, and a very large amount of data is required [30,31]. No matter how the target tracking algorithm is improved, real time, accuracy, and stability are always the three important indicators to measure the effect of moving target tracking [32,33]. For basketball target in the complex background, the background there has always some interference with chrominance information of the target model. is paper proposes a fusion target significant Camshift tracking algorithm, improved significantly by means of weighted tonal role in the process of target identification, the effect of softening the tone significantly, thus inhibiting the background area of target recognition, through real-time contrast of target, and background region histogram model to determine the destination of tonal. On the other hand, the accuracy of the target model and the stability of the target tracking are greatly improved by adjusting the target model. An intelligent control system that uses the adaptive object model is to combine object model method basketball motion tracking technology and fuzzy theory. We use the mobile teaching robot left and right walking wheel motors to control the object to ensure that the two wheels are synchronized when walking in a straight line. Perform mission planning. In a complex environment, the problem of target loss is improved on the Camshift algorithm. e Camshift tracking in a complex background makes the background have a great impact on the establishment of the target model. e model is easy to be mixed with a large amount of background information and the target histogram. e model is integrated with the Camshift tracking algorithm, and the target model is updated by continuously analyzing the characteristics of the target histogram and the background histogram, thereby greatly improving the effect of target tracking, and the method is proved to be effective through experiments.

Structure of Basketball Tracking Hierarchy Based on the Adaptive Object Model
e object model is built in two steps. First, establish the hierarchical structure of the object model and then establish the knowledge base of the object model according to the hierarchical structure diagram. e architecture diagram is shown in Figure 1.
According to the abstract-concrete relationship, the object is described in three levels from top to bottom. In other words, through the semantic connection, the object is abstracted into three levels from bottom to top. In each layer of the object, according to the relationship between the whole and the part, the object is decomposed into its constituent parts using the semantic network representation method, and each part can continue to be subdivided until it is indivisible or needs to be solved according to the problem. After decomposition, each component of the high-level object and the corresponding component of the low-level object should also conform to the abstract one-to-one relationship.
Most object-oriented technology is a static method of establishing an object model. It uses classes to describe the object model in the design phase, and then it is implemented by programmers in the implementation phase. e object model established in this way is static and cannot be changed at runtime. When new entities appear or new attributes are generated, and business rules are changed, the code will be rewritten, compiled, and even version-updated. AOM method to metadata describes the properties and business rules of the object. Metadata is an instance-level concept, which is interpreted and executed at runtime. Using the above reasoning method, the fuzzy knowledge in the knowledge base can be infiltrated into the reasoning process. In the inference engine, according to the law of system fuzzy control, many calculation programs and programs for exchanging information with the interface are compiled.

Fuzzy Decision of Output Characteristic Correction Amount.
e relationship between the performance of the control system and the output characteristics of the controlled object can be through the output error. c (nT) and the error change amount d (Nt) and other output states are measured, and the correction amount q (Nt) required for the control effect is determined from this. If II is used for correction, the performance measurement described by the language variable is shown in Table 1.
en, the output correction amount can be expressed by the following formula: (1)

Control Amount Correction.
e output response correction amount is obtained in the fuzzy decision module of the output characteristic correction amount. is correction amount needs to be transformed into the input correction amount applied to the process to achieve the desired system performance. e system we have built is a single input. For the output system, the relational expression between input change and output change can be expressed as (2)

Adaptive Object Model
Engine. e interpreter mode defines the grammatical representation of a given language and provides an explanation construction mode to construct the corresponding structure according to the description of the metamodel, and the interpretation mode interprets the structure constructed by the construction mode. e interpretation of the metamodel includes two aspects: one is that the model engine instantiates the metadata to generate specific entity attributes, relationship, and the other is to interpret business rules at runtime to connect business rules and entities. at is, the properties and operations of the object are separated, customized separately, and instantiated at runtime to generate a complete object. By changing the entity or business rules at runtime, the system has flexibility and adaptability. e model engine creates it by interpreting the metamodel. Implement the model. Taking the general model of the adaptive learning system as the main reference model and considering the factors that meet the research needs in each model, the adaptive object model is designed, as shown in Figure 2. e first part is composed of the user model and learning behavior. e user model describes the individual characteristics of the user, such as the description of the basic information of the learner (name, gender, date of birth, phone number, e-mail, education level, and occupation), learning style, cognitive level and hobbies, learning behavior records, and the learning history of the learner (e.g., the type of media that the learner accesses to learning resources, learning time, and the number of visits); the system can continuously update the user model according to the user's learning history. e second part is the domain model, which describes the structure of domain knowledge, including the connection between concepts and concepts. Each concept can have different attributes, and concepts with the same attribute can be of different data types. e connection between concepts is an object that connects two or more concepts, with unique identification values and attributes. e third part is the adaptive model, which defines a set of rules for accessing various parts of the domain model according to the information in the user model and how to modify the user model. ese rules reflect the idea of teaching design for the curriculum. e fourth part is the adaptive engine, which corresponds to the realization of the system; selects, assembles, and presents pages according to the user model; executes the adaptive rules; and realizes the modification and maintenance of the user model according to the user's learning behavior history. e fifth part is the presentation model, which is based on the user model, domain model, and adaptive model to Complexity achieve the adaptive display of content, navigation, and sequence through the adaptive engine. e content display can display the learning content of different media types (e.g., basketball, pictures, and text), facts, or abstract characteristics according to the user's learning style. e second is navigation, the system is based on the learning style, cognitive level, and interest. Hobbies are divided into global navigation and local navigation. Global navigation is mainly presented by the domain knowledge tree structure. e tree structure can display the complete knowledge system of the course, and the learning status mark shows the current learner's knowledge state of mastery.

Tracking Algorithm of Basketball Movement
Based on Adaptive Object Model

Camshift Basketball Goal Tracking Based on the Two-Dimensional Joint Feature
Model. An improved Camshift method based on the chromaticity-differential two-dimensional joint feature model is proposed. According to the chromaticity information of the image, the differential information of the image is extracted, and the chromaticitydifferential two-dimensional joint histogram model of the target is established. Since the differential information can reflect the detailed information of the image and the relative position information of the pixel distribution, the joint model can organically combine the two features to describe the target model more rigorously, thereby improving the accuracy of target recognition and effectively distinguishing the target and background in the image to expand the scope of application of the algorithm. e flowchart is shown in Figure 3.  Figure 1: Structure diagram of control system based on the adaptive object model.  Figure 2: Adaptive object reference model.

Complexity
In the above target tracking process, the size and direction of the tracking target are updated as follows: Since the differential information can reflect the details of the target and the relative position information of the pixels, in the target recognition process, the chromaticity information and the differential information of the image work together, which can overcome the shortcomings of inaccurate recognition caused by solely relying on chromaticity information and the background to the target.

Camshift Basketball Tracking Based on Saliency
Histogram. In general, if the target is not a single color, the target will contain multiple hue levels, of which there are usually only one or a few levels of chromaticity areas that are susceptible to interference from the background hue. In other words, there will be a part or a small part of the level of hue area significantly different from the hue of the background, and these hues can be regarded as salient features for identifying the target. Enhancing the role of these salient features in the recognition process will improve the accuracy of target recognition. To this end, the saliency-weighted histogram is used to establish the target model. Using the above-weighted histogram model to achieve Camshift target tracking can improve the performance of the tracking algorithm. e specific algorithm is described as follows: (v) Step 5: according to the gray value of the backprojection image, calculate the zero-order moment and the first-order moment of the search window: N 0 � p x 1 , y 1 + p x 2 , y 2 + · · · + p x n + y n .  Figure 3: Improved Camshift target tracking algorithm flowchart.

Complexity (vi)
Step 6: return to Step 1 to redetermine the target area, and reconstruct the weighted histogram model of the target to realize the target recognition and tracking of the next frame of image.
It can be seen from the above tracking process that when the background of the target is constantly changing due to movement, the selected background area is also constantly changing, and the saliency of different tones will also change; therefore, in the establishment of the weighted target histogram model, the weight is also constantly adjusted, and the target histogram model is also updated in time, which can adapt to the requirements of target recognition and tracking in different backgrounds. at is to say, in the process of recognition and tracking, it can always be ensured that the current salient hue plays a major role in the recognition process, thereby weakening the effect of insignificant hue, effectively suppressing the interference of the background area on target recognition and improving target recognition and tracking performance. Figure 4 shows the simulation flow chart of self-learning update strategy for simulation and presentation template library. is process is equivalent to a basketball tracking evaluation system. e evaluation system can evaluate the tracking results of each frame target (e.g., tracking success, template judgment, and tracking status judgment) and then select a suitable template for the template library. Our algorithm is a process of automatic learning and robust judgment. We can divide the algorithm into three processes (tracking state learning and judgment, tracking result learning and judgment, and occlusion learning and judgment). e first step can automatically determine whether the tracking process is steady-state tracking, gradually changing state tracking, or suddenly changing state tracking. Each tracking status has its own update strategy. e second step is to add spatial constraints to select and determine the tracking results. e learning and judgment of the tracking results of this process are necessary. Because the real scene is very complex and variable, any tracking algorithm will more or less fail to track. e third step is to add occlusion learning and judgment to prevent the wrong template from being entered into the template library.
According to the analysis results and tracking status, we can adaptively select the corresponding update strategy. If the tracking is judged to be correct and the match between the target and the template is high enough, there is no need to update the template. If the tracking error is judged, a different update strategy should be adopted. In a steady state, if the correct track is determined, we will not add all current frames to the template library; instead, we select samples that are not too similar in the template library. In the gradually changing state, if the judgment result is correct, the similarity between the target and the historical template is lower than the similarity between the target and the instantaneous template. e historical template does not describe the characteristics of the current target well and needs to be updated. In the state of sudden change, no historical template meets the current goal. erefore, we cannot put the current framework in the template library.

Experimental Verification
In order to verify the effectiveness of the adaptive object model, the Meanshift algorithm, the basic Camshift algorithm, and the multifeature fusion Camshift tracking algorithm [14] are compared with the algorithm in this paper for experimental analysis. Among them, the multifeature fusion Camshift algorithm uses color, edge gradient, and texture adaptive weighted fusion to construct a joint probability distribution map to achieve target tracking. Choose basketball as the target to be tracked, which is very similar to the color of the cabinet in the background, and it is not easy to distinguish the scrolling process of the basketball from left to right. Higher accuracy of multiobject tracking leads to better accuracy scores. e highest score is 1, and there is no lowest score. e correct rate of each tracking algorithm is shown in Figure 5.
e tracking performance comparison of the abovementioned various tracking methods is shown in Table 2. e positioning deviation in Table 2 refers to the pixel distance between the center position of the target area located by the tracking algorithm and the center position of the tracked target. e background ratio refers to the percentage of the background in the target area located by the tracking algorithm. It can be seen from the experimental comparison results that the algorithm described in this article has the smallest positioning deviation and the smallest proportion of the background in the target area located. erefore, among the above comparison methods, the method described in this article has the best tracking performance.
Each experiment includes a training phase and a testing phase. In the training phase, it is assumed that the corresponding information is known, such as entrance and exit positions, exit speed, and time value. In the testing phase, the algorithm analyzed the comparison results of three different channels. e value of Bhattacharya in Figure 6 is 58,410, 2.98, so it is not possible to directly judge that the two targets are the same target. Figure 7 depends on the result of the hue H component color histogram. Figure 8 shows that the color histogram of the saturation S component and the color histogram of the lightness V component are generally not used as matching features. Figure 9 is the result of the brightness transfer function of basketball tracking 1 and basketball tracking 2. e brightness transfer function helps to complete the basketball tracking matching and brightness conversion.
In addition, real-time performance is an important indicator to measure target tracking performance. Table 3 shows the time consumed by the above three algorithms.
It can be seen from Table 3 that the traditional Camshift tracking algorithm consumes the shortest time, mainly because its target model is relatively simple to establish and the amount of data calculation is relatively small; the multifeature fusion Camshift tracking algorithm consumes the longest time, mainly because the method requires continuous calculation e color, texture, and edge features in the image greatly increase the amount of data calculation.        meet the real-time requirements of ordinary target tracking systems.

Conclusion
Aiming at the problem of target loss due to the small color difference between the target and the background, this paper proposes the establishment of a two-dimensional joint target model of an adaptive object model. e differential image is established based on the original image chromaticity distribution information, and the detailed target information and pixel information reflected by the differential information are used. Relative position distribution information is to improve the accuracy of target recognition. Use twodimensional joint features to build the target model, reducing the redundant information generated by the independent feature model. Aiming at the problem of target loss when the target is in a complex background, a saliency histogram Camshift tracking method fused with an adaptive object model is proposed. e target histogram model and background histogram model of the adaptive object model are analyzed in real time to adjust the target model. e weight is used to update the target model. In the process of identifying the target, it highlights the role of salient tones, effectively reduces background interference, and accurately locates the target.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.