stuartpittaway / Super8FilmScanner

Super 8 film scanner, 3d printed and uses OpenCV
GNU General Public License v3.0
37 stars 9 forks source link

HDR bracketing #1

Open patriot1889 opened 2 years ago

patriot1889 commented 2 years ago

Hey Stuart,

I'm just in the process of printing the parts you've designed for the structure of the scanner.

I was wondering if you had any ideas on how you could integrate bracketing to enable creating a Mertens merge image? There is a project called YART (https://github.com/dgalland/yart), which you're probably aware of, that does this and it looks like it works very well for bringing back some shadows and highlights from the scans.

Cheers!

stuartpittaway commented 2 years ago

I have seen that project. I'm afraid that the details are a bit out of my depth.

I spent ages trying to improve quality, but in the end I realized that my original source material was nothing special, so just tried to make the best of what I had.

patriot1889 commented 2 years ago

No worries, thanks for the response.

I can see in the code that you have an array CAMERA_EXPOSURE = [-8.0,-4.0,-10.0]

Is this remnants of toying with the idea of capturing multiple exposures? I can do the merge elsewhere, I just need to try and figure out how to capture 3-5 exposures.

stuartpittaway commented 2 years ago

Yes that right I did play around with multiple exposures, but the time taken to capture all the frames and merge together.

thejokoono commented 5 months ago

No worries, thanks for the response.

I can see in the code that you have an array CAMERA_EXPOSURE = [-8.0,-4.0,-10.0]

Is this remnants of toying with the idea of capturing multiple exposures? I can do the merge elsewhere, I just need to try and figure out how to capture 3-5 exposures.

Did you end up integrating it?

stuartpittaway commented 5 months ago

Yes, that was me playing around - I gave up with that in the end as I wasn't trying to get the best possible picture, just something suitable to share with friends and family.

thejokoono commented 5 months ago

I've built the scanner and amazingly it works! I've scanned the first films and want to say thank you so much for providing all this info! I accidentally bought a "warm white" LED, which gives the images a red hue, so maybe it makes sense to add "cool white LED" to the list in the README.

If I set CAMERA_EXPOSURE = [-8.0,-4.0,-10.0] , it sucessfully takes 3 images, but they all have the same exposure, even with the values set very high. Anything i'm missing, or is that as far as you've implemented it?

stuartpittaway commented 5 months ago

Well done @thejokoono great work!

You might be able to fix the warm white LED in software - automatic white balance?

I didn't get the EXPOSURE stuff to work - not sure what I was doing wrong, I suspect I'm not setting the camera parameters correctly.

I'd love to see some photos of your project - upload one here!

thejokoono commented 5 months ago

I'd love to see some photos of your project - upload one here!

Here's a picture of my setup. There's a lot of small changes I've made, which I might add PRs for in the coming days (like support for regular 8mm film). Instead of the microscope lens I used a 50mm 1.8 with an EF to C-mount adapter and an extension tube, which worked out great after modeling a (more or less) fitting bracket.

overview

I learned a lot while building this! Thank you for the your great comments in the code.

stuartpittaway commented 5 months ago

Thats fantastic - do you have lots of film to convert?

thejokoono commented 5 months ago

I have roughly 50-100 reels to convert, a mix of Super8 and regular 8mm film. Some of the 8mm film is so old (60+ years) that it has gotten a very red hue. We've had someone record some of the film off a projected wall over a decade ago, but the difference between that footage and the direct scans is night and day. No interlacing, more details and a lot more dynamic range.

The biggest annoyance for me was setting the focus correctly, as the depth of field for the lens is very shallow, even at F8, and the preview image is low res. I looked for a 3d printable micro adjustment slider, but couldn't find anything. Also I don't think the pickup reel calculation works correctly for my reels and films unfortunately, but I will take a look at it again.

The biggest issue I've painfully had to find is that if you restart the scanning process, it will overwrite images stored in the output folder. To fix this, I included the date in the filename.

I adjusted the min and max sprocket size for OpenCV to identify the sprocket more reliably. So now, once I start the scanning process, it works more or less flawlessly and I hardly have to adjust anything.

stuartpittaway commented 5 months ago

Fantastic - feel free to submit any code changes, and if you publish any of the video captures on YouTube or similar, send me a link.