本文整理汇总了C#中SceneLibrary.Vector.Put方法的典型用法代码示例。如果您正苦于以下问题:C# Vector.Put方法的具体用法?C# Vector.Put怎么用?C# Vector.Put使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneLibrary.Vector
的用法示例。
在下文中一共展示了Vector.Put方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: measure_feature
/// <summary>
/// Make a measurement of a feature. This function calls elliptical_search() to
/// find the best match within three standard deviations of the predicted location.
/// </summary>
/// <param name="patch">The identifier for this feature (in this case an image patch)</param>
/// <param name="z">The best image location match for the feature, to be filled in by this function</param>
/// <param name="h">The expected image location</param>
/// <param name="S">The expected location covariance, used to specify the search region.</param>
/// <returns></returns>
public override bool measure_feature(byte[] patch,
int patchwidth,
ref Vector z,
Vector vz,
Vector h,
MatrixFixed S,
Random rnd)
{
Cholesky S_cholesky = new Cholesky(S);
MatrixFixed Sinv = S_cholesky.Inverse();
uint u_found = 0, v_found = 0;
if (SceneLib.elliptical_search(image, image_width, image_height,
patch, patchwidth, patchwidth,
h, Sinv,
ref u_found,
ref v_found,
vz,
Camera_Constants.BOXSIZE,
outputimage,
outputimage_width, outputimage_height,
show_ellipses,
calibrating,
rnd) != true)
{
// Feature not successfully matched
return false;
}
z.Put(0, (float)u_found);
z.Put(1, (float)v_found);
return true;
}
示例2: partially_initialise_point_feature
/// <summary>
/// Creates a new ImageMonoExtraData to represent the currently-selected image
/// patch, and also returns its location in the parameter z. The current
/// image patch is set using set_image_selection_automatically() or manually by the
/// user using set_image_selection().
/// </summary>
/// <param name="z">The measurement vector to be filled in</param>
/// <returns>The classimage holding this image patch information (created using new, so must be deleted elsewhere), or null if no patch is currently selected.</returns>
public byte[] partially_initialise_point_feature(Vector z)
{
if (location_selected_flag) // Patch selected
{
// Go and initialise it in scene + 3D
byte[] hip = new byte[(int)Camera_Constants.BOXSIZE * (int)Camera_Constants.BOXSIZE];
// Final save of fixated image patch
copy_into_patch(image, hip, uu, vv);
// And set measurement
z.Put(0, uu);
z.Put(1, vv);
// return the patch
return hip;
}
else
{
// No patch selected
return null;
}
}
示例3: partially_initialise_point_feature
/// <summary>
/// Creates a new ImageMonoExtraData to represent the currently-selected image
/// patch, and also returns its location in the parameter z. The current
/// image patch is set using set_image_selection_automatically() or manually by the
/// user using set_image_selection().
/// </summary>
/// <param name="z">The measurement vector to be filled in</param>
/// <returns>The classimage holding this image patch information (created using new, so must be deleted elsewhere), or null if no patch is currently selected.</returns>
public classimage_mono partially_initialise_point_feature(Vector z)
{
if (location_selected_flag) // Patch selected
{
// Go and initialise it in scene + 3D
classimage_mono hip = new classimage_mono();
hip.createImage((int)Camera_Constants.BOXSIZE, (int)Camera_Constants.BOXSIZE);
// Final save of fixated image patch
copy_into_patch(image, hip, uu, vv);
// And set measurement
z.Put(0, uu);
z.Put(1, vv);
// return the patch
return hip;
}
else
{
// No patch selected
return null;
}
}