Android camera preview capture/resizing captured image to match preview -
i trying create , application requires me take captured image , place on current camera preview 0.5 alpha. "overlay" image serves guide capturing next picture; client use overlay compare current frame in preview captured image. simple way approach retrieve last file captured , set view. however, captured image not match camera previews resolution , aspect ratio, causing overlay , preview mismatch in representation of objects (the same object can vary in size between preview , captured image). have tried: using camera preview callbacks store current frame data, inefficient , doesnt work (also has slight translation, dimensions accurate) using aforementioned previous-file method , trying scale down or scale accordingly, match aspect ratio (maybe math wrong [i used aspect ratio of preview calculate area in original image] , still possible use approach? if way in on appreciated). researching ways capture contents of surface view, no avail. currently, 2 possible method