Finding a subimage inside a Numpy image

后端 未结 5 1131
太阳男子
太阳男子 2020-12-08 03:24

I have two Numpy arrays (3-dimensional uint8) converted from PIL images.

I want to find if the first image contains the second image, and if so, find out the coordin

5条回答
  •  北海茫月
    2020-12-08 03:35

    I just finished writing a standalone implementation of normalized cross-correlation for N-dimensional arrays. You can get it from here.

    Cross-correlation is calculated either directly, using scipy.ndimage.correlate, or in the frequency domain, using scipy.fftpack.fftn/ifftn depending on whichever will be quickest for the given input sizes.

提交回复
热议问题