Thanks for the question.
CameraX can't support to only capture portion of the preview image. There might be some approaches to achieve your goal.
1. If you only need the a lower resolution result as the preview's resolution and
PreviewView is used, you may be able to get the Bitmap of the preview image by the
PreviewView#getBitmap() API and then crop what you want.
2. If you want to get a higher resolution result that is cropped from ImageCapture's captured JPEG image and
PreviewView is used, you may be able to use the (TransformExperimental)
CoordinateTransform API to transform the rectangle position cross different types of use cases. Please see the sample code
here.