Shadow-removal

所属分类:matlab编程
开发工具:matlab
文件大小:1243KB
下载次数:20
上传日期:2017-01-29 05:38:12
上 传 者Molinaro
说明:  shadow removal using matlab

文件列表:
Shadow 3\3rd_party\.DS_Store (6148, 2013-05-17)
Shadow 3\3rd_party\astein\cracks2fragments.m (14140, 2013-05-17)
Shadow 3\3rd_party\astein\fill_in_segmentation.m (3586, 2013-05-17)
Shadow 3\3rd_party\astein\remove_small_segments.m (5801, 2013-05-17)
Shadow 3\3rd_party\astein\RGB2Lab.m (1569, 2013-05-17)
Shadow 3\3rd_party\astein\seg2cracks.m (2335, 2013-05-17)
Shadow 3\3rd_party\astein\seg2fragments.m (7638, 2013-05-17)
Shadow 3\3rd_party\bfilter2\academy.jpg (36499, 2013-05-17)
Shadow 3\3rd_party\bfilter2\bfilter2.m (4850, 2013-05-17)
Shadow 3\3rd_party\bfilter2\cartoon.m (2751, 2013-05-17)
Shadow 3\3rd_party\bfilter2\colorspace.m (14019, 2013-05-17)
Shadow 3\3rd_party\bfilter2\einstein.jpg (42447, 2013-05-17)
Shadow 3\3rd_party\bfilter2\mandrill.jpg (32387, 2013-05-17)
Shadow 3\3rd_party\bfilter2\runDemo.m (2096, 2013-05-17)
Shadow 3\3rd_party\boost\.DS_Store (6148, 2013-05-17)
Shadow 3\3rd_party\boost\test_boosted_dt_mc.m (1460, 2013-05-17)
Shadow 3\3rd_party\boost\test_boosted_kde_2c.m (480, 2013-05-17)
Shadow 3\3rd_party\boost\train_boosted_dt_2c.m (3052, 2013-05-17)
Shadow 3\3rd_party\boost\train_boosted_dt_mc.m (5346, 2013-05-17)
Shadow 3\3rd_party\boost\train_boosted_dt_mc.m~ (5346, 2013-05-17)
Shadow 3\3rd_party\boost\train_boosted_kde_2c.m (4111, 2013-05-17)
Shadow 3\3rd_party\boost\train_boosted_stubs_mc.m (5345, 2013-05-17)
Shadow 3\3rd_party\boost\treevalc.c (3729, 2013-05-17)
Shadow 3\3rd_party\boost\tree_getNewVersion.m (184, 2013-05-17)
Shadow 3\3rd_party\boost\tree_getParameters.m (575, 2013-05-17)
Shadow 3\3rd_party\nearestneighbor\.DS_Store (6148, 2013-05-17)
Shadow 3\3rd_party\nearestneighbor\BruteSearchMex.cpp (6988, 2013-05-17)
Shadow 3\3rd_party\nearestneighbor\BruteSearchTranspose.cpp (6718, 2013-05-17)
Shadow 3\3rd_party\nearestneighbor\license.txt (1562, 2013-05-17)
Shadow 3\3rd_party\nearestneighbor\TestBruteSearch.m (2041, 2013-05-17)
Shadow 3\LICENSE.txt (752, 2013-05-17)
Shadow 3\mycode\applyBoundaryGrouping.m (2400, 2013-05-17)
Shadow 3\mycode\applyLocalBoundaryClassifier.m (3592, 2013-05-17)
Shadow 3\mycode\boundaryGraphCutSegmentation.m (3542, 2013-05-17)
Shadow 3\mycode\buildBoundaryFilter.m (983, 2013-05-17)
Shadow 3\mycode\buildShadowFeaturesFilterBank.m (1762, 2013-05-17)
Shadow 3\mycode\buildTextureFeaturesFilterBank.m (1819, 2013-05-17)
Shadow 3\mycode\chisq.m (770, 2013-05-17)
... ...

This software package detects shadows from single images by using an approach described in the following paper: J.-F. Lalonde, A. A. Efros, and S. G. Narasimhan, "Detecting ground shadows in outdoor consumer photographs," presented at the European Conference on Computer Vision, 2010. Please cite this paper if you use this code in your work. Getting started =============== 1. Install the required packages (see below), and compile them; 2. From the `mycode` directory, run: $ setPath $ demoShadowDetection 3. The results should appear as they are computed. Enjoy! Changing the input image ======================== If you want to make it work on your own image, here's what you should do: 1. Copy your image in the `img` directory (should have .jpg extension); 2. Change the `imgName` variable with the new filename (leave the .jpg extension out); 3. If you want to detect shadows on the ground only: 3.1 Compute the ground probability map (e.g. with Geometric Context, see below); 3.2 Save the ground probability map as variable `groundProb` in a .mat file; 3.1 Copy the .mat file containing the variable `groundProb` in the `img` directory; 3.2 Rename the file to `-groundProb.mat`. 4. Watch the output while the program is running to make sure there are no errors or warnings; 5. That's it! Requirements ============ Required 3rd-party software *not included* in this package ----------- * My "utils" package, available at: https://github.com/jflalonde/utils/. * [Lightspeed matlab toolbox](http://research.microsoft.com/en-us/um/people/minka/software/lightspeed/) by Tom Minka, need at least version 2.4. * [Graph cut wrapper](http://www.wisdom.weizmann.ac.il/~bagon/matlab.html) by Shai Bagon which uses C++ code by Olga Veksler. If you put these 3rd-party packages in a `pathUtils` folder in the same base folder as the `shadowDetection`, they should be picked up automatically by `setPath`. Make sure you follow the respective instructions to install those packages. Required 3rd-party software *included* in this package ----------- In addition, this code uses the following freely-available matlab code: * [Bilateral filtering](http://mesh.brown.edu/dlanman) by Douglas R. Lanman * [Boundary extraction](http://www.andrewstein.net/) from Andrew Stein * [Fast nearest-neighbor search](http://www.advancedmcode.org/k-nearest-neigbours-search.html) by Luigi Giaccari, also available [here](http://www.mathworks.co.uk/matlabcentral/fileexchange/22407-k-nearest-neighbours-and-radius-range-search); * [Boosted decision tree](http://www.cs.uiuc.edu/homes/dhoiem/) by Derek Hoiem Compilation ----------- Check within each of the following directories and make sure you compile the .mex files. They are required for this software to run: * Boosted decision trees $ cd 3rd_party/boost $ mex treevalc.c * Nearest neighbor $ cd 3rd_party/nearestneighbor $ mex BruteSearchMex.cpp Optional 3rd-party software *not included* in this package ----------- * [Geometric context](http://www.cs.uiuc.edu/homes/dhoiem/) by Derek Hoiem. Tuning the parameters ================== There are a few parameters you might want to fiddle with in order to tune the results to your liking. * Resize the image to ~600 pixels along the vertical dimension, since computing features is likely to be prohibitively expensive for images of larger size. * If the algorithm fails to detect shadows that are too soft, try reducing the image size, or modify the Canny edge detection parameters to make it fire on that edge. We are, after all, looking for shadow *edges*. You will find the Canny edge detection call at line 39 of `applyLocalBoundaryClassifier.m`. * If the detected shadow edges are too discontinuous, you can experiment with the over-segmentation parameters to obtain larger, more continuous segments. You will face a trade-off, however: larger segments will be less precise at capturing small details. For this, look at `extractImageBoundaries.m` and experiment with the `prctMax` parameter. News ==== - 10/03/2012: Code is now on github, see commit messages for news and changes! - 05/24/2011: The code should now work without requiring the Matlab Statistics Toolbox (thanks to M. Chen for helping me figure this out!). It's best to re-download the code completely. The following changes have been made: - The `data/bdt-eccv10.mat` file has been changed to use built-in 'structs' instead of `classtreereg`. - The `skewness.m` function has been added to replace the toolbox's.

近期下载者

相关文件


收藏者