microsoft / HoloLensForCV

Sample code and documentation for using the Microsoft HoloLens for Computer Vision research
MIT License
472 stars 156 forks source link

Access Intrinsics Info of four VisibleLight cameras #77

Open WenkaiYe opened 5 years ago

WenkaiYe commented 5 years ago

Hi guys, currently I'm trying to record sensing data using Hololens and run some SLAM algorithm using the data. I use the recorder tool and it works great except for the intrinsics. I guess the camera intrinsics is recorded as CameraProjectionTransform in the csv file, however, it is always empty to some unknow reason. Any thought about that?

Also, I try to use the ArUcoMarkerTracker sample to calibrate the Hololens myself, however, I'm always encountered two problem saying:

"Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "class cv::debug_build_guard::_InputOutputArray const & __cdecl cv::noArray(void)" (?noArray@cv@@YAABV_InputOutputArray@debug_build_guard@1@XZ) referenced in function "class std::map<int,struct ArUcoMarkerTracker::DetectedMarker,struct std::less,class std::allocator<struct std::pair<int const ,struct ArUcoMarkerTracker::DetectedMarker> > > __cdecl ArUcoMarkerTracker::DetectArUcoMarkers(class HoloLensForCV::SensorFrame ^)" (?DetectArUcoMarkers@ArUcoMarkerTracker@@YA?AV?$map@HUDetectedMarker@ArUcoMarkerTracker@@U?$less@H@std@@V?$allocator@U?$pair@$$CBHUDetectedMarker@ArUcoMarkerTracker@@@std@@@4@@std@@P$AAVSensorFrame@HoloLensForCV@@@Z) ArUcoMarkerTracker C:\Users\labadmin\Desktop\HoloLensForCV-master\Samples\ArUcoMarkerTracker\AppMain.obj 1 "

I think it might due to the link to OpenCV. I follow the suggestion in other issues to deal with it but failed. Please help me out with that. Thanks in advance.

chrisfromwork commented 5 years ago

What version of opencv are you using? I think I saw something similar to this InputOutputArray issue when using 3.4.3. but I haven't seen it since using the checked in nuget package that's based on 3.4.1.

I have not looked through the recorder tool codebase, but I did see that there were some different camera intrinsic fields getting cached for different camera types (the PV camera had different fields that we're populated than sensor cameras). A guess may be that the recorder tool looks at some intrinsic values that are available for some cameras but not all cameras. It's probably worth looking at the code where the frame and these values are cached in HoloLensForCV under a debugger. It may be that the specific camera isn't supported/caches values in a field not looked at by the recorder tool. It may also be that the values aren't available for the frame/some sort of permissions is configured incorrectly.