Wednesday, July 16, 2008

Video & Image Acquisition using MATLAB

This article is a part of module I had prepare for the Shortcourse on "Machine Vision Application for Oil Palm Grading", at the Faculty of Electrical & Electronics Engineering, Universiti Malaysia Pahang, Kuantan-Pahang. I was appointed by my colleague, Mas Kamarul, as invited instructor for the topic Real Time Interfacing using MATLAB.

In the machine vision system, data acquisition is the first step which programmer should aware. You want to preview object using your camera, capture it, store the captured image in your PC? With simple way, you will get your own preview window of your webcam by following this tutorial.

Equipments:

  1. CCD camera & frame grabber or webcame
  2. PC with MATLAB 7.x
Procedures:
  1. Make sure that you have a functional CCD camera or webcam connected to your PC. Functional means it's driver has been installed in your PC. To see whether your camera can work well or not, you can install a windows standard video capture, named AMCAP.
  2. MATLAB has built-in adaptor to communicate with the acquisition device. To check whether your MATLAB has this support or not, type

>> cam=imaqhwinfo

cam =

InstalledAdaptors: {1x1 cell}
MATLABVersion: [1x12 char]
ToolboxName: [1x25 char]
ToolboxVersion: [1x12 char]

>> cam.InstalledAdaptors

ans =

'winvideo'

For more information about your device, type

>> device_info=imaqhwinfo('winvideo',1)

  1. Type the following code in your editor and run the program

vid=videoinput(‘winvideo’);

preview(vid)


  1. To capture the video, type

im=getsnapshot(vid)

imshow(im)

Check your workspace, now you have RGB image data im.

  1. To store the image data to a .jpg or .gif file, type


imwrite(im,’myimet.jpg’);


Very easy? If you face any problem or you have suggestions, do not hesitate to write in the comments area below.

Friday, July 11, 2008

Mumpung isih enom

Februari 08 lalu, aku resmi ndaftar sebagai mahasiswa PhD di sini, nggabung dengan group riset ini. Semestinya, setelah aku dapet gelar MSc di sini juga, aku harus mengabdi dulu di universitas ku di kotaku sana, sebelum melanjutkan S-3. Kebetulan aku ditawari oleh supervisorku ketika ngambil MSc, utk melanjutkan studi S-3 di bawah bimbingannya. Berkat dukungan istriku, mantan Kajurku - yg sekarang jadi Dekan, mantan Sekjur - yg sekarang jadi Kajur dan tentunya pimpinan universitasku, akhirnya aku diijinkan utk langsung melanjutkan studi. Kata orang Jawa, mumpung isih enom (baca: mumpung masih muda umurnya, sekolah masih kuat berpikir). Insyallah...

Blogger Dat Nyeng ... !

Dalam bahasa Jawa ada istilah "dat nyeng" digunakan untuk menyebut perilaku seseorang yang kadang iya..kadang enggak, kadang rajin...kadang muales... Kalo pas lagi semangat, wuih...ngadubilah...tapi kalo lagi badmood, wuekkk...satu semester ngga nyentuh babar blas... Bahasa kawan saya FPI, un-istiqomah!

Itulah aku, blogger dat nyeng...

Sebenarnya dah lama aku mulai nge-blog di blogspot ini. Abis tu lama ga update..trus buat blog baru ini. Nyeng lagi... akhirnya kembali lagi ke blog ini.

Wednesday, May 17, 2006

Cinta vs Kangen

premis A : Cinta --> kangen
premis B : Kangen --> cinta
---------------------------------
.:. Cinta <--> kangen

Friday, November 25, 2005

Bila Aku Jatuh Cinta

Allahu Rabbi aku minta izin
Bila suatu saat aku jatuh cinta
Jangan biarkan cinta untuk-Mu berkurang
Hingga membuat lalai akan adanya Engkau

Allahu Rabbi
Aku punya pinta
Bila suatu saat aku jatuh cinta
Penuhilah hatiku dengan bilangan cinta-Mu yang tak terbatas
Biar rasaku pada-Mu tetap utuh

Allahu Rabbi
Izinkanlah bila suatu saat aku jatuh cinta
Pilihkan untukku seseorang yang hatinya penuh dengan kasih-Mu
dan membuatku semakin mengagumi-Mu

Allahu Rabbi
Bila suatu saat aku jatuh hati
Pertemukanlah kami
Berilah kami kesempatan untuk lebih mendekati cinta-Mu

Allahu Rabbi
Pintaku terakhir adalah seandainya kujatuh hati
Jangan pernah Kau palingkan wajah-Mu dariku
Anugerahkanlah aku cinta-Mu...
Cinta yang tak pernah pupus oleh waktu

Amiin.

(Abu Aufa)
dari
http://muslimdelft.nl/