Skip to content

Commit fc9f40e

Browse files
authored
Update tutorial01.md
1 parent 9858178 commit fc9f40e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/pages/tutorial01.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ PythonBridge needs to launch a Python virtual machine and establish a communicat
6565
PBApplication start.
6666
```
6767

68-
Starting the Python vm may take a few seconds in some cases. The python code we will execute is the following:
68+
Starting the Python Virtual Machine (VM) may take a few seconds in some cases. The python code we will execute is the following:
6969

7070
```Python
7171
import cv2
@@ -89,7 +89,7 @@ ref := '/Users/alexandrebergel/Desktop/iss.jpg'.
8989
img := PBCF sendAndWait: (#cv2 asP3GI => #imread callWith: (Array with: filename)).
9090
```
9191

92-
If you print (in Smalltalk), the variable `img` you should see `a ndarray (Proxy)`. OpenCV handle the picture as a numpy structure. Within Smalltalk, we only see a proxy as the image is living within the Python World. Note that we are using the `sendAndWait:` instruction as we wait for the completion of the Python import.
92+
If you print (in Smalltalk), the variable `img` you should see `a ndarray (Proxy)`. OpenCV handles the picture as a numpy structure. Within Smalltalk, we only see a proxy since the image is living within the Python World. Note that we are using the `sendAndWait:` instruction as we wait for the completion of the Python import.
9393

9494
We can now open the image using:
9595

@@ -106,7 +106,7 @@ We can now close the Python connection:
106106
PBApplication stop.
107107
```
108108

109-
In theory, there should not be a need to shutdown the Python VM, however, due to a limitation of OpenCV in the way it handles the windows, it is simpler to do so.
109+
In theory, we should not need to shutdown the Python VM, however, due to a limitation of OpenCV in the way it handles the windows, it is simpler to do so.
110110

111111
## Applying transformation to an image
112112

@@ -130,7 +130,7 @@ PBApplication stop.
130130

131131
## Turning your script into an application
132132

133-
Obviously, you do not wish to directly face the Python scripting instruction. You can easily turn the script into a small class, titled `ImageViewer`:
133+
Obviously, you do not wish to directly face the Python scripting instruction. You can easily turn the script into a small class, titled `ImageViewer`, to completely hide the Python instructions:
134134

135135
```Smalltalk
136136
Object subclass: #ImageViewer
@@ -156,9 +156,9 @@ ImageViewer>>show
156156
PBCF send: (#cv2 asP3GI => #imshow callWith: (Array with: 'image' with: img)).
157157
PBCF send: (#cv2 asP3GI => #waitKey callWith: (Array with: 0)).
158158
PBCF send: (#cv2 asP3GI => #destroyAllWindows callWith: (Array new)).
159-
```
159+
```
160160

161-
And to close the image:
161+
And to close the image:
162162
```Smalltalk
163163
ImageViewer>>delete
164164
PBApplication stop

0 commit comments

Comments
 (0)