Image Processing with OpenCV and Python

2024 ж. 28 Сәу.
115 242 Рет қаралды

In this Introduction to Image Processing with Python, kaggle grandmaster Rob Mulla shows how to work with image data in python! Python image processing is very important for anyone interested in computer vision and data science. Using the popular python packages matplotlib and opencv you will learn how to open image data, how the data is formatted, some ways to manipulate the data and save it off in a different format. If you enjoy you can also check out my live twitch streams (below). Image data is extremely powerful especially with machine learning and computer vision techniuqes becoming more common. Learn about this important part of your data science toolbelt!
Timeline
00:00 Intro
00:57 Imports
02:06 Reading in Images
04:20 Image Array
06:22 Displaying Images
07:14 RGB Representation
09:40 OpenCV vs Matplotlib imread
11:50 Image Manipulation
13:26 Resizing and Scaling
16:25 Sharpening and Blurring
19:03 Saving the Image
20:17 Outro
The notebook used in this video: www.kaggle.com/robikscube/wor....
Follow me on twitch for live coding streams: / medallionstallion_
Intro to Pandas video: • A Gentle Introduction ...
Exploritory Data Analysis Video: • Exploratory Data Analy...
Working with Audio data in Python: • Audio Data Processing ...
* KZhead: youtube.com/@robmulla?sub_con...
* Discord: / discord
* Twitch: / medallionstallion_
* Twitter: / rob_mulla
* Kaggle: www.kaggle.com/robikscube
#python #matplotlib #opencv #computervision #datascience

Пікірлер
  • Using this to help with a final project for an intro to ML class in university. Really helpful to have such a well organized set of explanations. Even with small errors mentioned in the comments this is a really helpful resource. Thanks for your work Rob!

    @MrChaluliss@MrChaluliss Жыл бұрын
    • Love that you found the video helpful. You should share it with the rest of your class! And have them share…. 😁

      @robmulla@robmulla Жыл бұрын
  • Hi Rob, I want to thank you for sharing your videos. I' ve found them very useful to start my way on data science. Cheers from Argentina!.

    @carloscaretti6223@carloscaretti62235 ай бұрын
  • Thanks again Rob... Always very high quality content and lessons!

    @FilippoGronchi@FilippoGronchi2 жыл бұрын
    • Thanks Filippo!

      @robmulla@robmulla2 жыл бұрын
  • Great video! Looking forward to watching more videos like this one. Wish you all the best ❤️

    @princekha4540@princekha45402 жыл бұрын
    • Thanks so much Kha! I'm glad you found the video helpful.

      @robmulla@robmulla2 жыл бұрын
  • compiler company should sponsor people like this, it will legit be the easiest way to get their compiler attention. Also thank you for making these videos and sharing your knowledge like this. Used it to unstuck myself for a uni project.

    @johnbalatan8030@johnbalatan803028 күн бұрын
  • Excellent introductory video, well done. I'm highly motivated to go off and explore now.

    @got2bharmony@got2bharmony Жыл бұрын
    • “Curiosity driven data science” is the mission statement of my channel. This comment makes me so happy because this video inspired you to be curious!

      @robmulla@robmulla Жыл бұрын
  • The representation of topic was very clear, precise and nice. I wish to see such tutorial on color image processing with wavelet transform and quaternions color image processing. Please make such video if possible. Thank you for such nice video

    @awnikantdubey3133@awnikantdubey31337 ай бұрын
  • Awesome video, thanks man

    @arthurleaoteles9190@arthurleaoteles91907 ай бұрын
  • Great video as always!!

    @gangxaaku@gangxaaku2 жыл бұрын
    • I apprecaite that a lot Akshat!

      @robmulla@robmulla2 жыл бұрын
  • Hi, just a correction, in the blurring section, to generate a more blurred image you need to change the size of the kernel too, not just divide for a large number, that's why you get a darker image instead of a blurred one. Thanks for the video.

    @devoock@devoock Жыл бұрын
    • Excellent point. Thanks for pointing that out.

      @robmulla@robmulla Жыл бұрын
    • Change the size to what? How does it have to match the number you divide by?

      @bofa722@bofa7224 ай бұрын
  • Mr Mulla, you are not a genius, you are a god ! Thanks for the inspiration !

    @dbo8703@dbo870324 күн бұрын
  • thank you for your tutorial. What if I want to create for example animations based on the numpy array of an image. What next steps you suggest? Thanks!

    @meitoli@meitoli Жыл бұрын
  • @02:44: one second of OCD. Thank you!!!

    @gouthamm@gouthamm10 ай бұрын
  • Thanks for your video 😊

    @maryamkhorramdel8149@maryamkhorramdel8149 Жыл бұрын
    • Thanks for watching!

      @robmulla@robmulla Жыл бұрын
  • Hi Rob thanks for the tutorial! Can you make one on analyzing trends with a large volume of images, common colors, materials, objects etc ?

    @mercedessanchez2025@mercedessanchez2025Ай бұрын
  • Thanks for your videos! I recently started watching your videos, and kaggle keeps failing to save my draft and I lose my notes, what can I do about this?

    @pythonicd1239@pythonicd1239 Жыл бұрын
  • Nice intro video. If you wanted future video suggestions, can you dive a bit deeper into how to manipulate those numpy arrays that contain image data? So things like np.transpose, np.where, using zip to extract pairs of coordinates, and so on. I know some of this isn't opencv perse, but that knowledge seems key to doing more complicated image processing, object detection, etc.

    @kmonyt@kmonyt Жыл бұрын
    • Thanks for the suggestions. Diving deeper into numpy expressions would be important when working with images in numpy format. Maybe in the future I could cover it.

      @robmulla@robmulla Жыл бұрын
    • i was thinking in using the image numpy array to create animations programmatically manipulating the values. Sounds coherent?

      @meitoli@meitoli Жыл бұрын
  • Hello teacher. I have a question. Why the numpy array of PNG image have range 0~1, JPG have range from 0~255?

    @aoVanPhu@aoVanPhu10 ай бұрын
  • Really good presentation and content flow. I think THIS video would have been better without the kernel bits since it wasn't clear what the numerical values (of the kernels) were doing. A video focusing on kernels would actually be excellent all on it's own (with a deeper dive into them and what they're doing). Overall, still an excellent video though! Thanks!

    @moose304@moose3042 жыл бұрын
    • Thanks Dan, that's great feedback. I'm glad you liked the overall flow of the video. Now that you mention it the kernel stuff at the end was a bit forced. I keep trying to remind myself that short and sweet videos are better than overloading with too much information. Thanks for the feedback and I'll keep that in mind for the next video!

      @robmulla@robmulla2 жыл бұрын
  • Hi Rob, just a quick novice's question. What are the advantages/disadvantages using Matplotlib vs OpenCV? Or in other words, what situation which library is better? I'm happy to find your tutorial, you aren't speaking like you have to win a "fastest talking competition" and you really share the principal informations leaving us to look into further details if necessary. (I'm not an Egnlish native)

    @Glanmire3@Glanmire3 Жыл бұрын
    • Thanks for the feedback. The two libraries are very different and only really overlap in their ability to read and display images. OpenCV is a powerhouse for all things computer vision. Matplotlib can do plotting of data and some image processing.

      @robmulla@robmulla Жыл бұрын
  • # Dear Rob, thank you for sharing, you knowledge, it would be very helpful if we could apply given tutorials, on some kaggle competitions

    @AkaExcel@AkaExcel2 жыл бұрын
    • Thanks Aka. I'm still working up towards more advanced machine learning videos but hope to get to them in the future. Hopefully this video is still helpful for anyone brand new to image data working on an image kaggle competition.

      @robmulla@robmulla2 жыл бұрын
  • hi please i need help with a topic speaker identification in python. how convert dataset to array two dimension

    @mahaadnan85@mahaadnan8511 ай бұрын
  • Kindly make a video on a cardiomyocyte Data Analysis using Python.

    @ibrahimenahoro4393@ibrahimenahoro4393Ай бұрын
  • thanks, great video ! just a correction though - when you make the image smaller by x in each axis you actually make the whole image x^2 times smaller

    @ronbzalen@ronbzalen Жыл бұрын
    • Oh, great point! Thanks for pointing that out.

      @robmulla@robmulla Жыл бұрын
  • please do tutorial of this with tar file. am trying to open a custom dataset with tar file. having trouble opening

    @LuffyMonkey0327@LuffyMonkey032710 ай бұрын
  • Plz use geotiff images for GIS use as well in next lecture.

    @IAKhan-km4ph@IAKhan-km4ph4 ай бұрын
  • hello sir, can you make a video for image processing with opencv using python

    @jethjesuschild@jethjesuschild11 ай бұрын
  • Is it work for svg format

    @fuadalhasan1784@fuadalhasan17848 ай бұрын
  • Would be great if you could have explained how to flip an image with the usage of pixels

    @akindukalhan8755@akindukalhan8755 Жыл бұрын
    • Thanks for watching. It should be really easy to do manually using numpy.flip or you could flip using the built in cv2. Here is the numpy documentation you would just need to select the correct axis: numpy.org/doc/stable/reference/generated/numpy.flip.html

      @robmulla@robmulla Жыл бұрын
  • Dear data 👨‍🔬 Let me know about initial image data for face and accidental face data to find the difference in uaing open cv and matplotlib🎉please sir

    @Garuda_Vigyan@Garuda_VigyanАй бұрын
  • For a university project, I must read a car registration with Python, get its characters. I don't know if you are interested in doing something with this. A camera that reads the car registration, collects the characters and can use those characters to compare it in a database.

    @diegofernandogiraldoportil6572@diegofernandogiraldoportil6572 Жыл бұрын
    • Sounds like a cool project. I’ve been asked this type of question a lot so maybe I’ll try to make a video about it. Good luck!

      @robmulla@robmulla Жыл бұрын
    • @@robmulla thanks for answering. You are very good teaching I am from Colombia and the automatic translator works very well. I can read everything you say in the videos and really teach too well. Congratulations.

      @diegofernandogiraldoportil6572@diegofernandogiraldoportil6572 Жыл бұрын
  • Wonderful tutorial! But upscaling width and height 10 times simultaneously doesn't make the image 10 times bigger, but 100 times bigger

    @rogertang9446@rogertang9446 Жыл бұрын
  • Do one with detecting different colors within a pic

    @kerem54545454@kerem545454545 ай бұрын
  • Why use OpenCV instead of Scikit-Image?

    @pankajchand6761@pankajchand67619 ай бұрын
  • How can I link this model with interface I need your help please reply to me In the fastest time

    @user-qc4go5jp2y@user-qc4go5jp2y3 ай бұрын
  • I'm from Pakistan your best video for welcome

    @GOKZAID@GOKZAIDАй бұрын
  • 13:22 Gray scale but also negative

    @timeWaster76@timeWaster763 ай бұрын
  • hi thanks for this video,this video has 5 likes.😃

    @mehdismaeili3743@mehdismaeili37432 жыл бұрын
    • Thank you too. Hope you liked it!

      @robmulla@robmulla2 жыл бұрын
  • Which interface are you using? Is it google colab pro

    @ZubairKhan-bn8ow@ZubairKhan-bn8ow Жыл бұрын
    • This is a kaggle notebook. Check out my tutorial on jupyter notebooks and I explain my setup.

      @robmulla@robmulla Жыл бұрын
  • what is that platform u using?

    @hanzozohan6009@hanzozohan6009 Жыл бұрын
    • Linux.

      @robmulla@robmulla10 ай бұрын
  • I think the chanel images are inversed like a negative

    @octavstanculescu1100@octavstanculescu1100 Жыл бұрын
    • Oh yea? Do you mean with RGB?

      @robmulla@robmulla Жыл бұрын
    • I mean like the negative on a film photography

      @octavstanculescu1100@octavstanculescu1100 Жыл бұрын
  • sneaky suplots to subplots @6:49

    @andrejtursky1551@andrejtursky1551 Жыл бұрын
    • Nice catch! Must have fixed it and edited that part out 😅

      @robmulla@robmulla Жыл бұрын
    • @@robmullayeah xd, but anyway thank you for your videos and Happy new year from the future! pd.Timestamp.now(tz='Etc/UTC+1')

      @andrejtursky1551@andrejtursky1551 Жыл бұрын
  • It looks like you are working in Linux. I have job interview. The source data come from TV. Can you teach me?

    @ChezChicago@ChezChicago Жыл бұрын
    • Yes I use Linux. My Chanel is my teaching. Hope you find it helpful.

      @robmulla@robmulla Жыл бұрын
  • How do masks work?

    @Cal97g@Cal97g Жыл бұрын
    • Depends what type of mask we are talking about...

      @robmulla@robmulla Жыл бұрын
  • python is for fast prototyping, not for long lasting code.... new releases of whatever in python kills previous code.... what a shame!!!!

    @jessidleonvelezgutierrez3645@jessidleonvelezgutierrez3645 Жыл бұрын
    • Gotta love heavy abstractions

      @hanss1754@hanss17543 ай бұрын
KZhead