Update help ---- PoKeys No moore

More
03 Jan 2021 10:59 - 03 Jan 2021 12:07 #193939 by ikkuh
Replied by ikkuh on topic Update help
Hi Tecno,

EMBED_TAB_NAME = Camera
EMBED_TAB_LOCATION = ntb_preview
#EMBED_TAB_COMMAND = mpv /dev/video0 --wid {XID} --vf-add=drawbox=-1:2:-1:240:t=1 --vf-add=drawbox=2:-1:320:-1:t=1 --no-border
EMBED_TAB_COMMAND = mplayer -wid {XID} tv:// -vf rectangle=-1:2:-1:240,rectangle=2:-1:320:-1

It works with MPLAYER. Have to do some tweaking as picture is way too dark.


You are not giving the proper camera name in the commands. The default names will work for your first camera:
/dev/video0
But I am wondering why you want to use mpv if mplayer works for you. Mpv is the recplacement for mplayer in the latest Debian release.

I am pretty sure if you change the mpv command to:
mpv tv:// --wid {XID} --vf-add=drawbox=-1:2:-1:240:t=1 --vf-add=drawbox=2:-1:320:-1:t=1 --no-border
it will work.
So it;s a case of using the proper camera name. You can get a list of all the video capable hardware if you do a
sudo ls -la /dev/video*
You can also find the proper name if you do a
dmesg
with unplugged camera and then plugin the camera and do another
dmesg
. Your camera will be the last hardware in the second list (or in the difference between the first and second dmesg).

For your information, these are pure cosmetic:
--vf-add=drawbox=-1:2:-1:240:t=1
adds a rectangle on the camera image in such a way that only the ' inner' lines show up.
--vf-add=drawbox=2:-1:320:-1:t=1
same
The purpose of the rectangles (that form a cross on the image) is to have some crosshairs to better positon the spindle. The location of the crosshairs can be manipulated with the parameters in case your camera has an offset to the spindle axis.
--no-border
makes the cameraview in the tab in gmoccapy display without an ugly border.

There are many more command line parameters you can pass to mpv,
https://mpv.io/manual/stable/
Hope this helps.
Last edit: 03 Jan 2021 12:07 by ikkuh.
The following user(s) said Thank You: Clive S

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

More
03 Jan 2021 11:41 #193943 by tecno
Replied by tecno on topic Update help
Thanks for pointing me to a solution

EMBED_TAB_NAME = Camera
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = mpv av://v4l2:/dev/video0 --wid {XID} tv:// --vf-add=drawbox=-1:2:-1:240:t=1 --vf-add=drawbox=2:-1:320:-1:t=1 --no-border

Now that I have mpv working I still need to fix brightness.

Why mpv = it is the latest so why learn something tha will be gone after a while

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

More
03 Jan 2021 12:37 #193946 by tecno
Replied by tecno on topic Update help
Found a working workaround !

Open webcamoid = set all wanted values and you are good to go.

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

More
03 Jan 2021 12:41 - 03 Jan 2021 12:42 #193947 by tecno
Replied by tecno on topic Update help
This is my webcam setup for my lathe. Heavy base that will be self centered in X and Z against the chuck.

The small screwdriver is at spindle center. Webcam rebuilt with C lens mount and a 25mm lens acts like a macro lens.

Attachments:
Last edit: 03 Jan 2021 12:42 by tecno.

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

More
03 Jan 2021 12:58 #193948 by tecno
Replied by tecno on topic Update help
Here a screen from webcamoid



And here in gmoccapy

Attachments:

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

More
03 Jan 2021 13:02 #193949 by ikkuh
Replied by ikkuh on topic Update help

This is my webcam setup for my lathe.


Here is a video of my setup, nas.cnckloon.nl/s/bey5zNL7nmmzJ4F

I use very cheap Chinese 'endoscopes'. I always have a few in stock and can change a broken one after a collesion for a new one.

www.aliexpress.com/item/4001271665816.ht...02_,searchweb201603_

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

More
03 Jan 2021 13:08 #193950 by ikkuh
Replied by ikkuh on topic Update help


in gmoccapy


If you remove the
--vf-add=drawbox=-1:2:-1:240:t=1
statments your picture will look nicer.
You can also modify the parameters for drawbox such that the line and cross will be useful.

You can test the cam standalone without LinuxCNC, saves you a lot of time (remove the --wid {XID} and adjust the parameters).
The following user(s) said Thank You: tecno

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

More
03 Jan 2021 13:29 #193951 by tecno
Replied by tecno on topic Update help
I will have to play around but it looks quite OK with the crosshair as is.

Thank you ikkuh for helping an old fart like me.

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

More
06 Jan 2021 14:07 #194224 by tecno
Replied by tecno on topic Update help
Here an update from the workshop.








This is with mplayer and still on 2.7 and LinuxMint 19 I think. Will only upgrade to LCNC 2.81 and leave LM as is for now, reason is Touch is working and I do not know if it will work on LM20

Thanks for all help = much appreciated.
Attachments:
The following user(s) said Thank You: tommylight

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

More
06 Jan 2021 14:14 #194226 by ikkuh
Replied by ikkuh on topic Update help
Looks nice!
Good to see you have it working. Have fun.
The following user(s) said Thank You: tecno

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

Time to create page: 0.247 seconds
Powered by Kunena Forum