Camera For Touchoff

More
17 Sep 2020 05:46 - 23 Sep 2020 02:36 #182507 by phillc54
Camera For Touchoff was created by phillc54
I have been playing around with a Qtvcp camera view tab embedded in Axis and Gmoccapy and with the help of Chris Morley I mangaged to get it working pretty well for touching off X and Y and also setting the rotation of the coordinate system.

Camera View:
Warning: Spoiler!


The camera needs to be attached firmly and it is wise to spend the time adjusting it so the crosshairs point to the same place when Z is at the top of travel and also at the bottom of travel. Make sure that the crosshairs are aligned properly with the X and Y axes.
Install any dependencies required for Qtvcp (it is supported by default in the new LinuxCNC Buster ISO).
The attached file needs to be copied to the machines config directory.

Edit the machines ini file by adding these lines to the end of the [DISPLAY] section:
Warning: Spoiler!

The Mark Edge button and the Goto Origin button will have their names changed to Set Origin and Set 0o Rotate depending on what function they are able to perform.

To touch off a sheet at an angle:
Warning: Spoiler!


To touch off at a zero degree angle with the torch as the origin point:
Warning: Spoiler!


To touch off at a zero degree angle using the current origin point:
Warning: Spoiler!


To zoom:
Warning: Spoiler!
Attachments:
Last edit: 23 Sep 2020 02:36 by phillc54.
The following user(s) said Thank You: Dimitrios, tommylight, Clive S, Mud, snowgoer540, Himarc3D, pinder

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

More
17 Sep 2020 06:07 #182509 by Mud
Replied by Mud on topic Camera For Touchoff
Very nice - can it be used with any linux-compatible webcam?

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

More
17 Sep 2020 06:14 #182510 by phillc54
Replied by phillc54 on topic Camera For Touchoff
Good question, I used it with a cheap'n'nasty "endoscope" usb camera I had lying around, similar to this

It also worked on a virtual machine with the inbuilt camera on my Mac.
The following user(s) said Thank You: Mud

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

More
17 Sep 2020 08:27 #182515 by rodw
Replied by rodw on topic Camera For Touchoff
Phill,

very nice.
Can this be used with a laser pointer?
Do you have to set the rotation by pressing buttons or does it calculate that?

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

More
17 Sep 2020 08:30 #182516 by phillc54
Replied by phillc54 on topic Camera For Touchoff
Camera only.
Rotation is manual with a mouse, right button + scroll.

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

More
17 Sep 2020 08:33 #182517 by Himarc3D
Replied by Himarc3D on topic Camera For Touchoff
Work with ELP-USBFHD06H-SFV from AliExpress
I think any compatible camera will work, the laptop camera worked too
The following user(s) said Thank You: phillc54

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

More
17 Sep 2020 08:41 #182518 by rodw
Replied by rodw on topic Camera For Touchoff

Camera only.
Rotation is manual with a mouse, right button + scroll.


Another method is to find an edge down the back of the sheet, press a button, and then go to the origin corner and click touchoff and calculate the angle using some trig and adjust for the offset. That is much more accurate when a full sheet (say 2400mm x 1200mm or 3000mm x 1500mm) is used. I have done some work on that with my laser pointer extending some work by BigJohnT.

But with the camera, you should be able to implement edge detection and corner detection using opencv features. Imagine that! Just click one button "Align sheet" and let the machine do it all automagically. Let the camera wander around looking for edges then finally move to the origin corner.

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

More
17 Sep 2020 08:44 #182519 by Mud
Replied by Mud on topic Camera For Touchoff

Good question, I used it with a cheap'n'nasty "endoscope" usb camera I had lying around, similar to this

It also worked on a virtual machine with the inbuilt camera on my Mac.


Ah, good call. I guess a mechanical shutter to protect it from splashes would be nice, unless it has a decent focusing distance/long focal length.

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

More
17 Sep 2020 09:02 #182521 by phillc54
Replied by phillc54 on topic Camera For Touchoff

Camera only.
Rotation is manual with a mouse, right button + scroll.


Another method is to find an edge down the back of the sheet, press a button, and then go to the origin corner and click touchoff and calculate the angle using some trig and adjust for the offset. That is much more accurate when a full sheet (say 2400mm x 1200mm or 3000mm x 1500mm) is used. I have done some work on that with my laser pointer extending some work by BigJohnT.

Yeah, that would be easy to implement.


But with the camera, you should be able to implement edge detection and corner detection using opencv features. Imagine that! Just click one button "Align sheet" and let the machine do it all automagically. Let the camera wander around looking for edges then finally move to the origin corner.

There's project for you, Qtvcp uses opencv so it's half done. :)

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

More
17 Sep 2020 09:14 #182522 by rodw
Replied by rodw on topic Camera For Touchoff

There's project for you, Qtvcp uses opencv so it's half done. :)


It will be years before I have the time to play with stuff like that plus I much prefer directing software projects than coding them. B)

The story of my life business right now. I don't know why I started ramping up a hobby business into a serious brand when I turned 60!

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

Moderators: snowgoer540
Time to create page: 0.136 seconds
Powered by Kunena Forum