How to quantify the object shift between projection images using Matlab?
Mostrar comentarios más antiguos
Hi, I am tasked with quantifying the shift between these 2D simulated images, by implementing an algorithm (e.g. cross-correlation or centre of mass) using matlab. I have attached the data and script for the images. Any help would be appreciated.


1 comentario
Yanique
el 10 de Ag. de 2023
Respuestas (1)
Image Analyst
el 12 de Ag. de 2023
0 votos
Or try normalized cross correlation. See attached demo.
4 comentarios
Yanique
el 12 de Ag. de 2023
Image Analyst
el 13 de Ag. de 2023
Now that I can see your images, why don't you just threshold and find the centroid of the blob? Do this for each image and see how the centroid shifted. Something like
mask1 = grayImage1 > someThresholdValue;
% Take largest blob only.
mask1 = bwareafilt(mask1, 1);
props1 = regionprop(mask1, 'Centroid');
xy1 = props1.Centroid
% Now for image 2
mask2 = grayImage2 > someThresholdValue;
% Take largest blob only.
mask2 = bwareafilt(mask2, 1);
props2 = regionprop(mask2, 'Centroid');
xy2 = props2.Centroid
% Now compute delta x and y
deltax = xy1(1) - xy2(1)
deltay = xy1(2) - xy2(2)
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
Categorías
Más información sobre Feature Detection and Extraction en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!