How can I automatically distort (transform) a binary image to match a similar one?
Show older comments
Larger context:
I am attempting to automatically extract inflection points from a river centerline, i.e. points where the curvature changes sign (or where the curvature is zero). These inflection points often correspond to "straight" sections of river, and they are well-known for being difficult to compute in noisy data.

My goal is to extract these inflection points along a migrating, meandering channel so that individual bends may be tracked. I'm actually not concerned with finding the "actual" inflection point, per se, because this is practically impossible to do consistently through time for the same reach. But I need some kind of reference points through which to connect the images through time. This becomes complicated because the river is growing its loops through migrating bends and shortening itself through cutoffs.
Specific problem:
After wrestling with inflection points a couple days, it occurred to me that I could perhaps take an image processing approach. My thinking is this: given two binarized river images (say, at t and t+1) which are quite similar, can I (automatically) compute a transformation between the two images such that a point in image t can be projected into image t+1? In this way, as long as the inflection points are properly resolved at t=1, I can iterate forward, reprojecting the inflection points as the channel evolves.
I have tried the matching features/estimateGeometricTransform route but it was a mess, presumably because I'm using a binary image (no intensity values). A cross correlation approach is also insufficient because it's a global transformation, and it's only translative. I need a more local transformation; one that will scale and skew locally to make the two river images (roughly) match. I also need to avoid manually creating control points because this is to be applied on a very large reach (>100 inflection points) for many time steps.

Note that in this figure, I chose a large dt between realizations to highlight the difference between reaches through time. In reality the distortion is much smaller between each time step (with the exception of the occurrence of cutoff). The goal is to find a transformation between t and t+1, then apply this transformation to the inflection points at t so they can be tracked to t+1.
Any ideas, tips, or suggestions would be very helpful!
Accepted Answer
More Answers (1)
Tracy
on 21 Jul 2015
0 votes
Have you looked into Lucas-Kanade or other optical flow methods? There's an example on the file exchange here. Using a subwindow approach for cross-correlation may be useful; in experimental fluid mechanics we use PIV (particle image velocimetry) and PTV (particle tracking velocimetry). There may be some overlap between those methods and your application. The basic premise is that you compare a small subset of one image with a small subset of the other image, and by cross-correlating, find the 2D shift that yields the highest correlation. These slides by Kiger, Westerweel, and Poelma go into the technical side of it if you're interested.
Not sure how immediately helpful that is for your goal of finding the transformation, but just throwing some ideas out there!
Categories
Find more on Particle & Nuclear Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!