Segmentation of half transparent material, e.g. glass I'm totally stuck on an issue regarding the segmentation of glassy objects.
I need to get the object as precise as possible.
My approaches were different.
At first I tried to remove the background, so that only some sharp contours are left.
But that only works for objects which have sharp edges / gradients.
Otherwise the object itself is also removed.
I posted two different images.




I tried to remove the background via morphological operations, like grayscale dilatation and a divison on it.
but it didnt help much.
after it, I tried a k-means with k=3 for getting the modified background separated from the gray and black values of the glass.
That wasn't successfull in some cases, but not overall/in average.
I also tried to make a canny edge detection with an overall blured filter, but that lead to weaker results in form of open contours, a lot of noise, etc. pp.

Canny with automatic threshold results:

testimg = imread('http://i.imgur.com/huQVt.png');  
imshow(testimg)
imedges = edge(testimg,'canny');
imshow(imedges);


Same goes for the second image.




As you can see, there is a lot of noise inside and outside and doubled edges from the glas border. Even there are gaps in the edges.

So, I need your advices for getting a general approach for dealing with this problem of half-transparent materials, not for just these two images.

1) Other ideas for removing the background without damaging the object?

2) Other segmentation methods for getting the object separated from the background?

If it's possible, then with Matlab, IPT or statistical toolbox hints. Any other hints are also welcome!

Thank you for your answer in advance.
Sincerely
Why not just use a simple 2D FFT (guassian) high pass filer?

I did this real quick using MATLAB

Shard #1 using high pass FFT:



The same thing is done on #2.

Shard #2 using high pass FFT:



As you can see, the background and glass area is wiped out, and only the edges are traced.  I did not spend any time on it, but you can threshold the HP filtered output to have more crisp edges, or push the HP cut off higher.

Is this more the results you are looking to get?