Skip to content

Commit 3eba9a0

Browse files
authored
Update focus_camera_script.py
1 parent 751f11b commit 3eba9a0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

production/focus_camera_script.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -661,12 +661,12 @@ def receive_data(data):
661661
global fps
662662

663663
if len(data) == 1:
664-
with open("focus_image.jpg", "wb") as f:
664+
with open("focus_image.temp.jpg", "wb") as f:
665665
f.write(header + image_buffer)
666666
image_buffer = b""
667667

668668
### Remove if not using InnoWave IP
669-
image = plt.imread("focus_image.jpg")
669+
image = plt.imread("focus_image.temp.jpg")
670670
image = bt601_reverse(image, get_max_pixel(image.dtype))
671671

672672
_, _, _, _, _, _, _, image_overlay = get_sfr_score(
@@ -679,7 +679,7 @@ def receive_data(data):
679679
edge_size_threshold=75, # in pixels
680680
)
681681

682-
plt.imsave("focus_image.jpg", image_overlay)
682+
plt.imsave("focus_image.png", image_overlay)
683683
###
684684

685685
return
@@ -702,7 +702,8 @@ async def main():
702702
local state_time = 0
703703
704704
frame.camera.set_gain(0)
705-
frame.camera.set_shutter(600)
705+
frame.camera.set_shutter(550)
706+
frame.camera.set_white_balance(255, 255, 255)
706707
707708
while true do
708709
if state == 'CAPTURE' then

0 commit comments

Comments
 (0)