% Execution of script witch calculates centre of fiber and its orientation 
% exp_002
clc;clear all;
nr_of_exp='exp_074';%<<<<<------------------
letter='X';
%If you do gapson2 change direcotry to result_gap2
directory=[letter,':\phejduk\fibers\',nr_of_exp,'\result_gap'];
%Where to save
directory2=[letter,':\phejduk\fibers\',nr_of_exp,'\result_out'];
%Raw images
directory3=[letter,':\phejduk\fibers\',nr_of_exp,'\img_raw'];

crop = [200 200 500 550];%Same as in Gapson_exe <<<--------------

%Extension of result_gap files (normally bmp)
end1 = '\*.bmp';
%Extension of raw images 
end2 = '\*.tif';
% Do you want to save raw images with elipsoid and path? 0 - for no, 1 -
% for yes
answer = 0;
% From which imege begin?
from = 1;
% Go to function folder
funkcje = [letter,':\pnakiel\__MATLAB_SCRIPTS_AND_PROGRAMS\FIBER_Brownian_motion_MSD_angle\MATLAB_SCRIPTS\PN'];
cd(funkcje)
[CENTR,ORIENT,i]=CentrOrientGabson(directory,directory2,directory3,crop,end1,end2,from,answer);
