Skip to content
Snippets Groups Projects
Commit 1902fd1c authored by Leo Sutevski's avatar Leo Sutevski
Browse files

.

parent 42d3022b
No related branches found
No related tags found
No related merge requests found
......@@ -212,8 +212,15 @@ class MemoryFrame:
#t = time.time()
arr = self._readFrame()
roi = (slice(100, -100), slice(100, -100))
arr = arr.astype(float)
arr = (arr * 255 / np.max(arr)).astype(np.uint8)
_min, _max = arr[roi].min(), arr[roi].max()
arr = ((arr - _min) / (_max - _min)) * 255
arr = np.clip(arr, a_min=0, a_max=255).astype(np.uint8)
#arr = arr.astype(float)
#arr = (arr * 255 / np.max(arr)).astype(np.uint8)
#arr = (self._readFrame()*255//1023).astype(np.uint8)
#t1 = time.time()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment