#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2022, Paul Elder # # rkisp1.py - Tuning script for rkisp1 import sys import libtuning as lt from libtuning.parsers import YamlParser from libtuning.generators import YamlOutput from libtuning.modules.lsc import LSCRkISP1 tuner = lt.Tuner('RkISP1') tuner.add(LSCRkISP1( debug=[lt.Debug.Plot], # This is for the actual LSC tuning, and is part of the base LSC # module. rkisp1's table sector sizes (16x16 programmed as mirrored # 8x8) are separate, and is hardcoded in its specific LSC tuning # module. sector_shape=(17, 17), sector_x_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront), sector_y_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront), # This is the function that will be used to average the pixels in # each sector. This can also be a custom function. sector_average_function=lt.average.Mean(), # This is the function that will be used to smooth the color ratio # values. This can also be a custom function. smoothing_function=lt.smoothing.MedianBlur(3), )) tuner.set_input_parser(YamlParser()) tuner.set_output_formatter(YamlOutput()) tuner.set_output_order([LSCRkISP1]) if __name__ == '__main__': sys.exit(tuner.run(sys.argv)) epro'>jmondi/android/ndk/pinephonepro Jacopo Mondi's clone of libcameragit repository hosting on libcamera.org
summaryrefslogtreecommitdiff
path: root/src/libcamera/gen-controls.py
blob: 940386cc68c83b652b3b4014f1e8b5fa96101310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123