update for payload

picamera2
Mark Jessop 2023-02-18 16:15:54 +10:30
rodzic 75d3c6268f
commit a79777efd0
2 zmienionych plików z 271 dodań i 270 usunięć

Wyświetl plik

@ -38,7 +38,7 @@ class WenetPiCamera2(object):
callsign = "N0CALL",
tx_resolution=(1936,1088),
num_images=1,
image_delay=0.5,
image_delay=0.0,
vertical_flip = False,
horizontal_flip = False,
greyworld = False,
@ -81,7 +81,6 @@ class WenetPiCamera2(object):
self.image_delay = image_delay
self.callsign = callsign
self.tx_resolution = tx_resolution
self.src_resolution = src_resolution
self.horizontal_flip = horizontal_flip
self.vertical_flip = vertical_flip
self.greyworld = greyworld
@ -96,21 +95,23 @@ class WenetPiCamera2(object):
self.camera_properties = self.cam.camera_properties
self.src_resolution = self.camera_properties['PixelArraySize']
self.debug_ptr("Camera Resolution: " + str(self.camera_properties['PixelArraySize']))
# Configure camera.
capture_config = picam2.create_still_configuration(
capture_config = self.cam.create_still_configuration(
transform=Transform(hflip=self.horizontal_flip, vflip=self.vertical_flip)
)
self.cam.configure(capture_config)
self.cam.set_controls(
{'AwbMode': controls.AwbModeEnum.Daylight,
'AeMeteringMode', controls.AeMeteringModeEnum.Matrix}
'AeMeteringMode': controls.AeMeteringModeEnum.Matrix,
'NoiseReductionMode': controls.draft.NoiseReductionModeEnum.Off}
)
# Set Pi Camera 3 lens position
if 'LensPostion' in self.cam.camera_controls:
if 'LensPosition' in self.cam.camera_controls:
self.debug_ptr("Configured lens position to " + str(self.lens_position))
self.cam.set_controls({"AfMode": controls.AfModeEnum.Manual, "LensPosition": self.lens_position})
# Start the 'preview' mode, effectively opening the 'shutter'.

Wyświetl plik

@ -135,7 +135,7 @@ def post_process_image(filename):
gps_string = ""
# Build up our imagemagick 'convert' command line
overlay_str = "convert %s -gamma 0.8 -font Helvetica -pointsize 30 -gravity North " % filename
overlay_str = "convert %s -gamma 0.8 -font Helvetica -pointsize 40 -gravity North " % filename
overlay_str += "-strokewidth 2 -stroke '#000C' -annotate +0+5 \"%s\" " % gps_string
overlay_str += "-stroke none -fill white -annotate +0+5 \"%s\" " % gps_string
# Add on logo overlay argument if we have been given one.