Browse Source

git-svn-id: https://emgucv.svn.sourceforge.net/svnroot/emgucv/trunk@271 d7f09016-e345-0410-b530-edf29a71df78

UWP10
canming 17 years ago
parent
commit
90a542a7a4
  1. 7
      Emgu.CV.Example/SURFFeature/SURFFeature.csproj
  2. 13
      Emgu.CV/Shape/Triangle2D.cs

7
Emgu.CV.Example/SURFFeature/SURFFeature.csproj

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -12,6 +12,11 @@
<AssemblyName>SURFFeature</AssemblyName>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

13
Emgu.CV/Shape/Triangle2D.cs

@ -62,6 +62,19 @@ namespace Emgu.CV
}
}
/// <summary>
/// Returns the centroid of this triangle
/// </summary>
public Point2D<double> Centeroid
{
get
{
Point2D<double>[] vertices = Array.ConvertAll<Point2D<T>, Point2D<double>>(Vertices, delegate(Point2D<T> p) { return p.Convert<double>(); });
Point2D<double> v0 = vertices[0], v1 = vertices[1], v2 = vertices[2];
return new Point2D<double>((v0.X + v1.X + v2.X) / 3.0, (v0.Y + v1.Y + v2.Y) / 3.0);
}
}
/// <summary>
/// Compare two triangles and return true if equal
/// </summary>

Loading…
Cancel
Save