Re: Faster way?
- Posted by pampeano at rocketmail.com Dec 24, 2002
- 393 views
Hi Jdube, I think there isn't a faster way to do that. But in your code, the line: temp=compare(image[i][j],background[1][j]) Is not being used for anything, and that routine will definitly slow down your code. Why not to remove it? Best Regards, Guillermo Bonvehi --- dubetyrant at hotmail.com wrote: > > Hello, > I'm wondering if there is a more efficient(meaning faster) way of > comparing each element of a sequence with each element of another > sequence of the same size.Im matching an image with a background > image,and > any whitespace I find,I want to convert to the background image. > > sequence image > > sequence background > > for i= 1 to length(image) by 1 do > > for j=1 to length(image[1]) by 1 do > temp=compare(image[i][j],background[1][j]) > > if image[i][j]=255 then > image[i][j]=background[1][j] > > end if > > end for > end for