03-13-2020 10:21 AM
@GybrushThreepwood wrote:
Here the test images: left up: base signal (A) the lines mark the part of the part i use as pattern (up right / part of A) to detect.. but i cant see any peak in the correlation (down left).. I just see the same base signal... smoothed. (image left down) I then tried to split the base signal to loop the correlation with the pattern signal at same array length (down right). but the result seems similar.
I got stuck with this. 😐 maybe someone can help?
attach your actual .vi and some sample data
@GybrushThreepwood wrote:
I want to use that feature for a kind of "pattern recognition". So I thought, if I just use a smaller part of signal A and corellate it with A itself, I should get a position with the highest correlation peak where this small part best fits to the rest of A? Is that correct too, or am I missing something?
That depends on how similar your template is to the input data:
03-23-2020 02:13 AM
I think I got it. Xcorr just gives out the results for the whole data set X and Y. If I just search a small part of X it won't work, cause it don't fit to the whole data set.
I tried to loop the small dataset "manually" and just calculated the correlation coefficient each time. Then the result was good. It was 1 when the subset was found. Unfortunately this takes quite long cause it's shift-looping for each point of the long data set. Thought there would be a faster method.
Thanks anyway.
03-23-2020 04:18 AM
I don't quite understand what you're after, but my first thought is to make an FFT on both signals and compare those.
/Y