Skip to content

Instantly share code, notes, and snippets.

@tasfik007
Last active February 13, 2020 04:42
Show Gist options
  • Save tasfik007/a64c727a585d68dc8f8c697e3de623b7 to your computer and use it in GitHub Desktop.
Save tasfik007/a64c727a585d68dc8f8c697e3de623b7 to your computer and use it in GitHub Desktop.
Digital Image Processing [DIP]
a=imread('D:\images\spider.jpg');
size(a)
% a=imresize(a,[250 350]);
imshow(a);
size(a)
whos a
imshow(a,[]);
imwrite(a,'D:\images\resized_spider.jpg');
a=imread('D:\images\spider.jpg');
a=imresize(a,[250 350]);
figure,imshow(a);
figure,imshow(a);
R=a(:,:,1);
G=a(:,:,2);
B=a(:,:,3);
imhist(R);
clc
clear all
close all
img=imread('D:\images\spider.jpg');
figure,imshow(img);
R=img(:,:,1);
G=img(:,:,2);
B=img(:,:,3);
figure,subplot(3,1,1),imhist(R);
subplot(3,1,2),imhist(G);
subplot(3,1,3),imhist(B);
R1=histeq(R);
G1=histeq(G);
B1=histeq(B);
R2=adapthisteq(R);
G2=adapthisteq(G);
B2=adapthisteq(B);
rgb_img=cat(3,R1,G1,B1);
figure,imhist(R1);
adapt_rgb_img=cat(3,R2,G2,B2);
figure,imshow(adapt_rgb_img);
figure,imshow(rgb_img);
I=imread('tire.tif');
J=histeq(I);
imshowpair(I,J,'montag');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment