Author Topic: Rear camera module image quality very poor  (Read 3310 times)

mitchelln

  • Newbie
  • *
  • Posts: 17
    • View Profile
Rear camera module image quality very poor
« on: June 22, 2018, 05:30:48 am »
I received my camera module today and carefully installed it. The image quality is simply appalling. The images are washed out, over exposed and lack sharpness. My children's VTECH toy camera produces better images than it does. Veryt disappointed. I've attached a sample.

The front camera produces nice sharp, colourful images, so I can only assume the rear module is different or the software isn't right somehow.

Are other people experiencing the same thing?

Ifanafi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Rear camera module image quality very poor
« Reply #1 on: June 25, 2018, 12:50:07 pm »
Yes (I, too, bought the camera add-on when it was first specked at 10mp) but speaking frankly, I don't really care about picture quality on a phone device. Never have.

I have two digital cameras for picture taking when h-d quality pics matter.

Pictures taken on most cell phones are sufficient / best for social media IMHO.

Onward to Gemini 2.0 when PC will hopefully offer a serious, quality camera add-on.

Ifanafi

Quote from: mitchelln
I received my camera module today and carefully installed it. The image quality is simply appalling. The images are washed out, over exposed and lack sharpness. My children's VTECH toy camera produces better images than it does. Veryt disappointed. I've attached a sample.

The front camera produces nice sharp, colourful images, so I can only assume the rear module is different or the software isn't right somehow.

Are other people experiencing the same thing?

rubus-3.142

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Rear camera module image quality very poor
« Reply #2 on: June 26, 2018, 04:27:19 pm »
IMHO  all phone camera's are not a substitute for a real camera - too many pixels in too small a space with no room for decent optics.

I use a small 9 year old  cannon compact with a WiFi CF card to get the pics off to the Gemini.  The quality is somewhat better than Ifanafi  is showing.

However you may find the rear camera results better if you use one of the other camera apps - this requires the Gemini to support the Camera API - can someone who has the camera try installing this:
https://play.google.com/store/apps/details?...evice.inspector

And paste the results back,  

if it has API  try Open Camera
https://play.google.com/store/apps/details?...orge.opencamera

Or one of the many other camera apps available

mitchelln

  • Newbie
  • *
  • Posts: 17
    • View Profile
Rear camera module image quality very poor
« Reply #3 on: June 26, 2018, 04:49:31 pm »
I don't expect standalone camera quality. But I do expect better than Fisher Price toy quality.

The front camera quality is pretty good. I'd expect the rear camera to be as least as good. I suspect it's the same module, so what gives?
« Last Edit: July 02, 2018, 05:35:06 am by Varti »

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Rear camera module image quality very poor
« Reply #4 on: July 02, 2018, 03:41:58 am »
Quote from: mitchelln
I don't expect standalone camera quality. But I do expect better than Fisher Price toy quality.

The front camera quality is pretty good. I'd expect the rear camera to be as least as good. I suspect it's the same module, so what gives?

The rear camera module is an SP5509 sensor from SuperPix in China.  This is an auto-focusing module.  The image quality is remarkably poor, lacking any real pixel detail and smudging everything together.  There are hazy color artifacts on the edges of sharp intensity differences, suggesting either a poor demosaicing algorithm or just that the sensor is too small to pick up much detail.  Just for fun, I modified the kernel to disable the MediaTek hardware JPEG codec which forced Android to use its own software routines to encode the image data in JPEG format.  The images showed no improvement whatsoever which puts the blame on the image sensor (or the driver, but I doubt it and the code isn't commented anyway).  I have a Samsung J3 with a 5MP rear camera which takes much clearer photos, but the sensor lens appears to be slightly larger.

If it helps any, the only way I could get the rear camera to focus in low light conditions was to force the ISO to 400 or less.

If my eyes aren't fooling me, the live preview image is clearer than the saved image!  And using OpenCamera does not improve the image.  However, the image quality is still superior to having no rear camera at all.

Here is the sales pitch for the SP5509: http://www.superpix.com.cn/en/xiazai/SP5509.pdf

I believe the front camera is an S5K5E2YA.  It is fixed-focus.

Neophy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Rear camera module image quality very poor
« Reply #5 on: July 02, 2018, 05:24:46 am »
Quote from: shuntcap
Just for fun, I modified the kernel to disable the MediaTek hardware JPEG codec which forced Android to use its own software routines to encode the image data in JPEG format.

Could you please tell us how to build and install the Android kernel?

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Rear camera module image quality very poor
« Reply #6 on: July 03, 2018, 06:02:43 pm »
Photo taken with Sailfish camera at 4:3 (2560x1920). It isn't quite as bad as the android camera I believe.

 [ Invalid Attachment ]

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Rear camera module image quality very poor
« Reply #7 on: July 04, 2018, 03:06:04 am »
Quote from: Neophy
Quote from: shuntcap
Just for fun, I modified the kernel to disable the MediaTek hardware JPEG codec which forced Android to use its own software routines to encode the image data in JPEG format.

Could you please tell us how to build and install the Android kernel?

Have you built and installed a Linux kernel before?  There are instructions for building and installing a kernel suitable for Debian here: https://github.com/gemian/gemini-keyboard-a...rnelCompilation.  Building for Android is slightly different, requiring the aeon6797_6m_n_defconfig config file instead, plus some extra Android-specific parameters sent to mkbootimg.  The keyboard mapping under my test kernel is not entirely correct (ESC is neither ESC nor Power, for example).  Planet Computers did not compile in support for /proc/configs.gz in their stock Android kernel so I don't know what's missing (yet).  But I don't want to get to too far off topic in this camera thread.

The SP5509 camera module's driver is in drivers/misc/mediatek/imgsensor/src/mt6797/sp5509_main_mipi_raw/sp5509mainmipiraw_Sensor.c, for anyone interested.

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Rear camera module image quality very poor
« Reply #8 on: July 04, 2018, 03:12:05 am »
Quote from: vader
Photo taken with Sailfish camera at 4:3 (2560x1920). It isn't quite as bad as the android camera I believe.

 [ Invalid Attachment ]

Macro images and images of close objects are not too bad, unless you're under low light conditions where it refuses to focus at any ISO over 400 (for me at least).  But anything else, particularly scenery, is stunningly bad.

Neophy

  • Newbie
  • *
  • Posts: 18
    • View Profile
Rear camera module image quality very poor
« Reply #9 on: July 04, 2018, 05:13:03 am »
Quote from: shuntcap
Have you built and installed a Linux kernel before?  There are instructions for building and installing a kernel suitable for Debian here: https://github.com/gemian/gemini-keyboard-a...rnelCompilation.  Building for Android is slightly different, requiring the aeon6797_6m_n_defconfig config file instead, plus some extra Android-specific parameters sent to mkbootimg.  The keyboard mapping under my test kernel is not entirely correct (ESC is neither ESC nor Power, for example).  Planet Computers did not compile in support for /proc/configs.gz in their stock Android kernel so I don't know what's missing (yet).  But I don't want to get to too far off topic in this camera thread.

Linux kernel: yes, I even contributed code. But how to put the kernel onto an Android device is a mistery to me.

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Rear camera module image quality very poor
« Reply #10 on: July 06, 2018, 01:11:43 am »
Quote from: Neophy
Quote from: shuntcap
Have you built and installed a Linux kernel before?  There are instructions for building and installing a kernel suitable for Debian here: https://github.com/gemian/gemini-keyboard-a...rnelCompilation.  Building for Android is slightly different, requiring the aeon6797_6m_n_defconfig config file instead, plus some extra Android-specific parameters sent to mkbootimg.  The keyboard mapping under my test kernel is not entirely correct (ESC is neither ESC nor Power, for example).  Planet Computers did not compile in support for /proc/configs.gz in their stock Android kernel so I don't know what's missing (yet).  But I don't want to get to too far off topic in this camera thread.

Linux kernel: yes, I even contributed code. But how to put the kernel onto an Android device is a mistery to me.

Use this as a guide to set up the development environment and compile the kernel (I cross-compiled):
https://github.com/gemian/gemini-keyboard-a...rnelCompilation

But those instructions are for building the Debian Linux kernel.  For Android, use aeon6797_6m_n_defconfig for the kernel config (replacing aeon6797_6m_n_halium_defconfig in the instructions).

Building the bootable image requires different steps than the gemian instructions.  Do not follow those instructions for obtaining ramdisk.cpio.gz.  Instead, you will need to unpack an existing boot image (from Planet's firmware) and repack it with your newly compiled kernel.  Here is an example using the 12062018 firmware and Planet's rooted boot image.  It is assumed you have already retrieved mkbootimg.
Code: [Select]
  mkdir android_root_boot
  mkbootimg/unpackbootimg -i /root_boot.img -o android_root_boot
That unpacks the stock boot image providing you with a ramdisk (similar to initrd on x86) and a kernel, plus necessary offsets and other parameters.

Next, build the new boot image.  You will reuse the ramdisk, but replace the kernel:
Code: [Select]
  ./mkbootimg/mkbootimg --kernel /arch/arm64/boot/Image.gz-dtb \
    --ramdisk android_root_boot/root_boot.img-ramdisk.gz \
    --base 0x40078000 \
    --second_offset 0x00e88000 \
    --cmdline "bootopt=64S3,32N2,64N2 buildvariant=user" \
    --kernel_offset 0x00008000 \
    --ramdisk_offset 0x04f88000 \
    --tags_offset 0x03f88000 \
    --pagesize 2048 \
    --board 1528859406 \
    --hash sha1 \
    --os_version 7.1.1 \
    --os_patch_level 2017-11 \
    -o root_test.img
Now you should have a new root boot image called root_test.img with your built kernel.  Copy it into your firmware directory.  The final step is to modify an existing scatter file, replacing root_boot.img (stock) with root_test.img (yours).  Run the flash tool, load the scatter file, deselect all but the partition associated with root_test.img, and download.  Hopefully you'll then be able to boot Android with your own kernel... and play with the rear camera driver.

tuk0z

  • Newbie
  • *
  • Posts: 45
    • View Profile
Rear camera module image quality very poor
« Reply #11 on: July 07, 2018, 03:37:00 am »
@shuntcap thanks for the custom linux kernel instructions! will come handy in this location.

Quote from: shuntcap
Quote from: vader
Photo taken with Sailfish camera at 4:3 (2560x1920). It isn't quite as bad as the android camera I believe.

 [ Invalid Attachment ]

Macro images and images of close objects are not too bad, unless you're under low light conditions where it refuses to focus at any ISO over 400 (for me at least).  But anything else, particularly scenery, is stunningly bad.
Depends still; with sun shine:

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Rear camera module image quality very poor
« Reply #12 on: July 07, 2018, 02:58:11 pm »
Quote from: tuk0z
Depends still; with sun shine:

I'd say this photo proves just how incredibly poor the camera is.  The buildings and sky are washed out, people have blue and red outlines on their clothing (the sensor is just plain too small to grab enough color detail on contrast extremes), grass and tree leaves have no detail, and the people are all blurry.  I have a 9-year-old PDA with a 3MP pixel that takes far clearer photos, albeit with poorer color, but no edge artifacts (BIP-6000 with QWERTY keyboard).  Its lens looks a tad bit larger than the one in question.  I also have a 6-year-old smartphone (Samsung Galaxy Stratosphere II QWERTY slider) with a 5MP camera which also takes far superior photos: clear, detailed, and no edge color artifacts.  I hate to say it, but the Gemini's rear camera is an absolute joke of a smartphone camera in the year 2018.  I understand Planet had limited physical space in which to fit a camera module and chose the best size they could find.  They weren't even planning to add a rear camera in the first place, perhaps an oversight in the ultra-competitive mobile handheld market today, but did so because backers requested it.  I personally didn't even consider the backing Gemini until the rear camera module was announced.  I've played around with various settings in the very sparsely commented kernel driver on the off chance that something might help, but the best I could do was improve the image under low light conditions by slowing down the clock (don't ask for this modification because it slows down the preview frame rate considerably).  It seems all we can do is accept the benefit of having some form of a rear camera, no matter how poor, since it's still better than none at all.

tuk0z

  • Newbie
  • *
  • Posts: 45
    • View Profile
Rear camera module image quality very poor
« Reply #13 on: July 07, 2018, 06:23:37 pm »
Both the old Samsung tablet (Mini 3 or something like that) and smartphone (GT-S7390G) take photo as blurry and with much less light contrast than those. All what you say above is plain true, though. But it shouldn't be a terrible surprise considering such a small team had to prioritize things on their crowdfunding project.

People have uploaded pictures taken from a usb-c camera module connected to the Gemini and these are *pictures* I've seen them on this forum I believe.

Jeffers

  • Newbie
  • *
  • Posts: 24
    • View Profile
Rear camera module image quality very poor
« Reply #14 on: July 08, 2018, 12:58:11 am »
I've been searching for a camera, something like a webcam to plug into the USB C socket. I've only been able to find some of these new-fangled 3D cameras, which isn't quite what I had in mind.

It's quite disappointing that the module is so bad. I had hoped that the quality would be decent enough to make the Gemini my daily driver by itself. Now though, it looks like I'm going to need another camera on hand, unfortunately.