1

I am trying to do road surface detection using monocular images.

Facing problems with shadows of cars and trees on road resulting in wrong prediction.

I couldn't find any open source library for doing shadow removal.

Came across this paper: Intrinsic Images by Entropy Minimization

also this related post: Shadow Removal in Python OpenCV

I am new to this field and I am finding it very hard to implement the code by reading the paper.

Any help would be greatly appreciated!

Nithi89
  • 119
  • 2
  • 11

1 Answers1

2

Take a look at this github repo. It is an implementation of the article: "Entropy Minimization for Shadow Removal". IJCV, 2009. By the same author from the paper you referenced, Graham Finlayson et al. As the repo noted there is some cases where the algorithm fails:

Note: The algorithm does not work for non-linearly reddened JPEG images.

An alternative is to use GrabCut algorithm, which can be found here.

Christoffer
  • 528
  • 2
  • 15
  • Thank you for the link, how do you use GrabCut algorithm for shadow removal? – Nithi89 Jun 05 '18 at 07:54
  • I assumed that the things you wanted was in the foreground and shadows was background, so GrabCut is an interactive foreground extraction tool. The second link I provided has code examples and a youtube tutorial. But maybe start with github and later look into GrabCut. :) – Christoffer Jun 05 '18 at 09:45
  • Not exactly my situation, I have a monocular camera front of car so I get a roadscene with shadows from trees and ongoing cars, ideally want to remove shadows from the scene. – Nithi89 Jun 06 '18 at 05:21
  • Okay, otherwise you can look into this paper: http://aqua.cs.uiuc.edu/site/projects/shadow.html They provided the source code too but it's .m files but should be able to convert to python. Hope it helps. – Christoffer Jun 06 '18 at 06:46