Hacking the Kinect

Author: Jeff Kramer et a..
Publisher: Apress, 2010
Pages: 251
ISBN: 978-1430238676
Aimed at: Hardware enthusiasts
Rating: 0
Pros: Contains descriptions of some interesting techniques
Cons: Dangerous - to the point of being lethal
Reviewed by: Harry Fairhead 

The Kinect is one of the most exciting new pieces of hardware around. So do we really need the word "hacking" in the title? In fact, yes.

Author: Jeff Kramer et al.
Publisher: Apress
Pages: 251
ISBN: 978-1430238676
Aimed at: Hardware enthusiasts
Rating: 0
Pros: Contains descriptions of some interesting techniques
Cons: Dangerous - to the point of being lethal
Reviewed by: Harry Fairhead 

The Kinect is one of the most exciting new pieces of hardware around. It is amazing what you can do with it - so do we really need the word "hacking" in the title to make it seem even more exciting? To an extent the word "Hacking" really is justified when applied to the particular book - and not always in a good way.

The book takes the open source approach to working with the Kinect and it makes little attempt to make anything seem easy. After an introduction to the Kinect - the Xbox rather then the more recent PC version - we get started on installing the open source drivers. This takes the form of a a step-by-step list that really doesn't help you understand what is going on. As a result if something goes wrong you have no help in sorting it out.

It is worth saying that the whole book uses C++ and the coding style is very variable - but usually difficult to read let alone follow.

 

Banner

 

Chapter 2 is called Hardware but it really gets started on the software by way of a demo program. The final part of the chapter shows you how to create a sensor which will switch a light on when there is a person present. This uses an Arduino and a mains relay to do the actual controlling of the light so it's a complex first example. The code is presented as a ten-page stream of consciousness dump with no explanatory comments and lots of wrapped lines. This might be acceptable as a download, but not in a book.

What is worse - much, much worse, is the way the hardware construction side of the project is described. There are few words about how it should be implemented, but there are a few photos showing a screw wiring block and a mains relay hanging unsupported in the air. This is hacking in its worse sense and it is very dangerous. So dangerous that the book really should be recalled and re-written. Mains voltages deserve some respect, even if you understand the dangers. Accidentally touching one of the bare wiring block screw heads or pulling the cables so that they touch could result in a fried Arduino and PC, or even a fried Arduino enthusiast.

It isn't just that there are no "nannying" warnings its that there are safe construction methods that are just as easy to use. For a book aimed at mostly intermediate programmers such a "birds nest" construction at mains voltages is unforgivable.

 

dangerous

This is very dangerous with mains voltages on hanging wires and bare wiring block contacts.

 

Chapter 3 goes into some aspects using OpenCV. Nearly all of the chapter is about installation. The next chapter explains how to use it to do basic image processing - blurring etc and brightest point tracking. The code is of a slightly higher quality but the presentation is terrible.

Chapter 5 is on gesture recognition and this one is at least worth the effort of decoding because it does give you some clues as to how to implement a touch surface and even a "Minority Report" style interface - but then concludes that the whole thing is "beyond the scope of this chapter".

The next chapter is about working with voxels in the Point Cloud Library, PCL. From here the book focuses on point cloud  applications - using OpenGL, mapping point clouds to video data and Simultaneous Localization and Mapping (SLAM). This last application is advanced and the good news is that both the code and the explanation are easier to follow.

Chapter 9 introduces object modeling and detection including building a mesh from point cloud data. Of particular interest is the section on working out and object model using multiple views. Chapter 10 moves on to using multiple Kinects to do the same sort of job unfortunately this reverts to the long listing without comment approach to explaining things.

This book definitely gets better as it goes on but you really have to take the "hacking" in the title as an indication that what you are going to get is unpolished. There are far too many poorly presented listings in this book complete with line wraps and no comments. There are moments when things improve, but overall the quality is very low.

It is worth reading some of the accounts of how things work - SLAM and using multiple depth fields to reconstruct a model for example. If the book had more like this it would be really useful.

However, no matter how useful it is the safety lapse at the start, where mains voltages are left on bare wires without even a warning, is unforgivable and determines the overall low rating it gets.

So don't buy this book and make sure that no-one else does either. If you do know of someone who has bought it, make sure that they know enough not to get electrocuted by poor construction techniques. At the very least mount the relay and use a shrouded connection block.

 

Banner


Seriously Good Software

Author: Marco Faella
Publisher: Manning
Date: March 2020
Pages: 328
ISBN: 978-1617296291
Print: 1617296295
Kindle: B09782DKN8
Audience: Relatively experienced Java programmers
Rating: 4.5
Reviewer: Mike James
Don't we all want to write seriously good software?



Essential C# 12 (Pearson)

Author: Mark Michaelis
Publisher: Addison-Wesley
Date: December 3, 2023
Pages: 1232
ISBN: 978-0138219512
Print: 0138219516
Kindle: B0CLKY8GNV
Audience: C# developers
Rating: 5
Reviewer: Mike James
The latest edition of a highly recommended book that combines reference and tutorial material.


More Reviews

 

 

 

Last Updated ( Sunday, 03 June 2012 )