Error msg
nadr123 opened this issue · comments
narendra@pop-os:~/Desktop$ python3 ftvd.py
/home/narendra/Desktop/image_folder/img.jpg
/home/narendra/Desktop/ftvd.py:69: DeprecationWarning: elementwise comparison failed; this will raise an error in the future.
if np.alltrue(imshape == shape):
Traceback (most recent call last):
File "/home/narendra/Desktop/ftvd.py", line 235, in
ftvd('/home/narendra/Desktop/image_folder')
File "/home/narendra/Desktop/ftvd.py", line 186, in ftvd
eigsK,KtF,eigsDtD,eigsKtK = getC(img,kernel)
File "/home/narendra/Desktop/ftvd.py", line 160, in getC
eigsDtD = np.abs(psf2otf(diff_kernelX,sizeF))**2 + np.abs(psf2otf(diff_kernelY,sizeF))**2 # Fourier transform of D transpose * D
File "/home/narendra/Desktop/ftvd.py", line 126, in psf2otf
psf_pad = zero_pad(psf, shape, position='corner')
File "/home/narendra/Desktop/ftvd.py", line 75, in zero_pad
dshape = shape - imshape
ValueError: operands could not be broadcast together with shapes (2,) (3,)
Hi
The shape of your image has 3 dimensions. That means you are reading a color image. FTVD was written for grayscale images only. Please make sure your image is 2D.
Regards
Josh