Camera setup
- Howlingg
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 3
20 Jan 2023 11:10 #262468
by Howlingg
Camera setup was created by Howlingg
Forgive me if this is obvious but I can't immediately find the answer. I would like to add a camera to the latest Qtplasmac but am confused as to how to enable it? Also, are there any recommendations as to a USB camera that is know to play nicely with the system?
Many thanks
Many thanks
Please Log in or Create an account to join the conversation.
- phillc54
- Offline
- Platinum Member
Less
More
- Posts: 5698
- Thank you received: 2081
20 Jan 2023 11:23 #262470
by phillc54
Replied by phillc54 on topic Camera setup
The camera is enabled if a Peripheral Offset has been applied for a camera.
See the Camera and Peripheral Offset sections in the manual.
I used a cheap "endoscope" camera for testing.
TBH I think a laser crosshair is a better proposition for sheet alignment on a plasma table.
See the Camera and Peripheral Offset sections in the manual.
I used a cheap "endoscope" camera for testing.
TBH I think a laser crosshair is a better proposition for sheet alignment on a plasma table.
The following user(s) said Thank You: Howlingg
Please Log in or Create an account to join the conversation.
- Howlingg
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 3
20 Jan 2023 11:26 #262471
by Howlingg
Replied by Howlingg on topic Camera setup
Many thanks - I have one of those so will have a go - I take the point about the laser as well.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10738
- Thank you received: 3541
20 Jan 2023 23:38 #262528
by rodw
On many plasma tables the 5m limit for USB cable length is far too short without adding repeaters etc and often if using a mesa card, the PC is not co-located with the controlbox where the rest of the wiring comes from so routing the wiring gets messy.
To add a laser, you likely already have power up where the torch is so its easy to add (even if you need to add a $3.00 24v to 5v step down power supply). I did not have a spare wire in the cable so could not get qtplasmac to turn it on so added a small switch up on the gantry. But more often than not, the laser is just left on.
Finally, with plasma, pinpoint accuracy is not required when setting the zero point so a 1-2mm laser dot is more than sufficient. Steel sheets are usually about 5mm over size so close enough is good enough!
Replied by rodw on topic Camera setup
100% agree.TBH I think a laser crosshair is a better proposition for sheet alignment on a plasma table.
On many plasma tables the 5m limit for USB cable length is far too short without adding repeaters etc and often if using a mesa card, the PC is not co-located with the controlbox where the rest of the wiring comes from so routing the wiring gets messy.
To add a laser, you likely already have power up where the torch is so its easy to add (even if you need to add a $3.00 24v to 5v step down power supply). I did not have a spare wire in the cable so could not get qtplasmac to turn it on so added a small switch up on the gantry. But more often than not, the laser is just left on.
Finally, with plasma, pinpoint accuracy is not required when setting the zero point so a 1-2mm laser dot is more than sufficient. Steel sheets are usually about 5mm over size so close enough is good enough!
Please Log in or Create an account to join the conversation.
- caretech
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 23
21 Jan 2023 03:55 #262546
by caretech
Replied by caretech on topic Camera setup
There is some interesting recent discussion on camera equipment over on Plasma Spider, here:
plasmaspider.com/viewtopic.php?f=147&t=34918
As a Canadian, I am constantly punished by high shipping rates and border concerns for importing goods from the states, so rather than order the products linked in that thread, I ordered this active USB extension cable from Amazon Canada. I have a Supereyes camera here that I'll try. At the computer side, I'll plug the cable into a powered USB hub. I don't have a short-term goal to get Scanything working with LinuxCNC Master, although long-term that would be nice, so I think the camera I have should be fine for this. I'll try to remember to report back with how it goes -- or fails, as the case may be.
plasmaspider.com/viewtopic.php?f=147&t=34918
As a Canadian, I am constantly punished by high shipping rates and border concerns for importing goods from the states, so rather than order the products linked in that thread, I ordered this active USB extension cable from Amazon Canada. I have a Supereyes camera here that I'll try. At the computer side, I'll plug the cable into a powered USB hub. I don't have a short-term goal to get Scanything working with LinuxCNC Master, although long-term that would be nice, so I think the camera I have should be fine for this. I'll try to remember to report back with how it goes -- or fails, as the case may be.
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
- caretech
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 23
21 Jan 2023 04:00 #262547
by caretech
Replied by caretech on topic Camera setup
Just a bit more about the USB hub. I hope this will accomplish two things: (1) provide more power to the active cable, and (2) help isolate the USB cable and the harsh electrical environment it's in from the computer.
Please Log in or Create an account to join the conversation.
- caretech
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 23
27 Jan 2023 02:15 #262970
by caretech
Replied by caretech on topic Camera setup
I spent some time with my long USB cable and the Supereyes camera this evening. I can display a video feed from the camera in VLC player just fine. However, when I hit the Camera button in QtPlasmaC, it uses the computer's built-in webcam. (I am using an older Dell all-in-one computer, which is just laptop-grade hardware and not optimal but it was a cheap way for me to get a touchscreen.)
In VLC, the built-in webcam is /dev/video0 and my USB camera is /dev/video2. How can I specify which camera is used by LinuxCNC rather than allowing it to pick system default? I tried, so far unsuccessfully, to disable the built-in camera via udev rules.
In VLC, the built-in webcam is /dev/video0 and my USB camera is /dev/video2. How can I specify which camera is used by LinuxCNC rather than allowing it to pick system default? I tried, so far unsuccessfully, to disable the built-in camera via udev rules.
Please Log in or Create an account to join the conversation.
- phillc54
- Offline
- Platinum Member
Less
More
- Posts: 5698
- Thank you received: 2081
27 Jan 2023 04:29 #262976
by phillc54
Replied by phillc54 on topic Camera setup
Are you running LinuxCNC from a package or from a run in place build.
Please Log in or Create an account to join the conversation.
- caretech
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 23
27 Jan 2023 12:22 #262999
by caretech
Replied by caretech on topic Camera setup
I'm running a package install.
Please Log in or Create an account to join the conversation.
- phillc54
- Offline
- Platinum Member
Less
More
- Posts: 5698
- Thank you received: 2081
27 Jan 2023 21:39 - 27 Jan 2023 21:40 #263027
by phillc54
Replied by phillc54 on topic Camera setup
If you want you can try the following.
You could edit the handler file /user/share/qtvcp/screens/qtplasmac/qtplasmac_handler.py
and add the highlighted line, you need to be root user to do this:
When you run QtPlasmaC then it will add a camera port entry to the [CAMERA_OFFSET] section of qtplasmac.prefs in your config directory.
Close QtPlasmac
Edit qtplasmac.prefs and change the number to suit the required camera.
Restart QtPlasmaC
I don't know if the python3-opencv camera numbers map the same as VLC numbers so it may be a bit of trial and error. My test rig has the same numbers for both but they are reversed...
If it works OK for you we could add something like this permanently.
You could edit the handler file /user/share/qtvcp/screens/qtplasmac/qtplasmac_handler.py
and add the highlighted line, you need to be root user to do this:
When you run QtPlasmaC then it will add a camera port entry to the [CAMERA_OFFSET] section of qtplasmac.prefs in your config directory.
Close QtPlasmac
Edit qtplasmac.prefs and change the number to suit the required camera.
Restart QtPlasmaC
I don't know if the python3-opencv camera numbers map the same as VLC numbers so it may be a bit of trial and error. My test rig has the same numbers for both but they are reversed...
If it works OK for you we could add something like this permanently.
Attachments:
Last edit: 27 Jan 2023 21:40 by phillc54.
The following user(s) said Thank You: caretech
Please Log in or Create an account to join the conversation.
Moderators: snowgoer540
Time to create page: 0.093 seconds