Results 1 to 12 of 12
Like Tree3Likes
  • 1 Post By jwbryson1
  • 1 Post By jwbryson1
  • 1 Post By Garbz

Thread: bayer interpolation and downsampling

  1. #1
    TPF Noob!
    Join Date
    Jul 2012
    Posts
    7
    My Gallery
    (0)
    Liked
    0 times

    bayer interpolation and downsampling

    Hi, I've read a bit about bayer interpolation and how actual resolution in camera sensor is only about 50% of what is being sold by the manufacturers.
    If I take my camera and shoot at half of it's resolution do I counterbalance the bayer interpolation in some way?
    Pier

  2. # ADS
    Ads
    Google Advertisement
    Join Date
    Always
    Posts
    Many

  3. #2
    TPF Junkie!
    Join Date
    Apr 2011
    Location
    Dog house with early release program
    Posts
    3,524
    My Gallery
    (5)
    My Photos Are OK to Edit
    Liked
    675 times
    I prefer Advil to Bayer. Hope that helps.
    Ernicus likes this.
    "Photography is more than a medium for factual communication of ideas. It is a creative art."
    -Ansel Adams

    "The quickest way to make money at photography is to sell your camera."

    "If you saw a man drowning and you could either save him or photograph the event...what kind of film would you use?"

  4. #3
    TPF Junkie!
    Join Date
    Sep 2010
    Location
    Italy
    Posts
    1,420
    My Gallery
    (0)
    My Photos Are OK to Edit
    Liked
    109 times
    I'm not sure how lower resolutions are obtained on camera (e.g, binning), however you could always downsample in postprocessing, if you think is needed for you.
    However, since conversion from Bayer pattern to RGB, carefully done, involves also noise reduction and sharpness enhancement, maybe it is not worth to a priori discharge pixels.
    Canon 60D + Tamron 17-50/2.8 VC + Sigma 50-150/2.8 + Canon 55-250IS + "some" M42 MF objectives
    My Flickr

  5. #4
    TPF Noob!
    Join Date
    Jul 2012
    Posts
    7
    My Gallery
    (0)
    Liked
    0 times
    Quote Originally Posted by jwbryson1 View Post
    I prefer Advil to Bayer. Hope that helps.
    Is it something you can choose with your camera? or you mean when converting from raw?

    Quote Originally Posted by enzodm View Post
    I'm not sure how lower resolutions are obtained on camera (e.g, binning), however you could always downsample in postprocessing, if you think is needed for you.
    However, since conversion from Bayer pattern to RGB, carefully done, involves also noise reduction and sharpness enhancement, maybe it is not worth to a priori discharge pixels.

    Any suggestion on how to convert from bayer to rgb? links or books?

  6. #5
    KmH
    KmH is offline
    Helping photographers learn to fish
    TPF Supporter

    Join Date
    Apr 2009
    Location
    Iowa
    Posts
    28,767
    My Gallery
    (1)
    My Photos Are OK to Edit
    Liked
    2804 times
    The camera or the Raw converter does that. The image sensor in a digital camera is an analog device that isn't capable of recording color. The image sensor can only record luminosity (grayscale).

    Of course RGB is an additive color model, while photographic prints are made using the subtractive color model CMYK.

    Reading -
    http://wwwimages.adobe.com/www.adobe...enderprint.pdf
    http://wwwimages.adobe.com/www.adobe...near_gamma.pdf

    http://en.wikipedia.org/wiki/Active_pixel_sensor
    http://en.wikipedia.org/wiki/Bayer_filter
    http://en.wikipedia.org/wiki/Rgb
    http://en.wikipedia.org/wiki/Cmyk
    http://en.wikipedia.org/wiki/Color_space

    http://www.cambridgeincolour.com/col...t-printing.htm

  7. #6
    TPF Junkie!
    Join Date
    Apr 2011
    Location
    Dog house with early release program
    Posts
    3,524
    My Gallery
    (5)
    My Photos Are OK to Edit
    Liked
    675 times
    Quote Originally Posted by Pier View Post
    Quote Originally Posted by jwbryson1 View Post
    I prefer Advil to Bayer. Hope that helps.
    Is it something you can choose with your camera? or you mean when converting from raw?

    Err...um.....
    Ernicus likes this.
    "Photography is more than a medium for factual communication of ideas. It is a creative art."
    -Ansel Adams

    "The quickest way to make money at photography is to sell your camera."

    "If you saw a man drowning and you could either save him or photograph the event...what kind of film would you use?"

  8. #7
    TPF Junkie!
    Join Date
    Oct 2003
    Location
    Brisbane, Australia
    Posts
    9,639
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    190 times
    Quote Originally Posted by Pier View Post
    Hi, I've read a bit about bayer interpolation and how actual resolution in camera sensor is only about 50% of what is being sold by the manufacturers.
    If I take my camera and shoot at half of it's resolution do I counterbalance the bayer interpolation in some way?
    It's not technically half the resolution. One thing about beyer interpolation is that it's not the same as typical upscaling. Take a look at the following beyer matrix:
    RGRG
    GBGB
    RGRG
    GBGB

    You see in groups this represents a 2x2 set of true colour pixels. I.e. you combine every R with a B and two G once and you end up with 4 pixels worth of colour data. However... Because of the pattern this grid is arranged in every individual pixel actually contributes to the 4 surrounding pixels. You can see from this picture it is possible to extract 9 individual pixels with actual unique data (thanks to the green pixels contributing more to luminance than red or blue). This is not the same as normal interpolation where data is simply guesstimated based on some algorithm from the bits beside it. This data is .... educated guesstimated for want of a much better term.

    As such except for the row of pixels on the edge of the sensor, each pixel in the final image is actually made of a unique data from the pixel next to it. This can be seen most clearly on cameras without an anti-aliasing filter. When details get small enough that they only fall on one pixel then the camera will actually produce a colour cast on that one pixel in the final image.

    In practical terms. What are you trying to achieve?
    You want a tack sharp image? In a practical sense you don't need to reduce your resolution by half. Maybe by 1/3rd or maybe by 1/4 but if you reduce by 1/2 you're likely throwing away some unique data.
    You want a perfect scientific calculation of which photons hit what pixel? Then you need software like the software used by astronomers to create a super pixel from a grid of 4 without interpolating that second grid. I.e. your 4x4 grid gives you 4 pixels in the end, and each of those 4 pixels have a unique set of photons hitting them.
    "I am always satisfied with the best." -Oscar Wilde
    Larger versions always on flickr
    Best photos in my gallery

    Proud Supporter of The Pact

  9. #8
    TPF Noob!
    Join Date
    Jul 2012
    Posts
    7
    My Gallery
    (0)
    Liked
    0 times
    [QUOTE=Garbz;2655609]
    Quote Originally Posted by Pier View Post
    In practical terms. What are you trying to achieve?
    You want a tack sharp image?
    Yes, sharpness. In practical terms I wanted to know if taking photos not at full resolution of your sensor makes any sense from a technical-scientifical point of view. Your explanation helped but I guess that in the end this is not a common technique to enhance sharpness.

  10. #9
    KmH
    KmH is offline
    Helping photographers learn to fish
    TPF Supporter

    Join Date
    Apr 2009
    Location
    Iowa
    Posts
    28,767
    My Gallery
    (1)
    My Photos Are OK to Edit
    Liked
    2804 times
    It should be noted that without anti-aliasing, moirée in images becomes much more possible.

  11. #10
    I spend too much of my life on TPF!
    Join Date
    May 2012
    Posts
    870
    My Gallery
    (0)
    Liked
    80 times
    Yes Bayer reduces resolution.

    No, I dont think its 50%. More like 30%.

    For example, according to a test done by the german magazine "chip", my D5100 can resolve 2972 lines at ISO 100, thats about 13 Megapixel (of 16 Megapixel officially). However, some of this might be faked - the sharpening of the algorithms hides the fact that information actually got lost. I've seen tests where the camera had better "resolution" than the chip thanks to that.

    Either way, I usually reduce the resolution of my pictures in the last step before conversion to JPEG.


    P.s.: Checked on my camera, its actually not a true 3:2 factor picture format, so my previous numbers are wrong.
    Last edited by Solarflare; 07-21-2012 at 01:46 PM.
    Nikon D5100 + AF-S DX Nikkor 35m f/1.8G + AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED

  12. #11
    TPF Junkie!
    Join Date
    May 2011
    Location
    Montana
    Posts
    6,959
    My Gallery
    (0)
    Liked
    1465 times
    yes, 30% is probably more accurate. The reason for this is that while each composite photo element is interpolated into one composite pixel, they do still record information in two dimensional space.

    My tests with "half" mode in RPP, which does not interpolate the data, also confirm that there is more resolution in an interpolated processed image than in a non-interpolated procesed image. However, noise and color reproduction is improved.
    75% of the internet is wrong. The rest is pornography.

  13. #12
    TPF Junkie!
    Join Date
    Oct 2003
    Location
    Brisbane, Australia
    Posts
    9,639
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    190 times
    Quote Originally Posted by Pier View Post
    Yes, sharpness. In practical terms I wanted to know if taking photos not at full resolution of your sensor makes any sense from a technical-scientifical point of view. Your explanation helped but I guess that in the end this is not a common technique to enhance sharpness.
    It's used quite a bit in Astrophotography. Not only does combining adjacent images help with sharpness (think a detail that used to be blurred between two pixels is now confined into one), but also with noise (combining multiple points with random noise causes them to bias towards their average).

    The question is, would you want to throw away data you have? Remember based on my explanation the data is interpolated but it is unique to each pixel unlike say upscaling. Also downsamping does not normally simply throw away data unless you use nearestneighbor method, and that method only works if you downsample by a factor of 1/2 in each direction (1/4 the total image resolution). So for any non sqaure value you downsample the image the resulting pixel ends up being a gaussian distribution of the original pixels usually followed by some kind of sharpening algorithm applied.

    Really I suggest rather than trying to achieve absolute sharpness (distinct data in each pixel) try to achieve good visual acuity (how sharp an image appears to be to the eye). The latter can be done by sharpening using any of the million methods modern image editing programs offer to you. The human eye perceives sharpness as high edge contrast. That's why a technically not sharp image can appear sharper (after sharpening) than an image which each pixel is perfectly sharp.
    enzodm likes this.
    "I am always satisfied with the best." -Oscar Wilde
    Larger versions always on flickr
    Best photos in my gallery

    Proud Supporter of The Pact

 

 

Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Downsampling
    By Trever1t in forum Beyond the Basics
    Replies: 12
    Last Post: 02-14-2012, 06:56 PM
  2. Replies: 0
    Last Post: 05-20-2011, 12:43 PM
  3. Interpolation
    By PASM in forum Digital Discussion & Q&A
    Replies: 4
    Last Post: 03-21-2011, 01:52 AM
  4. interpolation
    By kcon in forum Graphics Programs and Photo Gallery
    Replies: 7
    Last Post: 05-28-2008, 01:30 PM
  5. Interpolation
    By bigfatbadger in forum Digital Discussion & Q&A
    Replies: 2
    Last Post: 08-10-2006, 08:00 AM

Search tags for this page

bayer binning
,
bayer downsampling
,

bayer interpolation

,
bayer interpolation and sharpness
,
bayer interpolation wiki
,
bayer pattern to rgb conversion resolution reduction
,
binning vs downsampling
,
canon bayer algorithm
,
canon bayer interpolation
,
debayer interpolation
,
interpolation of bayer
,
non interpolated photos
,
simple bayer interpolation explanation
,
true resolution with bayer interpolation
,
what is bayer interpolation
Click on a term to search for related topics.