Flat, edge, or corner

The window on the left, the magnified patch and its gradient scatter on the right, and the structure matrix's two eigenvalues underneath. The shape of the scatter is the whole idea: a line means an edge, a blob in two directions means a corner.

Try this

Park the window on flat background, then slide it onto a silhouette, then onto a corner. Watch the smaller eigenvalue leave zero only at the last step.

Try it: drag the window — flat, edge, or corner?

Where this lab comes from

Corners: The Structure Tensor, Harris, Shi-Tomasi and Förstner

Lesson 5 of the Edge Detection unit. A contour says where a boundary runs but not where you are along it. Two eigenvalues of a 2x2 matrix fix that: measured on a real photo, flat background scores 0.001/0.000, an edge 0.411/0.019 and a corner 0.442/0.318. Harris, Shi-Tomasi and Förstner all read that same matrix, and on the edge patch Harris comes out positive at k = 0.04 and negative at k = 0.06, so k decides the answer rather than the data.

More in edges and features