Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterations do not converge #38

Open
scholzri opened this issue May 22, 2023 · 1 comment
Open

Iterations do not converge #38

scholzri opened this issue May 22, 2023 · 1 comment

Comments

@scholzri
Copy link

Hi,
first of all, thank you for this great piece of software!
It works good for most of my fluorescence microscopy images, but in some cases it fails to align the images of my z-stack properly. For example:

dataset:
https://we.tl/t-q8NR38KeS1

command:
focus-stack image*.tif --output=projection.tif --no-whitebalance --no-contrast --denoise=0 --consistency=0 --batchsize=8 --align-keep-size --full-resolution-align

error:

Task Align image1.tif to image10.tif on thread 23 failed with exception:
OpenCV(4.2.0) ../modules/video/src/ecc.cpp:572: error: (-7:Iterations do not converge) The algorithm stopped before its convergence. The correlation is going to be minimized. Images may be uncorrelated or non-overlapped in function 'findTransformECC'

Do you have an idea what the cause of the problem could be?

Thanks!

@PetteriAimonen
Copy link
Owner

It appears that the files are stored as 16-bit TIFF, but the values in the files are only 8-bit. This causes the files to appear almost completely black when opened in e.g. GIMP.

Focus-stack doesn't currently support 16-bit processing (issue #34), so it converts the files to 8-bit mapping 65535->255, which causes black images. The processing then fails because there is no information in the images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants