Update help ---- PoKeys No moore

More
5 years 9 months ago #193939 by ikkuh
Replied by ikkuh on topic Update help
Hi Tecno,

tecno wrote: 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:
Code:
/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:
Code:
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
Code:
sudo ls -la /dev/video*
You can also find the proper name if you do a
Code:
dmesg
with unplugged camera and then plugin the camera and do another
Code:
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:
Code:
--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.
Code:
--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.
Code:
--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,
Code:
https://mpv.io/manual/stable/
Hope this helps.

Please Log in to join the conversation.

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

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

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

Attachment not found

Please Log in to join the conversation.

More
5 years 9 months ago #193948 by tecno
Replied by tecno on topic Update help
Here a screen from webcamoid

Attachment not found



And here in gmoccapy

Attachment not found

Please Log in to join the conversation.

More
5 years 9 months ago #193949 by ikkuh
Replied by ikkuh on topic Update help

tecno wrote: 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 to join the conversation.

More
5 years 9 months ago #193950 by ikkuh
Replied by ikkuh on topic Update help

tecno wrote:
in gmoccapy


If you remove the
Code:
--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).

Please Log in to join the conversation.

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

More
5 years 9 months ago #194224 by tecno
Replied by tecno on topic Update help
Here an update from the workshop.

Attachment not found



Attachment not found



Attachment not found




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.

Please Log in to join the conversation.

More
5 years 9 months ago #194226 by ikkuh
Replied by ikkuh on topic Update help
Looks nice!
Good to see you have it working. Have fun.

Please Log in to join the conversation.

Time to create page: 0.119 seconds
Powered by Kunena Forum