%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% COMPUTE VANISHING POINTS README Varsha Hedau (vhedau2@uiuc.edu) 07/18/2010 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This application was compiled from matlab code using mcc for win32 platform. IMPORTANT: To use this software, YOU MUST CITE the following in any resulting publication: [1] Varsha Hedau, Derek Hoiem, David Forsyth, “Recovering the Spatial Layout of Cluttered Rooms,” in the Twelfth IEEE International Conference on Computer Vision, 2009. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LICENSE: Copyright (C) 2010 Varsha Hedau, University of Illinois at Urbana Champaign. This software is available for non-commercial use only. The software is available for general use by academic or non-profit, or government-sponsored researchers. This license does not grant the right to use this software or any derivation of it in a for-profit enterprise. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% How to RUN: > getVPFromLines.exe [LinesTextFile] [OutputTextFile] [h] [w] LinesTextFile: text filename containing long straight line segments detected in the image in the following format [numlines] [line1] [line2] .... line1: [x1] [x2] [y1] [y2] [r] [theta] See NOTES for details about detection of these segments. OutputTextFile: output text file containing (a) three orthogonal vanishing points, (b) the likelihoods for each line belonging to three vanishing points or being an outlier. (c) line membership for each vanishing point or outlier. h: height of the original image w: width of the original image Example usage: getVPFromLines.exe samplelines.txt out.txt 500 666 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% How to INSTALL (Win32 Only): Step 1: Copy getVPFromLines.exe to the desired directory. Step 2: CASE I: YOU HAVE Matlab Compiler Runtime (MCR) version 7.8. You can check the version of MCR by using the following command on MATLAB command prompt: [mcrmajor,mcrminor]=mcrversion In this case you just need to set the Windows PATH enviroment variable to see the MCR dlls. Use the command > set PATH=[MCRROOT]\runtime\win32;%PATH% Depending on your MATLAB/MCR installation, the value of [MCRROOT] will vary. On our computer we use > set PATH=C:\Program Files\MATLAB\MATLAB Compiler Runtime\v78\runtime\win32;%PATH% Done! You are all ready to run the executable from command prompt. CASE II: YOU DON'T HAVE MCR 7.8. Download and run the MCRInstaller.exe from the code website, follow the instructions. The process will automatically add the MCR dlls to the path. Done! You are all ready to run the executable from command prompt. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NOTES: Input lines: We use the code provided at the following link to detect lines. http://www.cs.uiuc.edu/homes/dhoiem/software/APPgetLargeConnectedEdges.m The input is a grayscale image, and we use the parameter (minlen=30) pixels. (C) Varsha Hedau, University of Illinois at Urbana Champaign, 2010. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% REFERENCES: [1] Varsha Hedau, Derek Hoiem, David Forsyth, “Recovering the Spatial Layout of Cluttered Rooms,” in the Twelfth IEEE International Conference on Computer Vision, 2009. [2] Varsha Hedau, Derek Hoiem, David Forsyth, “Thinking Inside the Box: Using Appearance Models and Context Based on Room Geometry,” ECCV 2010. [3] C. Rother, “A new approach to vanishing point detection in architectural environments,” IVC, 20, 2002.