🔥Learn how to build your own AI vision solutions: pysource.com/community
@derekburm3 жыл бұрын
Excellent video! I'm working on measuring crystal deposits over time, and it looks like I'll only have to tweak a few things to get it working for my purpose! Thank you so much for doing this. You've likely saved me days of reading, coding, and testing!
@AnkitKumar-dg4hs3 жыл бұрын
I was looking for this for months haha! Thanks man
@basemhiwari33733 жыл бұрын
Professional programming, simple way while explaining code, thanks a lot man
@АндрейМостовенко-ь6л Жыл бұрын
Hello from Ukraine! Thank you very much for your lesson and your job!
@elektroprogramming2 жыл бұрын
why you set value 20 in pixel_cm_ratio = aruco_perimeter / 20 ? based on range between the camera and object?
@praveenkumarv17002 ай бұрын
Sir we are using esp cam and connected it with Microsoft azure . When we paste link it doesn't work. It cannot open the websocket link. Is there any way?
@bagasarioseto90412 жыл бұрын
what are the packages, library, extention, or something that must be download before running the program? cause I've running this this program but isn't working
@itsamelara3 жыл бұрын
Nice tutorial, I work with java insted of python but it gave me great insight on what to do. Thanks a lot man!
@suyashsrivastava8557 Жыл бұрын
Hello Can you tell me how u did it with java
@jeramiahweed97072 жыл бұрын
Would it be possible to take the shape outline of the object and turn it into a correctly scaled vectored image?
@Kracyignacy2 Жыл бұрын
if I want to calculate how many degrees an object will be rotated from its starting position how This can be done?
@pakurwainternational94062 жыл бұрын
is there an aruco dictionary for circular objects. I want to measure the diameter of an object. So i wanted to utilize the aruco dictionary is it possible
@javietcw39 ай бұрын
Hello, I have a problem in the code when declaring. the dictionary cv2.aruco.Dictionary_get(cv2.aruco.DICT_5X5_50) This error appears and I searched but the stackoverflow solutions do not work for me I have the latest version of opencv installed AttributeError: Module 'cv2.aruco' does not have attribute 'Dictionary_get'
@Organicor6663 ай бұрын
Heyy did u solve the problem?
@jappiemoto11 ай бұрын
Am i the only one having problems with cv2 ad aruco. Every time it says it doesn't have this function or that function it looks like the open cv library has just deleted the whole aruco systems.
@keithschaub78633 жыл бұрын
Excellent, was looking for something like this, but, how to deal WHEN the camera IS NOT POINTING STRAIGHT DOWN in a plane??????? So, the square will be "warped"????????????????????????????????????????
@pysource-com3 жыл бұрын
This example right here will only work when the angle is exactly 90%. For different angles, the project will become more complex and it would require some perspective transformation, or a greater understanding about objects position on a 3 dimensional space. I might do something about that in the future.
@keithschaub78633 жыл бұрын
@@pysource-com Thanks so much for reply! Yes, my team has designed a robot arm that automatically detects and picks up objects. The camera is ON THE ROBOT gripper, so yes, the first thing we need to do is to calibrate. Because we want to make this a low cost consumer product, 'good enough' is our mantra. Since we can rotate the gripper arm "until it's 90 degrees", we just need the definition of what is 90 degrees. I think we could easily check the length of the sides of your 5x5 square until all sides are approximately equal and that would be 'good enough'. But, if you have another/better suggestion???????? :) [ to be clear, we don't think we need to do transformations, rather, let the algorithm rotate the camera until w=h, and that should be very close to 90]
@pysource-com3 жыл бұрын
There would be different approaches possible. Some ideas are: - the aruco gives you the perspective (so it can tell you the angle to rotate the arm until your reach 90°) - you can calculate the size with different angle, by using the aruco to give you the perspective and understand the objects on the 3d space - you can use a depth camera and you won't need even the aruco marker, but you can use the information from the camera for this
@keithschaub78633 жыл бұрын
@@pysource-com These are great ideas. Good to know that aruco can do this, will give it a try and let you know how it goes! Thanks again.
@keithschaub78633 жыл бұрын
when I get to 23:58, the line aruco_dict = cv2.aruco.Dictionary_get(....) gives me the error: aruco_dict = cv2.aruco.Dictionary_get(....)AttributeError: module 'cv2.aruco' has no attribute 'DICT_5x5_50'. and yes I did do the pip install for open-cv-contrib, and i'm running python 3.7.3...?
@anandakumara10962 жыл бұрын
is the size of aruko marker in the sheet is exactly 5X5 Cm ?
@mikilmku15543 жыл бұрын
It works with objects that aren't square or rectangle?, like circles for example.
@Haybubay2 жыл бұрын
Great Tutorial. I noticed there is a change in the pixel size of the aruco marker after you draw a polygon around the marker (line 21 ) before drawing the drawing the rectangles (line 51). Also played around with the code and noticed that change varies depending on the thickness of the line used to draw the aruco_polygon in line 21 of your script. I think what's happening is the object detection rectangles are now finding contours around the outermost border of the aruco_polygon from line 21. Please advice what is the best way to go about this.
@okaytree7711 Жыл бұрын
Did u ever figure it out lol...he never responded :(
@bronsonalex48 Жыл бұрын
why sometimes the frame turns black randomly? Im using logitech USB webcam on win7
@knowdont10765 ай бұрын
Love your tutorials 🥰
@Aynold3 жыл бұрын
Hello, I have this situation, the image output by imshow is still not the size of the original image
@dorukalpuzunarslan63693 жыл бұрын
Nice Project. Thanks for video!
@shaurybaranwal54143 жыл бұрын
Nice video. Have a question . Since the aruco marker is a square, length and width should be same. But for the detected aruco marker, there will be cases where length and width are not equal ( like if we take image from an angle rather than 90% from the surface of objects). How can we use this information to correct the dimensions of other objects, in case of distortions?
@pysource-com3 жыл бұрын
This example right here will only work when the angle is exactly 90%. For different angles, the project will become more complex and it would require some perspective transformation, or a greater understanding about objects position on a 3 dimensional space. I might do something about that in the future.
@sleybanks86633 жыл бұрын
@@pysource-com i would be interested in that too.
@riyazbagban91902 жыл бұрын
sir i have doubt in static image like only mobile, if we detect mobile and put boundary box, can we change the size of mobile after detected thank you
@canozmen22332 жыл бұрын
Hello sir, do you remember which Python version did you use in this video? I am having serious trouble with installing "opencv-contrib-python" and importing "cv2". Could you please help me? Also it would be perfect that you make a video about installing python, pycharm, etc. and integrating them. Thanks in advance!
@gsunil36972 жыл бұрын
Bro,i am working on a project ,where we are going to detect and classify vehicles from cctv footage.i got a problem in classify vehicles can you plz help me...
@mileremiliopachecoanceno80283 жыл бұрын
porq no dectecta con la camara ni mide hago es mismo codigo no me detecta el objeto estoy usando la camara web de mi lapto sera q no me funciona por eso
@JuuliaMachado Жыл бұрын
Hi, I was doing everything right butr my "corners, _, _" are returning an enpty [ ]. Cna u help me?
@Elnasir Жыл бұрын
Hi @Pysource. Does your camera have a depth sensor? Can we use any type of camera to capture the dimensions? Thank you in advance
@michaelehimenmeninegbedion915615 күн бұрын
Thanks alot for this, really nice video here, but I cannot find the imported file to download ... could you please add it?
@t.hemanthkumar73698 ай бұрын
I installed pip install object_detector it becomes error how to install this library please tell me sir
@lingualoom.X3 жыл бұрын
We can make lengths and widths. So how can we make weights (kilograms)? How do we apply the weight of an object we entered earlier to other objects?
@Adii..7403 жыл бұрын
same question ?
@lingualoom.X3 жыл бұрын
@@Adii..740 yes. How to estimate weight with opencv cnn? I couldn't find it anywhere. Object information is known (Dimensions and weight). With what code can I make the weight of the object from the images?
@ocreanbreeze96503 жыл бұрын
@@lingualoom.X Were you able to figure this out. I am also doing something similar except I am trying to work with people.
@lingualoom.X3 жыл бұрын
@@ocreanbreeze9650 Unfortunately I couldn't solve it. Nobody can. I have 3 months left. But I just can't.
@roysonlobo2 жыл бұрын
@@lingualoom.X Any updates? Did you manage to do it?
@DuongNguyen-yy7yh Жыл бұрын
Excuse me, How can I get object_detector library?
@ChimarauoChima4 ай бұрын
is there a way for me to modify the code such that if I have a stable brown background instead of a white background, it would still work?
@Daredevil66618 күн бұрын
I think so
@MrStickyIggy2 жыл бұрын
Is a certain color of background required for this to work properly? I'm having mixed results on various colors of background...
@anomnurrachman51743 жыл бұрын
if i want to use different aruco, what should i do?
@MegaCyberpirate2 жыл бұрын
what kind of books you recommend for new comer in this field?
@jet_lee50412 жыл бұрын
Could you send me link to download aruco marker you use in this video?
@4ia07_muhammadrizkiirvansy82 жыл бұрын
what method or algorithm do u use in this project ?
@bagasarioseto90412 жыл бұрын
in parameters = cv2.aruco.DetectorParameters_create() AttributeError: module 'cv2' has no attribute 'aruco' what's wrong?
@trungchieunguyen1824 Жыл бұрын
u install in cmd: pip install opencv-contrib-python==4.6.0.66
@praprotnikm2 жыл бұрын
Really usefull video. I have some problems with aruco library. I think they put it out from cv librarry?
@thilak85952 жыл бұрын
Getting error while running HomogeneousBgdetector() Error: HomogeneousBgdetector() is not defined Can't find HomogeneousBgdetector() any were like git, stack over flow help please.
@lushankshambharkar1243 жыл бұрын
hello , Can you make videos related to real time angle measurements. thank you
@kvenkat66502 жыл бұрын
instead of aruco marker, can we use any other reference object entity like coin ,metal strip or any other height and width known thing.
@pysource-com2 жыл бұрын
Yes, absolutely you can do it with any object of known sizes
@heikoenzinger Жыл бұрын
How accurate could this get in theory ? If have parts ranging from 20mm to 200mm can it detect size with accuracy of 0.1mm or 0.2mm ? What kind of camera/resolution would needed ?
@XiaoyuLu-d6v Жыл бұрын
I can not get the source code and files, it says Unexpected ajax error. Please check the console log to get more details.
@pysource-com Жыл бұрын
HI, we are currently working on updating the website. everything will be restored and working within a few days
@wolfie87489 ай бұрын
can we do this with 3D measurement?
@baranakbay15943 жыл бұрын
Hi , i didn't find the source file, can you help me?
@shivashamugam92283 жыл бұрын
Is there a way to measure size of the object without having the Aruco marker in the frame? As in after calculating the pixel per Cm ratio, can we use this value only to compute the size of the object, without having the Aruco marker always in the image? Thanks so much!
@pysource-com3 жыл бұрын
YOu always need a reference point to calculate the size. An alternative would be to use a Depth camera, so that you know how far the object is from the camera and calibrate that to measure the size. you can check my other video about intel realsense camera
@shivashamugam92283 жыл бұрын
@@pysource-com thanks so much! Love your tutorials 👍
@zuhdizahir79393 жыл бұрын
love your tutorial, how do I get the aruco marker, it must be present in every objects that I want to measure right?
@MadhuJampala-oi1mm6 ай бұрын
Excellent Video, how I can measure the lengths straight edges and round corners thanks for help
@annapurnasahoo64652 жыл бұрын
Thank you so much. can you suggest how to estimate altitude height, angular velocity, and distance of an any object in space and also shape and dimension debris of an orbit using Aruco marker and OpenCV python taking stereo vision camera image?
@MiguelRodriguez-wn8mc Жыл бұрын
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.
@cvicracer3 жыл бұрын
Great work thank you
@roysonlobo2 жыл бұрын
Great tutorial! I want to store the data once I exit the program, how can I do that?
@keithschaub78633 жыл бұрын
after 3 days of fighting rPI, finally got pip install opencv-contrib-python to install. parameters = cv2.aruco.DetectorParameters_create() is working now. However, aruco_dict=cv2.aruco.Dictionary_get(cv2.aruco.DICT_5x5_50) throws an error: "AttributeError: module 'cv2.aruco' has no attribute 'DICT_5x5_50'". Any hint as to why?
@pysource-com3 жыл бұрын
probably you're installing an old version of Opencv. Make sure it's one of the latest versions, like 4.5.1 or greater.
@keithschaub78633 жыл бұрын
@@pysource-com pip freeze = opencv-contrib-python==4.5.2.52, and cv2.__version__ = 4.5.2
@keithschaub78633 жыл бұрын
if I enter print(aruco.Dictionary_get(1) or print(aruco.Dictionary_get(2), etc., it returns ,aruco_Dictionary 0x6b21eb10> and aruco_Dictionary 0x6b21eab0 respectively, so it executes the function, it just doesn't like the 'DICT_5x5_50 parameter like in your video.
@keithschaub78633 жыл бұрын
@@pysource-com No idea why, but I had to code it this way aruco_dict = cv2.aruco.Dictionary_get(5), and I now get the same corner values you do at 26:58
@keithschaub78633 жыл бұрын
well, I'm so stupid sometimes: the 'x' wasn't capitalized and need to be: DICT_5X5_50 not DICT_5x5_50
@shailendra88232 жыл бұрын
please tell me how to download object detector.py i am facing problem
@granatapfel6661 Жыл бұрын
Must the size of the object be known before the detection?
@sametokay43182 жыл бұрын
hello, i had a question, how can i install object_director? or how can i install it?
@fobaogunkeye35512 жыл бұрын
Great tutorial! Quick question: Does this mean that if I have a custom dataset of images with objects I want to measure the size of, I have to ensure that when the images were captured, the aruco marker was equally captured with the other objects so it can serve as the reference point for the pixel to cm ratio? If yes, then won't this be a limitation in cases where you can't afford to capture the aruco marker with the actual objects you want to measure? Looking forward to your response.
@ferf7446 Жыл бұрын
i want to know this too
@MuhammadAli-mi5gg3 жыл бұрын
Hi, thanks for such a great video. I am working on a project, where I have to classify the fish in a given image, and also predict the estimated size. The first part is done, but I am quite stuck on the second part, as there is no fixed background or perspective, so please hep me out with the approach of the second part. Thanks....
@oumaymabourass48293 жыл бұрын
I need to contact you please
@amortalbeing3 жыл бұрын
the second part is a regression problem , use a cnn and you should be fine.
@michelematsuo89962 жыл бұрын
Thank you for the great tutorial!
@ameyashetty14413 жыл бұрын
hello sir i wanted to ask you do you need a special phone /camera for this to work cuz i have a pretty potato phone
@pysource-com3 жыл бұрын
not really, any webcam will work with it
@ameyashetty14413 жыл бұрын
@@pysource-com will a mobile phoen work if so how do i connect it
@AQhannan2 жыл бұрын
I have used your code already it was helpful But now I am getting this error module 'cv2.aruco' has no attribute 'DetectorParameters_create' I have tried to uninstall and re-install Opencv-contrib, but error still persists. any idea ?
@bibekchaulagain81712 жыл бұрын
After installing an older version of opencv-contrib-python from the new version it worked Run: pip install opencv-contrib-python==4.6.0.66
@revuriakhil3148 Жыл бұрын
'HomogeneousBgDetector' is not defined and getting error
@riubotin3 жыл бұрын
Please Help Me Sir! I just want ask, if I have several object with different size & weight. can I convert the size of bounding box to weight? for example : 12.4 Cm x 5.9 Cm = 1KG. or something like this. " if width 12cm to 13cm and height 5cm to 6cm, print (1KG).. Thanks.
@sarahnawoya498 Жыл бұрын
@pysource help with this answer please
@saeedalikhan71283 жыл бұрын
very nice video and good information
@brentsimpson37916 ай бұрын
Great video!
@shivamdubey47833 жыл бұрын
where to download object detector file
@kadaliakshay67703 жыл бұрын
i am getting an error as cv2 has no attribute as aruco (line 6)
@pysource-com3 жыл бұрын
Make sure you have the latest version and it's installed with opencv contrib library. this is the command to run on CMD: pip install --upgrade opencv-contrib-python
@victorescribano57193 жыл бұрын
Is posible to make a distance ratio to estimate depth?
@pysource-com3 жыл бұрын
Yes, that's absolutely a good idea. It needs to be calibrated with the specific camera used, as each camera has a different angle.
@کردیانی-ي2ر2 жыл бұрын
سلام استاد لطفا درمورد مختصات وعملیات در روی حرکت اشیا که دریک ریل نواری که دوربین فرم به فرم را ثبت میکند را اموزش دهید لطفا
@deependrasingh81292 жыл бұрын
Excellent video sir, but i want to know to dump this code for android studio app development
@sampathdhanushka16003 жыл бұрын
pip install aruco is not working. How can I install aruco library
@keithschaub78633 жыл бұрын
you have to put a fan on the PI, or it will over heat during the recompile
@ricardozurielfloressantama3614 Жыл бұрын
Hi how are things ! Excellent video, sorry I have a question when adding "parameters = cv2.aruco.DetectParameters_create() aruco_dict = cv2.aruco.Dictionary_get(cv2.aruco.DICT_5X5_50)" I get an error: ttributeError: module 'cv2.aruco' has no attribute 'DetectParameters_create' could you guide me with this question?
@sarahnawoya498 Жыл бұрын
same question here
@JuuliaMachado Жыл бұрын
@@sarahnawoya498 The lib has changed. Dictionar_get() = getPredefinedDictionary() and DetectParameters_create() = DetectorParameters()
@priyanshjoshi7308 Жыл бұрын
@@JuuliaMachado AttributeError: module 'cv2' has no attribute 'aruco' , after replacing the names - still get this error
@brentsimpson37912 жыл бұрын
Mate! Love your work. Understand you're very busy man, but working on a project that needs to track a moving rectangular object (moving towards and away). Surroundings will be moving. Some C programming experience. Have 400+ images of the object which I've run through Labelimg. Not sure what to use OpenCV or Tensorflow to develop further??? Was hoping to run on a small processor if possible. any thoughts??
@kamikkiyapalanisamy36742 жыл бұрын
Great Tutorial
@廖育賢-i8b3 жыл бұрын
Nice tutorial!
@muhammadraza96743 жыл бұрын
download link is not working ...! I tried but not get Email yet
@pysource-com3 жыл бұрын
wait a few minutes and check spam folder.
@shubhammali20723 жыл бұрын
is it possible to find the actual size without Aruco or save Aruco information?
@pysource-com3 жыл бұрын
It's not possible, you always need a reference point. You might get that as well with a depth camera, so you won't need aruco in that case
@anomnurrachman51743 жыл бұрын
@@pysource-com how does it work if i know the distance from the camera to the object?
@mohamedfarid74993 жыл бұрын
great information thank you very much
@danishbaig50603 жыл бұрын
My width is coming +6mm... What should i do??
@ganapathisubramanyamjayam3 жыл бұрын
the video was dope! could you guys can make a video on image enhancing using super gans?
@jcbritobr3 жыл бұрын
Very nice content.
@siddhantpanjikar55413 жыл бұрын
Great Video Sir, Thank You 🙏 Sir I want to know which IDE software ur using, I tried on atom ide but real time image processing was not working. Can u help me out of this. 🙏🙏
@pysource-com3 жыл бұрын
I use pycharm. I recommend this one because is very user friendly
@siddhantpanjikar55413 жыл бұрын
Thank you sir, but can it work on atom (real time image processing part)
@thenerdycoder073 жыл бұрын
@@pysource-com can we measure height and width of a t-shirt ?? Cloths
@pysource-com3 жыл бұрын
@@siddhantpanjikar5541 Yes it can work. the IDE you're using doesn't really matter.
@pysource-com3 жыл бұрын
@@thenerdycoder07 Yes, you would need to implement the code for t-shirt detection and than (either with a depth camera) or if you know the exact distance of the person from the camera, you can calculate the size
@themachinehead76823 жыл бұрын
What if the reference object is not at the same plane?
@pysource-com3 жыл бұрын
In that case this method won't work well. To measure objects which are on different plane would be necessary a depth camera
@jet_lee50412 жыл бұрын
Excellent tutorial. Could you tell me what software's name you are using to program python?
@pysource-com2 жыл бұрын
I'm using pycharm
@jet_lee50412 жыл бұрын
@@pysource-com Thanks a lot
@NotLilyOnRoblox3 жыл бұрын
Nice video, I want to know about image restoration
@i_ashwanisingh3 жыл бұрын
What if object in t shape?
@riubotin3 жыл бұрын
Thanks For This Video..
@050zaher Жыл бұрын
Update : the code has changed if you try to run this code, you must change lines of CV2 to be
@YazeedAlkosai3 жыл бұрын
thanks for your fruitful video, could I get this code to implement in my project thanks in advance
@pysource-com3 жыл бұрын
the code is free to download. Just go on the link below the video and you'll find the article with source code
@abu84222 жыл бұрын
opencv how to find the object center point and the faethest distance from the center point
@keithschaub78633 жыл бұрын
great work
@shailendra88232 жыл бұрын
how to download object_detector
@shailendra88232 жыл бұрын
then start the program , everyone is not expert sir
@pysource-com2 жыл бұрын
source code is available to download here: pysource.com/2021/05/28/measure-size-of-an-object-with-opencv-aruco-marker-and-python/
@danyangli83462 жыл бұрын
Can you please share the github link?
@candrawibowo44953 жыл бұрын
Can I implement this project on a raspberry pi ?
@pysource-com3 жыл бұрын
Yes, this will work on a raspberry pi
@crecker18502 жыл бұрын
download and import my file link in description below... its not in the description
@muhammadnajamulislam28233 жыл бұрын
wao very nice
@hamed3342 жыл бұрын
How can we make this even more accurate ?
@pysource-com2 жыл бұрын
by using a depth camera instead of an aruco marker for the reference point, and by using some segmentation algorithm, like Mask R-CNN