Tanoda
DistortionData.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using System;
10
11namespace Leap {
22 public class DistortionData {
27 public DistortionData() { }
28
32 public DistortionData(UInt64 version, float width, float height, float[] data) {
33 Version = version;
34 Width = width;
35 Height = height;
36 Data = data;
37 }
51 public UInt64 Version { get; set; }
58 public float Width { get; set; }
65 public float Height { get; set; }
71 public float[] Data { get; set; }
76 public bool IsValid {
77 get {
78 if (Data != null &&
81 Data.Length == Width * Height * 2)
82 return true;
83
84 return false;
85 }
86 }
87 }
88}
The DistortionData class contains the distortion map for correcting the lens distortion of an image.
float[] Data
The distortion data.
float Width
The width of the distortion map.
UInt64 Version
An identifier assigned to the distortion map.
DistortionData(UInt64 version, float width, float height, float[] data)
DistortionData()
Constructs an uninitialized distortion object.
float Height
The height of the distortion map.
bool IsValid
Reports whether the distortion data is internally consistent.
static int DistortionSize
Definition: LeapC.cs:792