How To Read Image-Video-Webcam [1] | OpenCV Python Tutorials for Beginners
In this tutorial, we will learn how to read an image and video placed in a folder using OpenCV. We will also look at how to run a webcam and how to set its parameters.
🚀🚀 My Urdu/Hindi AI KZread Channel 🚀🚀
/ @murtazahassan01
Code & Text Based Version:
www.computervision.zone/cours...
Links:
OpenCV Python Tutorial Playlist:
• How To Install OpenCV ...
Premium Courses:
✔️ Computer Vision Game Development Course:
bit.ly/3ttLZ2s
✔️ Computer Vision with Arduino Course:
bit.ly/3wzLB4m
✔️ Advanced Drone Programming Course:
bit.ly/3qs3v5g
✔️ Learn to Build Computer Vision Mobile Apps:
bit.ly/3uioY1J
✔️ Jetson Nano Premium Course:
bit.ly/3L8uIlF
⚙️⚙️⚙️--My Gear - ⚙️⚙️⚙️
👉 Complete Gear 💈: www.computervision.zone/tech-...
👉 My PC Specs 🖥️: www.computervision.zone/tech-...
👉 My Video Shooting Gear📽️ : www.computervision.zone/tech-...
👉 My Laptops 💻: www.computervision.zone/tech-...
👉 Educational Products🧑🎓: www.computervision.zone/tech-...
👉 KZread Starter Kit 🔴: www.computervision.zone/tech-...
Follow Me:
TikTok: bit.ly/3Vo76OQ
Facebook Group: bit.ly/3irDcb7
Discord: bit.ly/3JvyxAM
Facebook Page: bit.ly/3IvpU7W
Instagram : bit.ly/3NdGME3
Website: bit.ly/3ICFTS0
Github: bit.ly/3woU6PS
#ComputerVision
#OpenCV
#CVZone
Пікірлер: 72
真的是太好了!說明簡潔有力操作清楚!造福人群!
Thank you so much! You have awesome Chanel!
very helpful thank you
Excellent explained! Many thanks for the video
@murtazasworkshop
4 жыл бұрын
Glad it was helpful!
Thank you, Sir
Good job 👌🏻
Very Nice
Thank you soo much
Thanks for your good work Hassan.
@murtazasworkshop
3 жыл бұрын
You are most welcome
great!Thank you for your video
@murtazasworkshop
3 жыл бұрын
Thanks for watching!
Thanks a lot for cool tutorial.I have a question about "if cv2.waitKey(1)&0xFF==ord("q"):" part.I searched it but still donnot know.What are they doing and why when we erase them code doesnot work.Could you explain this as simple as you can?
Thanks for the video! It is very useful for the beginners! Where can I get the files that you used in the video clip like "lena.png", "testvideo.mp4"?
Thank you for your much informative class
@murtazasworkshop
4 жыл бұрын
You are very welcome
@08ayansatt33
2 жыл бұрын
How will you open the image and video file in the resource folder?
Very awesome. Thank you so much.
@seriezt
4 жыл бұрын
My pycharm only show qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
@seriezt
4 жыл бұрын
How to fix it?
@leemartin3253
4 жыл бұрын
@@seriezt I'm getting the same error
@leemartin3253
4 жыл бұрын
@@seriezt It's a problem with the current version of the opencv-python package. Uninstall it then install the previous version.
@murtazasworkshop
4 жыл бұрын
@@seriezt i recommend using the python 3.7 .
awesome video training thankyou, can you please explain how I can make a resource foulder so that I can store my img files
@b40prakashkumarm11
3 жыл бұрын
Right click on ur project folder. Then click new ->Directory
cv2.error: OpenCV(4.5.2) C:\Users unneradmin\AppData\Local\Temp\pip-req-build-m8us58q4\opencv\modules\highgui\src\window.cpp:404: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow' any body know about this error?
@carloseduardofrancoacosta1736
Жыл бұрын
I had the same error, just paste the image Lenna in the same folder you are working on (if you have visual studio like you can paste it directly froma File explorer), then, inside the imread ("The_name_of_the_folder_you_are_worrking_on/Lenna.png") and that's it
Hey, thanks for the video. I found the lena.png file mentioned in the video however I cannot find the testvideo file. Any help appreciated!
@murtazasworkshop
4 жыл бұрын
I have added the Resources Folder. github.com/murtazahassan/OpenCV-Python-Tutorials-for-Beginners/tree/master/Resources
@TheMisteree1
4 жыл бұрын
@@murtazasworkshop Thank you!
@nurzulfa
3 жыл бұрын
@@murtazasworkshop how to insert the resources file? im newbie :)
i am having problem with the code File "C:\Users\user\PycharmProjects\opencv\test.py", line 12, in sucess,img = cap.read() KeyboardInterrupt
thank you. how to know the default frame width and height of webcamera?
@peterjigstad9755
3 жыл бұрын
import cv2 HIGH_VALUE = 10000 WIDTH = HIGH_VALUE HEIGHT = HIGH_VALUE cap = cv2.VideoCapture(0) fourcc = cv2.VideoWriter_fourcc(*'XVID') cap.set(cv2.CAP_PROP_FRAME_WIDTH, WIDTH) cap.set(cv2.CAP_PROP_FRAME_HEIGHT, HEIGHT) width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) print(width,height) cap.release()
@sushmanaik2228
3 жыл бұрын
@@peterjigstad9755 thank you
how to make that resources folder
where can i get resources library from opencv file..please help me😌😌
hi sir. i have a question: I don't know how to add the img.png into the pycharm program.
@carloseduardofrancoacosta1736
Жыл бұрын
You can do it directly from the file explorer
Face Liveness Detection That With Web App For Registration Process please do this project
I am unable to play video from my webcam getting error as error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
@murtazasworkshop
4 жыл бұрын
try changing the camera id from 0 to 1 or 2
@peterjigstad9755
3 жыл бұрын
Check your camera permission. Go to the settings of windows 10, permission to access camera must be enabled to your application. Settings > Privacy > Camera > Allow desktop apps to access your camera = On.
It shows cannot find reference'imread' in 'init_.py'
thanks for awesome videos and training ; I got an errer ( File "D:/Python 2020/opencv/venv/test.py", line 12, in cv2.imshow("lena.png") TypeError: imshow() missing required argument 'mat' (pos 2)
@peterjigstad9755
3 жыл бұрын
You must declare the function with correct arguments. The line should be: cv2.imshow("your testwindow title",img)
@carloseduardofrancoacosta1736
Жыл бұрын
I had the same error, just paste the image Lenna in the same folder you are working on (if you have visual studio like you can paste it directly froma File explorer), then, inside the imread ("The_name_of_the_folder_you_are_worrking_on/Lenna.png") and that's it
What skill should I learn to study opencv Please anyone
I installed all the packages but pycharm is not auto filling the functions
@LoveFood1332
Жыл бұрын
same , did u found out ?
@CREATIVEINNOVATOR
Жыл бұрын
@@LoveFood1332 no I don't know what is the problem. It's not auto filling but all the functions are working
Why is it played too fast in my phycharm ? Code is exactly same but what should I change to have my video played in normal speed ?
Hai , i have an error says 'crd' is not defined? why is this? tnx
@murtazasworkshop
4 жыл бұрын
Share a screenshot .and i will have a look .
@bheiafranco1252
4 жыл бұрын
How can I reach you through?
@murtazasworkshop
4 жыл бұрын
@@bheiafranco1252you can contact me here: facebook.com/murtazasworkshop/
@d.lloydjenkinsjr
4 жыл бұрын
Wasn't it 'ord'?
hai i have this error how to resolve it cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-xeqjxthj\opencv\modules\highgui\src\window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
@azrilhaidar7476
3 жыл бұрын
Yes have that problem too, can you resolve it sir? Thx
@dineshm4582
3 жыл бұрын
@@azrilhaidar7476 yes I ill send you later
@azrilhaidar7476
3 жыл бұрын
@@dineshm4582 can you resolve it sir? Can share the program here? Thx
@akanshakhedia533
3 жыл бұрын
@@azrilhaidar7476 please check if the image is in the same location as mentioned. It returns this error when the file is not in the location given. Check if the spellings are right
@hiteshbhojne6852
3 жыл бұрын
If anyone gets the solution plz help me as well plz
i am having problem with the code ....cam and video playback i not working....( if cv2.waitkey(1) & 0xFF == ord('q'): AttributeError: module 'cv2.cv2' has no attribute 'waitkey') Error ,with this error...
@rahab5807
3 жыл бұрын
cv2.waitKey, not cv2.waitkey
bro thanks for everythings but please stop mouth smack :D