简体   繁体   中英

C++ OpenCV sky image stitching

Some background: Hi all! I have a project which involves cloud imaging. I take pictures of the sky using a camera mounted on a rotating platform. I then need to compute the amount of cloud present based on some color threshold. I am able to this individually for each picture. To completely achieve my goal, I need to do the computation on the whole image of the sky. So my problem lies with stitching several images (about 44-56 images). I've tried using the stitch function on all and some subsets of image set but it returns an incomplete image (some images were not stitched). This could be because of a lack of overlap of something, I dunno. Also the output image has been distorted weirdly (I am actually expecting the output to be something similar to a picture taken by a fish-eye lense).

The actual problem: So now I'm trying to figure out the opencv stitching pipeline. Here is a link: http://docs.opencv.org/modules/stitching/doc/introduction.html

Based on what I have researched I think this is what I want to do. I want to map all the images to a circular shape, mainly because of the way how my camera rotates, or something else that has uses a fairly simple coordinate transformation. So I think I need get some sort of fixed coordinate transform thing for the images. Is this what they call the homography? If so, does anyone have any idea how I can go about my problem? After this, I believe I need to get a mask for blending the images. Will I need to get a fixed mask like the one I want for my homography?

Am I going through a possible path? I have some background in programming but almost none in image processing. I'm basically lost. TT

"So I think I need get some sort of fixed coordinate transform thing for the images. Is this what they call the homography?"

Yes, the homography matrix is the transformation matrix between an original image and the ideal result. It warps an image in perspective so it can fit in stitching to the other image.

"If so, does anyone have any idea how I can go about my problem?"

Not with the limited information you provided. It would ease the problem a lot if you know the order of pictures (which borders which.. row, column position)

If you have no experience in image processing, I would recommend you use a tutorial covering stitching using more basic functions in detail. There is some important work behind the scenes, and it's not THAT harder to actually do it yourself.

Start with this example. It stitches two pictures.

http://ramsrigoutham.com/2012/11/22/panorama-image-stitching-in-opencv/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM