Friday, November 13, 2015

Spreadtrum ResearchDownload PDF

For those of you who are lazy to download files form China with 5Kbs speed.
Spreadtrum ResearchDownload User Guide [v1.0.2][2011][EN]
Original source (slow).

Sunday, November 8, 2015

One-point perspective for orthogonal box

There is an image Fig 3.6 in a book "Viewpoints" [1] which explains one-point perspective. An observer looks at a box (B1,B2,B3,B4) and the box projects to an image plane containing points V1 and V2. It is a one-point perspective because the close side of the box (B1,B4) is parallel to the image plane. The observer looks in OZ direction and OZ is parallel to (B4,B3). Hence V1 is the vanishing point for line (B4,B3). (O,V2) is parallel to the box's diagonal and hence V2 is the vanishing point for the line (B4,B2).

Tuesday, October 20, 2015

2D image to 3D world triangulation

In this post I am interested in triangulation, - the technique of inferring the 3D position of an object from two images of this object, taken from different viewpoints. The technique relies on the ability to find corresponding 2D points in two images. In this sense the triangulation is a 'poor man's' 3D location estimator.
2D point correspondence + Triangulation -> 3D location
The initial set up is below.

Saturday, December 6, 2014

Performance wrecks composability

Usually one should look after the app performance in parallel with app development. And that is because performance can't be (easily) added afterwards.

Thursday, December 4, 2014

Error: syntax error: missing ';' before identifier 'hdr'

Visual Studio 2013/2015 build fails with error "prsht.h(607): error C2146: syntax error : missing ';' before identifier 'hdr'"

You didn't include the WinSDKVer.h header in stdafx.h. (Rebuild the project after changing stdafx.h).

Wednesday, November 19, 2014

Segmenting YouTube videos

Videos in YouTube can be segmented and enriched with extra information using viewers themselves.
When user adds "T=80" to the video hyperlink, the video starts playing from 80 second (YouTube start-end parameters). Then the extra information can be extracted from the context of the page, where the user inserts this link. It is smart.
But usually a user associates extra information with the particular segment of the video (T1; T2), not the segment from time T to the end of the video.  What to do, if the segment's end time is not specified in a link ?  It can be inferred from the watch time of all users who use given start time T for a particular video. Isn't it nice? Extra information is extracted from a way, in which the users watch the video.

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


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.