How to align plot profile from imageJ with their peak value

Hi,
I am pulling multiple fluorescence intensity from a microfluidic channel using imageJ with multiple pre-defined ROIs from a single image. The output is a table of X = distance on the first column, and a multi-plot intensity profile (Ys) on the subsquent columns (The line plot should look like multiple gaussian-like curves overlapping together shown below). However, somehow the device channel is not perfectly stright, so the peak intensity value of each ROI shifted a little bit. I would like to align the data based on the peak values and it is okay to truncate data points from the two ends or simply shift the datasets one column at a time to align.
I am attaching a sample data table (Intensity.mat) below and the current output of the line plot. I could normalize the data using the peak value but they will remain mis-aligned.
Any suggests or helps are appreciated!! Thanks in advance!

2 commentaires

I wonder if dtw would be suitable?
Or would xcorr be more suitable?
Hi thank you so much for getting back to me. It did not work the way I would like to. I will keep trying thanks!

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 7 Août 2023
Use max to find the index of the peak. Then use indexing to assign the data to a shifted location in a new vector, like place the peak at index 1000 for all the curves. Or you could use circshift to shift it the required number of indexes.

Community Treasure Hunt

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

Start Hunting!

Translated by