PetteriAimonen / focus-stack

Fast and easy focus stacking
MIT License
294 stars 43 forks source link

Program keeps getting killed #30

Closed raduprv closed 2 years ago

raduprv commented 2 years ago

Hello, I am trying to use focus-stack on a 8GB RAM Mint Linux machine, and the program keeps getting killed. No information on why it gets killed. If I use --full-resolution-align then it is guaranteed to get killed, even though I am using 16MB images. Setting the batch size to 4 helps (won't get killed if not using --full-resolution-align). Any idea what could be wrong?

Thanks, Radu

Version: focus-stack 1.0, git version 1.3-16-g837c324, built Aug 29 2022 15:16:59 Compiled with OpenCV version 4.2.0

PetteriAimonen commented 2 years ago

Sounds like you are running out of RAM. With the default settings, about 100 MB of RAM is needed per every megapixel of input image resolution. Reducing --threads and --batchsize reduces memory usage. And other applications take RAM too, so you can check how much you have free to start with by running free -h.

raduprv commented 2 years ago

I have about 6.5gb of free RAM. Would it be possible to autodetect the free ram and auto adjust the batch size and everything else to match it?