5 #if defined( __ANDROID__ ) 27 virtual bool start() = 0;
31 virtual bool stop() = 0;
55 virtual const std::vector<Calibration>& calibration();
58 virtual bool setResolution(
int resolution );
59 virtual bool setFramerate(
float framerate );
67 virtual bool setExposure(
int aecMode = 0,
int exposureGain = 0,
float exposureTimeMs = 0.0 );
73 virtual bool setBrightness(
int brightness );
149 virtual bool get(
Orientation& pose,
double prediction = 0.) = 0;
160 virtual bool getAt(
Orientation& pose,
double timestamp) = 0;
171 virtual int registerAntiDistortionCallback(std::function<
void (
FisheyeImages const &)> cb ) = 0;
172 virtual bool unregisterAntiDistortionCallback(
int callbackID ) = 0;
174 virtual bool checkAntiDistortionSupport() = 0;
190 virtual const std::vector<Calibration>& calibration() = 0;
195 virtual bool open() = 0;
200 virtual bool close() = 0;
207 virtual bool setBrightnessLevel(
int level ) = 0;
230 virtual bool setCompensation(
int compensation) = 0;
231 virtual bool setAwb(
int awb) = 0;
232 virtual bool setResolution(
const Resolution &resolution ) = 0;
233 virtual bool isSupportAFRGB() = 0;
234 virtual bool setRGBMode(
const Mode &mode) = 0;
235 virtual bool setRGBFocalDistance(
unsigned char distance) = 0;
236 virtual bool startCameras(
int camIndex = 1) = 0;
237 virtual bool stopCameras(
int camIndex = 1) = 0;
239 virtual bool setCamsFramerate(
float framerate,
int camIndex = 1) = 0;
240 virtual int registerCam2Callback(std::function<
void (
ColorImage const &)> c ) = 0;
241 virtual bool unregisterCam2Callback(
int callbackID ) = 0;
251 enum class StreamMode { DepthOnly = 0, CloudOnly, DepthAndCloud, None, CloudOnLeftHandSlam};
252 enum class DistanceMode { Short = 0, Middle, Long };
253 enum class SonyTofLibMode { IQMIX_DF ,IQMIX_SF, LABELIZE_DF ,LABELIZE_SF ,M2MIX_DF ,M2MIX_SF };
254 enum class Framerate{ FPS_5 ,FPS_10 ,FPS_15 ,FPS_20 ,FPS_25 ,FPS_30 };
255 enum class Resolution{ Unknown = -1,VGA = 0 ,QVGA ,HQVGA};
256 enum class Manufacturer {Unknown = -1, Pmd = 0, Sony};
261 virtual int registerColorDepthImageCallback(std::function<
void(
const DepthColorImage&)>) = 0;
262 virtual bool unregisterColorDepthImageCallback(
int callbackId) = 0;
269 virtual std::shared_ptr<PointCloud> depthImageToPointCloud(
DepthImage const &)
const = 0;
275 virtual std::shared_ptr<PointCloud> formatPmdCloudToPointCloudStruct(
DepthImage const &)
const = 0;
280 virtual bool setStreamMode(StreamMode mode) = 0;
292 virtual bool setDistanceMode(DistanceMode mode) = 0;
298 virtual Resolution getResolution() = 0;
304 virtual Manufacturer getManufacturer() = 0;
316 virtual bool setLibWorkMode(SonyTofLibMode mode) = 0;
321 virtual bool enableTofIr(
bool enable) = 0;
326 virtual bool setMode(
int mode) = 0;
331 virtual bool setSonyTofSetting(SonyTofLibMode mode, Resolution resolution, Framerate frameRate) = 0;
333 virtual void setTofIrGamma(
double gamma) = 0;
338 virtual void setFilterFile(std::string filePath) = 0;
351 enum class Mode { Edge = 0, Mixed, EdgeFusionOnHost };
357 virtual Mode mode()
const = 0;
362 virtual bool start()
override = 0;
369 virtual bool start(Mode mode) = 0;
375 virtual bool reset() = 0;
381 virtual bool pause() = 0;
387 virtual bool resume() = 0;
399 virtual bool getPose(
Pose& pose,
double prediction = 0.) = 0;
411 virtual bool getPoseAt(
Pose& pose,
double timestamp) = 0;
417 virtual int registerVisualPoseCallback(std::function<
void (
const Pose&)> lostCallback) = 0;
418 virtual bool unregisterVisualPoseCallback(
int callbackId) = 0;
419 #define XVSDK_HAS_SLAM_VISUAL_POSE_CALLBACK 425 virtual int registerLostCallback(std::function<
void ()> lostCallback) = 0;
426 virtual bool unregisterLostCallback(
int callbackId) = 0;
435 virtual int registerStereoPlanesCallback(std::function<
void (std::shared_ptr<
const std::vector<Plane>>)> planeCallback) = 0;
436 virtual bool unregisterStereoPlanesCallback(
int callbackId) = 0;
437 virtual bool clearStereoPlanes() = 0;
452 virtual int registerTofPlanesCallback(std::function<
void (std::shared_ptr<
const std::vector<Plane>>)> planeCallback) = 0;
453 virtual bool unregisterTofPlanesCallback(
int callbackId) = 0;
454 virtual bool clearTofPlanes() = 0;
461 virtual int registerMapCallback(std::function<
void (std::shared_ptr<const xv::SlamMap>)> mapCallback) = 0;
462 virtual bool unregisterMapCallback(
int callbackId) = 0;
474 virtual bool loadMapAndSwitchToCslam(std::streambuf& mapStream, std::function<
void(
int )> done_callback, std::function<
void(
float)> localized_on_reference_map={}) = 0;
485 virtual bool saveMapAndSwitchToCslam(std::streambuf& mapStream, std::function<
void(
int ,
int )> done_callback, std::function<
void(
float)> localized_on_reference_map={}) = 0;
493 virtual Pose poseScaleCalibration(
const Pose& pose) = 0;
503 enum class Source { LEFT = 0, RIGHT, RGB, TOF };
505 virtual bool setDescriptor(
const std::string &filepath ) = 0;
506 virtual bool setModel(
const std::string &filepath ) = 0;
507 virtual bool setSource(
const Source &source ) = 0;
508 virtual xv::ObjectDetector::Source getSource()
const = 0;
511 virtual int registerCnnRawCallback(std::function<
void (std::shared_ptr<CnnRawWrapper>
const&)> poseCallback) = 0;
512 virtual bool unregisterCnnRawCallback(
int callbackId) = 0;
526 enum class Mode { Hardware = 0, Software };
530 virtual Mode mode()
const = 0;
532 virtual bool start(
const std::string &sgbmConfig) = 0;
534 virtual bool setConfig(
const std::string &sgbmConfig) = 0;
545 virtual std::shared_ptr<PointCloud> depthImageToPointCloud(
SgbmImage const &sgbmImage)
const = 0;
555 enum class Mode { TEMPERATURE = 0, TEMPERTURE = 0, GREY };
556 virtual bool setMode( Mode mode ) = 0;
574 virtual bool setExposure(
int leftGain,
float leftTimeMs,
int rightGain,
float rightTimeMs ) = 0;
583 virtual bool setLedBrighness(
int eye,
int led,
int brightness ) = 0;
599 virtual void setConfigPath(std::string config) = 0;
610 #if defined( __ANDROID__ ) 611 virtual bool start(JNIEnv* env, jobject thiz, std::string offlineS) = 0;
613 virtual const char* onlineActive(JNIEnv *env, jobject context,
const char* initLicense,
const char* userId,
const char* secret,
int &activeResult) = 0;
620 virtual void setUserName(std::string name) = 0;
627 virtual int registerEnrollCallback(std::function<
void (
XV_IRIS_DATA const &)>) = 0;
628 virtual bool UnregisterEnrollCallback(
int callbackID) = 0;
635 virtual int registerIdentifyCallback(std::function<
void (
XV_IRIS_DATA const &)>) = 0;
636 virtual bool UnregisterIdentifyCallback(
int callbackID) = 0;
643 virtual bool loadIrisInfo(
unsigned char* iris_features,
int size) = 0;
650 virtual void setConfigPath(std::string config) = 0;
666 virtual int registerDynamicGestureCallback(std::function<
void (
GestureData const &)>) = 0;
667 virtual bool UnregisterDynamicGestureCallback(
int callbackID) = 0;
676 virtual int registerKeypointsCallback(std::function<
void (std::shared_ptr<
const std::vector<keypoint>>)> callback) = 0;
677 virtual bool unregisterKeypointsCallback(
int callbackId) = 0;
686 virtual int registerSlamKeypointsCallback(std::function<
void (std::shared_ptr<
const std::vector<Pose>>)> callback) = 0;
687 virtual bool unregisterSlamKeypointsCallback(
int callbackId) = 0;
724 virtual bool enable() = 0;
725 virtual bool disable() = 0;
729 virtual int send(
const std::uint8_t *data,
int len) = 0;
734 virtual bool play(
const std::string &path) = 0;
738 virtual bool play(
const std::uint8_t *data,
int len) = 0;
742 virtual bool isPlaying() = 0;
746 virtual int registerPlayEndCallback( std::function<
void ()> ) = 0;
747 virtual bool unregisterPlayEndCallback(
int callbackId ) = 0;
1111 virtual std::map<std::string, std::string> info() = 0;
1116 virtual std::shared_ptr<Slam> slam() = 0;
1121 virtual std::shared_ptr<ImuSensor> imuSensor() = 0;
1126 virtual std::shared_ptr<EventStream> eventStream() = 0;
1131 virtual std::shared_ptr<OrientationStream> orientationStream() = 0;
1136 virtual std::shared_ptr<FisheyeCameras> fisheyeCameras() = 0;
1141 virtual std::shared_ptr<ColorCamera> colorCamera() = 0;
1146 virtual std::shared_ptr<TofCamera> tofCamera() = 0;
1151 virtual std::shared_ptr<SgbmCamera> sgbmCamera() = 0;
1156 virtual std::shared_ptr<ThermalCamera> thermalCamera() = 0;
1161 virtual std::shared_ptr<EyetrackingCamera> eyetracking() = 0;
1166 virtual std::shared_ptr<GazeStream> gaze() = 0;
1171 virtual std::shared_ptr<IrisStream> iris() = 0;
1176 virtual std::shared_ptr<GestureStream> gesture() = 0;
1181 virtual std::shared_ptr<GPSStream> gpsModule() = 0;
1186 virtual std::shared_ptr<GPSDistanceStream> gpsDistanceModule() = 0;
1191 virtual std::shared_ptr<MicStream> mic() = 0;
1196 virtual std::shared_ptr<Speaker> speaker() = 0;
1201 virtual std::shared_ptr<Display> display() = 0;
1206 virtual std::shared_ptr<ObjectDetector> objectDetector() = 0;
1211 virtual std::shared_ptr<DeviceStatusStream> deviceStatus() = 0;
1216 virtual bool sleep(
int level = 0) = 0;
1220 virtual bool wakeup() = 0;
1640 virtual bool hidWriteAndRead(
const std::vector<unsigned char> &command, std::vector<unsigned char> &result) = 0;
1644 virtual bool uvcWriteAndRead(
const std::vector<unsigned char> &command, std::vector<unsigned char> &result) = 0;
1648 virtual bool vscWriteAndRead(
const std::vector<unsigned char> &command, std::vector<unsigned char> &result) = 0;
1653 virtual bool enableSync(
bool isEnable) = 0;
1658 virtual std::string id()
const = 0;
1683 std::map<std::string,std::shared_ptr<Device>>
getDevices(
double timeOut = 0.,
const std::string& desc =
"",
bool* stopWaiting =
nullptr, xv::SlamStartMode slamStartMode = xv::SlamStartMode::Normal, xv::DeviceSupport deviceSupport = xv::DeviceSupport ::ONLYUSB);
1694 int registerPlugEventCallback(
const std::function<
void (std::shared_ptr<Device> device, PlugEventType type)> &Callback,
const std::string& desc =
"");
1714 std::shared_ptr<Device>
getDevice(
int fd);
1721 std::shared_ptr<Device>
getDevice(
int fd, std::string
const& desc, xv::SlamStartMode slamStartMode = xv::SlamStartMode::Normal);
1749 bool savePointCloudToPcd(
const std::string &path, std::shared_ptr<PointCloud>
const & point,
int precision = 8,
bool removeInvalidPoints =
true);
The class to represent the component doing the 6dof tracking with SLAM algorithm on host...
Definition: xv-sdk.h:348
SGBM CONFIG STRUCT.
Definition: xv-types.h:1065
A class to handle device status event stream.
Definition: xv-sdk.h:1078
A class to handle MIC. Adjust volumn through source.
Definition: xv-sdk.h:712
void getUTCTIme(DateTime *utc)
Get UTC time.
Resolution
Definition: xv-sdk.h:522
A class to handle callbacks of the object detector (CNN)
Definition: xv-sdk.h:501
Class to get tracking results and raw outputs with a connected device.
Definition: xv-sdk.h:1102
The class to give access to data provided by the IMU sensor.
Definition: xv-sdk.h:81
A class to handle callbacks of the thermal camera.
Definition: xv-sdk.h:552
A class to handle callbacks of the gaze data.
Definition: xv-sdk.h:591
A class to handle gusture.
Definition: xv-sdk.h:658
Definition: xv-types.h:1124
A class to handle speaker. Adjust the sound source(PCM) volume to adjust the volume.
Definition: xv-sdk.h:721
void setLogLevel(LogLevel l)
Change the log level.
A class to handle callbacks of the SGBM.
Definition: xv-sdk.h:520
An image provided by a TOF camera.
Definition: xv-types.h:1108
virtual bool stop()=0
stop streaming.
A class to handle callbacks of the Iris data.
Definition: xv-sdk.h:607
Definition: xv-types.h:1489
A class to handle callbacks of the eyetracking camera.
Definition: xv-sdk.h:563
The class to handle informations about the display (if device can display like a HMD) ...
Definition: xv-sdk.h:182
A class to handle callbacks of the GPS data.
Definition: xv-sdk.h:695
Definition: xv-types.h:1171
Images coming from xv::FisheyeCameras sensor system used for visual SLAM.
Definition: xv-types.h:1027
virtual int registerCallback(std::function< void(T)>)=0
Register callback to receive data.
bool detachDevice(int fd)
Tell sdk device has disconnected. Only for Android.
Camera interface.
Definition: xv-sdk.h:47
A class to handle callbacks of events.
Definition: xv-sdk.h:128
std::shared_ptr< Device > getDevice(int fd, std::string const &desc, xv::SlamStartMode slamStartMode=xv::SlamStartMode::Normal)
Retrieve #Device by given descriptor. Only for Android.
Class representing a 6dof pose at a timestamp with a linear model for prediction. ...
Definition: xv-types.h:796
virtual bool unregisterCallback(int callbackId)=0
Unregister callback.
A class to handle callbacks of the color image.
Definition: xv-sdk.h:213
Stream interface.
Definition: xv-sdk.h:19
bool unregisterHotplugCallback(int callbackID)
Unregister a plug callback.
A color image given by xv::ColorCamera.
Definition: xv-types.h:1047
Definition: xv-types.h:1501
The Version struct.
Definition: xv-types.h:126
Resolution
Definition: xv-sdk.h:215
virtual bool start()=0
start streaming.
SGBM data.
Definition: xv-types.h:1186
std::string getDefaultDescription()
Retrieve default device description.
int registerPlugEventCallback(const std::function< void(std::shared_ptr< Device > device, PlugEventType type)> &Callback, const std::string &desc="")
Register the callback for hotplug.
A class to handle callbacks of the ToF camera.
Definition: xv-sdk.h:249
A class to handle callbacks of the gaze data.
Definition: xv-sdk.h:703
Gesture data.
Definition: xv-types.h:1249
The class to handle callbacks of the multi cameras for the visual SLAM.
Definition: xv-sdk.h:169
The class to give access to 3dof data which converted from raw IMU data.
Definition: xv-sdk.h:137
Orientation only (3dof) of the pose.
Definition: xv-types.h:852
Device setting.
Definition: xv-types.h:85
std::map< std::string, std::shared_ptr< Device > > getDevices(double timeOut=0., const std::string &desc="", bool *stopWaiting=nullptr, xv::SlamStartMode slamStartMode=xv::SlamStartMode::Normal, xv::DeviceSupport deviceSupport=xv::DeviceSupport ::ONLYUSB)
Retrieve all the detected XVisio devices. If no device is found after the timeout is reached...
Version version()
Get xvsdk version.