OpenCV Python Tutorial For Beginners 3 - How to Read, Write, Show Images in OpenCV

  Рет қаралды 375,278

ProgrammingKnowledge

ProgrammingKnowledge

Күн бұрын

Пікірлер: 241
@hfe1833
@hfe1833 4 жыл бұрын
i like when he explain,very clear and easy to understand, not same the others tutorial theyre talking too fast that hard for me to absorb as beginner
@bhavyakhushi8917
@bhavyakhushi8917 Ай бұрын
after finding foe so long this is a very good tutorial for cv
@Hakerman-ed6pe
@Hakerman-ed6pe 4 жыл бұрын
when i saw this IDE color my eyes were be like : Bravo six going dark
@prathamn2700
@prathamn2700 4 жыл бұрын
XD
@sukumarroychowdhury4122
@sukumarroychowdhury4122 3 жыл бұрын
From your voice, I know you are Sourav. Really thank you for such wonderful; presentation.
@yesdone4993
@yesdone4993 2 жыл бұрын
It's too good bro, such a clearcut explanation. All the best.
@tarungupta6304
@tarungupta6304 4 жыл бұрын
Sir, your Explanation is very clear and the way is pretty good
@ProgrammingKnowledge
@ProgrammingKnowledge 5 жыл бұрын
Install PyCharm ( Python IDE ) on Windows 10 + First Project - kzbin.info/www/bejne/mXnEaWibqZx_gZI Gist of code I used in this video - www.codebind.com/python/opencv-python-tutorial-beginners-read-write-show-images-opencv/
@hasanjameel2148
@hasanjameel2148 3 жыл бұрын
do you have idea how to use BRISK inside LSB steganography ? please answer
@priyaupwanshi8063
@priyaupwanshi8063 3 жыл бұрын
in the previous videos we install pips and python then why we use pyCharm instead python IDE ? Can you please share installation process of PyCharm ?
@kumaramresh7905
@kumaramresh7905 5 жыл бұрын
Surprised to see light themed ide..🤣🤣
@rajarshimandal3235
@rajarshimandal3235 4 жыл бұрын
Anyone teaching, uses white ide
@rabicode
@rabicode 3 жыл бұрын
is it possible to take image/videos as user input after run the programe?
@jn14624
@jn14624 5 жыл бұрын
I figure that out ... It fails to make a copy when you use the (0) option and click on the (X) to close the windows, but if instead you set the number of milliseconds to 5000. It makes a copy right after it closes! In any case this is a nice tutorial, man. Working on a "neighborhood speed detector" (things are really crazy with lunatics speeding thru my street here and this is a nice way to cooperate with law enforcement)!
@h0difaem104
@h0difaem104 Жыл бұрын
Thank you so much for this tutorial , And want to ask if i can use spyder ide instead of pycharm without having a trouble following your tutorial.
@tarjunrao8823
@tarjunrao8823 Жыл бұрын
[ WARN:0@0.034] global loadsave.cpp:248 cv::findDecoder imread_('abd.jpg'): can't open/read file: check file path/integrity i got this kind of error plzz so;ve my issue
@mahnoorsakhawat9087
@mahnoorsakhawat9087 5 жыл бұрын
What is meant by destroying a window? What exactly does the command destroyAllwindows does?
@shrutivaidya255
@shrutivaidya255 4 жыл бұрын
@programmingKnowledge sir I'm getting error code 1 , saying cv2 has no attribute as imread. Please help to resolve this and my image isn't getting displayed.
@mounahaadi
@mounahaadi 4 жыл бұрын
At 15:37, It could be better if you explain why k = 27 only, and in elif condition what does ord('s') exactly, means and what is the functionality... (for a beginner it becomes quite difficult to understand) apart from these the video and teaching quality is really good...
@_i.a.m_3664
@_i.a.m_3664 5 жыл бұрын
Your video gave me hope! It was systematic and so easy to understand. Thank you so much for uploading 😁
@sqbm7329
@sqbm7329 2 жыл бұрын
no one can teach this way man
@howfar2157
@howfar2157 4 жыл бұрын
very nice video.. you have increased my confidence to learn on my own... :)
@jetpix
@jetpix Жыл бұрын
Thankyou Sir, Your Tutorial is very understandable
@Parulmittal-wk3mp
@Parulmittal-wk3mp 4 жыл бұрын
hey cv2.imshow() is not working in jupyter and kernel got crashed. could you suggest me some solution for this, that would be very helpful.
@shankarwarudkar7469
@shankarwarudkar7469 4 жыл бұрын
I have text file which contain the image co ordinates so how to read that co ordinates and display the image from them? pls help
@ericosterlund
@ericosterlund 4 жыл бұрын
hey mate, thanks for all the videos. Im having a problem for the imread, i have all the updated packages: numpy 1.18.2 1.18.2 opencv-contrib-python 4.2.0.34 4.2.0.34 opencv-contrib-python-headless 4.2.0.34 4.2.0.34 opencv-python 4.2.0.34 4.2.0.34 pip 20.0.2 20.0.2 setuptools 46.1.3 46.1.3 code: import cv2 img = cv2.imread('lena.jpg', 0) print(img) but when i run it, i still get None. I have the lane.jpg in my project folder. What could be the problem, i have spent 3 hours trying to troubleshoot this :'''''''(
@ericosterlund
@ericosterlund 4 жыл бұрын
google search: "OpenCV does not support Python 3.8, According to official docs, Python version 3.7 is the highest version that is supported."
@interesantestuff1999
@interesantestuff1999 4 жыл бұрын
@@ericosterlund Thnx, was also stuck. Seems like Python 3.7.3 doesn't support it either.
@mchandran9652
@mchandran9652 4 жыл бұрын
Dont cry brh, reinstall python.
@damnitnabit1070
@damnitnabit1070 4 жыл бұрын
@@ericosterlund working fine for me on python 3.8.3
@techyaakash2392
@techyaakash2392 Жыл бұрын
Thanks for the amazing series of opencv ❤❤
@sarikamishra7051
@sarikamishra7051 3 жыл бұрын
from github it was downloaded as zip folder. how will i extract images from it
@prathamn2700
@prathamn2700 4 жыл бұрын
Watch in 1.25x speed. Awesome series btw.
@bigjoe6504
@bigjoe6504 3 жыл бұрын
my cv2.imread keeps returning as none. the path is correct, I dont know what to do, btw im using vscode.
@harshitgupta7496
@harshitgupta7496 3 жыл бұрын
same goes for pycharm
@sakshibhagwat4794
@sakshibhagwat4794 2 жыл бұрын
Hello, i m using your video for my project but I have sum doubt... I have error for opencv. It's given AttributeError for cv2.imread. so what can I do??
@jeffcueto
@jeffcueto 4 жыл бұрын
Hi, i would like to know how to hide or desable the pointer mouse when i use fullscreen window in OpenCV
@RC2V6
@RC2V6 4 жыл бұрын
I imported an black and white image from a folder, and after reading and applying a threshold filter, i want to read the new threshold image generated instead of the original one i opened. How do i do this? Every time i try to read the thresholded image it reads the original BW imported. If you could help me, would be just awesome. Thanks!
@sagihaviv5675
@sagihaviv5675 3 жыл бұрын
sir how to make it read and extract only the word i want example in the image has "hello world" but i want to print only "world" in a text file
@georgepescod3676
@georgepescod3676 Жыл бұрын
Great video. Q: if I use 27, I can press basically any button and the window gets closed. Not just with the escape button. Is that ok?
@marine50301
@marine50301 4 жыл бұрын
Hey can anyone tell me either the image will be shown in mobile if all the codes is proper?
@nabiltech1366
@nabiltech1366 4 жыл бұрын
Hello sir.I liked your video🙏.But i have question.What should i do if i want to use sublime text 3 instead of pycharm?🙋
@hamzaasghar4845
@hamzaasghar4845 4 жыл бұрын
i have the same question, help please :D
@joaosalomao5289
@joaosalomao5289 4 жыл бұрын
@@hamzaasghar4845 So, do I. If anyone could help us, it would be really good
@harshbarvaliya3529
@harshbarvaliya3529 4 жыл бұрын
Good video. , In understandable language
@didiruhyadi4798
@didiruhyadi4798 5 жыл бұрын
Keep going my friend.
@adityarana3722
@adityarana3722 6 ай бұрын
Beautiful tutorial sir
@jeevanshrestha8888
@jeevanshrestha8888 5 жыл бұрын
"Could not find a version that satisfies the requirement opencv-python (from versions: ) No matching distribution found for opencv-python" I am getting this error while installing opencv in pycharm
@shingchan4766
@shingchan4766 5 жыл бұрын
according to the link here : stackoverflow.com/questions/47390692/error-while-installing-cv2-in-pycharm-python-3-5-3 I try to upgrade the pip "pip install --upgrade pip" from the python command prompt. Then go back to pycharm and install opencv-python. my pip version is 19.3.1 my opencv-python version is 4.1.2.30 I hope this help
@satyambhargav9661
@satyambhargav9661 5 жыл бұрын
you just need to update your pip in your pycharm for duing that you just need to double click on pip in project interpreter now before clicking on install package just check the box of specify version and then click install package, now do the same step for setuptools(some time it will show some error but eventually it will update your pip & setuptools). now while adding opencv again check the box of specify version
@ramanmishra2013
@ramanmishra2013 5 жыл бұрын
try installing numpy before opencv it helped me
@xala973
@xala973 4 жыл бұрын
@@satyambhargav9661 thanks! that worked for me. finally
@ekoziko9111
@ekoziko9111 4 жыл бұрын
@@satyambhargav9661 Worked great thanks!
@ajinzrathod
@ajinzrathod 4 жыл бұрын
How can I set ctrl + s to save image instead of only S
@akhileshdhindsa8830
@akhileshdhindsa8830 4 жыл бұрын
I don't think u can..in ord() method you can pass only a character.
@Chiller-wx6gp
@Chiller-wx6gp Жыл бұрын
really well explained sir 🙏
@kushagra4379
@kushagra4379 4 жыл бұрын
In pycharm Id I will try to installation of opencv that shows the error like"Error occurred when installing package " also it is showing " Could not find a version that satisfies the requirement opencv-python (from versions: ) No matching distribution found for opencv-python"". please help me
@malak4542
@malak4542 3 жыл бұрын
I have the same problem
@kushagra4379
@kushagra4379 3 жыл бұрын
@@malak4542 I had the same problem, what it did was first upgrading pip using pip install --upgrade pip. then I opened C:\Users\kusha\PycharmProjects\opencv\venv\Scripts> where kusha is my username. you can use cd command to reach this location. then type python -m pip install -upgrade pip and wait for the operation. then try to install the package from pycharm. I searched this comment of mine, I had commented this a year back, hope it helps
@lakshmitejaswi7832
@lakshmitejaswi7832 4 жыл бұрын
will we crop a image at specific region will the image pixel or intensity changes? when i am cropping i am getting blur images
@ssgoh4968
@ssgoh4968 4 жыл бұрын
Super good tutor. Thank you
@Praveenkumar-pm9ss
@Praveenkumar-pm9ss 3 жыл бұрын
how to get two consecutive frame of video, so that we can get similarity between two frames continuosly on video
@FunnyPantsTV124
@FunnyPantsTV124 3 жыл бұрын
how would i go about displaying an image randomly from a folder? I've only been able to get my code to output filenames instead of displaying them
@tisick8448
@tisick8448 2 жыл бұрын
Very nice video.. helped me
@rajeshkumar2782
@rajeshkumar2782 3 жыл бұрын
Really Helpful in 2021
@manishjadhav6685
@manishjadhav6685 3 жыл бұрын
thanks man..am searching for path reading ... so that i can import the image using path directly
@sheheryartanveer6619
@sheheryartanveer6619 3 жыл бұрын
How can ye import Datasets of images ?
@manjuhm7952
@manjuhm7952 4 жыл бұрын
Brother if you press any key instead of "esc and s" key window is closing.if possible check it once and guide me
@namandhamani9405
@namandhamani9405 4 жыл бұрын
I am getting cv2.cv2 has no attribute what should i do
@anandraj-xj5ge
@anandraj-xj5ge 5 жыл бұрын
I'm getting a error while installation if opencv-python
@rahulshukla5033
@rahulshukla5033 5 жыл бұрын
operating system ?
@anandraj-xj5ge
@anandraj-xj5ge 5 жыл бұрын
@@rahulshukla5033 windows
@rahulshukla5033
@rahulshukla5033 5 жыл бұрын
can you paste the error
@satvoholic8300
@satvoholic8300 5 жыл бұрын
@@rahulshukla5033 i am getting this error : Collecting opencv-python Could not find a version that satisfies the requirement opencv-python (from versions: ) No matching distribution found for opencv-python
@Abdullah57561
@Abdullah57561 5 жыл бұрын
@@satvoholic8300 I got the same Erorr
@suye87
@suye87 2 жыл бұрын
Excellent video
@ramananallabelli494
@ramananallabelli494 4 жыл бұрын
Thank you so much☺☺☺☺☺☺☺☺
@naitikdalwadi1793
@naitikdalwadi1793 2 жыл бұрын
I am using IDLE for OpenCV. In this, I do not need to write cv2.waitKey(0) for the image's continuous appearance. It is by default appears for infinite time. So, is there any other function, which works the same as waitKey function?
@JiseonKim
@JiseonKim 4 жыл бұрын
Should I install python again if I want to use pycharm?
@idlconferencecentreknust6648
@idlconferencecentreknust6648 4 жыл бұрын
No
@t-macpie1410
@t-macpie1410 4 жыл бұрын
use Visual Studio Code, got error but code run fine. (can't keep it like this it may cause confusion later) switch to Pycharm can't even install opencv-python error try upgrade pip. error a long error. try install opencv ...successfully. when it works in a wildcard situation make me really paranoid. it is like when 1+1 isn't equal 2 and nothing make any sense at all. =.=
@ericosterlund
@ericosterlund 4 жыл бұрын
lolololol same! i mean... after doing a bunch of the aboves xP
@chwa_shin
@chwa_shin 2 жыл бұрын
Thank you for your excellent video 😊☺️
@DarshanGhorpade7
@DarshanGhorpade7 4 жыл бұрын
Hey how to apply thickening on a binary image in opencv
@shubhamsharma-px5fu
@shubhamsharma-px5fu 3 жыл бұрын
when i'am running code then image is not showing but matrix or array is showing
@Criegrrunov
@Criegrrunov 4 жыл бұрын
To anyone getting a Non-zero exit code (1) error, try using an older version of Python as a project interpreter, as far as I know, Python 3.7 and more recent versions do not work with OpenCV yet, I am currently using Python 3.6 and it works normally.
@bismakhalid7032
@bismakhalid7032 4 жыл бұрын
I've installed python 3.8 should I uninstall this version? Cuz I'm getting the same error
@muhammadsafiullah8428
@muhammadsafiullah8428 5 жыл бұрын
Thank you for uploading this tutorial for free.
@akshatagupta9165
@akshatagupta9165 4 жыл бұрын
Error:Non-zero exit code (1)
@Shreemilk
@Shreemilk 4 жыл бұрын
select existing interpreter manually
@sanjayreddyj3276
@sanjayreddyj3276 4 жыл бұрын
@@Shreemilk how to manually do it
@kushagra4379
@kushagra4379 4 жыл бұрын
i had the same problem, what it did was first upgrading pip using pip install --upgrade pip. then I opened C:\Users\kusha\PycharmProjects\opencv\venv\Scripts> where kusha is my username. you can use cd command to reach this location. then type python -m pip install -upgrade pip and wait for the operation. then try to install the package from pycharm
@nikhilpatro5905
@nikhilpatro5905 4 жыл бұрын
@@kushagra4379 thank you so much...btw can you please explain what went wrong before?
@kushagra4379
@kushagra4379 4 жыл бұрын
@@nikhilpatro5905 first tell, did the process work perfectly or not?
@srikrithibharadwaj6779
@srikrithibharadwaj6779 5 жыл бұрын
Clear and perfect explanation. Thank You so much for this wonderful session Sir 🙏🏻👍🏻👌🏻
@dileepgowda4859
@dileepgowda4859 4 жыл бұрын
In pycharm Id I will try to installation of opencv that shows the error like"Error occurred when installing package ".My python version is 3.8 plz help me
@kushagra4379
@kushagra4379 4 жыл бұрын
i had the same problem, what it did was first upgrading pip using pip install --upgrade pip. then I opened C:\Users\kusha\PycharmProjects\opencv\venv\Scripts> where kusha is my username. you can use cd command to reach this location. then type python -m pip install -upgrade pip and wait for the operation. then try to install the package from pycharm. if the problem persists then contact me
@OnlyFood-i5l
@OnlyFood-i5l 4 жыл бұрын
What is numpy.core multarray fails to import erro
@jn14624
@jn14624 5 жыл бұрын
imwrite() hangs and i doesn't create a copy?
@jijobuje
@jijobuje 3 жыл бұрын
What is the point of k==27? I couldn't understand that.
@jijobuje
@jijobuje 3 жыл бұрын
I've learned. 27 means ESC in cv2 language and for example 32 for space or even 2490368 for up key. Every key has a number.
@unemployedcse3514
@unemployedcse3514 4 жыл бұрын
Awesome bro 💞
@aprameyamandal4346
@aprameyamandal4346 4 жыл бұрын
16:03 If I press any key its going to disappear
@davidhermawan942
@davidhermawan942 4 жыл бұрын
is there anyone to help me. When I tried to press except 'esc' & 's', the image was also closed or destroy all windows. my question is how if we press except 'esc' and 's' then the image is not closed. I tried using 'else' in condition function after 'elif' but it could'nt work.
@tanmays9653
@tanmays9653 5 жыл бұрын
Sir in k == 27: whatever I type the key in keyboard other than 's' it destroys the window. Can you tell me why?
@devenderchaudhary7962
@devenderchaudhary7962 5 жыл бұрын
Facing the same situation, please let know if any body know the reason.
@davidhermawan942
@davidhermawan942 4 жыл бұрын
I had the same problem. how it could hapen too
@imaparna17
@imaparna17 5 жыл бұрын
I want to know that without using if else statement if I press esc key then also we can exit from the image. so why you are using this statement.
@TheQuickUplifts
@TheQuickUplifts 5 жыл бұрын
This might be depending on the IDLE you're using. Generally, pressing escape doesn't just work.
@imaparna17
@imaparna17 5 жыл бұрын
@@TheQuickUplifts ok thanks
@shwetachaudhary8265
@shwetachaudhary8265 4 жыл бұрын
In old version +is not opening why?
@anujrawat3626
@anujrawat3626 3 жыл бұрын
how does k==27 means ESC?
@shivanmohammed9025
@shivanmohammed9025 5 жыл бұрын
Print (' I salute you ')
@roiinbar907
@roiinbar907 5 жыл бұрын
Got an error while trying to imshow, the error is: cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:651: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa 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' I would appreciate any help.
@someoneneedsbeer2994
@someoneneedsbeer2994 4 жыл бұрын
Dont copy the file into the project, use img = cv.imread('C:/Users/user/Desktop/opencv-master/opencv-master/samples/data/lena.jpg', 1) instead. Watch out for / and \. U have to use an / and not a \ for a new directory Then u use: cv.imshow('Test', img) There we go :) cv.imwrite('C:/Users/user/Desktop/opencv-master/opencv-master/samples/data/lena_copy.png', img) for the imwrite process!
@humayunnasir6261
@humayunnasir6261 4 жыл бұрын
Good Video. Thanks Alot.
@iamodhay
@iamodhay 4 жыл бұрын
Please use dark theme. It would help eyes to watch your videos for a longer time. 👍
@BFnotes
@BFnotes 4 жыл бұрын
it would be better idea to show us how to install PyChram because i'm messing with too much options
@CGRB
@CGRB 4 жыл бұрын
Awesome tutorials
@hanafizahanafi2475
@hanafizahanafi2475 5 жыл бұрын
Thank u so much for the teaching. Help me a lot
@RaghunathTambde
@RaghunathTambde Жыл бұрын
I just changed the file path, and got an error on imshow, I really don't understand what is going on there, if it was something about path then it should have returned None, help me Senpai
@codeaxen
@codeaxen 5 жыл бұрын
Great Tutorials ProgrammingKnowledge Thanks ...am Looking to it Python made Easy
@Quiet_Fox7
@Quiet_Fox7 7 ай бұрын
Thank you!
@harsh_dn
@harsh_dn 4 жыл бұрын
The image isn't loading, a gray window appears and blue circle is rotating continuously Help please
@rustamtemirov3156
@rustamtemirov3156 4 жыл бұрын
Hey man, what does "27:" mean?
@vorpalblade
@vorpalblade 4 жыл бұрын
27 is the escape key.
@Dentechnocollection
@Dentechnocollection 4 жыл бұрын
ASCII equivalent of ESC key
@SaifaldeenSAH
@SaifaldeenSAH 5 жыл бұрын
Great! Please continue
@techtalk668
@techtalk668 5 жыл бұрын
Nice work brother thanks
@adityagonella8383
@adityagonella8383 4 жыл бұрын
why always value of 27 is taken??
@jatingarg7383
@jatingarg7383 5 жыл бұрын
When I tried to install open CV package on pycharm it showing error, what I have to do now
@JaikishanJaikumar
@JaikishanJaikumar 4 жыл бұрын
@@ousmancamara2870 yeah ur right man. even i faced same problem
@japanrock100
@japanrock100 5 жыл бұрын
im lost, have i download the opencv on my computer?, cause i have follow all your videos but i cant find the opencv on my computer help!
@yobro7051
@yobro7051 5 жыл бұрын
He did not show how to download open cv on pycharm .
@nikaguladishvili5699
@nikaguladishvili5699 5 жыл бұрын
@@yobro7051 you dont download it on pychar,its already there,you just have to install it in your project via import
@aleenarao8499
@aleenarao8499 4 ай бұрын
I don't clear where you open open cv
@oKeFoi
@oKeFoi 4 жыл бұрын
'cv2' has no 'imread' member
@rtr195807
@rtr195807 5 жыл бұрын
many thanks for your work!
@himanshushekhar26
@himanshushekhar26 5 жыл бұрын
Thanks for this great tutorial
@vic_dpewang9079
@vic_dpewang9079 5 жыл бұрын
I noticed that the imported image had to be under same level as the py flie, or the imread not gonna work
@agatafilipczak1063
@agatafilipczak1063 5 жыл бұрын
thank you! that was helpful!
@rickmeister2662
@rickmeister2662 5 жыл бұрын
It can does have to be. I have my images in a seperate folder. As long as you write the correct path to the image it should work fine.
@ClevergunsYT
@ClevergunsYT 5 жыл бұрын
Nice
@rachadlakis1
@rachadlakis1 2 жыл бұрын
THank you :)
How To Install OpenCV 4 for Python on Ubuntu Linux
7:22
ProgrammingKnowledge
Рет қаралды 144 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,7 МЛН
R vs Python
7:07
IBM Technology
Рет қаралды 342 М.
OpenCV Course - Full Tutorial with Python
3:41:42
freeCodeCamp.org
Рет қаралды 4 МЛН
5 Python Libraries You Should Know in 2025!
22:30
Keith Galli
Рет қаралды 68 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,6 МЛН
Image Processing with OpenCV and Python
20:38
Rob Mulla
Рет қаралды 188 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН