New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: self._video_height/width should be int, not float #1510

Merged
merged 1 commit into from Sep 10, 2017

Conversation

Projects
None yet
4 participants
@CRiddler
Contributor

CRiddler commented Sep 8, 2017

opencv returns self._video_stream.get(cv2.CAP_PROP_FRAME_WIDTH) (and height) as a float. This causes an error a few lines down in
self._numpy_frame = numpy.zeros((self._video_height, self._video_width, self._video_frame_depth), dtype=numpy.uint8)

By changing these variables to integers, this error does not occur.
See: #1509

BF: _video_height/width should be integers
opencv returns `self._video_stream.get(cv2.CAP_PROP_FRAME_WIDTH)` (and height) as a float. This causes an error a few lines down in
`self._numpy_frame = numpy.zeros((self._video_height, self._video_width, self._video_frame_depth),  dtype=numpy.uint8)`

By changing these variables to integers, this error does not occur.
@coveralls

This comment has been minimized.

coveralls commented Sep 8, 2017

Coverage Status

Coverage remained the same at 54.251% when pulling b0581c7 on CRiddler:master into 1a10a62 on psychopy:master.

@codecov-io

This comment has been minimized.

codecov-io commented Sep 8, 2017

Codecov Report

Merging #1510 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1510   +/-   ##
=======================================
  Coverage   49.82%   49.82%           
=======================================
  Files         249      249           
  Lines       39695    39695           
  Branches     6007     6007           
=======================================
  Hits        19780    19780           
  Misses      18163    18163           
  Partials     1752     1752
Impacted Files Coverage Δ
psychopy/visual/movie2.py 5.22% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a10a62...b0581c7. Read the comment docs.

@peircej peircej merged commit 0f67513 into psychopy:master Sep 10, 2017

2 checks passed

code-quality/landscape Code quality remained the same
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@peircej

This comment has been minimized.

Member

peircej commented Sep 10, 2017

Thanks for sorting that out. Looks like either OpenCV has changed in what it returns or numpy has gotten more strict. Forcing to int here is sensible regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment