Julian Stirling
72faba0272
Fix issues found by linter in PiCamera Code
...
Issue #423 created based on lens shading TODOs
2025-06-23 12:39:25 +01:00
Julian Stirling
0e3f4305b5
Tidy post refactor of cameras
2025-06-23 11:26:24 +01:00
Julian Stirling
4368dc3d90
Consolidate functionality into BaseCamera from Capture Thing and StreamingPicamera2
2025-06-23 11:26:22 +01:00
Julian Stirling
b5606984ae
Consolidate the BaseCamera, CameraStub, and CameraProtocol, move StreamingPiCamera2 to this repo
2025-06-23 11:25:49 +01:00
jaknapper
7052917ff9
capture_image in stub raises NotImplemented
2025-06-23 11:25:49 +01:00
jaknapper
8c8c6568c3
Updated docstring for start_streaming
2025-06-23 11:25:49 +01:00
jaknapper
2d946637eb
Added buffer_count as an argument of streaming
2025-06-23 11:25:48 +01:00
jaknapper
968bd339c2
SETTLING_TIME global in stacking
2025-06-23 11:25:37 +01:00
jaknapper
744ec28f93
Get images as a PIL image from camera, use resizing and saving as settling time in stack
2025-06-23 11:19:20 +01:00
jaknapper
9f2a131f1e
Swap stream for scan, target_resolution as arg
2025-06-23 11:17:46 +01:00
jaknapper
f5c1ff2621
Ruff formating
2025-06-23 11:17:46 +01:00
jaknapper
17f3bbe646
Low res stream during scanning for instant high res captures
2025-06-23 11:17:46 +01:00
jaknapper
a9fdd0ea3e
Wait params in captures, multiple attempts to capture
2025-06-23 11:17:46 +01:00
jaknapper
8bc0573ab1
Capture_array can now use "full" stream
2025-06-23 11:17:46 +01:00
jaknapper
9d1385231d
Rename jpeg_array to highres_array
2025-06-23 11:17:46 +01:00
jaknapper
26163dc97e
Added a new way to capture full res JPEGs, need to do a comparison of results
2025-06-23 11:17:45 +01:00
Julian Stirling
3f0564f253
Turning on more lint checkers, warning for cameras that ignore resolution setting
2025-06-10 16:07:48 +01:00
Joe Knapper
08d1371569
Apply 1 suggestion(s) to 1 file(s)
...
Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
2025-06-06 10:25:34 +00:00
Joe Knapper
69db7b4041
Apply 2 suggestion(s) to 1 file(s)
...
Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
2025-06-05 17:09:37 +00:00
Joe Knapper
41f6c8879a
RATIO as a global, better naming and splitting of generate_image()
2025-06-05 15:03:26 +01:00
Joe Knapper
2db895a1fc
Defocus and realign simulation axes
2025-06-05 12:09:01 +01:00
jaknapper
a4801ad861
Update camera thing to match upstream
2025-05-07 19:52:21 +01:00
Julian Stirling
4eeff35e2d
Fixes to naming to make basic lint checks pass
2025-04-11 12:29:14 +01:00
Richard Bowman
9fd8fc37f1
Formatted with Ruff
2024-12-03 06:46:08 +00:00
Richard Bowman
57177c6a56
Sped up camera and got CSM passing
...
Using lower resolution helps speed it up, and skipping CSM settling time makes a big difference.
2024-12-03 06:35:16 +00:00
Richard Bowman
bccb1ee923
Stub class for camera protocol
...
As with the previous commit, this adds a concrete stub Thing to enable
DirectThingClient generation, so we
can depend on the camera.
2024-11-29 12:53:42 +00:00
Richard Bowman
a0fbbc3e40
Convert Stage to a Protocol
...
The Stage is now implemented as a runtime-checkable Protocol.
Part of this led to the realisation that we can't create a DirectThingClient
based on a Protocol, only on a concrete Thing. While it might be
a good idea to address that in LabThings in due course, for now
we work around it by creating both a Protocol and a stub class. The stub class implements the protocol, and
can be used to declare a dependency.
2024-11-29 12:53:04 +00:00
Richard Bowman
2e2e877d75
JPEGBlob class definition
...
Static type checking is easier if JPEGBlob is declared as a class, rather than
being created with a function.
2024-11-29 12:19:05 +00:00
Richard Bowman
adbb805556
Formal Protocol for camera interface
...
I've now split the base camera code into a runtime-checkable Protocol
and a concrete base class (which is optional). This removes the requirement
for cameras to subclass `openflexure_microscope.things.camera.Camera`
and instead uses duck typing that should
work both statically and dynamically.
As part of this, I've moved the commonly-used dependencies
on the camera inside `openflexure_microscope.things.camera` for consistency, and to make it easy to update them if it changes in the future.
2024-11-29 11:26:38 +00:00
Richard Bowman
1ba799de22
Migrate to new Blob type and update imports
...
This now uses the latest version of labthings-fastapi.
2024-11-28 17:35:56 +00:00
Richard Bowman
868aa0598c
Simulation mode
...
I successfully calibrated and used the camera-stage mapping.
2024-11-02 00:10:25 +00:00
Richard Bowman
2019234ad1
Close OpenCV camera cleanly
2024-08-09 02:50:39 +01:00
Richard Bowman
2268425bf3
Depend only on generic Camera and Stage
...
I've now defined parent classes for camera and stage, and depend only on those. This allows
proper typing while enabling the actual hardware
classes to be swapped.
The interfaces definitely aren't final - this is a first
draft, largely to enable me to test out the concept
of a configuration server.
2024-08-09 02:41:39 +01:00