Hello and good day,
im still new with using Parallel Computing Toolbox so im having a problem to apply parfor loop for marking the image. below is the codes that bottleneck my algorithm for majority of the time taken to process.
sz = [XImage YImage];
[row,col] = ind2sub(sz,Index(Y));
if Result =="Yes"
plot(col,row,'y.', 'MarkerSize', 10);
plot(col,row,'bx', 'MarkerSize', 10);
What the codes should happened:
this function will run and process each index for classification, if it is yes, mark it with yellow dot,and vice versa with blue 'X'. The image shown later will show yellow dot's and Blue 'X' in the image.
what the codes process happened:
the parfor loop works but however the image doesnt contain any of the marking at all.
i think i understand the reason why parfor loop wont work with marking image. it is due to using a graph plot on the image.my Index is averaging to 10,000 iteration thus the for loop is a long process . im pretty sure by doing parfor loop will substantially reduce the process time.
i wonder, did i have misunderstanding of how parfor loops works? or graph plot method arent possible for parfor loop?
i would to request help for current method and if it is not possible,an advice of any other method to mark the image without manipulating the real image(masking) that can be used with parfor loop or something similiar would be very appreciated.