lazy camera

Star-Dust

Expert
Licensed User
Longtime User
I have seen applications on the store that have a curious effect in the photo. Instead of shooting it in full, they combine a series of frames with horizontal strips while the subject is moving ... I wanted to recreate it with B4A ,,,,


1-ezgif.com-optimize.gif
 

JohnC

Expert
Licensed User
Longtime User
I would think that you would first take a full screen photo and display it to the user as the "master" image.

Then immediately take a second photo programmically but trim the top 1% off the top of the newly captured image and then overlay it on the first image - making a new composite "master" image that consists of the top 1% of the first image and the bottom 99% of the second image.

Then take another photo programmically and trim the top 2% off it, and again overlay it on the previous "master" image, creating a newer "master" image that consists of the top 2% of the previous master image and the bottom 98% of the newly capture image.

...and so forth
 
Last edited:

JordiCP

Expert
Licensed User
Longtime User
Similar to @JohnC approach, but I think that in order to get a smooth result, the way to go would be to play with the camera preview event data and progressively draw a canvas (initially a transparent canvas covering the full preview panel) that will be drawn line by line from top to bottom, progressively covering the preview.

All android devices (*) support at least the preview YUV format (which can be converted to rgb). You only need to decode the needed line(s) each time and add them to your drawn bitmap after every X miliseconds (or preview events) depending on how 'lazy' you want it to be.

(*) perhaps all current Android phones already also support RGB preview format, which would make it easier, worth checking
 

Star-Dust

Expert
Licensed User
Longtime User
Similar to @JohnC approach, but I think that in order to get a smooth result, the way to go would be to play with the camera preview event data and progressively draw a canvas (initially a transparent canvas covering the full preview panel) that will be drawn line by line from top to bottom, progressively covering the preview.

All android devices (*) support at least the preview YUV format (which can be converted to rgb). You only need to decode the needed line(s) each time and add them to your drawn bitmap after every X miliseconds (or preview events) depending on how 'lazy' you want it to be.

(*) perhaps all current Android phones already also support RGB preview format, which would make it easier, worth checking
Exactly, there is a small obstacle to overcome. As soon as I complete it and pass it, I will post the source.
Great @JordiCP always sharp
 
Top