Author Topic: Upgraded external camera  (Read 12549 times)

Daniel W

  • Sr. Member
  • ****
  • Posts: 372
    • View Profile
Upgraded external camera
« Reply #15 on: November 11, 2018, 07:41:24 pm »
Quote from: shuntcap
E-con Systems manufactures a large number of camera modules.  I found a 13MP module with matching physical dimensions, but the connector is larger (and uses a different bus). But that suggests that may be possible to fit a better module into the Gemini's confined space.
As far as I can see E-con Systems has one 13MP Autofocus module: https://www.e-consystems.com/13mp-onsemi-au...mera-module.asp

While the Gemini SP5509 is 17.4 x 8.5 x 4.0mm, the E-con e-CAM130_MI1335_MOD is 24.18 x 11.6 x 6.525mm, or >35% taller and wider, and >60% thicker. I think we'll just have to wait for the Cosmo to take decent pictures with a Planet Computers device. The Gemini camera is really only good for things like barcodes.

BTW. After a pseudo-scientific experiment, in which I convinced my Gemini to precariously sit briefly on a tripod, so I could take a picture of the same page of text, with the same framing, in 2, 3 and 5MP, I'd say there is a *tad* more details in the 5MP image, but it's really not much at all. I may have to do a follow-up with even more light, though, as the heavy image noise made meaningful comparison hard.

shuntcap

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Upgraded external camera
« Reply #16 on: November 13, 2018, 04:19:29 am »
Quote from: Daniel W
While the Gemini SP5509 is 17.4 x 8.5 x 4.0mm, the E-con e-CAM130_MI1335_MOD is 24.18 x 11.6 x 6.525mm, or >35% taller and wider, and >60% thicker. I think we'll just have to wait for the Cosmo to take decent pictures with a Planet Computers device. The Gemini camera is really only good for things like barcodes.
Actually, if you download the datasheet (you need to give them your e-mail address), the module itself is only 8.74x8.74x6.07mm LxWxH.  The dimensions you saw include the width and length of the pigtail.  I was just looking for proof that Planet could have fit a better module into that tight location with an appropriate connector.  But it matters not: the e-Con's connector won't fit, and the Cosmo is coming.

The Gemini's 3.18 kernel from MediaTek only supports one 24MP camera sensor, the OmniVision OV23850.  This is a 23.8MP, 1/2.3" sensor.  If this is what will be used in the Cosmo with its planned 24MP sensor, it should be a good camera.

Quote
BTW. After a pseudo-scientific experiment, in which I convinced my Gemini to precariously sit briefly on a tripod, so I could take a picture of the same page of text, with the same framing, in 2, 3 and 5MP, I'd say there is a *tad* more details in the 5MP image, but it's really not much at all. I may have to do a follow-up with even more light, though, as the heavy image noise made meaningful comparison hard.
I conducted a similar experiment a few months ago and came to the exact same conclusion.  There was enough of a difference in detail to clear SuperPix of any hidden pixel interpolation guilt, but just barely.

If my eyes aren't deceiving me, the camera's live preview image is actually sharper than the final photo.  That was one of the reasons I tried to squeeze information out of Planet so I could perhaps tweak the poorly documented kernel driver, but they didn't have any information.

Daniel W

  • Sr. Member
  • ****
  • Posts: 372
    • View Profile
Upgraded external camera
« Reply #17 on: November 13, 2018, 11:32:28 am »
Quote from: shuntcap
Actually, if you download the datasheet (you need to give them your e-mail address), the module itself is only 8.74x8.74x6.07mm LxWxH. The dimensions you saw include the width and length of the pigtail.
Yes, so does the measurements I gave for the SP5509, measured by my cheap digital calipers (and I have a bunch of photos of the SP5509, should anyone be interested). Since the back of the display seems to sit directly beneath the rear camera, preventing us from soldering just the module onto something, we need a cable, giving us 6.525mm depth for the E-con, and the 4.00mm deep (in total) SP5509 already creates a considerable camera bulge. For the record, the SP5509 module itself is 8.47x8.55mm, which should be close enough. It's the depth difference that stops the party.

sobukus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Upgraded external camera
« Reply #18 on: February 15, 2019, 06:55:17 am »
I also spent some time with the camera on the Gemini and concluded that results are much better if I reduce the camera gain (fixing ISO 400 and below, setting negative exposure bias value). The picture may be dark, but the autofocus finally manages to actually focus the picture.

It's simply out of focus otherwise. If the software can be convinced to use a low-gain mode for focus and independently from that either high gain or long exposure for the final picture, I could live with it. The missing flash can be compensated with a tiny flashlight that's useful on its own (granted, nowadays people use their smartphones as pocket flashlights …).

Can you confirm that pictures look better if enforcing less gain (noisy, but sharper)?
« Last Edit: February 15, 2019, 06:56:28 am by sobukus »

Daniel W

  • Sr. Member
  • ****
  • Posts: 372
    • View Profile
Upgraded external camera
« Reply #19 on: February 17, 2019, 07:33:34 pm »
Quote from: sobukus
Can you confirm that pictures look better if enforcing less gain (noisy, but sharper)?
In short: Confirmed. Locking the Gemini camera to ISO 400 (or below) in low-ish light, tends to give darker pictures, but with better focus more often.


Auto ISO in low light. Brighter, but blurrier. This is not motion blur, as the Gemini was supported and the picture was taken with a delay.

 [ Invalid Attachment ]
ISO400 in low light. Darker, but sharper. Look, for example at the word "KEYS" in the "iRig KEYS" logo.

More detailed: In light such that the automatic ISO setting goes past 400, the camera apparently becomes less than able to correctly focus the image. In such light, if I lock the sensitivity to 400 (or lower), I get darker pictures, and longer exposure (beware of motion blur), but the camera now seems much more able to correctly focus the image. If I, instead, lock the sensitivity to 800 or 1600, I get the same kind of out-of-focus pictures as in auto mode, but it isn't as simple as high ISO = blur, because if I have plenty of light, such that the automatic ISO setting would have stayed below 400, and I still lock the sensitivity to 800 or 1600, to get shorter exposure times, I still get photos with correct focus.

So, it seems that in good light, the Gemini camera can handle high ISO values, but not in low light, where it would be needed the most. My guesstimate is that in low light, the raw image gets rather noisy and cranking up the ISO amplifies that noise further, such that heavier noise reduction gets applied, which I think is the real problem here. While the focus algorithm looks for contrast, the noise reduction, trying to average out noise, softens the image to a point where the focus algorithm can't tell if it is in focus or not, and thus fails. Perhaps the camera driver could limit the ISO and bypass the noise reduction while looking for focus, and then, with the focus locked, turn up the ISO if needed, engage the the noise reduction and shoot the image. There could be reasons as to why that wouldn't be feasible, or maybe the precise problem is somewhat different.

Either way, if this can be worked around, I guess it must be done in a low lever driver, so I guess it isn't something Planet Computers can do themselves, but would have to defer to SuperPix (who makes the camera hardware), who then may or may not actually bother.
« Last Edit: February 17, 2019, 07:34:57 pm by Daniel W »