usb web cam - axis cross hairs

  • brianTruck
  • brianTruck's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
23 Feb 2013 23:39 #30479 by brianTruck
usb web cam - axis cross hairs was created by brianTruck
Hi,
I know there is a ton of post about using a web cam in axis, but I have a web cam working on its own tab in axis using.

[DISPLAY]
EMBED_TAB_NAME = Camera
EMBED_TAB_COMMAND = mplayer -wid {XID} tv://0

Is there a simple way to add cross hairs to it without getting into the whole camview-emc mess ?

Thanks'
Brian

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

More
24 Feb 2013 00:16 - 24 Feb 2013 00:17 #30480 by ArcEye
Replied by ArcEye on topic usb web cam - axis cross hairs

Is there a simple way to add cross hairs to it without getting into the whole camview-emc mess ?


I don't know of one.

camview-emc is quite straight forward, you already know your camera works and is recognised, so you just have to add psha's repositories to apt, install and configure.

You do get some other goodies too, like DRO

It is all in here

psha.org.ru/b/camview-emc.html

regards
Last edit: 24 Feb 2013 00:17 by ArcEye.

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

  • brianTruck
  • brianTruck's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
24 Feb 2013 01:36 #30488 by brianTruck
Replied by brianTruck on topic usb web cam - axis cross hairs
I'm fighting my way through this Linux stuff , I added

deb psha.org.ru/debian/lucid contrib

to my sources.list file and when I do a

apt-get update

I get a " E: Malformed line 57 in list /ect/apt/sources.list (dist parse) " I looked and line 57 is where " deb psha.org.ru/debian/lucid contrib" is

so that is why I was trying to find a different way

Thanks' Brian

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

  • brianTruck
  • brianTruck's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
24 Feb 2013 03:09 - 24 Feb 2013 03:14 #30494 by brianTruck
Replied by brianTruck on topic usb web cam - axis cross hairs
Ok,

" deb psha.org.ru/debian lucid contrib "
, works

now where is the camview-emc install package at ?

I know that all you old time Linux guys are laughing at me ,but I have 4 books open trying to figure this out.


Thanks' Brian

EDIT --- found it !!

sudo apt-get install camview-emc
Last edit: 24 Feb 2013 03:14 by brianTruck. Reason: found install

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

  • brianTruck
  • brianTruck's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
24 Feb 2013 04:15 #30498 by brianTruck
Replied by brianTruck on topic usb web cam - axis cross hairs
Ok,
cross hairs, dro's and camera light comes on, screen says video streaming but is black. Any suggestions?


Brian
The following user(s) said Thank You: Tchefter

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

More
24 Feb 2013 19:00 #30521 by ArcEye
Replied by ArcEye on topic usb web cam - axis cross hairs
Hi

The Atlantic divide, I am up now.

The first link I gave you probably covers this

If you get black square then problem is in renderer.
One known workaround is to install libgl-mesa-swx11 package — software implementation of OpenGL. RTAI kernel is known to have issues with graphics drivers so this may help (see EMC2 wiki).


I had the same problem with a workshop machine that worked fine with Axis, glxgears etc. so I did not immediately think of openGL problems.
But that is what it was and switching to the software libraries cured it completely.

It is very simple to do, just go to the Synaptic Package Manager and search for libgl-mesa-swx11
Right click and select 'Mark for Installation' and you will see that synaptic automatically marks for removal the old libgl-mesa libraries as they will conflict.
Then click on 'Apply'

When done reboot and test again, if that was your problem it should now work.

regards
The following user(s) said Thank You: brianTruck

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

  • brianTruck
  • brianTruck's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
24 Feb 2013 21:20 - 24 Feb 2013 22:46 #30524 by brianTruck
Replied by brianTruck on topic usb web cam - axis cross hairs
well I kind of made a mess ,tried to install libgl-mesa from terminal.So I got all kinds of warnings when I tried to install from package manager.

I reloaded the computer from scratch with Linux ,went to package manager installed the mesa driver. Then I started reloading the camunit software ,camunits says it needs openGL and can't find it.


Thanks'
Brian

EDIT ---

ok ,works now !!

1) sudo apt-get install libgl1-mesa-dev
2) libgl-mesa-swx11 -in package manager

Thank you ArcEye !
Last edit: 24 Feb 2013 22:46 by brianTruck.

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

  • verticalperformance
  • verticalperformance's Avatar
  • Offline
  • Senior Member
  • Senior Member
More
18 Mar 2013 13:20 #31530 by verticalperformance
Replied by verticalperformance on topic usb web cam - axis cross hairs
I also had the black screen on my (newer) PC with camview
  • Software Mesa driver did work, but really slow response - Also really chewed the CPU usage too.
  • Re-built PC from scratch to try again

So then I started looking at how to do cross hairs using mplayer, which seems to be customiseable to a fault
But it can't draw lines.... But it can draw rectangles, so I drew a vertical and horizontal rectangle 2 pixels high/wide
EMBED_TAB_COMMAND = mplayer -wid {XID} tv://0 -vf rectangle=-1:2:-1:240,rectangle=2:-1:320:-1
Where 320 is half the width of the webcam resolution, and 240 is half the height.

Works great with hardware accel video drivers, with instant screen updates. Can't do the x,y coords on the video window like camview-emc, but does give you the more important reference of what the camera is looking at.

Enjoy!
The following user(s) said Thank You: ArcEye

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

More
18 Mar 2013 16:10 #31535 by ArcEye
Replied by ArcEye on topic usb web cam - axis cross hairs
Hi

A good bit of lateral thinking

If you want a DRO visible, you can always use 3 number display widgets in a pyvcp panel and net them to Xpos, Ypos, Zpos

regards

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

More
13 Aug 2013 18:04 #37615 by eslavko
Replied by eslavko on topic usb web cam - axis cross hairs
Nice approach....
Maybe you can just put overlay picture over the webcam. (and make cross, circle ... whatever)

I just quick read the www.linuxjournal.com/content/overlay-ima...mplayer-and-mencoder

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

Time to create page: 0.085 seconds
Powered by Kunena Forum