You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm reversing negatives which sometimes include film borders. The borders sometimes mess up the inversion algorithm since their blackpoint does not always match the image's blackpoint (i.e. they're darker than the darkest point of a photograph should be).
I am hoping to remove them from my calculations.
Have you searched for similar questions?
Yes.
Are you able to provide a minimal, standalone code sample that demonstrates this question?
// reverse negativeconstreversed=awaitsharp(input).toColorspace("rgb16").flatten().negate().toBuffer();// make a small copy to make calculations -- this is where I'd like to get rid of the bordersconstdata=awaitsharp(reversed).clone().resize(500).toBuffer();// I then split `data` into 3 colour channels run `stats` and normalize histogram using `linear` with the number from `stats`
Are you able to provide a sample image that helps explain the question?
This is the negative that's been processed using the method above. Notice that it's a "half-frame," meaning that there are two photographs taken on what is usually takes up a "full frame." The scanner scans the entire frame so the black border isn't just around the photo but is also running through the middle. This isn't always the case. Point being that the blackpoint should be taken from the image, and not the border around it. A possible complication may occur when the photograph's blackpoint does match the blackpoint in the frame.
Below, I've applied the Photoshop Curves adjustment which as you can see simply cuts the black point on each channel individually. This is what the final image should look like, minus having to rely on expensive Adobe software and manual labour.
Thanks!
The text was updated successfully, but these errors were encountered:
Future possible enhancement #200 might provide what you're looking for, which relates to improving the normalise operation by ignoring the very darkest and lightest values.
Amazing, thank you. I'd like to add my contribution to this library in the near future with this enhancement and #1066. I'll begin by getting familiar with some C++ basics and this lib code. Pls let me know if you have any recommendations on where to get started first.
What are you trying to achieve?
I'm reversing negatives which sometimes include film borders. The borders sometimes mess up the inversion algorithm since their blackpoint does not always match the image's blackpoint (i.e. they're darker than the darkest point of a photograph should be).
I am hoping to remove them from my calculations.
Have you searched for similar questions?
Yes.
Are you able to provide a minimal, standalone code sample that demonstrates this question?
Are you able to provide a sample image that helps explain the question?
This is the negative that's been processed using the method above. Notice that it's a "half-frame," meaning that there are two photographs taken on what is usually takes up a "full frame." The scanner scans the entire frame so the black border isn't just around the photo but is also running through the middle. This isn't always the case. Point being that the blackpoint should be taken from the image, and not the border around it. A possible complication may occur when the photograph's blackpoint does match the blackpoint in the frame.
Below, I've applied the Photoshop Curves adjustment which as you can see simply cuts the black point on each channel individually. This is what the final image should look like, minus having to rely on expensive Adobe software and manual labour.
Thanks!
The text was updated successfully, but these errors were encountered: