I am working on a project where I am tracking the evolution of ice crystals over time and specifically the curvature of contours at certain points of the contours.
My raw data consists of snapshots of the sample I am looking at, at different timestamps. The simplified summary of my current approach is stroring all the attributes of each contour (area, cuvature, center of mass etc.) in the initial frame as an object, and automatically comparing these attributes to all the contours in the next frame to see track individual crystals over the frames. If there is a contour match, I append the attributes to the matching crystal object.
Doing this, I managed to track all the contour points, their local curvature, and the area and length of the contour to which the point belongs over time. I store these in a dataframe and turn them into a CSV table.
The problem I am currently facing is that over the different frames, OpenCV sometimes chooses the begin/end point with a slight offset. Because of this, if I for example try to profile the local curvature of a point over time, there is a jump in the curvature because I start tracking a different point half way.
My question now is, has anyone experienced something slightly similar or has a bright idea to make sure the begin and end points are always chosen at the “same” point? I am thinking to basically loop through the whole data right now, to trace these jumps and account for them by a shift, but that would be quite a lot of code I would love to avoid.
Thanks for reading and thinking with me!!
PS. Ter illustration, have a look at the data in two consecutive time frames.
Edit: I am only able to post one image