Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Digital Photography > Re: Is there any way to get the raw image data from a Nikon Coolpix S8200 P&S camera?

Reply
Thread Tools

Re: Is there any way to get the raw image data from a Nikon Coolpix S8200 P&S camera?

 
 
Martin Brown
Guest
Posts: n/a
 
      04-11-2013
On 10/04/2013 18:15, Mayayana wrote:
> | And what exactly is a pixel?
>
> It's a point of color, relevant for digital images,


Strictly. It is the smallest individual picture element (which at least
when the term was first coined was usually monochrome).

> which by definition are reducible to a specific
> number of data bits. For instance, the pixel values
> advertised for a phone or monitor display define
> how many distinct points of color are displayed in
> the width and height of the screen. More pixels
> generally look sharper because more detailed
> color data can be put into a given space.
>
> | Does it store a numeric value or 3 numeric
> | RGB values or is it analog that is then converted into digital (numeric)
> | values? Is each pixel something like 24 bits of data -- 3 8-bit numbers
> | for 256 values for each of 3 colors?
>
> A JPG stores 3 8-bit values for R, G, B per pixel. A


Actually it is a fair bit more complicated than that. Apart from the
very latest IJG JPEG codec which explicitly supports RGB JPEG encoding
the historical JFIF or Exif JPEG encoding is in the colour transformed
space of Y,Cr,Cb subsampled which exploits the fact that the human eye
is a lot more sensitive to luminance detail than to colour.

The same trick is also used on broadcast TV. This means that for a
typical ex camera JPEG encoded image there is a luminance sample stored
for every pixel and a pair of chroma (colour) pixels stored for each
pair 2x1,1x1,1x1 sampled. If the original JPEG specification committee
had anticipated the development of Bayer mask digital imaging in camera
JPEGs could be encoded in about 60% of the space actually used today.

To make things even harder to understand the data is transformed into
frequency space as coefficients for cosine waves and then quantised.
This allows a very compact but accurate representation of photographic
images (adjacent pixels are usually closely related values).

Most applications by default save JPEGs as 2x2,1x1,1x1 effectively
halving the resolution of the colour detail but preserving the
luminance. This is almost always OK apart from on line artwork or
unusually difficult subject material like fine black lines on red
flowers or thin dark tree branches against blue sky. Photoshop switches
to 1x1,1x1,1x1 for quality levels 6 and above - helps line art survive.

> With digital files, the bits/pixel relationship depends
> on the image format. In your JPG with 16M+- pixels
> there will be 48M+- bytes to store that data.
> 16M * 3 bytes = 48M bytes / 1024 / 1024 = 45+ MB.
> A 24-bit BMP file storing an image of that size would
> be about 45+ MB because it is literally a map of bits,
> with three pixels of red, white, black stored like so:
>
> FF 00 00 FF FF FF 00 00 00
>
> But the same data in a JPG is compressed, so the
> size will depend on level of compression and efficiency
> of compression. (Martin Brown's point about shooting
> trees and shrubs. At the opposite extreme of fine color
> detail, a single color image 4608x3456 only requires
> about 91 KB to store as a JPG.)


Actually if you really know what you are doing white cat in a snowstorm
at that size can be encoded as a 61.1kb JPEG file. I can't spot any
optimisations to get smaller than that but another pair of eyes might.

--
Regards,
Martin Brown
 
Reply With Quote
 
 
 
 
Wolfgang Weisselberg
Guest
Posts: n/a
 
      04-13-2013
David Taylor <(E-Mail Removed)> wrote:
> On 10/04/2013 07:56, Jennifer Murphy wrote:


>> I'm just trying to understand how the danged thing works. I took some
>> photos of a painting with my Nikon Coolpix S8200 P&S with 16MP. A friend
>> took some with her Nikon D700 with 12MP that looks a lot better,
>> especially blown way up. That's why I thought the 16MP might by funny
>> pixels, like Monopoly money.


> The 16 Mpix are genuine, but each pixel is of lower quality than that in
> the DSLR because it is physically smaller and captures less light.


Which doesn't really mean that much IF
- you've got a high end compact camera
- the light is good
- you can stay at base ISO (64 or 80 or 100 or whatever the
lowest normal ISO setting is).
http://www.luminous-landscape.com/reviews/kidding.shtml

The S8200 is NOT a high end compact camera to begin with.

It's lens got an impressive zoom range. Unfortunately, that
always means compromises, especially if you're on a weight
and money budget. Still, the lens --- in the centre, at ISO
100 --- delivers[2].

Yet the D700 is in a different class when it comes to noise
and probably has better lenses (sharpness not being the only
factor).

And the difference between 12 and 16 MPix is small --- it's
only 15% pixels more horizontally and vertically.

-Wolfgang

[2] According to
http://www.chip.de/artikel/Nikon-Coo..._52658611.html
it has 1.654 LP/PH in the centre (which is close to
the theoretical maximum, but I don't understand how they
measure, so that value isn't comparable), but drops by more
than 300 LP/PH in the corners at ISO 100, and gets *much*
worse with higher ISOs.

But the noise supression filters smothers away fine
details even at ISO 100. That would take away much of
the structure of the painting.

And the test shots show quite some noise at ISO 100.
 
Reply With Quote
 
 
 
 
Wolfgang Weisselberg
Guest
Posts: n/a
 
      04-13-2013
Martin Brown <|||newspam|||@nezumi.demon.co.uk> wrote:

> pair 2x1,1x1,1x1 sampled. If the original JPEG specification committee
> had anticipated the development of Bayer mask digital imaging in camera
> JPEGs could be encoded in about 60% of the space actually used today.


.... albeit at the cost of having a fixed (or a few fixed)
deinterlacers. Which may be OK for some classes of image,
but not for others. Scanners or Foveon sensors do deliver
full colour data, for example.

-Wolfgang
 
Reply With Quote
 
nospam
Guest
Posts: n/a
 
      04-13-2013
In article <(E-Mail Removed)>, Jennifer
Murphy <(E-Mail Removed)> wrote:

> >The S8200 is NOT a high end compact camera to begin with.

>
> What would you consider a high-end compact camera? I might just upgrade.


<http://www.dpreview.com/>

there are a *lot* of choices.
 
Reply With Quote
 
Wolfgang Weisselberg
Guest
Posts: n/a
 
      04-15-2013
Jennifer Murphy <(E-Mail Removed)> wrote:
> On Sat, 13 Apr 2013 02:00:44 +0200, Wolfgang Weisselberg
>>David Taylor <(E-Mail Removed)> wrote:


>>> The 16 Mpix are genuine, but each pixel is of lower quality than that in
>>> the DSLR because it is physically smaller and captures less light.


>>Which doesn't really mean that much IF
>>- you've got a high end compact camera
>>- the light is good
>>- you can stay at base ISO (64 or 80 or 100 or whatever the
>> lowest normal ISO setting is).
>> http://www.luminous-landscape.com/reviews/kidding.shtml


>>The S8200 is NOT a high end compact camera to begin with.


> What would you consider a high-end compact camera? I might just upgrade.


kidding.shtml names a Canon PowerShot G10, for example, but
that's already an older model by now.
Current examples would probably include the G1 X and G15.
(Don't know enough to say anything with authority, especially
not for other makers.)

Note the price. Compare to entry level DSLRs.

Consider that good light is necessary for a compact to be equal
to larger cameras. Note the exposure times in the URL above.

Compact cameras usually are smaller and lighter, and the camera
you won't have with you won't make good photos.

-Wolfgang
 
Reply With Quote
 
Martin Brown
Guest
Posts: n/a
 
      04-16-2013
On 13/04/2013 01:05, Wolfgang Weisselberg wrote:
> Martin Brown <|||newspam|||@nezumi.demon.co.uk> wrote:
>
>> pair 2x1,1x1,1x1 sampled. If the original JPEG specification committee
>> had anticipated the development of Bayer mask digital imaging in camera
>> JPEGs could be encoded in about 60% of the space actually used today.

>
> ... albeit at the cost of having a fixed (or a few fixed)
> deinterlacers. Which may be OK for some classes of image,
> but not for others. Scanners or Foveon sensors do deliver
> full colour data, for example.


You misunderstand. The workflow inside a present day N Mpixel camera is
a bit bizarre for saving as a JPEG. It generates a full RGB image at
full 3xN size sharpens and then downsamples it again. This has to save
6xN image sites after the most common 2x1,1x1,1x1 subsampling. There is
a lot of redundancy in this in camera source 24bit YCrCb image since 2/3
of all its pixel values are interpolated from the raw sensor data.

Had the JPEG standard been prescient and included Bayer mosaic as an
option then the raw sensor data could be encoded directly as an N/2
2x1,1x1,1x1 subsampled YCrCb but with a non-standard pixel grid/phase.

This would be in addition to the normal JPEG not instead of. Basically a
way to encode the information content of a Bayer mosaic CCD as JPEG.

The JPEG standard defines a lot of different subsampling options hardly
any apart from 2x2,1x1,1x1 (IJG default, PhotoShop 1-6) and 1x1, 1x1,
1x1 (PhotoShop 7-12) were used until digital cameras came along when
they used 2x1,1x1,1x1 - roughly reflecting the sensor capabilities.

Certain applications get subsampling horribly wrong too.

--
Regards,
Martin Brown
 
Reply With Quote
 
Wolfgang Weisselberg
Guest
Posts: n/a
 
      04-17-2013
Martin Brown <|||newspam|||@nezumi.demon.co.uk> wrote:
> On 13/04/2013 01:05, Wolfgang Weisselberg wrote:
>> Martin Brown <|||newspam|||@nezumi.demon.co.uk> wrote:


>>> pair 2x1,1x1,1x1 sampled. If the original JPEG specification committee
>>> had anticipated the development of Bayer mask digital imaging in camera
>>> JPEGs could be encoded in about 60% of the space actually used today.


>> ... albeit at the cost of having a fixed (or a few fixed)
>> deinterlacers. Which may be OK for some classes of image,
>> but not for others. Scanners or Foveon sensors do deliver
>> full colour data, for example.


> You misunderstand. The workflow inside a present day N Mpixel camera is
> a bit bizarre for saving as a JPEG. It generates a full RGB image at
> full 3xN size sharpens and then downsamples it again.


So you're basically saying they spread each green pixel over
6 pixels, and each red or blue one over 12 pixels? What good
would that do?

I'd like a reliable source for that claim.

Or did you mean there will be N pixels * 3 channels? That's
"Duh!" --- you can't properly sharpen mosaiced data.


> This has to save
> 6xN image sites after the most common 2x1,1x1,1x1 subsampling.


6N image sites?

So basically (Y = luma site)


Y Y Y Y


Y Y Y Y


Y Y Y Y


that has N image sites and N values (and no colour).

So we need to add 5 additional image sites (and probably
values) to the image:

r b r b r b r b r b r
Y Y Y Y
b r b r b r b r b r
r b r b r b r b r b r
Y Y Y Y
b r b r b r b r b r
r b r b r b r b r b r
Y Y Y Y
b r b r b r b r b r

WOW! We need to invent TONS of Cr and Cb values!

How about saving that all and use 4:2:0 subsampling (Y =
luma, x = Cr and Cb site):

Y Y Y Y
x x
Y Y Y Y

Y Y Y Y
x x
Y Y Y Y

or maybe 4:2:2 subsampling:

Y x Y Y x Y

Y x Y Y x Y

Y x Y Y x Y

Y x Y Y x Y

As you can see, there are in no way 6N sites, there are at
most 1.5N or 1.25N sites and 2N or 1.5N values ...

We can also cosite the 'x'es with the 'Y's, we can talk about
if they are an average or a specific pixel's chrominance data,
we can even think about subsampling Cr and Cb differently ...


Heck, let's do NO subsampling AT ALL:

X X X X

X X X X

X X X X

X X X X

(X being a full RGB tripel: that's N image sites and 3N
values)

So I'd really would like a reliable source for your 6N claim.


> There is
> a lot of redundancy in this in camera source 24bit YCrCb image since 2/3
> of all its pixel values are interpolated from the raw sensor data.


No, they are not. Unless you want to claim that for example
sharpening doesn't have any effect. Think about it!


> Had the JPEG standard been prescient and included Bayer mosaic as an
> option then the raw sensor data could be encoded directly as an N/2
> 2x1,1x1,1x1 subsampled YCrCb but with a non-standard pixel grid/phase.


> This would be in addition to the normal JPEG not instead of. Basically a
> way to encode the information content of a Bayer mosaic CCD as JPEG.


In how far would that be better than RAW, given that there
are many non-standard mosaic variants that a Bayer-JPEG
couldn't save?


> The JPEG standard defines a lot of different subsampling options hardly
> any apart from 2x2,1x1,1x1 (IJG default, PhotoShop 1-6) and 1x1, 1x1,
> 1x1 (PhotoShop 7-12) were used until digital cameras came along when
> they used 2x1,1x1,1x1 - roughly reflecting the sensor capabilities.


Actually, 4:2:0 would be roughly reflecting sensor capabilities:
1 red and 1 blue pixel => 1 Cr and 1 Cb. The 2 green and the
red and blue pixels carry enough luma for more than 2 pixels
(green carries a lot, red and blue somewhat less), so 4 pixels
is quite OK.

> Certain applications get subsampling horribly wrong too.


So what?

There's very little that certain applications won't get wrong.

-Wolfgang
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Nikon Coolpix S8200 accessories David J Taylor Digital Photography 5 01-10-2012 07:46 AM
Is there any way to know image size ? And truncate image? bluedolphin Javascript 1 04-10-2008 06:18 PM
Nikon Coolpix S3 v Coolpix 4200 LurfysMa Digital Photography 2 04-03-2006 05:02 PM
Nikon Coolpix 775 or Nikon Coolpix 2500 Larry R Harrison Jr Digital Photography 0 08-02-2003 03:17 PM
Nikon Coolpix 5000 vs Coolpix 5400 Ngiam TW Digital Photography 1 07-29-2003 08:09 PM



Advertisments