Official Site of Missa Lamsani - Gunadarma University Lap-Lampiran PDM

LAMPIRAN 1.
PERSONALIA PENELITI

1.

Ketua Peneliti
a. Nama Lengkap
b. Jenis Kelamin
c. NIP
d. Disiplin ilmu
e. Pangkat/Golongan
f. Jabatan fungsional/struktural
g. Fakultas/Jurusan
h. Waktu penelitian

2. Anggota Peneliti : 2 orang
a. Nama Lengkap
b. Jenis Kelamin
c. NIP
d. Disiplin ilmu
e. Pangkat/Golongan

f. Jabatan fungsional/struktural
g. Fakultas/Jurusan
h. Waktu penelitian
a. Nama Lengkap
b. Jenis Kelamin
c. NIP
d. Disiplin ilmu
e. Pangkat/Golongan
f. Jabatan fungsional/struktural
g. Fakultas/Jurusan
h. Waktu penelitian
3. Tenaga Laboran/Teknisi :
a. Nama Lengkap
b. Keahlian

: Purnawarman Musa, SKom., MT
: Laki-laki
: 010119
: Sistem Komputer
:: Asisten Ahli

: Ilmu Komputer dan Teknologi Informasi / Sistem
Komputer
: 20 jam/minggu

: Nur Yuliani, SKom, MM
: Perempuan
: 990714
: Sistem Informasi
:: Asisten Ahli
: Ilmu Komputer dan Teknologi Informasi / Sistem
Informasi
: 15 jam/minggu
: Missa Lamsani, SKom., MT
: Perempuan
: 990304
: Sistem Komputer
:: Asisten Ahli
: Ilmu Komputer dan Teknologi Informasi / Sistem
Komputer
: 15 jam/minggu


: M.Achsan Isa A.A., SKOM., MMSI
: Programmer

4. Pekerja Lapangan/Pencacah : 5. Tenaga Administrasi (1 orang) : Dessy Wulandari A.P., SKOM

L-1

LAMPIRAN 2.
RIWAYAT HIDUP PENELITI

Riwayat Hidup
Nama
Tempat / Tanggal Lahir
Alamat
Kota
Telephone
Email
Status
Jenis Kelamin

Agama
Kebangsaan

: Purnawarman Musa
: Gorontalo, 18 Desember 1975
: Margonda Raya Gg Delima No. 43A
RT 01 / RW 07 Pondokcina
: Depok
: +62 815 911 3456
: p_musa@staff.gunadarma.ac.id
: Menikah
: Laki-laki
: Islam
: Indonesia

Pendidikan Formal :
1. SD Negeri 1 Dunggala, Gorontalo, Tahun 1982 – 1988.
2. SMP Negeri Isimu, Gorontalo, Tahun 1988 – 1991.
3. SMA Negeri 8 Ujungpandang, Makassar, Tahun 1991 – 1994.
4. Universitas Gunadarma, Fakultas Ilmu Komputer, Jurusan Teknik Komputer,

Jenjang Strata Satu (S1), Tahun 1994 – 1999.
5. Universitas Gundarma, Fakultas Teknik, Jurusan Magister Teknik Elektro, Jenjang
Strata Dua (S2), Tahun 2003 – 2006

Pendidikan Non Formal :
1. Demo Instalasi Wireless Internet di UPT Perpustakaan Institut Teknologi
Bandung, 10 Juni 2003, Bandung
2. Training Mikrokontroller oleh Innovative Electronics, 1 – 30 November 2003,
Surabaya.
3. Training Robotik di Politeknik Elektronika Negeri – ITS, 2 – 28 Januari 2006,
Surabaya
4. Workshop Robotik di Politeknik Elektronika Negeri – ITS, 19 – 20 Juli 2006,
Surabaya
5. Cisco Sertifikasi di PPDI – LIPI Jakarta Maret – November 2006, Jakarta
6. Workshop Robotik di Politeknik Elektronika Negeri – ITS, 5 – 7 November 2007,
Surabaya

L-2

Publikasi :

1.
Jurnal Ilmiah Informatika & Komputer “Konstruksi Port Pararel MCS-51”, ISSN :
08538638, Edisi : No. 1/Vol. 6/April 2001 Universitas Gunadarma, Depok
2.
Jurnal Ilmiah Informatika & Komputer “Kartu antar muka (interface card sebagai
masukan-keluaran(input-output) menggunakan PPI-8255 dan PIT-8253 berbasis
komputer”, Edisi : No. 8/Vol. 3/Desember 2003 Universitas Gunadarma, Depok
3.
Pemakalah National Seminar on Research and Studies IV “Teaching Grant”,
“Penerapan Belajar Mengajar Pada Mata Kuliah Pengantarmukaan Peripheral
Komputer Melalui Metode Latihan Penelitian Dan Latihan Laboratoris Secara
Berkelompok Untuk Mengoptimalkan Proses Belajar Mengajar”, Ministry Of
National Education Directorate General Of Higher Education TPSDP 8 – 9 Oktober
2004., Bandung.
4.
Pemakalah National Seminar on Research and Studies IV “Teaching Grant”,
“Pengembangan Multipath Learning Modules Berbasis Komputer untuk Mata
Kuliah Arsitektur Komputer”, Ministry Of National Education Directorate General
Of Higher Education TPSDP 6 – 8 April 2006., Jakarta.
5.

Pemakalah Seminar Nasional Tenaga Listrik dan Mekatronika 2006, “Studi
Pengembangan Alat Penjadwal Sholat Dan Penentu Arah Qiblat Berbasiskan
Mikrokontroler”, Lembaga Ilmu Pengetahuan Indonesia, 27 – 28 Juli 2006, LIPI –
Bandung
6.
Pemakalah Seminar Nasional Komputer dan Sistem Intelijen (KOMMIT) 2006,
“Rancang Bangun Perangkat Kendali-Cepat secara Jarak Jauh Berbantuan Sarana
Pesan-SMS pada Telefon Genggam”, Universitas Gunadarma, 2006
7.
Pemakalah Seminar Nasional Komputer dan Sistem Intelijen (KOMMIT) 2006,
“Robot Pintar Penentu Jalan Pada Labirin Dengan Memanfaatkan Sensor Navigasi
Dan Deteksi Objek”, Universitas Gunadarma, 2006

L-3

Riwayat Hidup
Nama
Tempat / Tanggal Lahir
Alamat
Kota

Telephone
Email
Status
Jenis Kelamin
Agama
Kebangsaan

: Missa Lamsani
: Sukabumi, 4 Oktober 1973
: Pondok Tirta Mandala Blok E No. 3
: Depok
: +62 815 8801153
: missa@staff.gunadarma.ac.id
: Menikah
: Perempuan
: Islam
: Indonesia

Pendidikan Formal :
1.

SD Mardi Yuana, Sukabumi, 1980 - 1986
2.
SMP Mardi Yuana 2, Sukabumi, 1986 - 1989
3.
SMA Mardi Yuana, Sukabumi, Tahun 1989-1992
4.
Universitas Gunadarma, Fakultas Ilmu Komputer, Jurusan Teknik Komputer,
Jenjang Strata Satu (S1), Tahun 1992 – 1998.
5.
Universitas Gundarma, Fakultas Teknik, Jurusan Magister Teknik Elektro, Jenjang
Strata Dua (S2), Tahun 1999 – 2001

Pendidikan Non Formal :
Publikasi :
-

L-4

Riwayat Hidup
Nama

Tempat / Tanggal Lahir
Alamat
Kota
Telephone
Email
Status
Jenis Kelamin
Agama
Kebangsaan

: Nur Yuliani
: Bogor, 3 Juli 1977
: Taman Raya Citayam Blok E1/ 12 A Rt 04/12
: Bogor
: +62 812 138 5288
: nryulia@staff.gunadarma.ac.id
: Menikah
: Perempuan
: Islam
: Indonesia


Pendidikan Formal :
1.
SDN Sindangkarsa I, Bogor, 1982 - 1988
2.
SMP N 1 Cimanggis, Bogor, 1988 - 1991
3.
SMA N 39, Jakarta, Tahun 1991-1994
4.
Universitas Gunadarma, Fakultas Ilmu Komputer, Jurusan Manajemen Informatika,
Jenjang Strata Satu (S1), Tahun 1994 – 1999.
5.
Universitas Gundarma, Jurusan Magister Manajemen, Jenjang Strata Dua (S2),
Tahun 1999 – 2002

Pendidikan Non Formal :
Publikasi :
1. Pemakalah Seminar Nasional Komputer dan Sistem Intelijen (KOMMIT) 2006,
“Sistem Identifikasi Pengenalan Karakter M Menggunakan Metode Run Length
Encoding”, Universitas Gunadarma, 2006
2. Adang Suhendra dan Nuryuliani, Analisis Tulisan Tangan Menggunakan Jaringan
Bayesian pada Penderita Cacat Pergerakan UG Jurnal Vo. 2 no. 3 thn 2008,
Universitas Gunadarma, ISSN 1978-4783

L-5

LAMPIRAN 3.
GAMBAR RANGKAIAN PENGENDALI PINTU AUTOMATIS

L-6

LAMPIRAN 4.
FLOWCHART PROGRAM
Mulai

Pengambilan Data
ObjekWajah

Penskalaan

Gray Scale

Segmentasi

Cropping

Kuantisasi
Ya
Verifikasi
Dikenal ?

Pintu terbuka

Tidak
Pintu tetap tertutup

Selesai

L-7

LAMPIRAN 5.
LISTING PROGRAM

' Program PDM by MUSA, Yuli and MISSA
' Universitas Gunadarma
' Tahun 2009
' Class Files

VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "Class1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Dim i As Integer
Dim j As Integer
Dim data As Integer
Dim nm As String
Dim no As Integer
Dim nama As String
Dim hehe As Long
Dim d As Long
Dim banding As Integer
Dim lama As Integer
Dim waktu As Integer
Dim R(0 To 15, 0 To 15) As Integer
Function PilihKamera(ByVal hWnd As Long, ByVal wDriver As Long) As Boolean
Dim lpszName As String * 100
Dim lpszVer As String * 100
If capGetDriverDescriptionA(wDriver, lpszName, 100, _
lpszVer, 100) Then
lwndC = capCreateCaptureWindowA(lpszName, _

L-8

WS_VISIBLE + WS_CHILD, 0, 0, 320, 240, hWnd, 0)
If capDriverConnect(lwndC, wDriver) Then
capSetCallbackOnFrame lwndC, AddressOf OnFrameEvent
capPreviewScale lwndC, True
capPreviewRate lwndC, 1
capPreview lwndC, True
PilihKamera = True
Else
DestroyWindow lwndC
lwndC = 0
End If
End If
End Function
Sub TutupKamera()
capSetCallbackOnFrame lwndC, vbNull
If lwndC 0 Then
capDriverDisconnect lwndC
DestroyWindow lwndC
End If
End Sub
Sub SetKamera()
capDlgVideoFormat lwndC
ResizeCaptureWindow lwndC
End Sub
Sub ProsesImage()
Penskalaan 2
Segmentasi
Cropping
Kuantisasi
End Sub
Public Sub Penskalaan(Faktor As Byte)
Dim xx As Integer
Dim yy As Integer
Dim R As Integer
Dim G As Integer
Dim b As Integer
Dim x As Integer
Dim y As Integer
For y = 0 To 239 Step Faktor
For x = 0 To 319 Step Faktor
R=0
G=0
b=0

L-9

For yy = 0 To Faktor - 1
For xx = 0 To Faktor - 1
R = R + vIn(x + xx, y + yy).R
G = G + vIn(x + xx, y + yy).G
b = b + vIn(x + xx, y + yy).b
Next
Next
R = R / (Faktor * Faktor)
G = G / (Faktor * Faktor)
b = b / (Faktor * Faktor)
xx = x / Faktor
yy = y / Faktor
vOut(xx, yy).R = R
vOut(xx, yy).G = G
vOut(xx, yy).b = b
Next
Next
End Sub
Sub Segmentasi()
Dim y As Integer
Dim x As Integer
Dim R As Integer
Dim G As Integer
Dim b As Integer
Dim w As Integer
Dim xx As Integer
Dim yy As Integer
For y = 0 To 119
For x = 0 To 159
R = vOut(x, y).R
G = vOut(x, y).G
b = vOut(x, y).b
w = (R + G + b) \ 3
If (R + G) > b * 2 And Abs(R - G) < 128 Then
'If R > 95 And G > 40 And B > 20 And R > B And R > G And Abs(R - G) > 15
Then
vOut(x, y).R = w
vOut(x, y).G = w
vOut(x, y).b = w
Else
vOut(x, y).R = 0
vOut(x, y).G = 0
vOut(x, y).b = 0
End If
Next
Next
End Sub

L - 10

Sub Cropping()
Dim x As Integer
Dim y As Integer
Xmin = 1000
Xmax = 0
Ymin = 1000
Ymax = 0
For y = 0 To 119
For x = 0 To 159
If vOut(x, y).R > 50 Then
If x > Xmax Then Xmax = x
If x < Xmin Then Xmin = x
If y > Ymax Then Ymax = y
If y < Ymin Then Ymin = y
End If
Next
Next
'KOTAK dipindahkan
For x = Xmin To Xmax
vOut(x, Ymin).R = 255
vOut(x, Ymin).G = 255
vOut(x, Ymin).b = 255
vOut(x, Ymax).R = 255
vOut(x, Ymax).G = 255
vOut(x, Ymax).b = 255
Next
For y = Ymin To Ymax
vOut(Xmin, y).R = 255
vOut(Xmin, y).G = 255
vOut(Xmin, y).b = 255
vOut(Xmax, y).R = 255
vOut(Xmax, y).G = 255
vOut(Xmax, y).b = 255
Next
End Sub
Sub Kuantisasi()
Dim i As Integer
Dim j As Integer
Dim x As Integer
Dim y As Integer
Dim R As Integer
Dim G As Integer
Dim b As Integer
Dim w As Integer
Dim s As Single

L - 11

For j = 0 To 15
For i = 0 To 15
VQ(i, j) = 0
Next
Next
For y = Ymin To Ymax
For x = Xmin To Xmax
i = (x - Xmin) * 15 / (Xmax - Xmin)
j = (y - Ymin) * 15 / (Ymax - Ymin)
VQ(i, j) = VQ(i, j) + vOut(x, y).R
Next
Next
s = (16 * 16) / (Xmax - Xmin + 1) / (Ymax - Ymin + 1)
If s > 1 Then Exit Sub
For j = 0 To 15
For i = 0 To 15
VQ(i, j) = VQ(i, j) * s
Next
Next
For y = 0 To 239
For x = 0 To 239
w = VQ(x \ 15, y \ 15)
If w > 255 Then w = 255
vOut(x, y).R = w
vOut(x, y).G = w
vOut(x, y).b = w
Next
Next
End Sub
'Public Declare Function inp Lib "inpout32.dll" _
Alias "Inp32" (ByVal portaddress As Integer) As Integer
'Public Declare Sub out Lib "inpout32.dll" _
Alias "Out32" (ByVal portaddress As Integer, ByVal value As Integer)
Private Sub Check1_Click()
VideoOut = (Check1.value = 1)
End Sub
' Program PDM by MUSA, Yuli and MISSA
' Universitas Gunadarma
' Tahun 2009
' Modul File

L - 12

Attribute VB_Name = "Module1"
Option Explicit
Dim i As Integer
Dim j As Integer
Dim data As Integer
Dim nm As String
Dim no As Integer
Dim nama As String
Dim NameSementara As String
Dim hehe As Long
Dim d As Long
Dim banding As Integer
Dim lama As Integer
Dim waktu As Integer
Dim Min As Double
Global r(0 To 15, 0 To 15) As Integer
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOZORDER = &H4
Public Const HWND_BOTTOM = 1
Public Const WS_VISIBLE = &H10000000
Public Const WS_CHILD = &H40000000
Public Const WM_USER = &H400
Public Const WM_CAP_START = WM_USER
Public Const WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10
Public Const WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11
Public Const WM_CAP_SET_PREVIEW = WM_CAP_START + 50
Public Const WM_CAP_SET_PREVIEWRATE = WM_CAP_START + 52
Public Const WM_CAP_SET_SCALE = WM_CAP_START + 53
Public Const WM_CAP_SET_CALLBACK_FRAME = WM_CAP_START + 5
Public Const WM_CAP_DLG_VIDEOFORMAT = WM_CAP_START + 41
Public Const WM_CAP_GET_STATUS = WM_CAP_START + 54
Public Const WM_CAP_FILE_SAVEDIB As Long = WM_CAP_START + 25
Private Declare Function SendMessageAsString Lib "user32" Alias "SendMessageA" _
(ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As String) As Long
Type VIDEOHDR
lpData As Long
dwBufferLength As Long
dwBytesUsed As Long
dwTimeCaptured As Long
dwUser As Long
dwFlags As Long
dwReserved(3) As Long
End Type

L - 13

Type POINTAPI
x As Long
y As Long
End Type
Type CAPSTATUS
uiImageWidth As Long
uiImageHeight As Long
fLiveWindow As Long
fOverlayWindow As Long
fScale As Long
ptScroll As POINTAPI
fUsingDefaultPalette As Long
fAudioHardware As Long
fCapFileExists As Long
dwCurrentVideoFrame As Long
dwCurrentVideoFramesDropped As Long
dwCurrentWaveSamples As Long
dwCurrentTimeElapsedMS As Long
hPalCurrent As Long
fCapturingNow As Long
dwReturn As Long
wNumVideoAllocated As Long
wNumAudioAllocated As Long
End Type
Type tRGB24
B As Byte
G As Byte
r As Byte
End Type
Declare Function capCreateCaptureWindowA Lib "avicap32.dll" ( _
ByVal lpszWindowName As String, _
ByVal dwStyle As Long, _
ByVal x As Long, ByVal y As Long, _
ByVal nWidth As Long, ByVal nHeight As Integer, _
ByVal hWndParent As Long, ByVal nID As Long) As Long
Declare Function SetWindowPos Lib "user32" ( _
ByVal hWnd As Long, ByVal hWndInsertAfter As Long, _
ByVal x As Long, ByVal y As Long, ByVal cx As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long
Declare Function DestroyWindow Lib "user32" ( _
ByVal hndw As Long) As Boolean
Declare Function capGetDriverDescriptionA Lib "avicap32.dll" ( _
ByVal wDriver As Integer, _
ByVal lpszName As String, _

L - 14

ByVal cbName As Long, _
ByVal lpszVer As String, _
ByVal cbVer As Long) As Boolean
Declare Sub RtlMoveMemory Lib "kernel32" ( _
ByVal hpvDest As Long, ByVal hpvSource As Long, _
ByVal cbCopy As Long)
Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _
ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, _
ByVal lParam As Long) As Long
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Declare Sub Tunda Lib "Port_IO.dll" (ByVal lama As Integer)
Public Declare Function SetPixel Lib "gdi32.dll" (ByVal hdc As Long, ByVal x As Long,
ByVal y As Long, ByVal crColor As Long) As Long
Public Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long,
ByVal y As Long) As Long
Dim VideoHeader As VIDEOHDR
Dim vIn(0 To 319, 0 To 239) As tRGB24
Dim vOut(0 To 319, 0 To 239) As tRGB24
'Global vImage() As tRGB24
Global lwndC As Long
Global VideoOut As Boolean
Global fps As Integer
Global rR As Integer
Global Gg As Integer
Global Bb As Integer
'Global w As Integer
'Global data(0 To 300, 0 To 300) As Double
Global VQ(0 To 15, 0 To 150) As Integer
Global Xmin As Integer
Global Xmax As Integer
Global Ymin As Integer
Global Ymax As Integer
Dim out As String
Function capDriverConnect(ByVal lwnd As Long, _
ByVal i As Integer) As Boolean
capDriverConnect = SendMessage(lwnd, WM_CAP_DRIVER_CONNECT, i, 0)
End Function
Function capDriverDisconnect(ByVal lwnd As Long) As Boolean
capDriverDisconnect = SendMessage( _
lwnd, WM_CAP_DRIVER_DISCONNECT, 0, 0)
End Function
Function capSetCallbackOnFrame(ByVal lwnd As Long, _
ByVal lpProc As Long) As Boolean
capSetCallbackOnFrame = SendMessage( _
lwnd, WM_CAP_SET_CALLBACK_FRAME, 0, lpProc)
End Function

L - 15

Function capPreviewScale(ByVal lwnd As Long, _
ByVal f As Boolean) As Boolean
capPreviewScale = SendMessage(lwnd, WM_CAP_SET_SCALE, f, 0)
End Function
Function capPreviewRate(ByVal lwnd As Long, _
ByVal wMS As Integer) As Boolean
capPreviewRate = SendMessage(lwnd, WM_CAP_SET_PREVIEWRATE, wMS, 0)
End Function
Function capPreview(ByVal lwnd As Long, ByVal f As Boolean) As Boolean
capPreview = SendMessage(lwnd, WM_CAP_SET_PREVIEW, f, 0)
End Function
Function capDlgVideoFormat(ByVal lwnd As Long) As Boolean
capDlgVideoFormat = SendMessage(lwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0)
End Function
Function capGetStatus(ByVal lwnd As Long, ByVal s As Long, _
ByVal wSize As Integer) As Boolean
capGetStatus = SendMessage(lwnd, WM_CAP_GET_STATUS, wSize, s)
End Function
Function capFileSaveDIB(ByVal hCapWnd As Long, ByVal FilePath As String) As
Boolean
capFileSaveDIB = SendMessageAsString(hCapWnd, WM_CAP_FILE_SAVEDIB, 0&,
FilePath)
End Function
Sub ResizeCaptureWindow(ByVal lwnd As Long)
Dim CAPSTATUS As CAPSTATUS
capGetStatus lwnd, VarPtr(CAPSTATUS), Len(CAPSTATUS)
SetWindowPos lwnd, HWND_BOTTOM, 0, 0, _
CAPSTATUS.uiImageWidth, _
CAPSTATUS.uiImageHeight, _
SWP_NOMOVE Or SWP_NOZORDER
End Sub
Function OnFrameEvent(ByVal lwnd As Long, ByVal lpVHdr As Long) As Long
RtlMoveMemory VarPtr(VideoHeader), lpVHdr, Len(VideoHeader)
If VideoHeader.dwBytesUsed = 0 Then Exit Function
If VideoHeader.dwBytesUsed 230400 Then
MsgBox "Ubah setting konfigurasi Video dalam 320x240 RGB24", _
vbCritical, "Pesan Kesalahan"
SetKamera
Exit Function
End If
RtlMoveMemory VarPtr(vIn(0, 0)), VideoHeader.lpData, _
VideoHeader.dwBytesUsed
ProsesImage
If VideoOut Then
RtlMoveMemory VideoHeader.lpData, VarPtr(vOut(0, 0)), _
VideoHeader.dwBytesUsed

L - 16

End If
fps = fps + 1
End Function
Function PilihKamera(ByVal hWnd As Long, ByVal wDriver As Long) As Boolean
Dim lpszName As String * 100
Dim lpszVer As String * 100
If capGetDriverDescriptionA(wDriver, lpszName, 100, _
lpszVer, 100) Then
lwndC = capCreateCaptureWindowA(lpszName, _
WS_VISIBLE + WS_CHILD, 0, 0, 320, 240, hWnd, 0)
If capDriverConnect(lwndC, wDriver) Then
capSetCallbackOnFrame lwndC, AddressOf OnFrameEvent
capPreviewScale lwndC, True
capPreviewRate lwndC, 1
capPreview lwndC, True
PilihKamera = True
Else
DestroyWindow lwndC
lwndC = 0
End If
End If
End Function
Sub TutupKamera()
capSetCallbackOnFrame lwndC, vbNull
If lwndC 0 Then
capDriverDisconnect lwndC
DestroyWindow lwndC
End If
End Sub
Sub SetKamera()
capDlgVideoFormat lwndC
ResizeCaptureWindow lwndC
End Sub
Sub ProsesImage()
'UkuranKotak
Penskalaan 2
Segmentasi
Cropping
Kuantisasi
End Sub
Public Sub Penskalaan(Faktor As Byte)
Dim xx As Integer
Dim yy As Integer

L - 17

Dim r As Integer
Dim G As Integer
Dim B As Integer
Dim x As Integer
Dim y As Integer
For y = 0 To 239 Step Faktor
For x = 0 To 319 Step Faktor
r=0
G=0
B=0
For yy = 0 To Faktor - 1
For xx = 0 To Faktor - 1
r = r + vIn(x + xx, y + yy).r
G = G + vIn(x + xx, y + yy).G
B = B + vIn(x + xx, y + yy).B
Next
Next
r = r / (Faktor * Faktor)
G = G / (Faktor * Faktor)
B = B / (Faktor * Faktor)
xx = x / Faktor
yy = y / Faktor
vOut(xx, yy).r = r
vOut(xx, yy).G = G
vOut(xx, yy).B = B
Next
Next
End Sub
Sub Segmentasi()
Dim y As Integer
Dim x As Integer
Dim r As Integer
Dim G As Integer
Dim B As Integer
Dim w As Integer
Dim xx As Integer
Dim yy As Integer
For y = 0 To 119
For x = 0 To 159
r = vOut(x, y).r
G = vOut(x, y).G
B = vOut(x, y).B
w = (r + G + B) \ 3
If (r + G) > B * 2 And Abs(r - G) < 128 Then
'If R > 95 And G > 40 And B > 20 And R > B And R > G And Abs(R - G) > 15

L - 18

Then
vOut(x, y).r = w
vOut(x, y).G = w
vOut(x, y).B = w
Else
vOut(x, y).r = 0
vOut(x, y).G = 0
vOut(x, y).B = 0
End If
Next
Next
End Sub
Sub Cropping()
Dim x As Integer
Dim y As Integer
'If VideoOut Then
Xmin = 1000
Xmax = 0
Ymin = 1000
Ymax = 0
For y = 0 To 119
For x = 0 To 159
If vOut(x, y).r > 50 Then
If x > Xmax Then Xmax = x
If x < Xmin Then Xmin = x
If y > Ymax Then Ymax = y
If y < Ymin Then Ymin = y
End If
Next
Next
'KOTAK dipindahkan
For x = Xmin To Xmax
vOut(x, Ymin).r = 255
vOut(x, Ymin).G = 255
vOut(x, Ymin).B = 255
vOut(x, Ymax).r = 255
vOut(x, Ymax).G = 255
vOut(x, Ymax).B = 255
Next
For y = Ymin To Ymax
vOut(Xmin, y).r = 255
vOut(Xmin, y).G = 255
vOut(Xmin, y).B = 255
vOut(Xmax, y).r = 255
vOut(Xmax, y).G = 255

L - 19

vOut(Xmax, y).B = 255
Next
'Else
' Call UkuranKotak
'End If
End Sub
Sub Kuantisasi()
Dim i As Integer
Dim j As Integer
Dim x As Integer
Dim y As Integer
Dim r As Integer
Dim G As Integer
Dim B As Integer
Dim w As Integer
Dim s As Single
For j = 0 To 15
For i = 0 To 15
VQ(i, j) = 0
Next
Next
For y = Ymin To Ymax
For x = Xmin To Xmax
i = (x - Xmin) * 15 / (Xmax - Xmin)
j = (y - Ymin) * 15 / (Ymax - Ymin)
VQ(i, j) = VQ(i, j) + vOut(x, y).r
Next
Next
s = (16 * 16) / (Xmax - Xmin + 1) / (Ymax - Ymin + 1)
If s > 1 Then Exit Sub
For j = 0 To 15
For i = 0 To 15
VQ(i, j) = VQ(i, j) * s
Next
Next
For y = 0 To 239
For x = 0 To 239
w = VQ(x \ 15, y \ 15)
If w > 255 Then w = 255
vOut(x, y).r = w
vOut(x, y).G = w
vOut(x, y).B = w

L - 20

Next
Next
End Sub
Public Sub KotakBaru(ByVal X1 As Integer, ByVal Y1 As Integer, _
ByVal X2 As Integer, ByVal Y2 As Integer)
Dim x As Integer
Dim y As Integer
If X1 < 0 Then X1 = 0
If X1 > 319 Then X1 = 319
If X2 < 0 Then X2 = 0
If X2 > 319 Then X2 = 319
If Y1 < 0 Then Y1 = 0
If Y1 > 239 Then Y1 = 239
If Y2 < 0 Then Y2 = 0
If Y2 > 239 Then Y2 = 239
For x = X1 To X2
vIn(x, Y1).r = 255
vIn(x, Y1).G = 255
vIn(x, Y1).B = 255
vIn(x, Y2).r = 255
vIn(x, Y2).G = 255
vIn(x, Y2).B = 255
Next
For y = Y1 To Y2
vIn(X1, y).r = 255
vIn(X1, y).G = 255
vIn(X1, y).B = 255
vIn(X2, y).r = 255
vIn(X2, y).G = 255
vIn(X2, y).B = 255
Next
End Sub
Public Sub UkuranKotak()
Dim xx As Integer
Dim yy As Integer
Dim x As Integer
Dim y As Integer
KotakBaru 99, 2, 319, 237
For y = 0 To 239
For x = 0 To 319
rR = vIn(x, y).r
Gg = vIn(x, y).G
Bb = vIn(x, y).B
vOut(x, y).r = rR
vOut(x, y).G = Gg
vOut(x, y).B = Bb

L - 21

Next
Next
End Sub
Function Get_ID() As String
Dim m_DBConnection As ADODB.Connection
Dim rs As ADODB.Recordset
Dim db_file As String
Dim a As Integer
db_file = App.Path
If Right$(db_file, 1) "\" Then db_file = db_file & "\"
db_file = db_file & "db1.mdb"
Set m_DBConnection = New ADODB.Connection
m_DBConnection.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & db_file & ";" & _
"Persist Security Info=False"
m_DBConnection.Open
Set rs = m_DBConnection.Execute( _
"select max(id)+1 as noid from t_wajah", , adCmdText)
If rs.Fields(0).Value 0 Then
a = rs.Fields(0).Value
Else
a=1
End If
Get_ID = a
rs.Close
m_DBConnection.Close
End Function

'Public Declare Function inp Lib "inpout32.dll" _
Alias "Inp32" (ByVal portaddress As Integer) As Integer
'Public Declare Sub out Lib "inpout32.dll" _
Alias "Out32" (ByVal portaddress As Integer, ByVal value As Integer)

L - 22

LAMPIRAN 6.
CONTOH DATA

L - 23

L - 24

LAMPIRAN 7.
CONTOH DATABASE WAJAH

t_wajah
id

nama

1

missa

2

denni

3

yuli

4

akbar

5

achsan

6

doni

7

nelly

8

soffi

9

reza

10

silvi

11

chrisno

12

yoga

13

hanum

14

rita

15

sofyan

16

ade

17

nouval

18

sisi

19

ahmad

20

juli

21

siska

22

doel

23

dessy

24

andi

25

dika

L - 25

t_wajah
id

nama

26

farhan

27

yudi

28

gunawan

29

ronny

30

widoyo

L - 26

LAMPIRAN 8.
CONTOH DATABASE DATA WAJAH

t_data_wajah
id

pos_x

pos_y

data

1

2

2

62

1

3

2

36

1

4

2

15

1

5

2

6

1

6

2

14

1

7

2

25

1

8

2

21

1

9

2

20

1

10

2

16

1

11

2

2

1

12

2

3

1

13

2

19

1

14

2

20

1

15

2

34

1

0

3

50

1

1

3

54

1

2

3

55

1

3

3

47

1

4

3

56

1

5

3

58

L - 27

t_data_wajah
id

pos_x

pos_y

data

1

6

3

23

1

7

3

36

1

8

3

45

1

9

3

22

1

10

3

19

1

11

3

29

1

12

3

26

1

13

3

5

1

14

3

10

1

15

3

30

1

0

4

43

1

1

4

38

1

2

4

36

1

3

4

56

1

4

4

51

1

5

4

79

1

6

4

57

1

7

4

50

1

8

4

47

1

9

4

41

1

10

4

37

1

11

4

14

L - 28

t_data_wajah
id

pos_x

pos_y

data

1

12

4

19

1

13

4

8

1

14

4

1

1

15

4

27

1

0

5

37

1

1

5

24

1

2

5

54

1

3

5

47

1

4

5

86

1

5

5

74

1

6

5

55

1

7

5

60

1

8

5

42

1

9

5

52

1

10

5

38

1

11

5

18

1

12

5

8

1

13

5

1

1

14

5

3

1

15

5

27

1

0

6

30

1

1

6

28

L - 29

t_data_wajah
id

pos_x

pos_y

data

1

2

6

27

1

3

6

62

1

4

6

50

1

5

6

51

1

6

6

63

1

7

6

71

1

8

6

58

1

9

6

67

1

10

6

53

1

11

6

10

1

12

6

3

1

13

6

1

1

14

6

1

1

15

6

27

1

0

7

31

1

1

7

21

1

2

7

26

1

3

7

49

1

4

7

16

1

5

7

54

1

6

7

68

1

7

7

67

L - 30

t_data_wajah
id

pos_x

pos_y

data

1

8

7

81

1

9

7

63

1

10

7

68

1

11

7

6

1

12

7

5

1

13

7

5

1

14

7

0

1

15

7

31

1

0

8

33

1

1

8

23

1

2

8

43

1

3

8

26

1

4

8

17

1

5

8

31

1

6

8

44

1

7

8

46

1

8

8

72

1

9

8

37

1

10

8

49

1

11

8

8

1

12

8

0

1

13

8

3

L - 31

t_data_wajah
id

pos_x

pos_y

data

1

14

8

0

1

15

8

27

1

0

9

37

1

1

9

19

1

2

9

47

1

3

9

21

1

4

9

4

1

5

9

19

1

6

9

45

1

7

9

64

1

8

9

80

1

9

9

48

1

10

9

42

1

11

9

3

1

12

9

0

1

13

9

0

1

14

9

0

1

15

9

27

1

0

10

36

1

1

10

15

1

2

10

17

1

3

10

4

L - 32

t_data_wajah
id

pos_x

pos_y

data

1

4

10

10

1

5

10

12

1

6

10

46

1

7

10

77

1

8

10

81

1

9

10

62

1

10

10

37

1

11

10

2

1

12

10

0

1

13

10

0

1

14

10

0

1

15

10

27

1

0

11

27

1

1

11

5

1

2

11

24

1

3

11

5

1

4

11

2

1

5

11

23

1

6

11

31

1

7

11

75

1

8

11

82

1

9

11

56

L - 33

t_data_wajah
id

pos_x

pos_y

data

1

10

11

27

1

11

11

0

1

12

11

0

1

13

11

0

1

14

11

0

1

15

11

27

1

0

12

29

1

1

12

6

1

2

12

8

1

3

12

2

1

4

12

2

1

5

12

11

1

6

12

23

1

7

12

51

1

8

12

72

1

9

12

34

1

10

12

20

1

11

12

0

1

12

12

0

1

13

12

0

1

14

12

0

1

15

12

27

L - 34

t_data_wajah
id

pos_x

pos_y

data

1

0

13

29

1

1

13

0

1

2

13

3

1

3

13

2

1

4

13

2

1

5

13

0

1

6

13

13

1

7

13

28

1

8

13

31

1

9

13

29

1

10

13

0

1

11

13

0

1

12

13

0

1

13

13

0

1

14

13

0

1

15

13

27

1

0

14

30

1

1

14

11

1

2

14

3

1

3

14

2

1

4

14

0

1

5

14

0

L - 35

t_data_wajah
id

pos_x

pos_y

data

1

6

14

0

1

7

14

0

1

8

14

5

1

9

14

0

1

10

14

0

1

11

14

0

1

12

14

0

1

13

14

0

1

14

14

0

1

15

14

27

1

0

15

31

1

1

15

36

1

2

15

39

1

3

15

37

1

4

15

34

1

5

15

37

1

6

15

34

1

7

15

37

1

8

15

37

1

9

15

34

1

10

15

37

1

11

15

34

L - 36

t_data_wajah
id

pos_x

pos_y

data

1

12

15

37

1

13

15

37

1

14

15

34

1

15

15

31

1

0

0

39

1

1

0

54

1

2

0

48

1

3

0

39

1

4

0

37

1

5

0

40

1

6

0

38

1

7

0

47

1

8

0

48

1

9

0

42

1

10

0

41

1

11

0

35

1

12

0

39

1

13

0

38

1

14

0

39

1

15

0

37

1

0

1

42

1

1

1

43

L - 37

t_data_wajah
id

pos_x

pos_y

data

1

2

1

58

1

3

1

11

1

4

1

3

1

5

1

9

1

6

1

14

1

7

1

28

1

8

1

32

1

9

1

21

1

10

1

13

1

11

1

2

1

12

1

1

1

13

1

1

1

14

1

25

1

15

1

40

1

0

2

49

1

1

2

51

2

0

0

37

2

1

0

51

2

2

0

64

2

3

0

58

2

4

0

54

2

5

0

59

L - 38

t_data_wajah
id

pos_x

pos_y

data

2

6

0

54

2

7

0

45

2

8

0

44

2

9

0

51

2

10

0

57

2

11

0

53

2

12

0

58

2

13

0

50

2

14

0

44

2

15

0

39

2

0

1

45

2

1

1

53

2

2

1

68

2

3

1

65

2

4

1

57

2

5

1

64

2

6

1

42

2

7

1

17

2

8

1

17

2

9

1

41

2

10

1

64

2

11

1

50

L - 39

t_data_wajah
id

pos_x

pos_y

data

2

12

1

49

2

13

1

39

2

14

1

22

2

15

1

40

2

0

2

52

2

1

2

51

2

2

2

60

2

3

2

80

2

4

2

65

2

5

2

80

2

6

2

34

2

7

2

20

2

8

2

20

2

9

2

33

2

10

2

74

2

11

2

55

2

12

2

48

2

13

2

27

2

14

2

17

2

15

2

37

2

0

3

50

2

1

3

56

L - 40

t_data_wajah
id

pos_x

pos_y

data

2

2

3

61

2

3

3

97

2

4

3

73

2

5

3

80

2

6

3

32

2

7

3

38

2

8

3

36

2

9

3

46

2

10

3

80

2

11

3

47

2

12

3

57

2

13

3

25

2

14

3

11

2

15

3

34

2

0

4

44

2

1

4

39

2

2

4

71

2

3

4

85

2

4

4

94

2

5

4

88

2

6

4

38

2

7

4

31

L - 41

t_data_wajah
id

pos_x

pos_y

data

2

8

4

38

2

9

4

64

2

10

4

83

2

11

4

62

2

12

4

33

2

13

4

14

2

14

4

4

2

15

4

27

2

0

5

44

2

1

5

38

2

2

5

67

2

3

5

71

2

4

5

90

2

5

5

80

2

6

5

48

2

7

5

45

2

8

5

46

2

9

5

56

2

10

5

25

2

11

5

22

2

12

5

18

2

13

5

4

L - 42

t_data_wajah
id

pos_x

pos_y

data

2

14

5

11

2

15

5

30

2

0

6

43

2

1

6

45

2

2

6

69

2

3

6

67

2

4

6

71

2

5

6

47

2

6

6

62

2

7

6

53

2

8

6

61

2

9

6

66

2

10

6

8

2

11

6

11

2

12

6

15

2

13

6

5

2

14

6

7

2

15

6

30

2

0

7

48

2

1

7

48

2

2

7

41

2

3

7

79

L - 43

t_data_wajah
id

pos_x

pos_y

data

2

4

7

45

2

5

7

50

2

6

7

59

2

7

7

74

2

8

7

66

2

9

7

64

2

10

7

34

2

11

7

4

2

12

7

5

2

13

7

0

2

14

7

0

2

15

7

31

2

0

8

40

2

1

8

44

2

2

8

43

2

3

8

43

2

4

8

23

2

5

8

34

2

6

8

35

2

7

8

62

2

8

8

42

2

9

8

54

L - 44

t_data_wajah
id

pos_x

pos_y

data

2

10

8

31

2

11

8

2

2

12

8

0

2

13

8

0

2

14

8

0

2

15

8

27

2

0

9

37

2

1

9

24

2

2

9

43

2

3

9

14

2

4

9

18

2

5

9

37

2

6

9

55

2

7

9

73

2

8

9

57

2

9

9

43

2

10

9

10

2

11

9

0

2

12

9

0

2

13

9

2

2

14

9

0

2

15

9

27

L - 45

t_data_wajah
id

pos_x

pos_y

data

2

0

10

39

2

1

10

15

2

2

10

32

2

3

10

11

2

4

10

20

2

5

10

45

2

6

10

65

2

7

10

89

2

8

10

93

2

9

10

38

2

10

10

3

2

11

10

0

2

12

10

0

2

13

10

0

2

14

10

0

2

15

10

27

2

0

11

39

2

1

11

9

2

2

11

25

2

3

11

13

2

4

11

17

2

5

11

30

L - 46

t_data_wajah
id

pos_x

pos_y

data

2

6

11

43

2

7

11

50

2

8

11

49

2

9

11

26

2

10

11

0

2

11

11

0

2

12

11

0

2

13

11

0

2

14

11

0

2

15

11

30

2

0

12

44

2

1

12

8

2

2

12

8

2

3

12

7

2

4

12

10

2

5

12

25

2

6

12

12

2

7

12

15

2

8

12

14

2

9

12

16

2

10

12

0

2

11

12

0

L - 47

t_data_wajah
id

pos_x

pos_y

data

2

12

12

0

2

13

12

0

2

14

12

0

2

15

12

27

2

0

13

30

2

1

13

6

2

2

13

10

2

3

13

0

2

4

13

6

2

5

13

15

2

6

13

27

2

7

13

39

2

8

13

26

2

9

13

0

2

10

13

0

2

11

13

0

2

12

13

0

2

13

13

0

2

14

13

0

2

15

13

27

2

0

14

30

2

1

14

10

L - 48

t_data_wajah
id

pos_x

pos_y

data

2

2

14

9

2

3

14

0

2

4

14

0

2

5

14

0

2

6

14

0

2

7

14

0

2

8

14

0

2

9

14

0

2

10

14

0

2

11

14

0

2

12

14

0

2

13

14

0

2

14

14

0

2

15

14

27

2

0

15

32

2

1

15

36

2

2

15

37

2

3

15

37

2

4

15

34

2

5

15

37

2

6

15

34

2

7

15

37

L - 49

t_data_wajah
id

pos_x

pos_y

data

2

8

15

37

2

9

15

34

2

10

15

37

2

11

15

34

2

12

15

37

2

13

15

37

2

14

15

34

2

15

15

31

L - 50

LAMPIRAN 9.
TAYANGAN PRESENTASI

L - 51

L - 52

L - 53

L - 54

L - 55

L - 56

L - 57

L - 58

L - 59

L - 60

L - 61

L - 62