Fig. 8. Detection of container keyhole and its intersection over union (IOU) value. the resolution of the image detection system. The sub-pixel subdivision algorithm was first proposed by Hueckel [13]. It used to interpolate the pixels in the original image to obtain a more detailed image. Fig. 9 illustrates the sub-pixel subdivision process of container keyhole images. The original image size is 35×30 pixels. The positioning accuracy can only reach 1 on the image. The actual distance D1 (the straight distance between the target and the center line of camera) has a corresponding relationship with x (the distance between the target in the image and the center of the image). When the distance and focal length is known, D1 can be calculated by (1), and the errors of this method can be calculated by (2), where Pixel Size