Camera

scalacv.Camera
See theCamera companion class
object Camera

Attributes

Companion
class
Source
Camera.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Camera.type

Members list

Value members

Concrete methods

def open(index: Int, options: CaptureOptions = ...): Either[CvError, Camera]

Opens a camera by device index. Left if the device does not exist, is busy, or no backend can drive it.

Opens a camera by device index. Left if the device does not exist, is busy, or no backend can drive it.

Attributes

Source
Camera.scala
def openFile(source: String, options: CaptureOptions = ...): Either[CvError, Camera]

Opens a video file, URL (rtsp://, http://), or frame_%04d.png sequence.

Opens a video file, URL (rtsp://, http://), or frame_%04d.png sequence.

Attributes

Source
Camera.scala
def using[A](index: Int, options: CaptureOptions = ...)(use: Camera => A): Either[CvError, A]

Opens camera index, runs use, and closes the camera afterwards — even on an exception.

Opens camera index, runs use, and closes the camera afterwards — even on an exception.

The whole use body runs inside Cv.attempt, as in Image.reading: a CvError.NativeCall thrown by an operation inside the block comes back as a Left rather than escaping past the Either. Programmer errors (IllegalArgumentException, use-after-close) still throw.

Attributes

Source
Camera.scala
def usingFile[A](source: String, options: CaptureOptions = ...)(use: Camera => A): Either[CvError, A]

Opens source, runs use, and closes the camera afterwards. The body runs inside Cv.attempt for the reason given on using.

Opens source, runs use, and closes the camera afterwards. The body runs inside Cv.attempt for the reason given on using.

Attributes

Source
Camera.scala