1 / 8

Dasar Image Enhancement

Dasar Image Enhancement. Achmad Basuki Surabaya, Nopember 2005. Materi. Konversi citra RGB menjadi citra grayscale Konversi ke citra biner Kuantisasi Thresholding Brightness Contrass Inversi Citra. GrayScale. RGB. Konversi Citra RGB ke GrayScale. RGR(r,g,b). Format Warna RGB.

kyrene
Download Presentation

Dasar Image Enhancement

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dasar Image Enhancement Achmad Basuki Surabaya, Nopember 2005

  2. Materi • Konversi citra RGB menjadi citra grayscale • Konversi ke citra biner • Kuantisasi Thresholding • Brightness • Contrass • Inversi Citra

  3. GrayScale RGB Konversi Citra RGB ke GrayScale RGR(r,g,b) Format Warna RGB RGR(x,x,x) Format Warna GRAY Model grayscale secara general Model grayscale yang banyak digunakan:

  4. Konversi Citra RGB ke GrayScale • Buat project baru • Buat 2 pictureBox, picture1 diisi dengan gambar harimau dan picture2 dikosongkan, dengan property seperti telah dijelaskan di depan • Buat CommandButton, isi caption=RGB to GRAY • Click commandButton dan tambahkan program capture dari picture1 ke picture2 sebagai berikut: Private Sub Command1_Click() For i = 1 To Picture1.ScaleWidth For j = 1 To Picture1.ScaleHeight w = Picture1.Point(i, j) r = w And RGB(255, 0, 0) g = Int((w And RGB(0, 255, 0)) / 256) b = Int(Int((w And RGB(0, 0, 255)) / 256) / 256) x=int((r+g+b)/3) Picture2.PSet (i, j), RGB(r, g, b) Next j Next i End Sub

  5. GrayScale Citra Biner (B/W) Konversi ke Citra Biner RGR(x,x,x) Format Warna GRAY RGR(bn.bn.bn) Format Warna BINER Konversi Citra ke Citra Biner yang banyak dilakukan Konversi Citra ke Citra Biner yang optimal

  6. Konversi ke Citra Biner • Buat project baru • Buat 2 pictureBox, picture1 diisi dengan gambar harimau dan picture2 dikosongkan, dengan property seperti telah dijelaskan di depan • Buat CommandButton, isi caption=Convert to Biner • Click commandButton dan tambahkan program capture dari picture1 ke picture2 sebagai berikut: Private Sub Command1_Click() For i = 1 To Picture1.ScaleWidth For j = 1 To Picture1.ScaleHeight w = Picture1.Point(i, j) r = w And RGB(255, 0, 0) g = Int((w And RGB(0, 255, 0)) / 256) b = Int(Int((w And RGB(0, 0, 255)) / 256) / 256) x=int((r+g+b)/3) if x<128 then bn=0 else bn=255 Picture2.PSet (i, j), RGB(bn,bn,bn) Next j Next i End Sub

  7. Konversi ke Citra Biner Optimal • Buat project baru • Buat 2 pictureBox, picture1 diisi dengan gambar harimau dan picture2 dikosongkan, dengan property seperti telah dijelaskan di depan • Buat CommandButton, isi caption=Convert to Biner • Click commandButton dan tambahkan program capture dari picture1 ke picture2 sebagai berikut: Private Sub Command1_Click() Dim x(640,480) as integer rx=0 For i = 1 To Picture1.ScaleWidth For j = 1 To Picture1.ScaleHeight w = Picture1.Point(i, j) r = w And RGB(255, 0, 0) g = Int((w And RGB(0, 255, 0)) / 256) b = Int(Int((w And RGB(0, 0, 255)) / 256) / 256) x(i,j)=int((r+g+b)/3) rx=rx+x Next j Next i rx=rx/Picture1.ScaleWidth/Picture1.ScaleHeight For i = 1 To Picture1.ScaleWidth For j = 1 To Picture1.ScaleHeight if x(i,j)<rx then bn=0 else bn=255 Picture2.PSet (i, j), RGB(bn,bn,bn) Next j Next i End Sub

  8. GrayScale Thresholding 2 dan 4derajat keabuan Thresholding 16 dan 256 derajat keabuan Kuantisasi Thresholding

More Related