This is your last chance to pre-order your Petzval Lens and get the special aperture plates included for free! With estimated delivery in August (or even sooner), don’t miss out on securing your picture perfect portrait lens!

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.

written by mandi

22 comments

  1. sedgetone

    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 · report as spam
  2. whizzkidd

    whizzkidd

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

    over 2 years ago · report as spam
  3. vgzalez

    vgzalez

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

    over 2 years ago · report as spam
  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 · report as spam
  5. stouf

    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 · report as spam
  6. sedgetone

    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 · report as spam
  7. pink-fu

    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 · report as spam
  8. strummy

    strummy

    Has anyone tried an HD camera/LomoKinoScope combo?

    over 2 years ago · report as spam
  9. pink-fu

    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 · report as spam
  10. gvelasco

    gvelasco

    I'll look into this too.

    over 2 years ago · report as spam
  11. sedgetone

    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 · report as spam
  12. andredimu

    andredimu

    thanks @pink-fu KinoCut works!

    over 2 years ago · report as spam
  13. andredimu

    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 · report as spam
  14. recurving

    recurving

    @pink-fu awesome.

    over 2 years ago · report as spam
  15. pink-fu

    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 · report as spam
  16. andredimu

    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 · report as spam
  17. whizzkidd

    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 · report as spam
  18. stouf

    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 · report as spam
  19. stouf

    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 · report as spam
  20. pink-fu

    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 · report as spam
  21. nishta

    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 · report as spam
  22. pmueller

    pmueller

    @ andredimu: Which scanner did you use for the scans (Lomography lomokino-samples package: http://lmgr.ph/vrhFOt)?

    4 months ago · report as spam

Read this article in another language

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