[−][src]Struct opencv::line_descriptor::KeyLine
A class to represent a line
As aformentioned, it is been necessary to design a class that fully stores the information needed to characterize completely a line and plot it on image it was extracted from, when required.
KeyLine class has been created for such goal; it is mainly inspired to Feature2d's KeyPoint class, since KeyLine shares some of KeyPoint's fields, even if a part of them assumes a different meaning, when speaking about lines. In particular:
- the class_id field is used to gather lines extracted from different octaves which refer to same line inside original image (such lines and the one they represent in original image share the same class_id value)
- the angle field represents line's slope with respect to (positive) X axis
- the pt field represents line's midpoint
- the response field is computed as the ratio between the line's length and maximum between image's width and height
- the size field is the area of the smallest rectangle containing line
Apart from fields inspired to KeyPoint class, KeyLines stores information about extremes of line in original image and in octave it was extracted from, about line's length and number of pixels it covers.
Fields
angle: f32
class_id: i32
octave: i32
pt: Point2f
response: f32
size: f32
start_point_x: f32
start_point_y: f32
end_point_x: f32
end_point_y: f32
s_point_in_octave_x: f32
s_point_in_octave_y: f32
e_point_in_octave_x: f32
e_point_in_octave_y: f32
line_length: f32
num_of_pixels: i32
Methods
impl KeyLine
[src]
pub fn get_start_point(self) -> Result<Point2f>
[src]
Returns the start point of the line in the original image
pub fn get_end_point(self) -> Result<Point2f>
[src]
Returns the end point of the line in the original image
pub fn get_start_point_in_octave(self) -> Result<Point2f>
[src]
Returns the start point of the line in the octave it was extracted from
pub fn get_end_point_in_octave(self) -> Result<Point2f>
[src]
Returns the end point of the line in the octave it was extracted from
pub fn default() -> Result<KeyLine>
[src]
constructor
Trait Implementations
impl Clone for KeyLine
[src]
impl Copy for KeyLine
[src]
impl Debug for KeyLine
[src]
impl PartialEq<KeyLine> for KeyLine
[src]
impl StructuralPartialEq for KeyLine
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyLine
impl Send for KeyLine
impl Sync for KeyLine
impl Unpin for KeyLine
impl UnwindSafe for KeyLine
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,