本文整理匯總了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;
}
}