In a world of GUI-based applications, automating certain tasks involving programs without a command line interface can be a nightmare. Fortunately, the Windows API provides several mechanisms that allow you to programmatically take control of the mouse. In this post we will explore a method that, in my opinion, generalizes the best, allowing us to fulfill most of our automation tasks.
A lot of devices, from stereoscopic cameras to 3D sensors can provide distance information about the scene they’re capturing in the form of a depth map. To obtain meaningful data from such imagery it is often necessary to transform these depth maps into a 3D point cloud.
In this post we will perform such transformation using a depth frame obtained with a Microsoft Kinect V2, but the described methods can be easily ported to other hardware. And even though there are very elegant mathematical methods to do it, we’ll stick to some basic trigonometry. Continue reading “Transforming a depth map into a 3D point cloud”
Thanks to the big number of multimedia programming API’s available, reading frames from a webcam seems like a trivial task nowadays. However, there are times where the legal or performance requirements of a particular project do not allow the usage of such libraries (even open source ones). In this post we’ll go through the process of obtaining, decoding and displaying frames from a webcam on Windows using the Microsoft Media Foundation SDK. Continue reading “Webcam Capture with the Media Foundation SDK”
People who are close to me know that for most programming tasks I’m not a big fan of python. However, when it comes to task automation, this scripting language provides several straightforward and flexible tools, one of them being the subprocess module.
We’ve come a long way since the days where scientists hackishly encoded data in 3D primitives and textures to trick their highly parallel dedicated graphics hardware into performing non graphics-related computations. General purpose GPU computing has experienced fast grow in the last few years and nowadays a number of frameworls, and developing tools for GPU parallel are easily (and freely) available. One of them being OpenCL. Continue reading “Gaussian blur with OpenCL”
Edit 23/08/17: Source code download link fixed.
There are many reasons why one might want to intercept the signals from the hardware (i.e. keyboard and mouse) before they reach the software in your computer, some of them completely legitimate, others, quite shady. Continue reading “A key logger with windows hooks”
In a previous post I covered the coding of the host side for Microchip’s PIC18 USB HID demo and the implementation of the demo itself on custom-desgined hardware (you can read it here). Even though Microchip provides the host source code for windows, such example is outdated and available only in managed .net code (c++, c# and VB), which took me several hours to port to .net 4.0. Furthermore, despite the fact that the managed source actually uses pinvoke calls to Win32 functions, it is somewhat difficult to get it working on a native c++ implementation. Continue reading “Microchip’s PIC18 USB HID example Win32 Host Software (native c++)”