

This means that edges tend to have inner and outerĮdges themselves just as an atoll has an outer beach and an innerīeach, but the atoll separates the lagoon from the sea. That match them exactly (like an atoll) because that’s how edgeĭetection filters. Would be (contour) children of their respective lakes, ad infinitum.īack in the world of image processing, the islands often have lakes

Of a tree and all lakes would be children.

(sticking with the geography metaphor) would have contours at the top In this structure, the world’s continents OpenCV has a fancy data structure called a "contour tree" to organize This all apparently does often get quite complex and OpenCV calls these things "contours" (islands) and Islands on lakes on islands in lakes, etc (see 69.793° N, 108.241° Wįor an example). Same way a bucket fill tool can get tricky with respect to finding Contours can beĬreated from images filtered by cvCanny or cvThreshold, etc using They are stored asĬvSeq type sequences (linked-lists deep down). These two can be combined for an image that is both rotated,Ĭontours are ways to manage features of images. Theįunction cv2DRotationMatrix does basically the same job as theĬvGetAffineTransform function but with a center, angle, and scale There is another way to calculate the affine transform matrix. Of mushing your image into squished shapes you are rotating them, The final parameter is the matrix which the function sets. Takes a source and destination image each containing exactly 3 points. Nice function to compute it, cvGetAffineTransform. To figure out what this matrix is, OpenCV has a The source and destination, both of which are necessarily rectangles,ĭo not indicate that. How the transformation should go is encoded into a 2x3 matrix since How that’s done can be specified in the familiar ways. As with remap, there is some heavy interpolation and In the first case, cvWarpAffine will mutate the image into Transformations, on the other hand, introduce a zoom or vanishing Parallel and the left and right side remain parallel. Points can be mushed in any way as long as the top and bottom remain Produce parallelograms (from the four edges of the original). When mutating the geometric form of images, there are two kinds of
