Formatting fixes
This commit is contained in:
parent
300d6878bb
commit
1cea75be70
4 changed files with 31 additions and 32 deletions
|
|
@ -218,6 +218,7 @@ def cleanup():
|
|||
|
||||
atexit.register(cleanup)
|
||||
|
||||
|
||||
def ofm_serve():
|
||||
# Start a debug server
|
||||
from labthings import Server
|
||||
|
|
@ -226,6 +227,7 @@ def ofm_serve():
|
|||
server: Server = Server(app)
|
||||
server.run(host="0.0.0.0", port=5000, debug=debug_app, zeroconf=True)
|
||||
|
||||
|
||||
# Start the app if the module is run directly
|
||||
if __name__ == "__main__":
|
||||
ofm_serve()
|
||||
|
|
|
|||
|
|
@ -140,10 +140,7 @@ def sharpness_edge(image: np.ndarray) -> float:
|
|||
n: int = 20
|
||||
edge: np.ndarray = np.array([[-1] * n + [1] * n])
|
||||
return float(
|
||||
np.sum(
|
||||
[np.sum(ndimage.filters.convolve(gray, W) ** 2)
|
||||
for W in [edge, edge.T]]
|
||||
)
|
||||
np.sum([np.sum(ndimage.filters.convolve(gray, W) ** 2) for W in [edge, edge.T]])
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue