How to choose camera device used by cam_align?

More
24 May 2021 22:18 - 24 May 2021 22:18 #210120 by plovdiv
Embedding cam view in axis like so:
EMBED_TAB_COMMAND= halcmd loadusr -Wn qtvcp_embed qtvcp -d -c qtvcp_embed -x {XID} cam_align

Where can I configure which video device (/dev/video0, /dev/video1, ...) will be used?
Last edit: 24 May 2021 22:18 by plovdiv.

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

More
25 May 2021 00:03 #210152 by andypugh
I don't know the answer.

But it looks like there was meant to be a way to choose a camera by number:
github.com/LinuxCNC/linuxcnc/blob/master...mview_widget.py#L281
However I don't see a way (in that file) to set the number.
I looked for a way to choose a camera as a load-time parameter, but did not see one.

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

More
25 May 2021 01:52 #210174 by cmorley
Try this:

add this file to your config.
use this command (note the -o 1)

EMBED_TAB_COMMAND= halcmd loadusr -Wn qtvcp_embed qtvcp -o 1 -d -c qtvcp_embed -x {XID} cam_align

Chris
Attachments:

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

More
25 May 2021 05:59 #210192 by zu4lu
What files have to be changed to get it working? camview_widget.py to the lib library and your file in the config folder is enough, because i got an empty tab?

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

More
25 May 2021 06:11 #210193 by cmorley
I would suggest running from a terminal so you can read debug messages.
I;m assuming you are using the built in cam_align panel.
you sould just need to add the posted file into your config folder.

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

More
25 May 2021 07:45 - 25 May 2021 08:23 #210200 by plovdiv

Try this:
add this file to your config.
EMBED_TAB_COMMAND= halcmd loadusr -Wn qtvcp_embed qtvcp -o 1 -d -c qtvcp_embed -x {XID} cam_align


this gave me a "no such option -o"
qtvcp -h doesn't know this option either.

I did a "grep -R getopt linuxcnc/lib/python/qtvcp" but couldn't find the options parsing.
Last edit: 25 May 2021 08:23 by plovdiv.

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

More
25 May 2021 08:37 #210206 by cmorley
what version of linuxcnc are you using?

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

More
25 May 2021 08:54 - 25 May 2021 10:58 #210209 by plovdiv

what version of linuxcnc are you using?


2.8.0

camview_widget.py contains hardcoded camNum:
self.video = WebcamVideoStream(src=0).start()


Meanwhile update to 2.8.1 but got the same "no such option" error
Last edit: 25 May 2021 10:58 by plovdiv.

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

More
25 May 2021 18:19 #210246 by cmorley
yes qtvcp in 2.8 does not support the -o option it seems
I can add it but you'd have to wait for next release or modify the code yourself.
The following user(s) said Thank You: plovdiv

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

More
25 May 2021 21:39 #210266 by andypugh
There should be another 2.8 release in a month or so.

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

Moderators: cmorley
Time to create page: 0.230 seconds
Powered by Kunena Forum