Skip to content

Commit

Permalink
Added grayscale reading in ModalAI
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirbala committed Feb 6, 2024
1 parent 0eee67e commit 3ad7a5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion onboard/python/implementation/drones/ModalAISeekerDrone.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,11 @@ def __init__(self, drone, ip):
def run(self):
try:
while(self.isRunning):
ret, self.currentFrame = self.cap.read()
ret, frame = self.cap.read()
if len(frame.shape) < 3: # Grayscale
self.currentFrame = cv2.cvtColor(frame, cv2.COLOR_GRAY2BGR)
else:
self.currentFrame = frame
except Exception as e:
print(e)

Expand Down

0 comments on commit 3ad7a5e

Please sign in to comment.