PDA

View Full Version : DFK 72AUC02-F AutoFocus OnePush + ROI



marius.g
March 3, 2015, 13:40:25
Hello,

I'm trying to trigger a OnePush AutoFocus with ROI similar to what IC Capture is doing:


VCDID_Focus -> VCDElement_AutoRoiLeft := X
VCDID_Focus -> VCDElement_AutoRoiRight := X+64
VCDID_Focus -> VCDElement_AutoRoiTop := Y
VCDID_Focus -> VCDElement_AutoRoiBottom := Y+64
VCDID_Focus -> VCDElement_AutoRoiEnable := true
VCDID_Focus -> VCDElement_OnePush := true
while (VCDID_Focus -> VCDElement_OnePushRunning == true) wait;


The camera does react, but toggles between two very different focus settings each time I execute the above sequence. What am I missing?

Thanks in advance
Marius

marius.g
March 3, 2015, 13:53:04
I played a bit with the IC Property Exporer and noticed that the AutoRoiLeft... properties can't be written as long as AutoRoiEnable is false. So here is my revised sequence:


VCDID_Focus -> VCDElement_AutoRoiEnable := true
VCDID_Focus -> VCDElement_AutoRoiLeft := X
VCDID_Focus -> VCDElement_AutoRoiRight := X+64
VCDID_Focus -> VCDElement_AutoRoiTop := Y
VCDID_Focus -> VCDElement_AutoRoiBottom := Y+64
VCDID_Focus -> VCDElement_OnePush := true
while (VCDID_Focus -> VCDElement_OnePushRunning == true) wait;


Unfortunately it still doesn't work.

marius.g
March 3, 2015, 14:01:17
I think I found my error - behind the scenes while processing the focus updates I accidentally wrote to VCDID_Focus -> VCDElement_Value which effectively cancelled the OnePush operation.