function configurationFile(img, depthMap)
% This code is copyrighted by Stanford University.
% Author: Ashutosh Saxena, Justin Drieymeyer
% Code cannot be used for commercial purposes.
% Use of the code, if used with permission from authors, must acknowledge:
% Learning to Grasp Novel Objects using Vision,
% Ashutosh Saxena, Justin Driemeyer, Justin Kearns, Chioma Osondu, Andrew Y. Ng. In 10th International Symposium on Experimental Robotics, ISER, 2006.
% Robotic Grasping of Novel Obects,
% Ashutosh Saxena, Justing Driemeyer, Justin Kearns, Andrew Y. Ng, In Neural Information Processing Systems (NIPS), 2006.
% More details at: http://ai.stanford.edu/~asaxena/learninggrasp/
% Version 0.1:   Aug 2006.

global nGridCol nGridRow
global columnWidth rowWidth
%global scale2Factor
global imageDirectory depthMapDirectory stereoMapDirectory
global featureDirectory relativeFeatureDirectory imageDirectory2 weightsDirectory
global maxDistance minDistance
global nThetaPrior
global nDim nLaw nHarris nDimRel
global nStatistics

global nThetaStep

if nargin < 1
    nGridCol = 67; %79;
    nGridRow = 54;%51;
    M = 1024;%1694;
    N = 768;
else
    M = size(img,1);
    N = size(img,2);
    nGridRow = size(depthMap, 1);
    nGridCol = size(depthMap, 2);
end

%columnWidth = N/nGridCol
%rowWidth = M/nGridRow

%scale2Factor = 4;

nThetaPrior = 3;%ceil(nGridRow/10);

%imageDirectory = '~/scratch/LaserImage2DData/';
%depthMapDirectory = 'depthMapData/';

depthMapDirectory = '/export/sc1/Ashutosh/MonoStereo/Data/Estimated_DepthDataset1_10.28.05/';
stereoMapDirectory = '/export/sc1/Ashutosh/MonoStereo/Data/Estimated_DepthDataset1_10.28.05/';
%'/export/sc1/Ashutosh/MonoStereo/Data/DepthDataset1_10.28.05/';
imageDirectory = '/export/sc1/Ashutosh/MonoStereo/Data/Dataset1_10.28.05/';


relativeFeatureDirectory = '/export/sc1/Ashutosh/MonoStereo/FeatureDirectory/';
featureDirectory = '/export/sc1/Ashutosh/MonoStereo/FeatureDirectory/';
weightsDirectory = '/export/sc1/Ashutosh/MonoStereo/WeightsDirectory/';

nLaw = 17;
nHarris = 0;
nStatistics = 1;  %3;        %1 for H2 only
nDim = nStatistics*(nLaw + nHarris);

nDimRel = 170;

nThetaStep = nThetaPrior;

maxDistance = log(81.91);
minDistance = log(1.1810);
