Same phone, different raw... rgbw and rgb versions?

Hello everyone,

i have an Honor 6A (huawei dli-l22 ) phone.

A friend of mine has the very same phone, same software. On both we have installed open camera, but we are unable to find out why my phone (sligthly newer) has an exposure limit of 0.7 seconds, shilst the slightly older one of 0.3 seconds.

And most important… the raw from the older one have really strange colors in raw (jpeg are quite similar).

In the past i’ve read that this phone had a rgbw color filter, but i’m unable to find that page again (maybe IMX278? ), and i’m quite sure mine has a bayer one.

We have tried both phone with the same scene, and here is the result. With the 0.3s limited one, iso is double.

Zip attached with both jpegs and raws.Honor6A.zip (20.0 MB)

Any ideas?

Thank you in advace.

Hi @ggc,

If you use exiftool on both .dngs, and compare the results, you will find that they have different CFA Patterns: 1 0 2 1 vs. 2 1 1 0, as well as [Green,Red][Blue,Green] vs. [Blue,Green][Green,Red].

Whatever that might signify :slight_smile:

Have fun!
Claes in Lund, Sweden

1 Like

Sometimes for phones with odd setups the CFA pattern info might be wrong because there aren’t pattern categories for unusual patterns (that I know of). You can always check to see if it is indeed RGBW, LRGB, RGBY or something else.

1 Like

Thank you.

Unfortunatly i don’t know how to check the pattern type.

And how to develop the raw accordingly. If the problem is the uncommon pattern, of course…

Indeed that can be troublesome to investigate. It would mean splitting the patterned raw into separate images in first the most obvious RGGB configuration and then trying other patterns, starting with determining with pixels are W if the RGBW claim is true. Maybe W is G1 or G2…

Exiftool says the cameras are the same model, but they have different colour filter arrays (CFAs), different numbers of pixels, different black levels, and different matrices.

The subject is more or less gray, and we don’t know what the colours should be. Deliberately swapping channels will probably not be a definitive test. A better image would contain blue sky, green grass and a red rose or car or something.

2 Likes

Thank you.

I don’t have such an image (my phone is the “standard” one, and the weather here is terrible) but i have one with green grass and blue sky with white clouds, and one with a red sofa with a white puppet.OtherImages.zip (28.2 MB)

Attached.

Have you checked their firmware versions as well? Android ships the drivers on one big installable blob.

1 Like

Firmware i don’t know… but software, android version and patches are the same.

This and, sorry, I didn’t examine the raw to find out. Also, @snibgo is much more experienced than I. Listen to him. :slight_smile:

Using OtherImages.zip, messing around with the channels, they seem to be [green blue][red green]. This is neither the common [r g][g b] pattern nor the pattern claimed by exiftool: [b g][g r].

This is strange. When I make ordinary sRGB images with dcraw, they look okay, but I assume dcraw uses the pattern as declared by exiftool, so those sRGB images should look wrong.

EDIT: Ah, okay, the pattern is something weird. Looking at the individual [0 1][2 3] channels, they are all sometimes weird. Enlarging by 500%, one looks like this:

This suggests that this channel is sometimes used for green, but sometimes for something else (eg white). In other words, the CFA isn’t a simple 2x2 array.

1 Like

really nice. i think strange pixls are af points.

edit: see this old thread when i found something similar on mine White dots in raw - #7 by heckflosse

The pattern for my Nikon D800 is a simple 2x2 array:

R G0
G1 B

Many cameras follow this pattern.

The pattern for @ggc’s Honor 6A (huawei dli-l22 ) phone seems to be a 16x16 array:

G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B 
R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 
G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B 
R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 
G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B 
R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 
G0 x0 G0 B  G0 x1 G0 B  G0 B  G0 B  G0 B  G0 B 
R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 
G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B 
R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 
G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B 
R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 
G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B  G0 B 
R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 
G0 B  G0 B  G0 B  G0 B  G0 x2 G0 B  G0 x3  G0 B 
R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 R  G1 

I have marked 4 pixels as “x0” to “x3”. These are instead of the Blue channel. Sometimes they are lighter than surrounding pixels, and sometimes darker. Perhaps these pixels are for auto-focus, in which case we can discard them for demosaicing, or perhaps use them for 3D.

But perhaps these pixels contain useful data. Let’s extract just the “x0” pixels:

These clearly are not 3D values. They seem to be “lightness”. I suspect they are “white” pixels (but I’m not certain).

2 Likes

Did some sleuthing. Huawei does make phones with RGBW sensors, though Honor 6A isn’t one of them. 6A’s sensor is PDAF. Could these pixels be reserved for PDAF? I don’t remember how it works.

Is dcraw intelligent enough to read frame crop info or ignore rows and columns until it finds the first rggb or bggr sequence?

1 Like

Another point of information: when dcraw creates an ordinary sRGB output, noise is visible in the sky. Each noise area is centred on one of the x0, x1, x2 or x3 pixels. I suppose dcraw treats these pixels as Blue channel, and it shouldn’t.

I see nothing in exif metadata that says these pixels need special treatment.

My version of dcraw is quite old. It does no special processing for this make or model of camera.

I’ll hack my hack of dcraw, to spit out what it thinks the CFA is. But it’s too late tonight.

1 Like

Meanwhile i have found out where i read that it was using an rgbw sensor:

IMX278 that as far as i understand, is of that kind?

Anyway here is a list of phones with that sensor: Smartphones with IMX278 lens model

No sample on raw.pixls.us… for mine (that is totally “normal”, not this strange version) and some other phones i have uploaded them long time ago.

Sorry, where does it say so? The first link doesn’t say anything about 4-colour sensor or RGBW. The second doesn’t even list Honor 6A…

Yes, it does, indirectly.
The back (not front) lens is handled by an IMX278.

Have fun!
Claes in Lund, Sweden

Error corrected :frowning:

Oh, I read the first post again and it does say IMX278. I know no Italian whatsoever but the part name is there. However, the second link still doesn’t list the 6A, and yesterday when I checked Huawei and Honor’s websites, they don’t say that the 6A has a 4-color sensor. For phones that do, they advertise it in a strong way.

Oh, yes you do know Italian! The word Pizza, for instance.

Apart from that, in case you feel insecure about a foreign vernacular,
you can always use translate.google.com.

Ha det så kul!

Mvh
Claes i Lund, Sverige