Skip to content

Shadow

PlaceShadowProcessor

Place a shadow based on DetectCarShadowProcessor processor.

Proper Scope

  • To place a shadow you have to call first DetectCarShadowProcessor.
  • To use advancedShadowEnabled you have to call first CarKeyPointsProcessor.
Parameters
  • background

    • content name (check adding content).

    • starts with # - background to be replaced by a color given as #RRGGBB.

    • original - background to be replaced by image given by image path (this option is enabled by default and covers most of cases).
  • shadowOpacity - Value from 0 to 1. Indicates opacity/transparency of the shadow. 0 means the shadow is fully transparent, 1 means no background is visible behind the shadow (where shadow mask equals to 255), by default 0.9.

  • shadowSize - Value from 0 to 1. Indicates size of the shadow. 0 means the shadow size is minimal, 1 means the shadow size is maximal, by default 0.5.
  • advancedShadowEnabled true/false - enable advanced multilayer shadow. Remember, for this shadow to work you need to call the CarKeyPointsProcessor first, by default false,
  • advancedShadowShift - Value from 0 to 1. Indicates size of the advance shadow; 1 means the shadow size is maximal, by default 0.25.
  • advancedShadowStrength - Value from 0 to 1. If advanced shadow is enabled; it indicates strength of side shadows relative to the original shadow, by default 0.5.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "CarKeyPointsProcessor"
    },
    {
        "processorName": "DetectCarShadowProcessor"
    },
    {
        "processorName": "PlaceShadowProcessor",
        "background": "#FFFFFF",
        "shadowOpacity": 0.9,
        "shadowSize": 0.5,
        "advancedShadowEnabled": true,
        "advancedShadowShift": 0.25,
        "advancedShadowStrength": 0.5
    }
]

Example result