kMaxJ fix to double
move boundry function to basic class, fix depth<char> to depth<uchar>
add compute difference with cuda