From 6ac50b69f2f75efb706a76e9a69f1448d7570bad Mon Sep 17 00:00:00 2001 From: Marc Aubreville Date: Fri, 28 Jun 2024 15:47:08 +0200 Subject: [PATCH] Added all registration parameters to (collapsed) UI element. --- .../images/templates/images/imageset_v2.html | 82 +++++++++++++++++++ exact/exact/images/views.py | 15 +++- 2 files changed, 96 insertions(+), 1 deletion(-) diff --git a/exact/exact/images/templates/images/imageset_v2.html b/exact/exact/images/templates/images/imageset_v2.html index 98ad87dd..687b9bd3 100644 --- a/exact/exact/images/templates/images/imageset_v2.html +++ b/exact/exact/images/templates/images/imageset_v2.html @@ -379,6 +379,88 @@

{{imageset.name}} : Registration
+ + +
+
+ + + + + + + + + + + +
+ maxFeatures: + +
thumbnail_size + x + +
+ filter outliers: + +
+ use_gray: + +
+ target_depth: + +
+ point_extractor + + +
+ feature matching + + +
scale
+
+
diff --git a/exact/exact/images/views.py b/exact/exact/images/views.py index 4e8e2e0b..276c658c 100644 --- a/exact/exact/images/views.py +++ b/exact/exact/images/views.py @@ -727,12 +727,25 @@ def view_imageset(request, image_set_id): image_registration = ImageRegistration.objects.filter(source_image=source_image, target_image=target_image).first() + maxFeatures=int(request.POST['maxFeatures']) + thumbnail_size=(int(request.POST['thumbnail_size_1']),int(request.POST['thumbnail_size_2'])) + filter_outliner=int(request.POST['filter_outliner']) + maxFeatures=int(request.POST['maxFeatures']) + use_gray=int(request.POST['use_gray']) + target_depth=int(request.POST['target_depth']) + point_extractor='orb' if (request.POST['point_extractor'] == 'orb') else 'sift' + flann=1 if (request.POST['flann']=='1') else 0 + scale=float(request.POST['scale']) + + # register the two images if image_registration is None: image_registration = ImageRegistration(source_image=source_image, target_image=target_image) - image_registration.perform_registration() # use default parameters for now + image_registration.perform_registration(maxFeatures=maxFeatures, thumbnail_size=thumbnail_size, filter_outliner=filter_outliner, + use_gray=use_gray, target_depth=target_depth, point_extractor=point_extractor, flann=flann, + scale=scale) # use default parameters for now image_registration_src = ImageRegistration.objects.filter(source_image_id__in=imageset.images.all()) image_registration_trg = ImageRegistration.objects.filter(target_image_id__in=imageset.images.all())