I am using a Pixelink camera PLD 7620 with a liquid lens for autofocus. I have downloaded the Pixelink capture software and the features of the camera work well there. I installed the pixelinkWrapper module in Python and tried to repeat certain steps. Auto exposure and white balance work but I cannot seem to get auto focus to work. I always get errors of using wrong parameters. Has anyone tried to control these cameras with Python before?
What I tried already is the following code:
from pixelinkWrapper import*
ret = PxLApi.initialize(0)
Camera = ret[1]
focus = PxLApi.setFeature(Camera, PxLApi.FeatureId.FOCUS,
PxLApi.FeatureFlags.ONEPUSH,
params = [1, 46000] )
To perfom one time auto focus the camera must be streaming. Although the error refers to "invalid parameter" the parameters used were not the issue. The solution is to start the streaming before.