RIP Intel Edison

Seems that intel has given up on the IoT space to large extent by cancelling the Edison amongst other things. They had a few things going for them, especially when paired with a battery card.

The combo above is certainly more compact than a Raspberry Pi equivalent but somehow it was always a pain to work with. Maybe just a bit too embedded. Mine got consigned to the “technology I no longer have time or space for” bin in the garage quite a long time ago whereas Raspberry Pis continue to multiply.

Latest fun thing in the office: a Stereolabs ZED depth-sensing stereo camera

Just in is this Stereolabs ZED depth-sensing stereo camera. I have been looking for an affordable, good quality stereo camera for ages and this seems to fit the bill. Plus, since it is able to generate a point cloud depth map simultaneously with video frames, it’s possible to compose mixed reality scenes in Unity using a plugin available here.

One of the fun things to try is the ZEDfu program.

This is designed for mapping 3D spaces and turns the ZED into a scanner. The screen capture shows an intermediate view while it is collecting data. You can see the original image, a depth map and the surface map. Thought it was a fun image.

Definitely looking forward to working with this device and using it in some MR projects.


Using C++ REST SDK as a static library

cpprestsdk is a handy library for implementing REST interfaces in C++ code. On Windows it is conveniently available as a NuGet package. However, it is a dynamic link library (DLL). Normally that’s not a problem except for the fact that I am trying to combine it with WebRTC which builds as a static library and mixing the two causes strange crashes. I don’t know if it is possible to compile WebRTC as a DLL – the ninja build is very complicated :-(.

I found this very helpful post which provides life-saving instructions on how to build and use cpprestsdk as a static linked library. In fact the cpprestsdk Visual Studio solution now includes a project to build a static library so that part is mostly taken care of. It is still necessary to change the Runtime Library option to /MTd (debug) and /MT (release) in the casablanca140.static project however.

To use the library, the preprocessor symbol _NO_ASYNCRTIMP needs to be defined in the project as described in the post. You also have to add winhttp.lib, crypt32.lib, bcrypt.lib and zlibstatic.lib as additional linker dependencies. The library for the latter needs to copied somewhere that the project can find – it can be obtained from the packages in the cpprestsdk folder for zlib.

Another thing is that the static version of cpprestsdk needs to be built in Debug and Release modes if the new project is to run in both modes. With some things you can use Release for both – this doesn’t seem to work for cpprestsdk.

The result now is that I can use REST for signaling in my WebRTC project – not as easy as I expected!

Wide field of view holographic displays

Absolutely fascinating paper here from Microsoft Research describing the design of a holographic display technology that can achieve 80 degrees field of view or more. I remember sitting in a bar in London circa 1980 with a colleague discussing how to produce custom wavefronts for CGI applications. We went down a black hole fast but this kind of tech is exactly what we would have needed.

Using a webcam with a HoloLens SpectatorView rig

Following on from my previous post regarding HoloLens SpectatorView, I had been wondering if it was possible to use a webcam instead of a DSLR. It changes the mounting concepts but, just for testing, it wasn’t hard to place a Logitech C920 webcam on top of the HoloLens and get it aligned enough physically so that the calibration data numbers looked reasonable.

An immediate problem was that the code was not setting the webcam’s frame size. A quick look at OpenCVFrameProvider.cpp showed the problem. The code was trying to set the frame width and height before opening the capture object which doesn’t work. This is the original:

The fix is put line 44 before line 41. Then it works fine. The preview window in the calibration code has red and blue swapped but the processed images are correct. Once it was calibrated, I could go on and run the Unity app and look at the composite output – now pretty decent 1080p video.

Using a webcam like the C920 is far from perfect however. The field of view was measured at 75 degrees by the calibration software which really isn’t enough to be useful. Another problem is the autofocus which causes frequent focus breathing. And then there’s the challenge of proper mounting but at least the C920 does have a 1/4 inch thread so there are possibilities.

A decent DSLR (this would be my choice as it can output clean 4k 4:2:2 video over HDMI apparently at a decent price and I have all the lenses 🙂 ) is going to give better results for sure. On the other hand, there may be many applications where a webcam is just fine and you can’t argue with the price.

Null pointer crashes

Interesting article here about eliminating null pointer crashes at the language level. I was intrigued by this since the other day I fixed an incorrect and unsafe cross-thread call situation that resulted in…a null pointer crash.