Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Compute the average image value

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    21
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Compute the average image value

    This is my assignment:
    http://www.cse.yorku.ca/course/2011/...201/Q2/Q2.html

    I have no idea what is an image value. I tired looking it up but there's no help.

    All the codes are given. I just need to complete the two methods. (a constructor and the computation part).
    So, how do you compute it?

    Can someone guide me through this?
    Thank you for your time.
    Last edited by IAmHere; January 15th, 2012 at 11:16 PM.


  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: Compute the average image value

    In image processing, a frequent operation is to compute the average image value (intensity) or some other statistic over a rectangular sub-region of the image. The region of interest can be specified by 4 integer parameters: top, bottom, left and right. Not knowing the sub-region in advance, a na´ve method would require O(n) time to compute this average, where n is the number of pixels in the image. One could speed this up by precomputing the average for all possible sub-regions: how much memory would this require?
    Read this carefully and you will hopefully get the answer on your own.

  3. #3
    Junior Member
    Join Date
    Jun 2011
    Posts
    21
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: Compute the average image value

    So, a "sub-region of the image" is a rectangle. So, how do I compute the average of a rectangle?

  4. #4
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: Compute the average image value

    Quote Originally Posted by IAmHere View Post
    So, a "sub-region of the image" is a rectangle. So, how do I compute the average of a rectangle?
    Not sure. It might be a square or any other shape.
    And to compute the average of a rectangle, you must google, there must b many tutorials for finding average or whatever you want. We were not taught what you were taught before assigning this assignment to you. So, it must be you to tell us how you want to compute the average?

Similar Threads

  1. Help with Average and Variables Please =)
    By Raymond Pittman in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 9th, 2011, 10:02 AM
  2. Program to compute powers
    By Shyamz1 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 25th, 2010, 04:51 PM
  3. Compute Wind Chill Assignment
    By JavaCow in forum What's Wrong With My Code?
    Replies: 6
    Last Post: September 17th, 2010, 05:35 PM
  4. calculator GUI needs to compute
    By javanovice in forum AWT / Java Swing
    Replies: 3
    Last Post: May 4th, 2010, 02:16 PM
  5. Compute the frequency count and big-oh notation for a certain code segment
    By maykel_trinidad in forum Java Theory & Questions
    Replies: 3
    Last Post: November 13th, 2009, 09:23 AM