Open juniorwebunitygames opened 7 years ago
Is the image coming from first or second generation of Gear360? For the second generation of Gear360 the template is still far from perfect.
And anyway - I would expect the template not to fit all photos properly.
I suspect that the Gear360 cameras are not 100% exactly same placed in all the cameras. I'm working on making a tutorial to calibrate the .pto for each camera
Correct.
I was also thinking about a tutorial how to tune the .pto
but you might actually beat me to it.
There's also a possibility to try make Hugin to automatically adjust the lens' parameters, but I expect the result to be poor.
Such a tutorial would be great. I sometimes take hundreds of pictures with a car rooftop mount so creating a pto for this purpose would be worthwhile.
very good!
Hugin video template generation.txt
That is the beginnings of the guide on how to calibrate lenses to your Samsung Gear360.
-Evert-
Can this optimizer step be included in the .cmd? I am not educated about hugin exactly works, but could you use the control points from the preset .pto, apply the transformation to get the approximate results, as it is done right now, and then run an additional hugin step that optimizes the initial estimate further, based on how well the content at the border matches? Or is there some fundamental flaw in my expectation of what hugin does/can do? Thanks
Hi,
You can't use control points from pto file to get better alignment (1). If you try to do it you would end-up with the same or similar alignment. Think about it that Hugin doesn't know anything about the image(s) behind the control points - all it does it tries its best to transform (think: adjusting some numbers) _the_controlpoints from both images so that they fit well. So... having the same control points you will end up with same/similar transformation (1) ergo same problem with alignment.
Generic solution would be to detect control points on both halves of the photo - unfortunately for double circular fish-eye it doesn't work very well (it doesn't work) - so control points have to be placed manually.
The pto files are based (mostly) on my camera, I suppose it works well for most of them, but, as someone already mentioned somewhere, every camera will differ a bit and for you the difference.
Please use this video as a starting guide: https://www.youtube.com/watch?v=QKQGT8VUN8g using your photo and add more control points, then play with optimise.
After your post I will try harder to create a better guide to creation of control points and what effect each parameter has in the optimisation pane.
(1) to be 100% correct it is theoretically possible that you could end-up with a better fit, i.e. "better" optimum solution for this optimisation problem.
L.
To extend a bit more the part about the control points, for things to work the way you think you'd have to know how those pieces have to match together to make the alignment better - for human it's easy to say, for machine - that's a pretty hard problem.
oh yes, that makes a lot of sense what you explained, thank you!
What I mostly saw as disturbing artifarct was, that horizontal lines do not match
Do you think there is a way to transform all control points in one hemisphere slightly up or down based on a parameter, to account for that, without going through the entire process of re-calibrating for every camera?
It sounds complicated though, because you can't just add a single offset to all points
There are a couple of parameters that can be adjusted and "straighten" the photo (not sure if it is always possible). But it is beyond this commend to explain it (various distortions, rotations, etc.). It looks like one lens needs more "distortion" + slight position adjustment.
What you can do - use the video tutorial, stop at the moment when two photos are added (as separate lenses) then select from File "Apply template" and select pto file apprioprate for your camera. Then select "Fast Preview panorama" (toolbar icon with "GL") and then select "Move/Drag" tab - you will be then able to move photos around by dragging them (left-click and hold).
L.
Can I also open the pto in hugin an manually adjust the control points, based on images from my camera?
Hmm... yes.
There are two ways of doing it (sorry, not verified, straight from my memory).
Method 1.
.pto
file what's the name of the image (I think it is dummy.jpg
)..pto
file in Hugin..pto
s control points.Method 2.
.pto
file will not be visible.L.
@ultramango i have gotten that far, and adjusted a few control points so far i see no effect on the outcome, but i guess once i adjusted them all correctly, it should show good results?
Once you have control points - play with "optimisation" tab/options. Or just find "Optimise" button - this should find new, hopefully, better panorama parameters.
can I also move the existing ones, by eye?
Well, best if you removed existing (I mean the "old" ones) datapoints as they apply for a different photo, not yours.
I moved some of them to better match my image, but the stitched result from your script using the new pto is exactly the same Am I missing something here?
Ensure new .pto file is saved. Check output file(s) date and time (has they really been updated)? Use "-a" parameter that will force regeneration of the files.
Edit: Works now Maybe @juniorwebunitygames my file works better for your camera too
Hi there, utack.
Once the control points are adusted, you have to run the optimize algorithms in Hugin.
Inside the .pto file there are also positions of photos relative to the anchor photo, and these values are which is used in stitching, and also are the values that are adjusted when you optimize the .pto.
Kind regards, -Evert-
On 12 December 2017 at 18:49, utack notifications@github.com wrote:
Is there some sort of cache somewhere in the chain? Because I can delete ALL control points in the pto, and it still stitches the output the same way But when I delete the .pto itself, it complains it cannot find the pto and stops
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ultramango/gear360pano/issues/27#issuecomment-351112115, or mute the thread https://github.com/notifications/unsubscribe-auth/ALfL1avVv75R2UTXNFbXWiKo9Bo8-8voks5s_q6ogaJpZM4OGWH0 .
-- Evert Vorster Isometrix Acquistion Superchief
Is it possible my lens is poorly shaped?
I have tried to set control points and optimize twice, from scratch, and wasted about 4h with this.
Every time i got a fit that worked perfectly on one stitch side, but had quite the offset on the other stitch side
Hi there.
I am sorry that you are struggling with this. My usual method for calibrating is something like this:
With a bit of practice, this will take a lot less than the four hours you already spent tryin to manually find control points. You can now check the fit but doing a stitch, and if good, you can replace the default .pto file in the ultramango with yours. I recommend making a backup of the original, of course.
-Evert-
On 15 December 2017 at 19:10, utack notifications@github.com wrote:
Is it possible my lens is poorly shaped? I have tried to set control points and optimize twice, from scratch, and wasted about 4h with this. Every time i got a fit that worked perfectly on one stitch side, but had quite the offset on the other stitch side
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ultramango/gear360pano/issues/27#issuecomment-352059759, or mute the thread https://github.com/notifications/unsubscribe-auth/ALfL1fzbZbsE8IdTkQjWYhF0borzrr5cks5tAqgRgaJpZM4OGWH0 .
-- Evert Vorster Isometrix Acquistion Superchief
@evertvorster I finally got it
Thank you for writing up this tutorial again 👍
Can I just copy and paste my custom viewfield, pitch/roll/yaw and d parameter from my photo .pto into the 4k video.pto, or is it more tricky to adopt that file? I noticed this repo has entirely different lens parmaters for photo, 4k video and 2k video .pto Thanks
It's a little more tricky than that.
You first need a .pto that has pictures in it with control points automatically selected, and the entire .pto fully optimised.
THEN you can modify the Anchor image rotations, and hit optimize positions again, which will move the other lenses in the .pto accordingly.
Of course, you can just try to modify the rotations in the original .pto and optimize positions, but your mileage might vary
-Evert-
On 26 December 2017 at 18:06, utack notifications@github.com wrote:
Can I just copy and paste my custom pitch/roll/yaw and d parameter from my photo .pto into the 4k video.pto, or is it more tricky to adopt that file? Thanks
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ultramango/gear360pano/issues/27#issuecomment-353984183, or mute the thread https://github.com/notifications/unsubscribe-auth/ALfL1Tdnkgc8wS60H3P8EUGyxh-cmj-Eks5tERl-gaJpZM4OGWH0 .
-- Evert Vorster Isometrix Acquistion Superchief
When i am trying to stitch gear360 image using command from linux. Image not join properly.