Tugas Fix-1.docx

  • Uploaded by: Weni Ren
  • 0
  • 0
  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Tugas Fix-1.docx as PDF for free.

More details

  • Words: 749
  • Pages: 15
TUGAS 2 PENGOLAHAN CITRA DIGITAL + LAB

Penyusun: JTD 3A

N O 03

NAMA ANGGREINI WIJAYA WENI

NIM 1641160022

JARINGAN TELEKOMUNIKASI DIGITAL TEKNIK ELEKTRO POLITEKNIK NEGERI MALANG 2019

KONSEP SMOOTHING, SHARPENING DAN EDGE ENHANCEMENT

1. Smoothing Biasadilakukanuntukmenghilangkanefekpadacitra digital yang disebabkanolehketerbatasan system pencuplikanataukanaltransmisiataukanaltransmisi 2. Sharpening Inti daripenajaman (sharpening) citraadalahmemperjelastepipadaobjek didalamcitra. Penajamancitramerupakankebalikandarioperasipelembutancitrakarenaoperasiinimenghila ngkanbagiancitra yang lembut. Metodeataufilteringyang digunakanadalahhigh-pass filtering. Operasipenajamandilakukandenganmelewatkancitrapadapenapislolostinggi (high-pass filter). Penapislolostinggiakanmeloloskan (ataumemperkuat)komponen yang berfrekuensitinggi (misalnyatepiataupinggiranobjek) danakanmenurunkankomponenberfrekuensirendah. Akibatnya, pinggiranobjekterlihatlebihtajamdibandingkansekitarnya. 3. Edge Enhancement Edge Enhancementadalah filter pemrosesangambar yang meningkatkankontrastepisuatugambaratau video dalamupayameningkatkanketajamannya (ketajamannyata). Filter bekerjadenganmengidentifikasibatastepi yang tajampadagambar, sepertitepiantarasubjekdanlatarbelakangwarna yang kontras, danmeningkatkankontrasgambar di area langsung di sekitartepi. Inimemilikiefekmenciptakansorotanterangdangelap yang halus di keduasisitepidalamgambar, yang disebut overshoot dan undershoot, membuattepianterlihatlebihjelasbiladilihatdarijarakmenonton yang khas.

HASIL GAMBAR INPUT DAN OUTPUT BESERTA SCRIPT 1. Smoothing a. 3 x 3 clc; close all; clear all; a=imread('weni.jpg'); GaussianFilter = fspecial('gaussian', [3,3], 5); result = imfilter(a, GaussianFilter, 'same'); subplot(1,2,1), imshow(a); title('Before Smoothing') subplot(1,2,2), imshow(result); title('After Smoothing')

b. 9 x 9 clc; close all; clear all; a=imread('weni.jpg'); GaussianFilter = fspecial('gaussian', [9,9], 5); result = imfilter(a, GaussianFilter, 'same'); subplot(1,2,1), imshow(a); title('Before Smoothing') subplot(1,2,2), imshow(result); title('After Smoothing')

c. 5 x 5 clc; close all; clear all; a=imread('weni.jpg'); GaussianFilter = fspecial('gaussian', [5,5], 5); result = imfilter(a, GaussianFilter, 'same'); subplot(1,2,1), imshow(a); title('Before Smoothing') subplot(1,2,2), imshow(result); title('After Smoothing')

d. 3 x 7 clc; close all; clear all; a=imread('weni.jpg'); GaussianFilter = fspecial('gaussian', [3,7], 5); result = imfilter(a, GaussianFilter, 'same'); subplot(1,2,1), imshow(a); title('Before Smoothing') subplot(1,2,2), imshow(result); title('After Smoothing')

2. Sharpening a. 3 x 3 clc; close all; clear all; a=imread('weni.jpg'); sharpFilter = fspecial('unsharp'); sharp = imfilter(a, sharpFilter, 'replicate', [3,3], 5); subplot(1,2,1), imshow(a); title('Before Sharpening') subplot(1,2,2), imshow(sharp); title('After Sharpening')

b. 9 x 9 clc; close all; clear all; a = imread('weni.jpg') sharpFilter = fspecial('unsharp'); sharp = imfilter(a, sharpFilter, 'replicate', [9,9], 5); subplot(1,2,1), imshow(a); title('Before Sharpening') subplot(1,2,2), imshow(sharp); title('After Sharpening')

c. 5 x 5 clc; close all; clear all; a = imread('weni.jpg') sharpFilter = fspecial('unsharp'); sharp = imfilter(a, sharpFilter, 'replicate', [5,5], 5); subplot(1,2,1), imshow(a); title('Before Sharpening') subplot(1,2,2), imshow(sharp); title('After Sharpening')

d. 3 x 7 clc; close all; clear all; a = imread('weni.jpg') sharpFilter = fspecial('unsharp'); sharp = imfilter(a, sharpFilter, 'replicate', [5,5], 5); subplot(1,2,1), imshow(a); title('Before Sharpening') subplot(1,2,2), imshow(sharp); title('After Sharpening')

3. Edge Enhancement a. 3 x 3 clc; close all; clear all; a=imread('weni.jpg'); gray = rgb2gray (a); If = nlfilter(gray,[3,3],'min(x(:))'); subplot(1,2,1), imshow(a); title('Before Edge Enhancement') subplot(1,2,2), imshow(If); title('After Edge Enhancement')

b. 9 x 9 clc; close all; clear all; a=imread('weni.jpg'); gray = rgb2gray (a); If = nlfilter(gray,[9,9],'min(x(:))'); subplot(1,2,1), imshow(a); title('Before Edge Enhancement') subplot(1,2,2), imshow(If); title('After Edge Enhancement')

c. 5 x 5 clc; close all; clear all; a=imread('weni.jpg'); gray = rgb2gray (a); If = nlfilter(gray,[5,5],'min(x(:))'); subplot(1,2,1), imshow(a); title('Before Edge Enhancement') subplot(1,2,2), imshow(If); title('After Edge Enhancement')

d. 3 x 7

clc; close all; clear all; a=imread('weni.jpg'); gray = rgb2gray (a); If = nlfilter(gray,[3,7],'min(x(:))'); subplot(1,2,1), imshow(a); title('Before Edge Enhancement') subplot(1,2,2), imshow(If); title('After Edge Enhancement')

4. Melakukan Penggelapan, Penerangan, Penurunan kontras, Penaikan kontras

5. Menggunakan Software Editor e. Brightness & Darken

clc; clear all; close all; a = imread('weni.jpg'); g = rgb2gray(a); subplot(3,2,1) imshow (g); title ('GambarAwal') subplot(3,2,2) imshow (g),imhist (g); c = imread('wenicerah.jpg'); g = rgb2gray(c); subplot(3,2,3) imshow (g); title ('GambarDicerahkan') subplot(3,2,4) imhist (g); d = imread('wenigelap.jpg'); g = rgb2gray(d); subplot(3,2,5) imshow (g); title ('GambarDigelapkan') subplot(3,2,6) imhist (g);

f. High & Low Contrast

clc; clear all; close all; a = imread('weni.jpg'); g = rgb2gray(a); subplot(3,2,1) imshow (g); title ('GambarAwal') subplot(3,2,2) imshow (g),imhist (g); e = imread('wenitajam.jpg'); g = rgb2gray(e); subplot(3,2,3) imshow (g); title ('Kontras Tinggi') subplot(3,2,4) imhist (g); f = imread('wenikurangtajam.jpg'); g = rgb2gray(f); subplot(3,2,5) imshow (g); title ('KontrasRendah') subplot(3,2,6) imhist (g);

6. Menggunakan Coding a. Brightness & Darken

clc; clear all; close all; a = imread('weni1.jpg'); g = rgb2gray(a); subplot(3,2,1) imshow (g); title ('GambarAwal') subplot(3,2,2) imshow (g),imhist (g); c = imread('wenicerah.jpg'); br = c + 100; %brightness g = rgb2gray(br); subplot(3,2,3) imshow (br); title ('GambarDicerahkan') subplot(3,2,4) imhist (g); d = imread('wenigelap.jpg'); br = d - 100; %darken g = rgb2gray(br); subplot(3,2,5) imshow (br); title ('GambarDigelapkan') subplot(3,2,6) imhist (g);

b. High & Low Contrast

clc; clear all; close all; a = imread('weni1.jpg'); g = rgb2gray(a); subplot(3,2,1) imshow (g); title ('GambarAwal') subplot(3,2,2) imshow (g),imhist (g); e = imread('wenitajam.jpg'); br = e * 5; %high contrast g = rgb2gray(br); subplot(3,2,3) imshow (br); title ('GambarKontras Tinggi') subplot(3,2,4) imhist (g); f = imread('wenikurangtajam.jpg'); br = f / 5; %low contrast g = rgb2gray(br); subplot(3,2,5) imshow (br); title ('GambarKontrasRendah') subplot(3,2,6) imhist (g);

7. Kesimpulan

1. Hasilgambardan histogram yang didapatdarihasil edit di Software Editor dan Coding memilikiperbedaan 2. Pada Software editor, histogram menunjukanhanyaadabeberapanilaisaja. Misalnyapada Brightness hanyamemilikiangka di nilai 100 – 250 3. Sedangkanpada Coding, histogram menunjukanmempunyaisemuanilai. Misalnyapada

Brightness memilikiangkamulaidari 0 - 250

Related Documents

Tugas
October 2019 88
Tugas
October 2019 74
Tugas
June 2020 46
Tugas
May 2020 48
Tugas
June 2020 45
Tugas
August 2019 86

More Documents from "Luci xyy"