Using the feature points object in matlab(no feature matching)
1 次查看(过去 30 天)
显示 更早的评论
Hi,
with detectSURFFeatures or any other feature detection function of matlab we can get a featurePoints object, which is perfectly designed to be passed on to extractFeature and matchFeature function.
Except unfortunately that's not really what I want to do with the features. Rather than matching features with a specific reference image, i would like to look at the neighborhood of the pixel and using some specific features to filter out the one that is interesting.
As an example, I want to look at a very small window around every points and see the color(for rgb)/power(for black and white) distribution of the pixels the window. How can I best do this? The more I read into binary features of matlab, the less it appears to me that I can use them for it.
Many thanks in advance
0 个评论
采纳的回答
Image Analyst
2021-6-18
Just use indexing to get the small sub-image you're interested in and then use histogram
subImage = bigImage(row1:row2, column1:column2, :);
[r, g, b] = imsplit(subImage); % For RGB image
histObjectR = histogram(r);
histObjectG = histogram(g);
histObjectB = histogram(b);
For grayscale
subImage = bigImage(row1:row2, column1:column2);
histObject = histogram(subImage);
% or
[counts, grayLevels] = imhist(subImage);
2 个评论
Image Analyst
2021-6-18
Depends on what you want to do. Nothing wrong with a for loop for a few dozens of locations. It's not the for loop itself that's slow. A for loop will be fast. You can do a for loop with tens of millions of iterations in less than a second if there's nothing computationally intensive inside. You might be able to concatenate all the bounding boxes into a single double array with vertcat().
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Feature Detection and Extraction 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!