LinuxFanatic777
Posts: 9
Joined: Fri Nov 15, 2013 9:35 am

Change resolution and transfer rate

Sat Mar 30, 2019 2:50 pm

Is it possible to control actual resolution of camera image? There is need to set up 320x240. I see -w and -h options, but wonder - is this change actual number on lines and columns that being transferred from camera?

Another problem - I need to set lower speed of transfer, to reduce it to 100-110 mbit/s. I didn't found any options, also I did searching over rpi_userland/host_applications/linux/apps/raspicam/ source code. Where transfer rate mbps being set in these files?

User avatar
HermannSW
Posts: 1509
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Change resolution and transfer rate

Sat Mar 30, 2019 5:46 pm

LinuxFanatic777 wrote:
Sat Mar 30, 2019 2:50 pm
Is it possible to control actual resolution of camera image?
You control what the camera sends to the GPU with the modes.
There is need to set up 320x240. I see -w and -h options, but wonder - is this change actual number on lines and columns that being transferred from camera?
No, the camera send the number of lines for the mode you selected to GPU, but then the GPU does a transformation to what you specified with -w/-h (by default the GPU scales to 1920x1080 for any mode you select, so best is to specify what you want).
Another problem - I need to set lower speed of transfer, to reduce it to 100-110 mbit/s. I didn't found any options, also I did searching over rpi_userland/host_applications/linux/apps/raspicam/ source code. Where transfer rate mbps being set in these files?
If you select 320x240, then only that smaller amount of data that comes out of GPU needs to be transferred over the network.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

LinuxFanatic777
Posts: 9
Joined: Fri Nov 15, 2013 9:35 am

Re: Change resolution and transfer rate

Sun Mar 31, 2019 11:12 am

HermannSW wrote:
Sat Mar 30, 2019 5:46 pm
You control what the camera sends to the GPU with the modes.
How to do that through raspistill application? I am able to modify and recompile this application. Source code too complicated, it's hard to find that place.

I thinking about to make independent I2C master and control sensor by my own hands and custom commands.
HermannSW wrote:
Sat Mar 30, 2019 5:46 pm
No, the camera send the number of lines for the mode you selected to GPU, but then the GPU does a transformation to what you specified with -w/-h (by default the GPU scales to 1920x1080 for any mode you select, so best is to specify what you want).
That's bad :(
During my searches in source code I see that it receives full HD picture and then scales it down to specified resolution...
HermannSW wrote:
Sat Mar 30, 2019 5:46 pm
If you select 320x240, then only that smaller amount of data that comes out of GPU needs to be transferred over the network.
I understand this, but since my purpose is to create my own MIPI CSI-2 source in FPGA, to be able to debug I need lower physical LVDS stream speed. Of course I can buy license of CSI-2 core for any FPGA vendor and it's done, but I need my own CSI-2 transmitter. RPi used for debugging purpose.

P.S.
Evaluation of some CSI-2 core helped my to understand protocol, CRC, timings and everything. Just trying to capture it inside RPi board...

Doub
Posts: 24
Joined: Fri Apr 07, 2017 9:48 pm

Re: Change resolution and transfer rate

Sat Apr 06, 2019 12:57 am

As far as I understand the MMAL pipeline which raspivid uses only support the two official cameras, so I'm not sure you can use this to read data from your FPGA, unless it emulates one of the official cameras. I think there are other ways to get the CSI data from Linux without using the MMAL stack, but I'm not entirely sure.

That being said, to set the capture mode of raspivid, you need to use the -md or --mode option (type "raspivid" without arguments to see the command line help). See this page for a list of supported modes for the two official cameras. The lowest resolution there is 640x480, but you might have slower bitrates with one of the other modes.

Return to “Camera board”