Skip to content

corner_responseCornerResponseCornerResponsecorner_responsecorner_responseπŸ”—

Short descriptionπŸ”—

corner_responseCornerResponseCornerResponsecorner_responsecorner_response β€” Searching corners in images.

SignatureπŸ”—

corner_response( image Image, out image ImageCorner, integer Size, real Weight )void CornerResponse( const HObject& Image, HObject* ImageCorner, const HTuple& Size, const HTuple& Weight )static void HOperatorSet.CornerResponse( HObject image, out HObject imageCorner, HTuple size, HTuple weight )def corner_response( image: HObject, size: int, weight: float ) -> HObject

Herror corner_response( const Hobject Image, Hobject* ImageCorner, const Hlong Size, double Weight )

Herror T_corner_response( const Hobject Image, Hobject* ImageCorner, const Htuple Size, const Htuple Weight )

HImage HImage::CornerResponse( Hlong Size, double Weight ) const

HImage HImage.CornerResponse( int size, double weight )

DescriptionπŸ”—

The operator corner_responseCornerResponse extracts gray value corners in an image. The formula for the calculation of the response is:

\[\begin{eqnarray*} R(x,y) &=& A(x,y) \cdot B(x,y) - C^2(x,y) - Weight \cdot \left(A(x,y) + B(x,y)\right)^2\\ A(x,y) &=& W(u,v) \ast (\nabla_{x} I(x,y))^2\\ B(x,y) &=& W(u,v) \ast (\nabla_{y} I(x,y))^2\\ C(c,y) &=& W(u,v) \ast \left(\nabla_{x} I(x,y) \nabla_{y} I(x,y)\right) \end{eqnarray*}\]

with \(I\): input image, \(R\): output image of the filter, \(A\), and \(B\): smoothed directional derivatives, \(C\): smoothing of the products of the directional derivatives. The operator gauss_imageGaussImage is used for smoothing (\(W\)), the operator sobel_ampSobelAmp is used for calculating the derivative \(\nabla\)).

The corner response function is invariant with regard to rotation. In order to achieve a suitable dependency of the function \(R(x,y)\) on the local gradient, the parameter Weightweightweight must be set to 0.04. With this, only gray value corners will return positive values for \(R(x,y)\), while straight edges will receive negative values. The output image type is identical to the input image type. Therefore, the negative output values are set to 0 if byte images are used as input images. If this is not desired, the input image should be converted into a real or int2 image with convert_image_typeConvertImageType.

AttentionπŸ”—

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

  • Automatically parallelized on domain level.

ParametersπŸ”—

Imageimageimage (input_object) (multichannel-)image(-array) β†’ object (byte / uint2 / int2 / real)HObject (byte / uint2 / int2 / real)HImage (byte / uint2 / int2 / real)HObject (byte / uint2 / int2 / real)Hobject (byte / uint2 / int2 / real)

Input image.

ImageCornerimageCornerimage_corner (output_object) multichannel-image(-array) β†’ object (byte / uint2 / int2 / real)HObject (byte / uint2 / int2 / real)HImage (byte / uint2 / int2 / real)HObject (byte / uint2 / int2 / real)Hobject * (byte / uint2 / int2 / real)

Result of the filtering.

Number of elements: ImageCorner == Image

Sizesizesize (input_control) integer β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Desired filtersize of the graymask.

Default: 33
Suggested values: 3, 5, 7, 9, 113, 5, 7, 9, 11

Weightweightweight (input_control) real β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Weighting.

Default: 0.040.04
Value range: 0.0 ≀ Weight ≀ 0.3
Minimum increment: 0.001
Recommended increment: 0.01

ExampleπŸ”—

(C)

read_image(&Fabrik,"fabrik")\;
corner_response(Fabrik,&CornerResponse,3,0.04)\;
local_max(CornerResponse,&LocalMax)\;
disp_image(Fabrik,WindowHandle)\;
set_color(WindowHandle,"red")\;
disp_region(LocalMax,WindowHandle)\;

Combinations with other operatorsπŸ”—

Combinations

Possible successors

local_maxLocalMax, thresholdThreshold

See also

gauss_filterGaussFilter, sobel_ampSobelAmp, convert_image_typeConvertImageType

ReferencesπŸ”—

C.G. Harris, M.J. Stephens, β€œA combined corner and edge detector”’; Proc. of the 4th Alvey Vision Conference; August 1988; pp. 147-152.

H. Breit, ``Bestimmung der Kameraeigenbewegung und Gewinnung von Tiefendaten aus monokularen Bildfolgenβ€™β€˜; Diplomarbeit am Lehrstuhl fΓΌr Nachrichtentechnik der TU MΓΌnchen; 30. September 1990.

ModuleπŸ”—

Foundation