[][src]Crate cv_core

Rust CV Core

This library provides common abstractions and types for computer vision (CV) in Rust. All the crates in the rust-cv ecosystem that have or depend on CV types depend on this crate. This includes things like cameras, bearings, poses, etc. The crate is designed to be very small so that it adds negligable build time. It pulls in some dependencies that will probably be brought in by writing computer vision code normally. The core concept is that all CV crates can work together with each other by using the abstractions and types specified in this crate.

The crate is designed to work with #![no_std], even without an allocator. libm is used for all math algorithms that aren't present in std. Any code that doesn't need to be shared across all CV crates should not belong in this repository. If there is a good reason to put code that some crates may need into cv-core, it should be gated behind a feature.

Features

  • pinhole - enables the pinhole module and some methods for EssentialMatrix

Re-exports

pub use nalgebra;
pub use sample_consensus;

Modules

geom

This module contains functions to perform various geometric algorithms.

Structs

CameraPoint

A 3d point which is relative to the camera's optical center and orientation where the positive X axis is right, positive Y axis is down, and positive Z axis is forwards from the optical center of the camera. The unit of distance of a CameraPoint is unspecified and relative to the current reconstruction.

CameraPose

This contains a camera pose, which is a pose of the camera relative to the world. This transforms camera points (with depth as z) into world coordinates. This also tells you where the camera is located and oriented in the world.

EssentialMatrix

This stores an essential matrix, which is satisfied by the following constraint:

FeatureMatch

Normalized keypoint match

FeatureWorldMatch

Normalized keypoint to world point match

KeyPoint

A point on an image frame. This type should only be used when the point location is on the image frame in pixel coordinates. This means the keypoint is neither undistorted nor normalized.

RelativeCameraPose

This contains a relative pose, which is a pose that transforms the CameraPoint of one image into the corresponding CameraPoint of another image. This transforms the point from the camera space of camera A to camera B.

UnscaledRelativeCameraPose

This stores a RelativeCameraPose that has not had its translation scaled.

WorldPoint

A point in "world" coordinates. This means that the real-world units of the pose are unknown, but the unit of distance and orientation are the same as the current reconstruction.

WorldPose

This contains a world pose, which is a pose of the world relative to the camera. This maps WorldPoint into CameraPoint, changing an absolute position into a vector relative to the camera.

Traits

Bearing

Describes the direction that the projection onto the camera's optical center came from. It is implemented on projection items from different camera models.

CameraModel

Allows conversion between the point on an image and the internal projection which can describe the bearing of the projection out of the camera.

ImagePoint

Allows the retrieval of the point on the image the feature came from.