Closed crysta1c1ear closed 2 years ago
Compiling a library version makes sense. In fact, I recently developed a library version for a client, but for now they have preferred to keep that code private.
For C++ programs, the code can be compiled as a library very easily: just build all files except main.cc
and put them in a library. This only needs some build rules. The main focus-stack
program can remain as is, just build a .so
in addition. The library API is in focusstack.hh
.
For C programs and as an interface to other languages, some wrapper functions are needed. These could be something like focusstack_create()
to create a FocusStack
object, focusstack_add_image()
and focusstack_start()
. These would just call the methods of the FocusStack
object.
That's pretty much what I did. In addition I needed to avoid the reading and writing of files using filenames, as the software I am using creates the cv::Mat file from the microscope camera and creates its own output files in addition to displaying the result etc. It simply turns a vector of cv::Mats into a result cv::Mat.
Thanks for your feedback. You may want to close the issue.
Yeah, you can specify :memory:
as the output filename to avoid writing to files.
focus-stack library
I am a little reluctant to open this as an issue, since the software is working well, and anything that isn't working well here is probably as a result of me dabbling with it!
I have been focus stacking images from a microscope and it's useful to have the focus stacking done in the software, rather than export the images, focus stack them from the command line, and reimport the result.
For this reason, it's useful to split the focus stacking software into two parts:
I know the aim of the program is to be stand-alone.
branch?
Would it be worth having a branch which can create a focus-stack library? Note: This can be assigned to me. I'm not asking for anything! ;)
Example library files
Example request for focus-stacking on a microscope
Example focus stacking result (not uploaded)
A focus stacking result, with two of the pre-stacking images ... http://harmonica.hopto.org/WORK/Focus%20Stacking_Human_Hair_10x/