[libcamera-devel] Sharpness control proposal

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Jun 16 05:12:55 CEST 2020


Hi David,

On Mon, Jun 15, 2020 at 12:20:15PM +0100, David Plowman wrote:
> Hi
> 
> We're busy trying to produce libcamera-based alternatives to existing
> camera applications. One feature they quite often have is the ability to let
> the user change the image sharpness.
> 
> I note that V4L2 has a sharpness control, wherein the "minimum value"
> means no sharpening, and "larger values increase the amount of
> sharpening". Slightly in line with this, I'd like to suggest:
> 
> A sharpening control taking a float value, where:
> * A value of zero means no sharpening.
> * 1.0 applies a "reasonable" default level of sharpening.
> * We can stipulate some fairly arbitrary maximum.

Do you think we need floating point values for this, or would an integer
give enough precision ?

> Beyond this, we could recommend that the value here is loosely
> "proportional" to the amount of sharpening applied. (For the purposes
> of this definition, we might refer to the amount of sharpening as
> being the difference between a sharpened and unsharpened image.)
> 
> What do people think? I feel there is some benefit in trying to be a
> bit more prescriptive about what the control means; otherwise it
> becomes more difficult for a cross-platform application to know how to
> use it.

Overall I think your proposal is good. I also would prefer being more
prescriptive if possible. As libcamera has support for reporting default
values, we may want to specify a fixed maximum value here, and let the
default being device-specific. Or do you think we could specify both a
fixed default (1.0) and a fixed maximum ?

How is this implemented in the Rasperry Pi case, do you use an unsharpen
filter, or something different ?

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list