Another tab for WebCam

More
20 Nov 2010 21:54 #5473 by psha
Replied by psha on topic Re:Another tab for WebCam
I've backported all stuff (except halio to hardy)
Here is screenshot of axis with vivi video input.
Attachments:

Please Log in or Create an account to join the conversation.

More
24 Nov 2010 19:54 #5594 by psha
Replied by psha on topic Re:Another tab for WebCam
2eslavko: Check last camview-emc for convert.flip plugin which is capable for vertical and horizontal
flips.

Please Log in or Create an account to join the conversation.

More
29 Nov 2010 16:27 #5734 by eslavko
Replied by eslavko on topic Re:Another tab for WebCam
Hello...


Two images to see preview.
Attachments:

Please Log in or Create an account to join the conversation.

More
29 Nov 2010 16:27 #5735 by eslavko
Replied by eslavko on topic Re:Another tab for WebCam
... another one
Attachments:
The following user(s) said Thank You: Samuil9999

Please Log in or Create an account to join the conversation.

More
29 Nov 2010 16:41 #5736 by eslavko
Replied by eslavko on topic Re:Another tab for WebCam
... and now text...

The top image is centered in 'hole' within 0.03mm tolerance (webcam vs probe). And probe itself differ for 0.02mm in sucesive diameter reading. So cam is pretty good.
The botom image is harder to center and tolerance is more than 0.05mm.

Problems?

for both images I should use better light at 1'st place.

Centering the hole is 'easy' work to jog near center and then size circle to fit hole. The drawback is image size when 'size' slider is visible. it's such reduced...

The slot centering is harder as just little arc touching the image edge.

The problem solution?!

I see solution for slot centering to have other one croshair aperture (not circle) but two lines in offset from centerline. The ofset is adjusted like 'size' for circle and there are need to other one adjuster named angle. So we can folow angle and set exact size.
Now as image is just little to small when all that widgets is oppened I think that that two sliders (size and angle) should be in panel like CamOffset is. (probably one above other where currently I have DRO) I can put here two sliders but I think the passing walue can be problematic.

Someone think that I go in right direction...?!?
Attachments:

Please Log in or Create an account to join the conversation.

More
29 Nov 2010 21:05 #5749 by andypugh
Replied by andypugh on topic Re:Another tab for WebCam
Nice!

Now, one thing I have seen a similar setup do is find the centre of a circle from three points, so you could centre the crosshair on three points around the circumference and it would tell you where the middle is. This would be handy for finding the middle of bores that are too big for the field of view.

Please Log in or Create an account to join the conversation.

More
30 Nov 2010 08:21 #5760 by eslavko
Replied by eslavko on topic Re:Another tab for WebCam
andypugh wrote:

Nice!

Now, one thing I have seen a similar setup do is find the centre of a circle from three points, so you could centre the crosshair on three points around the circumference and it would tell you where the middle is. This would be handy for finding the middle of bores that are too big for the field of view.


Good idea.
Anyway I have one more button in mind. Do not know how to implement it yet but WANT it here. In EMC is one script named Teach-in.py. It's used to save current coordinate to file. I use it a lot but is unpractical handling. EMC must be started 1'st and then that script in 'right environment'. Thew we have two window's flying around screen. One is EMC itself and other has no more than one button to save coordinates. But with WEBCAM we want as big as posible image so windows overlaps. So my idea id to have one buton to just append current coordinate to file. Ie action should be 1.Open predefined file 2.Save (append to the end of the file) current coordinate 3.close file. Then whatever application can use that coordinates as is needed. So little deeper in menu can be button to recalculate center from last 3 entry's or from last 4 entry's (and to show missalignment.) or anithing similar.

Please Log in or Create an account to join the conversation.

More
30 Nov 2010 11:57 #5762 by andypugh
Replied by andypugh on topic Re:Another tab for WebCam
Have a look at linuxcnc.org/docs/html/gcode_main.html#s...38.2:-Straight-Probe
EMC2 has a way to log positions to file (PROBEOPEN, filename.txt)

Please Log in or Create an account to join the conversation.

More
30 Nov 2010 14:04 #5768 by eslavko
Replied by eslavko on topic Re:Another tab for WebCam
andypugh wrote:

Have a look at linuxcnc.org/docs/html/gcode_main.html#s...38.2:-Straight-Probe
EMC2 has a way to log positions to file (PROBEOPEN, filename.txt)


I know that Andy.
But if I use Camera instead probe then I must JOG to the correct position and click some button or similar to signal that 'probe' is in place. The output should be some file as is practical for some other applications. I find PROBEOPEN to be problematic as it overwrite the old file and had to be manualy oppened and closed.
So I like to startup EMC and JOG to position and click 'SaveLocation' button, then jog to next position and click. and so for many locations.
In each click I wan't to be file oppened for adding (not overwrite) position saved and file closed.
After few JOGs I have coordinate's in end of the file and can call some 3'rd party software to do something with it. For example:

I has saved last 4 coordinates for 4 holes in corners of printed circuit board. As I have no reference I just start custom program and read last 4 positions, then fit that to the image of PCB onscreen and I got perfectly scaled and rotated G code for drilling.
For now I use teach-in and if I forget to exit that utility I got problem as my application read nonsense value from file already oppened and can mess all thing if I don't see difference. (that's reason why I don't want oppened file until manualy closed)

Of course running other application like centerfinder will find the center of hole by last few (selected) point's.
I find Webcam very ussable as save a lot of time. But to work like that it must be permanently on machine not as attachment to put in spindle.

Please Log in or Create an account to join the conversation.

More
01 Dec 2010 18:26 #5809 by eslavko
Replied by eslavko on topic Re:Another tab for WebCam
Here is some midversion of utility.
The CAM offset works, the Save XYZ works
Just bottom slider is not in action as circle doesn't need angle. but soon there will be lines too.
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.218 seconds
Powered by Kunena Forum