Open RedstoneGithub opened 8 years ago
As mentioned in the README you need to pass the path to the calibration .xml file on the command line either in Visual Studio's debugging options or on the command line directly if you are launching from a command prompt. You should not have to run the sample as an admin.
I'm new to this. How exactly do you you do that (the VS way, or the cmd line way)?
In VS Solution Explorer right click ProjectionMappingSample project and select Properties. In the Debug tab there is an edit box for "Command line arguments". Put the path to your calibration file there, e.g., "C:\users\Ayan\Desktop\calibration\calibration.xml".
@thundercarrot Hi Andy, I followed the ReadMe and the calibration process seemed to be fine. And I did put the path of my xml file in VS Command line arguments. But when I run the ProjectionMappingSample.exe it, I still get the error.
Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at RoomAliveToolkit.ProjectionMappingSample..ctor(String[] args) in C:\Users\JH\Downloads\RoomAliveToolkit-master\ProCamCalibration\ProjectionMappingSample\ProjectionMappingSample.cs:line 25
at RoomAliveToolkit.ProjectionMappingSample.Main(String[] args) in C:\Users\JH\Downloads\RoomAliveToolkit-master\ProCamCalibration\ProjectionMappingSample\ProjectionMappingSample.cs:line 19
When I run in CMD, type
C:\Users\JH\Downloads\RoomAliveToolkit-master\ProCamCalibration\ProjectionMappingSample\bin\Debug\ProjectionMappingSample.exe C:\Users\JH\Desktop\RmAliveCalibration\calibration.xml
and I get the following error
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\JH\Content\DepthAndColorFloatVS.cso'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at RoomAliveToolkit.DepthAndColorShader..ctor(Device device) at C:\Users\JH\Downloads\RoomAliveToolkit-master\ProCamCalibration\ProjectionMappingSample\DepthAndColorShader.cs:line 16
at RoomAliveToolkit.ProjectionMappingSample..ctor(String[] args) at C:\Users\JH\Downloads\RoomAliveToolkit-master\ProCamCalibration\ProjectionMappingSample\ProjectionMappingSample.cs:line 38
at RoomAliveToolkit.ProjectionMappingSample.Main(String[] args) at C:\Users\JH\Downloads\RoomAliveToolkit-master\ProCamCalibration\ProjectionMappingSample\ProjectionMappingSample.cs:line 19
How can I fix it? Thanks!
Best, KweiMing
The latter error is because the .exe is looking to load a .cso file from the current directory. Try changing directory to whatever directory has the .exe, instead of referring to the .exe by an absolute path.
When I open (and run as admin) the ProjectionMappingSample, I get an error.
Then it says ProjectionMappingSample has stopped working. It gave me the option to debug, so I tried debugging and it said this was the problem:
string path = args[0];
I tried to rebuild. What should I do next? Thanks, Ayan.