BillSylvester
Posts: 1
Joined: Mon Apr 25, 2016 8:47 pm

Re: New 8MP Camera - Q&A thread

Mon Apr 25, 2016 8:53 pm

Is there any way to sync this with an electronic flash?
I guess that's a question of rolling vs global shutter, right?

User avatar
liz
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 5202
Joined: Thu Jul 28, 2011 7:22 pm
Contact: Website

Re: New 8MP Camera - Q&A thread

Mon Apr 25, 2016 11:12 pm

It's still a rolling shutter - at this sensor, a global shutter just doesn't provide the quality that a rolling shutter does.
Director of Communications, Raspberry Pi

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

Re: New 8MP Camera - Q&A thread

Mon Apr 25, 2016 11:14 pm

I suspect the new camera (also rolling shutter) works the same way with strobe as the existing OV5647 camera. Right now I'm using an IR strobe with the v1 RPi camera in video mode, and a 2 msec light pulse works to illuminate very nearly the full frame, even with a 43 msec long exposure time, with the camera recording video at 23 fps. The rolling shutter does not prevent this from working, the only issue is the strobe is not synchronized to frame start so there is a "split frame" image in general, unless you get lucky... or you use the software phase-locked-loop technique described here viewtopic.php?f=43&t=143820 to generate your own frame-start signal.

However, if you want to take single still frames with a flash/strobe light, then I don't know how to do that.

paulhothersall
Posts: 28
Joined: Wed Jul 31, 2013 5:55 am

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 12:55 am

Can we have a yes/no answer on if > 49FPS at 720p? i.e. will 720p50 / 720p60 be real options this time?

The old module was also marketed as 720p60, and as far as I know we have never been able to get 60fps, or as good quality on that as the 41fps (cropped 960p) or lower mode.

edzieba
Posts: 25
Joined: Fri Jul 29, 2011 6:59 pm

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 8:52 am

6by9 wrote:- It does work on the Compute Module in stereoscopic mode, and the CM and software should also work correctly with one IMX219 and one OV5647 connected.
One issue with the previous camera module was that frame capture on multiple cameras could not be synchronized, which made many dual-camera uses impractical or impossible (e.g. stereo camera object tracking with the compute module). Is this a function the new module can perform?

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 9:44 am

edzieba wrote:
6by9 wrote:- It does work on the Compute Module in stereoscopic mode, and the CM and software should also work correctly with one IMX219 and one OV5647 connected.
One issue with the previous camera module was that frame capture on multiple cameras could not be synchronized, which made many dual-camera uses impractical or impossible (e.g. stereo camera object tracking with the compute module). Is this a function the new module can perform?
There are no exposed options for synchronisation. I've asked those with datasheets for a nosy about what external sync options are available, but that is the spec of the sensor silicon, not necessarily the packaging that is in use. Certainly it is not a signal that is brought back to the Pi.

Stereoscopic does trigger the two cameras in sync initially, but as they run from independent oscillators they will drift - rough calcs say worst case you'll be out by a frame after about an hour.
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.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 9:50 am

One interesting proposed use case of the original camera was as a finish line camera, requiring ideally just one line of sensor pixels to be read out repeatedly (rather than the whole frame). I know it's a long shot, but might the new sensor have some possibilities there?

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 9:52 am

paulhothersall wrote:Can we have a yes/no answer on if > 49FPS at 720p? i.e. will 720p50 / 720p60 be real options this time?
Simple yes, 720P60 has been confirmed on IMX219 from the sensor, through the ISP, and H264 codec.
paulhothersall wrote:The old module was also marketed as 720p60, and as far as I know we have never been able to get 60fps, or as good quality on that as the 41fps (cropped 960p) or lower mode.
OV5647 was marketed by Omnivision as 720P60. Hopefully none of the Pi Towers blurb claimed that. What Pi resellers published is another matter again.
The settings OV provided for 720P60 were for quite a cropped field of view. That was not ideal and hence not made available through the Pi driver.
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: 7396
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 10:03 am

gregeric wrote:One interesting proposed use case of the original camera was as a finish line camera, requiring ideally just one line of sensor pixels to be read out repeatedly (rather than the whole frame). I know it's a long shot, but might the new sensor have some possibilities there?
Not directly, but I'm not sure that you gain much by reading out one line. You need some exposure time to actually receive any light. That is set up by the pixel readout rate being constant, and you start a line exposing a line a fixed number of readout lines ahead of when you want it.
So if you want 10ms exposure time and the line readout rate is 20usec (the right ballpark for both sensors in binned modes), then you need to run at least 500 lines of either genuine pixels or blanking to achieve that. Also remember that you have a Bayer pattern involved, so you'll get a very weird colour skew if you only red out only one of the the Red/Green or Blue/Green lines

I am working on getting better access to the raw sensor data through V4L2, so that's going to be your best bet as then you can write your own sensor driver to do what you want.
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: 7396
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 10:08 am

BillSylvester wrote:Is there any way to sync this with an electronic flash?
I guess that's a question of rolling vs global shutter, right?
You can get modules which are rolling shutter but with global reset. If you add an external mechanical shutter to that, then you can get a half equivalent to global shutter for stills without actually having to go global shutter. That was the approach taken on the Nokia N8 and Pureview 808.
It doesn't work for video for obvious reasons.

I'd be very surprised if Pi Towers ever go down that route though, and it makes the control code a chunk more fiendish (it's in the firmware, but won't have been exercised since PureView 808 was in development, so about 2012!)
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.

edzieba
Posts: 25
Joined: Fri Jul 29, 2011 6:59 pm

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 10:11 am

6by9 wrote:
edzieba wrote:
6by9 wrote:- It does work on the Compute Module in stereoscopic mode, and the CM and software should also work correctly with one IMX219 and one OV5647 connected.
One issue with the previous camera module was that frame capture on multiple cameras could not be synchronized, which made many dual-camera uses impractical or impossible (e.g. stereo camera object tracking with the compute module). Is this a function the new module can perform?
There are no exposed options for synchronisation. I've asked those with datasheets for a nosy about what external sync options are available, but that is the spec of the sensor silicon, not necessarily the packaging that is in use. Certainly it is not a signal that is brought back to the Pi.
Aw, that's a shame. Ultra-low-cost sync-able cameras could open up some cool applications like large volume tracking arrays, or lightfield video capture (needs tight sync due to computational imaging). I would be nice if sensor developers made their datasheets more open and available; it's clear from many commodity camera applications (e.g. smartphones with multiple synced cameras) that a lot of hardware is capable of being externally snchronised, but it's not something that can be easily hacked in without access to proprietary datasheets.
Stereoscopic does trigger the two cameras in sync initially, but as they run from independent oscillators they will drift - rough calcs say worst case you'll be out by a frame after about an hour.
My measurements of the Compute Module with stereo cameras had startup sync around 8ms out on average, with about a 2ms/hour drift. Good enough for regular video unless you're capturing for long times, but not good enough for object tracking.

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 11:29 am

edzieba wrote:Aw, that's a shame. Ultra-low-cost sync-able cameras could open up some cool applications like large volume tracking arrays, or lightfield video capture (needs tight sync due to computational imaging). I would be nice if sensor developers made their datasheets more open and available; it's clear from many commodity camera applications (e.g. smartphones with multiple synced cameras) that a lot of hardware is capable of being externally snchronised, but it's not something that can be easily hacked in without access to proprietary datasheets.
Sorry, but they all seem to be pretty tight lipped over the details of the hardware. Some supply hardcopies of the datasheet only!
edzieba wrote:
Stereoscopic does trigger the two cameras in sync initially, but as they run from independent oscillators they will drift - rough calcs say worst case you'll be out by a frame after about an hour.
My measurements of the Compute Module with stereo cameras had startup sync around 8ms out on average, with about a 2ms/hour drift. Good enough for regular video unless you're capturing for long times, but not good enough for object tracking.
2ms/hour is pretty good - better than my guesstimate based on 10ppm accuracy on the oscillator.
Shame about that 8ms offset. There may be a couple of improvements possible on that - the two commands to start streaming are about 4 bytes each over an I2C link that should be running at 400kHz (may only be 100kHz), so that should have been down at 1/10ms. If the driver ends up having to send all the mode setup registers first, then that may well add up to a good few ms. Perhaps it's setting exposure time and gains.
I'm guessing you had to use external kit to measure the difference, rather than reading the offset from any software. Let me know if not as it'd save me some effort.

One of my ex-Broadcom colleagues did say that they'd modified the lower level camera stack to adjust the framerates automatically to bring the two cameras into sync. Similar idea to that discussed on viewtopic.php?p=957382. Sadly that code is likely to be long lost, and the likelihood of me having the time to recreate it is very low. I'll see if anyone else fancies the challenge.

edit: Having just had a quick check of the source, there is a potential slight delay on starting streaming, but it does look like it should take <1ms to start streaming, and is in a tight loop to start all sensors ASAP. There's one little thing to correct, but I'll see what values I get on my rig.
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.

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 12:34 pm

Hi. Are the data buses laid out in the same way as the v1? I'm hoping to use the HDMI extension solution for an upcoming project.

Thanks a lot!

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 1:47 pm

What is the maximal framerate supported for smaller images. The original camera could produce [email protected], but with the new one I can only get a maximal framerate of about 82fps. Which mode will be used for these settings? Is the [email protected] the only high framerate mode?

The image quality for the 82fps is much superior to the old one, and the [email protected] fps and [email protected] look really crispy and nice.

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 2:18 pm

Squarecoin wrote:Hi. Are the data buses laid out in the same way as the v1? I'm hoping to use the HDMI extension solution for an upcoming project.
The connection to the Pi is identical on a 15pin FFC connector, so the HDMI extensions should all still work fine.
ethanol100 wrote:What is the maximal framerate supported for smaller images. The original camera could produce [email protected], but with the new one I can only get a maximal framerate of about 82fps. Which mode will be used for these settings? Is the [email protected] the only high framerate mode?

The image quality for the 82fps is much superior to the old one, and the [email protected] fps and [email protected] look really crispy and nice.
Yes, the sensor will be in the 720P 60-120fps mode if you ask for a framerate in that range. I haven't done too much analysis myself on performance - looks like I need to.

One part that we know needs work is optimising the tuner code. After each frame the resulting statistics are analysed and update the values to be used for the next frame. That processing is currently taking a good few milliseconds. When running at 90fps, there's only 11ms for each frame, so with the ISP now taking slightly more time due to the increased number of pixels, things are going to be getting very tight! At high framerates we'll be looking to run the tuner every other frame - Naush has said he will look into that, otherwise I will.

If those changes go to plan, then there are some even higher fps, lower resolution readout modes that Sony provide configs for. It'll be a case of playing around to find what can be realistically achieved, that's why the current claim is for 1080P30, 720P60, and (it sounds possibly optimistically) VGA90.
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.

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 5:10 pm

I’ve just received my v2.1 cameras (one each of the normal and Noir models). I realise I have to wait for the new libraries to roll out, in order to get the extra pixels. But I’ve noticed that the default image is horizontally flipped and the image is in reverse. So to bring it back to normal I have to use the -hf option. Bug?

paulhothersall
Posts: 28
Joined: Wed Jul 31, 2013 5:55 am

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 5:44 pm

6by9 wrote:
paulhothersall wrote:Can we have a yes/no answer on if > 49FPS at 720p? i.e. will 720p50 / 720p60 be real options this time?
Simple yes, 720P60 has been confirmed on IMX219 from the sensor, through the ISP, and H264 codec.

great!!
6by9 wrote:
paulhothersall wrote:The old module was also marketed as 720p60, and as far as I know we have never been able to get 60fps, or as good quality on that as the 41fps (cropped 960p) or lower mode.
OV5647 was marketed by Omnivision as 720P60. Hopefully none of the Pi Towers blurb claimed that. What Pi resellers published is another matter again.

ahem
https://www.raspberrypi.org/products/camera-module/
voice of supreme deity from RPi Towers wrote:if you’re interested in the nitty-gritty, you’ll want to know that the module has a five megapixel fixed-focus camera that supports 1080p30, 720p60 and VGA90 video modes, ........
I know that later when the new modes were released it capped at above, but no-one every actually modified the original... oops
6by9 wrote:The settings OV provided for 720P60 were for quite a cropped field of view. That was not ideal and hence not made available through the Pi driver.
Actually for several uses, that cropped FOV is perfect for me. I end up with a replaced lens for "zooming in" and this would not be an issue. Please please please can you offer it as an option on the old camera module???

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 7:11 pm

paulhothersall wrote:
6by9 wrote:
paulhothersall wrote:The old module was also marketed as 720p60, and as far as I know we have never been able to get 60fps, or as good quality on that as the 41fps (cropped 960p) or lower mode.
OV5647 was marketed by Omnivision as 720P60. Hopefully none of the Pi Towers blurb claimed that. What Pi resellers published is another matter again.
ahem
https://www.raspberrypi.org/products/camera-module/
voice of supreme deity from RPi Towers wrote:if you’re interested in the nitty-gritty, you’ll want to know that the module has a five megapixel fixed-focus camera that supports 1080p30, 720p60 and VGA90 video modes, ........
I know that later when the new modes were released it capped at above, but no-one every actually modified the original... oops
Oops indeed. Never trust non-techies to write blurb!
paulhothersall wrote:
6by9 wrote:The settings OV provided for 720P60 were for quite a cropped field of view. That was not ideal and hence not made available through the Pi driver.
Actually for several uses, that cropped FOV is perfect for me. I end up with a replaced lens for "zooming in" and this would not be an issue. Please please please can you offer it as an option on the old camera module???
I'll have a look at it. If the settings actually result in frames from the sensor, then I'll add it as a new mode that has to be manually selected using "-md N" on raspistill/vid and sensor_mode property in PiCamera. It won't be selectable via V4L2 without hacking the driver.
Having looked at the numbers, it's only 32 pixels off left and right, and 504 off top and bottom, with that area then 2x2 binned. Not a huge crop, but it was going to be annoying. Some of the other settings for that mode look very dubious, so it may not be trivial to get right. Worth a quick punt though.
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.

paulhothersall
Posts: 28
Joined: Wed Jul 31, 2013 5:55 am

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 7:23 pm

6by9

Sounds great.

I have a setup of "numerous" v1 cameras and pi to test on if I can be of any help.

Also have access to a v2 as well as of 2 hours ago.

More than willing to test out various things against test charts and controlled lighting / movements to dial in any settings.

My ideal would be through picamera to make it easy scripting but using raspivid works OK as well.

User avatar
CaptSunset
Posts: 140
Joined: Fri Mar 20, 2015 2:55 pm

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 7:54 pm

jbeale wrote:I have summarized some of the new information so far here, feel free to point out errors or add detail:

http://elinux.org/Rpi_Camera_Module#Tec ... 2_board.29
Before this thread adds even more arglebargle, I'd especially like to commend JB on his efforts so far; that added information is extremely helpful just now! (I was able to include the 219 in an existing order- so free shipping!:]).

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 9:37 pm

UKSecretBases wrote:I’ve just received my v2.1 cameras (one each of the normal and Noir models). I realise I have to wait for the new libraries to roll out, in order to get the extra pixels. But I’ve noticed that the default image is horizontally flipped and the image is in reverse. So to bring it back to normal I have to use the -hf option. Bug?
It would seem this is indeed a bug.

I'm bemused how nobody spotted the fact that the image was reversed on the new 8MP camera board before it was bulk shipped to RS Components et al.

Surely it was tested before shipping? Given that all my Pi software and firmware was already up to date and I was simply dropping in the replacement camera board instead of the one I already had, it should have exhibited identical behaviour, except obviously the difference in pixels and field of view, etc.

I have bad recollections from the days of Clive Sinclair and the QL.

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 10:16 pm

UKSecretBases wrote:
UKSecretBases wrote:I’ve just received my v2.1 cameras (one each of the normal and Noir models). I realise I have to wait for the new libraries to roll out, in order to get the extra pixels. But I’ve noticed that the default image is horizontally flipped and the image is in reverse. So to bring it back to normal I have to use the -hf option. Bug?
It would seem this is indeed a bug.

I'm bemused how nobody spotted the fact that the image was reversed on the new 8MP camera board before it was bulk shipped to RS Components et al.

Surely it was tested before shipping? Given that all my Pi software and firmware was already up to date and I was simply dropping in the replacement camera board instead of the one I already had, it should have exhibited identical behaviour, except obviously the difference in pixels and field of view, etc.

I have bad recollections from the days of Clive Sinclair and the QL.
See viewtopic.php?f=43&t=145980 - yes a bug.

The lowest level sensor testing is done just on the VideoCore side without the ARM involved. That has a different board config file to the ARM build. The ARM build one had an HFlip set by default as a hacky fix for OV5647 doing the wrong thing. I am a little surprised that no comments were made by those doing image quality tuning, but there you go.
It slipped through the net - what can I say?

edit: actually it seems it's a V flip that's missing to get the same image orientation as OV5647.
Last edited by 6by9 on Tue Apr 26, 2016 10:50 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.

User avatar
CaptSunset
Posts: 140
Joined: Fri Mar 20, 2015 2:55 pm

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 10:45 pm

UKSecretBases wrote: the default image is horizontally flipped and the image is in reverse. So to bring it back to normal I have to use the -hf option.
Your order didn't include the free Looking Glass? ;)

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 10:49 pm

ethanol100 wrote:What is the maximal framerate supported for smaller images. The original camera could produce [email protected], but with the new one I can only get a maximal framerate of about 82fps. Which mode will be used for these settings? Is the [email protected] the only high framerate mode?

The image quality for the 82fps is much superior to the old one, and the [email protected] fps and [email protected] look really crispy and nice.
I've just had 86fps when requesting 90fps I420 via V4L2 and sending it to /dev/null. It is running out of steam as 80fps is spot on.
Hopefully others will have a fix in the next day or so (he said he was going to look at it tonight).
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.

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

Re: New 8MP Camera - Q&A thread

Tue Apr 26, 2016 11:09 pm

CaptSunset wrote:
UKSecretBases wrote: the default image is horizontally flipped and the image is in reverse. So to bring it back to normal I have to use the -hf option.
Your order didn't include the free Looking Glass? ;)


Alice? Alice? Who the **** is Alice?

Return to “Camera board”