4

What is the speed of the CSI interface and cable? I'm looking for an answer that is in either x kb/sec or x secs/picture.

  • 1
    "x secs/picture" is a higher level abstraction that would apply to the hardware on the other side of the connector and cable, and not the connection itself. Could the SoC/GPU handle the "practical limit of 2 Gbps" indicated by goobering if it is engaged in making a "picture"? Some kind of DMA transfer to an output at that speed may or may not be possible but the board probably isn't built for it. The real speed bottleneck with the pi camera, however, is I think the camera itself. – goldilocks Jul 25 '16 at 19:34
  • 1
    I'm seeing comments on the raspberrypi.org forum that suggest 100-120fps @ 720P (although it may be necessary to overclock). At 10 bits per pixel / 120fps / 720P, that should get you to a maximum of 1.10592Gbps. – goobering Jul 25 '16 at 22:04
  • 1
    Which brings you back to, "Where is the data going"? If you are streaming it over a network, you're obviously constrained by that speed. If you are writing it to storage, you are constrained by that. I guess the fastest rate would be to a local display, in which case it has to be in a format native to the GPU, and maybe you could get 100+ fps @720p that way. What the actual data rate that corresponds to I'm not sure; network streaming (which adds a bit of overhead) using mjpeg (which includes some compression) – goldilocks Jul 25 '16 at 23:00
  • 1
    ...can be done at 1080p 30fps and that's somewhere around 10-12 MB/s, which anecdotally for me seems to be pushing the bounds of what the board can stream by whatever means. Writing to the SD card won't much exceed 20 MB/s (you'll have to hunt down the right card); USB attached storage can be faster (and less picky hardware wise) -- again anecdotally by maybe 50% at the absolute best, which is still quite a bit less than a theoretical 200+ MB/s maximum for USB 2.0. – goldilocks Jul 25 '16 at 23:01
  • 2
    What goes over the CSI cable is rarely what the end user wants to deal with; the CSI cable streams lines of compacted 10-bit bayer data to the ISP in the GPU for processing which then handles de-mosaic, gain control and all that good stuff, hopefully handing your code a nice complete frame of data at the end. The major limit in almost any pure processing application is the speed of the CPU (slow compared to the GPU) or memory transfer bottlenecks. The latter can be somewhat mitigated with certain tricks (e.g. MMAL's zero-copy flag). – Dave Jones Jul 26 '16 at 8:12
3

petervis.com suggests a practical limit of 2Gbps:

The Raspberry Pi CSI connector is a surface mount ZIF 15 socket, used for interfacing a camera through a ribbon cable. The CSI-2 specifications are very detailed and describe the physical layer known as D-PHY2. The signalling scheme of this physical layer, known as Low Voltage Differential Signalling (SubLVDS), is a modified version of the IEEE1596.3 LVDS specification. It is a system for low voltage 1.2 V applications, allowing data rates of up to 800 Mbps per lane with 1 Gbps set as a practical limit. In practice, the data rate can vary a lot and depends upon the quality of the interconnections. A maximum of four physical data lanes are allowable in this specification, however two are available for the Raspberry Pi

  • What is a realistic limit (normal not optimal conditions) This device will be used in the elements, it would be great to see a guaranteed speed. – Human Jul 25 '16 at 20:58
  • Unfortunately data seems thin on the ground. Per goldilocks comment below the question, I would be pretty surprised if you swamped this interface before you swamped the Pi's ability to deal with the incoming deluge. The SD card bus is fairly slow, which is going to make storage difficult at ludicrous rates. I'm not at all sure the Pi's CPU is up to real-time processing of maximum resolution (3240 * 2464) video at 15fps. Unless you're trying something excitingly original the interface should handle it. – goobering Jul 25 '16 at 21:55
  • Just for a 1000x1000 image? I am required to get this information. – Human Jul 26 '16 at 1:35
  • For different resolutions, just change the calculation values: pixel width x pixel height x bits per pixel x frames per second = bits per second. Divide bits per second by 1,000,000,000 to get Gbps. Because it's a non-standard resolution there's no documentation specifically for 1000 x 1000, but I suspect you'll finish up with a cropped 1920x1080. That would limit you to around 30fps: The Pi uses 10 bits per pixel, so: (1000 pixels x 1000 pixels x 10 bits per pixel x 30 frames per second) / 1000000000 = 300 Mbps / 0.3Gbps – goobering Jul 26 '16 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.