PDA

View Full Version : VCDID_Saturation and VCDID_Hue properties have no effect when changed



acanicio
December 29, 2009, 21:31:08
Dear Stefan,

I sincerely apologize for the amount of questions I'm flooding you with.... :confused:

Are the following properties supposed to work with the DBKxx .AS cameras ?

VCDID_Saturation
VCDID_Hue

When I change the values :


If ICImagingControl.DeviceValid and
ICImagingControl.HueAvailable then
Begin
SetVCDAbsolutePropertyValue(ICImagingControl,
VCDID_Hue,
Value,
False);
End;

and


If ICImagingControl.DeviceValid and
ICImagingControl.SaturationAvailable then
Begin
SetVCDAbsolutePropertyValue(ICImagingControl,
VCDID_Saturation,
Value,
False);
End;



Here is the SetVCDAbsolutePropertyValue procedure :


Procedure SetVCDAbsolutePropertyValue(Control : TICImagingControl;
Const ItemID : WideString;
Value : Double;
Auto : Boolean);
Var
VCDInterface : VCDPropertyInterface;
VCDItem : VCDPropertyItem;
VCDAbsoluteValue : VCDAbsoluteValueProperty;
VCDItemAuto : VCDSwitchProperty;
VCDItemRange : VCDRangeProperty;
Min,Max : Double;

Begin
if Control.DeviceValid = True then
begin
VCDItem := Control.VCDPropertyItems.FindItem(ItemID);
If VCDItem <> nil then
begin
// The GUIDs are VCDElement_Value : VCDInterface_Range
// VCDExposureRange := VCDRangeProperty(VCDExposure.Elements.FindInterfac e('{B57D3000-0AC6-4819-A609-272A33140ACA}:{99B44940-BFE1-4083-ADA1-BE703F4B8E03}'));
VCDAbsoluteValue := VCDAbsoluteValueProperty(VCDItem.Elements.FindInte rface(VCDElement_Value+':'+VCDInterface_AbsoluteVa lue));
If VCDAbsoluteValue <> nil then
Begin
VCDItemAuto := VCDSwitchProperty(VCDItem.Elements.FindInterface(V CDElement_Auto+':'+VCDInterface_Switch));
if VCDItemAuto <> NIL then
Begin
VCDItemAuto.Switch := Auto;
If Not Auto then
Begin
Min := VCDAbsoluteValue.RangeMin;
Max := VCDAbsoluteValue.RangeMax;
If Value < Min then
VCDAbsoluteValue.Value := Min
else
If Value > Max then
VCDAbsoluteValue.Value := Max
else
VCDAbsoluteValue.Value := Value;
End;

End;
// The GUIDs are VCDElement_Auto : VCDInterface_Switch
End
else
Begin
VCDItemRange := VCDRangeProperty(VCDItem.Elements.FindInterface(VC DElement_Value+':'+VCDInterface_Range));
If VCDItemRange <> nil then
Begin
Min := VCDItemRange.RangeMin;
Max := VCDItemRange.RangeMax;
If Value >= 0 then
Begin
If Value < Min then
VCDItemRange.Value := Round(Min)
else
If Value > Max then
VCDItemRange.Value := Round(Max)
else
VCDItemRange.Value := Round(Value);
End;

// The GUIDs are VCDElement_Auto : VCDInterface_Switch
VCDItemAuto := VCDSwitchProperty(VCDItem.Elements.FindInterface(V CDElement_Auto+':'+VCDInterface_Switch));
if VCDItemAuto <> NIL then
VCDItemAuto.Switch := Auto;
End;

End;
end;
end;
End;


Have absolutely no visible effect even if they have the status "available"...
Is there something I may be doing wrong ?

When I change other properties, like VCDID_Gamma or VCDID_Gain it works without a flaw.

Thank you
Best regards
Axel

Stefan Geissler
January 4, 2010, 08:53:10
The saturation and the hue properties have only an effect on an YUV format. They have no effect on BY8 and Y800 video formats. Which format do you use?