Struct opencv::imgproc::Subdiv2D

source ·
pub struct Subdiv2D { /* private fields */ }

Implementations§

source§

impl Subdiv2D

source

pub fn default() -> Result<Subdiv2D>

creates an empty Subdiv2D object. To create a new empty Delaunay subdivision you need to use the [init_delaunay] function.

source

pub fn new(rect: Rect) -> Result<Subdiv2D>

creates an empty Subdiv2D object. To create a new empty Delaunay subdivision you need to use the [init_delaunay] function.

Overloaded parameters
Parameters
  • rect: Rectangle that includes all of the 2D points that are to be added to the subdivision.

The function creates an empty Delaunay subdivision where 2D points can be added using the function insert() . All of the points to be added must be within the specified rectangle, otherwise a runtime error is raised.

Trait Implementations§

source§

impl Boxed for Subdiv2D

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl Debug for Subdiv2D

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Subdiv2D

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Subdiv2DTrait for Subdiv2D

source§

fn as_raw_mut_Subdiv2D(&mut self) -> *mut c_void

source§

fn init_delaunay(&mut self, rect: Rect) -> Result<()>

Creates a new empty Delaunay subdivision Read more
source§

fn insert(&mut self, pt: Point2f) -> Result<i32>

Insert a single point into a Delaunay triangulation. Read more
source§

fn insert_multiple(&mut self, ptvec: &Vector<Point2f>) -> Result<()>

Insert multiple points into a Delaunay triangulation. Read more
source§

fn locate( &mut self, pt: Point2f, edge: &mut i32, vertex: &mut i32 ) -> Result<i32>

Returns the location of a point within a Delaunay triangulation. Read more
source§

fn find_nearest(&mut self, pt: Point2f, nearest_pt: &mut Point2f) -> Result<i32>

Finds the subdivision vertex closest to the given point. Read more
source§

fn find_nearest_def(&mut self, pt: Point2f) -> Result<i32>

Finds the subdivision vertex closest to the given point. Read more
source§

fn get_voronoi_facet_list( &mut self, idx: &Vector<i32>, facet_list: &mut Vector<Vector<Point2f>>, facet_centers: &mut Vector<Point2f> ) -> Result<()>

Returns a list of all Voronoi facets. Read more
source§

impl Subdiv2DTraitConst for Subdiv2D

source§

fn as_raw_Subdiv2D(&self) -> *const c_void

source§

fn get_edge_list(&self, edge_list: &mut Vector<Vec4f>) -> Result<()>

Returns a list of all edges. Read more
source§

fn get_leading_edge_list( &self, leading_edge_list: &mut Vector<i32> ) -> Result<()>

Returns a list of the leading edge ID connected to each triangle. Read more
source§

fn get_triangle_list(&self, triangle_list: &mut Vector<Vec6f>) -> Result<()>

Returns a list of all triangles. Read more
source§

fn get_vertex(&self, vertex: i32, first_edge: &mut i32) -> Result<Point2f>

Returns vertex location from vertex ID. Read more
source§

fn get_vertex_def(&self, vertex: i32) -> Result<Point2f>

Returns vertex location from vertex ID. Read more
source§

fn get_edge(&self, edge: i32, next_edge_type: i32) -> Result<i32>

Returns one of the edges related to the given edge. Read more
source§

fn next_edge(&self, edge: i32) -> Result<i32>

Returns next edge around the edge origin. Read more
source§

fn rotate_edge(&self, edge: i32, rotate: i32) -> Result<i32>

Returns another edge of the same quad-edge. Read more
source§

fn sym_edge(&self, edge: i32) -> Result<i32>

source§

fn edge_org(&self, edge: i32, orgpt: &mut Point2f) -> Result<i32>

Returns the edge origin. Read more
source§

fn edge_org_def(&self, edge: i32) -> Result<i32>

Returns the edge origin. Read more
source§

fn edge_dst(&self, edge: i32, dstpt: &mut Point2f) -> Result<i32>

Returns the edge destination. Read more
source§

fn edge_dst_def(&self, edge: i32) -> Result<i32>

Returns the edge destination. Read more
source§

impl Send for Subdiv2D

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.