Question about harmonic calculations and other functionals for image analysis I am implementing a method known as trace transform for image analysis. The algorithm extracts a lot of features of an image (in my case features pertained to texture) using a set of transforms on the values of the pixels. Here is a paper describing the algorithm: (PDF link).

The algorithm finally constructs a "triple feature" which is a number that characterizes the image and was calculated by applying a first set of transforms on the pixel values extracted by all the tracing lines going through the image at all angles. On the paper you can see this description starting on page 2, Figure 1 shows an abstraction of such a tracing line which is defined by its angle (phi) and the distance (d) of the line from the center of the image. So we can describe each tracing line by the pair (phi,d).

Now on the next page on the paper (page 3) we have Table 1 which is the set of functionals that is applied to the pixel values extracted by the tracing lines. Each of these functionals applied to all the tracing lines generates another representation of the image. Then another set of functionals (those that appear on Table 2 on page 4) are applied to the new representation of the image along the columns which is basically along parameter d generating, this way, another new representation of the image.

Finally another set of functionals is applied to this last representation which is an array of values over parameter phi which was the angle parameter (that means we have 360 values describing the image, one for each angle of the tracing lines). You can see these functionals in the paper on Table 3 page 4.

Now some of this last set of functionals that have to be applied to the last representation of the image over parameter phi need to calculate the harmonics of this set of 360 values. First I need to calculate the first harmonic and then the amplitude and phase of the first through fourth harmonic but I don't know how to do this.

You can read the first couple of pages of the paper since it's probably better explained there. And figure 1 makes it clear what I mean by tracing lines and the representation of each line by the (phi,d) pair.

Other functionals I have trouble with since I don't know if I'm understanding them correctly are:

$$
 \text{c so that:}\sum_{i=1}^cx_i=\sum_c^Nx_i.
$$

where $x_i$ is one of the values and $N$ is the total number of values.

So my doubt is with what the result should be. The source (the paper listed above) has nothing else to contextualize this functional that's all it says so I'm interpreting that the result is $c$ rather than the sum of $x_i$ until $c$ right?

So let's say I have this set of numbers {2 2 3 1} where each number is one value $x_i$

So the above functional will tell me $c=2$ but the result of the sum is 4. So which should I take as the result in this case given the above functional?

The other functionals I'm having trouble with are related to the calculation of harmonics based on the dataset extracted from the image:

$$
\text{i so that } x_i=\min_{i=1 \ldots N}x_i\text{ without the first Harmonic}
$$
$$
\text{i so that } x_i=\max_{i=1 \ldots N} x_i\text{ without the first Harmonic}
$$
$$
\text{Amplitud of the first Harmonic}
$$
$$
\text{Phase of the first Harmonic}
$$

all the way to

$$
\text{Amplitud of the fourth Harmonic}
$$
$$
\text{Phase of the fourth Harmonic}
$$

I really don't know how to calculate a Harmonic or the amplitude or phase of it for the values. If someone more knowledgeable than me on image analysis can look into the paper linked above and provide me some tips I'll be greatly appreciated.
Perhaps looking at this paper 1 would be appropriate for a literature survey.

The paper describes in detail the rules of constructing functionals for a Trace transform. The functionals described in your paper are merely examples of the functions which follow the rules presented in paper 1.