Listing Program Perhitungan Jarak Euclidian Listing Program Pendeteksian Menggunakan Sistem Pakar

A-8 Picture4.Print y1 x1 = Picture1.ScaleWidth maksCr - minCr 0 - minCr v = Picture1.ScaleHeight maksCb - minCb maksCb - y1 Picture1.Circle x1, v, 1, RGB0, 0, 255 Picture1.CurrentX = x1 Picture1.CurrentY = v Picture1.Print y1 Next y1 End Sub Private Sub Text1_Change End Sub

2. Listing Program Perhitungan Jarak Euclidian

Dim rsb30, rsc30, rsp30 As Single Dim db, dc, dp, cr, cb As Single Dim DeucB, DeucC, DeucP As Single Dim folder, file As String Dim i As Single Dim x As Byte Private Sub Command1_Click Command1.FontBold = True CommonDialog1.ShowOpen Picture1.Picture = LoadPictureCommonDialog1.FileName Picture1.AutoRedraw = True xfile = MidCommonDialog1.FileName, 1, LenCommonDialog1.FileName - 4 + .csv If CommonDialog1.FileName Then n = 1 Bisulreferensi Open folder \Bisul\Bisulall.csv For Input As 1 For n = 1 To 30 Input 1, cr, cb rsbn = Sqrcr 2 + cb 2 Next n Close 1 A-9 Cacar referensi Open folder \Cacar\Cacarall.csv For Input As 1 For n = 1 To 30 Input 1, cr, cb rscn = Sqrcr 2 + cb 2 Next n Close 1 Panu referensi Open folder \Panu\Panuall.csv For Input As 1 For n = 1 To 30 Input 1, cr, cb rspn = Sqrcr 2 + cb 2 Next n Close 1 Open xfile For Input As 1 Input 1, cru, cbu rsu = Sqrcru 2 + cbu 2 Close 1 Hitung Deuc db = 0 dc = 0 dp = 0 For n = 1 To 30 db = db + rsbn - rsu 2 dc = dc + rscn - rsu 2 dp = dp + rspn - rsu 2 Next n DeucB = Sqrdb DeucC = Sqrdc DeucP = Sqrdp Text1.Text = DeucB Text2.Text = DeucC Text3.Text = DeucP If DeucB DeucC And DeucB DeucP Then Text4.Text = Bisul ElseIf DeucP DeucC And DeucP DeucB Then Text4.Text = Panu ElseIf DeucC DeucB And DeucC DeucP Then Text4.Text = Cacar End If End If End Sub A-10

3. Listing Program Pendeteksian Menggunakan Sistem Pakar

Private Sub Command2_Click i = ya0.Value -1 0.17 + ya1.Value -1 0 + ya2.Value -1 0.21 + _ ya3.Value -1 0 + ya4.Value -1 0.21 + ya5.Value -1 0 + _ ya6.Value -1 0.21 + ya7.Value -1 0.21 Text7.Text = i i = ya0.Value -1 0.04 + ya1.Value -1 0 + ya2.Value -1 0.04 + _ ya3.Value -1 0.15 + ya4.Value -1 0.19 + ya5.Value -1 0.19 + _ ya6.Value -1 0.19 + ya7.Value -1 0.19 Text6.Text = i i = ya0.Value -1 0 + ya1.Value -1 0.33 + ya2.Value -1 0 + _ ya3.Value -1 0.33 + ya4.Value -1 0 + ya5.Value -1 0.33 + _ ya6.Value -1 0 + ya7.Value -1 0 Text5.Text = i For x = 0 To 7 yax.Value = False tidakx.Value = False Next x If Text5.Text Text6.Text And Text5.Text Text7.Text Then Text8.Text = Panu Else If Text6.Text Text5.Text And Text6.Text Text7.Text Then Text8.Text = Cacar Else Text8.Text = Bisul End If End If Text8.FontBold = True Text8.FontSize = 12 End Sub Private Sub Form_Load folder = App.Path For x = 0 To 7 yax.Value = False tidakx.Value = False Next x End Sub LAMPIRAN B NILAI CrCb REFERENSI DAN UJI B-1

1. Nilai CrCb Citra Referensi