Rabu, 05 Oktober 2011 | By: ilin.blogspot.com

merubah versi gcc yg lebih lama

Semaleman budrek karna gcc.. sekarang akhirnya terkuak juga, hahahha...
ha ini saya terjadi saat mengerjakan TA tentang car detection. saya menggunakan VOC dataset yang juga menyertakan VOCrelease nya. yang saya gunakan adalah VOC release 4. namun kendala muncul saat saya menggunakan sabily 10.10 dimana pada sabily 10.10, gcc yang digunakan adalah gcc-4.4, sedangkan gcc terbaru yang dipakek VOCrelease adalah gcc-4.2... uprek menguprek akhirnya dapet juga solusinya...

1. download dulu VOC release nya...
2. isntall g++ (dari sources.list ubuntu 10.10)
3. install gcc-4.1
gcc-4.1 saya dapatkan dengan merubah sources.list ubuntu 10.10 ke ubuntu 9.10
4. install g++-4.1
5. buat link gcc ke gcc-4.1

ln -s -f /usr/bin/gcc-4.1 /usr/bin/gcc

6. install matlab (matlab yang saya gunakan adalah matlab 2008a)
7. arahkan direktory matlab ke direktory kerja kita
8. buka kompile.m kemudian jalankan...
9. VOCrelease sudah bisa digunakan.....
10. Alhamdulillah.......

screen suuut VOCrelease car detection

Selengkapnya...

Senin, 05 September 2011 | By: ilin.blogspot.com

merubah eth1 menjadi eth0

untuk merubah eth1 ke eth0 pada debian kta dapat merubah bagian pada udev.
1.edit bagian /etc/udev/rules.d/70-persistent-net.rules
2.edit pada bagian "eth1" pada baris belakang dengan "eth0"
3.reboot komputer.
Selengkapnya...

Selasa, 16 Agustus 2011 | By: ilin.blogspot.com

instalasi libsvm di matlab


libsvm merupakan library yang mendukung beberapa bahasa pemrograman seperti python, C#, matlab, dan beberapa bahasa pemrograman lainnya untuk mendukung mesin pembelajaran , yakni SVM (Support Vector Machines). pada pembahasan kali ini hanya ditekankan pada matlab saja. untuk instalasinya sebagai berikut.
1. Download dulu file libsvm di http://www.csie.ntu.edu.tw/~cjlin/libsvm/
2. Ektrak file libsvm
3. Buka matlab kemudian ganti direktori kerja ke direktori hasil ekstrakan file libsvm
4. Ketik perintah :
mex setup
>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y

Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010a\sys\lcc
[2] Microsoft Visual C++ 2008 SP1 in C:\Program Files\Microsoft Visual Studio 9.0

[0] None

Compiler: 2
Please verify your choices:

Compiler: Microsoft Visual C++ 2008 SP1
Location: C:\Program Files\Microsoft Visual Studio 9.0

Are these correct [y]/n? y
***************************************************************************
Warning: MEX-files generated using Microsoft Visual C++ 2008 require
that Microsoft Visual Studio 2008 run-time libraries be
available on the computer they are run on.
If you plan to redistribute your MEX-files to other MATLAB
users, be sure that they have the run-time libraries.
***************************************************************************

Trying to update options file: C:\Documents and Settings\coyocip\Application Data\MathWorks\MATLAB\R2010a\mexopts.bat
From template: C:\PROGRA~1\MATLAB\R2010a\bin\win32\mexopts\msvc90opts.bat

Done . . .

**************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9
Building with the -largeArrayDims option enables the new API.
**************************************************************************

Kemudian ketik perintah :
Make
>> make
>>
Selesai.



Selengkapnya...

instalasi libsvm di matlab


libsvm merupakan Selengkapnya...

Rabu, 27 Juli 2011 | By: ilin.blogspot.com

mengaktifkan tombol tab

- buka terminal Ubuntu atau Debian, lalu ketik command

Untuk Ubuntu => sudo gedit /etc/bash.bashrc

Untuk Debian, masuk sebagai root dulu kemudian command =>gedit /etc/bash.bashrc

- muncul konfigurasi dari /etc/bash.bashrc, kemudian cari baris berikut & hilangkan tanda pagarnya agar tab completionnya aktif. Setelah selesai lalu simpan & close.

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi

edit confignya menjadi seperti pada gambar

- silahkan logout dulu Debian/Ubuntunya, tab completion akan bekerja sempurna :D

Selengkapnya...

Senin, 27 Juni 2011 | By: ilin.blogspot.com

OPTICAL FLOW DI MATLAB

dari hasil pacaran ama source code selama seminggu ternyata membuahkan hasil juga, xixixixi...

code:

clear all
clc
hbfr = video.MultimediaFileReader('tugas.mp4');
hcr = video.ChromaResampler('Resampling', '4:2:0 (MPEG1) to 4:4:4', 'InterpolationFilter', 'Pixel replication');
hcsc1 = video.ColorSpaceConverter('Conversion', 'YCbCr to RGB');
hcsc2 = video.ColorSpaceConverter('Conversion', 'RGB to intensity');
hidtc = video.ImageDataTypeConverter('OutputDataType', 'single');

hof = video.OpticalFlow('OutputValue', 'Horizontal and vertical components in complex form', 'ReferenceFrameDelay', 3);

hmean1 = video.Mean;
hmean2 = video.Mean('RunningMean', true);
hmedianfilt = video.MedianFilter2D;
hclose = video.MorphologicalClose('Neighborhood', strel('line',5,45));
hblob = video.BlobAnalysis(...
'CentroidOutputPort', false,...
'AreaOutputPort', true, ...
'BoundingBoxOutputPort', true, ...
'OutputDataType', 'double', ...
'NumBlobsOutputPort', false, ...
'MinimumBlobAreaSource', 'Property', ...
'MinimumBlobArea', 250, ...
'MaximumBlobAreaSource', 'Property', ...
'MaximumBlobArea', 3600, ...
'FillValues', -1, ...
'MaximumCount', 80);

herode = video.MorphologicalErode('Neighborhood', strel('square',2));

hshapeins1 = video.ShapeInserter('BorderColor', 'Custom', 'CustomBorderColor', [0 1 0]);
hshapeins2 = video.ShapeInserter('Shape','Lines', 'BorderColor', 'Custom', 'CustomBorderColor', [255 255 0]);

htextins = video.TextInserter('Text', '%4d', 'Location', [0 0], 'Color', [1 1 1], 'Font', 'Arial', 'FontSize', 12);

hVideo1 = video.VideoPlayer('WindowCaption', 'Original Video');
hVideo1.WindowPosition(1) = round(0.4*hVideo1.WindowPosition(1)) ;
hVideo1.WindowPosition(2) = round(1.5*(hVideo1.WindowPosition(2))) ;
hVideo1.WindowPosition([4 3]) = [300 300];

hVideo2 = video.VideoPlayer('WindowCaption', 'Motion Vector');
hVideo2.WindowPosition(1) = hVideo1.WindowPosition(1) + 350;
hVideo2.WindowPosition(2) =round(1.5* hVideo2.WindowPosition(2));
hVideo2.WindowPosition([4 3]) = [300 300];

hVideo3 = video.VideoPlayer('WindowCaption', 'Thresholded Video');
hVideo3.WindowPosition(1) = hVideo2.WindowPosition(1) + 350;
hVideo3.WindowPosition(2) = round(1.5*(hVideo3.WindowPosition(2))) ;
hVideo3.WindowPosition([4 3]) = [300 300];

hVideo4 = video.VideoPlayer('WindowCaption', 'Results');
hVideo4.WindowPosition(1) = hVideo1.WindowPosition(1);
hVideo4.WindowPosition(2) = round(0.3*(hVideo4.WindowPosition(2))) ;
hVideo4.WindowPosition([4 3]) = [300 300];

% inisialisasi beberapa variabel digunakan untuk plot motion vektor
MotionVecGain = 20;
line_row = 22;
borderOffset = 5;
decimFactorRow = 5;
decimFactorCol = 5;
firstTime = true;


while ~isDone(hbfr)
%[y, cb, cr] = step(hbfr);

my_rgb_frame = step(hbfr); % Read input video frame
my_rgb_frame = step(hbfr); % Read input video frame
image = step(hidtc, my_rgb_frame);
I = step(hcsc2, image);
of = step(hof, I); % Estimate optical flow

y1 = of .* conj(of);
vel_th = 0.5 * step(hmean2, step(hmean1, y1));

filteredout = step(hmedianfilt, y1 >= vel_th);
th_image = step(hclose, step(herode, filteredout));
[area, bbox] = step(hblob, th_image);
Idx = bbox(1,:) > line_row;
ratio = zeros(1, length(Idx));
ratio(Idx) = single(area(1,Idx))./single(bbox(3,Idx).*bbox(4,Idx));
ratiob = ratio > 0.4;
count = int32(sum(ratiob));
bbox(:, ~ratiob) = int32(-1);

y2 = step(hshapeins1, image, bbox);
y2(22:23,:,:) = 1;
y2(1:15,1:30,:) = 0;
image_out = step(htextins, y2, count);

if firstTime
[R C] = size(of);
RV = borderOffset:decimFactorRow:(R-borderOffset);
CV = borderOffset:decimFactorCol:(C-borderOffset);
[Y X] = meshgrid(CV,RV);
firstTime = false;
end

tmp = of(RV,CV) .* MotionVecGain;
lines = [X(:)';Y(:)';X(:)' + imag(tmp(:))';Y(:)' + real(tmp(:))'];
mv_video = step(hshapeins2, image, lines);

step(hVideo1, image);
step(hVideo2, mv_video);
step(hVideo3, th_image);
step(hVideo4, image_out);
end



hasilnya running:

Selengkapnya...

Rabu, 27 April 2011 | By: ilin.blogspot.com

Cara membuat "read more.. "

Setelah sekian lama mengembara di dunia maya dan berapa kali trial and error, akhirnya saya menemukan tips yang jitu untuk membelah posting dan menampilkan pesan "Baca selengkapnya..." atau "read more..." atau sejenisnya.
Sebagai blogger pemula, saya juga ingin berbagi tips ini kepada anda :
1. Buka menu Layout kemudian pilih Edit HTML.

2. Kasih tanda cek (centang) pada cekbox "expand widget template"
3. Cari kode berikut di Template blog anda :
(caranya : tekan ctrl+F dan akan muncul menu Find, kemudian masukkan kode yang akan anda cari)



4. Kalau sudah ketemu, Ganti kode tersebut menjadi seperti ini :







Read More......

Tulisan "Read More....." itu bisa anda ubah, misalnya jadi "Baca Selengkapnya...", atau lainnya.
5. Simpan hasil pengeditan.
6. Kemudian pilih menu Setting lalu pilih Formatting
7. Pada kotak Post Template isikan kode berikut:


8. Kemudian Simpan.
9. Ketika memposting, klik EDIT HTML. Maka, secara otomatis akan tampak kode seperti berikut :


10. Letakkan abstrak posting atau artikel yang akan ditampilkan dihalama utama (sebelum tulisan "Redmore...") di atas kode ini :
">
sementara sisanya yaitu keseluruhan posting letakkan di antara kode :

dan

11. Selesai
Selamat Mencoba...
Selengkapnya...