MATLAB parfor slicing issue?
I have a section of code that finds Harris corners in a sequence of images. I need to do this for 92 images, but it's rather slow. As such, I'd like to run the code in parallel. The code I have below has an error related to the variable "corners" %% Harris corners max_pts = 900; corners = zeros(max_pts,2,size(images,3)); parfor i = 1:size(images,3) I = images(:,:,i); [y x] = get_corners(I,max_pts); corners(1:length(y),:,i) = [y x]; end Which says: MATLAB runs loops in parfor functions by dividing the loop iterations into groups, and then sending them to MATLAB workers where they run in