Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
b
c
d
e
h
i
l
m
n
p
r
s
u
x
Typedefs
b
c
d
e
f
g
i
m
p
r
u
v
Enumerations
Enumerator
a
b
f
g
i
m
n
r
s
u
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
m
n
p
q
r
s
t
u
v
x
Enumerations
a
c
d
e
f
k
l
m
p
r
s
t
v
w
Enumerator
a
b
d
f
g
h
i
l
m
n
o
p
r
s
u
v
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
b
c
d
e
f
g
m
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
w
Typedefs
Enumerations
Enumerator
Macros
_
d
f
i
m
n
p
s
t
u
tests
integration
src
main.cpp
Go to the documentation of this file.
1
#include <iostream>
2
3
// include depthai library
4
#include <
depthai/depthai.hpp
>
5
6
int
main
(){
7
using namespace
std
;
8
9
volatile
int
test
= 0;
10
if
(
test
) {
11
auto
devices =
dai::XLinkConnection::getAllConnectedDevices
();
12
for
(
const
auto
& device : devices){
13
std::cout <<
"Device name: "
<< device.name <<
" id: "
<< device.mxid << std::endl;
14
}
15
}
16
17
dai::ImgFrame
frame;
18
frame.
setData
({1,2,3,4});
19
frame.
setWidth
(2);
20
frame.
setHeight
(2);
21
frame.
setType
(
dai::ImgFrame::Type::GRAY8
);
22
23
#ifdef DEPTHAI_HAVE_OPENCV_SUPPORT
24
auto
x = frame.
getFrame
();
25
std::cout <<
"Frame cols: "
<< x.cols <<
" rows: "
<< x.rows << std::endl;
26
#else
27
std::cout <<
"Data size: "
<< frame.
getData
().size() << std::endl;
28
#endif
29
30
return
0;
31
}
32
dai::XLinkConnection::getAllConnectedDevices
static std::vector< DeviceInfo > getAllConnectedDevices(XLinkDeviceState_t state=X_LINK_ANY_STATE, bool skipInvalidDevices=true, XLinkPlatform_t platform=X_LINK_MYRIAD_X)
Definition:
XLinkConnection.cpp:113
dai::ImgFrame::getFrame
void getFrame(T...)
Definition:
ImgFrame.hpp:218
dai::RawImgFrame::Type::GRAY8
@ GRAY8
dai::Buffer::getData
std::vector< std::uint8_t > & getData() const
Get non-owning reference to internal buffer.
Definition:
Buffer.cpp:13
dai::ImgFrame::setWidth
ImgFrame & setWidth(unsigned int width)
Definition:
pipeline/datatype/ImgFrame.cpp:99
depthai.hpp
main
int main()
Definition:
main.cpp:6
test
int test(dai::LogLevel logLevel)
Definition:
logging_test.cpp:9
dai::ImgFrame
Definition:
ImgFrame.hpp:25
dai::ImgFrame::setType
ImgFrame & setType(Type type)
Definition:
pipeline/datatype/ImgFrame.cpp:118
dai::ImgFrame::setHeight
ImgFrame & setHeight(unsigned int height)
Definition:
pipeline/datatype/ImgFrame.cpp:105
std
Definition:
Node.hpp:366
dai::Buffer::setData
void setData(const std::vector< std::uint8_t > &data)
Definition:
Buffer.cpp:17
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19