matrix-io-malos 1.0.53865

dotnet add package matrix-io-malos --version 1.0.53865
NuGet\Install-Package matrix-io-malos -Version 1.0.53865
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="matrix-io-malos" Version="1.0.53865" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add matrix-io-malos --version 1.0.53865
#r "nuget: matrix-io-malos, 1.0.53865"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install matrix-io-malos as a Cake Addin
#addin nuget:?package=matrix-io-malos&version=1.0.53865

// Install matrix-io-malos as a Cake Tool
#tool nuget:?package=matrix-io-malos&version=1.0.53865

image Build status

MATRIXIO .Net MALOS Driver

A simple .Net driver for communicating with MATRIX-MALOS services.

License

This application follows the GNU General Public License, as described in the LICENSE file.

Installing

The package is available on NuGet, so you can easily install via NuGet:

PM> Install-Package matrix-io-malos

Using the MalosDriver

To use the MALOS driver in your code you can do the following:

class Program
{
    static matrix_io_malos.Driver driver;

    static void Main(string[] args)
    {
        // Initialize the driver for malos vision with the IP and the BasePort.
        driver = new matrix_io_malos.Driver("127.0.0.1", matrix_io_malos.BasePort.Vision);

        // Add the event handler to receive the data events.
        driver.onGetData += Driver_onGetData;

        // Start the connection to get the data events from Malos Vision.
        driver.getData();
    }

    private static void Driver_onGetData(byte[] data)
    {
        // Parse the date from byte array to a vision result object.
        MatrixIO.Vision.V1.VisionResult result;
        result = MatrixIO.Vision.V1.VisionResult.Parser.ParseFrom(data);

        // Convert the vision result to a json.
        var json = Google.Protobuf.JsonFormatter.Default.Format(result);
        Console.WriteLine(json);
    }

    private static void stopGetData()
    {
        // Stop the connection to get data from Malos Vision.
        driver.stopGetData();
    }
}

MALOS Vision data

On each onGetData event you will receive a byte array data that you can parse to a VisionResult object. if you convert the VisionResult to a Json you will have an object like the follow

{
    "rectDetection": [{
        "facialRecognition": [{
            "tag": "FACE_ID",
            "faceId": "1543956668-1505437196092-26970"
        }, {
            "tag": "AGE",
            "age": 38
        }, {
            "tag": "EMOTION",
            "emotion": "NEUTRAL"
        }, {
            "tag": "GENDER",
            "gender": "MALE"
        }, {
            "tag": "HEAD_POSE",
            "poseYaw": 0.0326323733,
            "posePitch": -0.0489135,
            "isLooking": true
        }],
        "trackingId": "219",
        "uuid": "30a5dbce-c27a-46d7-8334-2d7a60d427bb"
    }, {
        "facialRecognition": [{
            "tag": "FACE_ID",
            "faceId": "1543956673-1505449935887-18600"
        }, {
            "tag": "AGE",
            "age": 34
        }, {
            "tag": "EMOTION",
            "emotion": "SAD"
        }, {
            "tag": "GENDER",
            "gender": "MALE"
        }, {
            "tag": "HEAD_POSE",
            "poseYaw": 0.0282833464,
            "poseRoll": 0.05874507,
            "posePitch": 0.19542487
        }],
        "trackingId": "225",
        "uuid": "6465747a-3d69-40dd-b59f-dd51c9ebf526"
    }],
    "visionEvent": [{
        "tag": "TRACKING_END",
        "trackingId": "219",
        "dwellTime": 1.47886264
    }, {
        "tag": "TRACKING_START",
        "trackingId": "225"
    }],
    "uuid": "945968ad-aa9f-48ea-b57b-75c5b50081ce"
}

VisionResult

This message organizes (at least) four components: - Detections (faces, hands, cars). - Tracking information. - Recognition (gender, age, emotion). - Events (New face in video, face leaves video, gesture starts).

  • rectDetection Results of all the rectangular detectors. Each detecion also stores the recognitions that can be done inside of this rectangle. For instance, for faces the available recognitions are (age, gender, emotion).
  • visionEvent Vision events. For instance, tracking events (start, end). This message is not inside rect_detection because some events will happen when the detection is no longer available, for instance: TRACKING_END.
  • uuid UUID (v4) that uniquely identifies each vision result

RectangularDetection

Result of a rectangle detector.

  • facialRecognition Facial recognitions for this detection (age, gender, pose, features, etc).
  • tag What kind of detections the rectangle contains.
  • trackingId Tracking id for this detection.
  • uuid UUID (v4) identifies this unique rectangular detection

FacialRecognition

The following fields should only be present when the tag HAS_AGE tag is set.

  • age Detected age.

The following fields should only be present when the tag HAS_GENDER is set.

  • gender Detected gender, genders available for detections are MALE, FEAMLE.

The following fields should only be present when the tag HAS_EMOTION is set.

  • emotion Detected emotion, emotions available for detections are ANGRY, DISGUST, CONFUSED, HAPPY, SAD, SURPRISED, CALM, FEAR, NEUTRAL.

The following fields should only be present when the tag HAS_HEAD_POSE is set.

  • poseYaw Face yaw.
  • poseRoll Face roll.
  • posePitch Face pitch.
  • isLooking Face looking.

VisionEvent

  • tag Tag for events. The fields below will make sense for a specific tag. for face will be TRACKING_START or TRACKING_END
  • trackingId Object identifier.
  • dwellTime Dwell time: Amount of seconds facing the camera. Used for TRACKING_END event.

Who can answer questions about this library?

Product Compatible and additional computed target framework versions.
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.53865 751 12/5/2018