Raspberry PI Camera IMX219 MIPI CSI 4 Lane interface to Lattice FPGA USB 3.0 - Page 1
Forum section: electronics / general

author: RoadRunner
author_rank: Frequent Contributor
timestamp: February 16, 2020, 09:43:13 pm
content: Since quite some time i have been involved with different type of camera sensors and interfacing to to various processors. In my recent project i took Raspberry PI Camera Sony IMX219 MIPI CSI and interfaced to FPGA and streamed over USB3.0 Link.There are many MIPI CSI to parallel bridge designs available from many FPGA manufacturer but none of them are open source they either have some blackbox modules or uses some very application specific processor. So i made this design with cheap Lattice MachXO3LF FPGA.I made my own camera board around the sensor from raspberry pi. As turned out IMX219 is 4 lane camera but raspberry pi's board only uses 2 lane mipi and I wanted 4 so that i can run mipi clock slower but still get full performance out of the camera.This project is still work in progress, Image Quality, Maximum frame rate and Max resolution need improvement.Project has seen few improvents since start, Can capture From VGA to Full 8Mpixel Video Stream, Frame rate ranging from 15 to 1000 FPS.Now auto exposure and auto white blance correction is the next target to further improve Image Quality.more details about the project can be found on my bloghttps://www.circuitvalley.com/2020/02/imx219-camera-mipi-csi-receiver-fpga-lattice-raspberry-pi-camera.htmlhttps://www.circuitvalley.com/2020/02/diy-imx219-4-lane-mipi-breakout-board-raspberry-pi-camera-fpga-4-lane-mipi-csi.htmlI have published few youtube videos, but i am still new bie to videos. Test are shown sensor FPS from 15 To 1000FPS from this tiny camera

author: laugensalm
author_rank: Regular Contributor
timestamp: February 27, 2020, 02:56:19 pm
content: That's some solid work, nice job! Good to see more MIPI implementations out in the open source..

author: Scrts
author_rank: Frequent Contributor
timestamp: March 03, 2020, 05:40:18 pm
content: Good job! If it was me, I would probable have gone with Cypress CX3...

author: RoadRunner
author_rank: Frequent Contributor
timestamp: March 04, 2020, 08:16:47 am
content: Quote from: Scrts on March 03, 2020, 05:40:18 pmYes I thought of doing that as well. But there are few issues.I wanted to have this camera as UVC so that I need not to implement any custom solution on PC side. As this camera only output raw and UVC does not support RAW. So if I would have gone with CX3. I need to implement a application on the PC side to convert from RAW to usable format. Then i would have also need to implement my solution for controlling camera exposure and gain.Second problem was availability of development board, FX3 board costs just a fraction of what a CX3 board goes for. Making custom board was a somewhat hassle with BGA and stuff.But one very significant advantage CX3 would have offered, MAX theoretical bandwidth is higher compare to FX3. As with FX3 it is limited by 100Mhz 32bit GPIF, while CX3 does have this bottle neck so can go higher up to what USB 3.0 Allows.Regards

author: RoGeorge
author_rank: Super Contributor
timestamp: March 04, 2020, 08:39:32 am
content: Nice!Couldn't spot any, does your blog have an RSS/ATOM feed, please? I would like to subscribe to it.

author: RoadRunner
author_rank: Frequent Contributor
timestamp: March 04, 2020, 08:57:39 am
content: Quote from: RoGeorge on March 04, 2020, 08:39:32 amThanksI have just added subscription button to Top Right hand side.Hers is the linkhttp://feeds.feedburner.com/circuitvalley/bkTd

author: RoGeorge
author_rank: Super Contributor
timestamp: March 04, 2020, 10:20:20 am
content: Added, thank you.Just FYI, my uBlock Origin blocks the two buttons like they were Facebook buttons or something, but I can still read the "Subscribe To Embedded Engineering Blog" label, which is a good hint there might be some blocked content there. I didn't noticed uBlock to be doing that with feed buttons from other blogs.

author: RoadRunner
author_rank: Frequent Contributor
timestamp: March 04, 2020, 10:25:29 am
content: Quote from: RoGeorge on March 04, 2020, 10:20:20 amThanks for heads up , will check whats wrong.

author: Vcky_electro
author_rank: Contributor
timestamp: March 20, 2020, 06:23:36 pm
content: Great job.1000fps is really awesome..

author: jackthomson43
author_rank: Contributor
timestamp: May 03, 2020, 05:22:52 am
content: Great Job. I just Love the open source stuff. I have once tried to achieve it withMicrocontrollerbut couldn't, for cameras we have to use microprocessors.

author: Gloria
author_rank: Newbie
timestamp: June 09, 2021, 07:46:12 am
content: Hi,I am implementing the imaged display by zynqberry (FPGA) + imx219. The basic implementation scheme is csi2-rx + vdma + hdmi.Hoever, the color of the image on the monitor is bad.I do not know what I can to improve the quality of the image.One picture is from my phone and one picture is from FPGA. What should I do to make the picture from FPGA become the picture from my phone?

author: RoadRunner
author_rank: Frequent Contributor
timestamp: June 09, 2021, 08:58:14 am
content: Rasperry pi perform some color correction, You can look at pydng project how to fix color. Image with my design was also a bit yellowed and washed out. You can need do color correction and also black level correction. It is going to be a color matrix operation.Is your design open source ?

author: Gloria
author_rank: Newbie
timestamp: June 09, 2021, 09:06:14 am
content: Hi,I understand. I will try in my further study, for I am a beginner of zynq.Yes, my project is open source. The board is TE0726-03M zynqberry which provides the csi interface.

author: RoadRunner
author_rank: Frequent Contributor
timestamp: June 09, 2021, 09:10:06 am
content: Quote from: Gloria on June 09, 2021, 09:06:14 amCan you please point out where source is available?

author: Gloria
author_rank: Newbie
timestamp: June 09, 2021, 09:13:09 am
content: I reference the demo provided by the board.I would like to share with you if you like.