|
@@ -20,8 +20,15 @@ namespace bbiwarg.Images
|
|
|
|
|
|
public EdgeImage(DepthImage depthImage, OutputImage outputImage)
|
|
|
{
|
|
|
- // no more scaling to [0, 255]?
|
|
|
- Image = depthImage.Image.Canny(100, 75, 3);
|
|
|
+ Image<Gray, byte> dimg = depthImage.Image;
|
|
|
+ //rescale depthImage to [0,255] -> performance loss not worth (is already scaled to [0,200])
|
|
|
+ /*double[] min, max;
|
|
|
+ Point[] minLoc, maxLoc;
|
|
|
+ dimg.MinMax(out min, out max, out minLoc, out maxLoc);
|
|
|
+ double interval = max[0] - min[0];
|
|
|
+ dimg = dimg.Convert(delegate(byte d) {return (byte) ((d/interval)*255);});*/
|
|
|
+
|
|
|
+ Image = dimg.Canny(150, 100, 3);
|
|
|
|
|
|
// draw blue edges in outputImage
|
|
|
outputImage.Image[2] = Image.ThresholdBinary(new Gray(0), new Gray(1)).Mul(255);
|