Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7973343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:04:36+00:00 2026-06-04T08:04:36+00:00

My homework is to write a very simple application (Java or C#, I know

  • 0

My homework is to write a very simple application (Java or C#, I know both), which can detect water level of a glass of water / coke in a picture (it have to draw a line there). I don’t even know how to start it. I have googled all day, but have found no useful results. Are there any good algorithms, which can detect the level of the liquid?

The photo is taken from the side, like this:

enter image description here

(it’s also good if it detects both lines). So could you help me out with how to start? Use egde detection (are there any good basic algorythms?), or other method?

It would be best would be if it detected water, coke, and every liqued etc….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:04:38+00:00Added an answer on June 4, 2026 at 8:04 am

    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:\Temp\water.jpg"));
    // create filter
    Edges filter = new Edges();
    // apply the filter
    filter.ApplyInPlace(b);
    
    pictureBox1.Image = b;
    

    Yields an image like this:

    enter image description here

    Now it should be a little bit easier to find the point of water in the glass. Since all of the background noise has been eliminated, you can focus on determining which edge you should key off of.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My kiddo had a homework assignment to write Blackjack in Java. I helped him
I'm trying to write a simple spell checking program for homework, basically by putting
For homework, I need to build a small java application.The main goal is to
I'm stuck with this Java homework question: Write a new method, Refund, that simulates
I use latex to write up homework assignments. I need to include both charts
This is one of my homework exercise. Write a shell program, which will take
So i've got a problem in my java homework. The task is to write
Hey. I'm going to write a simple ship shooting game as CG homework, so
for my homework I need to write a very little virtual 16 bit Assembler-Interpreter
I have a homework assignment to write a multi-threaded sudoku solver, which finds all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.