Newer
Older
#pragma once
#ifndef _FTL_RGBD_NET_HPP_
#define _FTL_RGBD_NET_HPP_
#include <ftl/net/universe.hpp>
#include <string>
namespace ftl {
namespace rgbd {
/**
* RGBD source from either a stereo video file with left + right images, or
* direct from two camera devices. A variety of algorithms are included for
* calculating disparity, before converting to depth. Calibration of the images
* is also performed.
*/
int chunks_dim_;
int chunk_width_;
int chunk_height_;
cv::Mat idepth_;
bool _getCalibration(ftl::net::Universe &net, const ftl::UUID &peer, const std::string &src, ftl::rgbd::Camera &p);
void _recv(const std::vector<unsigned char> &jpg, const std::vector<unsigned char> &d);
void _recvChunk(int frame, int chunk, bool delta, const std::vector<unsigned char> &jpg, const std::vector<unsigned char> &d);