Skip to content

Instantly share code, notes, and snippets.

@Eyakub
Last active November 11, 2018 15:03
Show Gist options
  • Save Eyakub/a75da4b84a228558d8c320312ca7844d to your computer and use it in GitHub Desktop.
Save Eyakub/a75da4b84a228558d8c320312ca7844d to your computer and use it in GitHub Desktop.
Image Processing work using MATLAB (Basic)
img = imread('C:\Users\Administrator\Downloads\unnamed.jpg')
subplot(2,2,1); //here 2 column, 2 row where 1 is the position
imshow(img);
binary_img = im2bw(img)
subplot(2,2,2); //second position of 2,2 row column
imshow(binary_img);
gray_img = rgb2gray(img)
subplot(2,2,3);
imshow(gray_img);
img = imread('C:\Users\Administrator\Downloads\unnamed.jpg'); %# load image, provide the exact location with the image name
imgMirror = flipdim(img,2); %# Flips the columns, making a mirror image
imgUpsideDown = flipdim(img,1); %# Flips the rows, making an upside-down image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment