¡@

Home 

python Programming Glossary: simg

Fast Way to slice image into overlapping patches and merge patches to image

http://stackoverflow.com/questions/16774148/fast-way-to-slice-image-into-overlapping-patches-and-merge-patches-to-image

import random as rand def get_indices_for_un_patchify sImg sP step ''' creates indices for fast patchifying and unpatchifying.. less rows than columns in the patchMtx ''' lImg np.prod sImg indImg np.reshape range lImg sImg # no. of patches which fit.. ''' lImg np.prod sImg indImg np.reshape range lImg sImg # no. of patches which fit into the image sB sImg sP step step..