Author Topic: Camera  (Read 55454 times)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Camera
« Reply #120 on: October 29, 2020, 12:44:58 pm »
I'm checking now why no thumbnail has been generated for your uploaded image, it should do that for any type of image.

EDIT: it seems like webp images are not automatically resized when they are uploaded as inline attachments, while other filetypes work as expected. I have taken the liberty of converting your attached image to png and of re-attaching it to your post. I'll ask the author of the inline attachments mod to add support for webp images as well.

Varti
« Last Edit: October 29, 2020, 01:15:29 pm by Varti »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Daniel W

  • Sr. Member
  • ****
  • Posts: 372
    • View Profile
Re: Camera
« Reply #121 on: October 29, 2020, 01:39:35 pm »
Wow... that was quick. Thank you for the assistance. Since the new forum doesn't upload attached images until the message is actually posted, I wasn't sure if webp would work at all, so I decided to test with an image that wasn't all that important. I'll keep using jpg and png for now, but webp support would be nice to have, as it tends to produce smaller files at equivalent quality, compared to the other two.

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Camera
« Reply #122 on: October 29, 2020, 06:51:40 pm »
It's just the visual feedback of that tap that gets drawn in a rotated fashion...
Ah, now I understand.  Being the extreme minimalist that I am, I had disabled all animations in the developer options menu, so I never even saw any circular tap animation.  This might be the first time that I actually see a use for "eye candy" in a GUI.  Of course, it needs to be rendered properly to be useful.  I will poke around to see if I can fix it, along with the other list of issues.

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Camera
« Reply #123 on: October 29, 2020, 07:07:24 pm »
It's just the visual feedback of that tap that gets drawn in a rotated fashion...
I will poke around to see if I can fix it, along with the other list of issues.
... and it's fixed!  I wish all the fixes were that fast.  Unless anyone is in a hurry, I'll just wait until I have some other fixes (working on HDR+ issue) before releasing.

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Camera
« Reply #124 on: December 02, 2020, 12:22:16 am »
It's now been over a month since my last release.  I haven't been able to fix the HDR+ capture issue (capture may fail without a tap-to-focus), nor have I been able to fix the slow still image preview frame rate.  This will probably be my last release.  I'm getting tired of working on GCam (or just getting old and tired from working on GCam...)

Download Version 3 of GCam for the Cosmo here:
https://www.dropbox.com/s/t36cufk1se59uri/gcam_for_cosmo_v3.apk?dl=1

Version 3 just has two small fixes:
1. Tap-to-focus animator circle now appears where tapped instead of being rotated 90 degrees CCW.
2. Minor increase in captured image sizes (RAW is now 2816x2108 from 2800x2092, JPEG is now 2832x2124 from 2816x2108).  I don't know why the RAW is slightly smaller than the JPEG, but I am capturing at the sensor's reported active array size of 2832x2128.

Sorry to disappoint.

For those interested in the underlying details, I have spent countless hours debugging this thing, and I actually did speed up the preview considerably by changing the sensor output stream format from RAW to YUV_420_888, but that resulted in GCam being unable to capture images.  It really needs a RAW stream, which is just too much data for the Cosmo hardware to send at a high rate.  I ported an older version of GCam (6.1 for the Pixel 3) which had a high preview frame rate and verified that it was indeed using a YUV stream, but the images it saves are noticeably inferior to the current version and are closer to those produced by the stock camera app.  It also fails to save RAW images.  Regarding HDR+ capture failure, I traced that down to an odd state in the autofocus system that, as far as I can tell from the Camera2 API documentation, should not happen.  This odd state is entered when the user taps the screen to lock focus while in HDR+ mode, then quickly moves or pans the scene which triggers a reset of the autofocus mode (from AUTO to CONTINUOUS_PICTURE), but the focus state does not reset to passive scan/lock.  I don't see this behavior in OpenCamera, the stock camera app, or in the older version of GCam I ported, but none of those produces images as crisp and chromatically accurate as the current version.  The workaround is to either restart GCam or simply tap to focus again.  If the screen has never been tapped to focus, HDR+ appears to work without issue.

Zarhan

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
Re: Camera
« Reply #125 on: December 02, 2020, 06:57:31 am »
Very much appreciated!

sup

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Camera
« Reply #126 on: December 02, 2020, 01:08:32 pm »
Thank you Shuntcap. By the way, and I of courrse have zeo expectations, have you ordered Astro? I am afraid it would need something similar because I have vey low expectations from Planet Computers when it comes to photography.

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Camera
« Reply #127 on: December 02, 2020, 08:18:38 pm »
Thank you Shuntcap. By the way, and I of courrse have zeo expectations, have you ordered Astro? I am afraid it would need something similar because I have vey low expectations from Planet Computers when it comes to photography.
No, I have not backed the Astro and I do not plan to.  I did back the Pro1 X, though.  As a programmer, I prefer a keyboard with a lot more keys than what Planet offers, even if I won't be able to touch type on it.  I also prefer an organization that is more transparent with its backers.  Plus, the camera in the  Pro1 X is a known entity, the IMX363, the same camera sensor used in the Pixel 3, 4, and 5.

You may be right about the Astro's camera.  Given how bad the Gemini's rear camera was, and how badly MTK butchered the Cosmo's rear camera, and given that Astro's front camera is likely still the same low quality 5MP camera that the Gemini and Cosmo have (based on Astro's specs), we backers and consumers have every reason to anticipate the worst for the Astro's camera.  It's simply Planet's track record.  If they can break that, great.
« Last Edit: December 02, 2020, 08:24:56 pm by shuntcap »

sup

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Camera
« Reply #128 on: December 03, 2020, 04:34:17 am »
That is an interesting phone, thank you! I am thinking about reselling the Astro as soon as it arrives - especially if the camera is bad again. I am also disappointed with PC support, I thought it would get better but it seems to have gotten worse...

Daniel W

  • Sr. Member
  • ****
  • Posts: 372
    • View Profile
Re: Camera
« Reply #129 on: December 03, 2020, 12:41:40 pm »
Small or not, those fixes were still very welcome, so thank you again. If the desired picture quality dictates RAW streaming for the viewfinder and that, in turn, gives a low-ish frame rate, then so be it. It really just means I will still need to keep, say, OpenCamera, installed as well, so I can swap back and forth depending on my subject, a bit like one might need to swap lenses on other cameras.

To me, it's more important that you looked into the viewfinder stream than whether you could actually do much about it or not, and the same goes for the peculiarities of the HDR+ mode. Now, we all know these are limitations not easily worked around, and, thus, things we probably will have to learn to live with. Still, thanks to your effort, we are now in a much better position than when we were stuck with just the really cheap kit lens... um... default camera software stack, that is.

A tad off topic, while I think the F(x)tec Pro1 X certainly seems interesting, even offering a Scandinavian keyboard layout, for us so inclined, from measuring available images, its horizontal key pitch seems to be about 9.7mm, which reminds me a bit too much about another Fx, my old Casio FX-850P, on which I typed quite a lot back in the days (I even wrote a ~100 location text adventure on it, now since long lost to battery failure and lack of secondary storage...) and while I think its 10.2mm pitch keyboard performed remarkably well for its size, I had my fill of "how small can you go" around the time of my SonyEricsson P990 (with a horizontal pitch of around 5mm, the tininess of which I thought was super cool back then...) so, personally, I am going to take my chances with the Astro, especially as the "RockUp" slider, should it actually work well (here's to hoping), would enable the first "as-wide-and-tall-as-the-device" physical keyboard on a slider phone, which, at least in theory, would seem, to me, like the ultimate form factor for a smartphone with a physical keyboard, since it maximizes the keyboard size, without interfering with portrait mode usage and doesn't require hacks like a secondary something (which, to me, typically is a hallmark of sub optimal design) to work well... oh, well, we'll see.

Somewhat back on topic, could Planet just get the 48-mega-photosite Astro sensor to actually output unresampled 12MP images, I think we'd be off to a decent start. Time will tell.

As a closing remark, should Cosmo GCam v3 turn out to be the final version, that's probably what I'll be using for >90% of my digital photos, for as long as I keep using the Cosmo. As that realistically means I'm going to, on average, use GCam at least once a day, that means it, and thus you, shuntcap, will likely, until Planet manages to ship the Astro, make my life a little bit better, on a daily basis. For that I am grateful.

sup

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Camera
« Reply #130 on: December 03, 2020, 03:49:39 pm »
Indeed, now my pictures from my holidays are presentable again. I use it exclusively. I am really grateful for the work you have done, Shuntcap.

Do we know if anybody from Planet reads this? Is there a way to let them know about this? I am not even sure they are aware of the issue and that it is solvable.


Vistaus

  • Full Member
  • ***
  • Posts: 139
    • View Profile
Re: Camera
« Reply #131 on: December 03, 2020, 04:43:01 pm »
Thank you Shuntcap. By the way, and I of courrse have zeo expectations, have you ordered Astro? I am afraid it would need something similar because I have vey low expectations from Planet Computers when it comes to photography.
No, I have not backed the Astro and I do not plan to.  I did back the Pro1 X, though.  As a programmer, I prefer a keyboard with a lot more keys than what Planet offers, even if I won't be able to touch type on it.  I also prefer an organization that is more transparent with its backers.  Plus, the camera in the  Pro1 X is a known entity, the IMX363, the same camera sensor used in the Pixel 3, 4, and 5.

You may be right about the Astro's camera.  Given how bad the Gemini's rear camera was, and how badly MTK butchered the Cosmo's rear camera, and given that Astro's front camera is likely still the same low quality 5MP camera that the Gemini and Cosmo have (based on Astro's specs), we backers and consumers have every reason to anticipate the worst for the Astro's camera.  It's simply Planet's track record.  If they can break that, great.

I haven't backed the Astro either and maybe I could live with the Pro 1 X keyboard, but I'm a Dvorak guy and Fxtec doesn't offer a Dvorak version, sadly...

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Camera
« Reply #132 on: December 31, 2020, 08:50:37 pm »
Merry Christmas and Happy New Year!  GCam for the Cosmo v4 is here!

Download v4 here:
https://www.dropbox.com/s/oj7p3a0qbauylbl/gcam_for_cosmo_v4.apk?dl=1

New for v4, which has been ported fresh from scratch using stock Google Camera 7.2.018:
1. The option to disable HDR+ now works.  Note that this saves interpolated 24MP photos.  The stream from the sensor in this mode is YUV_420_888, not RAW, and RAW file saving is disabled in this case.  There is no difference in detail between Samsung's marketing-driven interpolated 24MP photos and 6MP photos taken in "HDR+ on" mode.  Don't blame me, the YUV stream is 24MP and GCam is just saving it as such.  I didn't see a convenient way in the code to resize it but I might look at this again in the future.
2. Video stabilization has been added.  This is electronic, not optical, so there is a crop (in addition to the crop already incurred by video mode).
3. Night Sight now works, though it is only marginally better than Enhanced HDR+ in low light due to excessive noise.
4. Viewfinder resolution has increased from 640x480 to 1920x1080 (but is neither faster nor slower than before).  More scene detail is visible in the preview now.
5. Slow Motion has been removed.  It will never work on the Cosmo, which can only output 30 FPS maximum.  Slow motion requires 60+ FPS.
6. Panorama has been fixed.  It uses MTK video libraries with smearing and washed-out colors, so don't expect too much from it.
7. Microvideo now works (Motion).  The files are saved as MVIMG_YYYYMMDD_HHMMSS.jpg, but they contain an MP4 video concatenated onto the end of the JPEG data.  Tap "ALL PHOTOS" in the photo viewer to switch to Google Photos where the microvideo will play.  There is a bug that garbles the timeline color on the Cosmo on microvideo files captured in "HDR+ on" mode (but not in "HDR+ off" mode for some reason).  However, the microvideo plays correctly, and on non-Cosmo devices, the timeline displays properly in Google Photos.  To extract the microvideo from the image in Google Photos, scroll down a bit, tap Export, Export as Video, Export.
8. Removed Time Lapse since after extensive debugging it does not appear likely to work on the Cosmo.
9. The tap-to-focus bug in Enhanced HDR+ mode is actually an overexposure issue with the Cosmo sensor.  Tapping to focus changed the exposure, but the sensor was tuned for the Pixel's sensor, not the Cosmo's, and the code invalidated the shot due to perceived overexposure.  This bug still exists as it's very hard to isolate, but I have greatly improved the success rate for enhanced HDR+ shots.  Previously many would fail before even tapping to focus.  This is now fixed with some tweaks to the rear sensor exposure.  This should alleviate the temptation to tap to focus after a shot failure, which enters the buggy state.  Keep in mind that enhanced HDR+ is best in dimmer lighting.  Aim it at the sun and you'll get a white picture.
10. Lens Blur has been added.  This takes a 2560x1920 photo and allows you to change the focus point and the amount of background blur.

I want to thank san1ty, the developer of F1MinimalMod, for creating his GCam mod.  Although v4 is an entirely new port and no longer based on F1MinimalMod, we wouldn't even have GCam for the Cosmo if I hadn't discovered that his port somewhat worked on the Cosmo.  His work was also instrumental in helping me get past three problems in my new v4 mod.

spa

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • ssipa's Tips & Freeware for Full Key Board Device
Re: Camera
« Reply #133 on: December 31, 2020, 09:16:20 pm »
Very thanks, and happy new year.

drpeter

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • http://
Re: Camera
« Reply #134 on: December 31, 2020, 10:38:34 pm »
Shuntcap,  Many thanks and a very prosperous New Year to you.  The work you have done on this to produce quality camera function on the Cosmo is fantastic.