How to choose camera device used by cam_align?

More
5 years 5 months ago #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?

Please Log in to join the conversation.

More
5 years 5 months ago #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 to join the conversation.

More
5 years 5 months ago #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

Please Log in to join the conversation.

More
5 years 5 months ago #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 to join the conversation.

More
5 years 5 months ago #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 to join the conversation.

More
5 years 5 months ago #210200 by plovdiv

cmorley wrote: 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.

Please Log in to join the conversation.

More
5 years 5 months ago #210206 by cmorley
what version of linuxcnc are you using?

Please Log in to join the conversation.

More
5 years 5 months ago #210209 by plovdiv

cmorley wrote: 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

Please Log in to join the conversation.

More
5 years 5 months ago #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.

Please Log in to join the conversation.

More
5 years 5 months ago #210266 by andypugh
There should be another 2.8 release in a month or so.

Please Log in to join the conversation.

Time to create page: 0.133 seconds
Powered by Kunena Forum