Skip to content

Commit a2b5a09

Browse files
committed
Fix syntax bug in take_image.py
1 parent 2092ea3 commit a2b5a09

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed
2 MB
Loading
1.89 MB
Loading
1.61 MB
Loading
1.91 MB
Loading
1.86 MB
Loading
1.51 MB
Loading
1.55 MB
Loading

RPi4/home/ucia/UCIA/UCIA_ObjectDetection/take_image.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
n = 1
1616
rep = input("numéro image pour démarrer [Q:quit] ? ")
1717

18-
if rep.lower() == 'q'
19-
picam2.stop()
20-
sys.exit()
18+
if rep.lower() == 'q':
19+
picam2.stop()
20+
sys.exit()
2121
else:
22-
n = int(rep)
22+
n = int(rep)
2323

2424
while True:
25-
rep = input("ENTER -> image suivante [Q:quit] ...")
26-
if rep.lower() == 'q':
27-
break
25+
rep = input(f"ENTER -> image suivante {n:03d} [Q:quit] ...")
26+
if rep.lower() == 'q':
27+
break
2828

29-
picam2.capture_file(f"objets3D-{n:03d}.jpg")
30-
time.sleep(1)
31-
n += 1
29+
picam2.capture_file(f"objets3D-{n:03d}.jpg")
30+
time.sleep(1)
31+
n += 1
3232

3333
picam2.stop()

0 commit comments

Comments
 (0)