From 93a1874150bcbbee1e1607ded9adef47b820874c Mon Sep 17 00:00:00 2001 From: HamOP Date: Mon, 14 Dec 2020 21:27:18 +0100 Subject: [PATCH 1/3] Added scaling option before saving pictures This will help save space, especially with the Pi HQ cam. Binning generated moving hot pixels on my cam which were not really removed by dark frame subtraction. --- scripts/saveImageNight.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/saveImageNight.sh b/scripts/saveImageNight.sh index b902fde18..951e483cd 100755 --- a/scripts/saveImageNight.sh +++ b/scripts/saveImageNight.sh @@ -26,6 +26,11 @@ if [ "$DARK_FRAME_SUBTRACTION" = true ] ; then IMAGE_TO_USE="$FILENAME-processed.$EXTENSION" fi +# Resize the image if required +if [[ $IMG_RESIZE == "true" ]]; then + convert "$IMAGE_TO_USE" -resize "$IMG_WIDTH"x"$IMG_HEIGHT" $IMAGE_TO_USE +fi + # Crop the image around the center if required if [[ $CROP_IMAGE == "true" ]]; then convert "$IMAGE_TO_USE" -gravity Center -crop "$CROP_WIDTH"x"$CROP_HEIGHT"+"$CROP_OFFSET_X"+"$CROP_OFFSET_Y" +repage "$IMAGE_TO_USE"; From da35794e5db76ea86df1df64fbe03eb31573abbf Mon Sep 17 00:00:00 2001 From: HamOP Date: Mon, 14 Dec 2020 21:30:07 +0100 Subject: [PATCH 2/3] Added scaling option to save disk space --- scripts/saveImageDay.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/saveImageDay.sh b/scripts/saveImageDay.sh index 515930a6f..7016cd03c 100755 --- a/scripts/saveImageDay.sh +++ b/scripts/saveImageDay.sh @@ -15,6 +15,11 @@ fi IMAGE_TO_USE="$FULL_FILENAME" +# Resize the image if required +if [[ $IMG_RESIZE == "true" ]]; then + convert "$IMAGE_TO_USE" -resize "$IMG_WIDTH"x"$IMG_HEIGHT" $IMAGE_TO_USE +fi + # Crop the image around the center if required if [[ $CROP_IMAGE == "true" ]]; then convert "$IMAGE_TO_USE" -gravity Center -crop "$CROP_WIDTH"x"$CROP_HEIGHT"+"$CROP_OFFSET_X"+"$CROP_OFFSET_Y" +repage "$IMAGE_TO_USE"; From 093ff571b29055596ec1de68b6f78c6117d13b93 Mon Sep 17 00:00:00 2001 From: HamOP Date: Mon, 14 Dec 2020 21:31:51 +0100 Subject: [PATCH 3/3] Added scaling option to save disk space --- config.sh.repo | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.sh.repo b/config.sh.repo index 036da4192..735af4099 100644 --- a/config.sh.repo +++ b/config.sh.repo @@ -48,6 +48,11 @@ DAYTIME="1" # Set 24Hr capture to true to save both night and day images to disk. By default, only night images are saved. CAPTURE_24HR=false +# Resize images before cropping and saving +IMG_RESIZE=true +IMG_HEIGHT=1520 +IMG_WIDTH=2028 + # Crop the captured image, used to improve the images when using a fisheye lens CROP_IMAGE=false CROP_WIDTH=640