| Package | com.hook.imageprocessing.siox |
| Class | public class SegmentationController |
| Inheritance | SegmentationController flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
| canvas : ICanvas
Returns the current canvas. | SegmentationController | ||
| confidenceMatrix : Vector.<Number>
A reference to the confidenceMatrix in canvas. | SegmentationController | ||
| cropArea : Rectangle
The area that has been cropped. | SegmentationController | ||
| hasBackground : Boolean
Returns if the current canvas has background or not. | SegmentationController | ||
| hasForeground : Boolean
Returns if the current canvas has foreground or not. | SegmentationController | ||
| imageData : Vector.<Number>
A reference to the imageData in canvas. | SegmentationController | ||
| isSegmentated : Boolean = false
Boolean value of if the current canvas has been segmented or not. | SegmentationController | ||
| refineThreshold : Number = 0.5
This is the sensitivity of the refinement tool. | SegmentationController | ||
| siox : SioxSegmentator
A reference to the SioxSegmentator object that performs the segmentation. | SegmentationController | ||
| smoothing : Number = 2
The smoothing value is used to reduce the amount of jagged egdges in the kutout. | SegmentationController | ||
| stageReference : Stage = null
A reference to the stage
| SegmentationController | ||
| undoController : UndoController
UndoController handles all the saving of the states for the canvas. | SegmentationController | ||
| Method | Defined By | ||
|---|---|---|---|
SegmentationController(canvas:ICanvas = null)
Initializes the SegmentationController. | SegmentationController | ||
applySelection(rect:Rectangle, confidence:Number):void
This method applies cropping. | SegmentationController | ||
segmentate():void
Applies segmentation. | SegmentationController | ||
setCircleConfidence(center:Point, radius:Number, confidence:Number, feathered:Number = -1, featherDamping:Number = 0.5):void
Sets the confidence of a circular region in the image. | SegmentationController | ||
setConfidence(rect:Rectangle, confidence:Number):void
Sets the confidence of a region in the image data. | SegmentationController | ||
supPixelRefineAdd(rect:Rectangle, threshold:Number):void
Refines the image by adding back pixels using the SioxSegmentator.subPixelRefineAdd() method. | SegmentationController | ||
supPixelRefineAddCircle(center:Point, radius:Number, threshold:Number):void
Refines the image by adding back pixels using the SioxSegmentator.subPixelRefineAddCircle() method. | SegmentationController | ||
supPixelRefineRemove(rect:Rectangle, threshold:Number):void
Refines the image by removed pixels using the SioxSegmentator.supPixelRefineRemove() method. | SegmentationController | ||
supPixelRefineRemoveCircle(center:Point, radius:Number, threshold:Number):void
Refines the image by removing pixels using the SioxSegmentator.subPixelRefineRemoveCircle() method. | SegmentationController | ||
undo():void
If you made a mistake with your brushing, have no fear, this method is here! Calls undo on the UndoController and applies the saved state of the image if it is available. | SegmentationController | ||
| Method | Defined By | ||
|---|---|---|---|
When segmentation is complete, dispatch the SegmentationEvent.SEGMENTATION_COMPLETE event. | SegmentationController | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the canvas has been swapped with another canvas. | SegmentationController | |||
| Dispatched when the canvas has been updated, such as cropping, foreground drawing, background drawing, etc. | SegmentationController | |||
| Dispatched when segmentation has completed. | SegmentationController | |||
| Dispatched when segmentation has started. | SegmentationController | |||
| canvas | property |
canvas:ICanvasReturns the current canvas.
public function get canvas():ICanvas public function set canvas(value:ICanvas):void| confidenceMatrix | property |
public var confidenceMatrix:Vector.<Number>
A reference to the confidenceMatrix in canvas.
| cropArea | property |
public var cropArea:RectangleThe area that has been cropped. None of the brushes will brush outside of this area except for the refinement brushes.
| hasBackground | property |
hasBackground:BooleanReturns if the current canvas has background or not.
public function get hasBackground():Boolean public function set hasBackground(value:Boolean):void| hasForeground | property |
hasForeground:BooleanReturns if the current canvas has foreground or not.
public function get hasForeground():Boolean public function set hasForeground(value:Boolean):void| imageData | property |
public var imageData:Vector.<Number>
A reference to the imageData in canvas.
| isSegmentated | property |
public var isSegmentated:Boolean = falseBoolean value of if the current canvas has been segmented or not.
| refineThreshold | property |
public var refineThreshold:Number = 0.5This is the sensitivity of the refinement tool.
| siox | property |
public var siox:SioxSegmentatorA reference to the SioxSegmentator object that performs the segmentation.
| smoothing | property |
public var smoothing:Number = 2The smoothing value is used to reduce the amount of jagged egdges in the kutout. Higher the number, the more smoothing.
| stageReference | property |
public var stageReference:Stage = nullA reference to the stage
| undoController | property |
public var undoController:UndoControllerUndoController handles all the saving of the states for the canvas.
| SegmentationController | () | Constructor |
public function SegmentationController(canvas:ICanvas = null)Initializes the SegmentationController.
Parameterscanvas:ICanvas (default = null) — An optional default canvas to start with.
|
| applySelection | () | method |
public function applySelection(rect:Rectangle, confidence:Number):voidThis method applies cropping. It sets everything outside of the rectangle to SegmentationConfidence.CERTAIN_BACKGROUND_CONFIDENCE and everything else to the confidence value provided.
Parameters
rect:Rectangle — The region to apply.
| |
confidence:Number — The confidence value to apply inside the rectangle.
|
| segmentate | () | method |
public function segmentate():voidApplies segmentation. Dispatches the SegmentationEvent.SEGMENTATION_STARTED event.
| segmentationCompleteHandler | () | method |
protected function segmentationCompleteHandler(e:SegmentationEvent):voidWhen segmentation is complete, dispatch the SegmentationEvent.SEGMENTATION_COMPLETE event.
Parameters
e:SegmentationEvent |
| setCircleConfidence | () | method |
public function setCircleConfidence(center:Point, radius:Number, confidence:Number, feathered:Number = -1, featherDamping:Number = 0.5):voidSets the confidence of a circular region in the image.
Parameters
center:Point — The center point of the circle.
| |
radius:Number — The radius of the circle.
| |
confidence:Number — The confidence to apply inside that circle.
| |
feathered:Number (default = -1) — The feather sensitivity. This value must be between 0 and 1. The closer to 1, the softer the brush. The closer to 0, the harder the brush.
| |
featherDamping:Number (default = 0.5) — Reduces overall opacity and strength of the feathering. Between 0 and 1.
|
| setConfidence | () | method |
public function setConfidence(rect:Rectangle, confidence:Number):voidSets the confidence of a region in the image data.
Parameters
rect:Rectangle — The region to set.
| |
confidence:Number — The confidence to set that region.
|
| supPixelRefineAdd | () | method |
public function supPixelRefineAdd(rect:Rectangle, threshold:Number):voidRefines the image by adding back pixels using the SioxSegmentator.subPixelRefineAdd() method.
Parameters
rect:Rectangle — The rectangle to apply.
| |
threshold:Number — The sensitivity of the refinement. Between 0 and 1.
|
| supPixelRefineAddCircle | () | method |
public function supPixelRefineAddCircle(center:Point, radius:Number, threshold:Number):voidRefines the image by adding back pixels using the SioxSegmentator.subPixelRefineAddCircle() method.
Parameters
center:Point — The center of the circle region
| |
radius:Number — The radius of the circle region.
| |
threshold:Number — The sensitivity of the refinement. Between 0 and 1.
|
| supPixelRefineRemove | () | method |
public function supPixelRefineRemove(rect:Rectangle, threshold:Number):voidRefines the image by removed pixels using the SioxSegmentator.supPixelRefineRemove() method.
Parameters
rect:Rectangle — The rectangle to apply.
| |
threshold:Number — The sensitivity of the refinement. Between 0 and 1.
|
| supPixelRefineRemoveCircle | () | method |
public function supPixelRefineRemoveCircle(center:Point, radius:Number, threshold:Number):voidRefines the image by removing pixels using the SioxSegmentator.subPixelRefineRemoveCircle() method.
Parameters
center:Point — The center of the circle region
| |
radius:Number — The radius of the circle region.
| |
threshold:Number — The sensitivity of the refinement. Between 0 and 1.
|
| undo | () | method |
public function undo():voidIf you made a mistake with your brushing, have no fear, this method is here! Calls undo on the UndoController and applies the saved state of the image if it is available.
| canvasChanged | Event |
com.hook.imageprocessing.siox.canvas.CanvasEventDispatched when the canvas has been swapped with another canvas.
| canvasManipulated | Event |
com.hook.imageprocessing.siox.canvas.CanvasEventDispatched when the canvas has been updated, such as cropping, foreground drawing, background drawing, etc.
| segmentationComplete | Event |
com.hook.imageprocessing.siox.events.SegmentationEventDispatched when segmentation has completed.
| segmentationStarted | Event |
com.hook.imageprocessing.siox.events.SegmentationEventDispatched when segmentation has started.