OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Tue, 27 Dec 2016 06:13:05 -0600How to combine quantities of different units to depict a cost function?http://answers.opencv.org/question/120341/how-to-combine-quantities-of-different-units-to-depict-a-cost-function/ Description :
I wish to model the motion of a ball tossed up by a child in the air.
By manually annotating the ball in captured frames, I get a feeling that few things could work in my favour such as constant angle at which the ball travels , constant acceleration of the ball and how well the ball positions depict a parabolic curve (error in fitting parabola).
I would like to make use of these components for formulation of a cost function (for data association). Hence, the cost would look something like the following :
Cost = A + B + C , where A, B, C could be derived from the quantities I mentioned above (for eg. using variance) or could be any other quantities
The objective is to select the point (location of ball) in every frame which yields minimum cost (data association).
Problem :
Since A , B and C are in different units, adding them just like that is not mathematically correct. Also, since the range of values is different for each one of them, some components don't contribute to the cost at all.
One possible solution is to normalize the quantities. But since the resolution of each component is different (minimum value by which they can change) normalization also doesnt help. This is because each component still
depicts a different quantity in itself.
For example:
If A , B and C are divided by max(range(A)) , max(range(B)) and max(range(C)) respectively, then all of them can vary from 0 - 1.
But A = 0.5 would not correspond to B = 0.5 and C = 0.5 which is what I want (since I want to give equal weights to all components in my cost equation)
Question:
If I wish to have equal weightage of all components reflected in my cost equation, what is the best way to combine them?
Tue, 27 Dec 2016 06:04:33 -0600http://answers.opencv.org/question/120341/how-to-combine-quantities-of-different-units-to-depict-a-cost-function/Comment by Atishay for <p>Description :</p>
<p>I wish to model the motion of a ball tossed up by a child in the air.</p>
<p>By manually annotating the ball in captured frames, I get a feeling that few things could work in my favour such as constant angle at which the ball travels , constant acceleration of the ball and how well the ball positions depict a parabolic curve (error in fitting parabola).</p>
<p>I would like to make use of these components for formulation of a cost function (for data association). Hence, the cost would look something like the following :</p>
<p>Cost = A + B + C , where A, B, C could be derived from the quantities I mentioned above (for eg. using variance) or could be any other quantities</p>
<p>The objective is to select the point (location of ball) in every frame which yields minimum cost (data association).</p>
<p>Problem :</p>
<p>Since A , B and C are in different units, adding them just like that is not mathematically correct. Also, since the range of values is different for each one of them, some components don't contribute to the cost at all.</p>
<p>One possible solution is to normalize the quantities. But since the resolution of each component is different (minimum value by which they can change) normalization also doesnt help. This is because each component still
depicts a different quantity in itself.</p>
<p>For example:</p>
<p>If A , B and C are divided by max(range(A)) , max(range(B)) and max(range(C)) respectively, then all of them can vary from 0 - 1. </p>
<p>But A = 0.5 would not correspond to B = 0.5 and C = 0.5 which is what I want (since I want to give equal weights to all components in my cost equation)</p>
<p>Question:</p>
<p>If I wish to have equal weightage of all components reflected in my cost equation, what is the best way to combine them?</p>
http://answers.opencv.org/question/120341/how-to-combine-quantities-of-different-units-to-depict-a-cost-function/?comment=120343#post-id-120343I am trying different ways to implement this cost using OpenCV. One way is to use the kalman class provided by OpenCVTue, 27 Dec 2016 06:13:05 -0600http://answers.opencv.org/question/120341/how-to-combine-quantities-of-different-units-to-depict-a-cost-function/?comment=120343#post-id-120343Comment by berak for <p>Description :</p>
<p>I wish to model the motion of a ball tossed up by a child in the air.</p>
<p>By manually annotating the ball in captured frames, I get a feeling that few things could work in my favour such as constant angle at which the ball travels , constant acceleration of the ball and how well the ball positions depict a parabolic curve (error in fitting parabola).</p>
<p>I would like to make use of these components for formulation of a cost function (for data association). Hence, the cost would look something like the following :</p>
<p>Cost = A + B + C , where A, B, C could be derived from the quantities I mentioned above (for eg. using variance) or could be any other quantities</p>
<p>The objective is to select the point (location of ball) in every frame which yields minimum cost (data association).</p>
<p>Problem :</p>
<p>Since A , B and C are in different units, adding them just like that is not mathematically correct. Also, since the range of values is different for each one of them, some components don't contribute to the cost at all.</p>
<p>One possible solution is to normalize the quantities. But since the resolution of each component is different (minimum value by which they can change) normalization also doesnt help. This is because each component still
depicts a different quantity in itself.</p>
<p>For example:</p>
<p>If A , B and C are divided by max(range(A)) , max(range(B)) and max(range(C)) respectively, then all of them can vary from 0 - 1. </p>
<p>But A = 0.5 would not correspond to B = 0.5 and C = 0.5 which is what I want (since I want to give equal weights to all components in my cost equation)</p>
<p>Question:</p>
<p>If I wish to have equal weightage of all components reflected in my cost equation, what is the best way to combine them?</p>
http://answers.opencv.org/question/120341/how-to-combine-quantities-of-different-units-to-depict-a-cost-function/?comment=120342#post-id-120342aaand, how is this related to opencv ?Tue, 27 Dec 2016 06:06:52 -0600http://answers.opencv.org/question/120341/how-to-combine-quantities-of-different-units-to-depict-a-cost-function/?comment=120342#post-id-120342