How to perform xcorr2 only in one direction?
Show older comments
Hi,
I'm working on two images having the same dimensions. They don't require to be aligned vertically, but only horizontally. Thus, because the images are very big, I would like to perform the xcorr2 function, but only in the horizontal direction, avoiding the unnecessary overlaps, to save time (currently, it takes about 75 minutes).
Is this possible? How?
Thanks for your answers.
Answers (1)
Dimitris Iliou
on 14 Oct 2016
1 vote
If I understand correctly, you are trying to use xcorr2 to align two images and also improve the processing time.
In general, xcorr2 is a function used to compare 2-D arrays; not specifically images.
That said, I would like to suggest two different things:
- xcorr2 allows you to use gpuArrays which will allow you to use the Parallel Computing Toolbox. This method has two caveats; the prerequisites to use this method are: (1) Parallel Computing Toolbox, (2) A CUDA-enabled GPU
- Instead of using xcrorr2 you could use the imregcorr function that is designed to work with images.
- To use this function you would need to have the Image Processing Toolbox
- You can find more details about this function in the following link:
In general, MATLAB has a set of functions that allow the automatic registration of images. Please see the following link for more details:
1 Comment
Categories
Find more on Correlation and Convolution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!