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.

### written by mandi

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.

2. #### whizzkidd

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

3. #### vgzalez

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

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

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

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. :)

8. #### strummy

Has anyone tried an HD camera/LomoKinoScope combo?

10. #### gvelasco

I'll look into this too.

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

12. #### andredimu

thanks @pink-fu KinoCut works!

14. #### recurving

@pink-fu awesome.

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.

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

17. #### whizzkidd

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

18. #### stouf

@pink-fu Mmm it's not working for me... I get:
[INFO] processing files [object File]
[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

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 !

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.