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

Hope to get the project file to generate DLL, #52

Open
zhaohuitao-123 opened this issue Aug 22, 2024 · 11 comments
Open

Hope to get the project file to generate DLL, #52

zhaohuitao-123 opened this issue Aug 22, 2024 · 11 comments

Comments

@zhaohuitao-123
Copy link

sorry,I Hope to get the project file to generate DLL,But now only as a console program。

@PetteriAimonen
Copy link
Owner

You may want to wrap it in C API for best ABI compatibility.
But other than that, compiling focus-stack to DLL is no different than compiling any other C++ program to DLL.

@zhaohuitao-123
Copy link
Author

thank you for your reply, I'm a newcomer. In windwos 10 ,I had nmake the project。 but it was .exe after nmake

@PetteriAimonen
Copy link
Owner

Yes, the premade build rules do not make a DLL. You'll have to write your own.

@zhaohuitao-123
Copy link
Author

thanks。Dll can be used。 A new challenge, focusing on 2 images (500M pixels, taken by a microscope) took almost 1 second, it is too long. I want to optimize to less than 10ms. Do you have a better suggestion

@PetteriAimonen
Copy link
Owner

You probably won't get it that fast, at least not with this algorithm.

Verify that you have OpenCL support working for your graphics card, that helps a little. But those images are large and will take time to process.

Focus-stack parallelism is currently only image level, so with only 2 input images you are using at most 2 CPU cores. Using the C++ API you can add new images while previous ones are being processed. Make sure to add the images through memory buffers (FocusStack::add_image(const cv::Mat &image)) to avoid spending time loading them from drive.

@zhaohuitao-123
Copy link
Author

I had loading them from memory。
if the image provided had corrected and aligned,
only merge those by Focus-stack, so how long it will takes you think?
and after this, feature level fusion and pixel level fusion which one you think faster?

@zhaohuitao-123
Copy link
Author

and I plan to replace opencv library,maybe faster

@PetteriAimonen
Copy link
Owner

You can see individual step timings in the verbose log.

But overall, your 10 ms target with 500 Mpixel images sounds like something that can only be achieved by highly optimized and specialized algorithm running on a powerful GPU.

@zhaohuitao-123
Copy link
Author

I apologize for bothering you again. Due to some reasons, I need to modify the waveform of wavelet transform. In the file "task_wavelet_templates.hh", "c_lospass" & "c_hipass", I searched articles about Daubechies Wavelet, but couldn't find the source of your data. Could you please tell me?

@zhaohuitao-123
Copy link
Author

I apologize for bothering you again. Due to some reasons, I need to modify the waveform of wavelet transform. In the file "task_wavelet_templates.hh", "c_lospass" & "c_hipass", I searched articles about Daubechies Wavelet, but couldn't find the source of your data. Could you please tell me?

@PetteriAimonen
Copy link
Owner

"Image Processing with Complex Daubechies Wavelets", J.M. Lina, 1997
or equivalently:
"Complex Daubechies Wavelets: Filters Design and Applications", J.-M. Lina, 1997

The latter is available from https://www.researchgate.net/publication/2745198_Complex_Daubechies_Wavelets_Filters_Design_and_Applications

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