In response to the limitations of traditional industrial robots, which can only perform fixed-point palletizing tasks with low actual gripping accuracy and high failure rates, a 3D vision-based robot palletizing system was designed. This system focuses on the pallets containing workpieces and installs the camera in a manner similar to having eyes in the hands. To improve the robot's gripping accuracy, the Shape-NCC (Normalized Cross-Correlation) rotation-invariant template matching algorithm is used to identify target images, overcoming the problem of the traditional NCC algorithm being unable to find targets after image rotation. Using depth images, the system obtains the three-dimensional coordinates and rotation angles of the pallets in the target images, and communicates this position information to the robot via TCP. The robot then adjusts its grip position based on this information and ultimately completes the palletizing task automatically according to the palletizing strategy. Field experiments demonstrate that the system can achieve highprecision palletizing, with position errors within ±5mm and angle errors within ±1.7°. When operating at the highest speed in automatic mode, the palletizing speed reaches 70%, meeting the precision and speed requirements of industrial palletizing systems.