We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


How to merge many images to make a montage image without boundary edge?

young_nacs asked
Medium Priority
Last Modified: 2012-06-27
Hi, I have many medical images called proofsheet. A proofsheet includes 10 TIF image files.
I am looking for a way to merge all images together to make a sheet of large images as a map.
Problem is how to delete or make smooth for the image boundary and how to find the merge position.
Let's say there are many blood vessels on the images which can be used as a reference position.
How to find the all the fine positon before the merge and merge together without boundary condition.
Even thought 3rd party library, that will be wonderful to know.

Watch Question

You should do a search on Google for "Image stitching". There are heaps of packages out there which will automatically stitch your images together.

If you want to write it yourself then it's not the easiest thing to do, but it makes it a lot easier if there isn't any rotation between pictures. All you have to do is a convolution between a border of one image with the image of another. Wherever you get the highest value from performing the convolution is where your image border is best fitted to the other image.

The best way to imagine what a convolution is, is by thinking of taking the overlapping areas of the images and multiplying each pixel from one image with the underlying pixel in the other image. The value of the convolution is the sum of these multiplied pixel values in the overlapping area. As you change the overlapping areas, the value of the convolution will change. Where it is a maximum, you have the best match between the two image areas. Note that as the overlapping area changes, so will the number of pixels that you have to perform the convolution on, and so to have a fair comparison between the different convolution values, you should divide each convolution value by the number of pixels that it was taken over. By doing this, you are effectively providing a normalization of the convolution values, and thus performing a fair comparison.

Alternatively (and this is what I'd do)... just use Photoshop :-)

Are you gonna close this question?


Still looking for it.
Such as photoshop's Blending image, looking for how to merge several images by layer overlapping so image looks like a one big image. It looks like 360 degree movie. I take a picture within certain angle only and add other picture which is taken by different angle and merge to look like one picture ( twice bigger picture).


So what exactly are you after then? Are you after a step by step procedure on how to piece together and blend two or more images in Photoshop? Can you be explicit on what sort of answer you are looking for?




I am looking for SDK so I can customize this feature.
Such as photoshop SDK, If user supplises input images, this function will automatically generate a montage image based on finding auto align position and merge images as a one piece.


Well, if you're after the Photoshop SDK, you can get it from here, although you have to undergo a registration process and it is subject to approval.


But if you want a generic extendable API for processing images, then I think that this is exactly what you are looking for.


It should let you program the process I described above in my first post.

This part...


Accepts formats generated by most medical equipment. I quote..

"DICOM 3 (2003 file specification), the industry standard medical imaging format/protocol is fully and completely supported, allowing programmers access to medical images retrieved from digital imaging modalities such as CT and MR scanners."

It also has an image processing module as well.



I am using LeadTool SDK but no function for mergeing two or many images to create a montage image.
My point is that:
a. read many images
b. search synchronize position of each image to overlay
c. overlay images with or w/o layer
d. and make images layers to flat so image looks like a big image.

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.