corner-detection

how to find corners points of a shape in an image in opencv?

巧了我就是萌 提交于 2019-12-03 09:01:47
I have to find corners of shapes in an image. i have used Harris corner detection algorithm to find corner, but it is giving total corners present in an image and for finding corners for a particular shape in that image it is not feasible. please suggest some other approach. You could use Harris corner detection algorithm. Corners are junction of two edges, where an edge is a sudden change in image brightness. This algorithm takes the differential of the corner score into account with reference to direction directly (wikipedia). Function cornerSubPix() refines the corner location - it iterates

Implementing a Harris corner detector

余生颓废 提交于 2019-11-29 22:39:24
I am implementing a Harris corner detector for educational purposes but I'm stuck at the harris response part. Basically, what I am doing, is: Compute image intensity gradients in x- and y-direction Blur output of (1) Compute Harris response over output of (2) Suppress non-maximas in output of (3) in a 3x3-neighborhood and threshold output 1 and 2 seem to work fine; however, I get very small values as the Harris response, and no point does reach the threshold. Input is a standard outdoor photography. [...] [Ix, Iy] = intensityGradients(img); g = fspecial('gaussian'); Ix = imfilter(Ix, g); Iy =

Implementing a Harris corner detector

房东的猫 提交于 2019-11-28 19:21:25
问题 I am implementing a Harris corner detector for educational purposes but I'm stuck at the harris response part. Basically, what I am doing, is: Compute image intensity gradients in x- and y-direction Blur output of (1) Compute Harris response over output of (2) Suppress non-maximas in output of (3) in a 3x3-neighborhood and threshold output 1 and 2 seem to work fine; however, I get very small values as the Harris response, and no point does reach the threshold. Input is a standard outdoor

RANSAC Algorithm

落花浮王杯 提交于 2019-11-28 19:19:01
问题 Can anybody please show me how to use RANSAC algorithm to select common feature points in two images which have a certain portion of overlap? The problem came out from feature based image stitching. 回答1: I implemented a image stitcher a couple of years back. The article on RANSAC on Wikipedia describes the general algortihm well. When using RANSAC for feature based image matching, what you want is to find the transform that best transforms the first image to the second image. This would be

Find the corners of a polygon represented by a region mask

爷,独闯天下 提交于 2019-11-28 08:43:22
BW = poly2mask(x, y, m, n) computes a binary region of interest (ROI) mask, BW, from an ROI polygon, represented by the vectors x and y. The size of BW is m-by-n. poly2mask sets pixels in BW that are inside the polygon (X,Y) to 1 and sets pixels outside the polygon to 0. Problem: Given such a binary mask BW of a convex quadrilateral, what would be the most efficient way to determine the four corners? E.g., Best Solution so far: Use edge to find the bounding lines, the Hough transform to find the 4 lines in the edge image and then find the intersection points of those 4 lines or use a corner

Find the corners of a polygon represented by a region mask

天大地大妈咪最大 提交于 2019-11-27 05:47:53
问题 BW = poly2mask(x, y, m, n) computes a binary region of interest (ROI) mask, BW, from an ROI polygon, represented by the vectors x and y. The size of BW is m-by-n. poly2mask sets pixels in BW that are inside the polygon (X,Y) to 1 and sets pixels outside the polygon to 0. Problem: Given such a binary mask BW of a convex quadrilateral, what would be the most efficient way to determine the four corners? E.g., Best Solution so far: Use edge to find the bounding lines, the Hough transform to find