File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ Once the OS boots and you complete the initial setup you'll need to edit the ``/
60
60
# This needs to be at least 128M for the camera processing, if it's bigger you can just leave it as is.
61
61
gpu_mem=128
62
62
63
- And then reboot.
63
+ And then reboot.
64
64
65
65
Installing PyTorch and picamera2
66
66
-------------------------------
@@ -99,14 +99,14 @@ enough frames.
99
99
.. code :: python
100
100
101
101
from picamera2 import Picamera2
102
-
102
+
103
103
picam2 = Picamera2()
104
-
104
+
105
105
# print available sensor modes
106
106
print (picam2.sensor_modes)
107
-
107
+
108
108
config = picam2.create_still_configuration(main = {
109
- " size" : (224 , 224 ),
109
+ " size" : (224 , 224 ),
110
110
" format" : " BGR888" ,
111
111
}, display = " main" )
112
112
picam2.configure(config)
@@ -120,7 +120,7 @@ object that we can use with PyTorch.
120
120
121
121
# read frame
122
122
image = picam2.capture_image(" main" )
123
-
123
+
124
124
# show frame for testing
125
125
image.show()
126
126
@@ -237,7 +237,7 @@ We can now put all the pieces together and run it:
237
237
print (picam2.sensor_modes)
238
238
239
239
config = picam2.create_still_configuration(main = {
240
- " size" : (224 , 224 ),
240
+ " size" : (224 , 224 ),
241
241
" format" : " BGR888" ,
242
242
}, display = " main" )
243
243
picam2.configure(config)
You can’t perform that action at this time.
0 commit comments