BACKGROUND

Aspects of the disclosure relate to detecting a trailer, a tow-ball connected to a towing vehicle, and a coupler attached to the trailer in order to assist in hitching the trailer to the towing vehicle and/or preventing trailer jackknife.

Trucks are in high demand in the United States mainly due to their ability to tow trailers ranging from small utility trailers to large recreational vehicles (RVs). The process of connecting a trailer to the towing vehicle is called trailer hitching. During the trailer hitching process, a trailer coupler is aligned and secured to a tow-ball that is attached to the towing vehicle. A successful trailer hitching process requires high accuracy for aligning the trailer coupler and the tow-ball. Maneuvering a vehicle in reverse direction to achieve high alignment accuracy between the tow-ball and the coupler is very difficult and time consuming (even for experienced drivers). Thus, driver assistance systems that partially or fully automate the trailer hitching process could be very useful.

Advanced Driver Assistance Systems (ADAS) have become a common feature in most of modern vehicles. Commonly available ADAS features include lane keep assist, cross-traffic alert, front collision warning, traffic sign recognition and the like. Progress in this area is accelerated by the pursuit of fully autonomous driving (AD). In addition, computational power of embedded system has drastically increased in recent years, which enables designers to deploy more complex systems in the vehicle. There is a need in the art for automated trailer hitch systems or trailer hitch assistance systems that can help a driver of a towing vehicle in connecting the trailer to the towing vehicle and/or continuously tracking the trailer afterwards for jackknife detection and prevention.

BRIEF SUMMARY

Methods, apparatuses, and computer-readable media are disclosed for tracking a trailer, a tow-ball and/or a coupler. In one embodiment, a method includes obtaining a sequence of images from a camera positioned in rear of a vehicle. Field of view of the camera may include at least a tow-ball attached to the vehicle, and a trailer located in the scene behind the vehicle. In addition, the sequence of images may be captured continuously at a sequence of predefined time stamps while the vehicle is moving. As an example, the first image is captured at a first time stamp and the second image is captured at a second time stamp. The method further includes detecting the trailer and the tow-ball in the first image of the sequence of images using a trained learning model based on the first image and at least one scaled version of the first image, and estimating an area of interest using a tracking algorithm and locations of the detected trailer and the tow-ball in the first image. The area of interest corresponds to an area in the second image that will include the trailer with a probability that is higher than a first threshold. Furthermore, the method includes estimating a distance between the vehicle and the trailer based on the detected location of the trailer in the first image. Upon determining that the distance between the vehicle and the trailer is less than a second threshold, the method continuously detects locations of the trailer, tow-ball and a coupler attached to the trailer in each image of the sequence of images using the learning model and the estimated area of interest. The estimated area of interest is then updated to correspond to an area of interest in the following image in the sequence of images. The method further includes actuating an action of the vehicle based on the detected locations of the trailer, tow-ball and the coupler.

In one embodiment, the first area of interest includes an area that is larger than an estimated bounding box for the trailer. In another embodiment, detecting the trailer and the tow-ball in the first image using a trained learning model based on the first image and at least one scaled version of the first image includes scaling the first image using a first and a second scaling factor to generate a first and a second scaled image, respectively.

In one embodiment, the method includes detecting the trailer in the first image using the trained learning model and a first detector to generate the first detected location, and detecting the trailer in the first scaled image using the trained learning model and a second detector to generate the second detected location and detecting the trailer in the second scaled image using the trained learning model and a third detector to generate the third detected location. The method further includes combining the first, the second and the third detected locations to generate a bounding box corresponding to the location of the trailer in the first image.

In one embodiment, estimating the distance between the vehicle and the trailer includes calculating the distance between the vehicle and the trailer using the detected location and one or more calibration values of the camera.

In one embodiment, the one or more calibration values are determined in advance based on a plurality of calibrating images captured by at least a second camera located on a side of the vehicle.

In another embodiment, the method further includes generating a graphical representation of one or more of the detected trailer, coupler and the tow-ball and a trajectory overlay for connecting the tow-ball to the coupler. The action of the vehicle may include displaying the generated graphical representation to a driver of the vehicle to assist in moving the vehicle in reverse direction towards the trailer.

In one embodiment, the method further includes calculating an angle between the trailer and the vehicle while the vehicle is moving by continuously detecting and tracking movement of the trailer. Actuating an action of the vehicle may include actuating a jackknife prevention action to avoid a trailer jackknife situation.

In one embodiment, the action of the vehicle includes determining a trajectory from the vehicle to the trailer using detected locations of the tow-ball and the coupler, and autonomously moving the vehicle in reverse direction towards the trailer by following the trajectory from the tow-ball to the coupler.

In one embodiment, an apparatus for tracking a trailer, a tow-ball and/or a coupler includes a memory and at least one processor coupled to the memory. The at least one processor configured to obtain a sequence of images from a camera positioned in rear of a vehicle. Field of view of the camera may include at least a tow-ball attached to the vehicle, and a trailer located in the scene behind the vehicle. In addition, the sequence of images may be captured continuously at a sequence of predefined time stamps while the vehicle is moving. As an example, the first image is captured at a first time stamp and the second image is captured at a second time stamp. The at least one processor is further configured to detect the trailer and the tow-ball in the first image of the sequence of images using a trained learning model based on the first image and at least one scaled version of the first image, and estimate an area of interest using a tracking algorithm and locations of the detected trailer and the tow-ball in the first image. The area of interest corresponds to an area in the second image that will include the trailer with a probability that is higher than a first threshold. Furthermore, the at least one processor is configured to estimate a distance between the vehicle and the trailer based on the detected location of the trailer in the first image. Upon determining that the distance between the vehicle and the trailer is less than a second threshold, the at least one processor continuously detects locations of the trailer, tow-ball and a coupler attached to the trailer in each image of the sequence of images using the learning model and the estimated area of interest. The estimated area of interest is updated to correspond to an area of interest in the following image in the sequence of images. The at least one processor is further configured to actuate an action of the vehicle based on the detected locations of the trailer, tow-ball and the coupler.

