Image becomes blue masked after applying tf.image.crop_to_bounding_box and tf.image.encode_jpeg
Your problem here is not related to Tensorflow at all but to OpenCV.
For some reason, OpenCV loads images in a BGR format and not RGB as Tensorflow expects them to be.
Invert your first and third channels in your image before passing it to Tensorflow and everything should be fine.
I am trying to crop and save images from tensorflow object detection API output with following code I created using previous stack overflow questions.
But after saving the image seemed to have high density of blue color.
The original image has normal color. Since both cropping and encoding refer image channel for format I am not sure about the source of the issue.