Reikan R&D – HyperDoF Click-To-Focus Software

At Reikan, we like to tinker around with research and development projects in order to break new ground in the areas of camera control and image processing.  HyperDoF is the result of some research we did back in February 2012 based on FoCal, and is a utility which allows you to create images you can click-to-focus or “refocus” (much like the Lytro camera, but with a normal DSLR and the click of a button).

Unfortunately, while we’re great at doing the research, we’re not so great at publicising it so it’s taken 10 month to get this information out!

What is HyperDoF?

HyperDoF is a two part utility – the Builder which runs on a PC, and the Viewer which can be embedded on any website.

The Builder is a PC application which controls a DSLR and allows you to quickly capture a set of slices through the objects in front of the camera.  You just have to connect the camera to the computer, set the number of slices, use the LiveView image on the utility to adjust the position and starting focus and hit the button to Start Capturing – it typically takes about 10-20 seconds to capture the images, and another few seconds to process.  The images are analysed and blended into a single file along with a special map which allows the Viewer application to quickly determine which slice to show for any given click on the image.  The following is a screenshot from the Builder application:

Reikan HyperDoF Builder Application

All of the clever image processing is performed in the Builder application, which means the Viewer ends up being a very simple application.  The final HDOF file is usually 1 or 2MB in size as it contains all the slices captures and the map image.  The refocusing works by analysing areas of sharpness in the image, so it’s not foolproof but where there is some contrast in areas i generally gets the focus slice correct (see the demos below for an idea of how well it works).

The Viewer started as a Silverlight utility for the web, but quickly turned into an HTML5 application in Javascript so it could be used on devices like the iPad as well as on computers.  In it’s current state, it’s a chunk of about 500 bytes of minified JavaScript that sits on the top of a standard HTML file.

Can I get it?

Right now, we can’t offer this as it’s not a finished product.  We got the Builder application to a completed first version, but as it’s been 10 months since we did this there are several things that are out of date (the camera support is quite old and has been significantly improved in FoCal, and the Builder application doesn’t work on a Mac – it’s Windows only).  The Viewer was never really taken much further than the bare minimum, but it’s just about functional.

You can download the manual for the version used to create the demo files here – it gives an idea of where we got to with the HyperDoF Builder application.

Let us know if you’re interested in this application through the contact form – if there’s enough interest we may reawaken it as a side project, probably by publishing the format of the final files and Viewer source code operation, and getting community support for development of the Viewer application while we bring the Builder up to date.

Demos

It’s no good us just talking about it – we wanted to show it in action too!  There are a couple of demo files we created which you can access by clicking the links or images below:

Click the link, and another page will be shown with the Viewer utility embedded.  Follow the instructions and you can then click on the image to refocus.

Lasers

This is a couple of diode lasers on a desk (I told you we like to experiment!), along with a couple of electronic modules, mobile phone SIM card and a key.  The independent objects work well – the key, the SIM card, the label on the lasers and the detail on the modules give HyperDoF something to grab on to when you click:

Lasers Demo
Reikan HyperDoF Lasers Demo

Knives Demo

This is a few throwing knives (sometimes it gets dangerous in the Reikan office!), and on the back wall is an early Reikan FoCal target from back in February 2012!  Clicking the back wall will focus on the target which has great contrast, and details like the engraving on the knives and the sheath also give good “focus lock”:

Knives Demo
Reikan HyperDoF Knives Demo

Reikan R&D

FoCal was born from my (Rich’s) “fiddling around” and experimentation is something I can’t help doing.  Several R&D projects have been going on at Reikan during the FoCal development, and where possible we’ll publicise them here.  Some are young and might turn into commercial products, but where we decide for one reason or another that we won’t proceed, we’d rather the information inspired others to take it further than just let it disappear.

So keep an eye out for further posts in this area – I think it’ll be quite exciting! 🙂

2 comments on “Reikan R&D – HyperDoF Click-To-Focus Software

  • you got to account for change in focal length (hence magnification) due to change in focus. this is common in many of the prime lenses.

    Reply
  • Richard Green says:

    Any progress with the focus stacking project.
    I have an interest in macro photography which as you know suffers from short depth of field. I have constructed a device which moves the whole camera on a track using a stepper motor controlled by an Arduino. Having used your lens calibration software I can see that controlling the lens focus would a more elegant solution and your software isn’t far away from what is required.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *