WIP: implement middle click to focus
Add a feature to middle click on the stream to focus on a specific part of the image.
The auto focus often seems to not focus on to the part I am interested in, by specifying an area to focus it can make sure the interest area is in focus, and the processing is much faster because the image to process is much smaller.
I have also changed the capturing method from capture
to capture_continuous
which should help with the speed.
It seems to do what I expected but I am not entirely sure I got the math for the click or the cropping right.
I am still working on it, maybe implement a hill climbing algorithm to make the search smarter?
A note about the dev setup:
I am writing the code directly on the Pi, and I was following https://gitlab.com/openflexure/openflexure-microscope-server#installation, but the poetry install
step doesn't work(some permission error with certifi). I run ofm develop
instead and it works.
Also, is there a dev server commend so the change automatically reload? Now I am just running poetry run build_static
and then sudo ofm serve
after each change.