English 中文(简体)
如何在图像上探测水层?
原标题:How to detect water level on an image?

我的家务工作是撰写一份非常简单的申请(Java或C#,我知道两处),可以发现水位的图像中水杯/焦炭的浓度水平(必须在那里提一条线)。 我甚至不知道如何开始。 我每天都在og,但没有发现任何有益结果。 是否有任何良好的算法可以检测液体的水平?

The photo is taken from the side, like this:

enter image description here

(如果发现两条线,也是有益的)。 因此,你可以帮助我如何开始? 使用eg探测(是否有良好的基本字典)或其他方法?

最好能检测到水、焦炭和每一种液化等。

最佳回答

You are going to have to do some edge detection and then once you have the edges, try and find the level within the glass. You could use a toolkit like Aforge.NET. Then code to detect the edges is pretty simple, for example:

Bitmap b = new Bitmap(Image.FromFile(@"C:Tempwater.jpg"));
// create filter
Edges filter = new Edges();
// apply the filter
filter.ApplyInPlace(b);

pictureBox1.Image = b;

象这样的形象:

“entergraph

现在,在玻璃中找到水点应当稍微容易。 由于所有背景信息都已消除,你可以集中精力确定哪些方面是关键。

问题回答

http://shedletsky.com/hough/index.html“rel=“nofollow”>here

它将帮助你获得有关玻璃的能力。

Once you know how much water a glass can hold, you can draw two lines onto the image using functions that you write your self. I would advise one line for the glass size and one line for the water level super imposed over the image, you can then use these lines and the maximum capacity of the glass to form a correlation between the two and calculate the level of fluid contained within the glass.

你的教授对你将100%的指派工作正确感到兴趣不大,他们更有兴趣准备利用你自己主动解决问题。 谷歌搜索总是能够解决你们的问题。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签