diff --git a/indi_allsky/flask/forms.py b/indi_allsky/flask/forms.py index 3297948b6..2bf5a631a 100644 --- a/indi_allsky/flask/forms.py +++ b/indi_allsky/flask/forms.py @@ -3422,4 +3422,5 @@ class IndiAllskyImageProcessingForm(FlaskForm): IMAGE_ALIGN_POINTS = IntegerField('Alignment points', validators=[DataRequired(), IMAGE_ALIGN_POINTS_validator]) IMAGE_ALIGN_SOURCEMINAREA = IntegerField('Minimum point area', validators=[DataRequired(), IMAGE_ALIGN_SOURCEMINAREA_validator]) #IMAGE_STACK_SPLIT = BooleanField('Stack split screen') + PROCESSING_SPLIT_SCREEN = BooleanField('Split screen') diff --git a/indi_allsky/flask/templates/imageprocessing.html b/indi_allsky/flask/templates/imageprocessing.html index afc5a60c0..208e953e2 100644 --- a/indi_allsky/flask/templates/imageprocessing.html +++ b/indi_allsky/flask/templates/imageprocessing.html @@ -92,6 +92,23 @@
+ +
{{ form_image_processing.DETECT_MASK.label(class='col-form-label') }} @@ -596,6 +613,7 @@
These options are applied to the unprocessed image automatically
'IMAGE_STRETCH__MODE1_ENABLE', 'AUTO_WB', 'IMAGE_STACK_ALIGN', + //'PROCESSING_SPLIT_SCREEN', ]; var fields = {}; diff --git a/indi_allsky/flask/views.py b/indi_allsky/flask/views.py index 0f339c5a1..1ab93b24c 100644 --- a/indi_allsky/flask/views.py +++ b/indi_allsky/flask/views.py @@ -3554,6 +3554,7 @@ def get_context(self): 'IMAGE_ALIGN_DETECTSIGMA' : self.indi_allsky_config.get('IMAGE_ALIGN_DETECTSIGMA', 5), 'IMAGE_ALIGN_POINTS' : self.indi_allsky_config.get('IMAGE_ALIGN_POINTS', 50), 'IMAGE_ALIGN_SOURCEMINAREA' : self.indi_allsky_config.get('IMAGE_ALIGN_SOURCEMINAREA', 10), + 'PROCESSING_SPLIT_SCREEN' : False, } # SQM_ROI @@ -3658,6 +3659,7 @@ def dispatch_request(self): p_config['IMAGE_ALIGN_POINTS'] = int(request.json['IMAGE_ALIGN_POINTS']) p_config['IMAGE_ALIGN_SOURCEMINAREA'] = int(request.json['IMAGE_ALIGN_SOURCEMINAREA']) p_config['IMAGE_STACK_SPLIT'] = False + p_config['PROCESSING_SPLIT_SCREEN'] = bool(request.json.get('PROCESSING_SPLIT_SCREEN', False)) # SQM_ROI diff --git a/indi_allsky/processing.py b/indi_allsky/processing.py index 7ee1607a5..e73ca7481 100644 --- a/indi_allsky/processing.py +++ b/indi_allsky/processing.py @@ -881,7 +881,7 @@ def stack(self): if self.config.get('IMAGE_STACK_SPLIT'): - self.image = self._splitscreen(i_ref['hdulist'][0].data, self.image) + self.image = self.splitscreen(i_ref['hdulist'][0].data, self.image) stack_elapsed_s = time.time() - stack_start @@ -1466,14 +1466,14 @@ def scale_image(self): self.image = cv2.resize(self.image, (new_width, new_height), interpolation=cv2.INTER_AREA) - def _splitscreen(self, original_data, stacked_data): + def splitscreen(self, original_data, new_data): # if flip horizontal is set, this data will swap sides later if self.config.get('IMAGE_FLIP_H'): - left_data = stacked_data + left_data = new_data right_data = original_data else: left_data = original_data - right_data = stacked_data + right_data = new_data image_height, image_width = left_data.shape[:2] @@ -2362,7 +2362,7 @@ def stretch(self): if is_stretched and self.config.get('IMAGE_STRETCH', {}).get('SPLIT'): - self.image = self._splitscreen(self.image, stretched_image) + self.image = self.splitscreen(self.image, stretched_image) return diff --git a/testing/align_rolling.py b/testing/align_rolling.py index 17834f017..f160743bf 100755 --- a/testing/align_rolling.py +++ b/testing/align_rolling.py @@ -169,7 +169,7 @@ def main(self, inputfiles): if self.split_screen: - stacked_img = self._splitscreen(reference_hdulist[0].data, stacked_img) + stacked_img = self.splitscreen(reference_hdulist[0].data, stacked_img) stacked_bitdepth = self._detectBitDepth(stacked_img) @@ -260,7 +260,7 @@ def _crop(self, image): ] - def _splitscreen(self, left_data, right_data): + def splitscreen(self, left_data, right_data): image_height, image_width = left_data.shape[:2]