<< HoughLinesP Object detection matchTemplate >>

scicv >> Object detection > cornerHarris

cornerHarris

Detects the corners in a image

Syntax

img_out = cornerHarris(img, blockSize, ksize, k[, borderType])

Parameters

img

Image (Mat).

blockSize

Neighborhood size (double).

ksize

Aperture parameter using in the derivatives computing (double).

k

Harris detector free parameter (double).

borderType

Pixel extrapolation method (double) (default BORDER_DEFAULT).

img_out

Image containing the detector response (Mat).

Description

cornerHarris detects the corners in an image using the Harris edge detector.

Corners in the image can be found as the local maxima of the response image.

Examples

scicv_Init();

img_gray = imread(getSampleImage("blobs.jpg"), CV_LOAD_IMAGE_GRAYSCALE);

img_cornerHarris = cornerHarris(img_gray, 7, 5, 0.05);

img_cornerHarris_norm = normalize(img_cornerHarris, 0, 255, NORM_MINMAX, CV_32FC1, []);
img_corners = convertScaleAbs(img_cornerHarris_norm);

matplot(img_corners);

delete_Mat(img_gray);
delete_Mat(img_cornerHarris);
delete_Mat(img_cornerHarris_norm);
delete_Mat(img_corners);

See also


Report an issue
<< HoughLinesP Object detection matchTemplate >>