Class Vc0706
Class that represents a VC0706 serial VGA camera
Assembly: Vc0706.dll
View Source
public class Vc0706 : ICamera, IDisposable
Implements:
Meadow.Peripherals.Sensors.Cameras.ICamera
, System.IDisposable
Properties
SerialNumber
The camera serial number
View Source
public byte SerialNumber { get; }
BytesAvailable
Number of bytes available in the camera buffer
View Source
public byte BytesAvailable { get; }
IsDisposed
Is the object disposed
View Source
public bool IsDisposed { get; }
Methods
IsMotionDetected()
Check if camera has detected recent motion
View Source
public bool IsMotionDetected()
Returns
System.Boolean
SetMotionStatus(byte, byte, byte)
Set the motion detection mode
View Source
public bool SetMotionStatus(byte x, byte d1, byte d2)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Byte | x |
System.Byte | d1 |
System.Byte | d2 |
GetMotionStatus(byte)
Get the motion detection mode
View Source
public bool GetMotionStatus(byte x)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Byte | x |
SetMotionDetect(bool)
Enable or disable motion detection
View Source
public bool SetMotionDetect(bool enable)
Returns
System.Boolean
: true if successful
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enable | true to enable |
GetMotionDetectMode()
Get the motion detection mode
View Source
public bool GetMotionDetectMode()
Returns
System.Boolean
: true if enabled, false if not enabled or command failed### GetCaptureResolution()
Get the current image capture resolution
View Source
public Vc0706.ImageResolution GetCaptureResolution()
Returns
Meadow.Foundation.Sensors.Camera.Vc0706.ImageResolution: the image resolution as an ImageResolution enum### SetCaptureResolution(ImageResolution) Set the image resolution
View Source
public bool SetCaptureResolution(Vc0706.ImageResolution resolution)
Returns
System.Boolean
: true if successful
Parameters
Type | Name | Description |
---|---|---|
Meadow.Foundation.Sensors.Camera.Vc0706.ImageResolution | resolution | the new image capture resolution |
GetDownsize()
Get the downsize value
View Source
public byte GetDownsize()
Returns
System.Byte
SetDownsize(byte)
Set downsize
View Source
public bool SetDownsize(byte downsize)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Byte | downsize |
GetVersion()
Get the camera version
View Source
public string GetVersion()
Returns
System.String
: the version as a string### SetOnScreenDisplay(byte, byte, string)
Enable onscreen display for composite output (may not work)
View Source
public void SetOnScreenDisplay(byte x, byte y, string message)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | x | x location of display in pixels |
System.Byte | y | y location of display in pixels |
System.String | message | text to display |
SetCompression(byte)
Set compression (0-255)
View Source
public bool SetCompression(byte compression)
Returns
System.Boolean
: true if successful
Parameters
Type | Name |
---|---|
System.Byte | compression |
GetCompression()
Get compression (0-255)
View Source
public byte GetCompression()
Returns
System.Byte
: compression value### SetPanTiltZoom(ushort, ushort, ushort, ushort)
Set Pan, tilt and zoom
View Source
public bool SetPanTiltZoom(ushort horizontalZoom, ushort verticalZoom, ushort pan, ushort tilt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.UInt16 | horizontalZoom |
System.UInt16 | verticalZoom |
System.UInt16 | pan |
System.UInt16 | tilt |
GetPanTiltZoom()
Get Pan, Tilt and Zoom values
View Source
public (ushort width, ushort height, ushort horizonalZoom, ushort verticalZoom, ushort pan, ushort tilt) GetPanTiltZoom()
Returns
System.ValueTuple<System.UInt16,System.UInt16,System.UInt16,System.UInt16,System.UInt16,System.UInt16>
CapturePhoto()
Capture a new image
View Source
public bool CapturePhoto()
Returns
System.Boolean
: true if successful### IsPhotoAvailable()
Check if there is picture data on the camera
View Source
public bool IsPhotoAvailable()
Returns
System.Boolean
: true is data is available### GetPhotoStream()
Retrieve the image data from the camera
View Source
public Task<MemoryStream?> GetPhotoStream()
Returns
System.Threading.Tasks.Task<System.IO.MemoryStream>
: The image data as a jpeg in a MemoryStream### GetPhotoData()
Retrieve the image data from the camera
View Source
public Task<byte[]> GetPhotoData()
Returns
System.Threading.Tasks.Task<System.Byte[]>
: The image data as a jpeg in a byte array### ResumeVideo()
Resume live video over composite
View Source
public bool ResumeVideo()
Returns
System.Boolean
TvOn()
Enable TV output over composite
View Source
public bool TvOn()
Returns
System.Boolean
TvOff()
Disable TV output over composite
View Source
public bool TvOff()
Returns
System.Boolean
GetColorMode()
Get the current camera color mode (Color, Black and White, automatic)
View Source
public Vc0706.ColorMode GetColorMode()
Returns
Meadow.Foundation.Sensors.Camera.Vc0706.ColorMode
SetColorMode(ColorMode)
Set the camera color mode (Color, Black and White, automatic)
View Source
public void SetColorMode(Vc0706.ColorMode colorControl)
Parameters
Type | Name |
---|---|
Meadow.Foundation.Sensors.Camera.Vc0706.ColorMode | colorControl |
GetFrameLength()
Get the length of the current frame
View Source
public uint GetFrameLength()
Returns
System.UInt32
ReadPicture(byte)
Read bytes from the camera buffer
View Source
public byte[] ReadPicture(byte length)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
System.Byte | length |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
View Source
public void Dispose()
Dispose(bool)
Dispose of the object
View Source
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Is disposing |
Implements
Meadow.Peripherals.Sensors.Cameras.ICamera
System.IDisposable