DSPRelated.com
Forums

RAW image data format

Started by Jerry Avins March 9, 2006
I just got a digital SLR, and one of the recording formats is RAW. The 
resolution isn't noticeably better than its extra fine jpeg, but it 
ought to be easier to process. I'm pretty happy using GIMP (Gnu Image 
Manipulation Program, obviously free) on my digital images, but it 
doesn't know Minolta's RAW format. I have a program that can convert it 
to tiff, but GIMP, while it displays the image, finds tags it doesn't 
understand. Instead of asking naive questions, I simply request advice.

One bit of processing I want to do is averaging. The "film speed" can be 
pushed to 1600, but noise makes the image look grainy. (Old tradeoffs 
are still there; no free lunch.) I want to average pixels and decimate 
the pixel count. Instead of 3008 x 2000, I'd end up with 751 x 500. I 
think that's a good trade with dim light, especially with a zoom lens.

Thanks for any pointers.

Jerry

P.S. A lens out of my optics junk box makes a dandy achromatic 6-diopter 
close-up attachment. The mount I made has 55 mm threads to match my 
lenses, and there is very little distortion in the image. I plan to use 
it for digitizing old 35 mm slides.
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
"Jerry Avins" <jya@ieee.org> wrote in message 
news:AZKdnS5O2KletI3ZRVn-ig@rcn.net...
>I just got a digital SLR, and one of the recording formats is RAW. The >resolution isn't noticeably better than its extra fine jpeg, but it ought >to be easier to process. I'm pretty happy using GIMP (Gnu Image >Manipulation Program, obviously free) on my digital images, but it doesn't >know Minolta's RAW format. I have a program that can convert it to tiff, >but GIMP, while it displays the image, finds tags it doesn't understand. >Instead of asking naive questions, I simply request advice. > > One bit of processing I want to do is averaging. The "film speed" can be > pushed to 1600, but noise makes the image look grainy. (Old tradeoffs are > still there; no free lunch.) I want to average pixels and decimate the > pixel count. Instead of 3008 x 2000, I'd end up with 751 x 500. I think > that's a good trade with dim light, especially with a zoom lens. > > Thanks for any pointers. > > Jerry > > P.S. A lens out of my optics junk box makes a dandy achromatic 6-diopter > close-up attachment. The mount I made has 55 mm threads to match my > lenses, and there is very little distortion in the image. I plan to use it > for digitizing old 35 mm slides. > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Hello Jerry, Try going to www.dpreview.com and join the forums (fora) and post the question under the Minolta slr group. There should be someone there who can help. There has been some published stuff (reverse engineered) on Nikon's and Canon's raw formats, but I haven't seen anything yet on Minolta. Also see if Minolta offers an SDK for their camera. They should offer a function that converts raw to .tiff, and then you can stack multiple images to reduce the noise. Clay
Clay S. Turner wrote:

   ...

> Try going to www.dpreview.com and join the forums (fora) and post the > question under the Minolta slr group. There should be someone there who can > help. There has been some published stuff (reverse engineered) on Nikon's > and Canon's raw formats, but I haven't seen anything yet on Minolta. Also > see if Minolta offers an SDK for their camera. They should offer a function > that converts raw to .tiff, and then you can stack multiple images to reduce > the noise.
Thanks, Clay. I had a hunch you would be helpful. I came across dpreview when I was looking for reviews, but I didn't think about their forums. Thanks for the tip. SDK is software development kit? DiMAGE Master Light, which came with the camera, converts to TIFF, but as I wrote, Gimp doesn't understand all the tags and I don't know what I'm missing. I'm not at this point interested in stacking images, rather in using the data made redundant by size reduction. I posted this on rec.birds: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ http://tinyurl.com/zrpyy Both pictures are on 35mm film, digitized by scanning prints. The upper is taken with a 400 mm lens, the lower, 1250 mm. The upper picture shows fewer than a fifth of the total, and more were arriving as the light failed. The tree is about 250' from the camera. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I used 800 film to shoot at f/10 at twilight (400 mm is f/5). I'll need to push the digital sensor to get similar (I hope better) shots. I don't understand the bit of color fringing just visible in the bottom picture. It was taken through an SCT, the only glass being the correcting plate. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
"Jerry Avins" <jya@ieee.org> wrote in message 
news:4vydndaMdb-byo3ZRVn-sQ@rcn.net...
> Clay S. Turner wrote: > > ... > > > Thanks, Clay. I had a hunch you would be helpful. > > I came across dpreview when I was looking for reviews, but I didn't think > about their forums. Thanks for the tip. SDK is software development kit? > DiMAGE Master Light, which came with the camera, converts to TIFF, but as > I wrote, Gimp doesn't understand all the tags and I don't know what I'm > missing. I'm not at this point interested in stacking images, rather in > using the data made redundant by size reduction. I posted this on > rec.birds: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hello Jerry, I'm not able to directly speak about what is in the Minolta raw format, but I suspect it is a lot like that of Nikon and Canon. Basically a Bayer array sensor detects only one of three primary colors at each pixel location. The standard Bayer array is set up like GRGBGRGBGRGBGRGBGRGB ... BGRGBGRGBGRGBGRGBGRG.... So half of the pixels are green and 1/4 are red and 1/4 are blue. The post processing software "demosaics" the data by interpolating the values of the two unsampled primaries at each pixel location. Much has been written about the various demosaic algos. Some are pretty good at filling in edges. Other are low noise etc. Most digital SLRs sample the pixels with 12 bits of resolution and white balance is applied in the digital domain. Nikon's D2X is an exception where analog gains (set by the white balance)) are applied before the sampling process. This really reduces blue channel noise when shooting under tungsten or other similarly colored light. So one of the things raw files allow for is changing the white balance in post processing. This can even be done with the D2X's data - of course having the white balance close to correct helps. If you use a custom white balance, the R, G, and B multipliers are stored in the raw file. I use the custom white balance all of the time. I believe in getting everything possible correct in the camera - it really saves on post processing time plus minimizes image noise. The correct way to shoot tungsten light is to use a color correction filter on the camera - for example one uses an 80A or an 80B filter for tungsten at 2800K and 3400K respectively. The 80 number comes from the change of 80 mired applied to the color temp. Also if you are using custom exposure curves, these will also be tagged in the file. There are curves available that emulate some types of films. I.e., Fuji's Realla and Velvia. These curves are applied to the digital data after sampling. DSLR sensors tend to be quite linear across 5 to 6 F stops of exposure depending on which camera you have. This dynamic range is quite like that of slide film. Fuji has a neat trick in their sensor where both big and little pixels are used to extend the dynamic range. Raw files also contain standard data such as F/stop, lens, focus distance, flash info, shutter speed, user tagging, etc. Hopefully Minolta's program gives you all of that. Yes SDK stands for Software Development Kit. Nikon provides a .dll file that performs raw conversion. They want to have complete control over the reconstructed image, so they offer the .dll. Also they provide a plugin (for free) that will convert raw Nikon files when using Photoshop. There are 3rd party raw converters as well. Some do their own domasicing and others use the camera manufacturer's dll. There was a bit of controversy created earlier this year when Nikon encrypted the white balance info. Eventually Nikon and Adobe worked out a deal where Adobe could do their own demosaicing using decrypted white balance data without fear of being in violation of the Millennium Copyright Act. Pretty much all of the camera manufacturers have some small bit of the raw data encoded. Digital cameras are good at showing color fringing - lateral chromatic aberration. Basically there are two causes of this. One is "pixel peeping" - this allows one to look at an image up close thus easily revealing a problem that was always there. With film, you would have to put it under a microscope. The other cause shows up because the image producing rays hit the sensor at a non-normal angle. I believe in this case the sensor's anti-alias filter adds to the CA. Since wide angle lenses tend to have short back vertex focal lengths, this problem is very common with wide angle lenses. There are some nearly telecentric designs that help tame the problem. Also some raw converters allow for sizing the three color channels differently which goes a long way towards reducing this problem. The really good programs size the three color arrays before the demosaicing instead of afterwards. One can even play with the radial mapping so as to correct barrel and pincushion distortion. Even though my comments here are mostly about Nikon - that is only because that is the system I'm most familiar with (I've been a Nikon guy for nearly 30 years). Canon basically offers the same stuff. IHTH, Clay
Clay S. Turner wrote:

   ...

> Hello Jerry, > > I'm not able to directly speak about what is in the Minolta raw format, but > I suspect it is a lot like that of Nikon and Canon. Basically a Bayer array > sensor detects only one of three primary colors at each pixel location. The > standard Bayer array is set up like > > > GRGBGRGBGRGBGRGBGRGB ... > BGRGBGRGBGRGBGRGBGRG.... > > So half of the pixels are green and 1/4 are red and 1/4 are blue.
... Thanks, Clay. I'll respond privately. I think that from here out (at least for a while) the subject isn't DSP. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry Avins wrote:
> One bit of processing I want to do is averaging. The "film speed" can be > pushed to 1600, but noise makes the image look grainy. (Old tradeoffs > are still there; no free lunch.) I want to average pixels and decimate > the pixel count. Instead of 3008 x 2000, I'd end up with 751 x 500. I > think that's a good trade with dim light, especially with a zoom lens.
A great program for noise reduction is NeatImage, it's not free, but not too expensive either. You can trial for free: http://www.neatimage.com/ I've got no agenda pushing this, just a happy customer. I use it for reducing noise and film grain in high-resolution film scans, but it really shines with data direct from a digital camera. -- James Kennedy Electronics Design Engineer Tritium Pty Ltd Brisbane, Australia
James Kennedy wrote:
> Jerry Avins wrote: > >> One bit of processing I want to do is averaging. The "film speed" can >> be pushed to 1600, but noise makes the image look grainy. (Old >> tradeoffs are still there; no free lunch.) I want to average pixels >> and decimate the pixel count. Instead of 3008 x 2000, I'd end up with >> 751 x 500. I think that's a good trade with dim light, especially with >> a zoom lens. > > > A great program for noise reduction is NeatImage, it's not free, but not > too expensive either. You can trial for free: http://www.neatimage.com/ > > I've got no agenda pushing this, just a happy customer. I use it for > reducing noise and film grain in high-resolution film scans, but it > really shines with data direct from a digital camera.
Thanks a lot! I'll look into it. I'm smart. Some people think I'm brilliant. One thing I know is that while I may be able to do something passably, someone who's been at it a while can do much better. "A pro is someone who's made all the mistakes, and learned how to avoid most and fix the rest." I haven't made enough mistakes yet. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;