//Brightness enhancement and supression
//Scilab 5.4.1
//Windows 10 
//Requires SIVP, IPD toolboxes

clear;
clc;

a=imread('baboon.png');

//Brightness Enhancement
a = rgb2gray(a);
b = double(a)+50;
b = uint8(b);
imwrite(b,'BrightnessEnhancedImage.jpeg'); 

a=imread('baboon.png');

//Brightness suppression
a = rgb2gray(a);
b = double(a)-50;
b = uint8(b);
imwrite(b,'BrightnessSupressedImage.jpeg'); 
