The error message is very specific.
Look at the line where you define your path:
string resourceDir = " D:\\image\\OpenHandLeft_BW'";
You have a space before the D in your path and you also ended the path with a ' character.
Remove those two characters and it should work.