I would like merge two color images with an image mask.
img1 and img2 are color image with 3 channelsmask is grey image with 1 channel
for merge the two image with the mask I do a loop for each pixel.
OK, it's work but my image is 720x500 and i have 70ms of processing time is TOO LONG, I need to be real time.I can't do process on GPU.
Is a way to reduce processing time ?
is one a the best solution with 16ms of processing time.
Now I would like divide the loop into 4 threads. My code is ok :
but time is exactly same of one thread even time is upper.It's just classic access array memory and for the out image they don't need mutex because each thread have a quarter aof the image. How free array matrix for multithread for this easy case ?