Skip to content

Instantly share code, notes, and snippets.

View Graciaira's full-sized avatar

Ira Iryanti Graciaira

View GitHub Profile
@Graciaira
Graciaira / color_imaging.m
Created May 14, 2020 14:50 — forked from mrifkikurniawan/color_imaging.m
Get 3 color channels, RGB, of image, and stack it together to get color image.
clear all;
%Read the image
img = imread('image.jpg');
%Get the size (rows and columns) of the image
[r,c] = size(img);
rr=r/3;
%Wrire code to split the image into three equal parts and store them in B, G, R channels
B=imcrop(img,[1,1,c,rr-1]);