Saturday, October 19, 2019

Tracking by detection based on ORB

The search of correspondence between corners using ORB:
Let say, in frame f1 we have a corner associated with some salient point. In the next frame f2 we find ORB (Oriented fast and Rotated Brief) keypoints in the whole picture. Monoslam predicts position of a salient point in f2 and hence we know a small search rectangle, where to search for corresponding ORB keypoints. We select all keypoints in this search rect as the candiates for correspondence. This candidates may be different corners and placed very closely to original keypoint in f1. Hence we can't rely on Euclidean distance between two corners and have to compute 256 bit ORB descriptors for all these candidates, which is very slow. Then we select the candidate with the ORB descriptor, most similar to ORB descriptor of original corner. If the similarity between these descriptors is weak (more than 64 out of 256 bits are different), we treat the original corner as having no correspondence.
The key problem of this technique is that for some keypoint in f1 there could be no match in f2. Then such corner is lost. Or we may find a wrong match: some keypoint may be close to original keypoint and has a quite similar descriptor. In this case the corner is unstable and occasionally jumps to a different close keypoint.
Watch demo.

Saturday, July 6, 2019

Graphs in Spatial AI

Andrew Davison is talking about using graphs to propagate local information into the global structure here.

[23:42] Forgotten graph techniques for SLAM: Gaussian belief propagation.
Some experiments in distributed processing Gaussian Belief Propagation
x Master representation is the factor graph; can be completely dynamic.
x Global entities can be estimated with completely local processing and storage and message passing.
x Linear, Gaussian GaBP (belief propagation) converges to correct means, over-confident ellipses.
x Interesting progress towards non-linear and robust factor graphs.
x Implements recompute instead of store. New measures of algorithm performance needed.

[26:15] Estimate global things with purely local computation.
[27:22] Graphs in Spatial AI
Graph NN (neural networks).

Friday, November 30, 2018

The sequential option for Worker-UI interaction

This post describes the even scheduling of Worker and UI (User Interface) in an application, with optional, temporal seizure of execution time by UI on user request.

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.