Template matching between 1d frequency curves using normxcorr2
Hi,
I’m trying to use 2d cross correlation between 1d dimensional frequency curves (frequencies between 6000 and 22000 Hz) to find if a template curve is present in a test one which is bigger:
Template curve:
Test curve:
I’m willing to use two dimensional cross correlation between both curves using normxcorr2 but I’m not quite sure the most efficient way to do this.
I’ve tried to convert both curves to binary image arrays, and then applying nomxcorr2 using:
img_template=bsxfun(@eq, 1:22000,curve_template);
img_test=bsxfun(@eq, 1:22000,curve_test);
c=normxcorr2(img_template,img_test);
but this way the 2d arrays are huge (77×22000 and 5703×22000) and the results are difficult to plot ( because of memory issues) and so to analize:
figure;mesh(img_template’);hold on;
view([0 90]);
mesh(img_test);
figure;
surf(c)
Any clue on how to do this template matching between curves in a more efficcient way?Hi,
I’m trying to use 2d cross correlation between 1d dimensional frequency curves (frequencies between 6000 and 22000 Hz) to find if a template curve is present in a test one which is bigger:
Template curve:
Test curve:
I’m willing to use two dimensional cross correlation between both curves using normxcorr2 but I’m not quite sure the most efficient way to do this.
I’ve tried to convert both curves to binary image arrays, and then applying nomxcorr2 using:
img_template=bsxfun(@eq, 1:22000,curve_template);
img_test=bsxfun(@eq, 1:22000,curve_test);
c=normxcorr2(img_template,img_test);
but this way the 2d arrays are huge (77×22000 and 5703×22000) and the results are difficult to plot ( because of memory issues) and so to analize:
figure;mesh(img_template’);hold on;
view([0 90]);
mesh(img_test);
figure;
surf(c)
Any clue on how to do this template matching between curves in a more efficcient way? Hi,
I’m trying to use 2d cross correlation between 1d dimensional frequency curves (frequencies between 6000 and 22000 Hz) to find if a template curve is present in a test one which is bigger:
Template curve:
Test curve:
I’m willing to use two dimensional cross correlation between both curves using normxcorr2 but I’m not quite sure the most efficient way to do this.
I’ve tried to convert both curves to binary image arrays, and then applying nomxcorr2 using:
img_template=bsxfun(@eq, 1:22000,curve_template);
img_test=bsxfun(@eq, 1:22000,curve_test);
c=normxcorr2(img_template,img_test);
but this way the 2d arrays are huge (77×22000 and 5703×22000) and the results are difficult to plot ( because of memory issues) and so to analize:
figure;mesh(img_template’);hold on;
view([0 90]);
mesh(img_test);
figure;
surf(c)
Any clue on how to do this template matching between curves in a more efficcient way? template matching, image processing, normxcorr2 MATLAB Answers — New Questions