1.9.0 • Published 10 months ago

@luxonis/visualizer-protobuf v1.9.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
10 months ago

Luxonis | Visualizer Library

Visualize your streams and data with ease

Quick Example

export const App: React.FC = () => {
  const [connections, setConnections] = React.useState<WebRtcConnection[]>([]);

  React.useEffect(() => {
    const newConnection = new WebRtcConnection({
      clientId: "YOUR-CLIENT-ID",
      applicationIdentifier: "YOUR-APPLICATION-IDENTIFIER",
      authPayload: "YOUR-AUTH-PAYLOAD",
      iceServers: [
        {
          urls: ["turn:example.url:1234"],
          username: "EXAMPLE-USERNAME",
          credential: "EXAMPLE-CREDENTIAL",
        },
      ],
    });

    setConnections([newConnection]);
  }, []);

  return (
    <VisualizerContext connections={connections}>
      <PanelLayout>
          <ImagePanel topic="h264" annotationTopics={['detections']} />
          <ImagePanel topic="mjpeg" />
          <ImagePanel topic="depth" annotationTopics={['detections']} />
          <ImagePanel topic="raw" />
          <PointCloudPanel topic="pointcloud" />
      </PanelLayout>
    </VisualizerContext>
  );
};

Usage

Initialization

  1. Create connection array using WebRtcConnection or WebSocketConnection classes
  2. Wrap your structure with VisualizerContext
<VisualizerContext connections={connections}>
  {/* Panels */}
</VisualizerContext>
  1. For locale loading and basic layout use PanelLayout wrapper
<VisualizerContext connections={connections}>
  <PanelLayout>
    {/* Panels */}
  </PanelLayout>
</VisualizerContext>

Panels

  • Use ImagePanel for regular image streams. annotationTopics property can be used to specify topics with drawings on top of the stream; extraAnnotationTopics is the same but initially will be hidden from UI selection under dropdown
<ImagePanel
  topic="raw"
  annotationTopics={['main']}
  extraAnnotationTopics={['additional']}
/>
  • Use PointCloudPanel for Point Cloud streams
<PointCloudPanel topic="pointcloud" />

Services

Visualizer library supports RPC (remote procedure call) services:

const response: DataView = await connection.request({
  name: 'getData',
  ignoreResponse: false, // Optional
  body: { field: 'test' }, // Optional. Will be sent as binary DataView
});

Development

  • Install protoc for protobuf compilation
  • Run yarn build under ./apps/depthai-visualizer to build
1.9.0

10 months ago

1.8.8

10 months ago

1.8.7

10 months ago

1.7.7

10 months ago

1.7.6

10 months ago

1.7.3

10 months ago

1.7.2

10 months ago

1.7.1

10 months ago

1.6.2

10 months ago

1.7.0

10 months ago

1.7.5

10 months ago

1.7.4

10 months ago

1.6.1

10 months ago

1.6.0

10 months ago

1.5.4

10 months ago

1.4.4

10 months ago

1.4.3

10 months ago

1.4.2

10 months ago

1.4.1

10 months ago

1.4.0

10 months ago

1.3.1

10 months ago

1.2.1

10 months ago

1.1.1

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago