Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

read the enums properly from the config file

  • Loading branch information...
commit 587119ac209162a8da1a554dc38b7f7146d3f7d5 1 parent ee951a3
@vrabaud vrabaud authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 python/object_recognition_core/io/source.py
View
10 python/object_recognition_core/io/source.py
@@ -77,4 +77,14 @@ def type_name(cls):
@classmethod
def source(self, *args, **kwargs):
+ from ecto_openni import FpsMode, ResolutionMode, StreamMode
+ for key, val_type_name, val_type in [ ('image_fps', 'FpsMode', FpsMode), ('depth_fps', 'FpsMode', FpsMode),
+ ('image_mode', 'ResolutionMode', ResolutionMode),
+ ('depth_mode', 'ResolutionMode', ResolutionMode),
+ ('stream_mode', 'StreamMode', StreamMode) ]:
+ val = kwargs.get(key, None)
+ if isinstance(val, str):
+ for enum in val_type.values.values():
+ if val == str(enum):
+ kwargs[key] = enum
return create_source(*('image_pipeline', 'OpenNISource'), **kwargs)
Please sign in to comment.
Something went wrong with that request. Please try again.