Reputation: 143
I want to use the Tensorflow Camera component which returns a Tensor3D for each frame of the camera preview. This is great for live classification with tensorflow models, however, I want to be able to convert this tensor back into a jpg or image format to be used with an OCR library like Tesseract.
Is there any way to convert a <tf.Tensor3d> into a more traditional image format for general use ?
Upvotes: 1
Views: 880
Reputation: 6819
You can either use tf.node.encodeJpeg or tf.node.encodePng but they require that the 3D Tensor passed in is of type uint8
.
Upvotes: 1