Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question about harmonic calculations for image texture analysis

Status
Not open for further replies.

Atirag

Newbie level 2
Joined
Apr 6, 2013
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,336
Hello, I'm not very knowledgeable about image processing stuff but I'm implementing a method I found in the literature for a project and I found myself with some problems understanding some part of the algorithm related to the application of functionals to transform the image.

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 link with a description of the method https://pdf.aminer.org/000/067/295/texture_classification_with_thousands_of_features.pdf

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.

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. I've looked for help in several places but I can't seem to find how to implement this sort of calculation. Thanks a lot for any help! :cool:
 

Do you mean that you don't know exact equations in 2D image or how to implement by the matrix programming ? If you want to be professional , you can see the tun of commercial software on internet . 8-O
 

My problem is with the equations specifically not with the implementation of the equations. Although for the implementation I have to know the equations of course :p

I've been studying a bit about harmonics to solve this. This link helped me quite a bit. **broken link removed**

Apparently since I have 360 values from tracing the image on all of its angles then I have a full cycle so I can stretch and expand the cosine and sine function to match the values I got from the image this constant I use to stretch or shrink the function is the amplitude of the harmonic.

This is what the link says about this

·Since the mean of a pure cosine or sine wave is zero, simply adding the mean value of the data series to the cosine function assures that wit will fluctuate around that mean value.

·The stretching or shrinking is accomplished by multiplying the cosine function by a constant, C1, known as the AMPLITUDE (NOTE THAT 1 IS TO REPRESENT THE FUNDAMENTAL OR FIRST HARMONIC). Since the maximum and minimum values of a cosine function are ± 1, the maximum and minimum values of the function C1cos(α) = ± C1

Now since the consine function on angle 0 is on its maximun value but since my data won't represent necessarily the highest value on angle 0 then we shift the cosine function angle to match the highest value and this angle is the phase of the harmonic. This is what the link says about this.


·The objective of the lateral shifting of the harmonic function is to have it match the peaks and troughs of the data series. This time-shifting is most conveniently accomplished when the cosine function is used, because its maximum value is achieved when the angle on which it operates is ZERO. Shifting the cosine function to the right by the angle Ф1 results in a new function that IS MAXIMIZED AT Ф1.

·We can then find out what is the TIME of the maximum of the harmonic function by finding the TIME when the argument of the cos is ZERO. Therefore, Eq. 8 is maximized at time t= Ф1n/2p.


So in this case the first harmonic will represent the highest value in the series of 360 values I have from the image while the amplitude of the first harmonic would be the constant necessary to stretch the cosine to adapt it to this value (which according to the link is the mean of the whole set of values) and the phase would be the angle shift from 0 in order to make the angle with the highest value (one of the 360 values I have) the first angle.

The second harmonic would be the second highest value, the third would be the third highest value etc.

This is what I got from the link. I don't know if I understood everything correctly but hopefully I did. If someone knows more about harmonic or has an easier way to explain it then I will appreciate some tips. Thanks!
 
You will find alot about Function Analysis and Abstract Algebra:all subject by Serge Lang are good for mathematical review.

- Wavelet tour of signal processing by Mallet for engineering

- Function Equations and others linear analysis for computation
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top