Get_camera_image has problem on server

I have test get_camera_image on local and it works fine. However, when I run the same code on server which has no GUI, the image get from get_camera_image is all black.