... | @@ -440,9 +440,9 @@ To get a list of the core image blend filters: |
... | @@ -440,9 +440,9 @@ To get a list of the core image blend filters: |
|
|
|
|
|
Which returns:
|
|
Which returns:
|
|
|
|
|
|
CIAdditionCompositing CIColorBlendMode CIColorBurnBlendMode CIColorDodgeBlendMode CIDarkenBlendMode CIDifferenceBlendMode
|
|
CIAdditionCompositing CIColorBlendMode CIColorBurnBlendMode CIColorDodgeBlendMode CIDarkenBlendMode CIDifferenceBlendMode
|
|
CIExclusionBlendMode CIHardLightBlendMode CIHueBlendMode CILightenBlendMode CILuminosityBlendMode CIMaximumCompositing CIMinimumCompositing
|
|
CIExclusionBlendMode CIHardLightBlendMode CIHueBlendMode CILightenBlendMode CILuminosityBlendMode CIMaximumCompositing CIMinimumCompositing
|
|
CIMultiplyBlendMode CIMultiplyCompositing CIOverlayBlendMode CISaturationBlendMode CIScreenBlendMode CISoftLightBlendMode
|
|
CIMultiplyBlendMode CIMultiplyCompositing CIOverlayBlendMode CISaturationBlendMode CIScreenBlendMode CISoftLightBlendMode
|
|
CISourceAtopCompositing CISourceInCompositing CISourceOutCompositing CISourceOverCompositing
|
|
CISourceAtopCompositing CISourceInCompositing CISourceOutCompositing CISourceOverCompositing
|
|
|
|
|
|
To combine two images using a core image blend filter:
|
|
To combine two images using a core image blend filter:
|
... | @@ -457,9 +457,9 @@ To get a list of filters that simplesinglecifilter can apply to an image: |
... | @@ -457,9 +457,9 @@ To get a list of filters that simplesinglecifilter can apply to an image: |
|
|
|
|
|
Which returns:
|
|
Which returns:
|
|
|
|
|
|
CIBloom CIBoxBlur CIColorInvert CIColorPosterize CIComicEffect CIDiscBlur CIEdges CIEdgeWork CIExposureAdjust CIGammaAdjust CIGaussianBlur
|
|
CIBloom CIBoxBlur CIColorInvert CIColorPosterize CIComicEffect CIDiscBlur CIEdges CIEdgeWork CIExposureAdjust CIGammaAdjust CIGaussianBlur
|
|
CIHeightFieldFromMask CIHueAdjust CIMaskToAlpha CIMaximumComponent CIMedianFilter CIMinimumComponent CINoiseReduction CIPhotoEffectChrome
|
|
CIHeightFieldFromMask CIHueAdjust CIMaskToAlpha CIMaximumComponent CIMedianFilter CIMinimumComponent CINoiseReduction CIPhotoEffectChrome
|
|
CIPhotoEffectFade CIPhotoEffectInstant CIPhotoEffectMono CIPhotoEffectNoir CIPhotoEffectProcess CIPhotoEffectTonal CIPhotoEffectTransfer CISepiaTone
|
|
CIPhotoEffectFade CIPhotoEffectInstant CIPhotoEffectMono CIPhotoEffectNoir CIPhotoEffectProcess CIPhotoEffectTonal CIPhotoEffectTransfer CISepiaTone
|
|
CISharpenLuminance CIStraightenFilter CIUnsharpMask
|
|
CISharpenLuminance CIStraightenFilter CIUnsharpMask
|
|
|
|
|
|
To get information about the inputs for a specific filter, for example the CIUnsharpMask:
|
|
To get information about the inputs for a specific filter, for example the CIUnsharpMask:
|
... | @@ -504,7 +504,7 @@ To get the list of transition filters: |
... | @@ -504,7 +504,7 @@ To get the list of transition filters: |
|
|
|
|
|
Which returns:
|
|
Which returns:
|
|
|
|
|
|
CIBarsSwipeTransition CIRippleTransition CISwipeTransition CICopyMachineTransition CIDisintegrateWithMaskTransition CIFlashTransition
|
|
CIBarsSwipeTransition CIRippleTransition CISwipeTransition CICopyMachineTransition CIDisintegrateWithMaskTransition CIFlashTransition
|
|
CIDissolveTransition CIModTransition CIPageCurlTransition CIPageCurlWithShadowTransition
|
|
CIDissolveTransition CIModTransition CIPageCurlTransition CIPageCurlWithShadowTransition
|
|
|
|
|
|
One example of the use of the dotransition script is, though you'll need to update the file paths to image files on your computer:
|
|
One example of the use of the dotransition script is, though you'll need to update the file paths to image files on your computer:
|
... | @@ -519,24 +519,25 @@ The "embossimage" script is more a demonstration script than a general purpose s |
... | @@ -519,24 +519,25 @@ The "embossimage" script is more a demonstration script than a general purpose s |
|
|
|
|
|
As well as the built in Core Image filters I have added another filter for use with Moving Images. It is called YVSChromaKey and allows you to make parts of an image based on a selected color transparent. The filter has three inputs, a chroma key color "inputColor" which is defined as a CIVector, a distance number "inputDistance" which is distance in a color space within which the image is made fully transparent and a slope number "inputSlopeWidth" which is also a distance in a color space and this is the width of the slope. The smaller the width the steeper the slope.
|
|
As well as the built in Core Image filters I have added another filter for use with Moving Images. It is called YVSChromaKey and allows you to make parts of an image based on a selected color transparent. The filter has three inputs, a chroma key color "inputColor" which is defined as a CIVector, a distance number "inputDistance" which is distance in a color space within which the image is made fully transparent and a slope number "inputSlopeWidth" which is also a distance in a color space and this is the width of the slope. The smaller the width the steeper the slope.
|
|
|
|
|
|
cr = chroma color red component.
|
|
cr = chroma color red component.
|
|
cg = chroma color green component.
|
|
cg = chroma color green component.
|
|
cb = chroma color blue component.
|
|
cb = chroma color blue component.
|
|
|
|
|
|
pr = pixel color red component.
|
|
pr = pixel color red component.
|
|
pg = pixel color green component.
|
|
pg = pixel color green component.
|
|
pb = pixel color blue component.
|
|
pb = pixel color blue component.
|
|
|
|
|
|
redDiffSquared = (cr - pr) * (cr - pr)
|
|
redDiffSquared = (cr - pr) * (cr - pr)
|
|
greenDiffSquared = (cg - pg) * (cg - pg)
|
|
greenDiffSquared = (cg - pg) * (cg - pg)
|
|
blueDiffSquared = (cb - pb) * (cb - pb)
|
|
blueDiffSquared = (cb - pb) * (cb - pb)
|
|
colorDistance = sqrt(redDiffSquared + greenDiffSquared + blueDiffSquared)
|
|
colorDistance = sqrt(redDiffSquared + greenDiffSquared + blueDiffSquared)
|
|
|
|
|
|
In the following diagram the colorDistance is on the horizontal axis. Pixels with colors similar to the chroma color become transparent, whilst colors further away are either semi transparent or fully opaque.
|
|
In the following diagram the colorDistance is on the horizontal axis. Pixels with colors similar to the chroma color become transparent, whilst colors further away are either semi transparent or fully opaque.
|
|
|
|
|
|
![YVS Chroma Key diagram](../raw/master/wiki-images/yvschromakeyplot.png "A diagram showing how transparency changes with color distance from the chroma key color.")
|
|
![YVS Chroma Key diagram](../raw/master/wiki-images/yvschromakeyplot.png "A diagram showing how transparency changes with color distance from the chroma key color.")
|
|
|
|
|
|
The following shows a json object representation of the properties needed to
|
|
The following shows a json object representation of the properties needed to;
|
|
|
|
|
|
{
|
|
{
|
|
"cifiltername": "YVSChromaKey",
|
|
"cifiltername": "YVSChromaKey",
|
|
"mifiltername" : "com.yvs.documentation.renderingfilterchain.chromakey",
|
|
"mifiltername" : "com.yvs.documentation.renderingfilterchain.chromakey",
|
... | | ... | |