How to get cropped image of detected object in android studio.(Object detection)

I am working on a sign language project in which I have used my hand detection model to detect hand in real time camera using camerax api.
The app is working fine and it is detecting hand correctly, now I want to take that detected hand’s image and give it to classification model to predict the label.
How can I do that.

I think that with the tf-lite support library you could preprocess the image given a ROI/bbox

https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/task/core/vision/ImageProcessingOptions.Builder#public-abstract-imageprocessingoptions.builder-setroi-rect-roi

If you want instead to feed the detected ROI inside the same model for the classification route you could try to build your model with a resize_crop directly and check about the tricks for conversion in TFlite for that op: