Finish Homework - #9
Open
SwimmingPig wants to merge 1 commit into
Open
Conversation
gabyvon725
reviewed
Mar 17, 2018
| 2. set the `path` to your input | ||
| ''' | ||
| with Video(...) as v: | ||
| with Video('/Users/AndyChu/Desktop/2018-Python-Practice/2018-Python-Practice-master/input/jaguar.mp4') as v: |
Owner
There was a problem hiding this comment.
Line 45 路徑也可以使用相對路徑
e.g. 'input/jagauar.mp4' 或 './input/jagauar.mp4'
如果程式在不同環境或是交給其他人使用時,路徑也許就不用修改了
gabyvon725
reviewed
Mar 17, 2018
| return ... # return your results | ||
| success,image = self.cap.read() | ||
| count = 0 | ||
| success = True |
Owner
There was a problem hiding this comment.
Line 33 self.cap.read()本身回傳值,第一個參數是True/False,代表有沒有讀到圖片,第二個參數代表當前截取一幀的圖片。這邊如果有讀到,success會回傳True,所以不必在 Line 35 將它再次賦值為True
gabyvon725
reviewed
Mar 17, 2018
| count = 0 | ||
| success = True | ||
| while success: | ||
| image2 = cv2.resize(image, (image_h, image_w)) |
Owner
There was a problem hiding this comment.
Line37 這邊希望使用的是 utils.py 裡的 resize()。可以看下 utils.py 的版本有對這份應用做一些特殊處理(擷取中心位置之後才 resize)所以跟直接 cv2.resize 結果可能有些出入
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.