Watch this Author's files
Can anybody give me the this code for colour image segmentation??
This is great code! It's very easy to read and taught me a lot about mean shift.
I found that the runtime was decreased on my machine and data by replacing the lines:
sqDistToAll = sum((repmat(myMean,1,numPts) - dataPts).^2); and beenVisitedFlag(myMembers) = 1;
with:
sqDistToAll = sum(bsxfun(@minus,myMean,dataPts).^2); and beenVisitedFlag(inInds) = 1;
respectively.
Thanks for the code!
Guys, is there any code for high dimensional data? This code doesnt work for D is greater than 2. Thanks.
In order to Bart's code on 1D dim data a small change should be made:
sqDistToAll = sum((repmat(myMean,1,numPts) - dataPts).^2,1);
Contact us at files@mathworks.com