For quite some time now, I'd like to add a creative mode on the photobooth. And I had the idea of a real-time "time scan" effect.
The idea is to apply a different time delay for each pixel of the image. For example the bottom line has no delay, and gradually to the top lines there is more delay:
The frame rate of the video input should be quite high in order to have the full image scanned in around 3 seconds.
After exploring different solutions, I got some help directly from raspberry pi forum user 6by9. As he told me, I then derived the raspividyuv C code. And it runs rather fast. The camera acquisition is at 90 fps, the rotating buffer filled accordingly. The rendering is at around 30 fps for 15% of total cpu usage.
The code is still messy but can be found here : github RaspiVidYUV.c and the raspberry pi forum page is here: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=230926
The code uses a greyscale image to determine the time delay of each pixels, so it is not limited to a vertical scan.
For a vertical gradient :
For a circle gradient:
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Oh wow! I read this without watching the video and you've got to watch the video to get the full effect.
That's a really neat approach to making the captured images more fun. Are you thinking about an option to generate animated GIFs from short recordings with the effects on? I think people would love posting them from the event if you did.
Are you sure? yes | no
Thanks a lot Mike!
What an awesome idea you just have with the animated gif ! I'll think about it :D
Are you sure? yes | no