I have designed a surface with a shape like a rounded rectangle and I want to detect its exact boundaries in a photo I take from it. A sample photo is like this:
I have tried thresholding the image but even after a Gaussian smoothing, the threshold won't give me an exact boundary.
Does anyone know of a technique that would give me the precise boundaries, regardless of the issues in lighting, etc?
UPDATE: I'm sorry I didn't state the problem well, and actually I wasn't aware of the real problem (though I think it hasn't changed too much):
Here is the new photo. The photo is taken looking down inside a plastic bucket with a small amount of water inside, and I need to segment the region inside the water from the walls of the bucket, so I can detect the objects inside the water later. There is some lighting illuminating the bottom of the bucket from underneath (actually a sheet of plexiglass is placed instead of the original bottom).
The problem is that the reflections of light on the wall make it the same color as where the water is, in some areas like the bottom-center in the sample image which makes it hard to find the water level.
Also, I would appreciate any hints on how should I differentiate between the boundary related to the plexiglass, and the boundary related to the water level.