Ask Your Question
1

Stitcher module for non-linear stitching

asked 2015-06-09 02:41:23 -0500

bjorn89 gravatar image

updated 2015-06-10 10:35:36 -0500

Hi all, this is a very particular question. I have some picture taken by a flying drone, and I need to stitch them together. Could the built in stitcher module stitch non linear images? To better explain myself, i made these "images"

image description image description

the black line is the drone trajectory (so are the frames) and the white part of the images should remain black because I haven't pictures for that part.

Is this possible? What are good parameter for the stitcher to make this happen?

EDIT Suppose my drone fly above this area image description

And the path that my drone do is this image description

but it does the path in 3 times, so I have these image description image description image description

can the built in stitcher module produce this mosaic? image description

*EDIT 2 * Finally the built in stitching module worked! But I obtain image with this kind of error: image description

How can I fix that?

edit retag flag offensive close merge delete

Comments

1

Can't you fabricate a desired example with paint or photoshop and add that instead? Your explanation is not very clear for now.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-06-09 04:28:46 -0500 )edit

Sure, later I'll edit the post with the information you required ;)

bjorn89 gravatar imagebjorn89 ( 2015-06-09 06:02:47 -0500 )edit

I'm not a specialist of stitching but my results with two images are here or here With image on left I haven't got any success

LBerger gravatar imageLBerger ( 2015-06-09 14:06:42 -0500 )edit

I'm using opencv 3 with the default stitcher and it doesn't work!

bjorn89 gravatar imagebjorn89 ( 2015-06-09 14:56:38 -0500 )edit

Why do you mean by it doesn't work? with sample/cpp/stitching_detailed.cpp it works with two images. With left image I have result but it's not good at all!

A problem is that both images are compressed only in y direction.I think that we are not verify a Pure 3D rotation. In your case may be you can match some features and after ony use a translation and no rotation

Your drone works like a scanner so you cannot use stitching algorithm. You need intrensic camera parameter, coorect your image logk for matching and just translate and zoom

LBerger gravatar imageLBerger ( 2015-06-09 15:15:01 -0500 )edit

@LBerger I'm not using the stitching_detailed but the Stitcher class! How do I get the intrinsic camera parameters? By the way, when I create the mini-mosaics, it works pretty well, but it's my code, not the built in stitcher because I'm creating the mosaic frame by frame!

bjorn89 gravatar imagebjorn89 ( 2015-06-10 01:56:53 -0500 )edit

What you should do is manually define regions of interest that you want to map and then it should work. define the end of streak one as region one. The beginnen of streak 2 as region 2. Then apply feature matching on both regions and then calculate a transformation matrix. Apply that and merge. You will need some elements from stiching pipeline.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-06-10 03:27:00 -0500 )edit

The problem is that in my case it should be an automatic process, so I can't define manually the regions :S

bjorn89 gravatar imagebjorn89 ( 2015-06-10 04:38:22 -0500 )edit

You can define them automatically. For example the last 5 seconds that you flew in one direction before switching to a second direction. No manual input needed at all.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-06-10 06:21:41 -0500 )edit

Mmmm it sounds interesting! For getting automatically the direction, can I do a control on the mini-mosaic size? To better explain: if it's higher than the previus frame i'm going up/down and if it's larger I'm going left/right. It sounds correct to you? There are more precise method? The task hasn't to be in real time!

bjorn89 gravatar imagebjorn89 ( 2015-06-10 06:38:47 -0500 )edit

1 answer

Sort by » oldest newest most voted
4

answered 2015-06-10 02:23:47 -0500

LBerger gravatar image

updated 2015-06-13 02:13:37 -0500

Stitcher class is only a short cut of the entire stitching pipeline. Again your pictures are not panoramic as it is defined in this document p8 or in this link giving by @thdrksdfthmn

If it works I don't understand! I haven't study Ba_refine parameters (may be don't fit some parameters in extrinsic matrix) but its changes many thing With ba_refine_mask=100100 image description and ba_refine_mask=100000 image description

and first sample image description

edit flag offensive delete link more

Comments

So how can I stitch togheter planar images? I've both intrinsic parameters of camera and distortion coefficients (both calculated with the opencv example)

bjorn89 gravatar imagebjorn89 ( 2015-06-10 14:15:19 -0500 )edit

I think so. You have to make new image using this parameters. After you look for features (sift, orb akaze..) and match them. My hypothesis is that your drone can rotate in 2d or change altitude and translation. After matching you have to fit this parameter and apply this transformation. I think you have to rewrite a new pipeline but you can keep many part from stitching pipeline.

I think I would study this algorithm : it is in my own pipeline!

LBerger gravatar imageLBerger ( 2015-06-10 15:25:59 -0500 )edit

The fact is that I'm already using these parameter to correct lens distortion, so I can't really figure out why is not working (I'm sorry xD). The big problem is that I have no time to rewrite a pipeline (I've a big delay with this work). Do you know any tool/library that do this through cli so I can call it from my c++ program?

bjorn89 gravatar imagebjorn89 ( 2015-06-11 02:06:11 -0500 )edit

You could try Hugin CLI.

Eduardo gravatar imageEduardo ( 2015-06-11 03:21:27 -0500 )edit

I understand your doubt about my answer. I have try to change parameter in function adjuster->setRefinementMask(refine_mask); and here and results changes and here refinementmask=101010

LBerger gravatar imageLBerger ( 2015-06-11 04:29:11 -0500 )edit

I've obtained this with Hugin https://mega.co.nz/#!H0ghUYKL!JmsrOPE... , but I had used the program itself (not calling it from my c++ program). How could be that opencv stitching module can achieve these results?

bjorn89 gravatar imagebjorn89 ( 2015-06-11 10:19:14 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-06-09 02:41:23 -0500

Seen: 13,940 times

Last updated: Jun 13 '15