hugin-devs team mailing list archive
-
hugin-devs team
-
Mailing list archive
-
Message #08042
[Bug 2081969] Re: Wrong offset position when using metadata transfer
of course there is, it's the x/y position. so if you look at the exif
data in the test file i sent you, you'll see: exiftool test.tif
X Position : 0.3400000036
Y Position : 0.5933333039
which is the position of the crop. this is obvious from reading the
code:
src/hugin_base/nona/Stitcher.h line 211
exinfo.setICCProfile(remapped.m_ICCProfile);
if (opts.tiff_saveROI)
{
exinfo.setPosition(remapped.boundingBox().upperLeft());
exinfo.setCanvasSize(vigra::Size2D(opts.getWidth(), opts.getHeight()));
where the boundingBox is the crop area. my patch moves the boundingBox
to 0,0.
diff -r ce1d65275ddd src/hugin_base/nona/Stitcher.h
--- a/src/hugin_base/nona/Stitcher.h Mon Sep 16 18:10:57 2024 +0200
+++ b/src/hugin_base/nona/Stitcher.h Wed Sep 25 13:52:51 2024 +0200
@@ -211,8 +211,11 @@
exinfo.setICCProfile(remapped.m_ICCProfile);
if (opts.tiff_saveROI)
{
- exinfo.setPosition(remapped.boundingBox().upperLeft());
- exinfo.setCanvasSize(vigra::Size2D(opts.getWidth(), opts.getHeight()));
+ // save images in the ROI frame
+ vigra::Rect2D newOutRect = remapped.boundingBox();
+ newOutRect.moveBy(-opts.getROI().upperLeft());
+ exinfo.setPosition(newOutRect.upperLeft());
+ exinfo.setCanvasSize(newOutRect.size());
}
else
{
the other viewers are just ignoring the empty areas, look at the exif
data.
--
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Enblend.
https://bugs.launchpad.net/bugs/2081969
Title:
Wrong offset position when using metadata transfer
Status in Enblend:
Fix Committed
Bug description:
remapped images are exported in the reference frame of the canvas
instead of the ROI (the crop zone) resulting in bad stitches. the
attached patch fixes this (wxT() has been deprecated in wxwidgets 3.3
and is not needed anymore. i removed it only in places where i got
compile errors but if you don't use the latest wxwidgets those changes
can be ignored). this coupled with the patches for enblend/enfuse
(https://bugs.launchpad.net/enblend/+bug/2081896) should result in
good stitches again.
To manage notifications about this bug go to:
https://bugs.launchpad.net/enblend/+bug/2081969/+subscriptions
References