Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
Add Lepton 3.0 support (need to be calibrated manually)
Add point temperature display
Add camera temperature display
  • Loading branch information
CitrusC committed Jun 8, 2020
1 parent 0fc7e29 commit a08dd43
Show file tree
Hide file tree
Showing 10 changed files with 300 additions and 200 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 0 additions & 37 deletions logo.spec

This file was deleted.

Binary file modified src/__pycache__/lepton_control.cpython-37.pyc
Binary file not shown.
Binary file modified src/__pycache__/viewer.cpython-37.pyc
Binary file not shown.
11 changes: 8 additions & 3 deletions src/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ rotate = 0

[TONE MAPPING]
auto = True
speed = 0.05
speed = 0.04
black_point = 0
white_point = 0
manual_min = 20
manual_max = 40

[THERSHOLD]
temputure = 37.5
temperature = 37.5
warning_sign = True
display_temputure = True
display_temperature = True
display_camera_temperature = True

[CALIBRATION]
offset = 0
coefficient = 0.05

12 changes: 9 additions & 3 deletions src/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ rotate = 0

[TONE MAPPING]
auto = True
speed = 0.05
speed = 0.04
black_point = 0
white_point = 0
manual_min = 20
manual_max = 40

[THERSHOLD]
temputure = 37.5
temperature = 37.5
warning_sign = True
display_temputure = True
display_temperature = True
display_camera_temperature = True

[CALIBRATION]
offset = 0
coefficient = 0.05

20 changes: 9 additions & 11 deletions src/lepton_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
clr.AddReference("ManagedIR16Filters")
from Lepton import CCI
from IR16Filters import IR16Capture, NewIR16FrameEvent, NewBytesFrameEvent
# from matplotlib import pyplot as plt
# from matplotlib import cm
import numpy as np
import time
from collections import deque
Expand Down Expand Up @@ -35,11 +33,16 @@ def __init__(self):
# lep.sys.SetGainMode(CCI.Sys.GainMode.LOW)
# lep.vid.SetPcolorLut(3)

# print(self.lep.sys.GetFpaTemperatureKelvin())


try:
self.lep.rad.SetTLinearEnableStateChecked(True)
print("This lepton supports tlinear")
self.tlinear = True
except:
print("This lepton does not support tlinear")
self.tlinear = False

# Start streaming
self.capture = None
Expand All @@ -60,6 +63,10 @@ def update_frame(self):
arr = self.short_array_to_numpy(height, width, net_array)
return arr

def camera_temp(self):
return self.lep.sys.GetFpaTemperatureKelvin()


def stop_streaming(self):
print("Stop streaming")
self.capture.StopGraph()
Expand All @@ -68,15 +75,6 @@ def stop_streaming(self):
def __got_a_frame(self, short_array, width, height):
self.incoming_frames.append((height, width, short_array))


@staticmethod
def short_array_to_numpy(height, width, frame):
return np.fromiter(frame, dtype="uint16").reshape(height, width)



# while True:


if __name__ == "__main__":
pass
Loading

0 comments on commit a08dd43

Please sign in to comment.