PDA

View Full Version : On binning images



Steven Ruttenberg
16-Nov-2018, 12:16
So as not to detract from the other thread, I will move here. Assuming I did the math right here are my thoughts. It would all depend on the quality of the binned image which I am going to experiment with over the weekend to see how this plays out. Here are my thoughts.

So, currently I get a 1.8gb size 4x5 negative at 4200ppi and the files look great. I was reading on binning pixels from the Vuescan website and if I did a 3x3 binning, I would end up with a much smaller file, something like 39,200,000 vs 352,800,000 pixels.

This equates to and image that is 7000 x 5600 (equivalent to 1400ppi scan) vs 21,000 x 16,800 (equivalent to 4200ppi scan) pixels. While this is supposed to be better than scanning at 1400ppi and supposedly will reduce noise, would it still allow me a solid 16x20 or 32x40 print at 300ppi. 7000/300 is 23 x 18, so yes there, but 32 x40 would be 175ppi for printing instead of 300ppi. Or would you still be able to get a quality 32 x40 from the binned data which would require some interpolation to get to 300dpi? Or would 175ppi suffice (I don't think it would)

Definitely scanning at 1400ppi is a non-starter for sure. Yes, I can resize and do in photoshop starting with the original scanned image which is at 4200ppi.

Then there is 2x2 binning which still would not get you to 32 x40. That requires to reduce the scan dpi to 2400ppi which I have found to not be as good as it is cracked up to be. So looks like I will stay with 4200.

Another option is scan at max of 6400ppi then do a 2x2 binning which would provide for an easy 32 x 40 image which would be the same as scanning at 3200ppi, but supposedly better than scanning at 3200ppi. This would also allow the file to a fair amount smaller at 204,800,000 saving memory needed for the 48 million less pixels than scanning at and saving at 4200ppi.

All that to ask, have you tried binning? Other than noise reduction if any, how much quality do you lose? I am going to try this next scan after I zero in the focus on my V850 (got my resolution target and my transmission step and reflectance step references)

ps,
if anyone takes interest in this thread, lets not get into shouting matches and puffing our chests out over which is better drum or flatbed. I just found this topic quite interesting with possible potential as I scan at high resolutions which are huge files. The process of binning is the same regardless of scanner type as it is all the same or similar algorithm for averaging a group of pixels (data points for those who do testing and such). I am sure will all understand 2x2 is averaging over 4 pixels while 3x3 is averaging over 9 pixels.

Anyway, if interest is shown, let's keep it civil and fun!

Pere Casals
16-Nov-2018, 12:54
With the target you should see around 60 to 45 lp/mm depending on axis, last elements of Group 5. Let's see what you find by adjusting focus perfectly...

You can also test USM in Ps with high zoom in PS until you detect overshot.

I'd suggest you paste a crop of the target in a scanned image to be edited (at same dpi), so you would be able to track the quality degradation of the full image after resizing, binning, etc by inspecting what happened in the pasted crop.

Steven Ruttenberg
16-Nov-2018, 13:25
Interesting article on binning. I am reading now.

https://asp-eurasipjournals.springeropen.com/articles/10.1186/1687-6180-2012-125

Steven Ruttenberg
16-Nov-2018, 13:27
Steven, just a comment about units, when speaking about printers we should use ppi, not dpi, because each particular printer may use several dots to build a pixel. With scanners dots per inch and pixels per inch are the same, but not with printers.

With the target you should see around 60 to 45 lp/mm depending on axis, last elements of Group 5. Let's see what you find by adjusting focus perfectly...

You can also test USM in Ps with high zoom in PS until you detect overshot.

I'd suggest you paste a crop of the target in a scanned image to be edited (at same dpi), so you would be able to track the quality degradation of the full image after resizing, binning, etc by inspecting what happened in the pasted crop.

I edited for pixels per inch.

Steven Ruttenberg
16-Nov-2018, 13:46
In photoshop everything is in ppi, where as the printers are in dpi. I always found that a bit disconcerting. :) I want 300ppi, but the printer say can go to 2400dpi. Looking at this, this is my ipf6400 resolution max 2400x1200dpi. This then tells me I have 8 times the number of drops per inch than I do image pixels. So the question is, what the printer is doing with the information? Cause at 1 ppi to 8dpi for 300ppi image resolution does this become the minimum number? One could use say 150ppi and stay with printer max of 2400x1200 which would give 16 drops for every pixel. If my viewing distance is 25 feet, I can certainly get a way with less ppi and even dpi, but the closer the viewing distance the higher the ppi needs to be and the dpi.

Now, throw in binning.

Pere Casals
16-Nov-2018, 14:23
I want 300ppi, but the printer say can go to 2400dpi.

It depends on the printer, in a Lambda/Frontier/Lightjet there is a single dot per pixel, as dots are continous RGB tone, a dot can have any density (BW photopaper) and also any hue (C photopaper). Inkjets usually need to print several dots of different colors in a pixel to deliver an equivalent result, even if it's BW because a single droplet per pixel cannot make an smooth grayscale. If an inkjet uses several BW inks of different opacity then aparent resolving power can be enhanced.

Peter De Smidt
16-Nov-2018, 16:01
The printer uses many dots, including usually of different colors, to make up one pixel from the input file. All that matters from a file perspective is what's the best input value for the printer. With Epsons, that's 720ppi, and with Canon's it's 600ppi. Of course you can use less. The results will depend on the file quality, image content, printing medium (glossy, matte, canvas, hot press, cold press....).

Jac@stafford.net
16-Nov-2018, 16:26
Enlighten me, please. How exactly does binning apply to storing digital images, and to what end for printing? For most cases resolution and accutance is diminished. Rationale - perhaps to streamline ordinary consumer prints which are small, and consumer exceptions are low.

Aside Topic to all: Is your printer smarter than you are?

Ted Baker
16-Nov-2018, 16:42
All that to ask, have you tried binning?

I never use binning, other than what the scanner does by design when you select a lower resolution. Which is probably just a variation on simple nearest neigbour binning.

I scan at the highest resolution that I have patience for. This is currently 2400 on my 4990. If it was faster I would always use 4800. But I don't have the patience.

Even though the resolution of the 4990 at 50% contrast is something like 1500dpi.

That way I can choose the re sampling algorithm, which for me is Lanczos. This gives a slightly better result than simple nearest neighbour or binning you describe. So since its an easy choice I choose that one.

The way I look at is you can't change the sample size of the sensor. But you can potentially change many of the processing steps from scan to print, so it makes sense to choose the best option as you move along.

Admittedly the differences are very minor, so scan time is the dominant factor for me.

Steven Ruttenberg
16-Nov-2018, 17:49
Currently I scan at 4200ppi. I t by en size image to dimension I want at 300ppl and then print at Canons highest resolution of 600dpi which Canon has two settings for, stand and highest quality. I use highest quality and get good images. I think I tried 600ppi at dimensions I wanted and I was warned by PS the t was way to high.

I was curious about binning if technology had caught up to us. Ie, scan at highest resolution then store in a format that saves space but with little to no degradation. Noise reduction seems to be only plus still.

Pere Casals
16-Nov-2018, 18:45
I never use binning, other than what the scanner does by design when you select a lower resolution. Which is probably just a variation on simple nearest neigbour binning.


Ted, this is difficult to say, if you take a look inside this datasheet https://www.eureca.de/datasheets/01.xx.xxxx/01.04.xxxx/01.04.0127/TCD2964BFG_080131_E.PDF it it's clear that linear sensors have lower resolution modes, this allows for faster scans as less clocks are needed to pull sequential analog values from pixels, and also less A/D conversions are performed. If the scanner uses that feature then this is not a binning, but a lower res acquisition.

Anyway binning in scanning does not require Nearest Neighbor, Edge Sensing, etc algorithms because this is not a Bayer mosaic, for each pixel we have the 3 RGB values after the 3 color rows have flied over every spot. In that situation averaging all pixels in the bin is a perfect procedure.

Steven Ruttenberg
16-Nov-2018, 19:26
The article I posted shows the method of currently binning pixels. When you choose 4x4 for example you using 4 red, 4 blue and 8 green pixels to average over and get 1 super pixel. But as you can see, the bayer pattern complicates the binning process however, the binning is not the issue, the problem is in the demosaicing of the image after binning. The authors show that if you fix the step/s after binning image degradation is minimized.

Pere Casals
17-Nov-2018, 01:26
The article I posted shows the method of currently binning pixels. When you choose 4x4 for example you using 4 red, 4 blue and 8 green pixels to average over and get 1 super pixel. But as you can see, the bayer pattern complicates the binning process however, the binning is not the issue, the problem is in the demosaicing of the image after binning. The authors show that if you fix the step/s after binning image degradation is minimized.


Steven, my view is that this article is related to DSLR area sensors but not to scanner linear sensors "Binning in color image sensors results in superpixel Bayer pattern data, and subsequent demosaicking yields the final, lower resolution, less noisy image."

In Bayer area sensors you read only one color in a photosite, the two other are interpolated.

With scanner linear sensors you don't use that, the sensor "colors" are in 3 (or six) rows, and in each spot you make the 3 RGB readings taking advantage of the sensor displacement that sequentially places R, G and B pixels on the same spot, like it's done when pixel shift feature is used in a A7IIR.

Steven Ruttenberg
17-Nov-2018, 12:07
This may be true, but the concept is the same. It isn't necessarily the binning process, but rather the demosaicing and conversion to the digital image we see. The paper argues that if that is fixed and they provide evidence, then binning can be an alternative to achieve a much less noisy image, but with higher fidelity than if scanned at the equivalent dpi. Also, the natural side effect is a smaller file. Given that, are we still limited then in print size based on the binned dpi to smaller prints than achievable with the non-binned image?

Jim Michael
17-Nov-2018, 16:08
Has anyone tried the approach they use in astrophotography where multiple exposures are combined to remove the random noise?

Steven Ruttenberg
17-Nov-2018, 16:33
I did. Not easy cause the program I used converts things to black and white then you pick bayer scheme to go color again. Itbworks okay on earthly stuff, but not great. Ibhave a friend who takes 7 images digitally then combines in PS with median blend I think. Gets good results. Could do that with scanned images, but PS might puke working on 14 gigs worth of images way I scan. :D

Ted Baker
18-Nov-2018, 04:32
Steven,

The point that I tried to make earlier which was perhaps lost. Is that when you select anything other the 6400dpi on a V series epson (when using the film guide area) you are doing some kind of binning operation. Perhaps more than 1, i.e. something in the X dimension and something different in the Y dimension.

If you pick something other than 3200dpi, or 1600 then you are certainly doing some sort of software binning as well.

It has been my limited experience that if I use my own combination of resizing and sharpening, I can get a slightly better result, than if I left it to hardware/software combination that epson provides.

But it also takes a lot of extra time, that you need to balance against any very minor benefit.

There are some tools in ImageJ that will allow you to do slanted edge testing. I will get around to measuring the difference I observe between the binning/resize that the hardware provides, against my own combinations, to satisfy my curiosity.

Pere Casals
18-Nov-2018, 04:37
Has anyone tried the approach they use in astrophotography where multiple exposures are combined to remove the random noise?

Not only noise, it also enhances resolution.



then binning can be an alternative to achieve a much less noisy image

Yes, but at the expense of a potential information loss. Denoising algorithms are much more smarter, and way more complex:

184561

Steven Ruttenberg
18-Nov-2018, 20:50
I agree that specific progrsms to denoise are perhaps better, but if one was able ti employ the methods of astrophotography you vould have nirvana and pretty haps I csn try that with a scsnof a black and white image if it works, then I can try a color image. But need to capture many dark frames, bias frames and light frames to characterize the scanner. Once you have these, then I would have to scan the image like ten times make separate scand and save individual filed. Not one scan saved several times. Same is true for the bias, dark and light frames. Would start with smaller files first before trying it on 600mb size files. Need sbout 10-20 frames of each set, so thst is up to 60 frames for the bias, dark and lihht and 20 for the actual image. So you can see that computer power becomes important if this actually works. But will try on files of much smaller size first.

U have a program to do this for astrophotography.

Pere Casals
19-Nov-2018, 02:04
Steven, binning may be recommended when sensor resolution way exceeds optical performance, it is the case of an EPSON, but even in that case it has drawbacks.

Imagine you scan 4800 dpi but in your printer you will need an arbitrary fraction of that, say 2126.62 pixels per inch (in the negative scale), resulting from printer ppi and from the particular crop and print size you want.

The way you resize to 2426.62 it can be important ! Even in the case that the scanner resolved only 2400 effective, it's not the same resizing from 4800 than from binned 2400. In the first case the bicubic algorithms (or other) would have more infomation to perform a "cleaner" interpolation/extrapolation.

A "bit" it's like how we deal with decimals in scientific calculations... or banding effect if editing in 8bits per channel: accuracy not well conserved in the processing chain !

It looks weird that your scanner has x2 (or x3) more hardware pixels (linear) than effective pixels, and that was a heavy burden for antique computers, but this also removes nasty aliasing, Moiré effects and other artifacts that even other expensive gear may suffer. Because of speed, this would be a luxury for a true Pro machine that has to earn a profit dayly.

Depending on the operations you are to do in the digital edition (rotation, sharpening) a binned image may bring on severe issues if requiring all image quality possible for releasing large images.

Let me insist, a sound way to evaluate the digital chain is pasting a 1:1 sized crop of a USAF 1951 scan in a test image that will be edited to be released at max size possible, you will witness what happens in the elements as you resize, rotate, sharpen and compress (if for posting in the web).

Of course there is more than resolving power in sharpness, beyond it the image we release has to sport the precise acutance management for the viewing distance... but the described way evaluates how resolving power is conserved in the chain.


Basicly (IMHO) the oversampling of your epson is an advantage for the digital chain that may compensate other drawbacks that this affordable gear has. An epson can be a very competent tool for LF, but with it we don't press a button to get a sound image like with Pro machines, it requires somebody knowing what he has to do.

Ken Lee
19-Nov-2018, 06:01
You're exploring a variety of methods to squeeze the last few percent out of 4x5 sheet film.

Have you ever tried 5x7 (http://www.kennethleegallery.com/html/tech/RangerDetail.php) or 8x10 (http://www.kennethleegallery.com/html/tech/8x10Detail.php) ?

Steven Ruttenberg
19-Nov-2018, 08:06
I am seriously considering 8x10 for mostly b/w and some color once I get better at large format.

Jim Michael
22-Nov-2018, 07:03
It has been several years since I was introduced to the idea so I would have to find which software is currently popular with astrophotographers. I question the abililty to do this with scans vs photomosaics due to the mechanical nature of scanning but might be suitable for dslr scanning. Shoot 3 frames at each position and merge, then stitch.

Steven Ruttenberg
22-Nov-2018, 10:53
It has been several years since I was introduced to the idea so I would have to find which software is currently popular with astrophotographers. I question the abililty to do this with scans vs photomosaics due to the mechanical nature of scanning but might be suitable for dslr scanning. Shoot 3 frames at each position and merge, then stitch.

I was thinking the same thing, and it would be quite tedious to get the dark, light and bias frames from the scanner, but once done for a dpi setting its done. I use Nebulosity by Craig Stark http://www.stark-labs.com/nebulosity.html

It would be suited for dslr scanning which I am also exploring.

Steven Ruttenberg
22-Nov-2018, 11:34
Here is an example of binning.

These images show the final setting for focus with Betterscanning Variable height film holder, ANR glass and wet mounted target. Final height is 0.2035 in from scan glass to top of ANR glass. Film mounted on bottom of ANR glass (side facing scan glass)

The three images are as follows
1. Full 6300dpi
2. 2x2 binning using Vuescan Tiff size reduction
3. 3x3 binning using Vuescan Tiff size reduction

Note: 2x2 results in a 50% reduction in pixel dimensions. While a 3x3 in a factor of 3 reduction in pixel dimensions.

Also of interest is the file size for 2x2 is a factor of 4 reduction and 3x3 is a factor of 9 reduction.

I did not see any loss of edge sharpness in the reductions (some loss in fine detail, may have happened. I do not know about any effects on gradients, etc that will come next; an actual image.

Also note that no sharpening was applied at anytime, only white balance was set.

Next I am going to scan a density target with a Dmax of 3.05 in 1/3 stop increments (31 total) to see how scanner does. I may get one that goes to 4.05 next, they are relatively inexpensive. I am also going to do this test for some bw film, Across 100, Tmax100 and 400, Ilford D100 and HP5-400 using my Chamonix 45H-1 and my 75mm f/4.5 Nikkor, 90 f/5.6 Scneider Super Angulon and the 210 Grandagon I may buy. Also for my digital camera 5DMKIII. Why? Why not? Plus I can see if I need to adjust my development process and even see what different developers can do. Either I have been infected with the testing bug or I a bored! :D

https://www.flickr.com/photos/157376714@N08/albums/72157673789470327