Это видео недоступно.
Сожалеем об этом.

How to Crop and Resize Images [3] | OpenCV Python Tutorials for Beginners

Поделиться
HTML-код
  • Опубликовано: 13 авг 2024
  • In this video, we will look at how an image can be resized and cropped. We will also learn about the convention of the OpenCV image matrices.
    🚀🚀 My Urdu/Hindi AI RUclips Channel 🚀🚀
    / @murtazahassan01
    Code & Complete Course:
    coming soon
    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.computervi...
    👉 My PC Specs 🖥️: www.computervi...
    👉 My Video Shooting Gear📽️ : www.computervi...
    👉 My Laptops 💻: www.computervi...
    👉 Educational Products🧑‍🎓: www.computervi...
    👉 RUclips Starter Kit 🔴: www.computervi...
    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

Комментарии • 30

  • @zishanshaikh3029
    @zishanshaikh3029 2 года назад +1

    Great video dude !

  • @datascienceandmachinelearn2537
    @datascienceandmachinelearn2537 2 года назад +1

    Hei Murtaza, I need an advice fo my bachelor project. I follow your amazing course,please help me as your loyal follower. I will create an obscure view detection model that detects the loss of vision in cameras of autonomous vehicles caused by fog, condensation, and blaze, especially for sea vehicles. Can you suggest a model, thesis, article, dataset on this subject, please?

  • @sanjaybalasubramanian9468
    @sanjaybalasubramanian9468 3 года назад +4

    How to find x and y values for cropping?

  • @rajeshprajapati2192
    @rajeshprajapati2192 3 года назад +1

    Thank You 😊 So Much Your Video Is Tooooooo Helpful!!!

  • @tymothylim6550
    @tymothylim6550 3 года назад +1

    Thank you for the video Murtaza :)

  • @vinaybhargav3373
    @vinaybhargav3373 3 года назад +1

    Bro what is the configuration of your system

  • @riyapalkar1178
    @riyapalkar1178 3 года назад

    Hi , can you plzs help
    That how to define a method for cropping image and Using that method in Button . In Tkinter

  • @ishankrajpal8231
    @ishankrajpal8231 2 года назад

    can anyone tell me why this code is not working,it says process finished but no image shows up .(doc is present in resources folder)
    import cv2
    path = 'resources/doc.jpg'
    img = cv2.imread(path)
    print(img.shape)
    width,height = 400,400
    imgresize= cv2.resize(img,(width,height))
    print(imgresize.shape)
    cv2.imshow('doc',img)
    cv2.imshow('resizedImg',imgresize)
    cv2.waitKey(0)

  • @dilmukhammed7706
    @dilmukhammed7706 3 года назад

    Thanks so much

  • @shaqeel7mohds
    @shaqeel7mohds 4 года назад +1

    Hello Sir, nice one, can we do this in a tkinter gui? Kindly share.

    • @murtazasworkshop
      @murtazasworkshop  4 года назад

      yes its possible. i dont have a plan to currently make tutorials on tkinter. but i will look into it.

  • @NoahElRhandour
    @NoahElRhandour 3 года назад

    u got a nice voice

  • @jerickfermo8321
    @jerickfermo8321 3 года назад

    AttributeError: 'NoneType' object has no attribute 'shape'
    following attrib not defined yet how it works?

  • @DevAjays
    @DevAjays 5 месяцев назад +1

    just go to notification and then snipping tool 🤓⬆
    i made clas h of clans edit lol with opencv

  • @darshanghorpade9590
    @darshanghorpade9590 3 года назад +1

    Hey how to apply thickening on a binary image in opencv

  • @armagan_gok
    @armagan_gok 3 года назад

    I got this error:
    TypeError: 'numpy.ndarray' object is not callable

  • @shrijanmaram7939
    @shrijanmaram7939 4 года назад

    Hi sir, why my program doesn't open the image? Is it because I'm using a mac?

    • @murtazasworkshop
      @murtazasworkshop  4 года назад

      This should work with mac as well. make sure your image is in the same folder as your script file.

  • @sanjaybalasubramanian9468
    @sanjaybalasubramanian9468 3 года назад

    Please use white theme for tutorials

  • @prilaogniler2790
    @prilaogniler2790 4 года назад

    Thank you for this Sir.By the way Sir can you help about this error that I've encounter. Thanks :)
    Traceback (most recent call last):
    File "C:/Users/Spring/PycharmProjects/OpenCV/venv/ResizeCropImage.py", line 5, in
    print(img.shape)
    AttributeError: 'NoneType' object has no attribute 'shape'

    • @murtazasworkshop
      @murtazasworkshop  4 года назад

      It seems your img is empty . if you will print out img using print(img) it will show you NONE. This means the import of the image has failed .
      To solve this check your path of the image . if its in the main directory . use
      img = cv2.imread(''imageName.jpg'').
      If the problem is still there . Share your code and i will have a look .

    • @prilaogniler2790
      @prilaogniler2790 4 года назад

      @@murtazasworkshop Hi Sir. Here's the code same as your code I just change the image filename.
      import cv2
      path = "Resources/lion1.jpg"
      img = cv2.imread("lion1.jpg") --------I change it but I encounter the same problem.
      print(img.shape)
      width ,height = 1000 , 1000
      imgResize = cv2.resize(img,(width,height))
      print(imgResize.shape)
      imgCropped = img[300:540,430:480]
      imgCropResize = cv2.resize(imgCropped,(img.shape[1],img.shape[0]))
      cv2.imshow("Lion1",img)
      cv2.imshow("Lion1 Resized",imgResize)
      cv2.imshow("Lion1 Cropped",imgCropped)
      cv2.imshow("Lion1 Cropped Resized",imgCropResize)
      cv2.waitKey(0)

    • @murtazasworkshop
      @murtazasworkshop  4 года назад

      @@prilaogniler2790 your image might be png. Share a screen shot of ur directories if the problem stays . I will have a look.

  • @Dentechnocollection
    @Dentechnocollection 4 года назад

    Sir, How to add a border to the image without losing any information

    • @murtazasworkshop
      @murtazasworkshop  4 года назад +1

      you can create a new image with the extended border and then overlay the image in the middle. To create new image you can look into the shapes and text tutorial

  • @samirakhrif3098
    @samirakhrif3098 4 года назад

    sir how i crop video

  • @haniefknight
    @haniefknight 3 года назад

    my pycharm keep showing many lena pictures from previous tutorials... help

  • @kingoftennis94
    @kingoftennis94 2 года назад

    doesnt work