Align and stitch non-overlapping images

7 Ansichten (letzte 30 Tage)
Anatoly Fedorov Kukk
Anatoly Fedorov Kukk am 3 Dez. 2022
Kommentiert: Matt J am 4 Dez. 2022
Hello everyone,
I am trying to solve a signal processing problem, which can be also viewed as image aligning and stitching problem.
I have a DAQ system that measures ultrasound schock waves. The system has 128 channels, but can only measure 32 at a time; thus the measurement is done 4 times (channels 1-32, 33-64, 65-96, 97-128). Once combined, the measurement may look something like this:
As seen from here, the blocks of 32 measurements can be slightly shifted vertically by few(1-4) pixels, due to random time jitter of the setup. My task is to find the offsets between the 4 blocks. While they can be manually found, it is time consuming, so I am trying to automate it.
One solution that I found is by finding the max of the cross-correltation between the neighbouring columns (32-33; 64-65, etc.). However this method sometimes malfunctions for more complex signals (as shown below) by 1-2 pixels, where the periodic structures are shifted by 1 period.
I believe that this problem can be solved by image stitching algorithms; however most of the, that I have found require some overlap between the images, which is not present here.
Could anyone suggest a better algorithm or solution to this problem?
Thank you very much.

Antworten (2)

Matt J
Matt J am 3 Dez. 2022
Bearbeitet: Matt J am 3 Dez. 2022
As seen from here, the blocks of 32 measurements can be slightly shifted vertically by few(1-4) pixels,
So, wiuth 4 blocks and 3 seams, that would mean that there are 27 combinations of shifts? Just loop through them all and see which one gives the smallest norm(X(:,i)-X(:,i+1)) across the seams of the image. You could also apply a weighted difference norm(W.*(X(:,i)-X(:,i+1))) to prioritize the foreground objects in the image.
  2 Kommentare
Anatoly Fedorov Kukk
Anatoly Fedorov Kukk am 3 Dez. 2022
Dear Matt,
thanks for the idea! I've tested it, the search of normalization minimum yields usually the same offset as the correlation method. Quite often, both methods fail at hyperbolic shapes as shown below (3rd seam). Basically, they try to seam the intensity into a horizontal line, while sometimes it should be a diagonal.
I am considering the idea of fitting several lines within each block at the pixels neighbouring the seam and comparing them with the neighbour block; however I think it is an overengineered approach.
Matt J
Matt J am 4 Dez. 2022
Perhaps you can minimize the discrepancies in the image gradients at the seams as well as the pixel intensities. Some weighted combination of intensity and gradient terms, perhaps.

Melden Sie sich an, um zu kommentieren.


Image Analyst
Image Analyst am 3 Dez. 2022
If the max of the cross correlation is not giving the correct shift amount, then it's possible the vertical dimension was scaled, so for example it matches up very well near the top but doesn't match well at all near the bottom.
You might have to do it interactively and visually. So you could make a UI where you could let the user specify the scaling factor for the right image, and the shift amount for the right image and let him just scale and translate the right image until he feels like it best matches the left image.

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by