Loading Video Source - OpenCV with Python for Image and Video Analysis 2

  Рет қаралды 410,075

sentdex

sentdex

Күн бұрын

Пікірлер: 622
@indiansoftwareengineer4899
@indiansoftwareengineer4899 6 жыл бұрын
Thanks, Sentdex, You saved my 10$ on udemy, and I need not buy any course on udemy for learning OpenCV. I also suggested this tutorial-series to my friends for their projects.
@Manja500
@Manja500 3 жыл бұрын
All the udemy courses on OpenCV suck. This guy does a way better job for free. I like your account avatar btw.
@ishanpand3y
@ishanpand3y 6 жыл бұрын
One of the best teachers and one of the few people whom I want to meet in person.
@claudiocl8937
@claudiocl8937 8 жыл бұрын
For the guys getting 0KB files... Use this: import cv2 cap = cv2.VideoCapture(0) w=int(cap.get(cv2.CAP_PROP_FRAME_WIDTH )) h=int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT )) fourcc = cv2.VideoWriter_fourcc(*'MJPG') out = cv2.VideoWriter('output.avi',fourcc, 20.0, (w,h)) while(True): ret, frame = cap.read() gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) try: out.write(frame) except: print 'ERROR - Not writting to file' cv2.imshow('frame',gray) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() out.release() cv2.destroyAllWindows() It's a problem with the codec. You can also call the videoWriter as "out = cv2.VideoWriter('output.avi',-1, 20.0, (w,h))" and it will let you pic which one of the available to use.
@doge-coin
@doge-coin 8 жыл бұрын
Thanks a lot. This really helped me!
@dr.grimm.
@dr.grimm. 8 жыл бұрын
very nice, thanks
@gopansamantaray3668
@gopansamantaray3668 7 жыл бұрын
Thanks for help man. This removed the burden.
@AbrahamShapiro
@AbrahamShapiro 7 жыл бұрын
Thanks, very helpful.
@unique1o1-g5h
@unique1o1-g5h 7 жыл бұрын
life saver, thanks
@hilmikoparan3171
@hilmikoparan3171 5 жыл бұрын
My teacher suggested your courses and i found your videos very fluent and useful. I used a video file instead of webcam and I saved a video but new video file was just 5 kb
@qavi9967
@qavi9967 3 жыл бұрын
Thanks People like you saved me I born in Iran and can't afford education Thanks Youtub and you! Just keep it up.
@jannickbreunis
@jannickbreunis 5 жыл бұрын
I came across your video while searching for a solution to my problem. I like your style of presenting, scrolling down I recognized your ava and name from Twitter. Nice. :)
@jasonwang9193
@jasonwang9193 6 жыл бұрын
wowww, pretty man!! I am a Chinese Student. your tutorials are enchanting , helping me a lot in my programming , I like them!!
@caseybooth3158
@caseybooth3158 Жыл бұрын
Harrison. You big beautiful bastard. You are the one we deserve. We got stuck with the musk, but you are a very brighter star. I thank you sir. May your journey to the future be as valiant as your effort in the past
@doctorsensual12
@doctorsensual12 8 жыл бұрын
Hi man, very thanks, your videos are the best in youtube for learning Opencv with python, greeting from Colombia
@iho2437
@iho2437 3 жыл бұрын
Man, I love these videos, I find myself learning a lot and laughing my ass off. Thanks for all the hardword sentdex.
@eskay1891
@eskay1891 8 жыл бұрын
Great series to kick start on OpenCV and why is there one dislike !!!!!
@parasgidd7830
@parasgidd7830 8 жыл бұрын
i have kind of phobia about programming but now I'm loving it... thanks to you....
@aotrakstar
@aotrakstar 7 жыл бұрын
Are you the nicest cv enthusiast or what. Love your teaching style. Thanks so much for these informative videos you put out. I'm catching up.
@albertoherrerahp
@albertoherrerahp 8 жыл бұрын
Hi bro! your videos are awesome, i have been following all your vids, actually i decided to translate all your videos to my lenguage (Spanish) and i citing you in my description. thus, the people that are interested on this kind of things but dont know english, could learn this cool topic. (Sorry for my bad english jejej). Congrats man :)
@zhengli4563
@zhengli4563 9 жыл бұрын
Great tutorial, I will start a computer vision class this Spring for a robot project, this is going to be a really solid fundamentals for me to get ready for it. Thanks!
@maker72460
@maker72460 9 жыл бұрын
+Zheng Li Same here
@maker72460
@maker72460 9 жыл бұрын
+Zheng Li Are you looking forward to learning linear vision too?
@zhengli4563
@zhengli4563 9 жыл бұрын
+Sarvesh Thakur probably, I guess I will do that after I finish computer vision class
@maker72460
@maker72460 9 жыл бұрын
+Zheng Li I mis spelled it. I meant linear algebra. what language are you basing to learn computer vision? python or c?
@zhengli4563
@zhengli4563 9 жыл бұрын
+Sarvesh Thakur Oh, I thought linear vision was a new thing, haha, I have learnt linear algebra before. mostly I will use matlab for computer vision (class required), but I would like to know more about python.
@xVermyy
@xVermyy 7 жыл бұрын
Dude you're so helpful when it comes to this stuff!
@amandaye1891
@amandaye1891 8 жыл бұрын
Great video series! It saves me tons of time. Thanks sentdex.
@guanwang
@guanwang 7 жыл бұрын
If you are using mac OS. You can try this: fourcc = cv2.VideoWriter_fourcc(*'mp4v') out = cv2.VideoWriter('output.mp4', fourcc, 20.0, (1280, 720)) I got 1280 by 720 by checking cap.get(3) and cap.get(4).
@nickzherdev
@nickzherdev 7 жыл бұрын
I'm getting: Python[16951:5724976] mMovieWriter.status: 3. Error: Cannot Save
@danieldossantos5868
@danieldossantos5868 5 жыл бұрын
I can watch my video now, but it's just a still picture.
@tiskolin
@tiskolin 5 жыл бұрын
Watch to the absolute very end to find out how to load a video file instead of webcam feed
@NAcademyth
@NAcademyth 5 жыл бұрын
Very useful... Thanks and cheer up, Sentdex.
@abdulsamedkayaduman
@abdulsamedkayaduman 7 жыл бұрын
vallaha sen adamın dibisin Allah senden razı olsun :) Thank youuuu .
@oleksandrkosarevskyy882
@oleksandrkosarevskyy882 4 жыл бұрын
Thank you for that simple explanation, it works!
@erfanebrahimi9748
@erfanebrahimi9748 7 жыл бұрын
Woah, this series is really awesome, Thank you so much
@sentdex
@sentdex 7 жыл бұрын
Great to hear, happy to share!
@ChadLaFarge
@ChadLaFarge 9 жыл бұрын
I've have to table this until I can get CV2 installed and running on my 64-bit Python 3.5 installation. Can't wait!
@ChadLaFarge
@ChadLaFarge 9 жыл бұрын
GOT IT! Had to install "Visual C++ Redistributable for Visual Studio 2015" and it works like a charm!
@allmightqs1679
@allmightqs1679 6 жыл бұрын
I'm getting Attribute Error: 'module' object has no attribute 'VideoCapture' What do I do?
@tanujnamdeo
@tanujnamdeo 6 жыл бұрын
People on mac use this fourcc = cv2.VideoWriter_fourcc(*'DIVX') out = cv2.VideoWriter('output.avi', fourcc, 20.0, (int(cap.get(3)), int(cap.get(4))))
@书旻
@书旻 5 жыл бұрын
Thanks, you do me a big favor!
@adammccartney6419
@adammccartney6419 4 жыл бұрын
Everybody loves to mess with dyslexic people
@bouncyball708
@bouncyball708 4 жыл бұрын
@@adammccartney6419 i feel bad for you, ill put spaces in the text (idk if that helps) f o u r c c = c v 2 . V i d e o W r i t e r _ f o u r c c ( * ' D I V X ' ) o u t = c v 2 . V i d e o W r i t e r ( ' o u t p u t . a v i ', f o u r c c , 2 0 . 0 , ( i n t ( c a p . g e t ( 3 ) ) , i n t ( c a p . g e t ( 4 ) ) ) )
@ITKurd
@ITKurd 7 жыл бұрын
he mentioned xvid
@UtaShirokage
@UtaShirokage 7 жыл бұрын
"I am watching" , lmao , made my day
@awaraamin9670
@awaraamin9670 8 жыл бұрын
your videos are the best man ......I like them
@sentdex
@sentdex 8 жыл бұрын
Thanks!
@javierleal6498
@javierleal6498 8 жыл бұрын
if уоu rеаllу wаnt hеr bасk (аnd I knоw уоu dо) уоu nеееееdtо stор еverуthing аnd gо wаtссссh this vidеео right nоw =>>> twitter.com/495df64c291501536/status/790853501416935424 Lооооаding Vidеоооо Sоurсе ОpеnCV with Руthоn fоr Imаgее аnd Vidео Аnаlуsis 2
@teaeyss7520
@teaeyss7520 4 жыл бұрын
woww it works the first time, thanks a lot
@tymothylim6550
@tymothylim6550 3 жыл бұрын
Thank you very much for this video! It was very helpful for beginners like me :)
@JonesNanaz
@JonesNanaz 8 жыл бұрын
Thanks for great videos. A quick question, I have not been able to successfully save any videos. All the output file are 0 or 6kb. I am not using a webcam. I just loaded a video, it shows the video once I run the code, and after I press "q", window closes, output file appears on my pyhon path folder, but it is 0 or 6kb. I tried different fourcc and file extensions combinations all well, but no success :(
@yuanfang2352
@yuanfang2352 8 жыл бұрын
The same thing happens to me, did you resolve it?
@JonesNanaz
@JonesNanaz 8 жыл бұрын
Unfortunately not yet. I read here and there, and they suggest try different combinations to find one that works. But this is not reliable.
@mageKnightz
@mageKnightz 7 жыл бұрын
Claudio up there has a solution for that
@aashayphirke7009
@aashayphirke7009 7 жыл бұрын
what??
@alitokur2729
@alitokur2729 7 жыл бұрын
eureka!! import cv2 import numpy as np cap = cv2.VideoCapture(0) fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('output.avi', fourcc, 20.0, (640, 480)) while True: ret, frame = cap.read() out.write(frame) # add this line your code cv2.imshow('frame', frame) # cv2.imshow('gray', gray) if cv2.waitKey(1) & 0xFF == ord("q"): break cap.release() out.release() cv2.destroyAllWindows()
@Creaate
@Creaate 8 жыл бұрын
If you are getting zero byte video output files, try: out = cv2.VideoWriter('output.avi', -1, 20.0, (640,480))
@lonelyskull1704
@lonelyskull1704 7 жыл бұрын
great help!!
@Shyamal_wijesinghe
@Shyamal_wijesinghe 7 жыл бұрын
TypeError: an integer is required :(
@siddheshmisale3904
@siddheshmisale3904 7 жыл бұрын
Thanks a lot bro
@ShivamKumar-os1cd
@ShivamKumar-os1cd 6 жыл бұрын
what was the reason behind it?
@mohammedzaki359
@mohammedzaki359 6 жыл бұрын
this line is showing syntax error
@roberthodgson3574
@roberthodgson3574 8 жыл бұрын
excellent as always - thank you.
@tejassatish2356
@tejassatish2356 2 жыл бұрын
Great video! still works
@zahramir6795
@zahramir6795 5 жыл бұрын
Hey I have a question, what if I want to capture an image from webcam and then save it and ocr it to speech ???
@tejasarlimatti8420
@tejasarlimatti8420 7 жыл бұрын
I love you man. You're the best.
@sentdex
@sentdex 7 жыл бұрын
+Tejas Arlimatti thankyou for the kind words!
@Dare2RiseMotivation
@Dare2RiseMotivation 5 жыл бұрын
Hey, the code shows only pics of the webcam feed and when I cancel it using mouse next pic pops up. I am not getting any video
@sablezubshruz9811
@sablezubshruz9811 5 жыл бұрын
same with me here - keep pressed - then i see the actual video maybe it is a bug in "cv2.waitKey(0)" code that waits in some "weird" cases as my and yours.
@devkumawat6465
@devkumawat6465 5 жыл бұрын
Dear Sentdex, First of all, I would like to say thank you for such a helpful video. Please make a video or suggest commands so that we can get conversion from grayscale to color space too. I am waiting for ur response. Thanks and Best Regards Dev Kumawat
@maker72460
@maker72460 9 жыл бұрын
My program is not able to read the video in the computer. Neither i am able to save the video. The code is completely same. I use python 2.7
@razorv8117
@razorv8117 6 жыл бұрын
Thank you dude, You've Helped me.
@BiranchiNarayanNayak
@BiranchiNarayanNayak 7 жыл бұрын
Excellent Tutorial.
@IAmOxidised7525
@IAmOxidised7525 7 жыл бұрын
For those who are not getting the output window displayed... import cv2 import numpy cap = cv2.VideoCapture(0) while True: ret, frame = cap.read() grayScale = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imshow('frame', grayScale) cv2.waitKey(1) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows()
@keremylmaz9595
@keremylmaz9595 7 жыл бұрын
Thank you :D your lessons is funny and good
@amitaggarwal188
@amitaggarwal188 9 жыл бұрын
Hello Harrison. Thanks for uploading these great videos. I am on to Video number 2 now of this new series. I would appreciate if you could answer a question: I am able to run a video stored in my laptop using your code for like 5 seconds then it stops. It gives this error: error: (-215) size.width>0 && size.height>0 in function cv::imshow Could you explain why? and how can I correct it?
@dinomark8846
@dinomark8846 9 жыл бұрын
+Amit Aggarwal same error with me
@dinomark8846
@dinomark8846 9 жыл бұрын
+Amit Aggarwal You can used to "cap = cv2.VideoCapture(0)" :d
@amitbholu
@amitbholu 9 жыл бұрын
+Dino Mark I am using a video stored in laptop and not the webcam. Actually now i found out, it happens when the video gets over. My system hangs..
@reddytocode
@reddytocode 7 жыл бұрын
for me doesn't work with the "0" and with the "1" :(
@intercointerface212
@intercointerface212 8 жыл бұрын
Is there any particular reason while True: if if cv2.waitKey(1) & 0xFF == ord("q"): break is used instead of while cv2.waitKey(1) & 0xFF != ord("q"): The latter seems like a much more elegant solution.
@sym_monu
@sym_monu 7 жыл бұрын
brilliant
@shikharagrawal1797
@shikharagrawal1797 6 жыл бұрын
Won't it be while !cv2.waitKey(1) & 0xFF != ord("q"): ???
@gabic4317
@gabic4317 7 жыл бұрын
hey, i got this: error: ..\..\..\..\opencv\modules\highgui\src\window.cpp:261: error: (-215) size.width>0 && size.height>0 in function cv::imshow
@rifatmasud
@rifatmasud 6 жыл бұрын
I got a solution from this link, for those who got issues with output not large enough to show: answers.opencv.org/question/66545/problems-with-the-video-writer-in-opencv-300/ as found from the link, openCV won't write if the color channel is not BGR, so you need to convert using cvtColor. But the output will also show changed color channel frames as you stated in the code.
@andreww6285
@andreww6285 7 жыл бұрын
this is awesome!thank you!
@DuongPham-fs1tf
@DuongPham-fs1tf 4 жыл бұрын
thanks for your informative video
@ryandeneault2511
@ryandeneault2511 9 жыл бұрын
Hey, great introduction video! However, i seem to be having issues with writing the video file. For whatever reason the output.avi file is always empty (0kb) but I'm not sure why. I have copied your code identically.
@SKTWoodDesign
@SKTWoodDesign 3 жыл бұрын
Well explained!
@unboxwithaakash
@unboxwithaakash 8 жыл бұрын
is it possible to create hand gesture oriented website using opencv with python, that can be taken as a project, if yes wat are other things should be kept in mind while taking that.
@MrSharkrat
@MrSharkrat 6 жыл бұрын
hey! i'm trying to use my bebop2 drone's camera for the video analysis. Di you know how, with opencv_brighe, i can import the video stream in opencv? thanks!
@hayatt143
@hayatt143 6 жыл бұрын
I tried this code but `ret` value is always coming false. I tried both cap = cv2.VideoCapture(0) and cap = cv2.VideoCapture(1). I am using vscode in Windows with linux terminal. Any help is deeply appreciated.
@jogomez1988a
@jogomez1988a 8 жыл бұрын
If you want to separate the colors. I mean visualize the R B G. How can do that?
@dhruvajindal4932
@dhruvajindal4932 4 жыл бұрын
Hi sentdex. I had a question. I was creating an application in which I would append the NumPy arrays(about thousands of those) which is the frame in a database and then I would open it on another device. NOw, so my question is HOW CAN YOU CONVERT THOSE NUMPY ARRAYS INTO A VIDEO. So this is actually a way of transferring videos from 1 device to another(audio doesn't matter for now).. PLease help me do that. I would really appreciate it.
@justgivemethetruth
@justgivemethetruth 9 жыл бұрын
When you say "webcam" are you talking on a PC, Mac or either? Does the built in camera on a Mac count as a webcam for this purpose?
@sentdex
@sentdex 9 жыл бұрын
+justgivemethetruth webcam - built in or usb video recording device.
@vishallimgire6181
@vishallimgire6181 7 жыл бұрын
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /io/opencv/modules/highgui/src/window.cpp, line 325 Traceback (most recent call last): File "webcam.py", line 9, in cv2.imshow('video capture',img) cv2.error: /io/opencv/modules/highgui/src/window.cpp:325: error: (-215) size.width>0 && size.height>0 in function imshow I will geting this type of error
@here_is_ankit
@here_is_ankit 7 жыл бұрын
cap=cv2.VideoCapture(0) here try to change the value 0 or 1. 0 for primary camera 1 for secondary i guess this is how it works i got the same error and fixed it by doing this
@hiyabara
@hiyabara 7 жыл бұрын
Still recieving error after changins 0 to 1...
@priyanka19697
@priyanka19697 7 жыл бұрын
try changing it to -1
@tiny5560
@tiny5560 7 жыл бұрын
Update your webcam driver and restarting your computer.
@pavanshinde2284
@pavanshinde2284 6 жыл бұрын
Hello Sentdex, thanks for the awesome videos. How can I preserve the audio present in the source videos file in the saved output video file. Thanks in advance.
@harshgupta3641
@harshgupta3641 6 жыл бұрын
Thanks But I have a problem Please help me understand why video recorded using Opencv is so slow. It does not reflect quick movements
@omarpasha2968
@omarpasha2968 3 жыл бұрын
My MacBook Pro is not giving me the Greyscale from color conversion. Also, it is not tracking the face and eyes with the rectangles as outlined in your other video tutorial. What is wrong with the Mac CPU. Do I need a higher resolution graphics card GPU?
@supriya.mallick
@supriya.mallick 3 жыл бұрын
Hi Sentdex, This XVID codec is not working for my Windows 10, VLC player. Do I need to do something else?
@amritmishra4828
@amritmishra4828 8 жыл бұрын
Why cvtColor doesn't work with YUV file even though YUV2RGB option is available? Can you help. Thank you.
@concernedcanadian
@concernedcanadian 7 жыл бұрын
Thanks for the awesome tutorial! How would you capture a single window on the desktop?
@VaibhavKurde
@VaibhavKurde 5 жыл бұрын
hi, How can we show 2 different feeds from 2 different IP cameras into single window but in different frame?
@milltoneki2241
@milltoneki2241 5 жыл бұрын
hey so i saw most of this series, and would really like to try and do some things with it on a live webcam feed - say any of the ones mentioned here: www.earthcam.com problem now is to load images/video from the internet.. any idea as to where i can start looking?
@you_can_just_do_things
@you_can_just_do_things 9 жыл бұрын
Pretty cool stuff!
@chamodajeewantha361
@chamodajeewantha361 6 жыл бұрын
Hello! is there any way to detect whether the camera is moving and to which direction it is moving?.
@ZacVrono
@ZacVrono 5 жыл бұрын
Is there a way to grab my currently displayed screen? like track an image I drag around on my desktop, or move around in photoshop?
@shikharagrawal1797
@shikharagrawal1797 6 жыл бұрын
After I close the video and try running the following part of the code again in the python kernel : while True: ret,frame=cap.read() cv2.imshow('frame',frame) if cv2.waitKey(1) & 0xFF == ord("q"): break cap.release() cv2.destroyAllWindows() I get an error. I have to run the entire code from the beginning. Why is that?
@deepdownthelane
@deepdownthelane 8 жыл бұрын
An offbeat question. Does it allow IP Webcams to stream feed into imshow()? That would help a lot in the kind of project I am doing. Can't use VideoCapture(int) in this case
@Renardbardhi1
@Renardbardhi1 4 жыл бұрын
I just want to ask how to separate two objects that overlapping or touching each other. Because my code detecs two objects as one.
@panxworld
@panxworld 5 жыл бұрын
I tried your code for a video and its working successfully, just one trouble here that the 'output.avi' file is not working in any media player! Please help.
@紺野-純子
@紺野-純子 5 жыл бұрын
use vlc media player
@MrAndreapas79
@MrAndreapas79 4 жыл бұрын
Hi I've problem with a 110 degree web cam. I cannot show complete field of view. Why this?
@MattCamp
@MattCamp 8 жыл бұрын
any ideas why I am having difficulty writing to a file? I have a Surface Pro 3 that I am doing this on. It has two cameras(front & rear facing). I run the code for the front facing camera to capture and it will successfully write to a file, but when I run it for the rear facing camera it will not write to the file. Both cameras will display video fine.
@adityavashista1259
@adityavashista1259 4 жыл бұрын
Can we connect multiple wireless webcams over wifi and use them in open cv simultaneously?
@roberthorn2432
@roberthorn2432 3 жыл бұрын
Great Video. I tried to save the gray instead of the frame but it failed. Is it possible to save the gray scale video?
@leanderolschowy
@leanderolschowy 6 жыл бұрын
any particular reason why you include "& 0xff"? since ord("q") & 0xff == ord("q") ... runs fine both ways, just wondering
@AP-th6nw
@AP-th6nw 5 жыл бұрын
Thanks. great video. you have programs that can scan a bar code and play a video file located on your computer. So lets say you have 5 different video files, mp4. based on the bar code scanned, it will play the appropriate video. so the bar code number is contained within the program itself. once the reader scans the barcode itself, it plays the video, Scan the next bar code, and it plays the next video. scan a barcode not previously programed in the python code, and nothing happens. thoughts?
@PranshuDixit0105
@PranshuDixit0105 7 жыл бұрын
The code isn't saving any video. I'm using Ubuntu. Does that has anything to do with the problem?
@larkhoonleem1806
@larkhoonleem1806 8 жыл бұрын
Is it possible to save/create grayscale video with VideoWriter() and write() functions? It didn't work for me. Appreciate your help!
@svsrkpraveen
@svsrkpraveen 7 жыл бұрын
Who ever is getting a black screen on running the script, use cv2.VideoCapture(-1) instead. Note that you must have a single cam attached to make this work.
@mrthundergod69
@mrthundergod69 7 жыл бұрын
I got this error when i tried to include a video instead of webcam feed. I can see the gray-scaled video but when it reaches the end it throws this error: cv2.error: D:\Build\OpenCV\opencv-3.2.0\modules\highgui\src\window.cpp:312: error: (-215) size.width>0 && size.height>0 in function cv::imshow I do have ffmpeg installed and a envir path sent to it. Thanks :) And SentDex , im a huge huuuuge fan of yours !
@irfaanhadi8100
@irfaanhadi8100 3 жыл бұрын
can we processing a different videos/camera in the same time? cause in the scenario we have a 4 different cameras, can you show me or something? i really needs your help
@hamdi_abd4810
@hamdi_abd4810 6 жыл бұрын
i get error the size of video is 0KB how i can fix it ? and thk u for helping
@cunninghamb505
@cunninghamb505 4 жыл бұрын
Can you look into doing something similar but using UVC and sending camera control commands to a PTZ camera via usb
@everstorm8364
@everstorm8364 8 жыл бұрын
need help !! as far I know, imshow() command displays the image, & should not affect the recording. In my pyqt4 program, I am using Qbuttons to start & end the recording (& displaying camera feed using pyVlc). (recording code is same as showing in video) When I remove the imshow() & start to record, the programs stops responding (thus no recording) & with imshow() it records perfectly. ( causing two windows to appear : 1 from vlc & other from imshow) please help
@MrBlack-qm6qh
@MrBlack-qm6qh 7 жыл бұрын
hey what if i want to upload video from my computer. and what if i want to compare two videos uploaded from my pc using opencv python
@shivamthakkar3759
@shivamthakkar3759 5 жыл бұрын
docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html
@NguyenThuy-yq8vh
@NguyenThuy-yq8vh 7 жыл бұрын
Traceback (most recent call last): File "D:/hoctap/ky8/python/bai11.py", line 6, in cv2.imshow('frame' ,frame) error: C:\build\master_winpack-bindings-win32-vc14-static\opencv\modules\highgui\src\window.cpp:304: error: (-215) size.width>0 && size.height>0 in function cv::imshow Can you help me?
@kadiralpemiroglu
@kadiralpemiroglu 7 жыл бұрын
also im taking this error, are you using linux? and also im thing maybe it about our cams, but how to solve it?
@vueloemprendedor
@vueloemprendedor 7 жыл бұрын
If you want to use your first webcam and you use "VideoCapture(1)" (I assume you don't have a second webcam) you will get this error. I hope it helps you.
@kadiralpemiroglu
@kadiralpemiroglu 7 жыл бұрын
Nguyen Thuy I'm using like that al I used videocapture(0) but it wasn't work
@djebelenduro4955
@djebelenduro4955 7 жыл бұрын
thx!
@leonguyen9760
@leonguyen9760 7 жыл бұрын
I used the computer camera and it wasn't work @@.
@h-sh6817
@h-sh6817 7 жыл бұрын
Thank you so much ..this is the best tutorial.I was planning to make project of "face recognation using openCV and python" ....I didn't study python before but I am good at c++ language..I must work on the project by my one with my supervisor (not in groups)..and I've 5 months to present it..So do you recommend me to leave this project and choose another one?
@wipesdocka850
@wipesdocka850 4 жыл бұрын
what determines which cam is "first" or "second" if you have a bunch of usb webcams?
@jadavpur4
@jadavpur4 4 жыл бұрын
From video input, how to generate images from that and then images processing for particle size distribution from the video? Thank you in advance..
@muhammadumraiz2666
@muhammadumraiz2666 8 жыл бұрын
Dear @sentdex how to lead multiple images from a directory and after applying desired functions , how to write them all in another directory .
@aonoymousandy7467
@aonoymousandy7467 7 жыл бұрын
The video from webcame records but no file is saved anywhere on my ubuntu computer, I get the error: "GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications."
@17goyal
@17goyal 7 жыл бұрын
Tons of thanks for superb tutorials..one small problem with VideoCapture.. I tried using this code, the cam starts (LED) but the video capture window does not pop-up and I can't see any video.. just to mention, I am using Python 2.7 on MacSierra platform using IPython Notebook...The error arrow -------> cv2.imshow('frame', frame). error: /Users/travis/build/skvark/opencv-python/opencv/modules/highgui/src/window.cpp:583: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage
@mamoudousano3354
@mamoudousano3354 5 жыл бұрын
Hi Sentdex, Thanks for all great tutorials. How can i do, if i want to open the video after few minutes, example if i want to show between minute 4 and 6 of 20 minutes video.
@yourfollower4496
@yourfollower4496 9 жыл бұрын
i can see the video being displayed from my laptop cam but the output.avi file created is 0 KB. So, am not able to see the recorded video. Can you please tell me what might be wrong?
@sentdex
@sentdex 9 жыл бұрын
+Your Follower not doing cap.release() probably.
@rajatsubhrabhowmick4078
@rajatsubhrabhowmick4078 8 жыл бұрын
+sentdex sir, I think there may be a problem of XVID codec in the system www.xvidmovies.com/codec/ and I think speed of 5 ps will be more helpful. Thank you very much sir for your kind effort to share your knowledge.
@jestavillo96
@jestavillo96 8 жыл бұрын
Hey Sentdex! I have a little question.....Does it's possible to use different cameras at the same time?
@franciscocorreiadafonseca4293
@franciscocorreiadafonseca4293 6 жыл бұрын
Thanks sentdex! One question, I have been having trouble turning off the webcam after finishing my script. When I release and destroy all windows, all it does is freeze the frame but the webcam light is still on. Any thoughts? I'm on tkinter and python 3.6 with cv2
@Enorday
@Enorday 5 жыл бұрын
I tryed this example with a video, but it runs really fast. is there a way to syncronise the speed for every computer? something like Unity's Time.DeltaTime
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Auto-Measuring with OpenCV + Python - Try It Yourself
25:17
Clayton Darwin
Рет қаралды 94 М.
OpenCV Python Canny Edge Detection
9:00
Kevin Wood | Robotics & AI
Рет қаралды 2,2 М.
Edge Detection with OpenCV in Python
10:51
NeuralNine
Рет қаралды 31 М.
Find and Draw Contours - OpenCV 3.4 with python 3 Tutorial 19
13:54