We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c222dd commit 9217d19Copy full SHA for 9217d19
MultiSourceFrameSample.cs
@@ -167,7 +167,9 @@ void Update ()
167
168
int index = x + y * width;
169
170
- if (bodyIndexData [(int)depthSpacePoints [index].X + (int)depthSpacePoints [index].Y * depthWidth] == 255) {
+ int tmp = ((int)depthSpacePoints [index].X + (int)depthSpacePoints [index].Y * depthWidth < 0) ? 0 : (int)depthSpacePoints [index].X + (int)depthSpacePoints [index].Y * depthWidth;
171
+
172
+ if (bodyIndexData [tmp] == 255) {
173
maskData [index] = 0;
174
} else {
175
maskData [index] = 255;
0 commit comments