You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an array of images of size 1010x1010. I would like to register all of the images in this array onto the first image. When I run the following code my 8GB of memory gets full:
importnumpyasnpimportimreg_dftasirddefregister(im1,im2):
result=ird.similarity(im1, im2, numiter=1)
assert"timg"inresultreturnresult['timg']
im1=img_array[:,:,0] # first image in the arrayforiinxrange(1, num_images):
img_array[:, :, i] =register(im1, img_array[:,:,i])
Do you have any idea what could be the problem?
Thanks!
Edit: Images are float and the pixel values are not necessarily within 0-255 range.
The text was updated successfully, but these errors were encountered:
The problem with imreg_dft is that it is not particularly memory efficient.
The memory problem may be mitigated in the future. However, if you don't use the fftw package to do the Fourier transform, I suggest that you install it and see whether the memory usage decreases.
On a side note, try to use the ird command-line tool - you feed it one pair of images at time and you are unlikely to worry about memory issues. It supports .mat format, so you can use your float-number images.
I have an array of images of size 1010x1010. I would like to register all of the images in this array onto the first image. When I run the following code my 8GB of memory gets full:
Do you have any idea what could be the problem?
Thanks!
Edit: Images are float and the pixel values are not necessarily within 0-255 range.
The text was updated successfully, but these errors were encountered: