Commit 4536ed1b authored by Sébastien Villemot's avatar Sébastien Villemot

Fix incompatibility with MATLAB R2007b

parent 4d7ad782
Pipeline #298 passed with stages
in 334 minutes and 38 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment