Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

software #1

Open
jcupitt opened this issue Aug 8, 2024 · 1 comment
Open

software #1

jcupitt opened this issue Aug 8, 2024 · 1 comment

Comments

@jcupitt
Copy link

jcupitt commented Aug 8, 2024

Hi @jackw01, I came across your interesting repo on reddit.

I was wondering what software you were using for processing these scans? I made a tool you might find useful:

https://github.com/libvips/nip2

It's a bit like a spreadsheet, but for image processing, so cells can contain whole images. You can enter formula that describe the processing you want (eg. 1 - 1 / log A1 or whatever). Whenever you change anything, perhaps replacing an image in a cell or editing a formula, everything updates. It's built into most linuxes, or there are windows binaries in the "releases" tab.

I tried (very quickly!) processing your comparison shot:

image

That does the following:

  • extract the shot from your nice lightbox
  • split the colour bands to RGB, then for each band
  • estimate the minimum density (max pixel value) by taking the average pixel value of an area of film near the centre edge
  • max density by doing a gaussian blur and taking the min (to avoid camera noise)
  • rescaling the grey values to 10 .. 240 (ie. avoid the extreme edges)
  • recombine the corrected greyscales to RGB
  • invert in density space (ie. exp (1 / log X))
  • adjust brightness

It makes this output, which looks OK-ish:

log

It's just a quick demo, it needs some obvious improvements:

  • in your blue band, the film is brighter than the sprocket holes, I'm not sure why (hence the cyan squares)
  • flatfield correction of the lightbox (your box is quite a bit brighter in the centre)
  • you could estimate the actual transfer function for your film + camera + lightbox combo from a shot of a greyscale, like a macbeth chart
  • once you've found the transfer function, you could use a macbeth shot to compute the optimal 3x3 colour correction matrix, which would be great fun to try
@jcupitt
Copy link
Author

jcupitt commented Aug 8, 2024

... that workspace, if you're interested:

http://www.rollthepotato.net/~john/lightbox.ws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant