0
\$\begingroup\$

I am a newbie when it comes to using camera with microcontrollers. My question is that if a camera comes with a MIPI-CSI connector does it readily work when connected the MIPI-CSI of the microcontroller or does it need drivers to make it work? If it does require drivers, are they specific to the camera or do they come with the MCU? Also, looking at this thermal camera from AliExpress, for example, can I just plug and play, or do I need to write decoding logic to extract the frames? Will this be different if it was FLIR Boson thermal camera with MIPI-CSI?

I know I asked alot, but I want to make sure before making a purchase.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

does it readily work when connected the MIPI-CSI of the microcontroller

No, neither MIPI DSI or CSI are "plug-and-play"... there is an expectation that you know what display / camera is connected, and how to operate it. It may be possible to "probe" the device to identify it, but you then need to know how to handle it.

does it need drivers to make it work?

Yes

If it does require drivers, are they specific to the camera or do they come with the MCU?

The software is generally split into two parts (aka drivers)... one for the MIPI CSI interface / peripheral in the host, and one for the device at the other end of the link. This pattern is common for a lot of things (e.g: I2C, SPI, USB, etc...) - abstraction is used to present the host-specific interface to the partner driver in a generic way, meaning that a different MCU can be swapped in without a full re-write.

That said... if you're operating at a more "baremetal" level (rather than an OS like Zephyr, Linux, etc...), then you may find the two merge somewhat, and you don't make the concious differentiation between the two.

do I need to write decoding logic to extract the frames? Will this be different if it was FLIR Boson thermal camera with MIPI-CSI?

Quite probably - though there is often hardware support for pulling pixels out of the raw data provided. Beyond configuring both the peripheral and device correctly, you'll also need to handle whatever data is provided - cameras can have different pixel formats (e.g: RGB, YUV444, YUV422, YUV420, etc...), frame formats (e.g: pentile, planar, semi-planar, non-planar), color depths, and more... There can also be algorithms like gain control which either operate on the host (requiring dynamic configuration) or on the camera (potentially requiring you to periodically query the configuration if you're after a somewhat calibrated output, like a thermal camera).

It's a complex area, and certainly not "plug and play"...!

\$\endgroup\$
2
  • \$\begingroup\$ If the mcu already has a MIPI-CSI interface just like RPi, I assume that it already comes with drivers and we only need to call a specific function to read the data right ? But we still need to decode the data to see the image. In that case, how does RPi do it ? \$\endgroup\$ Commented Oct 13 at 5:30
  • \$\begingroup\$ The RPi will (almost certainly) be running Linux, and the model described above applies. It's not a single function call, there's more to it than that. If the camera isn't already supported (it may well be), then you'll need to add support yourself. \$\endgroup\$
    – Attie
    Commented Oct 13 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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