Skip to content
Snippets Groups Projects
Verified Commit 4536ed1b authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix incompatibility with MATLAB R2007b

parent 4d7ad782
Branches 4.5
No related tags found
No related merge requests found
......@@ -128,7 +128,7 @@ for i = 1:n_colors
dX = bsxfun(@minus,lab,lastlab); % displacement of last from all colors on list
dist2 = sum(dX.^2,2); % square distance
mindist2 = min(dist2,mindist2); % dist2 to closest previously-chosen color
[~,index] = max(mindist2); % find the entry farthest from all previously-chosen colors
[junk,index] = max(mindist2); % find the entry farthest from all previously-chosen colors
colors(i,:) = rgb(index,:); % save for output
lastlab = lab(index,:); % prepare for next iteration
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment