img_2 = IL.wrapByte(im_2)

        # get the fft parameters only once at the beginning because they will be te same for all calculations
        extension, extSize, paddedDimensions, fftSize = getFFTParamsFromImps(
            im_1,
            im_2,
            r1=Rectangle(0, 0, 8 + vertical_strip_width + 2, im_2.getHeight()),
            r2=Rectangle(0, 0, vertical_strip_width, im_2.getHeight()))

        # initializing list of subpixelshifts
        spshifts = []

        # sliding the small vertical band (which will be called view v2) pixel by pixel
        # the start of the small vertical band in im_2 is start_of_sliding_band_in_im_2, renamed as "s"
        s_range = range(
            int(Math.ceil(end_of_im_1_in_im_2 - vertical_strip_width)))

        for start_of_sliding_band_in_im_2 in s_range:
            # for start_of_sliding_band_in_im_2 in range(30):
            s = start_of_sliding_band_in_im_2
            # extract view v1. Instead of looking for where the narrow band v2 fits in the entire im_1,
            # we extract only a narrow band in im_1. We know that v2 will be found in v1.
            # We take the narrow band 3 times wider than v2.

            # the following is clear when looking at the schematic
            start_of_v1_in_im_1 = im_1.getWidth() - (
                int(round(end_of_im_1_in_im_2)) - s + 8)

            r1 = Rectangle(start_of_v1_in_im_1, 0,
                           8 + vertical_strip_width + 2, im_2.getHeight())
            v1 = getViewFromImglib2Im(img_1, r1)