• Tidak ada hasil yang ditemukan

Aplikasi Pendeteksian Posisi Jari Melalui Kamera Web Sebagai Operator Kursor Mouse.

N/A
N/A
Protected

Academic year: 2017

Membagikan "Aplikasi Pendeteksian Posisi Jari Melalui Kamera Web Sebagai Operator Kursor Mouse."

Copied!
33
0
0

Teks penuh

(1)

i

Aplikasi Pendeteksian Posisi Jari Melalui Kamera Web Sebagai Operator Kursor Mouse

Enrico / 0622024

Ema

Jurusan Teknik Elektro, Fakultas Teknik, Universitas Kristen Maranatha

Jalan Prof. drg. Suria Sumantri, MPH 65, Bandung 40164, Indonesia

ABSTRAK

Pada era globalisasi di abad 21 penggunaan teknologi dan komputer

semakin signifikan di berbagai bidang kehidupan seperti bidang medis, industri,

hiburan, keamanan, sosial. Penggunaan komputer sebagai sarana pribadi termasuk

salah satunya yakni Personal Computer.

Dalam tugas akhir ini, telah dibuat program aplikasi pendeteksian posisi

jari telunjuk sebagai penggerak kursor mouse,posisi jari telunjuk setengah tertutup

sebagai perintah klik kiri dan jari telunjuk tertutup untuk pengoperasian klik

kanan dengan jangkauan pemantauan pada batas jarak tertentu dari lensa kamera

web.

Program dibuat dengan metoda segmentasi warna kulit dan identifikasi

bentuk, agar dapat membedakan warna kulit jari dengan latar belakang.

Pengujian dilakukan menggunakan dua jari yang berbeda, yaitu Jari 1, dan

Jari 2 pada lima latar, latar putih, latar hijau, latar merah, latar biru, dan latar

hitam. Pengujian dilakukan untuk rentang jangkauan pantau 5 – 125 cm dengan

selang jarak setiap 20 cm dan dilakukan lima kali percobaan pada tiap selang

jarak. Dari data pengamatan, didapat bahwa Jari 1 memiliki rentang jarak

operasional 45-65 cm pada latar hitam dengan persen keberhasilan rata-rata 90%

dan Jari 2 memiliki rentang jarak operasional 25-45cm pada latar hitam dengan

persen keberhasilan rata-rata 90%.

(2)

ii

Finger Position Detection via Web Cam as Mouse Cursor Operator Application

Enrico/ 0622024

Ema

Department of Electrical Engineering, Faculty of Engineering, Maranatha

Christian University

Jln. Prof. drg. Suria Sumantri, MPH 65, Bandung 40164, Indonesia

ABSTRACT

At 21’st century in this globalization era the use of technology and

computer is becoming more significant in many part of human life such as medic,

industry, entertainment, security, social. The use of computer as personal tools is

also one of them, and it is widely known as Personal Computer.

In this Final Project an application program to detect pointer finger

position as a cursor mouse controller was created, position of the pointer finger

half closed to operate the left click and pointer finger closed to operate the right

click, within specific range of observation from the lens of web camera.

The program has been designed with color segmentation and shape

identification method, to distinguish colors of the finger with others.

Observation was done using two different fingers which is, Jari 1 and Jari

2 using five backgrounds, white, green, red, blue, and black background.

Observation is done within range of observation 5 – 125 cm with estimation range

20 cm for each observation and is done five times for each range of observation.

From the observation data, Jari 1 has range of operation at 45-65 cm using black

background with percentage rate of success 90% and Jari 2 has range of operation

5-45cm using black background with percentage rate of success 90% for Jari 2.

(3)

iii

DAFTAR ISI

ABSTRAK... i

ABSTRACT…... ii

KATA PENGANTAR…... iii

DAFTAR ISI…... v

DAFTAR TABEL…...…….. ix

DAFTAR GAMBAR…...……. x

BAB I PENDAHULUAN 1.1 Latar Belakang ... 1

1.2 Perumusan Masalah... 2

1.3 Tujuan…...…. 2

1.4 Pembatasan Masalah…...…... 2

1.5 Sistematika Penulisan... 3

BAB II LANDASAN TEORI 2.1 Pengertian Citra…...….…... 4

2.2 Pengolahan Citra Digital ...…... 6

2.3 Teori Warna ………...…... 8

2.3.1 Dasar-dasar model warna YcbCr………. 9

2.3.2 Teori warna kulit ………. 10

2.4 Mouse…………...……. 12

2.5 Kamera Web... 15

2.6 Visual Basic 6.0 Untuk Representasi Citra Digital……..……. 16

2.7 Dynamic Link Library………...……… 18

2.7.1 Avicap32.dll... 19

2.7.2 Kernel32.dll………...……….... 20

2.7.3 User32.dll………...………... 21

(4)

iv

2.7.3.2 Fungsi SetCursorPos……….. 22

2.7.3.3 Fungsi SetWindowPos.……….. 22

2.7.3.4 Fungsi GetSystemMetrics……….. 25

2.7.3.4 Fungsi mouse_event.……….. 26

BAB III PERANCANGAN DAN REALISASI 3.1 Jari yang digunakan... 28

3.2 Kamera Web yang Digunakan... 29

3.3 Perancangan GUI (Graphical User Interface)... 30

3.4 Segmentasi Warna... 32

3.5 Pergerakan Kursor Mouse...………... 36

3.6 Klik Mouse... 37

BAB IV DATA PENGAMATAN DAN ANALISIS DATA 4.1 Pengujian Program Aplikasi ... 40

4.1.1 Pengujian Program Aplikasi dengan Jari 1... 41

4.1.1.1 Pengujian Program Aplikasi dengan Jari 1 pada Latar I ………... 42

4.1.1.2 Pengujian Program Aplikasi dengan Jari 1 pada Latar II ………... 42

4.1.1.3 Pengujian Program Aplikasi dengan Jari 1 pada Latar III ………... 43

4.1.1.4 Pengujian Program Aplikasi dengan Jari 1 pada Latar IV ………... 44

4.1.1.4 Pengujian Program Aplikasi dengan Jari 1 pada Latar V ………... 45

4.1.2 Pengujian Program Aplikasi dengan Jari 2... 46

4.1.2.1 Pengujian Program Aplikasi dengan Jari 2 pada Latar I ………... 47

4.1.2.2 Pengujian Program Aplikasi dengan Jari 2 pada Latar II ………... 48

(5)

v

4.1.2.4 Pengujian Program Aplikasi dengan Jari 2 pada

Latar IV ………... 49

4.1.2.4 Pengujian Program Aplikasi dengan Jari 2 pada

Latar V ………... 50

4.2 Data Pengamatan...………. 51

4.3 Analisis Data………....……….. 54

BAB V KESIMPULAN DAN SARAN

5.1 Kesimpulan... 56

5.2 Saran…...…… 57

(6)

vi LAMPIRAN A LISTING PROGRAM

LAMPIRAN B PARAMETER FUNGSI GETSYSTEMMETRICS

LAMPIRAN C HASIL PENGAMATAN JARI 1 dan Jari 2 DENGAN LATAR

(7)

vii

DAFTAR TABEL

Tabel 2.1 Format Bit Konektor PS/2... 15

Tabel 2.2 Tabel Fungsi pada Parameter hWndInsertAfter... 23

Tabel 2.3 Tabel Fungsi pada Parameter uFlags... 24

Tabel 2.4 Tabel Fungsi mouse_event... 26

Tabel 3.1 Komponen dan Properti yang Digunakan dalam Program Aplikasi... 31

Tabel 3.2 Rentang Warna Kulit Jari yang Digunakan pada bidang YCrCb 33 Tabel 4.1 Hasil Pengujian Program Aplikasi dengan Jari 1……….. 52

Tabel 4.2 Hasil Pengujian Program Aplikasi dengan Jari 2……….. 53

Tabel 4.3 Tabel Jarak Operasional Terbaik Jari terhadap Kamera Web… 54

(8)

viii

DAFTAR GAMBAR

Gambar 2.1 Citra Digital... 5

Gambar 2.2 Contoh Campuran Warna dalam Bidang Warna RGB..…… 9

Gambar 2.3 Gambar Asli dan Hasil Dekomposisi Menggunakan Bidang YCbCr ……… 10

Gambar 2.4 Berbagai Macam Warna Kulit Manusia... 11

Gambar 2.5 Rangkaian Elektronik Mouse Mekanik.………. 12

Gambar 2.6 Bagian-Bagian Mouse……… 13

Gambar 2.7 Operasi pada Mouse mekanik……… 14

Gambar 2.8 Konektor PS/2……… 15

Gambar 2.9 Bagian dalam Sebuah Kamera Web……… 16

Gambar 2.10 IDE Visual Basic …………...……… 17

Gambar 3.1.a Diagram Blok Sistem...……… 27

Gambar 3.1.b Diagram Alir Keseluruhan...……… 27

Gambar 3.2 Gambar Jari yang Digunakan(posisi normal) ……… 28

Gambar 3.3 Gambar Bentuk Jari yang Digunakan dalam Pengujian……. 29

Gambar 3.4 Kamera Web yang Digunakan………...….... 30

Gambar 3.5 Perancangan GUI………... 30

Gambar 3.6 Diagram Alir Proses Segmentasi Warna... 33

Gambar 3.7 Jari 1 yang Sudah Terdeteksi oleh Program Aplikasi……… 36

Gambar 3.8 Diagram Alir Pergerakan Mouse... 37

Gambar 3.9 Diagram Alir Klik Mouse... 39

Gambar 4.1 Pergerakan Kursor Mouse... 40

Gambar 4.2 Macam-Macam Latar yang Digunakan... 41

Gambar 4.3 Jari 1………... 41

Gambar 4.4 Pengujian Program Aplikasi dengan Jari 1 pada Latar I…… 42

Gambar 4.5 Pengujian Program Aplikasi dengan Jari 1 pada Latar II…… 43

(9)

ix

Gambar 4.7 Pengujian Program Aplikasi dengan Jari 1 pada Latar IV… 45

Gambar 4.8 Pengujian Program Aplikasi dengan Jari 1 pada Latar V…… 46

Gambar 4.9 Jari 2……… 46

Gambar 4.10 Pengujian Program Aplikasi dengan Jari 2 pada Latar I... 47

Gambar 4.11 Pengujian Program Aplikasi dengan Jari 2 pada Latar II... 48

Gambar 4.12 Pengujian Program Aplikasi dengan Jari 2 pada Latar III... 49

Gambar 4.13 Pengujian Program Aplikasi dengan Jari 2 pada Latar IV... 50

(10)

LAMPIRAN A

(11)

A-1

1. Listing Program Utama

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hwndParent As Long, ByVal nID As Long) As Long Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private mCapHwnd As Long Private Const CONNECT As Long = 1034

Private Const DISCONNECT As Long = 1035

Private Const GET_FRAME As Long = 1084

Private Const COPY As Long = 1054

Dim i As Integer, j As Integer, awal As Integer Dim a As Long

Dim b As Long Dim zz As Integer

Dim v As Double, tinggi As Double, lebar As Double

Dim inten As Integer Dim Tppx As Single, Tppy As Single

Dim i1 As Integer, i2 As Integer, i3 As Integer, i4 As Integer

Dim j1 As Integer, j2 As Integer, j3 As Integer, j4 As Integer

Dim Ra As Integer, Ga As Integer, Ba As Integer, Cba As Integer, Cra As Integer

Dim Rb As Integer, Gb As Integer, Bb As Integer,

Cbb As Integer, Crb As Integer

Dim c As Long

Dim D1 As Integer, D2 As Integer, D3 As Integer, D4 As Integer, E As Integer, F As Integer Dim X As Long, Y As Long (ByVal m As Long, ByVal n As Long) As Long

Private m_Mouse As CMouseEvent

(12)

A-2

Long, ByVal wFlags As Long) As Long

Private Const

HWND_TOPMOST = -1 'bring to top and stay there Private Const

HWND_NOTOPMOST = -2 'put the window into a normal position

Private Const SWP_NOMOVE = &H2 'don't move window Private Const SWP_NOSIZE = &H1 'don't size window Private Declare Function GetForegroundWindow Lib "user32" () As Long Private Sub Form_Load() 'satuan dalam gambar adalah twips

Picture1.Width = 320 * Screen.TwipsPerPixelX Picture1.Height = 240 * Screen.TwipsPerPixelY

Set m_Mouse = New CMouseEvent

(13)

A-3

Picture1.Point((i + 1) * inten * Tppx, j * inten * i1 sebagai titik awal x

jari dan nilai j1 sebagai titik awal y jari

(14)

A-4 ke i3,i4 ,j3,dan j4

If i1 > 0 Then

m_Mouse.MoveTo 1024 - (X * 3.2), Y * 3.2

(15)

A-5

Format(Time - wkta, "ss") If tinggi / v < 0.6

Format(Time - wkta, "ss") While Val(zz) < 1

zz =

Format(Time - wkta, "ss") Wend

Format(Time - wkta, "ss") While Val(zz) < 1

zz =

Format(Time - wkta, "ss") Wend ebcamCapture", 0, 0, 0, 320, 240, Me.hWnd, 0) DoEvents

'If the window on top is not this window...

If Me.hWnd <>

GetForegroundWindow Then 'Make this form be on top Call

(16)

A-6

'Make the window on top below this form

Call SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE) End If

End Sub

2. Listing Program Class

Module

Option Explicit

Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long

Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dX As Long, ByVal dY As Long, ByVal dwData As Long, ByVal dwExtraInfo As Long)

Private Declare Sub Sleep Lib "kernel32" (ByVal

dwMilliseconds As Long)

' Flags used with mouse_event

Private Const

Private Const SM_CXSCREEN = 0 Private Const SM_CYSCREEN = 1

' A few module level variables...

Private m_ScreenWidth As Long Private m_ScreenHeight As Long Private m_ClickDelay As Long

' Virtual scaling applied to screen...

Private Const m_Scale As Long = &HFFFF&

Private Sub Class_Initialize()

' Store screen dimensions in pixels

m_ScreenWidth =

GetSystemMetrics(SM_CXSCREEN) m_ScreenHeight =

GetSystemMetrics(SM_CYSCREEN)

' Default duration for mousedown

If NewVal >= 0 Then m_ClickDelay = NewVal

(17)

A-7

' Release mouse button at current screen location.

' Click the mouse, with delay to simulate human timing.

Call

' Click the mouse, with delay to simulate human timing.

Call

Public Sub MoveTo(ByVal X As Long, ByVal Y As Long, Optional ByVal Absolute As Boolean = True)

Dim meFlags As Long If Absolute Then

' Map into same coordinate space used by mouse_event.

X = (X / m_ScreenWidth) * m_Scale

Y = (Y / m_ScreenHeight) * m_Scale

' Set flags for relative movement

meFlags = MOUSEEVENTF_MOVE

End If

' Move the cursor to destination.

Call mouse_event(meFlags, X, Y, 0, 0)

(18)

LAMPIRAN B

(19)

B-1

Value Description

SM_ARRANGE Flags specifying how the system arranged minimized windows. For more information about

minimized windows, see the following Remarks section.

SM_CLEANBOOT Value that specifies how the system was started, as shown in the following table.

0 Normal boot

1 Fail-safe boot

2 Fail-safe with network boot

Fail-safe boot (also called SafeBoot) bypasses the user’sstartup files.

SM_CMONITORS Windows NT 5.0 and later; Windows 98 and later: Number of display monitors on the desktop.

SM_CMOUSEBUTTONS Number of buttons on mouse, or zero if no mouse is installed.

SM_CXBORDER, SM_CYBORDER Width and height, in pixels, of a window border. This is equivalent to the SM_CXEDGE value for

windows with the 3-D look.

SM_CXCURSOR, SM_CYCURSOR Width and height, in pixels, of a cursor. The system cannot create cursors of other sizes.

SM_CXDLGFRAME, SM_CYDLGFRAME Same as SM_CXFIXEDFRAME and SM_CYFIXEDFRAME.

SM_CXDOUBLECLK, SM_CYDOUBLECLK Width and height, in pixels, of the rectangle around the location of a first click in a double-click

sequence. The second click must occur within this rectangle for the system to consider the two

clicks a double-click. (The two clicks must also occur within a specified time.)

SM_CXDRAG, SM_CYDRAG Width and height, in pixels, of a rectangle centered on a drag point to allow for limited movement

of the mouse pointer before a drag operation begins. This allows the user to click and release the

(20)

B-2

SM_CXEDGE, SM_CYEDGE Dimensions, in pixels, of a 3-D border. These are the 3-D counterparts of SM_CXBORDER and

SM_CYBORDER.

SM_CXFIXEDFRAME, SM_CYFIXEDFRAME Thickness, in pixels, of the frame around the perimeter of a window that has a caption but is not

sizable. SM_CXFIXEDFRAME is the width of the horizontal border and SM_CYFIXEDFRAME

is the height of the vertical border.

Same as SM_CXDLGFRAME and SM_CYDLGFRAME.

SM_CXFRAME, SM_CYFRAME Same as SM_CXSIZEFRAME and SM_CYSIZEFRAME.

SM_CXFULLSCREEN, SM_CYFULLSCREEN Width and height of the client area for a full-screen window on the primary display monitor. To get

the coordinates of the portion of the screen not obscured by the system taskbar or by application

desktop toolbars, call theSystemParametersInfofunction with the SPI_GETWORKAREA value.

SM_CXHSCROLL, SM_CYHSCROLL Width, in pixels, of the arrow bitmap on a horizontal scroll bar; and height, in pixels, of a horizontal

scroll bar.

SM_CXHTHUMB Width, in pixels, of the thumb box in a horizontal scroll bar.

SM_CXICON, SM_CYICON The default width and height, in pixels, of an icon. TheLoadIconfunction can load only icons of these dimensions.

SM_CXICONSPACING, SM_CYICONSPACING Dimensions, in pixels, of a grid cell for items in large icon view. Each item fits into a rectangle of

this size when arranged. These values are always greater than or equal to SM_CXICON and

SM_CYICON.

SM_CXMAXIMIZED, SM_CYMAXIMIZED Default dimensions, in pixels, of a maximized top-level window on the primary display monitor.

SM_CXMAXTRACK, SM_CYMAXTRACK Default maximum dimensions, in pixels, of a window that has a caption and sizing borders. This

(21)

B-3 these dimensions.

SM_CXMENUCHECK, SM_CYMENUCHECK Dimensions, in pixels, of the default menu check-mark bitmap.

SM_CXMENUSIZE, SM_CYMENUSIZE Dimensions, in pixels, of menu bar buttons, such as the child window close button used in the

multiple document interface.

SM_CXMIN, SM_CYMIN Minimum width and height, in pixels, of a window.

SM_CXMINIMIZED, SM_CYMINIMIZED Dimensions, in pixels, of a normal minimized window.

SM_CXMINSPACING, SM_CYMINSPACING Dimensions, in pixels, of a grid cell for minimized windows. Each minimized window fits into a

rectangle this size when arranged. These values are always greater than or equal to

SM_CXMINIMIZED and SM_CYMINIMIZED.

SM_CXMINTRACK, SM_CYMINTRACK Minimum tracking width and height, in pixels, of a window. The user cannot drag the window

frame to a size smaller than these dimensions.

SM_CXSCREEN, SM_CYSCREEN Width and height, in pixels, of the screen of the primary display monitor. These are the same values

you obtain by callingGetDeviceCaps(hdcPrimaryMonitor, HORZRES/VERTRES).

SM_CXSIZE, SM_CYSIZE Width and height, in pixels, of a button in a window's caption or title bar.

SM_CXSIZEFRAME, SM_CYSIZEFRAME Thickness, in pixels, of the sizing border around the perimeter of a window that can be resized.

SM_CXSIZEFRAME is the width of the horizontal border, and SM_CYSIZEFRAME is the height

of the vertical border.

Same as SM_CXFRAME and SM_CYFRAME.

SM_CXSMICON, SM_CYSMICON Recommended dimensions, in pixels, of a small icon. Small icons typically appear in window

(22)

B-4

SM_CXSMSIZE, SM_CYSMSIZE Dimensions, in pixels, of small caption buttons.

SM_CXVIRTUALSCREEN,

SM_CYVIRTUALSCREEN

Windows NT 5.0 and later; Windows 98 and later: Width and height, in pixels, of the virtual

screen. The virtual screen is the bounding rectangle of all display monitors. The

SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN metrics are the coordinates of the top left

corner of the virtual screen.

SM_CXVSCROLL, SM_CYVSCROLL Width, in pixels, of a vertical scroll bar; and height, in pixels, of the arrow bitmap on a vertical

scroll bar.

SM_CYCAPTION Height, in pixels, of a normal caption area.

SM_CYKANJIWINDOW For double-byte character set versions of the system, this is the height, in pixels, of the Kanji

window at the bottom of the screen.

SM_CYMENU Height, in pixels, of a single-line menu bar.

SM_CYSMCAPTION Height, in pixels, of a small caption.

SM_CYVTHUMB Height, in pixels, of the thumb box in a vertical scroll bar.

SM_DBCSENABLED TRUE or nonzero if the double-byte character set (DBCS) version of USER.EXE is installed;

FALSE or zero otherwise.

SM_DEBUG TRUE or nonzero if the debugging version of USER.EXE is installed; FALSE or zero otherwise.

SM_MENUDROPALIGNMENT TRUE or nonzero if drop-down menus are right-aligned with the corresponding menu-bar item;

FALSE or zero if the menus are left-aligned.

SM_MIDEASTENABLED TRUE if the system is enabled for Hebrew and Arabic languages.

(23)

B-5

SM_MOUSEWHEELPRESENT Windows NT 4.0 and later, Windows 98: TRUE or nonzero if a mouse with a wheel is installed;

FALSE or zero otherwise.

SM_NETWORK The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are

reserved for future use.

SM_PENWINDOWS TRUE or nonzero if the Microsoft Windows for Pen computing extensions are installed; FALSE or

zero otherwise.

SM_SECURE TRUE if security is present; FALSE otherwise.

SM_SAMEDISPLAYFORMAT Windows NT 5.0 and later; Windows 98 and later: TRUE if all the display monitors have the

same color format, FALSE otherwise. Note that two displays can have the same bit depth, but

different color formats. For example, the red, green, and blue pixels can be encoded with different

numbers of bits, or those bits can be located in different places in a pixel’s color value.

SM_SHOWSOUNDS TRUE or nonzero if the user requires an application to present information visually in situations

where it would otherwise present the information only in audible form; FALSE, or zero, otherwise.

SM_SLOWMACHINE TRUE if the computer has a low-end (slow) processor; FALSE otherwise.

SM_SWAPBUTTON TRUE or nonzero if the meanings of the left and right mouse buttons are swapped; FALSE or zero

otherwise.

SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN Windows NT 5.0 and later; Windows 98 and later: Coordinates for the left side and the top of

the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The

SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN metrics are the width and height of the

(24)

LAMPIRAN C

HASIL PENGAMATAN JARI 1 dan Jari 2 DENGAN

(25)

C-2

Rentang Batas Cb adalah 76-120, Rentang batas Cr adalah 130-200 Hasil Pengamatan Jari 1 dengan Latar II

Red Green Blue NomorData Y Cb Cr

Batas Cb dan

Cr 178.000000 172.000000 174.000000 1 174.022000 127.987584 130.837376

180.000000 166.000000 157.000000 2 169.160000 121.137696 135.731808 174.000000 160.000000 161.000000 3 164.300000 126.137696 134.918688 179.000000 180.000000 164.000000 4 177.877000 120.168736 128.800992 195.000000 185.000000 183.000000 5 187.762000 125.312640 133.162624 199.000000 194.000000 175.000000 6 193.329000 117.656320 132.044928 205.000000 197.000000 174.000000 7 196.770000 115.150112 133.870176 172.000000 166.000000 168.000000 8 168.022000 127.987584 130.837376 192.000000 182.000000 184.000000 9 185.218000 127.312640 132.837376 162.000000 162.000000 50.000000 10 149.232000 72.000000 137.106944 181.000000 182.000000 176.000000 11 181.017000 125.168736 127.987872 201.000000 205.000000 204.000000 12 203.690000 128.174944 126.081312 181.000000 181.000000 181.000000 13 181.000000 128.000000 128.000000 165.000000 164.000000 162.000000 14 164.071000 126.831264 128.662624 174.000000 160.000000 161.000000 15 164.300000 126.137696 134.918688

Hasil Pengamatan Jari 1 Dengan Latar III

Red Green Blue NomorData Y Cb Cr

Batas Cb dan

Cr 55.000000 73.000000 59.000000 1 66.022000 124.037248 120.138368

(26)

C-3

Hasil Pengamatan Jari 1 Dengan Latar IV

Red Green Blue NomorData Y Cb Cr

Batas Cb dan

Cr 102.000000 86.000000 87.000000 1 90.898000 125.800224 135.918688

20.000000 43.000000 14.000000 2 32.817000 117.380928 118.858048 15.000000 38.000000 20.000000 3 29.071000 122.880928 117.963616 10.000000 23.000000 31.000000 4 20.025000 134.193568 120.849504 50.000000 51.000000 37.000000 5 49.105000 121.168736 128.638368 60.000000 46.000000 46.000000 6 50.186000 125.637696 135.000000 25.000000 46.000000 41.000000 7 39.151000 129.043456 117.906560 28.000000 52.000000 28.000000 8 42.088000 120.049664 117.951488 56.000000 75.000000 71.000000 9 68.863000 129.205984 118.825248 69.000000 79.000000 70.000000 10 74.984000 125.187360 123.731808 37.000000 63.000000 52.000000 11 53.972000 126.887136 115.894432 46.000000 58.000000 56.000000 12 54.184000 129.024832 122.162624 51.000000 57.000000 31.000000 13 52.242000 116.012416 127.114112 63.000000 58.000000 65.000000 14 60.293000 130.656320 129.930816 57.000000 48.000000 49.000000 15 50.805000 126.981376 132.418688

Hasil Pengamatan Jari 2 dengan Latar II

Red Green Blue NomorData Y Cb Cr

Batas Cb dan

Cr 130.000000 110.000000 97.000000 1 114.498000 118.125280 139.057056

(27)

C-4

Hasil Pengamatan Jari 2 Dengan Latar III

Red Green Blue NomorData Y Cb Cr

Batas Cb dan

Cr 119.000000 134.000000 139.000000 1 130.085000 133.031040 120.093440

72.000000 86.000000 87.000000 2 81.928000 130.862304 120.918688 104.000000 118.000000 119.000000 3 113.928000 130.862304 120.918688 152.000000 160.000000 162.000000 4 157.836000 130.349888 123.837376 164.000000 174.000000 165.000000 5 169.984000 125.187360 123.731808 142.000000 162.000000 161.000000 6 155.906000 130.874720 118.081312 151.000000 161.000000 160.000000 7 157.896000 129.187360 123.081312 78.000000 96.000000 100.000000 8 91.074000 133.037248 118.674752 75.000000 82.000000 88.000000 9 80.591000 132.181152 124.012128 60.000000 81.000000 82.000000 10 74.835000 132.043456 117.418688 81.000000 76.000000 106.000000 11 80.915000 142.156320 128.060640 109.000000 122.000000 128.000000 12 118.797000 133.193568 121.012128 181.000000 186.000000 179.000000 13 183.707000 125.343680 126.069184 97.000000 113.000000 126.000000 14 109.698000 137.199776 118.942944 71.000000 85.000000 88.000000 15 81.156000 131.862304 120.756064

Hasil Pengamatan Jari 2 Dengan Latar IV

Red Green Blue NomorData Y Cb Cr

Batas Cb dan

Cr 33.000000 61.000000 64.000000 1 52.970000 134.224608 113.756064

26.000000 57.000000 42.000000 2 46.021000 125.730816 113.719680 5.000000 56.000000 47.000000 3 39.725000 132.105536 103.231808 12.000000 55.000000 62.000000 4 42.941000 138.755648 105.930816 21.000000 56.000000 60.000000 5 45.991000 135.905760 110.174752 18.000000 47.000000 51.000000 6 38.785000 134.893344 113.174752 5.000000 53.000000 37.000000 7 36.824000 128.099328 105.300992 13.000000 52.000000 51.000000 8 40.225000 134.080704 108.581312 28.000000 55.000000 46.000000 9 45.901000 128.055872 115.231808 15.000000 58.000000 48.000000 10 44.003000 130.255648 107.313120 10.000000 40.000000 42.000000 11 31.258000 134.062080 112.837376 22.000000 48.000000 73.000000 12 43.076000 144.887136 112.967200 14.000000 56.000000 46.000000 13 42.302000 130.086912 107.813120 21.000000 63.000000 62.000000 14 50.328000 134.586912 107.081312 33.000000 61.000000 64.000000 15 52.970000 134.224608 113.756064

(28)

1 Universitas Kristen Maranatha

BAB I

PENDAHULUAN

Bab ini berisi latar belakang masalah, identifikasi masalah, tujuan, pembatasan masalah dan sistematika penulisan.

1.1 Latar Belakang

Pada era globalisasi di abad 21 penggunaan teknologi dan komputer semakin signifikan di berbagai bidang kehidupan seperti bidang medis, industri, hiburan, keamanan, sosial. Penggunaan komputer sebagai sarana pribadi termasuk salah satunya yakni Personal Computer.

Penghubung/periferal antara user dengan perangkat adalah bagian yang sangat penting dalam penggunaan Personal Computer. Salah satu alat yang dipergunakan untuk menghubungkan kedua hal tersebut adalah mouse. Mouse digunakan sebagai pengendali kursor yang dibutuhkan untuk memberikan perintah pada PC. Penggunaan alat ini dalam berbagai kebutuhan pun semakin beragam misal penggunaan mouse yang dapat dikendalikan dengan alat tertentu maupun dikendalikan dari jarak jauh dalam penerapannya di berbagai bidang misalnya gaming, bisnis.

Webcam (kamera web),salah satu terobosan teknologi di bidang optikal,

dapat dimanfaatkan sebagai sensor penglihatan bagi komputer,yang kemudian dapat digunakan untuk menggerakkan kursor mouse, karena bisa menangkap objek di depan lensa sebagai suatu citra. Dengan suatu program tertentu, citra tersebut kemudian dapat diolah dengan memanfaatkan teknologi pengolahan citra dijital sehingga kemudian dapat digunakan sebagai pengendali pergerakkan kursor mouse, bahkan untuk mengoperasikan mouse secara penuh.

(29)

BAB I PENDAHULUAN 2

Universitas Kristen Maranatha sebagai perintah klik kiri dan jari telunjuk tertutup untuk pengoperasian klik kanan dengan jangkauan pemantauan pada batas jarak tertentu.

1.2 Identifikasi Masalah

Bagaimana membuat program aplikasi pendeteksian posisi jari melalui kamera web sebagai operator kursor mouse?

1.3 Tujuan

Membuat program aplikasi pendeteksi posisi jari melalui kamera web sebagai operator kursor mouse.

1.4 Pembatasan Masalah

Dalam Tugas Akhir ini, pembatasan dibatasi sampai hal-hal berikut yaitu : 1. Pendeteksian berdasarkan posisi bentuk jari telunjuk dan warna kulit jari. 2. Bentuk jari dideteksi berdasarkan tinggi dan lebar jari.

3. Menggunakan hanya jari telunjuk untuk mengoperasikan kursor mouse, dengan posisi setengah jari telunjuk setengah tertutup berfungsi melakukan operasi klik kiri dan jari telunjuk tertutup berfungsi melakukan operasi klik kanan.

4. Jari yang dideteksi hanya dari satu tangan saja.

5. Diasumsikan pengoperasian pergerakan mouse dengan jari tidak terlalu cepat sehingga dapat diaplikasikan secara realtime/interaktif.

6. Jarak jari dengan lensa kamera web dibatasi hingga jarak tertentu 7. Kursor hanya satu buah.

(30)

BAB I PENDAHULUAN 3

Universitas Kristen Maranatha 1.5 Sistematika Penulisan

Laporan Tugas Akhir ini disusun dengan sistematika sebagai berikut :

Bab I Pendahuluan

Bab ini berisi latar belakang masalah, identifikasi masalah, tujuan, pembatasan masalah dan sistematika penulisan.

Bab II Landasan Teori

Bab ini berisi teori dasar dari pengertian citra dan pengolahan citra digital, teori warna kulit, mouse, kamera web, application program interface, dynamic link library, serta Visual Basic 6.0 untuk representasi citra digital.

Bab III Perancangan dan Realisasi

Bab ini meliputi perancangan dan realisasi program aplikasi pendeteksian posisi jari melalui kamera web sebagai operator kursor mouse, serta cara operasi klik kanan dan kiri.

Bab IV Data Pengamatan dan Analisis Data

Bab ini berisi pengujian program aplikasi menggunakan Jari 1 dan Jari 2 pada Latar I (latar putih), Latar II (latar hijau), Latar III (latar merah muda), Latar IV (latar biru), Latar V (latar hitam) data pengamatan serta analisis dari pengujian program aplikasi yang telah dilakukan.

Bab V Kesimpulan dan Saran

(31)

56 Universitas Kristen Maranatha

BAB V

KESIMPULAN DAN SARAN

Bab ini berisi kesimpulan dari Tugas Akhir dan saran-saran yang perlu dilakukan untuk perbaikan di masa mendatang.

5.1 Kesimpulan

Berikut adalah kesimpulan dari Tugas Akhir yang telah dibuat:

• Program “Aplikasi Pendeteksian Posisi Jari Melalui Kamera Web Sebagai Operator KursorMouse” telah berhasil direalisasi.

• Jari 1 memiliki rentang jarak operasional antara 45-65 cm pada latar hitam dengan persen keberhasilan rata-rata 90%. Jari 2 memiliki rentang jarak operasional antara 25-45 cm dengan persen keberhasilan rata-rata 90% untuk Jari 2.

(32)

BAB V KESIMPULAN DAN SARAN 57

Universitas Kristen Maranatha 5.2 Saran

Saran-saran yang dapat diberikan untuk perbaikan dan pengembangan Tugas Akhir ini di masa mendatang adalah :

• Pendeteksian jari sebaiknya lebih disempurnakan lagi, misalnya dengan melakukan preprocessing-image misalnya normalisasi histogram, serta melibatkan deteksi ruas jari atau pendeteksian jari yang adaptif sehingga jari dapat dengan dideteksi dengan lebih akurat.

(33)

58 Universitas Kristen Maranatha DAFTAR PUSTAKA

1. Hestiningsih, Idhawati. 2009, Pengolahan Citra, http://images.moedy9.multiply.multiplycontent.com/attachment/0/SMuu NwoKCBkAAHPHjZk1/Pengolahan%20Citra.pdf?nmid=115281461 2. Munir, Rinaldi. 2004. Pengolahan Citra Digital dengan Pendekatan

Algoritmik. Bandung : Informatika.

3. Pearson, Don. 1991. Image Processing. Singapore : McGraw-Hill Book. 4.

http://citravision.files.wordpress.com/2008/04/deteksi-jenis-warna-kulit1.pdf

5. http://computer.howstuffworks.com/mouse.htm

6. http://en.wikipedia.org/wiki/Application_programming_interface 7. http://en.wikipedia.org/wiki/Computer_vision

8. http://en.wikipedia.org/wiki/Dynamic-link_library 9. http://en.wikipedia.org/wiki/Mouse_(computing) 10. http://en.wikipedia.org/wiki/Rec._601

11. http://en.wikipedia.org/wiki/Video_editing 12. http://id.wikipedia.org/wiki/Webcam

13. http://msdn.microsoft.com/en-us/library/default.aspx

14. www.acronymfinder.com/luminance-(Y),-chrominance-(red_yellow),-chrominance-(blue_yellow)-(YCrCb).html

15. www.scientificamerican.com/media/inline/0002E7CA-F27B-13A1-AFAA83414B7FFE9F_1.gif

16. www.scribd.com/doc/26023237/Bab-II-Teori-Dasar-2-2-1-Pengolahan 17. www.suri.it.okayama-u.ac.jp/AJAW03/bouzerdoum.pdf

Referensi

Dokumen terkait

Produk jamur memiliki keunggulan lebih dari produk sayuran lain karena kandungan gizinya yang tinggi dan harga relatif murah sehingga sangat potensial untuk memperbaiki gizi

Sementara hasil penelitian dari Natarsyah (2000) menyatakan bahwa Beta saham mempunyai pengaruh positif dan signifikan terhadap harga saham yang ditunjukkan bahwa

Analisis pencapaian kinerja Direktorat Statistik Tanaman Pangan, Hortikultura, dan Perkebunan dilakukan dengan melihat pencapaian tujuan yang telah ditetapkan yaitu

Kontrol yang penting untuk proses sumber modal dan proses investasi adalah otorisasi khusus dan pengawasan oleh manajemen puncak.. Pengawasan langsung manajemen  puncak ini

Oleh karena itu, penelitian ini bertujuan untuk menguji dan menganalisis pengaruh pengungkapan tanngung jawab sosial terhadap nilai perusahaan dengan mekanisme

buntute Anoman dadi adhem. banjur Rnomin ngJculi Brahma Astra kang naleni badane' Kanthi buntut kaya obor, nnoman ngobong kutha Alengka. Kui-ha Alengka dadi segara

Kenaikan indeks harga yang dibayar petani terjadi diakibatkan kenaikan indeks harga pada subkelompok biaya produksi dan penambahan barang modal (BPPBM) sebesar 0,81

Pemerintah menyadari bahwa pendidikan merupakan usaha strategis dalam mencerdaskan kehidupan bangsa, pendidikan diselenggarakan dengan serius dan disadari