%load an gray image:
clear all;
I_rgb = im2double(imread('goat.jpg'));
imtool(I_rgb);

I = rgb2gray(I_rgb);
I = imadjust(I.^2.5 / 0.2^0.5, [], [], 1/2.2);

[segmentGraph, uniqueLabels, segMasks] = segmentImage(I);
Iedge          = segEdges(segMasks);
saliencyMap    = getSalience(I_rgb);
objectMap = objectSalience(saliencyMap,segMasks);
%% % % % % % % % % % % %% 

bestLines = getLines(I,Iedge);