Response matrix, collected as output from corner detection algoritms such as harrisCorners, or shiTomasiCorners.
Number of corners which need to be extracted. Default is -1 which indicate that all responses with value above the threshold will be returned.
Response threshold - response values in the matrix larger than this are considered as valid corners.
Lazy array of size_t[2], as in array of 2D points, of corner reponses which fit the given criteria.
1 auto image = [0., 0., 0., 2 0., 1., 0., 3 0., 0., 0.].sliced(3, 3); 4 5 auto res = image.extractCorners; 6 7 assert(res.length == 1); 8 assert(res[0] == [1, 1]);
1 auto image = [0., 0.1, 0., 2 0., 0.3, 0., 3 0., 0.2, 0.].sliced(3, 3); 4 5 auto res = image.extractCorners; 6 7 assert(res.length == 3); 8 assert(res[0] == [1, 1]); 9 assert(res[1] == [2, 1]); 10 assert(res[2] == [0, 1]);
1 auto image = [0., 0.1, 0., 2 0., 0.3, 0., 3 0., 0.2, 0.].sliced(3, 3); 4 5 auto res = image.extractCorners(1); 6 7 assert(res.length == 1); 8 assert(res[0] == [1, 1]);
1 auto image = [0., 0.1, 0., 2 0., 0.3, 0., 3 0., 0.2, 0.].sliced(3, 3); 4 5 auto res = image.extractCorners(-1, 0.2); 6 7 assert(res.length == 1); 8 assert(res[0] == [1, 1]);
Extract corners as array of 2D points, from response matrix.