To color an image, areas which needs to be colored with a particular color are to be marked out with clear boundary. This then can be used as a Mask. One method is to detect edges of objects or areas and mark as black or white. This Emarker detects edges using any one of 7 different methods.
Types of edge detection available are "e1", "e2", "el", "ep", "epl", "es"and "esl". p stands for Prewitt, s for Sobel and l for Laplace. Type e1 is circular Laplace, and e2 is a variant of Prewit. In case of epl and esl, the edges are marked only if the laplace value is positive , and so its seperate threshold parameter 'lt' also is needed. All other types including el use gyt, rt, bt threshold values only.
Several calls with different sets of thresholds may be required for getting usable masks and for coloring different areas.
The output of this function is used by ColorBrush, Colordrops, ColorLine, ColorFills , CrossFill, Morpher and Inlay functions. The input usually is Black and white Clip (probably blurred with GaussBlur to smoothen) or an already partly colored clip. For Recoloring color clip will be the input. Thresholds which clearly demarcate areas, are to be specified. For greyscale or Y U V format input clips, specifying the thresholds gyt and lt will suffice. In case of color clips of RGB format input, gyt, rt and bt thresholds can be used. At least one threshold must be more than zero.
To assist in selection of optimum parameters a test facility is provided. If test = true, On just the single start frame, parameters are varied linearly from gyt to et in end frame number of steps . Thus one can see same frame being repeated with linearly varying parameters.
The windowing capability minimizes computation and also acts as a barrier for color leakage. Already colored parts of image can be excluded by xcol option and they marked with value col.
RGB32, RGB24, YUY2 and YV12 formats are supported.
In a number of instances due to noise, or insufficient grey value seperation complete boundary demarcation of an object may not be achieved. In such cases manual intervention through use of the drawlines function may be needed.
Description | Name | Type | Limits | Default |
Input clip | clip | none | ||
Starting frame number to process | sf | integer | within clip | 0 |
End frame number to process | ef | integer | within clip and not less than sf | last frame |
method of edge detection | type | string | "e1" "e2" "ep" "es" "el" "epl" "esl" | "e1" |
green or Y threshold | gyt | integer | 0 to 255 | 5 |
red or U threshold | rt | integer | 0 to 255 | 0 |
blue or V threshold | bt | integer | 0 to 255 | 0 |
laplace threshold for epl and esl options | lt | integer | 0 to 20 | 4 |
Is the edge to be marked white? | white | boolean | true for white, false for black | true |
Is this a test? | test | boolean | true for yes or false for no | false |
green or Y threshold at test end | ft | integer | 0 to 255 | 200 |
red or U threshold at test end | frt | integer | 0 to 255 | 0 |
blue or V threshold at test end | fbt | integer | 0 to 255 | 0 |
laplace threshold at test end | fl | integer | 0 to 20 | lt |
Process window left x at start frame | lx | integer | within frame, less than rx | 0 |
Process window top y at start frame | ty | integer | within clip, less than by | 0 |
Process window right x at start frame | rx | integer | within clip, more than lx | frame width-1 |
Process window bottom y at start frame | by | integer | within frame, more than ty | frame height-1 |
exclude already colored parts? | xcol | boolean | true for exclude or false | true |
marking value to use for already colored parts | col | integer | 0 to 128 | 128 |
Process window left x at end frame | elx | integer | within frame, less than erx | lx |
Process window top y at end frame | ety | integer | within clip, less than eby | ty |
Process window right x at end frame | erx | integer | within clip, more than elx | rx |
Process window bottom y at end frame | eby | integer | within frame, more than ety | by |
To Colorit Synopsis | |||
To my index page | |||
down load plugin | |||
To Avisynth |