|
denoir Registered: Feb 11, 2010 Total Posts: 4184 Country: Sweden |
AhamB wrote: ![]() We're interested the 40 lp/mm lines. In expanded form: ![]() Here's the test image: ![]() If we superimpose the sagittal MTF data on the image: ![]() If we study a crop of an object that is both in the high resolution zone and where the resolution drops due to field curvature. The arrow indicates the sagittal (radial) direction: ![]() We do the same for the tangential curves: ![]() And an example of tangential blur: ![]() The MTF charts are measured on line pairs, either just a test chart or through interferometry. It does however not mean that they are applicable only for images that contain tightly packed pairs of lines as shown in the example above. The same is true for an image constructed for testing resizing methods. The idea is that you can generalize from the results. |
|
Toothwalker Registered: Jan 24, 2009 Total Posts: 905 Country: Norway |
denoir wrote: |
|
denoir Registered: Feb 11, 2010 Total Posts: 4184 Country: Sweden |
Toothwalker wrote: ![]() In principle you represent up to the max spatial frequency that the image can show and the rest at max frequency (i.e lines one pixel wide). That's the theory anyway. The problem is in coming up with the method that performs the best possible mapping between lp_max_original=>lp_max_resized. |
|
Toothwalker Registered: Jan 24, 2009 Total Posts: 905 Country: Norway |
denoir wrote: |
|
shoenberg3 Registered: Jan 12, 2010 Total Posts: 609 Country: United States |
Denoir: Is there a reason why you convert to lab mode before doing the sharpening steps? |
|
AhamB Registered: Jul 11, 2008 Total Posts: 4449 Country: Germany |
shoenberg3 wrote: |
|
AhamB Registered: Jul 11, 2008 Total Posts: 4449 Country: Germany |
denoir wrote: |
|
shoenberg3 Registered: Jan 12, 2010 Total Posts: 609 Country: United States |
Is there an advantage of doing it in the lab mode, as opposed to your alternative method (duplicate layer)? It seems the latter method would be much quicker to do. |
|
AhamB Registered: Jul 11, 2008 Total Posts: 4449 Country: Germany |
Have a look at those images in the thread I linked to. If you like the boost in saturation, you can sharpen in RGB mode, but if you want to keep the colors as they are, Lab (or separate layer in luminosity blend mode) is needed. In some cases the difference is almost imperceptible, but in others RGB sharpening causes a bit of a color cast in parts of the image. |
|
shoenberg3 Registered: Jan 12, 2010 Total Posts: 609 Country: United States |
I think you misunderstood my second question. I was wondering if there would be any differences in doing it lab or separate layer in luminosity blend mode, as the latter method seems simpler. |
|
denoir Registered: Feb 11, 2010 Total Posts: 4184 Country: Sweden |
Toothwalker wrote: ![]() Now we take a look at standard bicubic resize: ![]() As you can see a lot of it is lost, but not all of it. It still does better than 17 lp/mm because it smears the high frequency components across multiple pixels. Now let's take a look at the multi-level sharpen & resize version: ![]() As you can see a lot more detail has been recovered and you can in the image definitely see detail that have spatial frequencies > 17 lp/mm in the original crop. It restores the texture that gets lost in the plain bi-cubic resize. Of course, there is a question of personal aesthetic preference. My own is to try to keep as an accurate as possible representation of the real world subject as well as to preserve lens rendering characteristics. If you have an image like the one above with high micro contrast in the fine detail (~20-40 lp/mm) then I'd like that to be seen in the final image as well. shoenberg3 wrote: I think you misunderstood my second question. I was wondering if there would be any differences in doing it lab or separate layer in luminosity blend mode, as the latter method seems simpler. No difference, in principle but IMO LAB mode is much easier to use with no need to mess around with multiple layers. AhamB wrote: Have a look at those images in the thread I linked to. If you like the boost in saturation, you can sharpen in RGB mode, but if you want to keep the colors as they are, Lab (or separate layer in luminosity blend mode) is needed. In some cases the difference is almost imperceptible, but in others RGB sharpening causes a bit of a color cast in parts of the image. The primary benefit of doing it on the L-channel only mode it's to minimize the color noise and CA if any. |
|
theSuede Registered: Jul 31, 2008 Total Posts: 1941 Country: Sweden |
I'd like to add three things about what has been written the last few pages (I didn't read to diligently, I just skimmed it...). |
|
Toothwalker Registered: Jan 24, 2009 Total Posts: 905 Country: Norway |
denoir wrote: ![]() Of course, there is a question of personal aesthetic preference. My own is to try to keep as an accurate as possible representation of the real world subject as well as to preserve lens rendering characteristics. If you have an image like the one above with high micro contrast in the fine detail (~20-40 lp/mm) then I'd like that to be seen in the final image as well. You can't see it, because it is not there. |
|
denoir Registered: Feb 11, 2010 Total Posts: 4184 Country: Sweden |
Toothwalker wrote: ![]() You can see the effect of the blending of neighboring pixels. In the final target 4x4 you can still see a hint of the separation between the lines but the contrast is very low. If we instead apply sharpening before the 8x8 and after the 4x4 resize we now get this: ![]() Here we can see the black/white alternating lines again - at half frequency, as expected. The point is however, we can see them as separate lines and not as a gray blur. To demonstrate this with a better example, consider a mixed 16x16 image that contains both N lp/mm and 2*N lp/mm where 2*N is the maximum supported as they're only one pixel wide. Bicubic first: ![]() With sharpening after resize: ![]() So, what do we have here? Well, the N lp/mm lines have been accurately reproduced - they were 2 pixels wide while they are 1 pixel now. More interesting is the former 2*N lp/mm lines. The frequency has been halved so they're at the N lp/mm level now. Thanks to the down sampling we've doubled the period, but they're still lines and the diagonal line through them is also visible. Now this may seem extremely obvious, but there's an interesting aspect of this. Bicubic resize is usually used rather than direct subsampling to avoid unwanted aliasing, but more importantly to avoid subsampling at the 'wrong' position. If you have lines that are 1 pixel wide and you pick every second line you'll end up with something completely black or something completely white. That's no good. However if you use bicubic in combination with a contrast increase (i.e sharpening) you get the best of both worlds. First you don't get the all black or all white but you get a gray goo where the signal with half the frequency is barely visible. Then you nuke it with sharpening to increase the contrast and you end up with a clean high contrast signal at half the frequency of the original. You end up with getting the maximum resolution at high contrast. Toothwalker wrote: It appears you did, because a single lanczos3 resize followed a single sharpening step looks similar: ![]() That does look good. That's matlab's kernel implementation to be used with imresize, right? I'll have to take a closer look at it. The problem with my method is that it's not general enough. The results are inconsistent depending on the camera used and on the final resolution. |
|
Toothwalker Registered: Jan 24, 2009 Total Posts: 905 Country: Norway |
denoir wrote: ![]() should leave detail after downsampling, you are in fact objecting to Mr. Nyquist. Do we want to see lines in smaller versions? No, of course not. Concerning the few isolated lines in the right half, these reflect your pebbles. The white lines are one pixel wide, like in the left half. Do we want to see these lines in smaller versions? Yes, of course. Something like this ![]() and subsequently one can apply sharpening to boost edge contrast. There is no high-frequency contents preserved in the right half that has been removed in the left half. We are looking at low-frequency information that was there from the start. |
|
denoir Registered: Feb 11, 2010 Total Posts: 4184 Country: Sweden |
Ok, I see I'm still not getting my point through. Let's go back to basics. What does Mr Nyquist tell us? ![]() If the red dots are the samples, then we can reconstruct this sinus curve. What happens if we do this - sample at a lower frequency? ![]() When we reconstruct the signal we can't reproduce the high frequency, but we still get a signal: ![]() What I'm saying is that this is a much better reconstruction (although of course imperfect) than a flat line at 0 would be - which you are saying is the optimal answer. It definitely preserves more information than just not bothering with any reconstruction just because you can't represent as high a frequency as the original signal had. |
|
kwalsh Registered: Aug 30, 2005 Total Posts: 1581 Country: United States |
denoir wrote: |
|
wfrank Registered: Feb 09, 2011 Total Posts: 1898 Country: Sweden |
denoir wrote: |
|
Toothwalker Registered: Jan 24, 2009 Total Posts: 905 Country: Norway |
denoir wrote: |