RAPP Platform API
Main Page
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
HumanDetection.py
Go to the documentation of this file.
1
from
RappCloud.Objects
import
(
2
File,
3
Payload)
4
5
from
Cloud
import
(
6
CloudMsg,
7
CloudRequest,
8
CloudResponse)
9
10
11
class
HumanDetection
(CloudMsg):
12
""" Human Detection Cloud Message object"""
13
14
class
Request
(CloudRequest):
15
""" Human Detection Cloud Request object. HumanDetection.Request """
16
def
__init__
(self, **kwargs):
17
"""!
18
Constructor
19
20
@param **kwargs - Keyword arguments. Apply values to the request attributes.
21
- @ref imageFilepath
22
"""
23
## File path to the image to load. This is the image to perform
24
# qr-detection on.
25
self.
imageFilepath
=
''
26
super(
HumanDetection.Request
, self).
__init__
(**kwargs)
27
28
29
def
make_payload
(self):
30
""" Create and return the Payload of the Request. """
31
return
Payload()
32
33
34
def
make_files
(self):
35
""" Create and return Array of File objects of the Request. """
36
return
[File(self.
imageFilepath
, postfield=
'file'
)]
37
38
39
class
Response
(CloudResponse):
40
""" Human Detection Cloud Response object. HumanDetection.Response """
41
def
__init__
(self, **kwargs):
42
"""!
43
Constructor
44
45
@param **kwargs - Keyword arguments. Apply values to the request attributes.
46
- @ref error
47
- @ref humans
48
"""
49
50
## Error message
51
self.
error
=
''
52
## Array of detected humans
53
# TODO Create human objects
54
self.
humans
= []
55
super(
HumanDetection.Response
, self).
__init__
(**kwargs)
56
57
58
def
__init__
(self, **kwargs):
59
"""!
60
Constructor
61
62
@param **kwargs - Keyword arguments. Apply values to the request attributes.
63
- @ref Request.imageFilepath
64
"""
65
66
# Create and hold the Request object for this CloudMsg
67
self.
req
=
HumanDetection.Request
()
68
# Create and hold the Response object for this CloudMsg
69
self.
resp
=
HumanDetection.Response
()
70
super(HumanDetection, self).
__init__
(svcname=
'human_detection'
, **kwargs)
71
72
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Request
Definition:
HumanDetection.py:14
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Request.make_files
def make_files
Definition:
HumanDetection.py:34
RappCloud.Objects
Definition:
__init__.py:1
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Request.make_payload
def make_payload
Definition:
HumanDetection.py:29
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Response.__init__
def __init__
Constructor.
Definition:
HumanDetection.py:41
RappCloud.CloudMsgs.HumanDetection.HumanDetection.req
req
Definition:
HumanDetection.py:67
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Response
Definition:
HumanDetection.py:39
RappCloud.CloudMsgs.HumanDetection.HumanDetection
Definition:
HumanDetection.py:11
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Response.error
error
Error message.
Definition:
HumanDetection.py:51
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Request.imageFilepath
imageFilepath
File path to the image to load.
Definition:
HumanDetection.py:25
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Response.humans
humans
Array of detected humans TODO Create human objects.
Definition:
HumanDetection.py:54
RappCloud.CloudMsgs.HumanDetection.HumanDetection.__init__
def __init__
Constructor.
Definition:
HumanDetection.py:58
RappCloud.CloudMsgs.HumanDetection.HumanDetection.resp
resp
Definition:
HumanDetection.py:69
RappCloud.CloudMsgs.HumanDetection.HumanDetection.Request.__init__
def __init__
Constructor.
Definition:
HumanDetection.py:16
python
RappCloud
CloudMsgs
HumanDetection.py
Generated on Fri Jul 29 2016 18:45:01 for RAPP Platform API by
1.8.6