private ConnectedComponent(IntPtr instance) { Centroid = PointD.FromPointInfo(NativeConnectedComponent.GetCentroid(instance)); Color = NativeConnectedComponent.GetColor(instance); Height = NativeConnectedComponent.GetHeight(instance); Id = NativeConnectedComponent.GetId(instance); Width = NativeConnectedComponent.GetWidth(instance); X = NativeConnectedComponent.GetX(instance); Y = NativeConnectedComponent.GetY(instance); }
private ChannelMoments(PixelChannel channel, IntPtr instance) { Channel = channel; NativeChannelMoments nativeInstance = new NativeChannelMoments(instance); Centroid = PointD.FromPointInfo(nativeInstance.Centroid); EllipseAngle = nativeInstance.EllipseAngle; EllipseAxis = PointD.FromPointInfo(nativeInstance.EllipseAxis); EllipseEccentricity = nativeInstance.EllipseEccentricity; EllipseIntensity = nativeInstance.EllipseIntensity; SetHuInvariants(nativeInstance); }