pub struct Feature {
pub point: Point2,
pub descriptor: Vec<u8>,
pub scale: f32,
pub angle: f32,
pub response: f32,
pub octave: i32,
pub point3d_id: Option<u32>,
}Expand description
特征点
Fields§
§point: Point2图像坐标 (x, y)
descriptor: Vec<u8>特征描述符
scale: f32特征点的尺度(用于 SIFT 等)
angle: f32特征点的方向角度(弧度)
response: f32特征点的响应强度
octave: i32金字塔层级(用于 SIFT 等)
point3d_id: Option<u32>对应的 3D 点 ID(如果已三角化)
Implementations§
Source§impl Feature
impl Feature
Sourcepub fn new(
point: Point2,
descriptor: Vec<u8>,
scale: f32,
angle: f32,
response: f32,
octave: i32,
) -> Self
pub fn new( point: Point2, descriptor: Vec<u8>, scale: f32, angle: f32, response: f32, octave: i32, ) -> Self
创建新的特征点
Sourcepub fn is_triangulated(&self) -> bool
pub fn is_triangulated(&self) -> bool
检查特征点是否已三角化
Sourcepub fn set_point3d_id(&mut self, point3d_id: u32)
pub fn set_point3d_id(&mut self, point3d_id: u32)
设置对应的 3D 点 ID
Sourcepub fn clear_point3d_id(&mut self)
pub fn clear_point3d_id(&mut self)
清除 3D 点关联
Sourcepub fn descriptor_distance(&self, other: &Feature) -> Result<f32>
pub fn descriptor_distance(&self, other: &Feature) -> Result<f32>
计算与另一个特征点的描述符距离
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Feature
impl<'de> Deserialize<'de> for Feature
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Feature
Auto Trait Implementations§
impl Freeze for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnsafeUnpin for Feature
impl UnwindSafe for Feature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.