How can I combine multiple (up to 500) microscope images into one complete image?

I have a 5 cm by 5 cm area that I need to create a composite photograph of using multiple microscope images (of jpg format). The number of images required to capture the entire area can be upwards of 500, so the method of stitching the images together needs to be automated. Is there a way to perform this in MATLAB? Thank you in advance.

4 Commenti

Is there some logic needed to match the edges, or can they just be placed one after another?
By the way, using .jpg is not recommended for scientific images, as it loses information unless you specifically take steps to maintain the quality. JPEG especially blurs sharp horizontal or vertical edges, or any sharp edge, and that makes it difficult to process the resulting images to extract information.
Depending on how I collect the images, there may be some edge matching that will be required. I'm trying to troubleshoot how to obtain the images at the moment. Currently, there is about 15-20% overlap between adjacent images. I tried using ImageJ to stitch them together, but the features in the images are so similar that the program can't distinguish between different images.
Thank you for the comment regarding the jpg format. What you described is exactly what I will need to do with my images (distinguish between sharp edges and microbial growth near those edges). Can you recommend a better format?
PNG or TIFF can preserve sharp edges. I like the TIFF format myself, but I think Image Analyst prefers PNG format.

Accedi per commentare.

Risposte (2)

You can try the montage function, though with 500 images you may run out of memory.
Based on your answer to Walter where you say you need panoramic stitching with overlap, I think this is what you need: http://www.mathworks.com/help/vision/examples/feature-based-panoramic-image-stitching.html?prodcode=VP&language=en

5 Commenti

Thank you for the suggestion. I believe this method will work.
However, I am having issues with Step 1 of the process - Load images. I can create the file directory where the images are stored (defining 'buildingDir' in the tutorial) - it categorizes it as a char variable. When I try the next step, I get the following error message:
>> buildingScene = imageSet(buildingDir); Undefined function 'imageSet' for input arguments of type 'char'.
I also tried loading the images a different way by building a cell of the image files ('imgFiles'), but I receive this error message:
>> buildingScene = imageSet(imgFiles); Undefined function 'imageSet' for input arguments of type 'cell'.
Any advice would be much appreciated.
Oh, did not realize that. I don't have that toolbox, but I am working to get it added.
Thank you for your input! (I might be back with more questions...)
I can produce a panorama image, but it does not resemble the microscope images at all. Step 4 of the above method produces the following warning:
"Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.457441e-10. "
Is this indicating that the features in the images are too similar to distinguish? The microscope images are of a repeating, uniform circular pattern, so this reason is plausible.
I am controlling the microscope stage movement using LabVIEW, so the positions of the images could be determined. Is there a method in MATLAB that uses coordinates to match images?
I don't have the toolbox so I can't try it. Maybe your overlap is not enough for it to determine where to stitch them.

Accedi per commentare.

Tag

Richiesto:

il 18 Ago 2015

Commentato:

il 20 Ago 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by