In the field of robotics research, a crucial applied problem is the hand-eye calibration issue, which involves solving the matrix equation \(AX = YB\) . However, this matrix equation is merely a specific case of the more general dual quaternion matrix equation \(AX-YB=C\) , which also holds significant applications in system and control theory. Therefore, in this paper we establish the solvability conditions of this generalized hand-eye calibration dual quaternion matrix equation and provide a general expression for its solutions when it is solvable. As an example of applications, we design a scheme for color image encryption and decryption based on this dual quaternion matrix equation. From the experiment, it can be observed that the decrypted images are almost identical to the original images. Therefore, the encryption and decryption scheme designed using this dual quaternion matrix equation is highly feasible.