Results 1 to 1 of 1

Math Help - Finding centroid of a curve ( y coord. ) under discrete valued 2D function

  1. #1
    Newbie
    Joined
    Nov 2011
    Posts
    1

    Finding centroid of a curve ( y coord. ) under discrete valued 2D function

    Hello,

    I have a set of discrete pairs ( x , y ) - keys and values - 2D discrete function's samples - a histogram of input digital image that I need to process. ( y = f(x) )

    I need to find y coordinate of a centroid of an area under a discrete 2D function ( histogram ) for special image processing after . I found next formulas for continues functions centroid:
    5. Centroid of an Area


    I've tried to calculate y coord. of a centroid using average method for discrete function integration but I'm not sure about computation of y , how to identify
    x = f-1(y) ( inverted ) and an intervals for computation in discrete case.


    How to do that : from having (x,y) discrete pairs set to find the y coordinate of centroid of an area under a discrete function y = f(x) curve for the given interval [a , b] ( size N )? I need pseudo code or C or Matlab code of calculation of the y:
    something like ( pseudocode ):

    something like ( pseudocode ):

    function find_centroid ( map<Key,Value>input_hist ) returns int y;

    Can anybody post a link for such problem solved , such function implemented or description of the algorithm ?

    Thanks in advance ,
    my web site:
    "R&D hardware . Computer/Embedded Systems Software"
    Attached Thumbnails Attached Thumbnails Finding centroid of a curve ( y coord. ) under discrete valued 2D function-image1220.gif  
    Last edited by Freely; November 14th 2011 at 02:17 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] converting rectangular coord. to spherical coord.
    Posted in the Calculus Forum
    Replies: 1
    Last Post: April 28th 2011, 04:12 PM
  2. [SOLVED] converting rectangular coord. to spherical coord. II
    Posted in the Calculus Forum
    Replies: 2
    Last Post: April 28th 2011, 08:14 AM
  3. Replies: 4
    Last Post: September 20th 2010, 07:16 AM
  4. Finding a centroid take 2.
    Posted in the Calculus Forum
    Replies: 6
    Last Post: April 18th 2009, 05:45 AM
  5. Finding a centroid
    Posted in the Calculus Forum
    Replies: 1
    Last Post: April 18th 2009, 05:39 AM

Search Tags


/mathhelpforum @mathhelpforum