SoftwarePractice.org: Home | Courseware | Wiki | Archive

Output data.m

From SoftwarePractice.org

% OUTPUT DATA function output_data(final_image, barcode_string, flag_1, flag_2, flag_3)

% CREATES NEW WINDOW ouput_window = figure('Name', 'Extracted Barcode');

% _______________________________________________ % CREATES GUI ELEMENTS %


% Create 'Close' Button exit_button = uicontrol ('Style', 'pushbutton', 'string', 'Close', 'position', [450, 55, 80, 25], 'callback', 'close');

% Create 'Output' Title output_title = uicontrol('Style', 'text', 'string', 'OUTPUT', 'Units', 'pixels', 'position', [180, 370, 200, 40], 'BackgroundColor', 'r', 'FontSize', 20);

% Create Axes output_image_axis = axes('position', [.05, .5, .9, .3]);

% Create Output Text Bars output_text = uicontrol('Style', 'text', 'string', barcode_string, 'position', [30, 100, 200, 30], 'BackgroundColor', 'w', 'FontSize', 14); read_error_check = uicontrol('Style', 'checkbox', 'string', 'Read Error', 'position', [280, 150, 140, 15], 'BackgroundColor', 'w', 'FontSize', 10, 'Value', flag_1); check_sum_error = uicontrol('Style', 'checkbox', 'string', 'Checksum Correct', 'position', [280, 120, 140, 15], 'BackgroundColor', 'w', 'FontSize', 10, 'Value', flag_2); Rotation_error = uicontrol('Style', 'checkbox', 'string', 'Image Reversed', 'position', [280, 90, 140, 15], 'BackgroundColor', 'w', 'FontSize', 10, 'Value', flag_3);

% Display extracted barcode image imshow(final_image);

% _______________________________________________ %


Back to: Matlab Graphical User Interface

Personal tools