Free Shipping on ALL Products
camera reviewsbest cameraslens reviewsphotography tipscamera forumvideo toursphotography bookssupport me
It is currently Tue Oct 21, 2014 10:51 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Oct 21, 2009 10:52 am 
Offline

Joined: Wed May 23, 2007 8:38 am
Posts: 357
Hi All,

I wanted to engage the Camera Labs community with a technical question and shared art and technical learning experiences.

Digital camera's use a color filter array, most commonly a Bayer filter arrangement in recording a raw color image. However this raw image must be further post processed, typically by the camera's on board image processor or raw processor on your personal computer. These software based algorithms do the heavy lifting of translating this color mosaic into a demosaiced image that we are so accustomed.

I was thinking, can a photographer make use of the raw output to make their own interpretation of the photograph, either in the form of a mosaic or hand-processed demosaic.

Thus spawned the 'challenge' and learning experience.

Below we see a crop (400% enlarged to show array) from a raw image as extracted from a raw file:
Image

Now here is the resulting reconstructed image (similarly 400% enlarged), as performed by dcraw:
Image

Now how would a human being"raw process" this Bayer array mosaic?
Image
I look forward to interesting interpretations and technical ingenuity!

Kind Regards.


Last edited by capital on Sat Oct 31, 2009 11:43 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 31, 2009 11:29 pm 
Offline

Joined: Wed May 23, 2007 8:38 am
Posts: 357
Okay, so I've tried to come up with some attempts at hand debayering the image. Here's one of them:

Image

Steps involved were to first make a layer copy, calling it "Color layer" changed the blending mode to "overlay"

Then on the layer below the "color layer" I used the b&w filter layer
and applied a b&w filter using an adjustment layer with following parameters (note that yellows, cyans & magentas values do not change anything about the image since the picture is truly an RGB image):

Reds = 122
Greens = 109
Blues = 125

these values were selected as they seemed to best balance out the red, green and blue channels.

Then I created a hue/saturation adjustment layer and selected the red channel, changing the lightness to -77 and saturation to +19.

And finally, I created a curves adjustment layer, and had the program do an "auto" adjust.

Contrast the above with what the computer does:

Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 22, 2009 9:15 am 
Offline
User avatar

Joined: Wed Oct 01, 2008 6:32 am
Posts: 512
May I ask how you got the image with the Bayer mosaic?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 23, 2009 3:18 am 
Offline

Joined: Wed May 23, 2007 8:38 am
Posts: 357
Ernie wrote:
May I ask how you got the image with the Bayer mosaic?


Yes, I used dcraw to output the undemosaiced image.

You'll need to do some modification to extract a color version, though dcraw natively outputs a greyscale version:

Search for pre_interpolate();

and insert after that line.

goto thumbnail;

You also need to comment out the lines involving:
if (multi_out)
sprintf (ofname+strlen(ofname), "_%0*d",
snprintf(0,0,"%d",is_raw-1), shot_select);


Dave Coffin the author of dcraw suggests the following reference for a compiler, run in a CMD windows on XP:

"You need to download the appropriate ZIP files from
http://www.delorie.com/djgpp/ , unpack them all into C:\DJGPP,
and do:

gcc -o dcraw.exe -O4 dcraw.c -lm -DNO_JPEG -DNO_LCMS "
Be sure to use the Zip Picker.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 23, 2009 8:14 am 
Offline
User avatar

Joined: Wed Oct 01, 2008 6:32 am
Posts: 512
Thank you. I did not know there was a gcc for Windows. My workstation is running Linux as Dom0 anyways, so I will definitely give this a try. Looks really interesting.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

All words, images, videos and layout, copyright 2005-2012 Gordon Laing. May not be used without permission.
/ How we test / Best Cameras / Advertising / Camera reviews / Supporting Camera Labs

Webdesign by Alphabase IT
Powered by phpBB® Forum Software © phpBB Group