11-09-2014 07:36 AM
Hi,
Using the "Select" slide switch in attached vi one can coose between a) dataset with a pattern (lines from top left to botom right) or b) a uniform dataset.
What algorithm can be used to 1) detect if there is a pattern in the dataset and 2) what is the angle of the pattern?
To be honest, I have no clue where to start, that's why I posted this question.
Thanks for any inputs!
Best regards
11-09-2014 09:07 AM
with vi's
11-09-2014 09:39 AM - edited 11-09-2014 09:43 AM
I'm sorry for the confusion, but apparently my vi wasn't attached to previous posts 😞
How come I can't attach the vi ?????
Add Attachment and Browse button but no vi in my post 😞 😞 😞
11-09-2014 12:15 PM
Ok, last try to attach vi 🙂
Note that this is, as you can see, silulated data. I can't post real data since way too large dataset.
The idea is basically the same excpet that real data isn't so straight as the simulation.
Thanks for any inputs... ...
11-09-2014 01:26 PM
if the pattern is always going to be linear and always going to have a good SNR like your simulated data, you could find the location of the max in each column of data and pass that to the linear curve fit functions.
11-09-2014 02:25 PM
You really need to define "pattern" before you start trying to look for a pattern.
Is it a pattern if the data is periodic? Is it a pattern if we see the same peaks multiple times? What constitutes a pattern to you? We can make guesses from your simulation data. But, we cannot resonably give you guidance on an algorithm without knowing what it is you're looking for.
11-10-2014 12:36 AM
Hi, Thanks for the reactions so far.
Indeed it's hard to look for something if you don't know what to look for.
So I show some real life data in attached document.
The first data set is perfectly uniform, the other two are not.
What I want to know is, if there is a pattern, what's the angle of it.
You can see this data as a 2D surface of an object.
I searched the internet and came to this site (Click)
The "Angular power spectral density function" (APSDF) showing two peaks is just what I'm looking for.
Unfortunately I don’t know where to start to implement such function 😞
I don't think people @ Michigan Metrology are willing to tell me how they calculate it, that's why I rely on you guys... ...
The "Std" parameter used in roughness analysis can be determined from the APSDF, more information here, click.
I hope this cleared some things out.
Best regards
11-10-2014 01:41 AM
I saw your data and your link and my left eye started twitching. There was this one master's degree project this one time back in '07.....
Attached is a VI that will compute a histogram like in your link. The VI uses vertical and horizontal Sobel operators on the image data to highlight edges and then calculate the angle and make a histogram of the result.
FWIW, the degree project was to replicate the results of a paper that advocated doing the gradient 4 times and concatenating the results to enable better image characterization (and ultimately matching). The four histograms were taken after applying low pass and high pass filters in horizontal and vertical directions. This provided more information and it may be useful in your application. Let me know if you'd like the report; I can PM it to you.
The paper was P.W. Huang, S.K. Dai and P.L. Lin, “Texture image retrieval and image segmentation using composite sub-band gradient vectors,” in Journal of Visual Communication and Image Representation, volume 17, issue 5, October 2006, pp. 947-957
11-10-2014 04:44 AM
Dear Zwired1,
I hope your left eye is ok by now !
Can you please post the vi in LV2012 version?
Thanks for that!
Please mail me the report too so that I have a bit more background information.
For sure I won't understand it all but, like we say in Dutch, "One never knows how a cow catches a rabbit."
Best regards
Alain
11-10-2014 12:58 PM
Headed to the library to see if they have a bookof more Dutch sayings! I'm going to be chuckling all day.