public class AutoSnappingController
Controls auto-snapping process by observing contour detection results from ContourDetectorFrameHandler.
| Constructor and Description |
|---|
AutoSnappingController() |
| Modifier and Type | Method and Description |
|---|---|
static AutoSnappingController |
attach()
Same as
, but creates new ContourDetectorFrameHandler which will be attached to camera. Use this method if you don't need to control contour detection routine. However, be careful to not accidentally attach several ContourDetectorFrameHandler to camera therefore causing contour detection to be executed more than once. |
static AutoSnappingController |
attach()
Convenience method for attaching AutoSnappingController to camera view and ContourDetectorFrameHandler. Auto-snapping is enabled by default as soon as you create new instance of AutoSnappingController. You can manually enable or disable auto-snapping by calling
. |
boolean |
isEnabled() |
void |
setAutoSnappingCallback() |
void |
setEnabled() |
void |
setIgnoreBadAspectRatio()
Sets flag which enables/disables BadAspectRatio detection ignorance. By default -
false |
void |
setSensitivity()
Changes sensitivity of auto-snapping. That is: the more sensitive it is the faster it shoots. Sensitivity must be within [0..1] range. A value of 1.0 triggers automatic capturing immediately, a value of 0.0 delays the automatic by 3 seconds. The default value is 0.66 (1 sec)
|
public static AutoSnappingController attach()
Same as , but creates new ContourDetectorFrameHandler which will be attached to camera. AutoSnappingController.attach
Use this method if you don't need to control contour detection routine. However, be careful to not accidentally attach several ContourDetectorFrameHandler to camera therefore causing contour detection to be executed more than once.
AutoSnappingController.attachpublic static AutoSnappingController attach()
Convenience method for attaching AutoSnappingController to camera view and ContourDetectorFrameHandler.
Auto-snapping is enabled by default as soon as you create new instance of AutoSnappingController. You can manually enable or disable auto-snapping by calling .AutoSnappingController.setEnabled
AutoSnappingController.setEnabledpublic void setEnabled()
public boolean isEnabled()
true if auto-snapping is enabled. false if auto-snapping is disabled.public void setSensitivity()
Changes sensitivity of auto-snapping. That is: the more sensitive it is the faster it shoots.
Sensitivity must be within [0..1] range. A value of 1.0 triggers automatic capturing immediately, a value of 0.0 delays the automatic by 3 seconds.
The default value is 0.66 (1 sec)
public void setIgnoreBadAspectRatio()
Sets flag which enables/disables BadAspectRatio detection ignorance. By default - false
public void setAutoSnappingCallback()