Detecting a filled glass object I've been sent here from this question in stackoverflow, please excuse me if the question comes too specific and it's not in the manners in here:)

The task is to find a glass with specific liquid in it. Let me show you the pictures and then describe what i'm trying to achieve and how i was trying to achieve so far in the description below the pictures.

The pictures: (seems i need at least 10 reputation to post pictures and links, so links will have to do :( otherwise you can look at the stack overflow question)









A detailed description:
I was trying to implement an algorithm that would detect a glass of a specific shape in opencv (glass may be transformed by a different camera shot angle/distance). There will be also other glasses of other shapes. The glass i'm searching for will also be filled with some colored liquid that will distinguish it from glasses containing other colors.

So far, i have tried using SIFT feature extractor to try to find some features in the glass and then match them with other photos with the glass in it.

This approach worked only in very specific conditions where i would have glass in a very specific position and the background would be similar to the learning images. The problem also is that the glass is a 3d object and i don't know how to extract features from that (maybe multiple photos from different angles linked-somehow?). 

Now i don't know what other approach could i use. I have found some clues on this (here https://stackoverflow.com/questions/10168686/algorithm-improvement-for-coca-cola-can-shape-recognition#answer-10219338 ) but the links seem to be broken. 

Another problem would be to detect different "levels of emptiness" in such glass, but i haven't even been able to find the glass itself properly.

What would be your recommendations on the approach in this task? Would it be better to use a different way to find the local 3d object feature? Or would it be better to use other approach altogether? I have heard about algorithms "learning" the object from a set of multiple photos but i have never seen this in practice.

Any advice would be really appreciated
The paper referenced in your link seems to be this one.

Of particular interest there is Table 1 (included below). The accuracy rates aren't great, though they are better than other approaches.