I’d like to find an automatic way to detect changes in rows of pixels in images like the one attached. I initially thought of analyses similar to kymographs because it is the same type of data (time on the horizontal axis and distance on the vertical one) but I did not succeed. Anyone has an idea?
Good day Olivier,
how do you define “changes” and do you really mean single rows of pixels?
Good point, I probably don’t need rows of single pixels necessarily. But the white lines represent features over time. They are still as you can see in most of the image on the left side and some movement is indicated on the right side with different pixel arrangement. I’d like to quantify the start of this movement.
qualitatively I understand your goal but …
Here is an about 3pel high trace (enlarged and contrast enhanced excerpt from your sample image).
In fact the object moves during the total registration time – more or less. It leaves the slot at about 22% from the end of the total registration time.
So how would you define “the start of this movement”?
Thanks! It is true that there are some slight movements. The idea is to identify a large movement, different from the “noise” movement observed before. I haven’t thought of a criteria but perhaps something based on the shape of the white features (departure from linearity?) or something based on the grey scale in a row like you have selected? I attach another image with more stable features before the movement.
we deal with computer analyses and therefore you have to be precise. Any criterion has to be mathematically formulated and it is up to you to define a criterion of analysis.
The new sample image is interesting but it is quite different from the first one. So if we find a solution for the new one, I’m sure it won’t be a solution for the first one.
What I used before, is not a (pixel) row, it is a slot of hand-choosen pixel height that doesn’t generalize, because your objects have different sizes (heights) and sometimes they even fuse and split.
Not an easy task
Ok. If I try to refine one of the criteria mentioned above, one question would be about how to detect the horizontal, (more or less) linear features and to obtain the coordinate point at which their mean grey value changes by more than 2 SD?
you may try some kind of tracing but what about tracing in the following situation (split)?
Another question concerns whether you like to analyse the various traces separately or if a mean taken from all traces (the whole picture) is sufficient?
here are two results from simple global analyses of the two sample images:
The plots show vertical projections of the images (as a function of time).
This looks very nice! It would be a good starting point for me to have this type of analysis for the whole image. Can you please tell me how you did it?
Please study the relevant section 30.11 “Plot Profile” of the ImageJ User Guide:
Many thanks again! I will use this method.
- calculate the time derivative, take absolute value
- calculate standard deviation along spatial direction
For your two samples, this yields the following signatures:
(check if Maximum or Average yields better results than Standard deviation)
The images above were calculated through the following steps::
run("Select All"); run("Copy"); run("Paste Control..."); setPasteMode("Difference"); run("Paste"); # here: shift rectangular selection some pixels to the left run("Crop"); run("Reslice [/]...", "output=1.000 start=Top avoid"); run("Z Project...", "projection=[Standard Deviation]"); run("Select All"); run("Plot Profile");
Thanks Daerr. I will test it. I am also testing another process that I found in a publication, called Teager-Kaiser Energy Operator (TKEO): TKEO = x2(n) − x(n − 1) * x(n + 1)