Camera streaming experiment
If you think WL is slow, you never used it with WLJS sauce 🍝
connect to a web camera using device API
cam = DeviceOpen["Camera"]; cam["FrameRate"] = 60;
resize and pipe the raw image data to 3D point cloud with minor transformations
Refresh[Module[{img, length}, img = ImageData[ ImageResize[ColorConvert[DeviceRead[cam], "GrayScale"], 100], "Real32" ]; length = Length[img] Length[img[[1]]]; vertices = MapIndexed[Join[#2, {50.0 #1}]&, img, {2}]; vertices = NumericArray[Flatten[vertices, 1], "Real32"];
Graphics3D[GraphicsComplex[vertices, { Red, PointSize[0.0003], Point[Range[length]] }], ViewProjection->"Perspective", ImageSize->1000] ], 1/45.0]
NumericArray is important here. This forces WL to use more efficient data structure.