Strange behavior of noise reduction in stock camera - with samples

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
The issue that I found is all the noise reduction applied below ISO 450. If we raise ISO to 450 you will see that the noise reduction is less and you'll find more details. That's my point lol. I think we all lost track of what I'm trying to talk about. There is a lot of noise reduction below 450 and less NR after 450, which is strange.
ISO 300 and below use the same Denoise profile

Code:
ISO 380 - ISO 650 Same profile
Code:
ISO 880 - ISO 910
Code:
ISO 1000 - ISO 2500
Code:
ISO 2600 - ISO 5500
Code:
ISO 5700 - ISO 6000
 
Last edited:

One Twelve

Senior Member
Oct 28, 2013
2,608
638
0
The issue that I found is all the noise reduction applied below ISO 450. If we raise ISO to 450 you will see that the noise reduction is less and you'll find more details. That's my point lol. I think we all lost track of what I'm trying to talk about. There is a lot of noise reduction below 450 and less NR after 450, which is strange.
Well, we were waiting for a proper demonstration.

I think i understand why LG has applied that NR at the lower ISO as otherwise solid colours can get messed up and things can look less natural ie over processed which is ironic.

You want this for general use. It will work in some situations and not others. In faizal's example in post #152 maybe we can say less NR looks better but in other scenes it will be unnatural. Can even see how smooth or not the wall is in faizal's photos.

Some scenes benefit others will go over the top and look fake is what i mean. That's why i said photocopy, say if you want to take a copy of a poster or some menu with text, it will work great for this.

What do others think. Is this something you will be comfortable with having on all the time for every photo ?

let's see more examples in different lighting conditions with low ISO. Stock vs mod.
 
Last edited:

Ramsey

Senior Member
May 23, 2008
826
125
63
Gatineau, Quebec
Well, we were waiting for a proper demonstration.

I think i understand why LG has applied that NR at the lower ISO as otherwise solid colours can get messed up and things can look less natural ie over processed which is ironic.

You want this for general use. It will work in some situations and not others. In faizal's example in post #152 maybe we can say less NR looks better but in other scenes it will be unnatural. Can even see how smooth or not the wall is in faizal's photos.

Some scenes benefit others will go over the top and look fake is what i mean. That's why i said photocopy, say if you want to take a copy of a poster or some menu with text, it will work great for this.

What do others think. Is this something you will be comfortable with having on all the time for every photo ?

let's see more examples in different lighting conditions with low ISO. Stock vs mod.
I believe everyone else saw the demonstration in my first post and believed it. It's a very clear example of what happens, you can look at the bed sheet and the animal fur to see what I mean. Regardless of distance or depth of field, the example is clear.

Like I said to defcomg, I would like to be able to use the mod but disable it anytime by pressing a button, or by having 2 different stock camera apps.
I even stated that it is not good for every scene, which is why I want to be able to disable the mod when I want.

Also, in my opinion heavy noise reduction makes scenes very fake as it adds a layer of smudginess that you can't find in real life, and many times it actually prevents natural colors as it smudges colors together like watercolor.
We need a low amount of noise reduction, like the one we apply when we post process a raw image.
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
I believe everyone else saw the demonstration in my first post and believed it. It's a very clear example of what happens, you can look at the bed sheet and the animal fur to see what I mean. Regardless of distance or depth of field, the example is clear.

Like I said to defcomg, I would like to be able to use the mod but disable it anytime by pressing a button, or by having 2 different stock camera apps.
I even stated that it is not good for every scene, which is why I want to be able to disable the mod when I want.

Also, in my opinion heavy noise reduction makes scenes very fake as it adds a layer of smudginess that you can't find in real life, and many times it actually prevents natural colors as it smudges colors together like watercolor.
We need a low amount of noise reduction, like the one we apply when we post process a raw image.
i attached hex workshop bookmark with the G4's Noise Reduction profiles

There are Four Groups
SW420
SW422
HW420
HW422

G4 uses Hardware 420 :D

1. Download Hex Workshop
2. DL the zip file from previous post
3. Open Hex Workshop
4. Look for bookmark tab load the hbk file
5. Look for HW420 PF1 Y HH LAYER 1

Start there

Code:
/******************************************************************************/
// Feature name: Wavelet denoise (HW)
// Applicable chipset:  N/A.
// 3A version: N/A.
// Applicable operation mode:  Snapshot.
//
// Variable name: trigger_value.
// Gain or lux index value for each of the 6 profiles.
// Default value: 1.
// Data range: >=1. Value for the 6 patches are in incrementing order.
//   description of what wach values are 

// Variable name: referenceNoiseProfileData.
// Noise profile (std) of an gray patch. There a total of 6 gray scale levels corresponding to 6 sets of profiles.
// From bright to dark patches.    Y values are luma values cb and cr are color 
// Each set of profile has 24 values. The order is:
// y 1st layer HL, y 2nd layer HL, y 3rd layer HL, y 4th layer HL, y 1st layer HH, y 2nd layer HH, y 3rd layer HH, y 4th layer HH,
// Cb 1st layer HL, Cb 2nd layer HL, Cb 3rd layer HL, Cb 4th layer HL, Cb 1st layer HH, Cb 2nd layer HH, Cb 3rd layer HH, Cb 4th layer HH,
// Cr 1st layer HL, Cr 2nd layer HL, Cr 3rd layer HL, Cr 4th layer HL, Cr 1st layer HH, Cr 2nd layer HH, Cr 3rd layer HH, Crb 4th layer HH
// VFE 4 or later chip sets have HW version wavelet, all HL noise profiles are not used.
// Default value: 0.
// Data range: 0-255.
//
// Variable name: denoise_scale.
// Denoise level.
// Default value: 3.
// Data range: 0 <= denoise_scale * noise_profile <= 255
// Effect: Increase noise_scale to denoise more. you can play with these values i have them set to 1 lets look at original values htc used 3 as their values 
//
// Variable name: denoise_edge_softness.
// Edge softness level.
// Default value: 3.
// Data range: 0.01 - inifinity
// Effect: Increase denoise_edge_softness to make the edges softer and denoise more. range is unlimited so go nuts with this 
//
// Variable name: denoise_weight.
// How much of the details are kept with the noise.
// Default value: 0.3
// Data range: 0-1.
// Effect: Decrease denoise_weight to remove details and denoise more. so increase to pull more details range is 0 - 1 so 0.1 0.2 0.25 ... till 1 i used 0.4 
//
// Variable name: sw_denoise_edge_threshold.
// Edge threshold for the 4th level LL band.
// Default value: 204.
// Data range: 0-1024.
// Effect: Increase sw_denoise_edge_threshold to denoise more for an approximately 16x16 size noise. i will send you the link to this file
 
  • Like
Reactions: faizalotai

Ramsey

Senior Member
May 23, 2008
826
125
63
Gatineau, Quebec
i attached hex workshop bookmark with the G4's Noise Reduction profiles

There are Four Groups
SW420
SW422
HW420
HW422

G4 uses Hardware 420 :D

1. Download Hex Workshop
2. DL the zip file from previous post
3. Open Hex Workshop
4. Look for bookmark tab load the hbk file
5. Look for HW420 PF1 Y HH LAYER 1

Start there

Code:
/******************************************************************************/
// Feature name: Wavelet denoise (HW)
// Applicable chipset:  N/A.
// 3A version: N/A.
// Applicable operation mode:  Snapshot.
//
// Variable name: trigger_value.
// Gain or lux index value for each of the 6 profiles.
// Default value: 1.
// Data range: >=1. Value for the 6 patches are in incrementing order.
//   description of what wach values are 

// Variable name: referenceNoiseProfileData.
// Noise profile (std) of an gray patch. There a total of 6 gray scale levels corresponding to 6 sets of profiles.
// From bright to dark patches.    Y values are luma values cb and cr are color 
// Each set of profile has 24 values. The order is:
// y 1st layer HL, y 2nd layer HL, y 3rd layer HL, y 4th layer HL, y 1st layer HH, y 2nd layer HH, y 3rd layer HH, y 4th layer HH,
// Cb 1st layer HL, Cb 2nd layer HL, Cb 3rd layer HL, Cb 4th layer HL, Cb 1st layer HH, Cb 2nd layer HH, Cb 3rd layer HH, Cb 4th layer HH,
// Cr 1st layer HL, Cr 2nd layer HL, Cr 3rd layer HL, Cr 4th layer HL, Cr 1st layer HH, Cr 2nd layer HH, Cr 3rd layer HH, Crb 4th layer HH
// VFE 4 or later chip sets have HW version wavelet, all HL noise profiles are not used.
// Default value: 0.
// Data range: 0-255.
//
// Variable name: denoise_scale.
// Denoise level.
// Default value: 3.
// Data range: 0 <= denoise_scale * noise_profile <= 255
// Effect: Increase noise_scale to denoise more. you can play with these values i have them set to 1 lets look at original values htc used 3 as their values 
//
// Variable name: denoise_edge_softness.
// Edge softness level.
// Default value: 3.
// Data range: 0.01 - inifinity
// Effect: Increase denoise_edge_softness to make the edges softer and denoise more. range is unlimited so go nuts with this 
//
// Variable name: denoise_weight.
// How much of the details are kept with the noise.
// Default value: 0.3
// Data range: 0-1.
// Effect: Decrease denoise_weight to remove details and denoise more. so increase to pull more details range is 0 - 1 so 0.1 0.2 0.25 ... till 1 i used 0.4 
//
// Variable name: sw_denoise_edge_threshold.
// Edge threshold for the 4th level LL band.
// Default value: 204.
// Data range: 0-1024.
// Effect: Increase sw_denoise_edge_threshold to denoise more for an approximately 16x16 size noise. i will send you the link to this file
What is that for though? I'm not a dev so I don't understand those things :p.
 

One Twelve

Senior Member
Oct 28, 2013
2,608
638
0
I believe everyone else saw the demonstration in my first post and believed it. It's a very clear example of what happens, you can look at the bed sheet and the animal fur to see what I mean. Regardless of distance or depth of field, the example is clear.
its more clear now when there are no ambiguities.

I'm not sure in those scenes whether i would prefer the modded version or not. Stock looked pretty good. This is already an improvement over what was there earlier with other devices.

I even stated that it is not good for every scene, which is why I want to be able to disable the mod when I want.

Also, in my opinion heavy noise reduction makes scenes very fake as it adds a layer of smudginess that you can't find in real life, and many times it actually prevents natural colors as it smudges colors together like watercolor.
We need a low amount of noise reduction, like the one we apply when we post process a raw image.
its tough one, textures more enhanced means lines start to be less sharp more jagged at the pixel level. Crops will look more coarse. NR helps to smooth it over. Shadows will have more luminance noise present.

Post more samples, with and without. let's see where it can work. Will make it easier then to know when to use it or not :)
 
Last edited:

Ramsey

Senior Member
May 23, 2008
826
125
63
Gatineau, Quebec
its more clear now when there are no ambiguities.

I'm not sure in those scenes whether i would prefer the modded version or not. Stock looked pretty good. This is already an improvement over what was there earlier with other devices.


Post more samples, with and without. let's see where it applies.
One Twelve, you probably forgot my original post, but there is no mod applied in my original post.. It is all in stock manual mode and the one of my daughter is auto mode outside.
 

One Twelve

Senior Member
Oct 28, 2013
2,608
638
0
One Twelve, you probably forgot my original post, but there is no mod applied in my original post.. It is all in stock manual mode and the one of my daughter is auto mode outside.
I mean take some more with the mod and without. Show us some comparisons where you think the mod works better.

I wonder how this mod will fare with 2x zoom. more details means less loss. right ? :)
 
Last edited:

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
I mean take some more with the mod and without. Show us some comparisons where you think the mod works better.

I wonder how this mod will fare with 2x zoom. more details means less loss. right ? :)
can you check what subsampling g4 use in jpeg with jpeg snoop
 

faizalotai

Senior Member
Aug 27, 2013
1,019
301
113
defcomg

Iam trying using hex for libchromatix_imx234_cpp_preview.so..etc

by HW420 PF1 Y HH LAYER 1 you mention i can see some value and what i did is, i copied some from your NR3 file, mod and original from M9..
and from there i go to HH Layer 4..is it correct thing to do??

I dont know if it is effecting the camera or not but i can see some different in image and captured time especially with original M9 file..the camera become very fast as it ignored focusing..

And also i did it with Sony Z5 value and the camera broke...lol..

So far from those testings, the G4 values is the most i like.
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
defcomg

Iam trying using hex for libchromatix_imx234_cpp_preview.so..etc

by HW420 PF1 Y HH LAYER 1 you mention i can see some value and what i did is, i copied some from your NR3 file, mod and original from M9..
and from there i go to HH Layer 4..is it correct thing to do??

I dont know if it is effecting the camera or not but i can see some different in image and captured time especially with original M9 file..the camera become very fast as it ignored focusing..

And also i did it with Sony Z5 value and the camera broke...lol..

So far from those testings, the G4 values is the most i like.
the first 4 HH are the luma values they handle luma noise the Cb and Cr are color noise Cb being blue and Cr being red

i would play with the y denoise scale value decrease to reduce luma nr effect then y denoise eges to make edges softer or sharper and weight to increase details

attached image of how i have my device configured it does minimal nr in the luma channel so i retain detail even with sharpness turned down.

theres also another culprit for details its something they call Adaptive bayer filter it applies smoothing to the image then " attempts to sharpen the edges i will see if i can bookmark it for G4 but with it an a couple of other stuff turned off output almost matches raw
 

Attachments

  • Like
Reactions: faizalotai

jonoro11

Senior Member
Nov 11, 2013
142
23
0
If anyone is interested, I just noticed that Snap Hdr Camera in its last version (6.9) allows to turn off NR as well as sharpness.

Update: I have done some comparisons and turning sharpness off is very useful noisewise, since when it's on it amplifies noise, hence the grainy look.
I find that applying NR and sharpness afterwards in PS Express for instance, gives better less grainy results than applying PSX NR on jpegs with sharpness on.
 
Last edited:
  • Like
Reactions: Ramsey

cattr70

Member
Jan 17, 2011
6
0
0
I am not that of a tech guy but I believe the Gallery app does some kind of a straightening up of pics after taking photos.

When I take a pic with Proshot without NR and look at the pic in the Proshot app it looks good, but when I open and look at the same pic in the default gallery app it applies the watercolor or oil painting effect to it... can this be the case or am I imagining things? :confused:
 

Ramsey

Senior Member
May 23, 2008
826
125
63
Gatineau, Quebec
If anyone is interested, I just noticed that Snap Hdr Camera in its last version (6.9) allows to turn off NR as well as sharpness.

Update: I have done some comparisons and turning sharpness off is very useful noisewise, since when it's on it amplifies noise, hence the grainy look.
I find that applying NR and sharpness afterwards in PS Express for instance, gives better less grainy results than applying PSX NR on jpegs with sharpness on.
Problem with Snap Camera on the LG G4 is that it lacks some features that I had on my S5. It only has 2 sharpness settings, 1 or 0. I had 6 on the S5. I had contrast, brightness, and saturation also. Not every phone is fully supported by Snap also, such as in the case of our G4. Can't wait til it is though.

I am not that of a tech guy but I believe the Gallery app does some kind of a straightening up of pics after taking photos.

When I take a pic with Proshot without NR and look at the pic in the Proshot app it looks good, but when I open and look at the same pic in the default gallery app it applies the watercolor or oil painting effect to it... can this be the case or am I imagining things? :confused:
I don't know if it applies oil painting effect but I am sure that it does increase sharpness and I believe LG did that on purpose to deceive us that the picture is better than it is. Unfair. They shouldn't have played with that. I use QuickPic and Piktures to view pictures and they don't have that extra sharpening, neither does my PC.

ProShot is becoming terrible on the G4, it's lagging more and more, and acting very strange. Picture gallery is never stable, the dev hasn't been able to fix it yet, it has gotten worse and is now freezing and crashing, as well as slow. The app is also slower to open now, it's very bad.
Rotation is getting worse as well. I emailed him about many issues and asked him if he could implement a normal orientation rotation lol but he gave me an answer of a lazy man and said it would take an enormous amount of work and he doesn't see it happening now. When you rotate your phone, the app takes its time to rotate based on orientation and it does that same animation that a normal app does when rotating. It's getting worse because you can't even use it in landscape normally as it wants to rotate to portrait in the slightest movement. Too sensitive.
It's surprising that a camera app actually does that these days. I think Snap used to do that 2-3 years ago.
I regret buying the app, I could have just used the denoise in Snap.
 
Last edited:

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
@Ramsey if your on MM here are some modded lib with noise reduction strength reduced

and you were right for some strange reason this
Code:
denoise_weight. Effect: Decrease denoise_weight to remove details and denoise more. Data range: 0-1.
the values were higher on higher iso than low so it removed more details on lower iso weird

just copy them to /system/vendor/lib i modified upto iso 2500 :fingers-crossed:
 

Ramsey

Senior Member
May 23, 2008
826
125
63
Gatineau, Quebec
@Ramsey if your on MM here are some modded lib with noise reduction strength reduced

and you were right for some strange reason this
Code:
denoise_weight. Effect: Decrease denoise_weight to remove details and denoise more. Data range: 0-1.
the values were higher on higher iso than low so it removed more details on lower iso weird

just copy them to /system/vendor/lib i modified upto iso 2500 :fingers-crossed:
Hi, thanks for that! awesome find. I knew it =D
Quality is terrible when noise reduction kicks in below 450 ISO. I was finding the camera horrible actually. My brother's Nexus 6p doesn't even do that.

I don't have MM yet, can I still install your files?

btw I tried FreeDcam again, I like the new UI, just wish in Camera 1 we would get the names of the bottom icons when clicking on them. Had some FCs when viewing pics with external viewer and returning to app, and I wish there was a way to select focus point with continuous picture, right now it's either continuous picture on its own, or we have to put auto to select.
Keep on improving! it's faster now and looks better!
I would suggest darkening the menu to see the options better, it's tough to read.
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
Hi, thanks for that! awesome find. I knew it =D
Quality is terrible when noise reduction kicks in below 450 ISO. I was finding the camera horrible actually. My brother's Nexus 6p doesn't even do that.

I don't have MM yet, can I still install your files?

btw I tried FreeDcam again, I like the new UI, just wish in Camera 1 we would get the names of the bottom icons when clicking on them. Had some FCs when viewing pics with external viewer and returning to app, and I wish there was a way to select focus point with continuous picture, right now it's either continuous picture on its own, or we have to put auto to select.
Keep on improving! it's faster now and looks better!
I would suggest darkening the menu to see the options better, it's tough to read.
dunno if the files are exactly the same but check the zip and upload the exact same files from your rom i will do the same mod.

as for freedcam i dunno if your on version 3.3.130 https://github.com/troop/FreeDcam/releases/download/3.3.130/app-release.apk

yeah i will change the menu color and opacity .

as for the icon names we went with icons as alot of users were not feeling the names but icons aren't that far off to what they do .

from Left to Right
Focus | Exposure Time | EV Brightness | Burst | Color Temp | Contrast | Saturation | Sharpness | Zoom Skin Tone Enhance
e
To Show Manual controls swipe up and down tt

a new item was added to menu
Horizontal Line it works same as on G4 stock cam but adds pitch detection to get image as straight as possible



i will look into continuous picture + TF
 

Ramsey

Senior Member
May 23, 2008
826
125
63
Gatineau, Quebec
dunno if the files are exactly the same but check the zip and upload the exact same files from your rom i will do the same mod.

as for freedcam i dunno if your on version 3.3.130 https://github.com/troop/FreeDcam/releases/download/3.3.130/app-release.apk

yeah i will change the menu color and opacity .

as for the icon names we went with icons as alot of users were not feeling the names but icons aren't that far off to what they do .

from Left to Right e
To Show Manual controls swipe up and down tt

a new item was added to menu
Horizontal Line it works same as on G4 stock cam but adds pitch detection to get image as straight as possible



i will look into continuous picture + TF
Thanks for your answer, it's not worth it to work on the stock ROM I'm using now since I'll be getting MM soon, then I'll try yours.
What I meant for adding names is that the icons remain, but when you click on an icon to change the value, there would be the name displayed somewhere. I had no idea that the gear icon is burst hehe. Thanks for describing them!