Thursday, December 26, 2013

Merging body parts based on color

After skin classifier has tested all pixels in the image, we get isolated blobs of potential body parts. The task of combining them into complete shape is regarded as a merging or grouping problem. As a simple way to attack this task I used a morphological ‘close’ operation (which is dilate + erode).

Thursday, October 24, 2013

PoolWatch Prototype 0.1

I am working on a prototype (PoolWatch) of a system which tracks swimmers in a swimming pool. The system is to track each swimmer and report its speed and traversed distance. The current goal is to realize what it would take to implement such a system.

Wednesday, May 22, 2013

Pet Toy: Ball shooting robot

Recently I've thought about a kit toy which can throw table tennis ball into the air. An easy solution I end up with is the rotation of the motor to be transformed somehow into the kinetic movement of the plastic ball.

Thursday, December 20, 2012

BASICish C#

Below is the C# code.

public static IEnumerable<T> AsEnumerable<T>(this System.Collections.IList source)
{
    return from object item in source select (T)item;
}
Doesn't it smell Basicish?

Thursday, September 13, 2012

IMediaExtension::SetProperties(IPropertySet*) in WinRT/C++

Media foundation transform (MFT) is initialized via
// IMediaExtension
SetProperties(STDMETHODIMP SetProperties(ABI::Windows::Foundation::Collections::IPropertySet *pConfiguration);
To get values from pConfiguration:
1. Convert it to IMap<HSTRING, IInspectable*> interface.
2. The value of each KeyValuePair is also IInspectable. To get the actual value of it - unbox it by converting value to IReference<T>. For strings this approach doesn't work: the documentation states "T must not be a delegate type or an HSTRING". So the IReference<HSTRING> is not possible. The workaround is to convert the value to IPropertyValue<T> and then chat with it to get actual value. Below is a helper method which implements it.

Saturday, September 1, 2012

Windows 8 x64 driver installation error - signature test fails

When you install the driver for Hitron BRG 35302 cable modem on Windows 8 x64, you get an error message "The hash for the file is not present in the specified catalog file. The file is likely corrupt or the victim of tampering". Then the installation process stops.

To solve it, turn the Windows 8 checking of the driver's signature off.