Real time Shape Detection using Contours [9] | OpenCV Python Tutorials for Beginners 2020

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024

ความคิดเห็น • 153

  • @sammydarden6104
    @sammydarden6104 2 ปีที่แล้ว +8

    Heres some of the code that was totally 'linked in the description'
    #im suffering
    def stackImages(scale, imgArray):
    rows = len(imgArray)
    cols = len(imgArray[0])
    rowsAvailable = isinstance(imgArray[0], list)
    width =imgArray[0][0].shape[1]
    height = imgArray[0][0].shape[0]
    if rowsAvailable:
    for x in range (0, rows):
    for y in range(0, cols):
    if imgArray[x][y].shape[:2] == imgArray[0][0].shape[:2]:
    imgArray[x][y] = cv2.resize(imgArray[x][y], (0,0), None, scale, scale)
    else:
    imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)
    if len(imgArray[x][y].shape) == 2: imgArray[x][y] = cv2.cvtColor(imgArray[x][y], cv2.COLOR_GRAY2BGR)
    imageBlank = np.zeros((height, width, 3), np.uint8)
    hor = [imageBlank]*rows
    hor_con = [imageBlank] *rows
    for x in range (0,rows):
    hor[x] = np.hstack(imgArray[x])
    ver = np.vstack(hor)
    else:
    for x in range(0,rows):
    if imgArray[x].shape[:2] == imgArray[0].shape[:2]:
    imgArray[x] = cv2.resize(imgArray[x], (0,0), None, scale, scale)
    else:
    imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0]), None, scale, scale)
    if len(imgArray[x].shape) ==2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)
    hor = np.hstack(imgArray)
    ver = hor
    return ver

  • @serjkp
    @serjkp 4 ปีที่แล้ว

    Моє шанування! Прекрасні уроки, дякую!

  • @renanstn7659
    @renanstn7659 3 ปีที่แล้ว +6

    I can't thank you enough for this!
    Incredible and very well explained tutorial

  • @ajaynair4657
    @ajaynair4657 4 ปีที่แล้ว +4

    Thank you so much for the clear explanation. I am currently working on a project,This will definitely help me.

  • @qzorn4440
    @qzorn4440 ปีที่แล้ว +1

    A most interesting OpenCV video. I have a new Orange Pi-5 SBC and would like to do some OpenCV Python examples on it. The Raspberry Pi-4 has a wealth of examples to practice with first. This wonderful Tutorial Shape Detection lesson [9] will be very helpful. 😎 Thank you.

  • @SubaBlubba
    @SubaBlubba 2 ปีที่แล้ว

    I appreciate the little adjustments before using the "main" feature detector more and more

  • @ankitpandeynitdurgapur9813
    @ankitpandeynitdurgapur9813 2 ปีที่แล้ว +1

    Thank you for explaining it in such an easy and simple way. A Must watch video for everyone. ❤️

  • @amandanamikata9600
    @amandanamikata9600 4 หลายเดือนก่อน

    i love you you are awesome, the best videos on youtube for computer vision!

  • @arnezor
    @arnezor 3 ปีที่แล้ว +3

    Can you give me the link for this course, the link in description just redirects me to the new website of yours. I cant find this particular project there. Thanks

  • @tomasaraujo1640
    @tomasaraujo1640 2 ปีที่แล้ว

    Thank you my friend. It took an hour to translate from python to C++ but I made it

  • @amandanamikata9600
    @amandanamikata9600 4 หลายเดือนก่อน

    omg you do it with no model lol awesome

  • @raushankumarrauniyar6170
    @raushankumarrauniyar6170 10 หลายเดือนก่อน

    GREAT TO HAVE THIS ON TH-cam SIR

  • @siddharthmodi2740
    @siddharthmodi2740 2 ปีที่แล้ว +1

    I am little confuse here? Is it calculating are of the bounding box around the object or area of the object itself?
    I think it's calculating of bounding box?
    Btw the tutorial is good ❤️💯

  • @jayantagrawal8325
    @jayantagrawal8325 2 ปีที่แล้ว +2

    Anyone knows how to find out the coordinates of the shapes detected? Any help would be really appreciated. Also the tutorial's really really helpful. Thanks!

  • @pierrealmhanna2226
    @pierrealmhanna2226 3 ปีที่แล้ว +1

    Thank you so much
    You help me to start with my final year project idea
    I just need to know how can I crop each rectangle and show it as many photos

  • @amandanamikata9600
    @amandanamikata9600 3 หลายเดือนก่อน

    Corrected piece of code:
    def stackImages(scale, imgArray):
    rows = len(imgArray)
    cols = len(imgArray[0])
    rowsAvailable = isinstance(imgArray[0], list)
    width =imgArray[0][0].shape[1]
    height = imgArray[0][0].shape[0]
    if rowsAvailable:
    for x in range (0, rows):
    for y in range(0, cols):
    if imgArray[x][y].shape[:2] == imgArray[0][0].shape[:2]:
    imgArray[x][y] = cv2.resize(imgArray[x][y], (0,0), None, scale, scale)
    else:
    imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)
    if len(imgArray[x][y].shape) == 2: imgArray[x][y] = cv2.cvtColor(imgArray[x][y], cv2.COLOR_GRAY2BGR)
    imageBlank = np.zeros((height, width, 3), np.uint8)
    hor = [imageBlank]*rows
    hor_con = [imageBlank] *rows
    for x in range (0,rows):
    hor[x] = np.hstack(imgArray[x])
    ver = np.vstack(hor)
    else:
    for x in range(0,rows):
    if imgArray[x].shape[:2] == imgArray[0].shape[:2]:
    imgArray[x] = cv2.resize(imgArray[x], (0,0), None, scale, scale)
    else:
    imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0].shape[0]), None, scale, scale)
    if len(imgArray[x].shape) ==2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)
    hor = np.hstack(imgArray)
    ver = hor
    return ver

  • @walidhassan5816
    @walidhassan5816 4 ปีที่แล้ว

    This Channel deserve more Subscribes than it has..!!

  • @zakariaabderrahmanesadelao3048
    @zakariaabderrahmanesadelao3048 4 ปีที่แล้ว +1

    exactly what i was looking for thank you a million! subbed

  • @arturkaczan1776
    @arturkaczan1776 4 ปีที่แล้ว +1

    Everything is clear now. Thanks :)

  • @TehJellyLord
    @TehJellyLord 3 ปีที่แล้ว +1

    What a great tutorial! You are really saving my grades right now! I've just gotta apply this to only the pip symbols on playing cards. Which of the links in the description leads to the imgStack function?

  • @googlecolab7388
    @googlecolab7388 ปีที่แล้ว

    by now, already have image stack function support by library? so we don't need your custime fuction? library function like below? stacked = np.hstack((frame, foregroundPart, frameCopy))

  • @user-px3gd3fz7t
    @user-px3gd3fz7t 3 ปีที่แล้ว +1

    Is this AWESOME! but i cant find this code in website,,,,, also i dont know this opencv's version,, i want slove error plz answer my Q i wait your answer,,

  • @yonathangov77
    @yonathangov77 3 ปีที่แล้ว +2

    could you post a git hub repository?

  • @tarektabba9726
    @tarektabba9726 4 ปีที่แล้ว

    I love your channel. Keep up the great projects!

  • @sumanachakraborty9559
    @sumanachakraborty9559 ปีที่แล้ว

    Thanks for the informative video, can u help me once...how could i label the individual objects? Actually i want to calculate how many objects and their total area.

  • @salix_qmeou
    @salix_qmeou 4 ปีที่แล้ว +2

    i'm tryng to run the code but i'm getting
    cv2.error: OpenCV(4.3.0) /io/opencv/modules/highgui/src/window_QT.cpp:462: error: (-27:Null pointer) NULL window handler in function 'icvFindTrackBarByName'

    • @saphead-invader3100
      @saphead-invader3100 4 ปีที่แล้ว +1

      Try pasting this error code in google or stack overflow you may get the answer

  • @UddhikaIshara
    @UddhikaIshara 2 ปีที่แล้ว

    Great tutorial Thank you very much, Unfortunately, The reference code is not available in the links. So i had to type all from the beginning.

  • @vihaanthebot429
    @vihaanthebot429 ปีที่แล้ว

    Can't you use the Numpy function "hstack" (like this: "images = np.hstack((img1, img2))") instead of creating a new function called "stackedImages" ?

  • @nitraautomation9426
    @nitraautomation9426 8 หลายเดือนก่อน

    How to detect object with position x,y and rotation angle alpha?

  • @mazlum7367
    @mazlum7367 9 หลายเดือนก่อน

    hi, whats happens the area value if object moving opposite the camare direction?

  • @phudinhtruong
    @phudinhtruong 3 ปีที่แล้ว +1

    Thank you your video help me alot

  • @albertalmonte6045
    @albertalmonte6045 2 ปีที่แล้ว +1

    When I click the link to get the code, it says the webpage has been moved. How can I obtain the code? Anyone has a direct link?

  • @mehrdadm.5804
    @mehrdadm.5804 8 หลายเดือนก่อน

    Greate tutorial, thanks lot

  • @lamnhatoan9944
    @lamnhatoan9944 5 หลายเดือนก่อน

    Thank you!

  • @YazeedAlkosai
    @YazeedAlkosai 3 ปีที่แล้ว

    great work Dr Murtaza, is it possible to like this work with think speak to show the detection of the object.thanks in advance

  • @pudu315
    @pudu315 2 ปีที่แล้ว

    It is really helpful. Thank you...

  • @dennyssantiago3165
    @dennyssantiago3165 2 ปีที่แล้ว

    Good contribution, I have a question, how you can transform the area that you get with the function into a value of square meters? Thank you

  • @pranavlad3319
    @pranavlad3319 3 ปีที่แล้ว +2

    Where is the code you just for the program on your site ? and please mention the installation process too.

    • @tlmyasirs
      @tlmyasirs 3 ปีที่แล้ว +2

      check his github

    • @kamathprajna
      @kamathprajna 3 ปีที่แล้ว

      @@tlmyasirs where is the image file 😭

    • @tlmyasirs
      @tlmyasirs 3 ปีที่แล้ว

      @@kamathprajna use any image

  • @AyieJosh
    @AyieJosh 2 ปีที่แล้ว

    i have a problem where if there's nothing is detected it will error. especially when i remove the object from camera view. it is either from lines convert into gray or in get contour lines where it says expecting 2 argument received 0.

  • @viralmakwana9848
    @viralmakwana9848 ปีที่แล้ว

    Hello sir,
    I have one doubt on ..."is it possible to identification of object in sort manner like....example on one table 5-6 different nd same objects are there, in that 2 glass are at different corners...so i want to show that was not proper that 2 glasses should be placed in one place. Like that i have to show through objects detection is it feasible?
    Looking for your suggestions
    Thank you

  • @sampritipatel8981
    @sampritipatel8981 3 ปีที่แล้ว

    Amazing tutorial! very insightful

  • @jamescurious1990
    @jamescurious1990 ปีที่แล้ว

    Hi, can We store the value of points and area of the object detected outside the for loop?

  • @cesarenriquevillarguerra8270
    @cesarenriquevillarguerra8270 ปีที่แล้ว

    First, I gave you a LIKE! , Second: I have a question, What code(s) can we use to get the poinst (x,y) of the shape to draw (after) the shape in Autocad?? Thanks for the answer!

  • @aminahnurulhuda
    @aminahnurulhuda 2 หลายเดือนก่อน

    import cv2
    import numpy as np
    framewidth = 640
    frameheight = 480
    cap = cv2.VideoCapture(0)
    cap.set(3, framewidth)
    cap.set(4, frameheight)
    def empty(a):
    pass
    cv2.namedWindow("Parameters")
    cv2.resizeWindow("Parameters", 640, 240)
    cv2.createTrackbar("Threshold1", "Parameters", 150, 255, empty)
    cv2.createTrackbar("Threshold2", "Parameters", 150, 255, empty)
    cv2.createTrackbar("Area", "Parameters", 5000, 30000, empty)
    def stackImages(scale, imgArray):
    rows = len(imgArray)
    cols = len(imgArray[0])
    rowsAvailable = isinstance(imgArray[0], list)
    width =imgArray[0][0].shape[1]
    height = imgArray[0][0].shape[0]
    if rowsAvailable:
    for x in range (0, rows):
    for y in range(0, cols):
    if imgArray[x][y].shape[:2] == imgArray[0][0].shape[:2]:
    imgArray[x][y] = cv2.resize(imgArray[x][y], (0,0), None, scale, scale)
    else:
    imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)
    if len(imgArray[x][y].shape) == 2: imgArray[x][y] = cv2.cvtColor(imgArray[x][y], cv2.COLOR_GRAY2BGR)
    imageBlank = np.zeros((height, width, 3), np.uint8)
    hor = [imageBlank]*rows
    hor_con = [imageBlank] *rows
    for x in range (0,rows):
    hor[x] = np.hstack(imgArray[x])
    ver = np.vstack(hor)
    else:
    for x in range(0,rows):
    if imgArray[x].shape[:2] == imgArray[0].shape[:2]:
    imgArray[x] = cv2.resize(imgArray[x], (0,0), None, scale, scale)
    else:
    imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0].shape[0]), None, scale, scale)
    if len(imgArray[x].shape) ==2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)
    hor = np.hstack(imgArray)
    ver = hor
    return ver
    def getContours(img, imgContour):
    contours, hierarchy = cv2.findContours(img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
    for cnt in contours:
    area = cv2.contourArea(cnt)
    areaMin = cv2.getTrackbarPos("Area", "Parameters")
    if area > areaMin:
    cv2.drawContours(imgContour, contours, -1, (255, 0, 255), 2)
    perimeter = cv2.arcLength(cnt, True)
    approx = cv2.approxPolyDP(cnt, 0.02 * perimeter, True)
    print(len(approx))
    x, y, w, h = cv2.boundingRect(approx)
    cv2.rectangle(imgContour, (x, y), (x+w, y+h), (0, 255, 0), 2)
    cv2.putText(imgContour, "Points: " + str(len(approx)), (x + w + 20, y + 20), cv2.FONT_HERSHEY_COMPLEX, 0.7, (0, 255, 0), 2)
    cv2.putText(imgContour, "Area: " + str(int(area)), (x + w + 20, y + 45), cv2.FONT_HERSHEY_COMPLEX, 0.7, (0, 255, 0), 2)
    while True:
    success, img = cap.read()
    imgContour = img.copy()
    imgBlur = cv2.GaussianBlur(img, (7, 7), 1)
    imgGray = cv2.cvtColor(imgBlur, cv2.COLOR_BGR2GRAY)
    threshold1 = cv2.getTrackbarPos("Threshold1", "Parameters")
    threshold2 = cv2.getTrackbarPos("Threshold2", "Parameters")
    imgCanny = cv2.Canny(imgGray, threshold1, threshold2)
    kernel = np.ones((5, 5))
    imgDil = cv2.dilate(imgCanny, kernel, iterations=1)
    getContours(imgDil, imgContour)
    imgStack = stackImages(0.8, ([img, imgBlur, imgCanny],
    [imgDil, imgContour, imgContour]))
    cv2.imshow("Result", imgStack)
    if cv2.waitKey(1) & 0xFF == 27: # Escape key
    break
    cap.release()
    cv2.destroyAllWindows()

  • @rutujalahoti5790
    @rutujalahoti5790 4 ปีที่แล้ว

    The area which is the output that is in mm ?And instead of area can we find height and width of that bounding box ? Please help..

  • @Ben.N
    @Ben.N 3 ปีที่แล้ว +1

    anyone got a link for the split windows function?

  • @Ben.N
    @Ben.N 3 ปีที่แล้ว +1

    nicely done :)

  • @felixmaas375
    @felixmaas375 2 ปีที่แล้ว

    Hi there! I have got a question: I am looking for an algorithm which gives a proposal on the region of interest in an image. Based on this proposal I want then to run an object detection. Is this video now more a "proposal on the region of interest" or is it alreday the "object detection"? Thanks! :-)

  • @testingtoolsco
    @testingtoolsco 3 ปีที่แล้ว

    this is really great video, just wondering as a next step can we name them as what are these objects? like detecting them as a certain type of object, that is classifying it as a car, scissors and rectangle etc? that will be great help

    • @anupambanerjee8336
      @anupambanerjee8336 3 ปีที่แล้ว

      Yolo does that for you.

    • @testingtoolsco
      @testingtoolsco 3 ปีที่แล้ว

      @@anupambanerjee8336 it does not do automatically, we have to train it, which is what i want to learn too

  • @kirubakirubakar2554
    @kirubakirubakar2554 3 ปีที่แล้ว

    If I use my normal laptop webcam is not detecting properly the objects. I have to take it really close to the screen, then I am getting the details properly. Is there anything wrong with how I am doing it

  • @meronabate8694
    @meronabate8694 3 ปีที่แล้ว

    helpful, but can contours used to detect texts from distorted image?

  • @surajtakkekar227
    @surajtakkekar227 ปีที่แล้ว

    Project is good ❤️....But How to detect size in mm like width and height ....

  • @busrabetten9040
    @busrabetten9040 ปีที่แล้ว

    Thanks a lot!

  • @eminpakdemir
    @eminpakdemir 2 ปีที่แล้ว

    You are the man.

  • @kaveeshamadhubhashana3094
    @kaveeshamadhubhashana3094 2 ปีที่แล้ว

    can i use this with infrared images to get animal's name as a output

  • @ericcute6471
    @ericcute6471 4 ปีที่แล้ว

    Great one.

  • @changelife2179
    @changelife2179 4 ปีที่แล้ว

    thanks for video!!

  • @donaldkimpoua2853
    @donaldkimpoua2853 4 ปีที่แล้ว

    thank you so much Murtaza's

  • @erinwolf1563
    @erinwolf1563 4 ปีที่แล้ว

    Thank you very much sir👍

  • @pythonner3644
    @pythonner3644 4 ปีที่แล้ว +1

    rather than stacking with this long function u can use numpy to that

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว

      The function is using numpy

    • @pythonner3644
      @pythonner3644 4 ปีที่แล้ว

      @@murtazasworkshop nah bro its a one line command

    • @pythonner3644
      @pythonner3644 4 ปีที่แล้ว +1

      vis = np.concatenate((img1, img2), axis=1)

    • @vitalityedge9406
      @vitalityedge9406 3 ปีที่แล้ว

      @@pythonner3644 thank you!

  • @humoruniverse6399
    @humoruniverse6399 3 ปีที่แล้ว

    why we used success,img at the 12th lines?

  • @Marcshields
    @Marcshields 3 ปีที่แล้ว

    Can you do a tutorial on detecting plants in real time?

  • @nikolauskopernikus7207
    @nikolauskopernikus7207 4 ปีที่แล้ว

    i love this video

  • @rahmandani2374
    @rahmandani2374 4 ปีที่แล้ว

    Bro, u have journal of this method? i mean finding contour

  • @XxRoxX511
    @XxRoxX511 4 ปีที่แล้ว

    Hi thank you for this , I have a quick question , why i have (invalid syntax) in( ; 0xFF) The last line

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว

      this is an html issue of the website. I will fix this. if you find 'amp' remove it.

  • @BiranchiNarayanNayak
    @BiranchiNarayanNayak 4 ปีที่แล้ว

    Nice tutorial !!

  • @3elmashy522
    @3elmashy522 4 ปีที่แล้ว

    How to get the summation of areas of more than one object ?

  • @byeolkim2685
    @byeolkim2685 4 ปีที่แล้ว

    Thank you very much@@
    I have a question about your video.
    I wanna detect shapes of objects from video files.
    so I add the code that below. But it doesn't work. what is the problem?
    cap = cv2.VideoCapture('../2.mp4')
    while True:
    success, img = cap.read()

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว +1

      Your file might not be in the correct folder. Try the code in the link for the video . github.com/murtazahassan/OpenCV-Python-Tutorials-for-Beginners/blob/master/Basics/Read_Image_Video_Webcam.py
      If you are still unable to run . Share the error message and i will have a look .

    • @byeolkim2685
      @byeolkim2685 4 ปีที่แล้ว

      Murtaza's Workshop - Robotics and AI Thank you for your kindness. 😊😊 It works well.

  • @makeitsimple2306
    @makeitsimple2306 4 ปีที่แล้ว

    Thanx so much 💔💔

  • @josecarloscruzcastaneda8056
    @josecarloscruzcastaneda8056 3 ปีที่แล้ว +1

    Great video bro, but, how can i know the area in cm2?

    • @dennyssantiago3165
      @dennyssantiago3165 2 ปีที่แล้ว +1

      Hola, has logrado conseguir información de como pasar el área que se obtiene a cm2?

    • @Tuncaycortez
      @Tuncaycortez ปีที่แล้ว

      @@dennyssantiago3165 can anyone learn

  • @dubito_joy
    @dubito_joy 2 ปีที่แล้ว

    thanks god

  • @ericcute6471
    @ericcute6471 4 ปีที่แล้ว

    Can you show us sir on how to compute the weight based on an image? Thanks

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว

      You could find it based on the area. if your environment is fixed.

    • @ericcute6471
      @ericcute6471 4 ปีที่แล้ว

      @@murtazasworkshop can you demo it Sir show how pls

  • @veekeshpydannah704
    @veekeshpydannah704 3 ปีที่แล้ว

    How can i use it for detecting only human contours please, i really need help on that.

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว

      I suggest you to check my Pose Estimation video

  • @jericreyechavez9
    @jericreyechavez9 4 ปีที่แล้ว

    Superb tutorial! Can you do a tutorial that can measure a height of a person using open cv ? Kind regards

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว +1

      I will look into it .

    • @jericreyechavez9
      @jericreyechavez9 4 ปีที่แล้ว

      @@murtazasworkshop Thank you. It will be a great help of my project in which the dealine is this coming feb haha.

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว +1

      @@jericreyechavez9 You can follow this tutorial ( th-cam.com/video/dZ4itBvIjVY/w-d-xo.html ) with the full body cascade which should give you a bounding box around a human body. Then u could used a fixed coefficient for pixel to cm to find the height. Your camera and target position should be fixed though.

    • @jericreyechavez9
      @jericreyechavez9 4 ปีที่แล้ว

      @@murtazasworkshop Thank you so much! You deserve more followers!

    • @jericreyechavez9
      @jericreyechavez9 4 ปีที่แล้ว

      @@murtazasworkshop But I will also love to watch your tutorial about this, if you're planning to.

  • @varshinimb491
    @varshinimb491 2 ปีที่แล้ว

    How can we detect only textboxes in an image

  • @namhunhyung1353
    @namhunhyung1353 3 ปีที่แล้ว

    thanks, how can i get cord?

  • @joyaljohnvi-d29
    @joyaljohnvi-d29 3 ปีที่แล้ว

    i can't find stackImage funtion code anywhere

  • @chakloongchong545
    @chakloongchong545 2 ปีที่แล้ว

    Your video is awesome, I can't find your code, can you share it?

  • @sarathkumar-gq8be
    @sarathkumar-gq8be 3 ปีที่แล้ว

    can we upload the images and find out the area of that image or pic, using that reference object

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว +1

      Yes i have a similar tutorial on this called object measurement.

    • @sarathkumar-gq8be
      @sarathkumar-gq8be ปีที่แล้ว

      @@murtazasworkshop here you represent the area in which format, because in video has 4digit and 5digit valuess , but i don't know the mm2 or cm2

  • @karlokajbasimanic8223
    @karlokajbasimanic8223 3 ปีที่แล้ว

    How can I use this to detect circle? Circle has infinite number of "points" so we cant use points for that.

    • @teslamodel314
      @teslamodel314 3 ปีที่แล้ว +1

      it seems a matter of how you aproximate the contour, and the shape you draw around it. Maybe there's a function to measure the angles between the segments, and maybe you can compare the are and the perimeter, to see if they are compatible with a circle.

  • @ishankrajpal8231
    @ishankrajpal8231 2 ปีที่แล้ว

    can anybody give me the stacking code..thanks.

  • @-C-ARBHARADWAJ
    @-C-ARBHARADWAJ ปีที่แล้ว

    where we must see the codes

  • @priyankavelumani3327
    @priyankavelumani3327 3 ปีที่แล้ว

    What is the use of it?

  • @baraalsaeed6865
    @baraalsaeed6865 2 ปีที่แล้ว

    thank you , but the link does not work

  • @otabek_dev
    @otabek_dev 3 ปีที่แล้ว

    How can i take the stack images function on the video ???

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว

      Follow the link in the description and go to chapter 6 .

    • @otabek_dev
      @otabek_dev 3 ปีที่แล้ว

      @@murtazasworkshop Thanks a lot 👍👍

  • @miguelguerreiro5280
    @miguelguerreiro5280 3 ปีที่แล้ว

    subbed

  • @sammydarden6104
    @sammydarden6104 2 ปีที่แล้ว

    By the way, the link you claimed to give in the video(s) are broken :). I had to copy 45 lines of complicated code from a freakinf 144p screen, and i just hope that nobody else had to go throught that, because by the end, i just gave up on the project entirely. I dont know how to get access to the code, but PLEASE PLEASE PLEASE FIX THE LINK!!!!!! (good video btw)

    • @sammydarden6104
      @sammydarden6104 2 ปีที่แล้ว

      def stackImages(scale, imgArray):
      rows = len(imgArray)
      cols = len(imgArray[0])
      rowsAvailable = isinstance(imgArray[0], list)
      width =imgArray[0][0].shape[1]
      height = imgArray[0][0].shape[0]
      if rowsAvailable:
      for x in range (0, rows):
      for y in range(0, cols):
      if imgArray[x][y].shape[:2] == imgArray[0][0].shape[:2]:
      imgArray[x][y] = cv2.resize(imgArray[x][y], (0,0), None, scale, scale)
      else:
      imgArray[x][y] = cv2.resize(imgArray[x][y], (imgArray[0][0].shape[1], imgArray[0][0].shape[0]), None, scale, scale)
      if len(imgArray[x][y].shape) == 2: imgArray[x][y] = cv2.cvtColor(imgArray[x][y], cv2.COLOR_GRAY2BGR)
      imageBlank = np.zeros((height, width, 3), np.uint8)
      hor = [imageBlank]*rows
      hor_con = [imageBlank] *rows
      for x in range (0,rows):
      hor[x] = np.hstack(imgArray[x])
      ver = np.vstack(hor)
      else:
      for x in range(0,rows):
      if imgArray[x].shape[:2] == imgArray[0].shape[:2]:
      imgArray[x] = cv2.resize(imgArray[x], (0,0), None, scale, scale)
      else:
      imgArray[x] = cv2.resize(imgArray[x], (imgArray[0].shape[1], imgArray[0]), None, scale, scale)
      if len(imgArray[x].shape) ==2: imgArray[x] = cv2.cvtColor(imgArray[x], cv2.COLOR_GRAY2BGR)
      hor = np.hstack(imgArray)
      ver = hor
      return ver
      #Your Welcome :)

    • @murtazasworkshop
      @murtazasworkshop  2 ปีที่แล้ว

      Thanks for letting me know. Stack image function can be found in Chapter 6 of the link below
      www.computervision.zone/courses/learn-opencv-in-3-hours/

  • @aysegulakman503
    @aysegulakman503 9 หลายเดือนก่อน

    ---------------------------------------------------------------------------
    NameError Traceback (most recent call last)
    in
    16
    17 imgStack = stackImages(0.8, ([img,imgGray,imgCanny],
    ---> 18 [imgDil,imgDil,imgDil]))
    19
    20
    I'm getting an error, what should I do?

  • @IkramAli-ze8um
    @IkramAli-ze8um 4 ปีที่แล้ว +1

    need stack function code

  • @smiley3753
    @smiley3753 4 ปีที่แล้ว

    I want to draw contour around my eye pupil only how to do it

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว

      you can use the face dlib to get the contours. If you want to use this method in the video, then its better to first detect the face and eye using the haarcascade method. (here is the tutorial).

  • @nabsmyfoot5308
    @nabsmyfoot5308 4 ปีที่แล้ว

    hi how can i get the full code for this?

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว

      follow the link in the description and enroll to get access to the code

  • @abiskardahal3288
    @abiskardahal3288 3 ปีที่แล้ว

    My image is so noisy how to remove noise

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว

      Usually depends on the type of noise. You can try median filter.

  • @marcinek656
    @marcinek656 4 ปีที่แล้ว

    Hey, can i have question for you on priv? 😀

    • @murtazasworkshop
      @murtazasworkshop  4 ปีที่แล้ว

      sure . you can contact me through this page. facebook.com/murtazasworkshop

  • @brkaya6778
    @brkaya6778 3 ปีที่แล้ว

    kaynak kod paylaş haci

  • @astar777
    @astar777 3 ปีที่แล้ว

    File "d:\J.A.R.V.I.S\jarvis.py", line 384, in
    getContours(imgDil, imgContour)
    File "d:\J.A.R.V.I.S\jarvis.py", line 172, in getContours
    cv2.rectangle(imgContour, (x, y), (x + w + y + h), (0, 255, 0), 5)
    TypeError: function takes exactly 4 arguments (2 given)
    I am getting this error pls help me.....
    (in that qr code script same error is coming named "TypeError: function takes exactly 2 arguments (3 given)
    I am using python 3.9.2

  • @hajar2629
    @hajar2629 4 ปีที่แล้ว

    Where code

  • @jayeshkumeriya5984
    @jayeshkumeriya5984 3 ปีที่แล้ว

    can anyone give me that stack code please