Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Shadow removal issue usually can be divided on two subtasks:

  1. Shadow localization.
  2. Adjusting colors in shadowed regions.

Although there are a lot of papers on this topic, you can make a solution prototype with a few OpenCV functions:

  1. Try to localize shadow area with threshold.
  2. Solve a system of linear equations with cv::solve() to restore pixel's color in shadowed regions, like color_of_pixel_outside_shadow = x * color_of_pixel_inside_shadow, so 'x' will be a coefficient to restore original color. Also you can try to use cv::inpaint() for shadowed regions.