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

Flir camera adaptor #172

Merged
merged 30 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e3b9ed3
Adding directory for flir camera adapter
aduran-cz Jun 12, 2023
82fe142
Adding snap() and multiple() methods to get a single and multiple ima…
aduran-cz Jun 15, 2023
aae2cdc
adding demo
aduran-cz Jun 16, 2023
2d98189
correcting demo
aduran-cz Jun 16, 2023
016327e
implementing decorators as exception handlers
aduran-cz Jun 20, 2023
77bbb93
adding gain methods
aduran-cz Jun 21, 2023
01d259d
initialize camera as a class attribute, make all methods member metho…
aduran-cz Jun 22, 2023
4adbe47
removing decorators as exception handlers
aduran-cz Jun 22, 2023
8fdcf60
add instance attributes as properties. Add close() method to close th…
aduran-cz Jun 23, 2023
8b03208
fixed camera initialization bugs for exposure settings
aduran-cz Jun 25, 2023
6b7fb4c
fixed camera initialization bugs for exposure settings
aduran-cz Jun 25, 2023
571ecdd
demos for exposure, gain, framerate methods
aduran-cz Jun 25, 2023
83193ba
correct gain, frame rate demos
aduran-cz Jun 25, 2023
11a2e53
add method placeholders. add list_available_cameras
aduran-cz Jun 25, 2023
6a423cb
add method placeholders. add list_available_cameras
aduran-cz Jun 25, 2023
938039f
correct frame rate demos
aduran-cz Jun 25, 2023
1834351
adding open() and close() methods. Manage camera pointer as an instan…
aduran-cz Jun 29, 2023
fdd7ea0
adding device_id, nodemap properties. deleting repetitive code
aduran-cz Jun 29, 2023
c190a96
adding image_size method and remaining placeholders
aduran-cz Jun 29, 2023
3cc7162
adding binning() method. adding errors to settings outside of limits
aduran-cz Jun 30, 2023
648ed5e
Fixing buffer initialization bug. Adding explicit option to take mult…
aduran-cz Jul 6, 2023
2678631
removing whitespace
aduran-cz Jul 6, 2023
0697db6
changing return type of image acquisition methods: return intensity a…
aduran-cz Jul 7, 2023
827a9c5
changing return type of image acquisition methods: return intensity a…
aduran-cz Jul 7, 2023
9cbc482
adding a new save() method. Completing docstrings and demo
aduran-cz Jul 8, 2023
670795b
adding assert statements, changing variable names
aduran-cz Jul 20, 2023
b2b84ab
change docstrings to numpy style. join run_single_camera() and snap()…
aduran-cz Jul 20, 2023
40ff215
fix method to save to png, tif with openCV
aduran-cz Jul 21, 2023
e471c4b
save images with skimage. remove todos
aduran-cz Jul 24, 2023
fed84eb
adding viewer and demo for implementing snap() in flir camera
aduran-cz Jul 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
60 changes: 60 additions & 0 deletions copylot/hardware/cameras/flir/demo/demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
from copylot.hardware.cameras.flir.flir_camera import FlirCamera

if __name__ == '__main__':
test = FlirCamera()
aduran-cz marked this conversation as resolved.
Show resolved Hide resolved

# open the system
test.open()

# Return 10 frames either taking multiple frames in a single acquisition period or iterating over snap().

# This is faster, and can control timeout for grabbing images from the camera buffer
test.snap(n_images=10, wait_time=1000)
# This is slower, but can introduce delays between beginning/ending camera acquisition
for i in range(0, 10):
test.snap()

# serial number
print(test.device_id)
# list of cameras
print(test.list_available_cameras())

# open again
test.open()

# Test bit depth
print('Default bit depth', test.bitdepth)
test.bitdepth = 3
print('Custom bitdepth', test.bitdepth)

# Test shutter mode
print('Default shutter mode', test.shutter_mode)
test.shutter_mode = 'rolling'
print('Custom shutter mode', test.shutter_mode)

# Test binning - THERE ARE SOME SPECIFIC MULTIPLES
print('Default binsize', test.binning)
test.binning = (2, 2)
print('Custom binsize', test.binning)

# Test image size
print('Default image size', test.image_size) # set to the max by default
print('Limit image size', test.image_size_limits)
test.image_size = (1000, 2000)
print('Custom image size', test.image_size)

# Test gain methods
print('Default AutoGain', test.gain, test.gain_limits)
aduran-cz marked this conversation as resolved.
Show resolved Hide resolved
test.gain = 0.8
print('Custom gain', test.gain)

# Test exposure methods
print('Default AutoExposure', test.exposure, test.exposure_limits)
test.exposure = 100.0
print('Custom exposure', test.exposure)
AhmetCanSolak marked this conversation as resolved.
Show resolved Hide resolved

# Test frame rate methods
print('Default frame rate', test.framerate)
# set method might be removed

test.close()
Loading