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

Question: How does wait-images work? #56

Open
LGimmick opened this issue Dec 3, 2024 · 6 comments
Open

Question: How does wait-images work? #56

LGimmick opened this issue Dec 3, 2024 · 6 comments

Comments

@LGimmick
Copy link

LGimmick commented Dec 3, 2024

Hi,

I tried to use --wait-images=5.0 for testing, but the application closes after merging the two initial images, regardless if I add images to the folder after a second or not. Do I have to use a specific directory? What am I doing wrong here?

@PetteriAimonen
Copy link
Owner

You should give the names of all of the images on the command line, even if the files do not exist yet. The program will then wait for the the files to appear.

@LGimmick
Copy link
Author

LGimmick commented Dec 3, 2024

Thank you for the response.

You sure about that? 😄
I think I saw a verbose output, that contained the name of my output-image "out.jpg" as "aligned_out.jpg" eventhough all my input-images are bmp and numbered.

@PetteriAimonen
Copy link
Owner

There are some internal temporary file names that are not saved unless --save-steps is given.

@LGimmick
Copy link
Author

LGimmick commented Dec 5, 2024

Hmm ok.
I still don't get it to work.

For testing I set --wait-images=50.0 and add 50 images-paths as files. And start the application after the first image is saved to a file. My expected behavior is, that the application (no matter what "waiting" exactly means) runs more or less 50s, if not all images are going to be created.
But the first two images will always be used for calculation and the application closes.

My thought is:
I created some sort of processing-pipeline for new images, therefore I have to wait a few images to create the mean-time it takes to save new images and set the wait-timer accordingly.

@PetteriAimonen
Copy link
Owner

Can you attach a verbose log and the command line used?
For me it seems to work:

$ focus-stack --verbose --wait-images=5.0 test.jpg test2.jpg test3.jpg
OpenCL not available
 0.001 [  1/  2] T12 Starting task: Load test2.jpg
 0.007 [  2/  7] T6 Starting task: Load test.jpg
test2.jpg has resolution 2048x1536, using 8 wavelet levels and expanding to 2048x1536
 0.024           T12 Finished task 1 in 0.023 s.
 0.024 [  3/ 21] T4 Starting task: Grayscale test2.jpg
Using grayscale weights R:0.351, G:0.337, B:0.312
 0.037           T4 Finished task 3 in 0.013 s.
 0.037 [  4/ 21] T1 Starting task: Align test2.jpg to test2.jpg
aligned_test2.jpg transformed corners TL (0.0,0.0), TR (2048.0,0.0), BL (0.0,1536.0), BR (2048.0,1536.0)
aligned_test2.jpg valid area X 0, Y 0, W 2048, H 1536
 0.037 [  5/ 21] T2 Starting task: Grayscale aligned_test2.jpg
 0.037           T1 Finished task 4 in 0.000 s.
test.jpg has resolution 2048x1536, using 8 wavelet levels and expanding to 2048x1536
 0.042           T6 Finished task 2 in 0.035 s.
 0.042 [  6/ 21] T1 Starting task: Grayscale test.jpg
 0.048           T2 Finished task 5 in 0.011 s.
 0.048 [  7/ 21] T7 Starting task: Forward-wavelet aligned_test2.jpg
 0.055           T1 Finished task 6 in 0.013 s.
 0.055 [  8/ 21] T6 Starting task: Align test.jpg to test2.jpg
aligned_test.jpg transform: [1.000 0.000 -0.000; -0.000 1.000 0.000]
aligned_test.jpg contrast map: C:1.000, X:0.000, X2:0.000, Y:0.000, Y2:0.000
aligned_test.jpg whitebalance: R:x1.000+0.0, G:x1.000+0.0, B:x1.000+0.0
aligned_test.jpg transformed corners TL (-0.0,0.0), TR (2048.0,0.0), BL (0.0,1536.0), BR (2048.0,1536.0)
aligned_test.jpg valid area X 1, Y 1, W 2047, H 1535
 0.824           T6 Finished task 8 in 0.769 s.
 0.824 [  9/ 21] T10 Starting task: Grayscale aligned_test.jpg
 0.834           T10 Finished task 9 in 0.010 s.
 0.834 [ 10/ 21] T8 Starting task: Forward-wavelet aligned_test.jpg
 1.078           T7 Finished task 7 in 1.030 s.
 1.816           T8 Finished task 10 in 0.982 s.
 1.816 [ 10/ 21] T2 Waiting for task to become runnable: Load test3.jpg
 5.018 [ 11/ 21] T11 Starting task: Load test3.jpg


Task Load test3.jpg on thread 11 failed with exception:
Could not load test3.jpg

@LGimmick
Copy link
Author

LGimmick commented Dec 5, 2024

Thank you! I found a problem on my side within the pipeline 👍

It runs now, but if not all images are available it exits with "Error exit due to failed steps". Do all images have to be created?

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