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

Re: New 8MP Camera - Q&A thread

Wed May 25, 2016 5:54 pm

Various flavors of the v1 board are still available in various channels. I understand for head-mounted you want minimum weight, but a wide-angle lens add-on sold for cell phones does work.

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

Re: New 8MP Camera - Q&A thread

Thu May 26, 2016 5:23 am

Just FWIW. I now have two replacement RPi v2.1 boards, and comparing them with an older v1.3 board I see that (1) color is much more neutral on the new v2.1 as many others have observed, and (2) even without refocusing, these particular new boards show as good or slightly more detail on a target at 2.6 m distance as the v1 board did, and also about the same image scale (degrees per pixel, or pixels per degree). Below are 1:1 crops near center from the three cameras in the same setup. By the way this was near sunset and the lighting changed a lot between v2(a) and v2(b), but the camera almost totally compensated.
Image
Not shown here but for more distant targets I see the v1 lens doing better than the as-received v2 lens, as expected from the v2 near-focus condition. Fortunately now I know how to change that.

Squarecoin
Posts: 5
Joined: Tue Apr 26, 2016 12:27 pm

Re: New 8MP Camera - Q&A thread

Thu May 26, 2016 3:19 pm

Thanks for the quick replies! I have indeed been using iPhone style lens's. Weight is the big concern, to the extent that while I COULD use a fisheye lens to compensate for the harsher crop the added metal/glass is a bit unappealing...as well as the added distortion. Thankfully, in the short term I got a v1 in the post this morning and the resolution and lowlight performances seems to be solid enough for the landmark detection. :) Just a bit of a shame that I'll have to panic buy as many V1's as I anticipate using.

User avatar
Mettauk
Posts: 238
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Re: New 8MP Camera - Q&A thread

Thu May 26, 2016 3:54 pm

Given the v2 NoIR version clearly (no pun intended) has serious focus issues and an acknowledgement of sorts has been made by Eban.

I am wondering what steps/revisions are being made to rectify the problem?

Will version 2.x be available soon?
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

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

Re: New 8MP Camera - Q&A thread

Thu May 26, 2016 4:16 pm

This image was taken with one of my just-received replacement Pi NoIR v2.1 cameras, without any adjustments (except I rotated the image 180 degrees). I'll try to do some more careful tests soon. https://picasaweb.google.com/1099282360 ... 4163735890

I don't know if you can view the full 3280×2464 pixel image from Picasa but if you do, I find the far door (about 5 meters away) with a few kid's drawings on it is not far off focus. My original Pi NoIR v2.1 cameras were significantly less in focus than this one. Eben said, and I would agree, that there is a quality control issue as the focus is not consistent between all modules. Interesting also the color looks pretty good despite it being a PiNoIR (and I did confirm that it can see 940 nm as well).

maddogdave
Posts: 46
Joined: Sat Dec 17, 2011 6:05 pm
Location: Berkshire England

Re: New 8MP Camera - Q&A thread

Thu May 26, 2016 9:50 pm

Tested my v2 camera with a PiZero this evening and can confirm that the focus is set very close compared to all my v1 camera modules. Some pictures of flowers and images taken at 'selfie' distances 1.0-1.5m very well focussed, but anything at a greater distance out of focus.
Dave

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

Re: New 8MP Camera - Q&A thread

Thu May 26, 2016 11:46 pm

maddogdave wrote:Tested my v2 camera with a PiZero this evening and can confirm that the focus is set very close compared to all my v1 camera modules. Some pictures of flowers and images taken at 'selfie' distances 1.0-1.5m very well focussed, but anything at a greater distance out of focus.
Yes, I recommend refocus with this approach: viewtopic.php?f=43&t=145815&start=225#p973333
using something like this: http://www.thingiverse.com/thing:1574661

start78
Posts: 42
Joined: Mon May 23, 2016 8:02 am
Location: Germany

Re: New 8MP Camera - Q&A thread

Sun May 29, 2016 9:38 am

I wouldn't go so far as to say i'm disappointed, but i'm getting a bit impatient about a new update from Eben or some other official source.

About two weeks ago Eben said they would consider setting focus back to infinity (sounds like a 80's movie title) and "changing from glue to a viscous compound".

I'm planning to build a birdbox and since it's already too late this year i can surely wait a few more weeks (/month), so there is no need for me to rush things. But i'd really like to buy a camera module ASAP, so i have some time to play around with it, before i stuff it in a box for good.

Right now i'm really confused by all the things i read around the internet. Eben stated, that while focus between different modules variated, they didn't find one module during their test they wouldn't be comfortable shipping. But some people are talking about serious focus issues like blurry edges and what not.

Inside a birdbox (with focus set to about 20cm) i guess the quality would have to be really bad if i was to see blurry edges, so i think that shouldn't really bother me.

But what about the viscous compound for lens affixing (right word?)? If there will be a new batch of camera modules with viscous compound, i'd prefer one of these. And if there will be a whole new version where all known issues of the v2.1 are fixed i will sure wait until that will be available.

Right now i don't want to buy a camera module (even if it's only 30€), because i "fear" i would get a better quality if i waited a few more weeks.

So please someone give us some update about if there will be changes to the camera module!?

ZooC0d3
Posts: 16
Joined: Mon May 02, 2016 9:10 am

Re: New 8MP Camera - Q&A thread

Thu Jun 02, 2016 10:02 am

start78 wrote:
So please someone give us some update about if there will be changes to the camera module!?
I guess your Q isn't worthy of an A.

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

Re: New 8MP Camera - Q&A thread

Thu Jun 02, 2016 11:16 am

ZooC0d3 wrote:
start78 wrote:So please someone give us some update about if there will be changes to the camera module!?
I guess your Q isn't worthy of an A.
More likely that those involved in the process don't follow the forum closely as they're actually doing work.
I'll ping the relevant people.
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.

start78
Posts: 42
Joined: Mon May 23, 2016 8:02 am
Location: Germany

Re: New 8MP Camera - Q&A thread

Thu Jun 02, 2016 2:05 pm

6by9 wrote:More likely that those involved in the process don't follow the forum closely as they're actually doing work.
That's OK. It's just that i'm itching to start playing around because i just ordered a Pi Zero (Woohoo!) in addition to my Pi3. So now i got all the parts i need... ...except the camera module of course.
I'll ping the relevant people.
Thanks!

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

Re: New 8MP Camera - Q&A thread

Fri Jun 03, 2016 1:54 pm

start78 wrote:
6by9 wrote:More likely that those involved in the process don't follow the forum closely as they're actually doing work.
That's OK. It's just that i'm itching to start playing around because i just ordered a Pi Zero (Woohoo!) in addition to my Pi3. So now i got all the parts i need... ...except the camera module of course.
Indirect confirmation from Liz via the blog.
The first batch of camera boards (which has run out now) was calibrated by the sensor factory as they usually calibrate those sensors: as if they were mounted on the front of a camera phone with an expected focal depth of a metre or less. That means that they were less sharp at distance. That’s been addressed now, and they’re now calibrated at or near infinity, so focus with a camera board you buy today will be sharp.
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.

start78
Posts: 42
Joined: Mon May 23, 2016 8:02 am
Location: Germany

Re: New 8MP Camera - Q&A thread

Fri Jun 03, 2016 7:43 pm

Her comments where rather direct: Focus is set to infinity for all future camera modules and you will lose your guarantee if you change the focus.

I'm just surprised that she didn't mention that (or if) there have been considerations about changing to a viscious compound for fixing the lens. To be fair: she also didn't tell if maybe a future version of the camera will be available with alterable focus.

Tinkering around is what the RasPi and all availabe components are made for. But if you plan to use your camera module for a project where infinite focus isn't suited, you have to lose your guarantee on purpose. :(

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

Re: New 8MP Camera - Q&A thread

Fri Jun 03, 2016 9:56 pm

It's a little unfortunate but I can see that the distributors aren't going to want to cover under warranty some ad-hoc user "adjustments" that the camera module was never designed to support. If you know how to do it using an appropriate tool (and that has been well described in this thread already) I think it is a pretty low-risk operation. If you are worried about returns, just check out the camera performance before adjusting the lens. It should have a good image at some distance, depending if it's the new or old batch. If it doesn't focus well at any distance, that's what you should return.

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

Re: New 8MP Camera - Q&A thread

Sat Jun 04, 2016 1:40 am

I think the lowest risk, if you don't have access to a 3D printer to make the lens spanners, is to use add on lens.
Mobile phone clip-ons lens, seen these as low as $2.
Got my eye a 12x telephoto clip on for $7 and will get another wide angle one as well.
For a bird box you will probably need a macro lens.
Sometimes these comes as double or triple packs.
8Mp image of birds at 8 inches, well you might loose some quality with the add on lens.
Will it matter?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: New 8MP Camera - Q&A thread

Sat Jun 04, 2016 2:01 am

For sure the add-on lens for mobile phone is the no-risk option. You have to come up with some way to mount it. In my experience, some of the cheap wide-angle adaptors work pretty well. I tried a telephoto one but it was not satisfactory. I think they rely on the cellphone camera being autofocus to adjust for the adaptor optics not being exactly neutral-focus (collimated in != collimated out).

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

Re: New 8MP Camera - Q&A thread

Sat Jun 04, 2016 2:52 am

jbeale,
I think they rely on the cellphone camera being autofocus to adjust for the adaptor optics not being exactly neutral-focus (collimated in != collimated out).
I suspect you're right, might need some serious mounting and focus adjustment.
But that is all part of the fun with RPi's.

Maybe I will just have to wait for the auto focus 13Mp V3 camera ;)
Sunny makes them now, Sony 13Mp IMX135 etc are selectable 2-4 lane mipi.
Is there a i2c lens focus driver chip, Sunny use this one?
http://www.dwanatech.com/eng/sub/sub02_01.php?cat_no=6
Code already in Android source?
https://github.com/ZenfoneArea/android_ ... 9/dw9714.c
If not auto focus can we expect a nice thumb wheel knurled lens holder, just goop, no glue?
New tech emerging all the time http://lensvector.com/technology/how/
Seriously off topic now, move to V3 thread?

But for a Bird box application, macro lens or lens spanner, should work.
100-200mm focus on V2? is there enough thread left on the lens holder to unscrew it to focus?
Probably! seen the V1 get down to about 40mm macro before the lens fell out.
The original V2's were focused closer, next batch focused at infinity.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ixc
Posts: 5
Joined: Thu May 12, 2016 6:00 pm

Re: New 8MP Camera - Q&A thread

Sun Jun 05, 2016 8:57 pm

Gavinmc42 wrote:But for a Bird box application, macro lens or lens spanner, should work.
100-200mm focus on V2? is there enough thread left on the lens holder to unscrew it to focus?
Probably! seen the V1 get down to about 40mm macro before the lens fell out.
The original V2's were focused closer, next batch focused at infinity.
if you dont worry about warranty, you can try remove lense and attach another to the camera
i use my camera on a 400mm telephoto lense: https://dl.dropboxusercontent.com/u/2634647/pi400mm.jpg

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

Re: New 8MP Camera - Q&A thread

Wed Jun 08, 2016 10:20 am

6by9 wrote:There's an update :) - I'll update the first post when I get home.

With the latest Raspbian release and rpi-update, the modes have been reordered to match OV5647's as closely as possible. The cutting edge PiCamera mode list at https://media.readthedocs.org/pdf/picam ... camera.pdf section 2.6.1 is now correct.

The H264 encoder has had the level 4.0 constraint relaxed to allow setting of up to 4.2. It will NOT achieve 720P145, but with overclocking >100 is looking plausible. The sensor will frame at up to 720P120 now, but again needs a small overclock to allow processing of those frames, and it is a cropped FOV. Naush has had 720P120 with H264 encoding on a Pi3, whilst my Pi2 was struggling above about 720P105. It does require some extra buffering to be allocated.
Thank you for the new modes. With the new 640x480 mode I now get solid 100fps. And with the 4.2 level of the H264 encoder I can capture around 73 fps at 720p without overclocking. Do you have some recommendation for the overclocking and the additional buffering, getting 720p at around 100fps sounds amazing?

rodizio
Posts: 43
Joined: Sat May 07, 2016 2:40 am

Re: New 8MP Camera - Q&A thread

Wed Jun 08, 2016 10:32 am

Could you please consider making additional buffering configurable somehow if you do that? For live video feed it would be nice to keep latency as low as possible.

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

Re: New 8MP Camera - Q&A thread

Wed Jun 08, 2016 10:32 am

ethanol100 wrote:Thank you for the new modes. With the new 640x480 mode I now get solid 100fps. And with the 4.2 level of the H264 encoder I can capture around 73 fps at 720p without overclocking. Do you have some recommendation for the overclocking and the additional buffering, getting 720p at around 100fps sounds amazing?
THIS IS TOTALLY AT YOUR OWN RISK!
Overclocking is device dependent, and warranty bits may get set.
The settings that Naush was playing with on a Pi3 were:

Code: Select all

over_voltage=5
gpu_freq=533
 
# sdram overclock
sdram_freq=533
sdram_schmoo=0x02000020
over_voltage_sdram_p=6
over_voltage_sdram_i=4
over_voltage_sdram_c=4
Currently you may need to set

Code: Select all

force_turbo = 1
too, but there are discussions about an automatic H264 overclock if the level > 4.0. This may set warranty bits - beware!

I was playing on a Pi2 and was still dropping some frames at that point. From past investigations you know about looking at the buffer timestamps for spotting frame drops.

Quick mod to the userland code at https://github.com/raspberrypi/userland ... id.c#L1424

Code: Select all

.num_preview_video_frames = 10,
just to give the codec and camera pipe a bundle more frames to play with to prevent camera pipeline stalls.

You've obviously found that you need to mod https://github.com/raspberrypi/userland ... id.c#L1726 to

Code: Select all

param.profile[0].level = MMAL_VIDEO_LEVEL_H264_42;
in order to exceed 245760 macroblocks/sec (720P68.3).

I must sort out that PR for raspivid. Always yet another thing to do...

edit: comments on automatic H264 overclock removing the need for force_turbo.
Last edited by 6by9 on Wed Jun 08, 2016 4:39 pm, edited 1 time in total.
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.

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

Re: New 8MP Camera - Q&A thread

Wed Jun 08, 2016 10:39 am

rodizio wrote:Could you please consider making additional buffering configurable somehow if you do that? For live video feed it would be nice to keep latency as low as possible.
This is additional buffers being available for use by the camera subsystem. It is not directly a FIFO or other thing that would increase latency.

That said, if your data sink can't keep up, the 2MB FIFO on the output side of the codec will fill and you will be pulling slightly stale frames out of the encoder - that's always been the case. It's your job to ensure that the encoded data is processed in a timely manner.
The extra camera buffers give the potential for a couple of extra jobs to get queued on the input to the encoder, so extend the latency if you're not keeping up by 7 frame times. Seeing as the 2MB FIFO is 16Mbits, that's likely to be able to swallow about a second of video, so adding 7 frames is a minimal increase.
The simple rule is that you must keep up with the output if you care about latency.
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.

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

Re: New 8MP Camera - Q&A thread

Wed Jun 08, 2016 10:46 am

6by9 wrote: THIS IS TOTALLY AT YOUR OWN RISK!
Overclocking is device dependent, and warranty bits may get set.
The settings that Naush was playing with on a Pi3 were:
...
Thanks for the quick and detailed reply! I will certainly try it, when I find some time.

rodizio
Posts: 43
Joined: Sat May 07, 2016 2:40 am

Re: New 8MP Camera - Q&A thread

Wed Jun 08, 2016 3:05 pm

Thanks for the info 6by9.

I already did some testing, keeping up with the output is not easy because the bitrate varies a lot sometimes. I realize it's not really possible for a live encoder to get the bitrate exactly right. Also, of course, when there is not much to encode like when pointing the cam towards a white wall, the bitrate is lower.

But sometimes I see huge bitrate spikes, like when transitioning from a dark (and thus low bitrate) scenery to a light (higher bitrate) scene there is around twice the configured bitrate for a split second or so. I have to use a much higher 802.11 data rate than really needed because of this. It would be possible to lower the physical datarate or add more forward error correction (or increase video bitrate) if those spikes were gone.

Is there anything I can do to get rid of those spikes?

Have been using this commandline:

Code: Select all

 raspivid -w 1280 -h 700 -fps 48 -b 6000000 -g 3 -t 0 -fl -ih -pf high -ex fixedfps -o -

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

Re: New 8MP Camera - Q&A thread

Wed Jun 08, 2016 3:34 pm

rodizio wrote:I already did some testing, keeping up with the output is not easy because the bitrate varies a lot sometimes. I realize it's not really possible for a live encoder to get the bitrate exactly right. Also, of course, when there is not much to encode like when pointing the cam towards a white wall, the bitrate is lower.

But sometimes I see huge bitrate spikes, like when transitioning from a dark (and thus low bitrate) scenery to a light (higher bitrate) scene there is around twice the configured bitrate for a split second or so. I have to use a much higher 802.11 data rate than really needed because of this. It would be possible to lower the physical datarate or add more forward error correction (or increase video bitrate) if those spikes were gone.

Is there anything I can do to get rid of those spikes?

Have been using this commandline:

Code: Select all

 raspivid -w 1280 -h 700 -fps 48 -b 6000000 -g 3 -t 0 -fl -ih -pf high -ex fixedfps -o -
Nope.
You've asked for an average bitrate of 6Mbits/s. The codec has one main compression factor control and will adjust that to achieve the target bitrate on average.
If it's encoding something that compresses very well, it will turn up the quality to use the extra bits. On a major scene change it will overshoot on allocated bits, and then scale it back for subsequent frames (sometimes to the extent of dropping those frames entirely). There's no going back to re-encode the frame with alternate compression values, partly because there isn't the bandwidth in the system, and partly as it will probably already have started processing the next frame using the one it has just encoded as a reference.

If you see >25% above the target bitrate averaged over a second, I'd consider it a bug. Seeing spikes on individual frames is expected behaviour.
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.

Return to “Camera board”