 My Math Forum Find centroid of a curve ( y coord. ) under discrete valu
 User Name Remember Me? Password

 Economics Economics Forum - Financial Mathematics, Econometrics, Operations Research, Mathematical Finance, Computational Finance

November 13th, 2011, 10:53 PM   #1
Newbie

Joined: Nov 2011

Posts: 4
Thanks: 0

Find centroid of a curve ( y coord. ) under discrete valu

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 a curve under a discrete 2D function ( histogram ) for special image processing after . I found next formulas for continues functions centroid:
http://www.intmath.com/applications-...troid-area.php

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 under the 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 ):

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:
http://goo.gl/2gh7X
Attached Images Image1220.gif (1.2 KB, 634 views) November 14th, 2011, 01:23 AM   #2
Newbie

Joined: Nov 2011

Posts: 4
Thanks: 0

Re: Find centroid of a curve ( y coord. ) under discrete val

sorry there was an error

to find centroid of an area not of a curve :

Find centroid of an area ( 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:

http://www.intmath.com/applications-...troid-area.php

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 ):

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 ,
Attached Images Image1220.gif (1.2 KB, 628 views) Tags centroid, coord, curve, discrete, find, valu ,

,

### centroid of a curve

Click on a term to search for related topics.
 Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post Niteawk Algebra 4 March 16th, 2014 01:43 AM odyssey Calculus 10 October 1st, 2013 05:33 PM M0ns7erS0u1 Linear Algebra 2 September 13th, 2013 03:06 PM ssallen Linear Algebra 4 July 22nd, 2012 08:24 AM jack_smith Computer Science 1 November 14th, 2011 01:25 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top      