Previous week, I was able to match an image with a template and plot where it matched up most, giving a 3D surface plot of "peaks." For this week, the goal is to create a script that can count the number of peaks. After discussing with Dr. Vernizzi, we decided to try Matlab's function
histcounts2 to bin nearby data points together so that it only counts the maximum value of each peak. So this week I will test out the following codes:
[X,Y] = find(c>0) % this sets the threshold to count points above 0
histcounts2(X,Y,[50:50]) %sets bin size (the max bin size should be the number of pixels in c matrix)
length(find(N>0)) %gives the number of points found in histcounts
I plan on testing this first with a "test" image randomly generated by Matlab.
No comments:
Post a Comment