% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
% This function will be used to change the configurations of the           %   
% experiments, either by changing the calculation methods (for instance,   %
% calculating using average or median), choosing if a certain process      %
% ocurrs or not (for example, if a given plot is created or not) or even   %
% changing the display option (for instance, color of a string or color of %
% a marker). For deeper knowledge read the variable description along the  %
% script.                                                                  %
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %

function config = CONFIG_DATA_1
    % ==================================================================== %
    % ==================================================================== %
    % MAIN DEFINITION                                                      %
    % ==================================================================== %
    % Inertial Data Definitions and Creation (DONT TOUCH)                  %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    config( 1, : ) =   101; %  int % When the Data from Fanuc Cart Begins  %
    config( 2, : ) =   754; %  int % When the Data from Fanuc Cart End     %
    config( 3, : ) =    54; %  int % When the Data from Sensors Begins     %
    config( 4, : ) =   380; %  int % When the Data from Sensors Ends       %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    % Visual Data Definitions and Creation                                 %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    config( 5, : ) =     9; %  int % When Visual Data Begins               %
    config( 6, : ) =   112; %  int % When Visual Data Ends                 %
    config( 7, : ) = 10000; %  int % Area Limit (For Blob Detection)       %  7500 gives 5 features detected
    config( 8, : ) =  0.75; %  int % Area Percentage to Match Given Blobs  % 10000 gives 2 features detected
    config( 9, : ) = false; % bool % Show Blob Detection Process           %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    % Final Results                                                        %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    config(10, : ) = true; % bool % Show Final Results                    %
    config(11, : ) = true; % bool % Show Information in Individual Images %
    config(11,2:10)= [ 1, 0, 0, 0, 0, 0, 0, 0, 1];
    % Which Plots to   1  2  3  4  5  6  7  8  9
    % show (1 = show, 0 = not show)                                        %
    % ==================================================================== %
    % ==================================================================== %
    % FUNCTION_CREATEFEATUREVISUALDATA DEFINITION                          %
    % ==================================================================== %
    config(12, : ) =  true; % bool % Show Calculated Angle Difference Plot %
    config(13, : ) =     0; %  int % Initial Angle Obtained From Sensors   %
    config(14, : ) =  true; % bool % Help tform?                           %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~ FUNCTION INPUT ~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    % function_CalculateCentroid                                           %
    config(16, : ) =     1; %  int % If 1 the centroid is the average of   %
                            %      all points, if 0 is the first point in  %
                            %      the vector.                             %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    % function_SetAngle                                                    %
    config(17, : ) =  0.00; %  int % Tolerance between the average (or     %
                            %      median) and the calculated difference.  %
                            %      If tolerance is negative, then the      %
                            %      output will be just one value (either   %
                            %      the average or median).                 %
    config(18, : ) =  true; % bool % if true uses average of all angles,   %
                            %      else it will use the median of the      %
                            %      angle vector.                           %
    % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %
    % function_Debug                                                       %
    config(19, : ) =   200; %  int % Start Debug at Frame                  %
    config(20, : ) =     0; %  int % Defines the Level of Debug            %
                            % Level 00 - No debug                          %
                            % Level 01 - All points in t and t-1           %
                            % Level 02 - A point per image                 %
                            % Level 03 - A point per image plus its        %
                            %            information                       %
    config(21, : ) =  true; % bool % Show Centroid                         %
    config(22, : ) =  0.01; %  int % Pause between frames                  %
    config(23, : ) =  true; % bool % Wait for User Input? (ENTER)          %
    config(24,1:2) =  '*b'; %  str % Centroid Marker                       %
    config(25,1:2) =  '*r'; %  str % Point Marker                          %
    config(26,1:3) = 'red'; %  str % Color of Text                         %
    % ==================================================================== %
    % ==================================================================== %
end