Aspect Ratio Issue to be fixed
Thank you for sharing this amazing source codes for mordern android app development. I have found a bug. My smart phone is LG V50 thinkq. Screen size in Logcat shows 1440x3030. but iamage from FrameAnalyser shows 720 x 1440 and image in drawOverlay got crushed.
below code is fix of the issue.
preview = Preview.Builder() .setTargetAspectRatio(AspectRatio.RATIO_4_3) .build()
In mainactivity oncreate method: frameAnalysis = ImageAnalysis.Builder() // .setTargetResolution( screenSize ) .setTargetAspectRatio(AspectRatio.RATIO_4_3) .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST) .build()
@kimjeonghyon Yeah, that's a problem. But then there's a aspect-ratio mismatch when we are drawing the depth map ( 4:3 ) on the screen ( the aspect ratio being 16:9 ).
@shubham0204 Can we generate .ply file from depth image ? Can you please help on this how can we do that