Posts

Showing posts with the label Image processing

Basic algebra formulas that you can revise anytime and anywhere

FORMULAS FOR BEGINNER (a+b) ^2= a^2+b^2+2ab (a+b) ^2= (a-b) ^2+4ab (a-b) ^2= a^2+b^2-2ab (a-b) ^2= (a+b) ^2-4ab a^2+b^2= (a+b) ^2-2ab a^2+b^2= (a-b) ^2+ 2ab a^2-b^2= (a+b) (a-b) (a+b+c) ^2= a^2+b^2+c^2+2(ab+bc+ac) (a-b-c) ^2= a^2+b^2+c^2-2(ab-bc+ac) (a+b) ^3= a^3+b^3+3ab(a+b) (a-b) ^3= a^3-b^3+3ab(a-b) a^3+b^3= (a+b) (a^2-ab+b^2) a^3-b^3= (a-b) (a^2+ab+b^2) a^4-b^4= (a^2-b^2) (a^2+b^2) = (a^2+b^2) (a+b) (a-b) a^5+b^5= (a+b) (a^4-a^3b+a^2b^2-ab^3+b^4) a^5-b^5= (a-b) (a^4+a^3b+a^2b^2+ab^3+b^4)

Face detecting codes using MATLAB

A=imread('images.JPG'); FaceDetector = vision.CascadeObjectDetector(); BBOX = step(FaceDetector, A); B = insertObjectAnnotation(A, 'rectangle', BBOX, 'Face'); imshow(B),title('Detected Faces'); n= size(BBOX,1); str_n = num2str(n); str = strcat('Number of detected faces are = ', str_n); disp(str);

Watermark images using MATLAB

Image
clc clear all close all; a= imread('birds.jpg'); a1= rgb2gray(a); a2= imresize(a1,[430 700]); b=imread('BRUCE.jpg'); b=rgb2gray(b); b1=imresize(b,[430 700]); [m n]= size(a2); [m n]= size(b1); alpha=0.5; for i=1:m for j=1:n c1(i,j)=(1-alpha)*a2(i,j)+ alpha*b1(i,j); end end figure; subplot(2,2,1),imshow(a2),title('image 1'); subplot(2,2,2),imshow(b1),title('image 2'); subplot(2,2,3),imshow(c1),title('Blended image alpha = 0.5'); OUTPUT :

SALT & PEPPER using MATLAB

Image
clc; close all; clear all; q=imread('BIRDS.jpg'); p=rgb2gray(q); k=imnoise(p,'salt & pepper', .5); c= medfilt2(k,[3 3]); d= medfilt2(k,[5 5]); e= medfilt2(k,[7 7]); figure; subplot(2,3,1),imshow(q),title('original image'); subplot(2,3,2),imshow(p),title('Grayscale image'); subplot(2,3,3),imshow(k),title('noisy image'); subplot(2,3,4),imshow(c),title('filtered 3x3 image'); subplot(2,3,5),imshow(d),title('filtered 5x5 image'); subplot(2,3,6),imshow(e),title('filtered 7x7 image'); OUTPUT :

Different edges using MATLAB

Image
i=imread('BIRDS.jpg'); i=rgb2gray(i); p1=edge(i, 'Prewitt',0.03); p2=edge(i, 'Sobel',0.02); p3=edge(i, 'Roberts',0.04); p4=edge(i, 'log'); p5=edge(i, 'canny'); figure; subplot(2,3,1),imshow(i),title('original image'); subplot(2,3,2),imshow(p1),title('Prewitt edge'); subplot(2,3,3),imshow(p2),title('Sobel edge'); subplot(2,3,4),imshow(p3),title('Roberts edge'); subplot(2,3,5),imshow(p4),title('Log edge'); subplot(2,3,6),imshow(p5),title('Canny edge'); OUTPUT:

Salt & Pepper using MATLAB

p=imread('BIRDS.jpg'); p=rgb2gray(p); figure; imshow(p); impixelinfo; q=imnoise(p,'salt & pepper',0.1); h1=1/9*ones(3,3); h2=1/25*ones(7,7); c1=conv2(q,h1,'same'); c2=conv2(q,h2,'same'); c3=imfilter(p,h1); c4=imfilter(p,h2); subplot(2,2,1),imshow(p);title('Original Image'); subplot(2,2,2),imshow(q);title('Noise Effected Image'); subplot(2,2,3),imshow(c3);title('3 x 3 Filter'); subplot(2,2,4),imshow(c4);title('5 x 5 Filter');

Different RGB plane images and reconstructed images

Image
clc; close all; clear all; a=imread('BIRDS.jpg'); b=rgb2gray(a); r=a(:,:,1); g=a(:,:,2); b=a(:,:,3); new=cat(3,r,g,b); figure; subplot(2,3,1),imshow(a),title('original image'); subplot(2,3,2),imshow(b),title('Grayscale image'); subplot(2,3,3),imshow(r),title('red scale image'); subplot(2,3,4),imshow(g),title('green scale image'); subplot(2,3,5),imshow(b),title('blue scale image'); subplot(2,3,6),imshow(new),title('reconstructed image'); OUTPUT:

Impixel info using MATLAB

p=imread('LUNGS.jpg'); k=rgb2gray(p); figure subplot(2,2,1); imshow(p); subplot(2,2,2); imshow(k); impixelinfo

Up-sampling and Down-sampling using MAT LAB

Image
p=imread('BIRDS.jpg'); q=imresize(p,0.5); r=imresize(q,0.25); s=imresize(q,2); figure; subplot(2,2,1);imshow(p);title('original image'); subplot(2,2,2);imshow(q);title('downsampled by 2'); subplot(2,2,3);imshow(s);title('upsampled by 2'); subplot(2,2,4);imshow(r);title ('downsampled by 8'); OUTPUT:

FFT magnitude and reconstructed image using MATLAB

Image
p=imread('BIRDS.jpg'); p1=fft2(p); p2=ifft2(p1); figure; subplot(2,2,1);imshow(p);title('original image'); subplot(2,2,2);imshow(p1);title('FFT Magnitude'); subplot(2,2,3);imshow(uint8(p2));title('reconstructed image'); OUTPUT:

Hist-equalization of image using MATLAB

p=imread('BIRDS.jpg'); p1=rgb2gray(p); p10=p1-50; figure; subplot(2,2,1);imshow(p10); subplot(2,2,2);imhist(p10); subplot(2,2,3);histeq(p10);

How to get histogram images using MATLAB

Image
HOW TO GET HISTOGRAM IMAGES USING MATLAB clc; close all; clear all; a=imread('BIRDS.jpg'); b=rgb2gray(a); figure; subplot(2,2,1),imshow(a),title('original image'); subplot(2,2,2),imshow(b),title('Grayscale image'); subplot(2,2,3),imshow(b),title('Histogram image'); OUTPUT:

RGB to Gray images using MATLAB

Image
RGB TO GRAY IMAGES USING MATLAB clc; close all; clear all; a=imread('BIRDS.jpg'); b=rgb2gray(a); figure; subplot(1,2,1),imshow(a),title('original image'); subplot(1,2,2),imshow(b),title('Grayscale image'); OUTPUT:

pepper-salt and filtered image

clc; close all; clear all; q=imread('BIRDS.jpg'); p=rgb2gray(q); k=imnoise(p,'salt & pepper', .5); c= medfilt2(k,[3 3]); d= medfilt2(k,[5 5]); e= medfilt2(k,[7 7]); figure; subplot(2,3,1),imshow(q),title('original image'); subplot(2,3,2),imshow(p),title('Grayscale image'); subplot(2,3,3),imshow(k),title('noisy image'); subplot(2,3,4),imshow(c),title('filtered 3x3 image'); subplot(2,3,5),imshow(d),title('filtered 5x5 image'); subplot(2,3,6),imshow(e),title('filtered 7x7 image'); OUTPUT:

Histogram image

clc; close all; clear all; a=imread('BIRDS.jpg'); b=rgb2gray(a); figure; subplot(2,2,1),imshow(a),title('original image'); subplot(2,2,2),imshow(b),title('Grayscale image'); subplot(2,2,3),imshow(b),title('Histogram image'); OUTPUT:

RGB images representation

clc; close all; clear all; a=imread('BIRDS.jpg'); b=rgb2gray(a); r=a(:,:,1); g=a(:,:,2); b=a(:,:,3); new=cat(3,r,g,b); figure; subplot(2,3,1),imshow(a),title('original image'); subplot(2,3,2),imshow(b),title('Grayscale image'); subplot(2,3,3),imshow(r),title('red scale image'); subplot(2,3,4),imshow(g),title('green scale image'); subplot(2,3,5),imshow(b),title('blue scale image'); subplot(2,3,6),imshow(new),title('reconstructed image'); OUTPUT:

Basics of digital image processing

Image
What is digital image processing ???? Image processing is a method to perform some Operations on an image.  In order to get an enhanced image means extract some useful information from the image.  It is a type of signal processing. In this input is an image and output may be image or characteristics of features associated with the image.  Applications: Some of the major fields in which digital image processing is widely used as mentioned below : Image sharpening and restoration  Medical field  Remote sensing Transmission and encoding Video processing  Colour processing  Microscopic imaging Machine vision Robot vision Pattern recognition  These are the Concept of Digital image processing ... We'll be glad if you share your valuable information with us regarding this topic, then it will be a golden oppertunity for all of us to improve ourselves and know more. Comment below!!