On Saturday 10 May 2014 01:35:41 Jon Elson did opine
And Gene did reply:
> OK, got camview-emc loaded, as described in the Wiki page
> http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Adding_Digital_Zoom_To_Camview
> -Emc
>
> But, not all of it is working. If I just have the line like
> this:
>
> EMBED_TAB_COMMAND = ./camview-emc-f1oat.py -w {XID}
>
> I get a video in the Camera tab, but if I
> put either :
> -C camview.cfg
> or
> -g cam.ui
>
> in the line, then I just get a blank gray window for the Camera
> tab. Are there other files I need to bring in?
>
> Also, the camview video is really dark and blue, is there an
> adjustment for the color?
>
> Thanks,
>
> Jon
This is what I have in my .ini file Jon: (word wrap off so it doesn't muck this
up)
EMBED_TAB_NAME = CAM_View
EMBED_TAB_COMMAND = camview-emc -c mycamviewcfg -g togle-caa.ui -H campins.hal
-w {XID}
Then mycamviewcfg (name is arbitrary as long as it has your setup) is:
<?xml version="1.0" encoding="utf-8" ?>
<chain>
<unit id="input.v4l2:0" width="640" height="480"
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
<control id="input">0</control>
<control id="standard">0</control>
<control id="brightness">0</control>
<control id="contrast">32</control>
<control id="saturation">64</control>
<control id="hue">0</control>
<control id="gamma">100</control>
<control id="control-9963800">2</control>
<control id="control-9963803">32</control>
<control id="control-9963804">1</control>
</unit>
<unit id="util.flip" width="640" height="480"
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
<control id="flip-h">1</control>
<control id="flip-v">0</control>
</unit>
<unit id="output.opengl" width="640" height="480"
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
</unit>
<unit id="emc.crosshair" width="640" height="480"
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
<control id="enable">1</control>
<control id="color-r">0.980285</control>
<control id="color-g">0.0358434</control>
<control id="color-b">0.0358434</control>
<control id="gl-xor">0</control>
<control id="circle-radius">100</control>
<control id="circle-angle">18.1</control>
<control id="shape">1</control>
</unit>
<unit id="emc.halio" width="640" height="480"
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
<control id="limit">3</control>
<control id="reload">0</control>
<control id="circle">video.circle</control>
<control id="axis-pins">sum2.%d.out</control>
<control id="axis-letters">XYZABCDEFGH</control>
<control id="spacing">20</control>
<control id="color-r">0.980285</control>
<control id="color-g">0.0358434</control>
<control id="color-b">0.0358434</control>
<control id="gl-xor">0</control>
</unit>
<unit id="convert.to_rgb8" width="640" height="480"
pixelformat="CAM_PIXEL_FORMAT_RGB" format_name="640x480 RGB 24bpp">
</unit>
</chain>
Then togle-caa.ui:
<?xml version="1.0"?>
<interface>
<!-- interface-requires gladevcp 0.0 -->
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy project-wide -->
<object class="GtkAlignment" id="vcp1">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<child>
<object class="HAL_CheckButton" id="hal_checkbutton1">
<property name="label" translatable="yes">G43H99</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_SHRINK</property>
<property name="y_options">GTK_SHRINK</property>
</packing>
</child>
<child>
<object class="HAL_Button" id="hal_button1">
<property name="label" translatable="yes">Save XYZ</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_SHRINK</property>
<property name="y_options">GTK_SHRINK</property>
</packing>
</child>
<child>
<object class="HAL_HScale" id="hal_hscale1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">adjustment_circle</property>
<property name="restrict_to_fill_level">False</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
</object>
</child>
<child>
<object class="HAL_HScale" id="hal_hscale2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">adjustment_angle</property>
<property name="restrict_to_fill_level">False</property>
<property name="value_pos">right</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="HAL_Button" id="hal_button2">
<property name="label" translatable="yes">Center3</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_SHRINK</property>
<property name="y_options">GTK_SHRINK</property>
</packing>
</child>
<child>
<object class="HAL_Button" id="hal_button3">
<property name="label" translatable="yes">Center4</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_SHRINK</property>
<property name="y_options">GTK_SHRINK</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step_increment">0.10000000000000001</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">100</property>
<property name="step_increment">0.10000000000000001</property>
<property name="page_increment">10</property>
</object>
</interface>
And campins.hal:
#CamView pins
loadrt oneshot names=forOn,forOff
addf forOn servo-thread
addf forOff servo-thread
setp forOn.width .1
setp forOff.width .1
setp forOff.falling 1
setp forOff.rising 0
net forOnNet genescamviewcfg.hal_checkbutton1 => forOn.in forOff.in
net cam1 forOn.out => halui.mdi-command-06
net cam2 forOff.out => halui.mdi-command-07
net cam3 camview.hal_button1 => halui.mdi-command-08
net cam4 camview.hal_button2 => halui.mdi-command-09
net cam5 camview.hal_button3 => halui.mdi-command-10
If its dark & blue, check whats associated with the V4L2 video format spec,
it might not be correct for that camera. Thats in the camviewcfg file.
My camera would be happier on a USB2.0 port, atom boards claim to have
only one USB2.0, but I've not found which one it is yet. Currently
plugged into a USB1.1 port on the front panel & obviously suffering,
but it does work. Just painfully slow. My Shoe box is high on a shelf
and the control box sits beside it, so I need a ladder to get up to
it and play with ports vs camera cable. I should look at the board
drawing that came with it perhaps? :)
I now have 3 tabs in the backplot window, backplot, bare dro, and camview now.
The dro also shows in the camview tab, but needs a background text color set,
hard to read when its mixed into the camera video.
I hope this helps more than it confuses.
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users