In our previous article we've explained the internal software we are using for turning scans into LomoKino movies. But this script currently only runs on Windows – we thought maybe someone in the community is interested in porting this script to another system or writing an own version of it.
Please find the previous article here. Here is short description what we are doing: The program loops through all the images, creates a temporary copy of the image which has a height of 1 pixel.
Then the lightness value of each pixel is written to an array and the average lightness of the image calculated. For example if a photo is really dark the average lightness of the images is quite low, whereas for light photos it’s high – still there should be enough difference between the “photo” and the “gap”.
Then the program loops through the photo and checks if the lightness value exceeds a certain threshold (~1/3 of average). If this is the case it’s the start of a new frame; if it falls below this threshold, it’s the end of this frame. Finally, we check if the resulting coordinates form a rectangle that has more or less the proportions of a movie frame: if the resulting image is too small, throw it away. If it is too big, slice it up in useable pieces. If the proportions are ok, copy the frame to a new image and save it.
Finally: for ffmpeg to work correctly, resize all images to the same size, rename them to consecutive numbers and make a movie. That’s the voodoo. We know, this article addresses your inner nerd – but if you want to give it a try: we've created a package that contains the uncut frames of three movies for you to download and play with.
If you manage to improve this, or port it to another operating system, please leave a download link in the comments or write recurving a message.