I tried your solution , and first, what i realized, that BitmapSource doesn't contain any definition of Invoke() method. So I created PixelDelagate:
private delegate PixelColor[,] PixelDelegate(BitmapSource el);
And call him in such way:
private BitmapSource GetRightImage(BitmapSource first...