Great beginner friendly video, Thank you for patiently walking through. Gives a useful insights into how to tap into navigating through the image pixels and coordinates with contours.
I've reached the last part of the video but I'm left with some sort of a cliffhanger because it's incomplete and since you've shifter to a different website now, I can't access to the original code. I hope you can put the code back :) much appreciated :D
Amazing! I have been following your tutorials and I got to learn a lot from them. There's a thing I want to implement, Realtime dynamic hand gesture recognition. I couldn't find a suitable source for that one over the internet. Although I could train your traffic signal model for getting a static solution for the same. If You could consider a dynamic project for one of your videos that'd be very helpful.
Thanks alot! I really enjoy learning this new hard topic! Hope that you are going to make more tutorial instructing us some functions similar to Cognex, Mitsubishi, Keyence industrial vision application.
Bro please help me i am getting error at the last part the you've pasted it's not visible clearly please give us full screen view and thank you for this
Hi its a good tutorial!! Your explanation is so detail. Can you make a tutorial for object detection and measure distance from camera? It such a helpful for me. Thank you in advance!!!!
Very good video my friend, but I try it myself and doesn't work well when two objects are touching each other... Do you know how to solve this problem?
Thanks for nice video, what if i have an object rectangle in shape but round corners. i want to measure the length of the straight portion and length of round corner. Finally, I want to have 4 straight edge length + 4 round corner lengths
Hello, it's very nice. Your development seems to work very well with square and rectangular objects. Now, what happens if the object doesn't have that shape? For example, a wood shaving, a small piece of paper cut by hand, some shapeless pieces of plastic.
Hey Murtaza, first of all thank you for all your effort and for making the world a bit of a better place, by providing free education. I would like to ask , if there is the possibility to rent you for a teams-call, regarding in depth-questions on yolov7. Greetings :-)
Hello sir, I saw you entire video 3times, I executed your code the code is run, but unfortunately didn't detect object, only video capture open nothing detect the object. Please help how it will run and measure the height and width.
I am following this tutorial but when I try to run it I get the error of "append() takes exactly one argument (5 given)" (this line was written right around the 20 minute mark) - can anyone help?
import cv2 import numpy as np ################################### webcam = False path = '1.jpg' cap = cv2.VideoCapture (1) cap.set(10,160) cap.set(3,1920) cap.set(4,1080) while True: success,img = cap.read() cv2.imshow('Oiginal',img) cv2.waitkey(1) Sir when I run Abobe the code, that time not open camera or jpg.
Hi i want to know convert pixel distance to cm distance like i use human pose estimation and get distance between right and left shoulder in pixels how to convert that to cm thanks in advance
hi, I have a question. your program, is soooooo good, but on my computer, they don't give an accurate size, what do I have to do to fix that problem, sir? thank you
Amazing....and very helpful to me...also I have a question on how to measure the 3D model as (heights, width, depth)...if there is a possible way could you tell me how could follow your answers to my question. thanks in advance
wonder what your dev machine configurations are. Mine it's a core i5/16GB ram and it takes more than 3-4 mins to run the program where as yours runs instantly :D
Would this be usable on farm to measure animal height via cam would it need a set white background and static distance from item and could it knownofnits same cow fir example and add on of it has grown?
Ur videos r really really aswome sir in ur previous video attendance system u showed that details will be recoreded in an excel sheet sir...so along with that i just want to capture the recognized faces also please tell me how to modify ur code sir this is really really needed to me pls help me
Hi, I'm new to Python but according to code in video attendance system you have encoded images in encodeListKnown, a list_variable containing a list of arrays (the encoded values) for each image. If you want to have a pre-trained file with trained images you only have to save that list after training and load it wherever you need. If you want to have a pre-trained file with trained images and corresponding labels, you can create a dictionary from encodeListKnown and classNames (merge both lists; value-index) If you want to add from code new trained images you have to: -get new image of detected face -save it to repo directory (remember the name will be the label) -convert into RGB -encode that new image -append that encoded to encodeListKnown and save it to file And there you are, you have an updated file with new recognized image if I am not wrong. Then append this encoded to dicionary getting updated classNames value if you need second approximation. I invite you to test coding and share your results, I am sure everybody will help you if you try and post code with your doubts Maybe I am making mistakes, I am new to Python you know, but I think this could be a Good solution.
@@averno6174 hi sir i am btech 1st year student i understood ur explaination but i dont no how to those modificatioms in code if possible share me the modified code tq in advance
After calling the markAttendance function you can crop the main image and save the image using imwrite. Your croped image would be imgCropped = img[y1:y2,x1:x2] then u can save this with imwrite funciton.
@@murtazasworkshop i am really very much thank ful fr ur rplies sir but can u please elobarate ur explaination means after which line num in code i should add this lines and should i create any folder to save the recognized face like u have defined csv to store the data base details...and how to store details multiple times whenevrr it recognize the same face It should record the details and save the faces too
@@murtazasworkshop I wonder if this could work. I don't know if my code is correct and/or I am using properly tkinter. the idea is to label unknown face with user entry, save tha image to images folder and re-encode (retrain) system for the next loop to match. Is code correct? AttendanceProject.py from tkinter import * import classInput as cIn … … … if matches[matchIndex]: name = classNames[matchIndex].upper() else: root = Tk() name = cIn.MyDialog(root) y1, x2, y2, x1 = faceLoc y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4 imgNewPerson = img[y1:y2, x1:x2] cv2.imwrite(f'{path}/{name}.jpg', imgNewPerson) # as we have saved image next run should get name and encoding to load new lists encodeListKnown.append(encodeFace) classNames.append(name) # as we have updated both lists next loop should find a match with this image and put label print('Re-encoding Complete') y1, x2, y2, x1 = faceLoc y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4 cv2.rectangle(img, (x1, y1), (x2, y2), (0, 255, 0), 2) …. _________________________________ classInput.py from tkinter import * import tkinter.simpledialog class MyDialog(tkinter.simpledialog.Dialog): def body(self, master): Label(master, text="Person Name:").grid(row=0) self.e1 = Entry(master) self.e1.grid(row=0, column=1) return self.e1 # initial focus def apply(self): name = self.e1.get() print(name)
I love this program, could you please tell me if it will work with clear pieces of glass and how high I can go on the picture. I would like to measure 4 or 5 pieces of clear glass between 12''-35'' x 50''-90'' from 10' of high, do you believe it will work on it?
You are the Real Hero of OpenCV, well done!!!
I´m a fan of yours video tutorial. I learned python and OpenCv with this amazing videos.
Glad you like them!
You have the absolutely most professionally looking tutorials on RUclips. Super helpful!
I am glad you found them helpful.
Great beginner friendly video, Thank you for patiently walking through. Gives a useful insights into how to tap into navigating through the image pixels and coordinates with contours.
This is gonna be my favorite channel
I've reached the last part of the video but I'm left with some sort of a cliffhanger because it's incomplete and since you've shifter to a different website now, I can't access to the original code. I hope you can put the code back :) much appreciated :D
Amazing! I have been following your tutorials and I got to learn a lot from them. There's a thing I want to implement, Realtime dynamic hand gesture recognition. I couldn't find a suitable source for that one over the internet. Although I could train your traffic signal model for getting a static solution for the same. If You could consider a dynamic project for one of your videos that'd be very helpful.
Thank you . I will look into it.
congratulations for this amazing tutorial. It answered most of the questions that I had. Thank you.
Amazing bro, I am using all knowledge that u have been sharing. Thanks so much
Glad to hear that
Great Tutorial man, learned a great deal of stuff in one single video.
Keep Going! I'm going to check out the deepfake tutorial!
Thanks A lot
Thanks alot! I really enjoy learning this new hard topic! Hope that you are going to make more tutorial instructing us some functions similar to Cognex, Mitsubishi, Keyence industrial vision application.
Bro please help me i am getting error at the last part the you've pasted it's not visible clearly please give us full screen view and thank you for this
Can we make how to calculate how long based on bounding box? (Just bounding box not object like this? How?
*Absolutely marvelous.Loved it thanks.*
Glad you enjoyed it
makes complete sense. Only a couple other tNice tutorialngs I need to find out before I can actually make it work, but you’ve got more in depth
Good job!
Can you show me how to measure the distance between two things in an image, please?
Thank you so much! It was a great help. You explained them easy!🖐🖐
I have a question, how if I only want to measure a single line?
What are system requirement for this project.
I love your videos and able to write opencv on my resume because of your videos(main contribution).please video on text recognition from scratch sir
Thanks. You can check out the text detection tutorial here ruclips.net/video/6DjFscX4I_c/видео.html
You my friend, are a legend
Great tutorial! Where can I find the image which you are using?
Thank you so much Teacher
Hi its a good tutorial!! Your explanation is so detail. Can you make a tutorial for object detection and measure distance from camera? It such a helpful for me. Thank you in advance!!!!
Noted
@@murtazasworkshop thank you for notice me!!!! Its a good help if u can do the tutorial for video not for image 😊
Thanks alot broo u are perfect ☠️
47:20 - findDis(). In case you are looking for this function specifically
Hi, I am working to measure the height of candle flames, could you please help me
Where is the image file?
Hello sir, Can the camera measure circles and triangles and other objects?
Thankyou
can you make a opencv tutorial on imagegrab and detecing objects on your computer screen?
It's gonna be a great tutorial again. Great
Very good video my friend, but I try it myself and doesn't work well when two objects are touching each other... Do you know how to solve this problem?
Thanks alot Murtaza. Good video.
wonderful video story and easy to understand without code
Thanks for nice video, what if i have an object rectangle in shape but round corners. i want to measure the length of the straight portion and length of round corner. Finally, I want to have 4 straight edge length + 4 round corner lengths
Can this method work for the height of a network tower using the camera
I got such an error while writing the code 'module' cv2.cv2 'does not have attribute' ContourArea '
'why could it be
Hello, it's very nice. Your development seems to work very well with square and rectangular objects. Now, what happens if the object doesn't have that shape? For example, a wood shaving, a small piece of paper cut by hand, some shapeless pieces of plastic.
Hey Murtaza, first of all thank you for all your effort and for making the world a bit of a better place, by providing free education.
I would like to ask , if there is the possibility to rent you for a teams-call, regarding in depth-questions on yolov7. Greetings :-)
Mind blown!
please tell the points in which you have put text 'cm', it is not visible in the video
Should the refenrence object and other objects should be in same plane?
Can i use this for measuring size of fruits?
Can we measure dimensions of a complicated object..like a rectangle and many small circles inside that rectangle?
I have the same question
Could this be used for measuring people, like arms length, legs length, etc in real time?
I had kept a square shaped purse and a credit card on A4 sheet.
At 43rd minute , only credit card is being detected , why?
Amazing videos. Thank you very much.
print(biggest) not printing! Any idea?
why did you use white background instead other color or video background ?
As shown in the starting of the video, how to do it in real time? Like you showed us how to do it with images. How to do it in a real time video?
Thank you sir. Great tutorial
How about irregular shapes for example rectangle with a peak from 1 side?
i am great full to you sir
Kindly help. My final output is scaling down (even without dividing by scale variable). Why does that happen?
سلام استاد
لطفا درمورد مختصات وعملیات در روی حرکت اشیا که دریک ریل نواری که دوربین فرم به فرم را ثبت میکند را اموزش دهید لطفا
very well explained tutorial, thanks for sharing!
Great tutorial!
thanks for this video . but i want to know how to dump this app into android studio
Make a video on how to do this on jupyter notebook
We can make lengths and widths. So how can we make weights (kilograms)?
Can't register in the link provided in the description please provide the code
Can anyone tell me why we are calculating perimeter under area?
And what is filter ?
can you please make a video about distance between an object and camera
A very thank to you Murtaza bhai .What is the scale value ? how to calculate it?
please i want to calculate the diameter of an orange or an apple in a picture, how i will do it
I am trying to use a different image but im not getting the proper output
Excellent..
Hello sir, I saw you entire video 3times, I executed your code the code is run, but unfortunately didn't detect object, only video capture open nothing detect the object. Please help how it will run and measure the height and width.
I am following this tutorial but when I try to run it I get the error of "append() takes exactly one argument (5 given)" (this line was written right around the 20 minute mark) - can anyone help?
*hello sir can you make a video on smart glasses with face recognition using ardiuino and displaying the results on mini tft screen*
Excelente! Adorei!
esse cara é top d+, ainda bem que conheci o canal dele kk
What is the way to add the image path to the pycharm file, such as Image 1.jpg, to video
import cv2
import numpy as np
###################################
webcam = False
path = '1.jpg'
cap = cv2.VideoCapture (1)
cap.set(10,160)
cap.set(3,1920)
cap.set(4,1080)
while True:
success,img = cap.read()
cv2.imshow('Oiginal',img)
cv2.waitkey(1)
Sir when I run Abobe the code, that time not open camera or jpg.
you have a great tutorial
but when can i get the tutorial if i want make distance detection between camera and object?
Hi i want to know convert pixel distance to cm distance like i use human pose estimation and get distance between right and left shoulder in pixels how to convert that to cm thanks in advance
most people got sotNice tutorialng from tNice tutorials video. Much love!
hi, I have a question. your program, is soooooo good, but on my computer, they don't give an accurate size, what do I have to do to fix that problem, sir? thank you
You're awesome!
Can you make a tutorial using Raspberry Pi or Nvidia jetson nano about object detection and trigger a servo with received data. thank you for share.
Nice work! Could you add the arrowed line code aswell?
how to use mobile camera instead of laptop camera for image processing
Hi Murtaza,
Are you reuploading this,i already saw this video on your channel weeks ago.
Yes, i had some complains about the audio. so fixed it and re-uploaded.
@@murtazasworkshop how to contact u?
Can it calculate dimension of the object if it is placed in different backgrounds
Amazing....and very helpful to me...also I have a question on how to measure the 3D model as (heights, width, depth)...if there is a possible way could you tell me how could follow your answers to my question.
thanks in advance
Hi. the 3d object measurement would require depth information which could be achieved with a 3d camera
As allways, amazing, clear, thanks again for your work
Thank you! Cheers!
wonder what your dev machine configurations are. Mine it's a core i5/16GB ram and it takes more than 3-4 mins to run the program where as yours runs instantly :D
can someone please tell how to use it in realtime cuz it's working fine if i provide image oath but not in realtime?fast
hi, can you explain better how to connect the camera to the computer, and how to know the ID of the camera on the computer ?
Hi Sir
what will be the objective and scope of the topic can u plzz say??
Murtaza what if i want to measure big objects lets say 750 mm square object....what limitations are there for big objects can we measure flawlessly
could u share a full progress of installation of opencv. i fail to install it thriugh pip and anaconda
hi,nice explanation. may i know.. about 1.png it is live captured or difference image from webcam?
Would this be usable on farm to measure animal height via cam would it need a set white background and static distance from item and could it knownofnits same cow fir example and add on of it has grown?
any offer for all your courses?
Ur videos r really really aswome sir in ur previous video attendance system u showed that details will be recoreded in an excel sheet sir...so along with that i just want to capture the recognized faces also please tell me how to modify ur code sir this is really really needed to me pls help me
Hi, I'm new to Python but according to code in video attendance system you have encoded images in encodeListKnown, a list_variable containing a list of arrays (the encoded values) for each image.
If you want to have a pre-trained file with trained images you only have to save that list after training and load it wherever you need.
If you want to have a pre-trained file with trained images and corresponding labels, you can create a dictionary from encodeListKnown and classNames (merge both lists; value-index)
If you want to add from code new trained images you have to:
-get new image of detected face
-save it to repo directory (remember the name will be the label)
-convert into RGB
-encode that new image
-append that encoded to encodeListKnown and save it to file
And there you are, you have an updated file with new recognized image if I am not wrong. Then append this encoded to dicionary getting updated classNames value if you need second approximation.
I invite you to test coding and share your results, I am sure everybody will help you if you try and post code with your doubts
Maybe I am making mistakes, I am new to Python you know, but I think this could be a Good solution.
@@averno6174 hi sir i am btech 1st year student i understood ur explaination but i dont no how to those modificatioms in code if possible share me the modified code tq in advance
After calling the markAttendance function you can crop the main image and save the image using imwrite.
Your croped image would be imgCropped = img[y1:y2,x1:x2] then u can save this with imwrite funciton.
@@murtazasworkshop i am really very much thank ful fr ur rplies sir but can u please elobarate ur explaination means after which line num in code i should add this lines and should i create any folder to save the recognized face like u have defined csv to store the data base details...and how to store details multiple times whenevrr it recognize the same face It should record the details and save the faces too
@@murtazasworkshop I wonder if this could work. I don't know if my code is correct and/or I am using properly tkinter. the idea is to label unknown face with user entry, save tha image to images folder and re-encode (retrain) system for the next loop to match. Is code correct?
AttendanceProject.py
from tkinter import *
import classInput as cIn
…
…
…
if matches[matchIndex]:
name = classNames[matchIndex].upper()
else:
root = Tk()
name = cIn.MyDialog(root)
y1, x2, y2, x1 = faceLoc
y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4
imgNewPerson = img[y1:y2, x1:x2]
cv2.imwrite(f'{path}/{name}.jpg', imgNewPerson)
# as we have saved image next run should get name and encoding to load new lists
encodeListKnown.append(encodeFace)
classNames.append(name)
# as we have updated both lists next loop should find a match with this image and put label
print('Re-encoding Complete')
y1, x2, y2, x1 = faceLoc
y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4
cv2.rectangle(img, (x1, y1), (x2, y2), (0, 255, 0), 2)
….
_________________________________
classInput.py
from tkinter import *
import tkinter.simpledialog
class MyDialog(tkinter.simpledialog.Dialog):
def body(self, master):
Label(master, text="Person Name:").grid(row=0)
self.e1 = Entry(master)
self.e1.grid(row=0, column=1)
return self.e1 # initial focus
def apply(self):
name = self.e1.get()
print(name)
awesome job. Thanks so much
You're welcome!
Why con[4] was used?
upto 5.03 video I had written but the image stays for a sec
I love this program, could you please tell me if it will work with clear pieces of glass and how high I can go on the picture. I would like to measure 4 or 5 pieces of clear glass between 12''-35'' x 50''-90'' from 10' of high, do you believe it will work on it?
If you can find the edges of the glass using contours then it can work.
Hello dear all.
Can someone tell me that how we can connect this code with simple Camera ?