Harris Corner Detector

Functional Guide | Reference: GetPointCount, GetPoint

using Euresys.Open_eVision;

static partial class Snippet
{
  static void HarrisCornerDetector()
  {
    //////////////////////////////////////////////////////////////////
    // This code snippet shows how to retrieve corners' coordinates //
    // by means of the Harris corner detector algorithm.            //
    //////////////////////////////////////////////////////////////////
    // Image constructor
    EImageBW8 srcImage = new EImageBW8();
    // ...
    // Harris corner detector
    EHarrisCornerDetector harris = new EHarrisCornerDetector();
    EHarrisInterestPoints interestPoints = new EHarrisInterestPoints();
    harris.IntegrationScale = 2.0f;
    // Perform the corner detection
    harris.Apply(srcImage, interestPoints);
    // Retrieve the number of corners
    uint index = interestPoints.PointCount;
    // Retrieve the first corner coordinates
    EPoint point = interestPoints.GetPoint(0);
    float x = point.X;
    float y = point.Y;
  }

}
#include <Open_eVision.h>

void HarrisCornerDetector()
{
  //////////////////////////////////////////////////////////////////
  // This code snippet shows how to retrieve corners' coordinates //
  // by means of the Harris corner detector algorithm.            //
  //////////////////////////////////////////////////////////////////
  using namespace Euresys::Open_eVision;
  // Image constructor
  EImageBW8 srcImage;
  // ...
  // Harris corner detector
  EHarrisCornerDetector harris;
  EHarrisInterestPoints interestPoints;
  harris.SetIntegrationScale(2.f);
  // Perform the corner detection
  harris.Apply(srcImage, interestPoints);
  // Retrieve the number of corners
  unsigned int index = interestPoints.GetPointCount();
  // Retrieve the first corner coordinates
  EPoint point = interestPoints.GetPoint(0);
  float x = point.GetX();
  float y = point.GetY();
}
def HarrisCornerDetector():
    ##################################################################
    ## This code snippet shows how to retrieve corners' coordinates ##
    ## by means of the Harris corner detector algorithm.            ##
    ##################################################################
    import open_evision as oev
    # Image constructor
    src_image = oev.EImageBW8()
    # ...
    # Harris corner detector
    harris = oev.EHarrisCornerDetector()
    interestPoints = oev.EHarrisInterestPoints()
    harris.IntegrationScale = 2.0
    # Perform the corner detection
    harris.Apply(src_image, interestPoints)
    # Retrieve the number of corners
    index = interestPoints.PointCount
    # Retrieve the first corner coordinates
    point = interestPoints.GetPoint(0)
    x = point.X
    y = point.Y