I’m experimenting with the pictures. messing around with the parameters to DIS flow hasn’t gotten me anywhere nice so far.
for now I’ll revive the initialization from homography and give that a try. local features might still fail. grids are very self-similar and symmetric.
if I’d gotten around to working on that “grid recovery” idea of mine, now would have been a great opportunity to use that.
something dumb like taking center of mass/center of bounding box and orientation based on moments for initial alignment might do well enough.
if all else fails, you could ditch the grid and go with something more textured like Perlin noise or something inspired by it.
Is there some metric you’re using to determine how accurate the DIS flow correction is? I saw the flowmag
variable, which I’m using to determine when to stop iterating; can that also be used to determine if there are major distortions?
no. like many things in computer vision (camera calibration comes to mind), there may be scores that you want to be good, but them being good is insufficient. they can be good while the result is junk. a “holistic” consideration of the result is often indispensable.
the statistics I’m calculating on the incremental flow only tell me when iterating further won’t change the result anymore. that is useful for knowing when to terminate the iterative process. it says nothing about the quality of the result.
one measure of quality I can think of is to consider the gradient of the flow (not the map, mind you). if the transform were just a uniform translation, then the flow should have the same vector everywhere, so the gradient of that should be zero. any contraction/dilation would show nonzero gradient. that in itself isn’t bad if it’s a small enough magnitude, but if the gradient is very steep, that indicates issues (creases, folds, wild warping and tearing).
due to the large featureless (black) areas in those pictures, where flow can be anything (undefined), these vectors can’t be considered on their own. the gradient over them is needed. the choice of DIS and its parameters (block size primarily) happens to make the flow fairly smooth, seemingly “extrapolating” into undefined territory, but also ironing over the white grid and the black voids in it. that allows the gradient to be “nice”.
so far I haven’t gotten to the feature matching that I talked about in my previous post. let’s see when the fancy strikes me. the week is over anyway, so nobody’s going to think to ask either of us for status updates on this for a little while.