In view of the variety and occlusion of vehicle target motion on the urban intersection, it is difficult to accurately detect the traffic flow parameters in all directions and categories of the intersection, so an improved k-means trajectory clustering method based on NURBS curve fitting is designed to obtain the traffic flow parameters. Firstly, the B-spline quadratic interpolation function is used to fit the smooth NURBS curve of vehicle trajectory; secondly, K-means clustering is used to measure the minimum distance, and the location of the first and last end points of the vehicle trajectory is used to realize the automatic division of the intersection area; finally, according to the intersection area where the start and end points of vehicle trajectory belong, respectively, the moving mode of a vehicle is determined, and the traffic flow parameters are classified and counted. Experiments show that the method has high accuracy and simple algorithm, which can meet the application requirements of intelligent transportation. It can provide effective data for traffic congestion analysis and lane occupancy estimation, and it is an important parameter for dynamic time setting of intersection information lights.