Skip to content

Commit

Permalink
Fixed python members export to Python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFlt committed Oct 1, 2024
1 parent 60d9a40 commit 26469c7
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 69 deletions.
7 changes: 0 additions & 7 deletions modules/python/examples/realsense-rbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@
import pyrealsense2 as rs


try:
import cv2
except:
print('Could not import opencv-python! make sure that it is installed as it is required')
import sys
sys.exit(1)

import matplotlib.pyplot as plt

class PyBaseFeatureTracker(RBFeatureTracker):
Expand Down
6 changes: 5 additions & 1 deletion modules/python/generator/visp_python_bindgen/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,11 @@ def add_method_doc_to_pyargs(method: types.Method, py_arg_strs: List[str]) -> Li
continue

field_type = get_type(field.type, owner_specs, header_env.mapping)
field_name_python = field.name.lstrip('m_')
field_name_python = field.name
prefix_member = 'm_'
if field_name_python.startswith(prefix_member):
field_name_python = field_name_python[len(prefix_member):]

logging.info(f'Found field in class/struct {name_cpp}: {field_type} {field.name}')

def_str = 'def_'
Expand Down
12 changes: 6 additions & 6 deletions tutorial/tracking/render-based/data/sequence1/dragon.0.pos
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
0.03385069791
0.009459969456
0.1522304652
-2.625824241
-0.03646930969
0.601980212
-0.005349535388
-0.01516976067
0.2050684923
-2.690336518
-0.02316506528
0.06402556549
90 changes: 35 additions & 55 deletions tutorial/tracking/render-based/data/sequence1/dragon.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,67 +15,47 @@
"maxIterations": 10
},
"model": "data/sequence1/dragon.obj",

"silhouetteExtractionSettings" : {
"silhouetteExtractionSettings": {
"threshold": {
"type": "relative",
"value": 0.1,
"reusePreviousPoints": true
"value": 0.1
},
"sampling" : {
"sampling": {
"samplingRate": 1,
"numPoints": 128
"numPoints": 256,
"reusePreviousPoints": true
}
},

"mask": {
"type": "histogram",
"bins": 32,
"objectUpdateRate": 0.1,
"backgroundUpdateRate": 0.1,
"maxDepthError": 0.01
},
"drift": {
"type": "probabilistic",
"colorUpdateRate": 0.1,
"initialColorSigma": 15.0,
"depthSigma": 0.01,
"filteringMaxDistance": 0.001,
"minDistanceNewPoints": 0.005
},
"features": [
{
"type": "depth",
"weight": 0.1,
"step": 8,
"useMask": true,
"minMaskConfidence": 0.7
"mask": {
"type": "histogram",
"bins": 32,
"objectUpdateRate": 0.1,
"backgroundUpdateRate": 0.1,
"maxDepthError": 0.01
},
{
"type": "silhouetteColor",
"weight": 0.01,
"ccd": {
"h": 8,
"delta_h": 1
}
"drift": {
"type": "probabilistic",
"colorUpdateRate": 0.1,
"initialColorSigma": 15.0,
"depthSigma": 0.01,
"filteringMaxDistance": 0.001,
"minDistanceNewPoints": 0.005
},

{
"type": "klt",
"weight": 0.1,
"useMask": true,
"minMaskConfidence": 0.5,
"maxReprojectionErrorPixels": 5.0,
"newPointsMinPixelDistance": 4,
"minimumNumPoints": 20,
"blockSize": 5,
"useHarris": true,
"harris": 0.05,
"maxFeatures": 500,
"minDistance": 5.0,
"pyramidLevels": 3,
"quality": 0.01,
"windowSize": 5
}
]
"features": [
{
"type": "depth",
"weight": 0.1,
"step": 8,
"useMask": true,
"minMaskConfidence": 0.7
},
{
"type": "silhouetteColor",
"weight": 0.01,
"ccd": {
"h": 8,
"delta_h": 1
}
}
]
}

0 comments on commit 26469c7

Please sign in to comment.