pub struct WCameraPosition { /* private fields */ }
Expand description
This 3D Widget represents camera position in a scene by its axes or viewing frustum. :
Implementations§
Source§impl WCameraPosition
impl WCameraPosition
Sourcepub fn new(scale: f64) -> Result<WCameraPosition>
pub fn new(scale: f64) -> Result<WCameraPosition>
Sourcepub fn new_def() -> Result<WCameraPosition>
pub fn new_def() -> Result<WCameraPosition>
Creates camera coordinate frame at the origin.
§Note
This alternative version of [new] function uses the following default values for its arguments:
- scale: 1.0
Sourcepub fn new_1(
k: Matx33d,
scale: f64,
color: &impl ColorTraitConst,
) -> Result<WCameraPosition>
pub fn new_1( k: Matx33d, scale: f64, color: &impl ColorTraitConst, ) -> Result<WCameraPosition>
Sourcepub fn new_def_1(k: Matx33d) -> Result<WCameraPosition>
pub fn new_def_1(k: Matx33d) -> Result<WCameraPosition>
Display the viewing frustum
§Parameters
- K: Intrinsic matrix of the camera.
- scale: Scale of the frustum.
- color: Color of the frustum.
Creates viewing frustum of the camera based on its intrinsic matrix K.
§Note
This alternative version of [new] function uses the following default values for its arguments:
- scale: 1.0
- color: Color::white()
Sourcepub fn new_2(
fov: Vec2d,
scale: f64,
color: &impl ColorTraitConst,
) -> Result<WCameraPosition>
pub fn new_2( fov: Vec2d, scale: f64, color: &impl ColorTraitConst, ) -> Result<WCameraPosition>
Sourcepub fn new_def_2(fov: Vec2d) -> Result<WCameraPosition>
pub fn new_def_2(fov: Vec2d) -> Result<WCameraPosition>
Display the viewing frustum
§Parameters
- fov: Field of view of the camera (horizontal, vertical).
- scale: Scale of the frustum.
- color: Color of the frustum.
Creates viewing frustum of the camera based on its field of view fov.
§Note
This alternative version of [new] function uses the following default values for its arguments:
- scale: 1.0
- color: Color::white()
Sourcepub fn new_3(
k: Matx33d,
image: &impl ToInputArray,
scale: f64,
color: &impl ColorTraitConst,
) -> Result<WCameraPosition>
pub fn new_3( k: Matx33d, image: &impl ToInputArray, scale: f64, color: &impl ColorTraitConst, ) -> Result<WCameraPosition>
Display image on the far plane of the viewing frustum
§Parameters
- K: Intrinsic matrix of the camera.
- image: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum.
- scale: Scale of the frustum and image.
- color: Color of the frustum.
Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on the far end plane.
§C++ default parameters
- scale: 1.0
- color: Color::white()
Sourcepub fn new_def_3(
k: Matx33d,
image: &impl ToInputArray,
) -> Result<WCameraPosition>
pub fn new_def_3( k: Matx33d, image: &impl ToInputArray, ) -> Result<WCameraPosition>
Display image on the far plane of the viewing frustum
§Parameters
- K: Intrinsic matrix of the camera.
- image: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum.
- scale: Scale of the frustum and image.
- color: Color of the frustum.
Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on the far end plane.
§Note
This alternative version of [new] function uses the following default values for its arguments:
- scale: 1.0
- color: Color::white()
Sourcepub fn new_4(
fov: Vec2d,
image: &impl ToInputArray,
scale: f64,
color: &impl ColorTraitConst,
) -> Result<WCameraPosition>
pub fn new_4( fov: Vec2d, image: &impl ToInputArray, scale: f64, color: &impl ColorTraitConst, ) -> Result<WCameraPosition>
Display image on the far plane of the viewing frustum
§Parameters
- fov: Field of view of the camera (horizontal, vertical).
- image: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum.
- scale: Scale of the frustum and image.
- color: Color of the frustum.
Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on the far end plane.
§C++ default parameters
- scale: 1.0
- color: Color::white()
Sourcepub fn new_def_4(
fov: Vec2d,
image: &impl ToInputArray,
) -> Result<WCameraPosition>
pub fn new_def_4( fov: Vec2d, image: &impl ToInputArray, ) -> Result<WCameraPosition>
Display image on the far plane of the viewing frustum
§Parameters
- fov: Field of view of the camera (horizontal, vertical).
- image: BGR or Gray-Scale image that is going to be displayed on the far plane of the frustum.
- scale: Scale of the frustum and image.
- color: Color of the frustum.
Creates viewing frustum of the camera based on its intrinsic matrix K, and displays image on the far end plane.
§Note
This alternative version of [new] function uses the following default values for its arguments:
- scale: 1.0
- color: Color::white()
Trait Implementations§
Source§impl Boxed for WCameraPosition
impl Boxed for WCameraPosition
Source§unsafe fn from_raw(
ptr: <WCameraPosition as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <WCameraPosition as OpenCVFromExtern>::ExternReceive, ) -> Self
Source§fn into_raw(
self,
) -> <WCameraPosition as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self, ) -> <WCameraPosition as OpenCVTypeExternContainer>::ExternSendMut
Source§fn as_raw(&self) -> <WCameraPosition as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <WCameraPosition as OpenCVTypeExternContainer>::ExternSend
Source§fn as_raw_mut(
&mut self,
) -> <WCameraPosition as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <WCameraPosition as OpenCVTypeExternContainer>::ExternSendMut
Source§impl Debug for WCameraPosition
impl Debug for WCameraPosition
Source§impl Drop for WCameraPosition
impl Drop for WCameraPosition
Source§impl From<WCameraPosition> for Widget
impl From<WCameraPosition> for Widget
Source§fn from(s: WCameraPosition) -> Self
fn from(s: WCameraPosition) -> Self
Source§impl From<WCameraPosition> for Widget3D
impl From<WCameraPosition> for Widget3D
Source§fn from(s: WCameraPosition) -> Self
fn from(s: WCameraPosition) -> Self
Source§impl WCameraPositionTrait for WCameraPosition
impl WCameraPositionTrait for WCameraPosition
fn as_raw_mut_WCameraPosition(&mut self) -> *mut c_void
Source§impl WCameraPositionTraitConst for WCameraPosition
impl WCameraPositionTraitConst for WCameraPosition
fn as_raw_WCameraPosition(&self) -> *const c_void
Source§impl Widget3DTrait for WCameraPosition
impl Widget3DTrait for WCameraPosition
fn as_raw_mut_Widget3D(&mut self) -> *mut c_void
Source§fn update_pose(&mut self, pose: Affine3d) -> Result<()>
fn update_pose(&mut self, pose: Affine3d) -> Result<()>
Source§impl Widget3DTraitConst for WCameraPosition
impl Widget3DTraitConst for WCameraPosition
Source§impl WidgetTrait for WCameraPosition
impl WidgetTrait for WCameraPosition
Source§impl WidgetTraitConst for WCameraPosition
impl WidgetTraitConst for WCameraPosition
impl Send for WCameraPosition
Auto Trait Implementations§
impl Freeze for WCameraPosition
impl RefUnwindSafe for WCameraPosition
impl !Sync for WCameraPosition
impl Unpin for WCameraPosition
impl UnwindSafe for WCameraPosition
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
Source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
Source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
modification is imgproc::threshold
. Read more