![MYNTAI MYNT EYE D-Series Documentation Download Page 27](http://html1.mh-extra.com/html/myntai/mynt-eye-d-series/mynt-eye-d-series_documentation_1862703027.webp)
MYNT EYE D SDK Documentation, Release 1.8.0
(continued from previous page)
cv
::
setMouseCallback(
"depth"
, OnDepthMouseCallback,
&
depth_region);
// Note: DrawRect will change some depth values to show the rect.
depth_region.DrawRect(depth);
cv
::
imshow(
"depth"
, depth);
depth_region.ShowElems
<
ushort
>
(depth, [](
const
ushort
&
elem) {
return
std
::
to_string(elem);
},
80
, depth_info);
}
The above code uses OpenCV to display the image. When the display window is selected, pressing ESC/Q will end
the program.
Note:
get_depth
sample only support
DEPTH_RAW
mode.You can modify
depth_mode
parameter of other samples
to get depth images
Complete code examples, see
2.3.4 Get Point Image
Point images belongs to upper layer of synthetic data.You can get it through
GetStreamData()
.It should be
check not empty before use. Otherwise, when running pionts,you can use “space” to save
.ply
files. Then sam-
ple
view_points
can be used to view
.ply
files.
Sample code snippet:
auto
image_color
=
cam.GetStreamData(ImageType
::
IMAGE_LEFT_COLOR);
auto
image_depth
=
cam.GetStreamData(ImageType
::
IMAGE_DEPTH);
if
(image_color.img
&&
image_depth.img) {
cv
::
Mat color
=
image_color.img
->
To(ImageFormat
::
COLOR_BGR)
->
ToMat();
painter.DrawSize(color, CVPainter
::
TOP_LEFT);
painter.DrawStreamData(color, image_color, CVPainter
::
TOP_RIGHT);
painter.DrawInformation(color, util
::
to_string(counter.fps()),
CVPainter
::
BOTTOM_RIGHT);
cv
::
Mat depth
=
image_depth.img
->
To(ImageFormat
::
DEPTH_RAW)
->
ToMat();
cv
::
imshow(
"color"
, color);
viewer.Update(color, depth);
}
PCL is used to display point images above. Program will close when point image window is closed.
Complete code examples, see
2.3.5 Get IMU Data
You
need
EnableMotionDatas()
to
enable
caching
in
order
to
get
IMU
data
from
GetMotionDatas()
.Otherwise, IMU data is only available through the callback interface, see
2.3. SDK Samples
23
Summary of Contents for MYNT EYE D-Series
Page 1: ...MYNT EYE D SDK Documentation Release 1 8 0 MYNTAI Nov 07 2019...
Page 2: ......
Page 12: ...MYNT EYE D SDK Documentation Release 1 8 0 8 Chapter 1 PRODUCT...
Page 38: ...MYNT EYE D SDK Documentation Release 1 8 0 34 Chapter 2 SDK...
Page 58: ...MYNT EYE D SDK Documentation Release 1 8 0 54 Chapter 2 SDK...
Page 72: ...MYNT EYE D SDK Documentation Release 1 8 0 68 Chapter 5 TOOLS SUPPORT...
Page 80: ...MYNT EYE D SDK Documentation Release 1 8 0 76 Chapter 6 OPEN SOURCE SUPPORT...
Page 96: ...MYNT EYE D SDK Documentation Release 1 8 0 92 Chapter 7 API DOCS...
Page 106: ...MYNT EYE D SDK Documentation Release 1 8 0 102 Chapter 8 Android API DOCS...
Page 108: ...MYNT EYE D SDK Documentation Release 1 8 0 104 Chapter 9 TECHNICAL SUPPORT...