yashsingh1/xdaforums huggingface dataset:
[G4 General] defcomg:
Can you upload the stock G4 camera

Download freedcam from playstore goto settings scroll down the tap on save camera parameters in /DCIM/FreeDcam you will find a text file attach that.

About ISO50 it seems iso 50 is really just ISO 100 that tends to use slower shutter speed on my device not a G4 i have enabled ISO 25 all it did was overexpose the image. iso translates to analogue gain so iso 100 translates to a gain of 1.000000 so iso 100 is the base iso anything under it just overexposes and starts to truncate highlights i think they refer to it as extended iso .

test this in manual mode take two images iso 50 and iso 100 then compare the shutter speeds.

a better way would be to check logcat with lib debugging enabled it shows the actaul gain value.

another thing i noticed in libchromatix which contains the cam config iso 100 gain on g4 is set to 2.000000 which translates to iso 50 = 100 | iso 100 = iso 200 | iso 200 = 400.
[G4 General] vegetaleb:
Hello bro!

Nice to see you here :)

I tried for hours to seek about this ''problem'', I tried Lightroom on PC and Paint shop pro, I tried several Jpeg saving settings starting from a RAW DNG photo of cats.

Jpeg from the G4: There are loss of details and slight green color tint on some parts of the cat's fur which is normally brown.

DNG from G4 opened in Lightroom and PSP: Details are pretty high and color reproduction is perfect, no green on the cat's fur.

Jpeg saved at 100% quality from the DNG: Exact same result as coming directly from jpeg on G4!!

I rechecked some photos I took with the M9 of people in swimming suit DNG to jpeg...loss of details and green tint!!

So my conclusion: Jpeg format is to blame whatever is your phone, the compression from a 20 to 40mb to 8mb + the translation of colors is not great.

The only fix limiting the loss of color reproduction I have found when converting from DNG to Jpeg, is to choose WB Auto instead of ''As shot'', it will decrease the green tint thingy on skins and fur
[G4 General] Ramsey:
Try both jpg and .dng from ProShot. Apparently it has better dng than stock.
[G4 General] defcomg:
you can diff the dng's

http://www.sno.phy.queensu.ca/~phil/exiftool/

take one shot with stock one shot with proshot perhaps the proshot dng has noise profiling included in the dng as it coming from camera2. the stock lg cam uses camera1 with lg's own dng implimentaion like htc did with the m9
[G4 General] Ramsey:
When you say upload G4 stock camera, what files are you looking for exactly?

Btw I have to report to you that I tried Freedcam last week and I like that you're improving the design (still needs work imo :P) but it has some bugs with G4 that made it unusable. Are you aware of them?

I kind of forgot what all the bugs were lol, I remember it not focusing at all and not being able to take any pic, but if you want I can re-download and retry.

Thanks for the exiftool. I was looking for one that could integrate with Windows Explorer so that you click a picture and it appears somewhere in Explorer but I doubt that exists. Couldn't find one. I'll settle for the .cmd you gave us. It's still faster than right clicking - properties - details.

Another way is to open picasa (if you have it) and compare the pics there quickly but it's a hassle to open picasa.

Interesting about ISO 50 being ISO 100 but with lower shutter speed. It makes sense if it's extended ISO.
[G4 General] defcomg:
Yeah i installed it on my friends G4 it looked way different than how it appears my device seems like maybe hiding camera 1 paramters so lots of options were missing didn't get a chamce to do camera paramters dump to see what the camera sees thats why i asked you do the whole save paramters thing.

if you know how to use a hex editor you could mess with the chromatix files there you can modify

ae exposure table values

gain

hdr config

Noise Reduction Strength this needs to be mapped for g4 as libs are newer offsets are different . on my device it was easy as the chromatix version i have was the leaked version.

basically all this crap https://github.com/troop/camera/blo...x_imx135/snapshot/chromatix_imx135_snapshot.h

the other lib is libmmcamera_imx234.so here you can change this such as res max fps etc

in theory you can mod 4k to run at 60fps or perhaps 1080p at 120.

edit:

by stock camera i mean the camera app found /system/app/ should be LGcamera or camera.apk sometimes built into gallery incase you can't find neither if you see .odex file attach any apk's found in system/framework
[G4 General] One Twelve:
Hey defcom :)

Had this idea some time back so vincent tested it, see the

results

and

conclusion

.

Not able to show that base ISO is 100 for the G4.

What i'm curious to know is how the G4 manages to get all this detail up to 30s. is the shutter really staying open that long. appears that is.

One thing i've noticed with the G4 is you can get away with ISO 800 images but with earlier devices say from a year back you did not want to push beyond ISO 400 if at all possible.

ISO 800 on the G4 is like ISO 400 on earlier devices in terms of image quality.

How to explain it.

Otherwise an ISO 200 on the G4 would be like ISO 400 on others. meaning you would not want to go over ISO 200 on the G4 otherwise the image would become less usable.
[G4 General] Indicious Flow:
Taken using Proshot.

Taken using LG Stock camera.

Anyways, I've tried taking photos using the G4 and I see dramatic differences when testing out the Stock app and the Proshot App, as you can see from the top.

Both images are taken with ISO 100, Shutter speed of 1/2s, edited using Lightroom to the same color temperatures and such.

For Proshot, Noise reduction and OIS is enabled.

The stock G4 cam produces a lot of noise and also have the "green tint" around the picture whereas the Proshot takes cleaner pictures.

What are your thoughts on it?
[G4 General] vegetaleb:
Green tint around the photo is the result of vignetting, you should use cornerfix with the g4 profile to fix it. The green tint on skins and brown fur is different, it's a bad color conversion from dng to jpeg
[G4 General] defcomg:
the sensor does indeed expose for 30sec

here is how the calculation is done

http://wiki.oroboros.at/index.php/Integration_time

http://www.gwinst.com/reference/at/integration.html

it's set with intergration time value

i don't have the G4 libmmcamera_imx234.so to check but on the M9 and my device intergration time is directly set overiding default qualcomm implimentation if you decomplie libmmcamera_t4ka7.so from m9 on IDA you can actually see the intergration formula in code.

in the case on my device im able to reach 31 seconds through this implimentation zte did however the actual sensor "IMX135" only supports upto 2 seconds when using default exposure-time method this would be what would be returned if camera2 api was used.

However by directly setting intergration time the sensor limitation is bypassed.

Case of IMX214 on one plus it can reach 60 second however on the Z7 exposure time can go upto 20min. On the xiaomi mi4 it maxes out at 20sec.

libchromatix_imx234 containts the fine intergration time in the exposure tables messing with you can change how expo time behaves [MENTION=5128617]troopii[/MENTION] was able to get 1 sec exposure on the G3.

depending on how LG implimeted it on G4 it probably possible that you can bypass 30sec limit on G4.

---------- Post added at 06:11 PM ---------- Previous post was at 05:58 PM ----------

you can try rawtherapee and create a flat field image it will correct the lens vignette for stock cam dng also rawtherapee seems to extract more details from g4 test dng the wavelet tool is crazy good.
[G4 General] Ramsey:
Attached is a link to the .rar file containing LGCamera but note that I only found it in system/priv-app. Couldn't attach it to xda as it's over 8mb.

https://app.box.com/s/fihf730vu4e1dc55tbh0szw13oscxrcu

Also attached here are the parameters from FreeDCam.
[G4 General] defcomg:
unable to deodex need /system/framework
[G4 General] Ramsey:
What exactly should I search for there?
[G4 General] defcomg:
need the entire folder
[G4 General] sdfsdfsfs:
at iso 500 there is a lot of chroma noise which makes the photo almost unusable.

In low light shots and in manual mode, i wouldn't recommend anything above iso 300
[G4 General] xdabbeb:
I haven't looked into the G4 binaries yet, but if they're just doing that as means to "fake" a lower iso that's disappointing. We don't really know for certain what the native ISO of this sensor package is, however. Sony tends to be 100, but there do exist native 50 (though not that I've ever heard of in a smartphone). If it's 100, then 50 is a pull with the corresponding lack of bit depth/range. All of the ISO's above a certain level are digital anyway.

I don't believe the stock G4 camera app can just be cam1 as you said since it's capable of simultaneous jpg/raw...something cam1 can't do. I haven't pulled it apart yet much, but here's a full copy for you to look at. Also, I don't know if Ingo passed along my thanks for finding the qcom leak...some great stuff in there.
[G4 General] Ramsey:
I tried Snap Camera using camera 2 api on the HTC One M9 and it didn't support it. When I tried it on my G4, it fully supported changing shutter speed, iso, etc. So I believe the G4 makes use of camera 2 api. I'm not sure if that's what you mean by cam1 :P.
[G4 General] Ramsey:
Not for me. Looks great in my opinion for a phone.

I took some shots in auto and the ISO was around 2100 and the shot was still clearer than previous phones that I've had.
[G4 General] Ramsey:
Here's the entire system/framework folder:

https://app.box.com/s/o9zt4lkcd15emvwdjuus5amgnjwsagyk
[G4 General] defcomg:
The Hal part of the Camera has two versions or api

HAL 1/2 is what is refered to as camera1 or the camera api prior to the introduction of camera 2 api

HAL 3 is what is refered to as camera 2 in context of QCOM devices.

The M9 is a HAL 3 device therefore should be a full Camera 2 device however the HAL 3 part of the libs was not activated. So its a camera 1 device or camera 2 legacy device . There is a param that you can add to build.pop to force M9 to activate that HAL 3 part and starbase64 from m9 forums tested it and ran the manual camera compatabilty app and showed green ticks.

No on the G4 both api's are active LG uses their own implimenation for manual controls into camera 1 to use in their own camera app think the reason for this is so that the camera app could only be used on LG Device. The Manual Focus implimenation in hal is identical to the G2 so if you were to get app on G2 lolipop MF should work. Then Camera 2 Api is for other apps.

Thats why dng's shot with G4 Camera are smaller than ones shot with camera 2 api, Camera 1 implementation for dng is similar to the one plus where dng's are still in 10 bit instead of being stored in a 16bit word resulting in unnecessary big size.

---------- Post added at 10:03 PM ---------- Previous post was at 09:45 PM ----------

basically add this to the M9's build.prop

persist.camera.HAL3.enabled=1

and reboot

and here is how it looks in code

/*===========================================================================
* FUNCTION : cameraDeviceOpen
*
* DESCRIPTION: open a camera device with its ID
*
* PARAMETERS :
* @camera_id : camera ID
* @hw_device : ptr to struct storing camera hardware device info
*
* RETURN : int32_t type of status
* NO_ERROR -- success
* none-zero failure code
*==========================================================================*/
int QCamera2Factory::cameraDeviceOpen(int camera_id,
struct hw_device_t **hw_device)
{
int rc = NO_ERROR;
if (camera_id < 0 || camera_id >= mNumOfCameras)
return -ENODEV;

if ( NULL == mHalDescriptors ) {
ALOGE("%s : Hal descriptor table is not initialized!", __func__);
return NO_INIT;
}

if ( mHalDescriptors[camera_id].device_version == CAMERA_DEVICE_API_VERSION_3_0 ) {
QCamera3HardwareInterface *hw = new QCamera3HardwareInterface(mHalDescriptors[camera_id].cameraId,
mCallbacks);
if (!hw) {
ALOGE("Allocation of hardware interface failed");
return NO_MEMORY;
}
rc = hw->openCamera(hw_device);
if (rc != 0) {
delete hw;
}
} else if (mHalDescriptors[camera_id].device_version == CAMERA_DEVICE_API_VERSION_1_0) {
QCamera2HardwareInterface *hw = new QCamera2HardwareInterface(camera_id);
if (!hw) {
ALOGE("Allocation of hardware interface failed");
return NO_MEMORY;
}
rc = hw->openCamera(hw_device);
if (rc != NO_ERROR) {
delete hw;
}
} else {
ALOGE("%s: Device version for camera id %d invalid %d",
__func__,
camera_id,
mHalDescriptors[camera_id].device_version);
return BAD_VALUE;
}

return rc;
}

Source:http://d.shantur.com/aosp/device/moto/shamu/camera/QCamera2/QCamera2Factory.cpp

Any QCOM device that contains QCamera3 classes in export when opened in IDA should have camera2 functionality in theory:silly:
[G4 General] xdabbeb:
Coolio...glad he did :) That makes sense re:rawpicturecallback. Too bad they didn't go full in, but I suspect you're right as to the reasoning. If I start pulling it apart anytime soon and find something interesting I'll let you know. I know they changed quite a few keys at least from G2/G3.
[G4 General] defcomg:
still using g2 /g3 being trying to pull 240fps from device but HAL 2 HFR Video max is 5X which is 150fps i have that set but with my device it will not pull anything past 125fps at 1296*768.

i think with a device like G4 with 808 it should be easy to blast past 120fps
[G4 General] xdabbeb:
Yeah, I had tried once as well and found the same. I don't think the sd800/801 ISPs have much spare bandwidth for the upper reaches. I think we'd also need to modify the equivalent video tables in order for it to even consider the higher rate given the lux, no?

I hope you're right re:808. On paper it seems like it should be possible.
[G4 General] vegetaleb:
Call me crazy but all the green tint I had on skins and fur were because...of Windows 10 Photo Viewer!!!!

This stup*d viewer is killing jpegs!! Using other softwares and I have no problem anymore, it's like this windows app is heavily compressing the photos and turning them to 256 colors instead of 16 millions
[G4 General] Ramsey:
Just want to make sure that you got the link for the system framework that I posted a few posts back?

Also, I sold the M9 so I only have the G4 now.
[G4 General] defcomg:
Not sure if it works but you can bin the video at high fps on imx135 / 214

1052*780 you can have 4x4 bin

think on g3 lib and one plus thats the default so you dont need to worry about overly dark video

im sure G4 can pull 30fps at full res 5312 x 2988 while keeping contraints it can pull 240fps at this res 664 * 373 with a bin of 8x8 but perhaps with some tweaking at this res 960 * 540

---------- Post added at 11:52 PM ---------- Previous post was at 11:51 PM ----------

yeah i got it
[G4 General] xdabbeb:
That sounds right....I forgot to mention though, I don't have the G4 either. Just curious about it :)

Got your PM. Will take this there.
[G4 General] One Twelve:
We could not show that native ISO on the G4 is 100. It looks like 50. See

here

.

Outputting raw does not mean cam2, The one+ could do raw with kk since Oct last year.

I have to date seen nothing to show that any camera other than nexus 5/6 is

fully

camera 2 api compliant. That fully part matters, there can be limited support.

See Francois

post

here about the S6. He was silent when asked about the G4 in the comments. manual camera test crashes on the G4, all that test does is tell you whether the camera is fully 'manual camera' compliant or not :)

Bingo!

This is why i suspect we won't be seeing full camera2 api compliance from anybody else but nexus for some time. They want to maintain control. camera 2 api isn't mandatory anyway, just optional. it does mean that any more features that come about due to camera 2 api won't be possible. They have to keep us coming back for new stuff i suppose.

---------- Post added at 03:55 PM ---------- Previous post was at 03:27 PM ----------

Indeed, from

here

medium resolution to reduce noise further. This was a tip for the M9.

---------- Post added at 04:31 PM ---------- Previous post was at 03:55 PM ----------

Curious this is happening in the pc version of windows 10.

The mobile windows 8 viewer had that compress bug in its

preview

.
[G4 General] Ramsey:
When I got Windows 10 I tried out the Photo app but right away went back to Picasa. I just use Picasa for all pics and Photoshop/Camera Raw and Lightroom for raw.
[G4 General] sdfsdfsfs:
In auto mode LG uses some very unique algorithms....that's why you don't see any noise even at iso 2000.Details are preserved aw well.

Manual mode is a different story.ISO values between 300 -1600 are useless because there is a lot of chroma noise in pics.

You can clarify this if you use any other third-party camera app. Chroma noise ia apparent as well.
[G4 General] xdabbeb:
I know. I make a camera for G2/G3 (both cam 1 devices) that outputs raw. That wasn't what I stated anyway. My questioning was of the simultaneous capture, which defcomg and I have since discussed.

The LG GFlex2 supposedly does, actually.
[G4 General] Ramsey:
That's true. Manual mode has lots of noise, I believe done on purpose by LG. What surprises me is the long shot to shot time in manual mode, it freezes for around a second after snapping a pic. It makes you think it's processing an awesome image but then you see an image that's either the same as auto or full of noise and tearing.

And in auto mode, it takes time to take another picture when it automatically activates night mode. Once it's processing an image, it won't let us take another shot. Why can't it process the pic in the background and let us take lots of pics? It makes the camera really slow to use.
[G4 General] Ramsey:
Slow shooting when opening camera app.

Another issue I have with the G4 is when you open the app, it wants to fully focus before allowing you to snap a pic. Now get this,

sometimes

if you press the shutter button while it's focusing, it won't take the pic but it will in fact finish focusing first, then refocus a second time and then snap the pic. I think that means that it didn't acquire focus even though it seems like it did. In day light that means a 1.5 second wait, in low light around 5 seconds. Terrible and very frustrating. Now here is where it gets worse, if you are moving a bit, it won't take the pic because of some silly anti-shake stabilizer. It's not the OIS as I tried ProShot (and disabling OIS) and it does the same.

I'm trying to test if manually selecting a focus point after opening the camera will make it faster.

Happens with other third party camera apps too.
[G4 General] sdfsdfsfs:
When night mode is activated it takes multiple pics and combines them to reduce noise.

that's why you don't see any info in exif data.
[G4 General] t68kv:
This is one of bad things G4 portrays as compare to G3. G3 focus much faster than G4
[G4 General] One Twelve:
It uses the same sensor as in the G2/G3 that is also used in the nexus 5.

You are saying that the camera libs in the gf2 are fully cam 2 compliant ? How to verify it.

---------- Post added at 10:41 PM ---------- Previous post was at 10:40 PM ----------

I don't see too much chroma noise in the OP's ISO 500 shot. More luminance noise. And this can appear in the shadows even at lower ISO's. Soft touch to NR indeed.

Maybe it appears at higher than ISO 800 or with flash. Dxo

says
[G4 General] defcomg:
The G4 is fully complaint if you open freedcam and switch to camera2 it displays camera 2 status you can use it to verify.

I tested it on my friends G4 it showed it as a Full Device i flashed CM12.1 on my device its showed my device as a camera2 legacy device

---------- Post added at 07:58 PM ---------- Previous post was at 07:34 PM ----------

check this http://scribble-jpc.blogspot.co.za/2013/03/shoot-at-iso21000-print-at-30-by-45.html you can use imageJ to look at snr maybe this will work better to compare iso 100 200
[G4 General] blake_spector:
Just as a side note, I'm following this thread with huge interest and it's really awesome too see what you guys find out! Please keep going, I can't wait for whatever might be accomplished here.... 240fps slo-mo? Even more control over the camera? Who knows.

You guys, are awesome! Thanks a lot! :)
[G4 General] One Twelve:
yes and manual camera does the same with other devices that have shutter and raw capture. There is more to camera2 api than this isn't there.

http://spectrastudy.com/camera2-api-on-mwc-2015-devices/

so what did you mean when you said its using legacy api. compatibility with older apps.
[G4 General] defcomg:
Yes camera2 has a whole lot off stuff it can do however it seems that all the camera 2 app do is manual focus , manual shutter, manual iso and raw.

[MENTION=5128617]troopii[/MENTION] added manual color temperature to freedcam as opposed to using the usual cloudy sun tungsten awb params it was not simple to add afaik i dont know of another cam2 api using this.

here are the cam 2 option / params

https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html

by legacy i meant my device did not utilize camera2 in 5.1.1 so when using camera2 api it showed legacy as opposed to g4 which showed full.

anyway attached modded LgCamera apk iv'e attached the denoise-off param to the lge-camera param so it should activate when using any param in manual mode such as iso,shutter etc .

i do not expect it to fc but incase it does logcat the crash
[G4 General] shurensly95:
[MENTION=5512893]One Twelve[/MENTION] heey mate its funny i came to xdato see if people had NR issues and indeed i got the same problem been testing the camera alot i remember someone msging me saying i should always use iso 50 buy now that i look at the pics it is so noisy :s i tried proshot but i prefer stock cam.
[G4 General] sdfsdfsfs:
how to install this? as update?
[G4 General] Ramsey:
I backed up the LGCameraApp folder from system/prive-app and then copied the apk there. I didn't reboot. First time I ran it it fc'ed but second time it worked fine.

Awesome! no more noise reduction, and now results are really good in manual mode!

However, it also removed noise reduction in auto mode. Can you somehow make it keep default NR in auto mode as that one works pretty good (not always though).
[G4 General] Ramsey:
Read my previous post :)! it works!
[G4 General] defcomg:
good question try install as normal apk

if it fails copy to system/app/

then rename the one in system/priv-app add .bak extension to it and reboot

edit NVM

---------- Post added at 11:23 PM ---------- Previous post was at 11:17 PM ----------

hmm i can possibly attach it to shutter control or manual focus

can you take screenshots of the entire menu maybe i can modify the menu and an option to turn it off and on. what im looking for is an option that has two values so i can duplicate and change its behaviour
[G4 General] Ramsey:
That would be awesome!

Attached.
[G4 General] defcomg:
thanks will see what i can do

also give these libs a try i set iso 100 gain from 2.000000 to 1.000000

/system/vendor/lib/

just rename the original ones
[G4 General] defcomg:
Could you test something

i hardcoded some hidden params into the apk wanna see if they work

Open freedcam

Settings > Video HDR / Video HFR

in hdr you should see on or off

in HFR off 60 90 120
[G4 General] One Twelve:
See your pics i linked here and tell me where the NR at ISO 50 is ?

Also can you see where beauty face being applied.
[G4 General] troopii:
Camera2 Devices:

FULL

This camera device is capable of supporting advanced imaging applications. (support all features from camera2)

LEGACY

This camera device is running in backward compatibility mode.(supports only basic camera2 stuff, like jpeg capture and normale video recording, no manual and no raw, no isp renderscript)

LIMITED

This camera device has only limited capabilities. (supports parts of the camera2 api, can have manual and raw)

what ive noticed on g4 that jpegs with stock camera have a strange aquarel effect like its painted when zooming in. that is gone with raw capture. turning off denoise in freedcam fix it too.