Skip to content

Commit d72ddc8

Browse files
committed
Merge pull request opencv#8787 from mshabunin:pr7241
2 parents 9ea2f52 + 4ac5f37 commit d72ddc8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

doc/py_tutorials/py_gui/py_image_display/py_image_display.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ img = cv2.imread('messi5.jpg',0)
3636

3737
**warning**
3838

39-
Even if the image path is wrong, it won't throw any error, but print img will give you None
39+
Even if the image path is wrong, it won't throw any error, but `print img` will give you `None`
4040

4141
### Display an image
4242

@@ -109,8 +109,8 @@ elif k == ord('s'): # wait for 's' key to save and exit
109109

110110
**warning**
111111

112-
If you are using a 64-bit machine, you will have to modify k = cv2.waitKey(0) line as follows :
113-
k = cv2.waitKey(0) & 0xFF
112+
If you are using a 64-bit machine, you will have to modify `k = cv2.waitKey(0)` line as follows :
113+
`k = cv2.waitKey(0) & 0xFF`
114114

115115
Using Matplotlib
116116
----------------

doc/py_tutorials/py_gui/py_video_display/py_video_display.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ while(True):
4242
cap.release()
4343
cv2.destroyAllWindows()
4444
@endcode
45-
cap.read() returns a bool (True/False). If frame is read correctly, it will be True. So you can
45+
`cap.read()` returns a bool (`True`/`False`). If frame is read correctly, it will be `True`. So you can
4646
check end of the video by checking this return value.
4747

4848
Sometimes, cap may not have initialized the capture. In that case, this code shows error. You can
49-
check whether it is initialized or not by the method **cap.isOpened()**. If it is True, OK.
49+
check whether it is initialized or not by the method **cap.isOpened()**. If it is `True`, OK.
5050
Otherwise open it using **cap.open()**.
5151

5252
You can also access some of the features of this video using **cap.get(propId)** method where propId
@@ -55,9 +55,9 @@ video) and full details can be seen here: cv::VideoCapture::get() .
5555
Some of these values can be modified using **cap.set(propId, value)**. Value is the new value you
5656
want.
5757

58-
For example, I can check the frame width and height by cap.get(3) and cap.get(4). It gives me
59-
640x480 by default. But I want to modify it to 320x240. Just use ret = cap.set(3,320) and
60-
ret = cap.set(4,240).
58+
For example, I can check the frame width and height by `cap.get(cv2.CAP_PROP_FRAME_WIDTH)` and `cap.get(cv2.CAP_PROP_FRAME_HEIGHT)`. It gives me
59+
640x480 by default. But I want to modify it to 320x240. Just use `ret = cap.set(cv2.CAP_PROP_FRAME_WIDTH,320)` and
60+
`ret = cap.set(cv2.CAP_PROP_FRAME_HEIGHT,240)`.
6161

6262
@note If you are getting error, make sure camera is working fine using any other camera application
6363
(like Cheese in Linux).
@@ -100,7 +100,7 @@ very simple, just use cv2.imwrite(). Here a little more work is required.
100100
This time we create a **VideoWriter** object. We should specify the output file name (eg:
101101
output.avi). Then we should specify the **FourCC** code (details in next paragraph). Then number of
102102
frames per second (fps) and frame size should be passed. And last one is **isColor** flag. If it is
103-
True, encoder expect color frame, otherwise it works with grayscale frame.
103+
`True`, encoder expect color frame, otherwise it works with grayscale frame.
104104

105105
[FourCC](http://en.wikipedia.org/wiki/FourCC) is a 4-byte code used to specify the video codec. The
106106
list of available codes can be found in [fourcc.org](http://www.fourcc.org/codecs.php). It is

0 commit comments

Comments
 (0)