kopia lustrzana https://github.com/projecthorus/wenet
Add exposure compensation options
rodzic
ad4c939929
commit
7c99c0d380
|
@ -33,6 +33,11 @@ TX_IMAGE_SCALING=0.5
|
||||||
# Allowed Values: Auto, Daylight, Cloudy, Incandescent, Tungesten, Fluorescent, Indoor
|
# Allowed Values: Auto, Daylight, Cloudy, Incandescent, Tungesten, Fluorescent, Indoor
|
||||||
WHITEBALANCE=Auto
|
WHITEBALANCE=Auto
|
||||||
|
|
||||||
|
# Exposure compensation
|
||||||
|
# Allowed values: -8.0 to 8.0
|
||||||
|
# You may wish to adjust this to bump up the exposure a little.
|
||||||
|
EXPOSURE=0.0
|
||||||
|
|
||||||
# Refer near the end of this file for image flipping and overlay options
|
# Refer near the end of this file for image flipping and overlay options
|
||||||
|
|
||||||
# Baud Rate
|
# Baud Rate
|
||||||
|
@ -122,5 +127,5 @@ python3 tx_picamera2_gps.py \
|
||||||
--gps $GPSPORT \
|
--gps $GPSPORT \
|
||||||
--resize $TX_IMAGE_SCALING \
|
--resize $TX_IMAGE_SCALING \
|
||||||
--whitebalance $WHITEBALANCE \
|
--whitebalance $WHITEBALANCE \
|
||||||
--vflip --hflip \
|
--exposure $EXPOSURE \
|
||||||
$MYCALL
|
$MYCALL
|
||||||
|
|
|
@ -55,6 +55,7 @@ class WenetPiCamera2(object):
|
||||||
lens_position = -1,
|
lens_position = -1,
|
||||||
af_window = None,
|
af_window = None,
|
||||||
af_offset = 0,
|
af_offset = 0,
|
||||||
|
exposure_value = 0.0,
|
||||||
temp_filename_prefix = 'picam_temp',
|
temp_filename_prefix = 'picam_temp',
|
||||||
debug_ptr = None,
|
debug_ptr = None,
|
||||||
init_retries = 10
|
init_retries = 10
|
||||||
|
@ -106,6 +107,7 @@ class WenetPiCamera2(object):
|
||||||
self.lens_position = lens_position
|
self.lens_position = lens_position
|
||||||
self.af_window = af_window
|
self.af_window = af_window
|
||||||
self.af_offset = af_offset
|
self.af_offset = af_offset
|
||||||
|
self.exposure_value = exposure_value
|
||||||
self.af_window_rectangle = None # Calculated during init
|
self.af_window_rectangle = None # Calculated during init
|
||||||
self.autofocus_mode = False
|
self.autofocus_mode = False
|
||||||
|
|
||||||
|
@ -201,7 +203,8 @@ class WenetPiCamera2(object):
|
||||||
|
|
||||||
self.cam.set_controls(
|
self.cam.set_controls(
|
||||||
{'AwbMode': self.whitebalance,
|
{'AwbMode': self.whitebalance,
|
||||||
'AeMeteringMode': controls.AeMeteringModeEnum.Matrix
|
'AeMeteringMode': controls.AeMeteringModeEnum.Matrix,
|
||||||
|
'ExposureValue': self.exposure_value
|
||||||
#'NoiseReductionMode': controls.draft.NoiseReductionModeEnum.Off
|
#'NoiseReductionMode': controls.draft.NoiseReductionModeEnum.Off
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -267,7 +270,8 @@ class WenetPiCamera2(object):
|
||||||
# TODO - Maybe expose some of these settings?
|
# TODO - Maybe expose some of these settings?
|
||||||
self.cam.set_controls(
|
self.cam.set_controls(
|
||||||
{'AwbMode': self.whitebalance,
|
{'AwbMode': self.whitebalance,
|
||||||
'AeMeteringMode': controls.AeMeteringModeEnum.Matrix
|
'AeMeteringMode': controls.AeMeteringModeEnum.Matrix,
|
||||||
|
'ExposureValue': self.exposure_value
|
||||||
#'NoiseReductionMode': controls.draft.NoiseReductionModeEnum.Off
|
#'NoiseReductionMode': controls.draft.NoiseReductionModeEnum.Off
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -35,6 +35,7 @@ parser.add_argument("--whitebalance", type=str, default='daylight', help="White
|
||||||
parser.add_argument("--lensposition", type=float, default=-1.0, help="For PiCam v3, set the lens position. Default: -1 = Continuous Autofocus")
|
parser.add_argument("--lensposition", type=float, default=-1.0, help="For PiCam v3, set the lens position. Default: -1 = Continuous Autofocus")
|
||||||
parser.add_argument("--afwindow", type=str, default=None, help="For PiCam v3 Autofocus mode, set the AutoFocus window, x,y,w,h , in fractions of frame size. (Default: None = default)")
|
parser.add_argument("--afwindow", type=str, default=None, help="For PiCam v3 Autofocus mode, set the AutoFocus window, x,y,w,h , in fractions of frame size. (Default: None = default)")
|
||||||
parser.add_argument("--afoffset", type=float, default=0.0, help="For PiCam v3 Autofocus mode, offset the lens by this many dioptres (Default: 0 = No offset)")
|
parser.add_argument("--afoffset", type=float, default=0.0, help="For PiCam v3 Autofocus mode, offset the lens by this many dioptres (Default: 0 = No offset)")
|
||||||
|
parser.add_argument("--exposure", type=float, default=0.0, help="Exposure compensation. -8.0 to 8.0. Sets the ExposureValue control. (Default: 0.0)")
|
||||||
parser.add_argument("-v", "--verbose", action='store_true', default=False, help="Show additional debug info.")
|
parser.add_argument("-v", "--verbose", action='store_true', default=False, help="Show additional debug info.")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue