Code Monkey home page Code Monkey logo

hand_tracking_samples's People

Contributors

ddiakopoulos avatar melax avatar sfblackl-intel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hand_tracking_samples's Issues

HandTracker works bad on other camera data.

hi, I am very excited about your project, It seem your method works well on hand pose recognization. HandTracker works well in your "synthetic-hand-tracker-vs2015", but it works bad on my data.
I download some MSRA hand data. Their camera sensor size 320*240 and the focal length is 241.42. the center is (160, 120). I make a small modification on "realtime-hand-tracker-vs2015" and make it support the recognization of a single frame. msra-hand.txt is a single frame depth data. Here is some code:

std::string filename = "msra-hand.txt";
DCamera dcam({ 320,240 }, { 241.42f,241.42f }, { 160.0f,120.0f }, 0.001f);
auto dimage= LoadFrame(dcam, filename);

here is LoadFrame:

Image<unsigned short> LoadFrame(const DCamera& dCam, const std::string& filename)
{
	std::ifstream iStream(filename);
	unsigned short backgournd = 3;
	Image<unsigned short> frame(dCam);
	for (int yy = 0; yy < dCam.dim().y; ++yy)
	{
		for (int xx = 0; xx < dCam.dim().x; ++xx)
		{
			int depth = 0;
			iStream >> depth;
			frame.pixel({ xx,yy }) = depth;
		}
	}
	return frame;
}

then use htk.update(std::move(dimage)) to recognize hand pose. Unfortunately, I get a wrong result like this.
I also try some other gestures, but I don't get good results.
Then how could I make HandTracker works better on MSRA's hand dataset ? Do I miss something important??

Thanks

Classification stage

I am using this hand tracking samples project (actually a forked version of it for Intelsense D400) for my Bachelors' thesis but I have encountered a problem.
My idea was to build a hand gesture recognition system that could tell what gesture is the system receiving as an input. I was hoping that the output could provide the label for the gestures' name (or the name of the dataset it belongs to at least), just as in this "dsamples" project but using the hand tracking system instead.

However, from what I have experienced with your hand-tracking project, the output resulting from the classification layer is a series of values describing fingers' angles and hand orientation mainly.

Is there a way in which the system could be trained so that the output of the classification stage provides the label for the gesture dataset name (as if we wanted to find out the gesture category each input belongs to)?? Maybe there's something that I am missing and there is actually a way of doing it.

I have already generated several datasets regarding different hand poses using realtime-annotator.cpp, and I have also tried training the cnn with those datasets simultaneously (with the train-cnn.cpp ), however, I haven't yet found the way so extract those dataset labels from the depth image input of a hand-gesture.

I would really appreciate any help on this topic I'm kind of stuck in this step and have been working on this for several months now.

Thanks in advance

use other cameras

hi
i really liked your project but unfortunately i can not access realsense cameras.i have a kinect for xbos 360 and i want to use your code with this camera.is it possible for me?

Rift and DirectX

Can you provide an Oculus version of the VR sample - preferably using Direct3D instead of OpenGL?

Compiling

I just downloaded the solution and when I try to compile with VS2017 it gives an error message: Gl/gl.h no such file or directory
What am I doing wrong ?

model_hand.json vs. vanity_bones.json

What's the difference between these two assets. Is it safe to assume the model_hand.json is the hand model being used in all the projects for fitting to the depth maps, and as a base for the "segment_scale" variable being used everywhere?

Support for RealSense D4XX series

In the project description there is such info "Support for this device (RSD4XX) will added after it begins shipping". Is there any timeframe when we can expect it to be available? Thank you in advance!

Trouble compiling cpp to exe

I am using visual code studio to try to run the real-time-hand-tracker.cpp
I have downloaded all of the folders from git and then I tried to build the .exe file with g++ compiler from mingw64. however this failed with a very very long list of errors and attempts to fix - after reading through the messages from the failed build, I think it is having trouble locating the right find_json() function frequently throughout the program.

I will paste the entire message below. Any help would be very much appreciated ! Thanks so much !

In file included from .\realtime-hand-tracker.cpp:26:
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<int, 2>; TS = {}]':
.../include/misc_image.h:57:60: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:145:144: error: no matching function for call to 'from_json(linalg::vec<int, 2>&, const json::value&)'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };
~~~~~~~~~^~~~~~~~~~~~~~~~
.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from 'linalg::vec<int, 2>' to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from 'linalg::vec<int, 2>' to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<int,
2>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<int, 2>; TS = {}]'
.../include/misc_image.h:57:60: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<int, 2>; TS = {}]':
.../include/misc_image.h:57:60: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: mismatched types 'T [N]' and 'linalg::vec<int, 2>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<int, 2>' is not derived from 'std::array<_Tp, _Nm>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<int, 2>' is not derived from 'std::vector'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:144:24: note: candidate: 'template void from_json(std::map<std::__cxx11::basic_string, T>&, const json::value&)'
template void from_json(std::map<std::string, T> & m, const json::value & val) { for (auto &e : val.get_object()) { from_json(m[e.first], e.second); } }
^~~~~~~~~
.../third_party/json.h:144:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<int, 2>' is not derived from 'std::map<std::__cxx11::basic_string, T>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 2>; TS = {}]':
.../include/misc_image.h:57:81: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:145:144: error: no matching function for call to 'from_json(linalg::vec<float, 2>&, const json::value&)'
.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from 'linalg::vec<float, 2>' to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from 'linalg::vec<float, 2>' to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<float, 2>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 2>; TS = {}]'
.../include/misc_image.h:57:81: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 2>; TS = {}]':
.../include/misc_image.h:57:81: required from 'void visit_fields(DCamera&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = DCamera; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../include/dcam.h:354:93: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: mismatched types 'T [N]' and 'linalg::vec<float, 2>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 2>' is not derived from 'std::array<_Tp, _Nm>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 2>' is not derived from 'std::vector'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:144:24: note: candidate: 'template void from_json(std::map<std::__cxx11::basic_string, T>&, const json::value&)'
template void from_json(std::map<std::string, T> & m, const json::value & val) { for (auto &e : val.get_object()) { from_json(m[e.first], e.second); } }
^~~~~~~~~
.../third_party/json.h:144:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 2>' is not derived from 'std::map<std::__cxx11::basic_string, T>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h: In instantiation of 'void from_json(std::vector&, const json::value&) [with T = linalg::vec<float, 3>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = std::vector<linalg::vec<float, 3> >; TS = {}]'
.../include/../third_party/wingmesh.h:975:3: required from 'void visit_fields(WingMesh&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = WingMesh; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = WingMesh]'
.../include/physmodel.h:447:48: required from here
.../third_party/json.h:143:157: error: no matching function for call to 'from_json(__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }

                                                ~~~~~~~~~^~~~~~~~~~~~~~

.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'} to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'} to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<float, 3>]':
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = linalg::vec<float, 3>]'
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = std::vector<linalg::vec<float, 3> >; TS = {}]'
.../include/../third_party/wingmesh.h:975:3: required from 'void visit_fields(WingMesh&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = WingMesh; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = WingMesh]'
.../include/physmodel.h:447:48: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void from_json(std::vector&, const json::value&) [with T = linalg::vec<float, 3>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = std::vector<linalg::vec<float, 3> >; TS = {}]'
.../include/../third_party/wingmesh.h:975:3: required from 'void visit_fields(WingMesh&, F) [with F = field_decoder]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = WingMesh; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = WingMesh]'
.../include/physmodel.h:447:48: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:143:157: note: mismatched types 'T [N]' and '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'}
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }

                                                ~~~~~~~~~^~~~~~~~~~~~~~

.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:143:157: note: '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'} is not derived from 'std::array<_Tp, _Nm>'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }

                                                ~~~~~~~~~^~~~~~~~~~~~~~

.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:143:157: note: '__gnu_cxx::__alloc_traits<std::allocator<linalg::vec<float, 3> >, linalg::vec<float, 3> >::value_type' {aka 'linalg::vec<float, 3>'} is not derived from 'std::vector'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }

                                                ~~~~~~~~~^~~~~~~~~~~~~~

.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 3>; TS = {}]':
.../include/physmodel.h:244:76: required from 'void PhysModel::Joint::visit_fields(F) [with F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:145:144: error: no matching function for call to 'from_json(linalg::vec<float, 3>&, const json::value&)'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from 'linalg::vec<float, 3>' to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from 'linalg::vec<float, 3>' to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<float, 3>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 3>; TS = {}]'
.../include/physmodel.h:244:76: required from 'void PhysModel::Joint::visit_fields(F) [with F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 3>; TS = {}]':
.../include/physmodel.h:244:76: required from 'void PhysModel::Joint::visit_fields(F) [with F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: mismatched types 'T [N]' and 'linalg::vec<float, 3>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 3>' is not derived from 'std::array<_Tp, _Nm>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 3>' is not derived from 'std::vector'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:144:24: note: candidate: 'template void from_json(std::map<std::__cxx11::basic_string, T>&, const json::value&)'
template void from_json(std::map<std::string, T> & m, const json::value & val) { for (auto &e : val.get_object()) { from_json(m[e.first], e.second); } }
^~~~~~~~~
.../third_party/json.h:144:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 3>' is not derived from 'std::map<std::__cxx11::basic_string, T>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 4>; TS = {}]':
.../include/physmodel.h:244:140: required from 'void PhysModel::Joint::visit_fields(F) [with
F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:145:144: error: no matching function for call to 'from_json(linalg::vec<float, 4>&, const json::value&)'
.../third_party/json.h:138:13: note: candidate: 'void from_json(bool&, const json::value&)'
inline void from_json(bool & b, const json::value & val) { b = val.is_true(); }
^~~~~~~~~
.../third_party/json.h:138:13: note: no known conversion for argument 1 from 'linalg::vec<float, 4>' to 'bool&'
.../third_party/json.h:139:13: note: candidate: 'void from_json(std::__cxx11::string&, const json::value&)'
inline void from_json(std::string & s, const json::value & val) { s = val.string(); }
^~~~~~~~~
.../third_party/json.h:139:13: note: no known conversion for argument 1 from 'linalg::vec<float, 4>' to 'std::__cxx11::string&' {aka 'std::__cxx11::basic_string&'}
.../third_party/json.h:140:79: note: candidate: 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&)'
template typename std::enable_if<std::is_arithmetic::value>::type from_json(T & n,
const json::value & val) { n = val.number(); }
^~~~~~~~~
.../third_party/json.h:140:79: note: template argument deduction/substitution failed:
.../third_party/json.h: In substitution of 'template typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type from_json(T&, const json::value&) [with T = linalg::vec<float, 4>]':
.../third_party/json.h:145:144: required from 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 4>; TS = {}]'
.../include/physmodel.h:244:140: required from 'void PhysModel::Joint::visit_fields(F) [with
F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:140:79: error: no type named 'type' in 'struct std::enable_if<false, void>'
.../third_party/json.h: In instantiation of 'void field_decoder::operator()(const char*, T&, TS ...) [with T = linalg::vec<float, 4>; TS = {}]':
.../include/physmodel.h:244:140: required from 'void PhysModel::Joint::visit_fields(F) [with
F = field_decoder]'
.../third_party/misc.h:110:58: required from 'void visit_fields(T&, F) [with F = field_decoder; T = PhysModel::Joint]'
.../third_party/json.h:146:130: required from 'typename std::enable_if<std::is_class<_Tp>::value>::type from_json(T&, const json::value&) [with T = PhysModel::Joint; typename std::enable_if<std::is_class<_Tp>::value>::type = void]'
.../third_party/json.h:143:157: required from 'void from_json(std::vector&, const json::value&) [with T = PhysModel::Joint]'
.../include/physmodel.h:449:36: required from here
.../third_party/json.h:141:31: note: candidate: 'template<class T, int N> void from_json(T (&)[N], const json::value&)'
template<class T, int N> void from_json(T (& a)[N], const json::value & val) { for(int i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:141:31: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: mismatched types 'T [N]' and 'linalg::vec<float, 4>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:142:34: note: candidate: 'template<class T, long long unsigned int N> void from_json(std::array<_Tp, _Nm>&, const json::value&)'
template<class T, size_t N> void from_json(std::array<T,N> & a, const json::value & val) { for(size_t i=0; i<N; ++i) from_json(a[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:142:34: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 4>' is not derived from 'std::array<_Tp, _Nm>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:143:24: note: candidate: 'template void from_json(std::vector&, const json::value&)'
template void from_json(std::vector & v, const json::value & val) { v.resize(val.get_array().size()); for(size_t i=0; i<v.size(); ++i) from_json(v[i], val[i]); }
^~~~~~~~~
.../third_party/json.h:143:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 4>' is not derived from 'std::vector'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field, TS...) { from_json(field, v[name]); } };

                                   ~~~~~~~~~^~~~~~~~~~~~~~~~

.../third_party/json.h:144:24: note: candidate: 'template void from_json(std::map<std::__cxx11::basic_string, T>&, const json::value&)'
template void from_json(std::map<std::string, T> & m, const json::value & val) { for (auto &e : val.get_object()) {
from_json(m[e.first], e.second); } }
^~~~~~~~~
.../third_party/json.h:144:24: note: template argument deduction/substitution failed:
.../third_party/json.h:145:144: note: 'linalg::vec<float, 4>' is not derived from 'std::map<std::__cxx11::basic_string, T>'
struct field_decoder { const json::value & v; template<class T, class... TS> void operator () (const char * name, T & field,
TS...) { from_json(field, v[name]); } };

librealsense2

Are there any efforts to make theses examples work with the newest sdk (and therefore newer devices)?
Looks like fairly substantial changes to include/dcam.h could be in order, but not too much else.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.