app
android
jni
CameraAREngine.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3
All rights reserved.
4
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are met:
7
* Redistributions of source code must retain the above copyright
8
notice, this list of conditions and the following disclaimer.
9
* Redistributions in binary form must reproduce the above copyright
10
notice, this list of conditions and the following disclaimer in the
11
documentation and/or other materials provided with the distribution.
12
* Neither the name of the Universite de Sherbrooke nor the
13
names of its contributors may be used to endorse or promote products
14
derived from this software without specific prior written permission.
15
16
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#ifndef CAMERAARENGINE_H_
29
#define CAMERAARENGINE_H_
30
31
#include "
CameraMobile.h
"
32
#include <
rtabmap/core/Camera.h
>
33
#include <
rtabmap/core/GeodeticCoords.h
>
34
#include <
rtabmap/utilite/UMutex.h
>
35
#include <
rtabmap/utilite/USemaphore.h
>
36
#include <
rtabmap/utilite/UEventsSender.h
>
37
#include <
rtabmap/utilite/UThread.h
>
38
#include <
rtabmap/utilite/UEvent.h
>
39
#include <
rtabmap/utilite/UTimer.h
>
40
#include <boost/thread/mutex.hpp>
41
#include <
background_renderer.h
>
42
43
#include <huawei_arengine_interface.h>
44
45
namespace
rtabmap
{
46
47
class
CameraAREngine
:
public
CameraMobile
{
48
public
:
49
CameraAREngine
(
void
*
env
,
void
* context,
void
* activity,
bool
smoothing =
false
);
50
virtual
~CameraAREngine
();
51
52
virtual
void
setScreenRotationAndSize
(
ScreenRotation
colorCameraToDisplayRotation,
int
width,
int
height);
53
54
virtual
bool
init
(
const
std::string & calibrationFolder =
"."
,
const
std::string & cameraName =
""
);
55
virtual
void
close
();
// close AREngine connection
56
virtual
std::string
getSerial
()
const
;
57
58
protected
:
59
virtual
SensorData
updateDataOnRender
(
Transform
& pose);
60
61
private
:
62
rtabmap::Transform
getPoseAtTimestamp
(
double
timestamp);
63
64
private
:
65
void
*
env_
;
66
void
*
context_
;
67
void
*
activity_
;
68
HwArSession*
arSession_
=
nullptr
;
69
HwArConfig*
arConfig_
=
nullptr
;
70
HwArFrame*
arFrame_
=
nullptr
;
71
HwArCameraIntrinsics *
arCameraIntrinsics_
=
nullptr
;
72
HwArPose *
arPose_
=
nullptr
;
73
bool
arInstallRequested_
;
74
UMutex
arSessionMutex_
;
75
76
};
77
78
}
/* namespace rtabmap */
79
#endif
/* CAMERAARENGINE_H_ */
rtabmap::SensorData
Definition:
SensorData.h:51
background_renderer.h
CameraMobile.h
rtabmap::CameraAREngine::arPose_
HwArPose * arPose_
Definition:
CameraAREngine.h:72
GeodeticCoords.h
rtabmap::CameraAREngine::arSessionMutex_
UMutex arSessionMutex_
Definition:
CameraAREngine.h:74
rtabmap::CameraAREngine::context_
void * context_
Definition:
CameraAREngine.h:66
rtabmap::CameraAREngine
Definition:
CameraAREngine.h:47
UTimer.h
UEvent.h
rtabmap::CameraAREngine::arFrame_
HwArFrame * arFrame_
Definition:
CameraAREngine.h:70
UMutex
Definition:
UMutex.h:54
rtabmap::CameraAREngine::arCameraIntrinsics_
HwArCameraIntrinsics * arCameraIntrinsics_
Definition:
CameraAREngine.h:71
UMutex.h
rtabmap::CameraAREngine::env_
void * env_
Definition:
CameraAREngine.h:65
rtabmap::CameraAREngine::getPoseAtTimestamp
rtabmap::Transform getPoseAtTimestamp(double timestamp)
UEventsSender.h
rtabmap::CameraAREngine::arInstallRequested_
bool arInstallRequested_
Definition:
CameraAREngine.h:73
rtabmap::Transform
Definition:
Transform.h:41
rtabmap::CameraAREngine::updateDataOnRender
virtual SensorData updateDataOnRender(Transform &pose)
Definition:
CameraAREngine.cpp:183
rtabmap::ScreenRotation
ScreenRotation
Definition:
util.h:194
env
rtabmap::CameraAREngine::arConfig_
HwArConfig * arConfig_
Definition:
CameraAREngine.h:69
USemaphore.h
UThread.h
rtabmap::CameraAREngine::CameraAREngine
CameraAREngine(void *env, void *context, void *activity, bool smoothing=false)
Definition:
CameraAREngine.cpp:43
rtabmap::CameraMobile
Definition:
CameraMobile.h:71
Camera.h
rtabmap::CameraAREngine::setScreenRotationAndSize
virtual void setScreenRotationAndSize(ScreenRotation colorCameraToDisplayRotation, int width, int height)
Definition:
CameraAREngine.cpp:169
rtabmap::CameraAREngine::close
virtual void close()
Definition:
CameraAREngine.cpp:133
rtabmap::CameraAREngine::getSerial
virtual std::string getSerial() const
Definition:
CameraAREngine.cpp:60
rtabmap::CameraAREngine::arSession_
HwArSession * arSession_
Definition:
CameraAREngine.h:68
rtabmap::CameraAREngine::~CameraAREngine
virtual ~CameraAREngine()
Definition:
CameraAREngine.cpp:53
rtabmap
Definition:
CameraARCore.cpp:35
rtabmap::CameraAREngine::activity_
void * activity_
Definition:
CameraAREngine.h:67
rtabmap::CameraAREngine::init
virtual bool init(const std::string &calibrationFolder=".", const std::string &cameraName="")
Definition:
CameraAREngine.cpp:65
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:07