-
Notifications
You must be signed in to change notification settings - Fork 0
Home
A photo with faces uses foreground extraction and feature segmentation to output: recolorized and depth.
- Set quality slider for speed or resolution.
- Set default colors for region or id.
- Hover src (onionskin) to view ROI, colorization, & depth(s).
- Hover dst (recolored composite) to interact with depth map.
- Set slider to magnify details.
- Hover to view mask GrabCut refinements.
- Click to set mask colorization.
- Hover to highlight mask palette in color wheel.
- Plot ROI relative sample size from kmeans.
GrabCut mask values:
-
.BGD
-- Background -
.FGD
-- Foreground -
.PR_BGD
-- Probable Background -
.PR_FGD
-- Probable Foreground
Scale factor for reduction in cast.segment
and cast.palette
.
Count of complete invocations of cast.init
.
Overwrite mat and resize to 1, to release memory.
div#mask contains batch output with: feature masks, kmeans counts, color pickers.
Orient and resize image file input with loadImage.
Resize a Mat or Rect.
Canvas#roi provides visual feedback to user of OpenCV feature mask ROI.
Canvas#chromaImg from sto.orient
is the provided image.
- Stores data from feature ROI in
cast.palette
such as.bg
,.eye
,.hair
,.iris
,.lips
,.skin
, and also.bump
. - Properties include:
count
,depth
,face
,kmeans
,mat
,to
.
The origin of value complete
determines progress:
-
cast.orient
: callcast.init
-
cast.segment
andcast.palette
: update UI progress fromsto.updated
- Abort/Complete: call
cast.composite
,Pixi
,chart
Named setTimeout reference from sto.update
.
-
.bmp
-- Mat for depth ofPIXI.filters.DisplacementFilter
-
.dst
-- Mat forcast.composite
(copy of src) -
.hsv
-- Mat forcast.diff
andcast.pyramid
-
.src
-- Mat fromcast.init
from #chromaImg (responsive)
Multiple faces within an image are presented as eigen.
Background, colorized features, and depth are masked and flattened for destination.
The inrange duotone used in cast.palette
may not work on a complex feature ROI, such as lips and hair. Diff is a manual probe of average HSV differences which paints each pixel with a weighted radius boundary. It returns a contour mask if preset criteria are satisfied, or fails to default.
The sequence of instructions to create ROI masks with GrabCut. For example: segment
extracts foreground, palette
requires skin before lips, hair can affect the alpha overlap of eyes.
Append different masks from cast.palette
inRange and cast.pyramid
GrabCut. User can preview changes with colorize picker.
Uses cast.diff
, inRange and cast.pyramid
to refine feature masks.
GrabCut dependency hierarchy from feature relationships creates mask for cast.recolor
.
Multiply blend Mat within mask with color. The Canvas sto.var.dst
is binary and flattened, so alternatively a Canvas#color contains regions of solid color.
Draw ROI rectangle on sto.roi
for review.
Extract foreground mask by bisecting haarCascade face ROI.
Plots a d3 hsl color wheel linked to feature mask kmeans palette.
Links the faces' depth maps to cursor position for a parallax effect.