image alignment in matlab - image

I'm trying to align several images in matlab and I'm having trouble getting matlab to align them properly. I want to align them so that I can overlay them to make a larger image by stitching/averaging them together. I posted several of the images here. While it is not difficult to align 5 images manually I want to make a script to do it so that I do not need to align hundreds of similar images manually as well.
Over the past few days I've tried several ways of getting this to work. My thought was that if I could filter the images enough then I could make a mask for the letters and then it would be easy to align them--but I haven't been able to make it work.
I've tried using local adaptive thresholding to compensate for a nonuniform brightness level across the picture but it hasn't allowed me to align them properly. For the actual image alignment I've been using imregister() and normxcorr2() but both do not properly align the images.
I don't think that this should be that difficult to do but I haven't been able to do it. Any thoughts or insight would be greatly appreciated.
Edit: uploaded images after performing various operations here

I would do some feature detection, followed by the RANSAC algorithm to find the transformation between any pair of images.
see this demo on the Mathworks web-site: http://www.mathworks.com/videos/feature-detection-extraction-and-matching-with-ransac-73589.html

Related

Stack drone images in IDL_overlap degree

I have about 6000 aerial images taken by 3DR drone for vegetation sites.
The images have to overlap to some extant because the drone flights cover the area go from EW and then again NS, so the images present the same area from two directions. I need the overlap for the images for extra accuracy.
I don't know to write a code on IDL to combine the images and create that overlap. Can anyone help please?
Thanks
What you need is something that is identifiable that occurs in both images. Preferably you would have several things across the field of view so that you could get the correct rotation as well as a simple x-y shift.
The basic steps you will need to follow are:
Source Identification - Identify sources in all images that will later be used to align the images. Make sure the centering of these soruces are good so that they will align better later.
Basic alignment. Start with a guess on where the images should align then try to match the sources.
Match the sources. There are several libraries that can do this for stars (in astronomical images) that could be adapted for this.
Shift and rotate the images. This can be done to the pixels or to the header that is read in and have a program manipulate the pixels on the fly.

Align images (maps) coming from a scanned source

I have several images like the one below which are coming from a scanned book.
The images have been catted with the same image-size but they are slightly distorted and do not overlap perfectly. You can see an animation here https://dl.dropboxusercontent.com/u/29337496/animation.gif .
Before apply a georeferencing process (by gdal) i need to align them in order to have the country borders in perfect overlap.
I have already test align_image_stack (hugin sw) with the different flags,
but i did not get positive results.
Any idea?
I'm using Ubuntu.
Thanks
Best Giuseppe

Display many thousand images in three.js

I have up to 200'000 individual images in a scene (done with sprites, so far). I want to look at these sprites, and when I fly around they should always face the camera (as sprites do).
My question is: How can I achieve the best performance WebGL-wise? Are Sprites with useScreenCoordinates:false rendered as with GL_POINT?
At the moment the fps drops with very low image counts already. I'm using mipmapping and sprites so far. And since they need to turn around to face me I didn't want to use BufferGeometry..
I'd highly appreciate some ideas and inputs :) Thanks!
PS: Point of it all is that you can "fly" through 200'000 images and stop/select the ones you figure to be interesting
My team needed to accomplish this too, and sadly Doidel's notes trail off before the project is completed. We developed PixPlot, a three.js visualization layer for images:
I put together a blog post outlining the details here: http://douglasduhaime.com/posts/visualizing-tsne-maps-with-three-js.html
In short, if others face this problem, you'll want to create one geometry (ideally) with one large image atlas (a single jpg of size 2048px by 2048px containing lots of smaller images) serving as the texture for the geometry. Add vertices, faces, and vertexUV's for each of the little images to display, and pull each image from the atlas texture.
Used tons of techniques and stuff, I'll be writing about it on http://blogs.fhnw.ch/threejs/ once I got it all working

How to perfectly align 2 scanned multiple choice paper images? (Matlab)

Is there a way to align 2 scanned multiple choice paper images? Maybe by using a bar code to auto align them or using a specific shape so that I can compare or find the differences in the answers between the two papers in Matlab?
This is the reference image.
This is the image I want to alter which will overlay the reference image.
Your problem is sometimes called "rigid image registration" and there are many packages that address this problem. Check out for example the following on MATLAB central.
http://www.mathworks.com/matlabcentral/fileexchange/19086-automatic-2d-rigid-body-image-registration
"rigid" is here as opposed to "elastic", so only translation and rotation, but no stretching is considered, since you work with paper.

opencv or imagemagick for highlighting differences

I am working on a project in which I need to highlight the difference between pair of scanned images of text.
Example images are here and here.
I am building a webapp based on HTML,JS for this.
I found that openCV does support highlighting differences between 2 images.
Also I saw that imageMagick also has such support.
Does openCV has support for doing automatic registration of images?
And is there a JS module for openCV?
Which one is more suited for my purpose?
1. Simplistic way:
Suppose the images are perfectly aligned and similarly illuminated: subtract one image from another pixel by pixel, then threshold the result, filter out noisy blobs, and select the biggest ones. Good for a school project
2. A bit more complicated:
Align the images, then find a way to uniform the illumination, then apply the simplistic way.
How to align:
Find the text area in two images, as being a darker than the file color.
Find its corners
Use getPerspectiveTransform() to find the transform between images.
warpPerspective() one image to another.
Another way to register the two images is by feature matching. It has quite an extensive support in OpenCV. And findHomography() will estimate the pose between two images from a bigger set of matching points.
3. Canonical answer:
Align the image.
Convert it to text with an OCR engine.
Compare the text in the two images.
Well, besides the great help given by vasile, you also need the web app answer.
In order to make it work in a server, you will probably need a file upload form, as well as an answer from the server with the applied algorithm. There are several ways you can do it depending on the server restrictions you have. If you can run command line arguments, you would probably need to implement the highlight algorithm in opencv and pass the two input files a an output one for the program. A php script should be used for uploading the files, calling the command line program, and outputting the result to the user.
Another approach could be using java and JavaCV in a web container like Apache Tomcat, for instance.
Best regards,
Daniel

Resources