MVSDK 2.4.1.2
See the version list below for details.
dotnet add package MVSDK --version 2.4.1.2
NuGet\Install-Package MVSDK -Version 2.4.1.2
<PackageReference Include="MVSDK" Version="2.4.1.2" />
paket add MVSDK --version 2.4.1.2
#r "nuget: MVSDK, 2.4.1.2"
// Install MVSDK as a Cake Addin #addin nuget:?package=MVSDK&version=2.4.1.2 // Install MVSDK as a Cake Tool #tool nuget:?package=MVSDK&version=2.4.1.2
MVSDK C#
This is a C# wrapper for Huaray (iRAYPLE) MVSDK C library,
similar to the provided MVSDK_Net.dll
and MVSDKFG_Net.dll
provided by iRAYPAL.
However this library have C structs processed into magaged class and structs for easier use.
Requirements
This is just a wrapper of the provided C library, you have to install MVViewer Client
(or get the lib by other methods) before you can use this library.
Official MVViewer Client
can be downloaded from Huaray (iRAYPLE)
website, the latest version tested is v2.4.1
(2023-11-22).
Usage
Enumerate devices
// scan from all interface types
DeviceEnumerator.Enumerate();
// scan only usb3 devices
DeviceEnumerator.Enumerate(InterfaceType.USB3);
// scan PCIe and GigE devices
DeviceEnumerator.Enumerate(InterfaceType.PCIe | InterfaceType.GigE);
// unicast scanning
DeviceEnumerator.Enumerate(IPAddress.Parse("192.168.1.10"));
Create and connect to the camera
var camera = new VideoCaptrue(IPAddress.Parse("192.168.1.10"));
// or
var camera = new VideoCapture("...", CreateHandleMode.ByCameraKey);
var camera = new VideoCapture("...", CreateHandleMode.ByUserDefinedName);
var camera = new VideoCapture(0); // by scan index, not recommanded.
// change the IP address of the camera (GigE) if required
//camera.ForceIP(...);
/* call open to actually connect to the camera */
camera.Open();
When creating the VideoCapture
instance with CreateHandleMode
other than ByScanIndex
,
the lib will scan for cameras with DeviceEnumerator.Enumerate(InterfaceType.All)
.
If you want to create the VideoCapture
instance by index, do a scan first yourself, or
StatusCode.InvalidResource
because no camera information is in the native cache.
Streaming
// attach event handler
camera.FrameGrabbed += (sender, e) =>
{
/* do something the the frame */
};
// start streaming
camera.StartGrabbing();
/* `camera.FrameGrabbed` event will be invoked. */
// stop streaming
camera.StopGrabbing();
Recording
// attach event handler
camera.FrameGrabbed += (sender, e) =>
{
var camera = (VideoCapture)sender;
camera.RecordFrame(e);
};
// prepare for recording
camera.StartRecording(...);
// start streaming
camera.StartGrabbing();
/* `camera.FrameGrabbed` event will be invoked. */
// stop streaming
camera.StopGrabbing();
// end recording
camera.StopRecording();
Clean-up
camera.Close(); // disconnect
camera.Dispose(); // don't forget to dispose native resources when you're done
TODO
- more
StandardFeatures
, currently I just added the ones I use. - wrap
IMV_FG_*
for CameraLink devices
Disclaimer
The authohr of this software is not affiliated with Zhejiang Huaray (iRAYPLE) Cooperation in any way. All trademarks and registered trademarks are property of their respective owners, and company, product and service names mentioned in this readme or appearing in source code or other artifacts in this repository are used for identification purposes only.
Use of these names does not imply endorsement by either Zhejiang Huaray (iRAYPLE) Cooperation.
Reference
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Framework | net481 is compatible. |
-
.NETFramework 4.8.1
- MVSDK.Abstraction (>= 1.0.0)
-
net6.0
- MVSDK.Abstraction (>= 1.0.0)
-
net8.0
- MVSDK.Abstraction (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.