Skip to content

Commit

Permalink
Updated tof_component.py to the latest tof_decoding pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
zrezke committed Apr 24, 2024
1 parent 3767968 commit 5d3aa6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion depthai_sdk/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ opencv-contrib-python>4
blobconverter>=1.4.1
pytube>=12.1.0
--extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
depthai==2.22.0
depthai
PyTurboJPEG==1.6.4
marshmallow==3.17.0
xmltodict
Expand Down
12 changes: 3 additions & 9 deletions depthai_sdk/src/depthai_sdk/components/tof_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import depthai as dai

from depthai_sdk.components.component import Component, ComponentOutput
from depthai_sdk.components.parser import parse_camera_socket
from depthai_sdk.oak_outputs.xout.xout_base import StreamXout, XoutBase
from depthai_sdk.oak_outputs.xout.xout_frames import XoutFrames
from depthai_sdk.oak_outputs.xout.xout_depth import XoutDisparityDepth
from depthai_sdk.components.parser import parse_camera_socket
from depthai_sdk.oak_outputs.xout.xout_frames import XoutFrames


class ToFComponent(Component):
def __init__(self,
Expand Down Expand Up @@ -34,13 +35,6 @@ def __init__(self,
self.node = pipeline.create(dai.node.ToF)
self.camera_node.raw.link(self.node.input)

tofConfig = self.node.initialConfig.get()
# tofConfig.depthParams.freqModUsed = dai.RawToFConfig.DepthParams.TypeFMod.MIN
tofConfig.depthParams.freqModUsed = dai.RawToFConfig.DepthParams.TypeFMod.MAX
tofConfig.depthParams.avgPhaseShuffle = False
tofConfig.depthParams.minimumAmplitude = 3.0
self.node.initialConfig.set(tofConfig)

def _find_tof(self, device: dai.Device) -> dai.CameraBoardSocket:
# Use the first ToF sensor, usually, there will only be one
features = device.getConnectedCameraFeatures()
Expand Down

0 comments on commit 5d3aa6d

Please sign in to comment.