In this paper, we first discuss the singular value decomposition (SVD) of a quaternion matrix and propose an algorithm to calculate the SVD of a quaternion matrix using its equivalent complex matrix. The singular values of a quaternion matrix are still real and positive, but the two unitary matrices are quaternion matrices with quaternion entries. Then, applications for color image processing by the SVD of a quaternion matrix are given. Since a quatemion matrix can represent a color image, so we can use the SVD of a quaternion matrix to decompose a color image. Therefore, many useful image processing methods by SVD,such as eigen-images, image compression, image enhancement and denoise, can be extended to color image processing without separating the color image into three channel images.