Video cam based profile probing

This is where you talk about Plugins. How they are made and how they work, show examples.

Re: Video cam based profile probing

Postby dezsoe » Thu Dec 19, 2019 1:14 pm

I'm self-taught too. However, I have about 38 years of practice many program languages. :) My favourite area is system programming, I was never interested in games and/or graphics. That's why it was so hard to me to write the QuickView plugin. The graphics side was a nightmare for me... Writing the interpreter for g-code: I loved it! (I always loved compiling/interpreting languages: in the Z80-world I wrote assembler/disassembler/debugger, in the 90s I wrote decompiler for Clipper, etc.)

About the thread. I tried the plugin on my old machine, but it went wrong. No, nothing with the plugin but the machine. I'll move the camera to my new machine, but that will be in 2020. As Keith mentioned: Christmas time is not the best for tinkering in the shop. :)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Video cam based profile probing

Postby eabrust » Thu Dec 19, 2019 5:58 pm

dezsoe wrote:I'm self-taught too. However, I have about 38 years of practice many program languages. :) My favourite area is system programming, I was never interested in games and/or graphics. That's why it was so hard to me to write the QuickView plugin. The graphics side was a nightmare for me... Writing the interpreter for g-code: I loved it! (I always loved compiling/interpreting languages: in the Z80-world I wrote assembler/disassembler/debugger, in the 90s I wrote decompiler for Clipper, etc.)


It's fun to hear other people's various backgrounds that lead to feeding into this CNC hobby/business. My only formal training in actual programming was Fortran in college. I'm pretty sure I was the last class that took Fortran before they modernized the curriculum... :roll: . Everything else has been learned over the years from writing VBA for excel for engineering calculation purposes (day job). Only recently has VB.Net and C# started to sink in to my thick skull :)

dezsoe wrote:About the thread. I tried the plugin on my old machine, but it went wrong. No, nothing with the plugin but the machine. I'll move the camera to my new machine, but that will be in 2020. As Keith mentioned: Christmas time is not the best for tinkering in the shop. :)


If the plugin failed due to the computer's capability (processor, ram, etc) I'd still be interested to hear of what didn't work. I hear you on Christmas time being busy, but I try to twist it into a reason to be in the shop (yeah, I'm making 'gifts'... :lol: )

Regards,
Eric
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 357
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Video cam based profile probing

Postby dezsoe » Fri Dec 20, 2019 6:14 am

eabrust wrote:If the plugin failed due to the computer's capability (processor, ram, etc) I'd still be interested to hear of what didn't work.

The machine means the machine, not the PC. The camera is mounted on my first CNC which is made of wood. It resonates terribly and is very loud. I had to stop the test before it falled into parts... :) This machine is in my small shop and in March I had to do some experiments to position the machine by the camera. This machine was in a worm place, so I mounted the camera on it.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Video cam based profile probing

Postby eabrust » Fri Dec 27, 2019 12:57 am

Howdy all, hope you've all survived Christmas and the rush that comes with the holidays :)

I've gotten to spend a little time wrapping up the first version of UCamCopy I'll put out for general release. I've wrapped it all up into a self installer with all support library dlls, the plugin file, and a start of user manual/help file. The installer can be downloaded from here:
http://www.craftycnc.com/download/487/

(note, this file is hosted on my website for download, it would be to big to put directly on the forum for download). The only thing you should have to do upon running the installer is select the UCCNC folder you want to install it in. In my case, I install multiple versions of UCCNC at a time, so in my case, I would select c:\UCCNC2112\, corresponding to the latest version and where I installed it.

I tried to make a few setup 'how to' videos as well regarding initial setup and usage with regards to setting up PID values, adjusting the camera, etc. I admit, I struggled quite a bit trying to make these videos, and they really belong in the 'blooper' reel :lol: I aslo figured it was better to have the video show things not working correctly, so that I could demonstrate that by making adjustments of the video, masking, and PID tuning, it can be improved to work. Also, my CNC computer for my router was far to under-powered to run two cameras and do a screen capture at the same time, so I had to improvise with my office laptop to make these. I also realize I need to come up with a better microphone for future videos... I swear I wasn't eating and I did not have a sock stuffed in my mouth at the same time I recorded these... :oops:

Here is a video on initial setup and setting PID values:


And here is a video on initial camera/image tuning and tracing an edge to a recording:


As you can see, it is more of a toolkit that requires some user adjustments to get a decent output, but I hope that it's 'adjustable-ness' will be of a benefit for peoples uses.

I'm sure that this first version still has some bugs/issues despite my best efforts, so if you play with it and find an issue or have a suggestion, please let me know! :)

regards
Eric
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 357
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Video cam based profile probing

Postby Andygoodman » Fri Dec 27, 2019 1:26 pm

Wow Eric.. this is gonna be so much fun. Really looking forward to this :D

Hopefully I'll get some non-family time to try it out soon :P

For now I have a cheap CAM bought from Wish, one of those inspection camera with long cable and included light.
I also have a bigger logitech HD web cam..

Which camera do you recommend?

Thanx
Andygoodman
 
Posts: 5
Joined: Sat Dec 14, 2019 9:55 am

Re: Video cam based profile probing

Postby eabrust » Sat Dec 28, 2019 8:48 pm

Hi Andy,

I can't make a specific statement on camera selection, but the help file lists cameras I've tried at the end.

Only main points, make sure it will deliver VGA 640x480 @ 30 fps. A built-in light is good.

Based on personal experience, avoid the large diameter cameras with the focus zoom knob down towards the lens. The one I tried like that had a loose lense, probably fine on a desk, bad on a moving cnc with vibration.... I like the camera with zoom focus at the top near cable exit, nice and tight mechanism with no slop. This one is approx 12 mm iin diam.

I also had an old small diameter endoscope cam approx 6mm in diam, but it's picture sucked, and fps was to slow...and no focus... Don't recommend those either...

Regards
Eric
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 357
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Video cam based profile probing

Postby Andygoodman » Sun Dec 29, 2019 12:01 pm

Now I'm rolling :D

Very nice setup, everything works at first try... Perfect.

I can't find my logitech cam so I'm with the endoscope CAM, for now.

But. I can't get the velocity higher than 10.0? Is very slow in metric..
How do i increase this? Is it locked at 10.0 or am I doing it wrong? (probably;))

This is really a good looking plugin, great job Eric

Big thanx!
Andygoodman
 
Posts: 5
Joined: Sat Dec 14, 2019 9:55 am

Re: Video cam based profile probing

Postby eabrust » Sun Dec 29, 2019 3:05 pm

Hi Andy,,

I'll check the velocity and see if it is limited to max of 10, may have happened... as I changed text box inputs to numeric up/down at last second to ensure only numbers are input... Doh. Being I'm a inch user, I won't have caught any annoyances for metric users.

Will be a day or two before I'm home to check and fix. Thanks for the feedback.

Eric
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 357
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Video cam based profile probing

Postby Andygoodman » Sun Dec 29, 2019 3:42 pm

Thanx Eric. :)

Take it easy, i need to order a better camera.
The endoscope CAM makes the line very "jumpy"/ "stressed " and I can't seem to make it as stable as in you're YouTube video..
Feel's like it is to small and hard to get good focus and light.
Andygoodman
 
Posts: 5
Joined: Sat Dec 14, 2019 9:55 am

Re: Video cam based profile probing

Postby eabrust » Tue Dec 31, 2019 2:19 am

Made some minor updates and put a new version for download at the same link: http://www.craftycnc.com/download/487/

Main fix is removing max limit from the velocity input numeric boxes (Thanks Andy for noting this, and sorry to all the metric users that were capped at a really low speed :oops: ).

Updates in v 1.0.0.1:
-Fixed velocity numeric input boxes (was limited to maximum of 10.0).
-Added 'Shift-click' to select HSV color from the image and pre-set the 'V' slider bar
-Added tool-tips with enable/disable on a new 'settings' tab.
-Removed 'auto save settings' during close of plugin, seemed to be causing settings to be over-written by null data if UCCNC was closed first. Settings will now only be saved when user clicks 'save settings' button.

Note the added new feature of holding shift and clicking on image to set a preliminary range on the 'V' slider. When using 'color thresholding', this will greatly help narrow down the range on the colors by giving a starting range to adjust from.

This should be able to install right over the last version.

regards,
Eric
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 357
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

PreviousNext

Return to Plugins

Who is online

Users browsing this forum: No registered users and 4 guests