Skip to content

Commit

Permalink
Fix image format
Browse files Browse the repository at this point in the history
  • Loading branch information
xeonqq committed Mar 27, 2024
1 parent e13f0c8 commit 4d33406
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,17 @@ def main():
camera = Picamera2()

main_stream = {"size": camera_info.resolution}
lores_stream = {"size": inference_config.inference_resolution, "format": "RGB888"}
lores_stream = {"size": inference_config.inference_resolution, "format": "BGR888"}
video_config = camera.create_video_configuration(main_stream, lores_stream, encode="main")
camera.configure(video_config)
fps = 20.0
camera.set_controls({"FrameRate": fps, "ExposureTime": 20000})

#metadata = camera.capture_metadata()

#print("here 4")
#framerate = 1000000 / metadata["FrameDuration"]
#print("here 5")

#logging.debug("configure camera done, fps: {}".format(framerate))


#camera.framerate = 20
#camera.exposure_mode = "sports"

led_pin = 10
led = Led()
Expand All @@ -142,7 +136,7 @@ def main():
from tflite_runtime.interpreter import Interpreter as make_interpreter
pass
else:
#from pycoral.utils.edgetpu import make_interpreter
from pycoral.utils.edgetpu import make_interpreter
pass

try:
Expand Down

0 comments on commit 4d33406

Please sign in to comment.