fujifilm finepix s series - page 4 - Non-CANON cameras development - CHDK Forum supplierdeeply

fujifilm finepix s series

  • 113 Replies
  • 89858 Views
*

Offline apass

  • *
  • 10
Re: fujifilm finepix s series
« Reply #30 on: 11 / July / 2013, 16:04:41 »
Advertisements
Nice work DragonLord!

I didn't have the time to look further in the topic.... so no news from me.
However, either something doesn't add up, either I don't understand the relation between camera resolution an sensor resolution.
I mean - if the raw ccd dump has 2 bytes per pixel, where are the color sub-pixels? I would have expected, for a 4000 x 3000 resolution, with 12 bits per color, to have around 4000 x 3000 x 1.5bytes x 4subpixels = 72MB. Or at least around that value. So how come the output file has only 2 bytes per pixel?
About the YRGB file - have you made the difference between the bitmap file and the jpeg file and the result was 0? Or have you compared them only visually? Like I said, I didn't look forward into the C code to see how the data is converted so I may ask - at what stage in the JPEG conversion is this YRGB file saved?
As a note - the 1.5 scale between image size and file size makes for 12 bit per pixel.
Another point, with the exception of YRGB file, all other files seem to have around one byte per pixel (one of them is a bit larger, maybe a header in the file with some other info) - so again, where are the color subpixels? Or, again, they are some intermediate file from the JPEG conversion?

*

Offline srsa_4c

  • ******
  • 4451
Re: fujifilm finepix s series
« Reply #31 on: 11 / July / 2013, 17:00:13 »
I mean - if the raw ccd dump has 2 bytes per pixel, where are the color sub-pixels? I would have expected, for a 4000 x 3000 resolution, with 12 bits per color, to have around 4000 x 3000 x 1.5bytes x 4subpixels = 72MB. Or at least around that value. So how come the output file has only 2 bytes per pixel?
See the following wiki article: https://en.wikipedia.org/wiki/Bayer_filter
Quote
As a note - the 1.5 scale between image size and file size makes for 12 bit per pixel.
That will be one of the YUV image formats.
Hope that helps.

Re: fujifilm finepix s series
« Reply #32 on: 11 / July / 2013, 17:32:07 »
Nice work DragonLord!

I didn't have the time to look further in the topic.... so no news from me.
However, either something doesn't add up, either I don't understand the relation between camera resolution an sensor resolution.
I mean - if the raw ccd dump has 2 bytes per pixel, where are the color sub-pixels? I would have expected, for a 4000 x 3000 resolution, with 12 bits per color, to have around 4000 x 3000 x 1.5bytes x 4subpixels = 72MB. Or at least around that value. So how come the output file has only 2 bytes per pixel?
About the YRGB file - have you made the difference between the bitmap file and the jpeg file and the result was 0? Or have you compared them only visually? Like I said, I didn't look forward into the C code to see how the data is converted so I may ask - at what stage in the JPEG conversion is this YRGB file saved?
As a note - the 1.5 scale between image size and file size makes for 12 bit per pixel.
Another point, with the exception of YRGB file, all other files seem to have around one byte per pixel (one of them is a bit larger, maybe a header in the file with some other info) - so again, where are the color subpixels? Or, again, they are some intermediate file from the JPEG conversion?

The S1800 and kin, like most cameras, uses a Bayer filter, as srsa_4c has noted.  Each pixel represents one and only one of the additive primary colors: red, green, and blue.  A process called demosaicing is used to combine the color data in the pixels to create a full-color image.

I'll take a closer look at the converted YRGB/BMP output and see how it compares with the JPEG output when I get a chance.

--DragonLord
Other online communities I'm in: Stack Exchange - Wikipedia - Pentax Forums

Re: fujifilm finepix s series
« Reply #33 on: 11 / July / 2013, 23:11:04 »
There are extremely subtle differences between the JPEG and the converted YRGB/BMP output.  However, I did find an oddity when examining the YRGB file: the data seem to be organized in individual bytes, not in 12-bit groups, for that the bytes read like "80 85 87 ...".  Perhaps the source code of the YRGB2BMP converter would explain what's going on?

--DragonLord
Other online communities I'm in: Stack Exchange - Wikipedia - Pentax Forums


*

Offline apass

  • *
  • 10
Re: fujifilm finepix s series
« Reply #34 on: 12 / July / 2013, 07:56:29 »
I mean - if the raw ccd dump has 2 bytes per pixel, where are the color sub-pixels? I would have expected, for a 4000 x 3000 resolution, with 12 bits per color, to have around 4000 x 3000 x 1.5bytes x 4subpixels = 72MB. Or at least around that value. So how come the output file has only 2 bytes per pixel?
See the following wiki article: https://en.wikipedia.org/wiki/Bayer_filter
Quote
As a note - the 1.5 scale between image size and file size makes for 12 bit per pixel.
That will be one of the YUV image formats.
Hope that helps.

Yes, I know about Bayer filters - that's why I said 4 subpixels (2 green + red + blue). And I though that image sensors are using a similar approach as the displays - i.e. each pixel generated consists of separate subpixels which are used to generate the color information at the current pixel location.

Re: fujifilm finepix s series
« Reply #35 on: 12 / July / 2013, 12:30:19 »
Examination of the YRGB/BMP output and the JPEG output at 400% indicates that the YRGB/BMP file is free of compression artifacts.  However, the data has already been processed with noise reduction and other in-camera processing steps.  The YRGB2BMP converter contains an option -i which performs interpolation; the interpolated output has smoother color transitions at the cost of a small amount of fine detail.  The difference between the interpolated and the non-interpolated output is extremely subtle in viewing, and aggressive processing of all files (with BMPs converted to TIFF using Windows Paint) using a 32-bit floating-point image processing program (RawTherapee) indicates very minor differences in tonal range.

I suspect that if we can decode the Take12BitCCDRawImage output, then we will get truly unprocessed data that has more latitude for manual processing than the JPEG or YRGB files.



On another note, the DebugMode menu allows the selection of ISO sensitivity settings between 50 and 3200 in 1/3 stop steps, with additional steps between ISO 100 and ISO 400.  Unfortunately, setting ISO 3200 through this menu produces invalid output, so the highest ISO possible is ISO 2500 at full resolution.  Of course, the result is very, very ugly—both of my Pentax DSLRs produce usable output at these sorts of sensitivity levels, but the same can't be expected of a camera with a sensor only 1/13th the surface area of an APS-C sensor.  The S1800's rather poor noise reduction algorithms aren't really helping here, either.

--DragonLord
« Last Edit: 12 / July / 2013, 13:16:14 by DragonLord »
Other online communities I'm in: Stack Exchange - Wikipedia - Pentax Forums

Re: fujifilm finepix s series
« Reply #36 on: 12 / July / 2013, 14:46:25 »
The SaveCFA files appear to contain 8 bits per pixel data from the sensor prior to demosaicing.  The file represents a 4040 x 3030 image size.  This is the raw size of the sensor, and is probably very easy to decode as simple RGB data.  Once we decode the data, it should be possible to determine the difference between SaveCFAonTake and SaveCFAonIRP.

--DragonLord
Other online communities I'm in: Stack Exchange - Wikipedia - Pentax Forums

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: fujifilm finepix s series
« Reply #37 on: 12 / July / 2013, 15:33:05 »
Can you upload a sample from Take12BitCCDRawImage? I can try to take a look.


*

Offline apass

  • *
  • 10
Re: fujifilm finepix s series
« Reply #38 on: 12 / July / 2013, 15:39:52 »
I've been looking in the source code and I believe I understand why the YRGB file is 12 bits / pixel. As per the comments in the source code, the data bytes are organized as:
Y   Y   Y   Y
Cb Cr Cb Cr
Y   Y   Y   Y
Y   Y   Y   Y
Cb Cr Cb Cr
Y   Y   Y   Y

This actually gives a 4 x 4 pixel matrix. First pixel in the first line uses the first Y value and first Cb Cr values from the second line. The second pixel on the first line uses the second Y value and same Cb Cr values as the first pixel. Ne next pixel row starts at the 3 row in the above table - so the first pixel from the second pixel row uses the Y value from the third line and Cb Cr values from the second line in the table. This means that a group of 2 x 2 pixels (4 pixels) uses 6 bytes of data => 1.5 bytes / pixel. I hope I has clear....

Another point, the other format for the Kodak camera looks like 2 bytes / pixel - I don't know what test image did you use, but if would have been a gray image, the pattern would look like 80 00 80 00 as there would be no information in Cb Cr pixels. So I wonder - can you try to decode the ccd raw file with the other Kodak file format (c330) - given the input image size of 4040 x 3030? At least to see if it's possible to get something - good or not!

Re: fujifilm finepix s series
« Reply #39 on: 12 / July / 2013, 16:44:11 »
https://dl.dropboxusercontent.com/u/64649057/DSCO0001.RAW
10mm (56mm equiv. 135) 2s f/4 ISO 50

The image is of a red Douglas stuffed dragon, on an off-white table and shot against a yellow background.  Please note that I may remove this image after one week or so because I'm trying to avoid using too much space on my Dropbox, so you might want to keep a copy and upload it yourself to an appropriate location.

Edit: off-topic rant: I have had enough seeing deceptive ads with the big download buttons.  These are Google AdWords image ads served through Google AdSense.  They violate the AdWords Advertising Policy for image ads as "trick to click", so why hasn't Google rejected these ads?  I ended up reporting the ads at https://support.google.com/adwords/contact/feedback.

Edit 2: The link has been taken down.

--DragonLord
« Last Edit: 05 / September / 2013, 21:08:07 by DragonLord »
Other online communities I'm in: Stack Exchange - Wikipedia - Pentax Forums

 

Related Topics