Skip to content

Commit

Permalink
Big refactor. Visualizer doesn't work, neither does packet syncing. O…
Browse files Browse the repository at this point in the history
…nly queue/callback should work. Test other options as well (Ros stremaing, recording, etc.)
  • Loading branch information
Erol444 committed Jun 28, 2023
1 parent c311296 commit fab9484
Show file tree
Hide file tree
Showing 34 changed files with 694 additions and 1,254 deletions.
4 changes: 0 additions & 4 deletions depthai_sdk/docs/source/fundamentals/visualizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ Visualizer
:members:
:undoc-members:

.. autoclass:: depthai_sdk.visualize.visualizer.Platform
:members:
:undoc-members:

Objects
-------

Expand Down
4 changes: 2 additions & 2 deletions depthai_sdk/docs/source/oak-camera.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Interoperability with DepthAI API
---------------------------------

DepthAI SDK was developed with `DepthAI API <https://docs.luxonis.com/projects/api/en/latest/>`__ interoperability in mind.
Users can access all depthai API nodes inside components, and after ``oak.build()`` also the `dai.Pipeline <https://docs.luxonis.com/projects/api/en/latest/components/pipeline/>`__
and `dai.Device <https://docs.luxonis.com/projects/api/en/latest/components/device/>`__ objects.
Users can access all depthai API nodes inside components, along with the `dai.Pipeline <https://docs.luxonis.com/projects/api/en/latest/components/pipeline/>`__ (``oak.pipeline``)
and `dai.Device <https://docs.luxonis.com/projects/api/en/latest/components/device/>`__ (``oak.device``) objects.

.. literalinclude:: ../../examples/mixed/api_interop.py
:language: python
Expand Down
1 change: 0 additions & 1 deletion depthai_sdk/docs/source/visualizer_formats/example.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"platform": "pc",
"frame_shape": [720, 1280],
"config": {
"output": {
Expand Down
7 changes: 0 additions & 7 deletions depthai_sdk/docs/source/visualizer_formats/format.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{
"platform": {
"type": "string",
"enum": [
"pc",
"robothub"
]
},
"frame_shape": {
"type": "array",
"items": {
Expand Down
7 changes: 2 additions & 5 deletions depthai_sdk/examples/mixed/api_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
nn = oak.create_nn('mobilenet-ssd', color)
oak.visualize([nn.out.passthrough, nn], fps=True)

# Build the pipeline, connect to the oak, update components. Place interop logic AFTER oak.build()
pipeline = oak.build()

nn.node.setNumInferenceThreads(2) # Configure components' nodes

features = pipeline.create(dai.node.FeatureTracker) # Create new pipeline nodes
features = oak.pipeline.create(dai.node.FeatureTracker) # Create new pipeline nodes
color.node.video.link(features.inputImage)

out = pipeline.create(dai.node.XLinkOut)
out = oak.pipeline.create(dai.node.XLinkOut)
out.setStreamName('features')
features.outputFeatures.link(out.input)

Expand Down
2 changes: 0 additions & 2 deletions depthai_sdk/examples/mixed/collision_avoidance.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def cb(packet: DepthPacket):

oak.visualize([stereo], fps=True, callback=cb)

oak.build()

slc = oak.pipeline.create(dai.node.SpatialLocationCalculator)
for x in range(15):
for y in range(9):
Expand Down
15 changes: 15 additions & 0 deletions depthai_sdk/examples/mixed/packet_queue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from depthai_sdk import OakCamera
from depthai_sdk.classes.packets import FramePacket
import cv2

with OakCamera() as oak:
color = oak.create_camera('color')
q = oak.create_queue(color, max_size=5)

oak.show_graph()
oak.start()

while oak.running():
oak.poll()
p: FramePacket = q.get(block=True)
cv2.imshow(p.name, p.frame)
1 change: 0 additions & 1 deletion depthai_sdk/src/depthai_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from depthai_sdk.classes.enum import ResizeMode
from depthai_sdk.logger import set_logging_level
from depthai_sdk.oak_camera import OakCamera
from depthai_sdk.oak_device import OakDevice
from depthai_sdk.previews import *
from depthai_sdk.record import *
from depthai_sdk.replay import *
Expand Down
222 changes: 0 additions & 222 deletions depthai_sdk/src/depthai_sdk/classes/output_config.py

This file was deleted.

Loading

0 comments on commit fab9484

Please sign in to comment.