IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.
Sets the automatic focus control. If enabled, the optic device shall be set into a mode of operation, where the lens automatically finds the best possible focus.
For FocusAuto, you can use the sub-region "AutoFeatureFocusAuto" to specify on which image detail to focus (see SubRegionSelector).
Name |
FocusAuto[OpticControllerSelector] |
Category |
|
Interface |
Enumeration |
Access |
Read/Write |
Unit |
- |
Visibility |
Beginner |
Values |
Off Once Continuous ContinuousSingleScan |
Standard |
SFNC |
Availability uEye+ |
|
Availability uEye |
- |
Values description
•Off (default): Automatic focus is disabled. You can use FocusStepper to set the focus manually.
•Once: The focus is adapted once by the device. Once it has converged, it returns to the "Off" state.
•Continuous: The focus is constantly adapted by the device to maximize the dynamic range.
•ContinuousSingleScan: The focus is detecting scene changes and triggers a single scan if there are sufficient changes.
Code example
C++
// Before accessing FocusAuto, make sure OpticControllerSelector is set correctly
// Set OpticControllerSelector to "OpticController0"
nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("OpticControllerSelector")->SetCurrentEntry("OpticController0");
// Determine the current entry of FocusAuto
std::string value = nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("FocusAuto")->CurrentEntry()->SymbolicValue();
// Get a list of all available entries of FocusAuto
auto allEntries = nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("FocusAuto")->Entries();
std::vector<std::shared_ptr<peak::core::nodes::EnumerationEntryNode>> availableEntries;
for(const auto & entry : allEntries)
{
if ((entry->AccessStatus()!=peak::core::nodes::NodeAccessStatus::NotAvailable)
&& (entry->AccessStatus()!=peak::core::nodes::NodeAccessStatus::NotImplemented))
{
availableEntries.emplace_back(entry);
}
}
// Set FocusAuto to "Off"
nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("FocusAuto")->SetCurrentEntry("Off");
C#
// Before accessing FocusAuto, make sure OpticControllerSelector is set correctly
// Set OpticControllerSelector to "OpticController0"
nodeMapRemoteDevice.FindNode<peak.core.nodes.EnumerationNode>("OpticControllerSelector").SetCurrentEntry("OpticController0");
// Determine the current entry of FocusAuto
string value = nodeMapRemoteDevice.FindNode<peak.core.nodes.EnumerationNode>("FocusAuto").CurrentEntry().SymbolicValue();
// Get a list of all available entries of FocusAuto
allEntries = nodeMapRemoteDevice.FindNode<peak.core.nodes.EnumerationNode>("FocusAuto").Entries();
List<string> availableEntries = new List<string>();
for(int i = 0; i < allEntries.Count(); ++i)
{
if ((allEntries[i].AccessStatus() != peak.core.nodes.NodeAccessStatus.NotAvailable)
&& (allEntries[i].AccessStatus() != peak.core.nodes.NodeAccessStatus.NotImplemented))
{
availableEntries.Add(allEntries[i].SymbolicValue());
}
}
// Set FocusAuto to "Off"
nodeMapRemoteDevice.FindNode<peak.core.nodes.EnumerationNode>("FocusAuto").SetCurrentEntry("Off");
Python
# Before accessing FocusAuto, make sure OpticControllerSelector is set correctly
# Set OpticControllerSelector to "OpticController0" (str)
nodeMapRemoteDevice.FindNode("OpticControllerSelector").SetCurrentEntry("OpticController0")
# Determine the current entry of FocusAuto (str)
value = nodeMapRemoteDevice.FindNode("FocusAuto").CurrentEntry().SymbolicValue()
# Get a list of all available entries of FocusAuto
allEntries = nodeMapRemoteDevice.FindNode("FocusAuto").Entries()
availableEntries = []
for entry in allEntries:
if (entry.AccessStatus() != ids_peak.NodeAccessStatus_NotAvailable
and entry.AccessStatus() != ids_peak.NodeAccessStatus_NotImplemented):
availableEntries.append(entry.SymbolicValue())
# Set FocusAuto to "Off" (str)
nodeMapRemoteDevice.FindNode("FocusAuto").SetCurrentEntry("Off")