aarju gupta
2018-10-19 03:46:31 UTC
sir conda is best,and i am using it happily,but there is one problem
arising,i am installing cv2 with conda,for image display it working but
videos it is not working, i installed cv2 videos package by conda but
still it is not reading the frame.
i am trying to solve this problem for 20 days,but nothing happen,please
give me solution of this problem,
import numpy as np
import cv2
print("hello")
cap = cv2.VideoCapture("/home/deepai/gauravs/test001.mp4")
print(cap)
print(cap.isOpened())
while(cap.isOpened()): # check !
# capture frame-by-frame
ret, frame = cap.read()
if ret: # check ! (some webcam's need a "warmup")
# our operation on frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('frame', gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything is done release the capture
cap.release()
cv2.destroyAllWindows()
output:<VideoCapture 0x7f238c1101d0>
False
i installed opencv using conda
conda install -c conda-forge opencv
above command
please sir help me.
Thank You.
arising,i am installing cv2 with conda,for image display it working but
videos it is not working, i installed cv2 videos package by conda but
still it is not reading the frame.
i am trying to solve this problem for 20 days,but nothing happen,please
give me solution of this problem,
import numpy as np
import cv2
print("hello")
cap = cv2.VideoCapture("/home/deepai/gauravs/test001.mp4")
print(cap)
print(cap.isOpened())
while(cap.isOpened()): # check !
# capture frame-by-frame
ret, frame = cap.read()
if ret: # check ! (some webcam's need a "warmup")
# our operation on frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('frame', gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything is done release the capture
cap.release()
cv2.destroyAllWindows()
output:<VideoCapture 0x7f238c1101d0>
False
i installed opencv using conda
conda install -c conda-forge opencv
above command
please sir help me.
Thank You.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/cc87859a-dacc-49bc-8973-20d3a2538d8c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/cc87859a-dacc-49bc-8973-20d3a2538d8c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.