Re: numpy/python (image) problem

2020-12-09 Thread Paulo da Silva
Às 05:55 de 09/12/20, Paulo da Silva escreveu: > Hi! > > I am looking at some code, that I found somewhere in the internet, to > compute DCT for each 8x8 block in an gray (2D) image (512x512). > > This is the code: > > def dct2(a): > return >

numpy/python (image) problem

2020-12-08 Thread Paulo da Silva
Hi! I am looking at some code, that I found somewhere in the internet, to compute DCT for each 8x8 block in an gray (2D) image (512x512). This is the code: def dct2(a): return scipy.fft.dct(scipy.fft.dct(a,axis=0,norm='ortho'),axis=1,norm='ortho') imsize=im.shape dct=np.zeros(imsize) # Do