gkreidl
Posts: 6048
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 9:32 am

jbeale wrote:
6by9 wrote:What does ISO100 equate to in digital photography? It's really a film camera term. On OV5647 ISO100 was set as x1.0. On IMX219 it's set as x1.84.
Good to know. If you are asking what ISO100 means, there are standards for that in digital photography based on illumination in EV and the sensor response relative to full scale when aimed at an 18% reflectance grey target. It is not an arbitrary parameter, or at least ISO doesn't think so.

See, for example ISO 12232:2006 "Photography -- Digital still cameras -- Determination of exposure index, ISO speed ratings, standard output sensitivity, and recommended exposure index" Here is some background: http://www.imatest.com/docs/sensitivity_ei/
Sharpness really seems to be a problem.
jbeale, could you please try to capture a book page (as close as possible) or an A4 sheet with printed text? I'd like to know if the V2 camera could be used for a book scanner.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
Gavinmc42
Posts: 3627
Joined: Wed Aug 28, 2013 3:31 am

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 10:43 am

I have suspicion focusing distance is not perfectly set when the module is made.

Some time ago I was in the business of making security cameras with older versions of this tech.
I designed a stepper motor lens focusing jig controlled by the camera MCU.

Set up a standardized printout test image at the distance you want to focus at.
Anyone with a 3D printer could make a two piece holder plus lens twister?
Then keep taking jpegs until the jpeg image size maxes out.
The lens is focused when the maximum detail and jpeg file is the largest size.
+/-5 to 45 degrees turn might fix it, 90 degrees = 0.075mm.

It does seem from testing my first V2 8Mp, it is not focused for long distance.
Some of my 5Mp V1's also suffer the fuzzies at distance.

We are also pushing the optics, it is only a M6 lens.
Lots of corrections are done in software too these days, lots of code voodoo in the blob.
Still some tweaking?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
jbeale
Posts: 3476
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 1:28 pm

gkreidl wrote:Sharpness really seems to be a problem.
jbeale, could you please try to capture a book page (as close as possible) or an A4 sheet with printed text? I'd like to know if the V2 camera could be used for a book scanner.
I think it could. Did you see the image of fine print here? http://bealecorner.org/best/RPi/PiCamV2-test7.jpg
The print on that is smaller than a normal book, and in that image the field of view measures about 40 cm x 30 cm

User avatar
jbeale
Posts: 3476
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

8MP Camera: lens focal plane?

Sat Apr 30, 2016 1:58 pm

I'm not sure what to say about the lens on my new Pi NoIR v2 camera. Were we spoiled by the good performance of the lens in the v1 camera? Have a look at the the image below. The camera is sitting about 2 inches off the ground. You will see the concrete driveway is in focus very close, less than 1 foot away at the lower left edge, but near the center of the image, the focal point is at least 10 feet away. http://bealecorner.org/best/RPi/PiNoIR-v2.jpg

Do we know if this lens was designed for this sensor module? Is it a double-asphere design as in the v1 camera?

EDIT: I did an experiment. With some difficulty I removed the lens from a PiCamera v2 (thread were very stiff- not easy to do) and replaced it with a lens taken from the PiCamera v1.3 and frankly I think this combination works better. Have a look: http://bealecorner.org/best/RPi/PiCam-v ... 1-lens.jpg This file is well over 6 MB in size. Has anyone seen that with the stock lens? Note this is a super-dirty hack, I'm not even sure the threads between the two lens cells match.

The pliers did some damage to the plastic, but it works.
Image

Image
Last edited by jbeale on Sat Apr 30, 2016 10:07 pm, edited 1 time in total.

Koepi
Posts: 68
Joined: Fri Apr 29, 2016 7:18 am

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 3:40 pm

:o

That looks good! I don't dare modding my cam as now I could still return it.

User avatar
rpdom
Posts: 14992
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 4:28 pm

UKSecretBases wrote:Oh dear, it seems V2 Pi Camera is indeed a dud. All those extra 3M pixels and every one of them out of focus. On both models, normal and NoIR. Confirmed with my own testing in perfect weather conditions today.
Can you post pictures? (or it didn't happen ;) )

UKSecretBases
Posts: 5
Joined: Tue Apr 26, 2016 5:03 pm
Contact: Website

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 4:50 pm

rpdom wrote:
UKSecretBases wrote:Oh dear, it seems V2 Pi Camera is indeed a dud. All those extra 3M pixels and every one of them out of focus. On both models, normal and NoIR. Confirmed with my own testing in perfect weather conditions today.
Can you post pictures? (or it didn't happen ;) )

Others on here have already established camera V2 is a dud. I'm just adding to that experience, not claiming an exclusive!

And I thought the reversed image (now fixed in firmware) was the only thing wrong with it (sigh).

sorbonne
Posts: 49
Joined: Thu Jan 14, 2016 10:25 am

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 6:14 pm

It's clearly out of focus. What a shame!

User avatar
jbeale
Posts: 3476
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 6:17 pm

I would welcome any comment from those in the know, whether the resolution across the field was measured on the v2.1 camera, and if those results are in agreement with the results being posted here.

Is it possible that acceptance testing was done with prime lens samples, and then someone- maybe an offshore CM- substituted factory second lenses, or even entirely different source lenses on the production run? The boards I got are marked "Made in PRC"

It is my impression that the lenses are not simply mis-focused at some distance that is not infinity. Rather, the focal plane is highly curved, so the whole field does not converge to focus at any one object distance, regardless of the lens-sensor distance. For example, if this lens was intended to be part of a multi-element lens assembly, but the other elements are missing; or the curvature follows the wrong formula due to manufacturing issues (but all this is just speculation on my part).

EDIT:
if the backside-illuminated design means they are using a backside thinned wafer (which I believe is true) and they haven't then re-bonded to a frontside piece (is that even possible?), then the sensor silicon would super-thin and subject to bending from any mechanical stress. That could also cause a misfocus condition.
Last edited by jbeale on Sat Apr 30, 2016 8:10 pm, edited 5 times in total.

echmain
Posts: 230
Joined: Fri Mar 04, 2016 8:26 pm

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 6:51 pm

UKSecretBases wrote: To ship a camera board that has its lens not focussed at infinity is mind blowing.
That sounds like a Hubble Telescope moment.

echmain
Posts: 230
Joined: Fri Mar 04, 2016 8:26 pm

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 7:01 pm

sorbonne wrote:It's clearly out of focus. What a shame!
Was that oxymoron intended? It's a good one in any case.

ethanol100
Posts: 583
Joined: Wed Oct 02, 2013 12:28 pm

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 7:47 pm

I can confirm that my cam is not focused to infinity, too.
Example
And I'm not able to manual focus it correctly (It gets better, but still far from perfect).
But it makes great pictures inside a room(focus 0.3m - 3m).

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7140
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 8:14 pm

Discussions are being had over focus on the v2 camera.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Koepi
Posts: 68
Joined: Fri Apr 29, 2016 7:18 am

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 8:42 pm

Is there a possible memory/handle leak in the current driver?
The first day I stumbled over an error message ENOSPC. Then I raised GPU mem to 128MB from 64MB again (I'm using the cam on a Raspberry Pi A+ as timelapse webcam, a photo every minute via cronjob).
That continued during playing around with settings - there I think different settings could cause that, so just rebooted and the cam worked again.

Today I got this error message, while I didn't touch anything about the settings. The camera just stopped working, no new images in the "timelapse buffer folder". Error message when calling the cam manually:
[email protected] ~ $ webcam.sh
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

Did apt-update which just had some poppler packages; rpi-update did load a new firmware though. All I could find in the github repositories was a change in some audio driver since yesterday, so I fear this didn't solve any camera related issues.

The call in the script during the day time is still this one:
raspistill -mm matrix -n -t 1500 -q 82 -w 1920 -h 1080 -o $FILE

No special settings, only measurement via matrix.

If I can help to find out what happened there I'd need some debugging guide; as this is not reliable to reproduce and did happen just some random time, "post-crash debugging" would be prefered.

michelpi
Posts: 12
Joined: Fri Feb 06, 2015 8:34 pm

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 9:02 pm

> I am still working my way through my other camera mounts, so see which is giving the best results with the various lenses that I have. My SmartiPi camera case is not giving good results, which is a shame.

Here is a way to attach a v1 mount to the v2 camera module.

The trick to solving the Scheimpflug problem is to have the mount rotate a little bit. I did that by putting 4 layers of paper between the mount and the pcb, giving a 0.36 mm offset.

It's not a pretty solution, but my 8mm f2.0 lens seems mostly in focus now.

Image

User avatar
jbeale
Posts: 3476
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: New 8MP Camera - Q&A thread

Sat Apr 30, 2016 10:06 pm

6by9 wrote:Discussions are being had over focus on the v2 camera.
Thank you. I look forward to any conclusions.

I got two "normal" type v2.1 boards, both are nearsighted and fuzzy in distance, as received. Previously I have refocused several v1 camera boards just for fun, without problems, but I have now destroyed both of my v2.1 board lenses trying to refocus them (the lens cell has sloping edges and my long-nose pliers tend to slip off and snap shut, scraping across top of lens & putting a big divot into it.) Obviously that damage is my own fault, but the whole situation is a bit frustrating.

Backyard, stock camera v2.1 as received: http://bealecorner.org/best/RPi/PiCamV2-Test8.jpg
Backyard, v2.1 but replaced lens with v1.3 lens: http://bealecorner.org/best/RPi/PiCam-v ... 1-lens.jpg

The closest edge of the grass in the first image looks pretty good, but distant trees and roof are fuzzy. Compare the detail across the frame there with the second image, again using the new 8MP sensor but now fitted with the old f/2.9 f=3.6mm lens taken from a v1.3 board.

After "using up" my stock v2.1 lenses, I tried converting to a M12 mount with Sunex DSL945D 5.5mm f/2.5 lens which isn't entirely sharp across the field, but shows promise http://bealecorner.org/best/RPi/RPCamV2-Sunex.jpg Maybe if I tilt the mount a bit, as michelpi suggested above.

User avatar
Gavinmc42
Posts: 3627
Joined: Wed Aug 28, 2013 3:31 am

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 12:14 am

M12 lens are easy to get, used on security cameras etc.
Still looking for a supplier of M6, to get some wide, zoom lens etc.
Also remember the module is double sided taped to the PCB and can lift.
So a M12 adapter attached to the PCB might give the result of out of focus on a side which has been reported in some forum posts.

These are very small optical devices, much higher precision is needed to manipulate them.
I had a lot of trouble making equipment for my old M12 test jigs, machined Delrin and brass.
I am thinking 3D sintered nylon could do it, fused filament 3D probably won't without lots of hand finishing.
V1lens has 3 lugs, V2 has 4 lugs. UV resin 3D prints?

I have one of my cameras on a goose neck, to make it easy to point, but it also makes for fuzzy pictures due to vibration. Vibration mounts?
Anyone taken pictures with shake compensation on?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 3627
Joined: Wed Aug 28, 2013 3:31 am

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 2:33 am

Got a V1 and V2 pointing out the window now.
Playing with these settings makes no difference -VS, -SH.

V2 does not seem as focused as the V1 at the center.
Also seems to be less focused at the edges.
V1 3.6mm 54 degrees, V2 3mm 62 degrees.
Shorter focal length going to have more issues with focus at the edges?

But it does seem twice as sensitive, with half the exposure time and a wider field of view.

I think some of the lens correction stuff is done in the blob.
But is it just lens colour correction? Can you do focus correction in software?

Wonder what algorithm the factory uses for focusing.
Aim for best focus in max area, leaving center and edges out of focus?
Or are they just bad lenses?
Until I make a good lens remover/gripper, I won't be using pliers to swap lenses:)
Will need a test chart too.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Koepi
Posts: 68
Joined: Fri Apr 29, 2016 7:18 am

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 7:52 am

I have another direct comparison between V1 and V2 cam:

V1: https://1.bp.blogspot.com/-lV0Hjm42Wc0/ ... 6_0900.jpg
V2: https://4.bp.blogspot.com/-DVb4VAISF_A/ ... 1_0900.jpg

Same position, same day time ... when looking at it at 100% the differences between the lenses get clear. I don't think this can be solved in software.
The white balance was meant to be improved, but I think some more tweaking may be necessary.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2848
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 8:13 am

Koepi wrote:I have another direct comparison between V1 and V2 cam:

V1: https://1.bp.blogspot.com/-lV0Hjm42Wc0/ ... 6_0900.jpg
V2: https://4.bp.blogspot.com/-DVb4VAISF_A/ ... 1_0900.jpg

Same position, same day time ... when looking at it at 100% the differences between the lenses get clear. I don't think this can be solved in software.
The white balance was meant to be improved, but I think some more tweaking may be necessary.
There's quite a big blob of blue in your Cam1 shot though that isn't present in the Cam2 shot. I wonder if that would have made a difference to the WB. Partially cloudy days are a nightmare for comparison shots that involve changing the cameras around :(
Alex Eames RasPi.TV, RasP.iO

User avatar
Gavinmc42
Posts: 3627
Joined: Wed Aug 28, 2013 3:31 am

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 8:25 am

Yep, year ago doing this stuff we had to make an area with blackout curtains and use the same light source for focusing using the maximum jpeg file size method.
Was not perfect, still needed checking against the black and white line chart test images and colour patches, but it got very close +/- 5 degrees on a M12 0.5m.
Not sure how to do infinity focus we only did room size 5m distance.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Koepi
Posts: 68
Joined: Fri Apr 29, 2016 7:18 am

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 9:09 am

alexeames wrote: There's quite a big blob of blue in your Cam1 shot though that isn't present in the Cam2 shot. I wonder if that would have made a difference to the WB. Partially cloudy days are a nightmare for comparison shots that involve changing the cameras around :(
Well there is even more of this blue in the second shot as the sky is nearly completely blue today. You can see faint traces of clouds on the right side above the trees.

Edit: With more clouds it's improving just very little, if at all:
http://www.pic-upload.de/view-30519397/ ... 6.jpg.html

User avatar
Gavinmc42
Posts: 3627
Joined: Wed Aug 28, 2013 3:31 am

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 12:13 pm

Seem to remember the V1 was a Sunny camera module.
P5V04AA Sunny A1338, off the shelf module?

Is that a hand focusing jig on the default page?
http://www.sunnyoptical.com/en/default.html

V2 PN RCM8M_SY101
Raspberry Camera Module 8Mp Sunny 101, custom model?

Standard parts? different lens
http://www.sunnyoptical.com/en/009003001/p454.html
Lots of M6 lenses, bag with one of each please:)
http://www.sunnyoptical.com/en/009002001/p442.html
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

hystrix
Posts: 56
Joined: Mon Jan 07, 2013 12:44 pm

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 2:34 pm

There's virtually nothing in focus in my shots with the V2.1 camera. The dragon in this photo is 70cm from the lens:

https://www.dropbox.com/s/lfxvr2hu8mirf ... 3.jpg?dl=0

Moving the camera 40cm from the subject is a bit better:

https://www.dropbox.com/s/dlav27jry1dwz ... 4.jpg?dl=0

Does this mean that out-of-the-box, the camera is useless, and I have to take the risk in trying to re-focus it myself?

User avatar
jbeale
Posts: 3476
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: New 8MP Camera - Q&A thread

Sun May 01, 2016 3:55 pm

hystrix wrote:There's virtually nothing in focus in my shots with the V2.1 camera. The dragon in this photo is 70cm from the lens:
https://www.dropbox.com/s/lfxvr2hu8mirf ... 3.jpg?dl=0
Moving the camera 40cm from the subject is a bit better: https://www.dropbox.com/s/dlav27jry1dwz ... 4.jpg?dl=0
The second image looks very good to me. It shows at 40 cm (at least in the center of the frame) the lens resolves so well it would benefit from better moire filtering. That agrees with my result that my lens worked well at 30 cm: http://bealecorner.org/best/RPi/PiCamV2-test7.jpg

I wonder if adding an external -3 diopter (concave; diverging) lens would give a good result on distant objects. Having now destroyed two lenses with pliers trying to refocus them myself, I do not recommend that route, unless you arrange a jig so the pliers cannot snap closed when slipping off the edge and damage the lens.

Return to “Camera board”