How to perform xcorr2 only in one direction?

2 Ansichten (letzte 30 Tage)
Nut
Nut am 6 Okt. 2016
Bearbeitet: Nut am 24 Okt. 2016
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.

Antworten (1)

Dimitris Iliou
Dimitris Iliou am 14 Okt. 2016
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:
  1. 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
  2. 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 Kommentar
Nut
Nut am 24 Okt. 2016
Bearbeitet: Nut am 24 Okt. 2016
I just had a look, your suggestions are not exactly the operation I asked, however the second one may fulfil my needs the same. I will try it.
Both your answers are very interesting, especially the second one. I didn't know the image registration techniques, so thank you very much, really great tip!
PS: I was trying to align the images using xcorr2 function because its documentation explains how to solve a similar problem, so I was using that method. As you correctly said, it entails a conversion from uint8 to double.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by