Camera tab in Axis

More
21 Mar 2022 09:50 #237897 by Henk
camview was created by Henk
HI
We are trying to implement camview embedded in Axis, but not having any success. 

I followed the instruction here  wiki.linuxcnc.org/cgi-bin/wiki.pl?Adding_Camview

Repository added and update seemed to work. 

LCNC starts, but the camview tab is blank. 

Anyone done this lately?

Thanks
Henk

Running 2.8.1 , Debian Stretch

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

More
21 Mar 2022 12:24 #237907 by strahlensauger
Replied by strahlensauger on topic camview
I just used mplayer. I had a lot of trouble getting camview to work.

Install mplayer
sudo apt install mplayer
and below the
[DISPLAY]
section add these lines
in the .ini file

EMBED_TAB_NAME = Camera
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = mplayer -wid {XID} tv://0 -vf  rectangle=-1:2:-1:240,rectangle=2:-1:320:-1

way easier than camview.
Worked in 2.7, 2.8 and 2.9 under buster and bullseye...

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

More
21 Mar 2022 12:47 #237908 by Henk
Replied by Henk on topic camview
HI
Thanks for your reply.
My problem is with the command below.

EMBED_TAB_COMMAND = mplayer -wid {XID} tv://0 -vf rectangle=-1:2:-1:240,rectangle=2:-1:320:-1

It returns an error saying "The wid option must be an integer: {XID}"

Henk

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

More
21 Mar 2022 20:08 - 21 Mar 2022 20:15 #237952 by strahlensauger
Replied by strahlensauger on topic camview
Hm, never encountered that error. It ran out of the box....

try
sudo dmesg | tail

what does it tell you?

then, are there video devices ?
what does
ls /dev/
show?

After a restart, does
 
mplayer tv:// -tv driver=v4l2

show a window of the camera?


 
Last edit: 21 Mar 2022 20:15 by strahlensauger.

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

More
21 Mar 2022 21:33 #237960 by robertspark
Replied by robertspark on topic camview
i tried this on my setup and this is the response i got:
rob@RobsCNC:~$ mplayer tv:// -tv driver=v4l2
MPlayer 1.4 (Debian), built with gcc-10 (C) 2000-2019 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: MICROSCOPE
 Capabilities:  video capture  streaming
 supported norms:
 inputs: 0 = Camera 1;
 Current input: 0
 Current format: YUYV
v4l2: ioctl set format failed: Device or resource busy
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.


Exiting... (End of file)
rob@RobsCNC:~$ ls /dev/
autofs           log           sg0       tty23  tty45  ttyS0    vcsa7
block            loop-control  shm       tty24  tty46  ttyS1    vcsu
bsg              mapper        snapshot  tty25  tty47  ttyS2    vcsu1
btrfs-control    media0        snd       tty26  tty48  ttyS3    vcsu2
bus              mem           stderr    tty27  tty49  uhid     vcsu3
char             mqueue        stdin     tty28  tty5   uinput   vcsu4
console          net           stdout    tty29  tty50  urandom  vcsu5
core             null          tty       tty3   tty51  usb      vcsu6
cpu_dma_latency  nvram         tty0      tty30  tty52  v4l      vcsu7
cuse             port          tty1      tty31  tty53  vcs      vfio
disk             ppp           tty10     tty32  tty54  vcs1     vga_arbiter
dri              psaux         tty11     tty33  tty55  vcs2     vhci
fb0              ptmx          tty12     tty34  tty56  vcs3     vhost-net
fd               ptp0          tty13     tty35  tty57  vcs4     vhost-vsock
full             ptp1          tty14     tty36  tty58  vcs5     video0
fuse             pts           tty15     tty37  tty59  vcs6     video1
hidraw0          random        tty16     tty38  tty6   vcs7     watchdog
hidraw1          rfkill        tty17     tty39  tty60  vcsa     watchdog0
hidraw3          rtc           tty18     tty4   tty61  vcsa1    zero
hpet             rtc0          tty19     tty40  tty62  vcsa2
hugepages        sda           tty2      tty41  tty63  vcsa3
initctl          sda1          tty20     tty42  tty7   vcsa4
input            sda2          tty21     tty43  tty8   vcsa5
kmsg             sda3          tty22     tty44  tty9   vcsa6
rob@RobsCNC:~$


ive only just started to mess about with a camera, I have a pencil type supereyes usb microscope type camera for scanthing use

www.supereyes-store.com/collections/micr...er-health-kit-tripod

I installed cheese and i got an image

not to hack the OPs thread

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

More
21 Mar 2022 21:50 #237962 by strahlensauger
Replied by strahlensauger on topic camview
Mine is a cheap China webcam with a 5m cable, but worked out of the box.
Strange that cheese worked with your cam and mplayer not, but
sometimes that happens
Maybe you can insert cheese in a tab in axis? But I don't know how to do
that...

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

More
21 Mar 2022 21:56 #237963 by robertspark
Replied by robertspark on topic camview
i restarted and got this, i am going to try with cheese (ive had my camera a few years as the belief was that the high resolution cameras sometimes used video compression and were not good for part tracing / had a lower frame rate)
 www.sheetcam.com/Scanything/index

ob@RobsCNC:~/scanything$ mplayer tv:// -tv driver=v4l2
MPlayer 1.4 (Debian), built with gcc-10 (C) 2000-2019 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: MICROSCOPE
 Capabilities:  video capture  streaming
 supported norms:
 inputs: 0 = Camera 1;
 Current input: 0
 Current format: YUYV
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 640x480 => 640x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
libvdpau-va-gl: VideoSurface::PutBitsYCbCr_glsl(): not implemented source YCbCr format 'VDP_YCBCR_FORMAT_YUYV'
[vdpau] Error when calling vdp_video_surface_put_bits_y_cb_cr: VDP_STATUS_INVALID_Y_CB_CR_FORMAT


MPlayer interrupted by signal 11 in module: filter_video
- MPlayer crashed by bad usage of CPU/FPU/RAM.
  Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
  disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
 [ This binary of MPlayer in Debian is currently compiled with
   '--enable-debug'; the debugging symbols are in the package
   'mplayer-dbgsym'.]
corrupted size vs. prev_size in fastbins


MPlayer interrupted by signal 6 in module: filter_video


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

More
21 Mar 2022 22:38 #237970 by robertspark
Replied by robertspark on topic camview
hmm this worked for me too...

github.com/wooksong/contributon2019-nns/issues/3
gst-launch-1.0 v4l2src name=cam_src ! videoconvert ! videoscale ! video/x-raw,format=RGB ! queue ! videoconvert ! ximagesink name=img_origin

 

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

More
21 Mar 2022 23:46 #237977 by cakeslob
Replied by cakeslob on topic camview
unless camview is something else I dont understand,you just want to view a webcam right? it should be included as a qtvcp, ive been using it with an rpi and chinese borescope cam, theres an axis sample config
github.com/LinuxCNC/linuxcnc/blob/master.../qtvcp/qtvcp_tab.ini
EMBED_TAB_NAME= qtscreen
EMBED_TAB_COMMAND= halcmd loadusr -Wn qtvcp_embed qtvcp -d -c qtvcp_embed  -x {XID} cam_align

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

More
22 Mar 2022 05:53 #237994 by cmorley
Replied by cmorley on topic camview
qtvcp has a cam module panel that can be embedded too.

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

Time to create page: 0.248 seconds
Powered by Kunena Forum