Reputation: 569
The modern CameraX API revolves around use-cases (preview, picture taking and image analysis). However, the ImageAnalysis seems arbitrarily capped at 1080 according to my observations and the documentation:
The maximum available resolution that could be selected for an ImageAnalysis is limited to be under 1080p. The limitation of 1080p for ImageAnalysis has considered both performance and quality factors so that users can obtain reasonable quality and smooth output stream under 1080p.
My image processing pipeline requires 1280x720 so I'm somewhat frustrated over now being stuck to legacy Camera2 madness and perhaps not being able to transition to this new API afterall. Is there a way to go around this limitation (which seems to be fairly new, many CameraX samles I find have no such limitation) or can I somehow easily rescale/pad the 1080x1080 YUV data to a 1280x720 resolution which would satisfy the next step in my processing pipeline?
Upvotes: 0
Views: 435
Reputation: 157
The highest resolution is 1920x1080, you can target any resolution you want under that.
imageAnalysis = new ImageAnalysis.Builder().setTargetResolution(new Size(720, 1280)).build();
Upvotes: 4