Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8093

Camera board • Re: ScalerCrops min and max values

$
0
0
Hi, I think the root cause of the problem is that the libcamera API doesn't support controls that have a vector of rectangles (two in this case) very well. So the min/max/default values for "ScalerCrops" don't really work. Instead, the first value is not the "min" but the maximum set of values that will give you an un-squished image for the "main" stream. The second value again is not the "max", but the maximum set of values for an un-squished "lores" stream. These are the values that will get set up for you by default if you don't force anything different. I think the third value doesn't really mean anything.

If you actually want to get min/max values, look at the regular "ScalerCrop". The values reported here are for the main stream, but probably give you an idea for the other one too. These values don't take any account of the aspect ratio, but the the final "default" value does, and should in fact match what you see as the first value in picam2.camera_controls['ScalerCrops'].

In your case, both your streams have the same aspect ratio, so the maximum crop that gives you an un-squished image will be the same.

I hope that makes at least a little bit of sense, but I won't deny that things are a bit confusing here! Really, there needs to be some kind of internal API revision if we were to make this work "properly".

Statistics: Posted by therealdavidp — Wed Feb 04, 2026 8:47 am



Viewing all articles
Browse latest Browse all 8093

Trending Articles