jmmec wrote:I should have been clearer about how I captured the mode 1 and mode 2 videos:
1. I didn't specify the height / width resolution in my usage of raspivid. I re-ran the raspivid commands (from my original post) to get the "-v" output, and it says that it is capturing both videos (mode 1 and mode 2) at 1920x1080 resolution. It also says 25fps for mode 2, but I think it is just repeating the command line arguments since max is 15fps.
2. I took both 1920x1080 resolution videos and used Shotcut to downsample them to 1280x720 to reduce the file sizes. I'm using an LTE wireless connection and wanted to save a bit of data transfer costs.
Unfortunately that means that I can't tell whether any lack of sharpness is due to the image processing or the resize in Shotcut.
jmmec wrote:Regarding the two video captures in my original post:
I was surprised by the dramatically different fields of view between mode 1 and mode 2 since I thought both were being captured at 1920x1080 resolution as reported by raspivid? I've read the excellent PiCamera documentation, but still don't quite understand why there is such an extreme difference between the two modes? I'd prefer to use mode 1 (at 25fps) if I could get the same field of view as when using mode 2 or 3 (at 15fps), but I get something entirely different in mode 1. If "it is what it is" and I'm not doing something wrong, then I'll use mode 2 @ 15fps since it is quite good.
Fundamentally you have an analogue to digital converter inside the sensor that has a maximum sample rate, so there is an absolute maximum number of pixels per second that can be read out.(1)
3280x2464x15 = 119,854,080 pixels/s, so that is the current limit(2). 120MPix/s is also the conservative limit for the image processing pipe.
Binning combines 4 pixels (arranged as 2x2) of the same colour into one conversion, but takes 3280x2464 down to 1640x1232 which is below 1080P so no use here.
Now admittedly 1920x1080x30 = 62,208,000 pixels/s, so there would be scope for increasing the resolution and field of view of mode 1 whilst still achieving 30fps. I suspect that those writing the driver were given a register set by Sony which read out a centre-cropped [email protected]
and that is what you have as mode 1. It would be possible to tweak it up to a crop of 2592x1458 @ 30fps (113,374,080 pixels/sec), but didn't (it'd be approx the same FOV as the current mode 6). Changing it now would upset anyone who has carefully set their camera up on a scene using mode 1. Mode 3 is effectively redundant on the V2 camera, so that could be repurposed with minimal upset, but I'm not desperate to go playing with camera register sets again.
Sorry, this is all set up in the closed source firmware so no option for general tinkering.
(1) There is also a restriction that the CSI2 bus can "only" run at 1Gbit/s per lane, and we have 2 lanes. Not a problem here, but it is on other sources with more than 10bits/pixel.
(2) The datasheet does list a max pixel frame rate of 280MPix/s = 8MPix @ 35fps, but I suspect that requires 4 CSI-2 lanes which we don't have on Pi. It would certainly be exceeding the ISP throughput though, and almost no other part of the hardware will cope with that resolution/framerate either.
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.