Have an account? Login | New to Lomography? Register | Lab | Current Site:

## Are You a Programmer? Help Us Write a Software for Turning Lomokino Scans Into Movies

### 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.

The original photo
This is the photo from above reduced to one pixel – for better visibility we’ve scaled the height

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.

This is a visual representation of what the program exactly does – here you see the individual frames (white) in between the gaps (black)

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.

## 21 comments

1. #### sedgetone

Python with a QT interface would be the most sensible way to go, that way it would be cross platform. I'm snowed under so don't have the time right now. Fun idea and I like the approach.

over 2 years ago ·
2. #### whizzkidd

Mac.... Make it avaliable to use with Macintosh.... :)))

over 2 years ago ·
3. #### vgzalez

If anyone ports it to mac, I'll start thinking about buying a lomokino :)

over 2 years ago ·
4. #### edun

Why not just make a web front-end? Not even hard to make. Would cost some power, sure, but wouldn't it be great if people just could upload their scans and out come the video's? You could even make a 'lomokino-tube'. More visitors, more people buying stuff, and more 'inside of the community'. You could even charge piggy points to convert a scan to video, or something like that.
over 2 years ago ·
5. #### stouf

If only I had time... I'm a matlab nerd and I think there are great functions for image processing... I'll let you know if I try it.

over 2 years ago ·
6. #### sedgetone

Why don't you start a kinocine project on sourceforge? If you're reaching out to the comunity then that would be a great place to put it. Use your current source and examples so anyone can play with it. That way you so get all the code tracking you need and can branch variations. It will probably appeal to coders who have never even heard of Lomography

over 2 years ago ·
7. #### pink-fu

few days ago I've started coding a tool for lomokino. when I figure out how to best bundle the ffmpeg encoder I will definitely share a link to mac and windows downloads. :)

over 2 years ago ·
8. #### strummy

Has anyone tried an HD camera/LomoKinoScope combo?

over 2 years ago ·
9. #### pink-fu

well, I have put something together. It's very rough, buggy and feature-less. You can find the mac and windows downloads here: https://bitbucket.org/mgron/kinocut/wiki/download

over 2 years ago ·
10. #### gvelasco

I'll look into this too.

over 2 years ago ·
11. #### sedgetone

Just noticed this, it may be worth contacting the developer and seeing if some life can be breathed back into the project: http://lomovision.sourceforge.net

over 2 years ago ·
12. #### andredimu

thanks @pink-fu KinoCut works!

over 2 years ago ·
13. #### andredimu

Movie edited with KinoCut by @pink-fu on Mac http://vimeo.com/32136346 you can download KinoCut here: https://bitbucket.org/mgron/kinocut/wiki/download images from Lomography lomokino-samples package: http://lmgr.ph/vrhFOt

over 2 years ago ·
14. #### recurving

@pink-fu awesome.

over 2 years ago ·
15. #### pink-fu

There is still lot of work. I hope, that in very near future I have a stable and usable KinoCut version. feedback is important! thanks a lot.

over 2 years ago ·
16. #### andredimu

Hi @pink-fu thanks for your work
In KinoCut on MacOs when I select more than 10 images, the Process button is no more clickable because it disappear, it's no possible scrolling the window to reach it

over 2 years ago ·
17. #### whizzkidd

@pink-fu, thanks. I've a T-Max film to process, I will give it a try with KinoCut for mac...

over 2 years ago ·
18. #### stouf

@pink-fu Mmm it's not working for me... I get:
[INFO] processing files [object File]
[INFO] Async. Image Load Complete
[INFO] finished loading 1 images in 1469 ms
[INFO] going to slice 1 inputs
[INFO] slicing input[ 0 ], found 0 , took 203 ms
[INFO] removing incorrect slices took 0 ms
[INFO] creating 0 output bitmaps (cut, rotate) took 0 ms
[ERROR] nothing created

over 2 years ago ·
19. #### stouf

@pink-fu woop I got it, the film strip should be horizontal (mine was vertical) : ) It works great ! But somehow the video quality from @mandi program is better... : ) Maybe you would need to change the video compression ? Anyway, great work !

over 2 years ago ·
20. #### pink-fu

@stouf, thank you very much.. I'm working on it. I've made the cutting algorithm a little bit better. The output is not yet set for best quality, I will pull these settings to the user interface. Meanwhile I've setup a simple wiki with so you can track the progress and download new kinocut versions:

https://bitbucket.org/mgron/kinocut

Thanks for feedback.

over 2 years ago ·
21. #### nishta

I have implemented* the described algorithm in Processing**. If anyone is interested. * https://github.com/rglass/cinecut/ ** http://processing.org/
over 1 year ago ·

### Read this article in another language

This is the original article written in: English. It is also available in: 日本語.