You are on page 1of 71

This is a "feed" of frequently changing content on this site.

You can subscribe to this feed to receive updates when this content changes.

Industrial Machine Vision, Robotics and Automation Systems Tutorial and insights on Machine Vision, Robotics, Automation Systems, Control Systems, Digital Signal Processing, Instrumentation, 3D Graphics, Image Processing Embedded Systems and Realtime Systems

Combining Intel OpenCV and NI LabviewSunday, October 24, 2010 6:54 AM1 Introduction

NI Labview is a powerful software for instrumentation and data acquisition. It also has complete library for Vision and Image processing (Vision Development Module).

Intel OpenCV is an open source C/C++ based Computer Vision and Image processing library developed by Intel. Despite its simplicity, NI Vision Development Module lacks of flexibility and expandability of Intel OpenCV, For example if we want to modify complex image processing algorithm, it is easier to use OpenCV. Due to its open source nature, OpenCV also has more advanced and up to date vision algorithms. Below is the set of application areas of the OpenCV :

2D and 3D feature toolkits

Egomotion estimation

Facial recognition system

Gesture recognition

Human-Computer Interface (HCI)

Mobile robotics

Motion understanding

Object Identification

Segmentation and Recognition

Stereopsis Stereo vision: depth perception from 2 cameras

Structure from motion (SFM)

Motion tracking

In addition, OpenCV also has the following statistical machine learning libraries :

Boosting

Decision tree learning

Expectation-maximization algorithm

k-nearest neighbor algorithm

Naive Bayes classifier

Artificial neural networks

Random forest

Support vector machine (SVM)

The main power of OpenCV other than its completeness is its speed. Compared to other image processing library such as Mathworks Matlab Image Processing tool box, OpenCV which is based on C/C++ is faster.

In this tutorial, a method to combine Intel OpenCV and NI Labview using Dynamic Link Library is presented. The interfacing between Intel OpenCV and Labview is not a trivial task because it involves a few tricks on pointers and memory management.

The objective is to be able to use any OpenCV library in any Labview project hence we will have the power of both.

This tutorial will be divided into two series, first method using IMAQ array handle, and the second using Array data pointer, the second method is more complex but more general, in this series, only the first method is covered.

Interfacing Intel OpenCV and NI Labview with Dynamic Link Library

Dynamic Link Library (DLL) is a file of code, containing functions that can be called from other executable code. (Either an application or another DLL). DLL is a file which does a particular job and allows other program to use it to do that particular job as well. Microsoft Windows systems use DLL, for example comctl32.dll which does all the user interface jobs so other programs do not have to create their own interface.

2.1

Anatomy of DLL

Dynamic linking is mechanism that links applications to libraries at run time. The libraries remain in their own files and are not copied into executable files of the applications. DLL link to an application when the application is run, rather then when it is created. DLLs may contain links to other DLLs.

Below is the the basic structure of a DLL for Microsoft Visual C++ environment:

//==============================================================================

// DLL main entry-point functions

#include <windows.h>

BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved ) // Reserved

switch ( ul_reason_for_call )

case DLL_PROCESS_ATTACH:

// A process is loading the DLL.

break;

case DLL_THREAD_ATTACH:

// A process is creating a new thread.

break;

case DLL_THREAD_DETACH:

// A thread exits normally.

break;

case DLL_PROCESS_DETACH:

// A process unloads the DLL.

break;

return TRUE;

In Win32 the DllMain function is the main DLL entry point.

The DllMain function is called when a DLL is loaded or unloaded. The DllMain function is also called when a new thread is being created in a process already attached to the DLL; or when a thread has exited cleanly.

A DLL also contains functions that perform the activities the DLL expects to accomplish. Additionally the EXPORTS section header file (definition files) must be used to export these functions. For example :

__declspec(dllexport) float bcv_calculate(IMAQ_Image *ImageSrc);

2.2

Example Writing a DLL with Visual C++ (v6.0, .Net 2003)

Here the DLL that communicates between Intel OpenCV and Labview is written. The OpenCV library is compiled with Microsoft Visual C++ as DLL.

To create a DLL the following four files are needed :

a C/C++ Language source file

a header file

a project file

2.2.1

C language Source File

The code on the following page is the C language source file for the DLL using OpenCV classes.

The example DLL defines two simple functions using OpenCV library using two different methods:

First Method : using IMAQ Image pointer (from Labview) which will be converted to IplImage (from OpenCV).

Calculate_BCV, calculate normalized Between Classes Variance, input:image, output:double values

Equalization_OpenCV, Perform histogram equalization on the image. input:image, output:image

Second Method : Using Char pointer which will be converted to IplImage (from OpenCV), this is more complex method and will be covered in the next series of this tutorial.

bcv_calculate_NI, calculate normalized Between Classes Variance, input:image, Line Width, Image Width, Image Height, output:double values.

Equalization_OpenCV, Perform histogram equalization on the image. input:image, Line Width, Image Width, Image Height, output:image

The key trick is by utilizing the header from National Instruments, called NIVision.h as it has class that has access to the IMAQ classes called Image *. This class has pointer to address member that can be casted to OpenCV classes using ImageInfo *.

In this example, we will create a VI that calls one of these functions.

The source code for the DLL is as follows :

First method :

#include "stdafx.h"

#include <NIVision.h>

#include <CV.h>

#include "opencv_labview.h"

#include <iostream.h>

#include <windows.h>

float bcv_calculate(IMAQ_Image *ImageSrc)

ImageInfo *src;

IplImage* imgHistogram = 0;

IplImage* gray= 0;

int maxThreshold;

CvHistogram* hist;

float alpha[256],PT[256],varMax=0,varBetween;

int height,width,step,channels,heightgray,widthgray,stepgray,channelsgray;

uchar *data;

uchar *datagray;

int numberofgreyLevel=256;

float sum,sumB;

int i,j,k,begin=0;

float wB,wF,mB,mF,mT=0,varTotal=0,bcv,mU;

int t,Threshold;

//size of the histogram -1D histogram

int bins = numberofgreyLevel;

int hsize[] = {bins};

//max and min value of the histogram

float max_value = 0, min_value = 0;

//value and normalized value

float value;

int normalized;

int totalnumberPixel;

//ranges - grayscale 0 to 256

float xranges[] = { begin, numberofgreyLevel };

float* ranges[] = { xranges };

if (!ImageSrc) return ERR_NOT_IMAGE;

src = (ImageInfo *) ImageSrc->address;

imaqGetImageSize((Image *)src, &width, &height);

gray = cvCreateImageHeader( cvSize(width, height), IPL_DEPTH_8U, 1);

gray->imageData = (char *) src->imageStart;

gray->widthStep = src->pixelsPerLine;

// get the image data

height = gray->height;

width

= gray->width;

step

= gray->widthStep;

channels = gray->nChannels;

data

= (uchar *)gray->imageData;

//planes to obtain the histogram, in this case just one

IplImage* planes[] = { gray };

//get the histogram and some info about it

hist = cvCreateHist( 1, hsize, CV_HIST_ARRAY, ranges,1);

cvCalcHist( planes, hist, 0, NULL);

cvGetMinMaxHistValue( hist, &min_value, &max_value);

//create an 8 bits single channel image to hold the histogram

//paint it white

imgHistogram = cvCreateImage(cvSize(bins, 50),8,1);

cvRectangle(imgHistogram, cvPoint(0,0), cvPoint(256,50), CV_RGB(255,255,255),-1);

// calculate total number of pixel

totalnumberPixel=0;

for(i=begin;i sum=0;

for(t=begin; t < numberofgreyLevel; t++) sum += t * cvQueryHistValue_1D( hist, t);

//calculate total variance

for(i=begin;i sumB=0;

wB=0;

wF=0;

varMax=0;

Threshold=0;

for(t=begin;t {

wB+=cvQueryHistValue_1D( hist, t);

if (wB==0) continue;

wF=(totalnumberPixel-wB);

if(wF==0)break;

sumB+=(float) (t*cvQueryHistValue_1D( hist, t));

mB=sumB/wB;

mF=(sum-sumB)/wF;

// Calculate Between Class Variance

varBetween = wB * wF * (mB - mF) * (mB - mF);

// Check if new maximum found

if (varBetween > varMax) {

varMax = varBetween;

Threshold = t; }

// calculate BCV metric

bcv=varMax/varTotal;

return bcv;

// histogram equalization

int Equalization_OpenCV (IMAQ_Image *ImageSrc, IMAQ_Image *ImageDst)

ImageInfo *src, *dst;

int width, height;

IplImage *CVImageSrc, *CVImageDst;

if (!ImageSrc) return ERR_NOT_IMAGE;

if (!ImageDst) return ERR_NOT_IMAGE;

src = (ImageInfo *) ImageSrc->address;

dst = (ImageInfo *) ImageDst->address;

imaqGetImageSize((Image *)src, &width, &height);

imaqSetImageSize((Image *)dst, width, height);

CVImageSrc = cvCreateImageHeader( cvSize(width, height), IPL_DEPTH_8U, 1);

CVImageSrc->imageData =(char *) src->imageStart;

VImageSrc->widthStep = src->pixelsPerLine;

CVImageDst = cvCreateImageHeader( cvSize(width, height), IPL_DEPTH_8U, 1);

CVImageDst->imageData =(char *) dst->imageStart;

CVImageDst->widthStep = dst->pixelsPerLine;

// Perform histogram equalization

cvEqualizeHist( CVImageSrc, CVImageDst );

return 0;

We need to to declare the function with the __declspec (dllexport) keyword in the header file, otherwise the function will be exported with the mangled name and the actual function name will be unavailable to applications that call the DLL. We also enclose the declarations of the functions to be exported in header file with extern C statement.

The header file is defined as :

//==============================================================================

//

// Title:

bcv DLL

// Purpose:

A header to bcv dll .

//

// Created by : Adhiguna Mahendra.

// Copyright: -. All Rights Reserved.

//

//==============================================================================

#ifndef __bcv_opencv_H__

#define __bcv_opencv_H__

#ifdef __cplusplus

extern "C" {

#endif

//==============================================================================

#include

//==============================================================================

// Constants

//==============================================================================

// Types

typedef struct

char *name;

Image *address;

} IMAQ_Image;

//==============================================================================

// External variables

//==============================================================================

// Global functions

// export functions

__declspec(dllexport) float bcv_calculate(IMAQ_Image *ImageSrc);

*ImageDst);

__declspec(dllexport) int Equalization_OpenCV (IMAQ_Image *ImageSrc, IMAQ_Image *ImageDst);

#ifdef __cplusplus

#endif

#endif /* ndef __bcv_opencv_H__ */

2.3

building the project

First we need to create the project, add the C and header source code then compile it into DLL.

To compile the DLL successfully, we have to make sure that the precompiled header is deactivated (Project->Settings->All Configurations->C/C++->precompiled headers).

For example we compiled the above codes with the name bcv_opencv.dll.

1.

Calling the DLL from Labview.

The DLL can now be called using Labview Call Library Function. We create a VI that calls the bcv_opencv.dll.

We set the library to the DLL we have just created. Then put the correct parameters. The input is void *ImaqImage and the output is double.

The VI is connected as follows :

Remarks and conclusion

In this tutorial, a tricky interfacing between Intel OpenCV and NI Labview is performed. In the future tutorial we will try to combine Matlab image processing library with NI Labview.

If you want the example VI files and Visual C/C++ project files, just contact me :

adhiguna.mahendra@yahoo.com

MVtec Halcon, the champion in Machine Vision softwareMonday, April 20, 2009 12:24 PM

HALCON defines the state of the art in machine vision software. It provides a comprehensive vision library and is always based on the latest and most advanced technology. Whatever your task, HALCON will solve it, fast and with highest accuracy. Vision Development Environment A professional image processing tool must be more than just a library of image processing operators.

Solving image processing tasks is just one part of a complete solution, which comprises other software components like process control or database access, and hardware components from illumination to image acquisition devices and many other mechanical components. Therefore, it is important that the image processing system is easy to use and can be integrated into the development cycle in a flexible manner.

To achieve this, HALCON takes care of all important aspects:

The software development is supported by HALCONs IDE (integrated development environment),consisting of HDevelop and HDevEngine. HDevelop is a highly interactive development tool that enables a quick development of image processing tasks. Via HDevEngine, you can directly execute HDevelop programs and procedures from your C++, C#, Visual Basic, or C application. As an alternative, HDevelop can also export programs and procedures in your programming language.

The problem-oriented documentation covers all levels from a quick access to important information up to a detailed discussion of advanced topics.

These descriptions are combined with hundreds of examples for an intuitive understanding of the solutions, which can serve as templates to shorten the development time.

Last but not least, HALCON provides open interfaces for efficient data exchange, to integrate own operators, or to access specialized hardware round off the system.

HALCON fulfills all requirements of a professional vision library:

It comprises methods for all standard and advanced types of image processing from image acquisition from many different devices up to the advanced shape-based matching.

Apart from image processing functionality, HALCON provides tools that are typically needed in the context of machine vision applications, e.g., for the communication via sockets or the serial interface, file handling, data analysis, arithmetic operations, or classification.

HALCON offers flexible ways of parallelization to exploit multi-processor or multi-core hardware to speed up an application.

The HALCON library that is used in an application will not be visible to the end user and requires only minimum resources in an installation, which makes it perfect for OEM developments.

Key Features

Leading-Edge Technologies In addition to the full set of standard machine vision methods, HALCON offers functionality that is outstanding in the field of machine vision libraries, e.g., 3D camera calibration, shape-based and componentbased matching, subpixel-precise edge and line extraction, subpixel contour processing, reconstruction via binocular stereo, arbitrary regions of interest, and much more. Apart from this, many methods that are known from other libraries are offered with a much better performance.

An example for this is the morphology, which is up to 100 times faster than in other products, and at the same time offers much more flexibility.

One Software for All Applications

Thanks to its more than 1300 operators, HALCON is at home in all areas of research, development, and production where images are processed and analyzed. Numerous customers all over the world already use HALCON to solve their machine vision tasks. Protection of Investment By choosing HALCON, you choose independence: Switch to another operating system? HALCON supports a wide range of Windows, Linux, and UNIX platforms, including x64 systems. Migrate your applications from C++ to C#? HALCON can be used within various programming languages and environments.

Your application grows and needs more computing power? Switch to a multi-processor or multi-core computer and HALCON will automatically parallelize its execution.

Last but not least, you are free to choose the image acquisition hardware that fulfills your requirements, because HALCON provides ready-to-use interfaces to a large number of image acquisition devices (analog, digital, IEEE 1394, CameraLink).

Rapid Prototyping

In many cases it is important to determine quickly if and how a problem can be solved. With HDevelop, HALCONs interactive development environment, you can rapidly develop machine vision applications.

Besides being a fully-fledged program interpreter with debug functions, HDevelop assists you actively,e.g., by suggesting operators and by automatically visualizing the result of an operation.

With the help of integrated tools you can inspect images and results and quickly find suitable parameter values that solve your vision task.

Open Architecture

HALCON offers a comprehensive vision library but does not claim to be all-encompassing. Therefore, it is based on an open architecture. Thus, you can extend HALCON by integrating your own vision functionality in form of new operators.

And if you want to use an image acquisition device that HALCON does not yet support you can use the images directly or create an image acquisition interface for it.OpenCL, the opensource parallel computing platformThursday, April 16, 2009 12:30 AM OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of CPUs, GPUs, and other processors. OpenCL includes a language (based on C99) for writing kernels (functions that execute on OpenCL devices), plus APIs that are used to define and then control the heterogeneous platform. OpenCL provides parallel programming using both task-based and data-based parallelism.

The purpose of OpenCL is analogous to that of OpenGL and OpenAL, which are open industry standards for 3D graphics and computer audio respectively. OpenCL extends the power of the GPU beyond graphics (GPGPU). OpenCL is managed by the non-profit technology consortium Khronos Group. OpenCL was initially developed by Apple Inc., which holds trademark rights, and refined into an initial proposal in collaboration with technical teams at AMD, Intel and Nvidia. Apple submitted this initial proposal to the Khronos Group. On June 16, 2008 the Khronos Compute Working Group was formed with representatives from CPU, GPU, embedded-processor, and software companies. This group worked for five months to finish the technical details of the specification for OpenCL 1.0 by November 18, 2008. This technical specification was reviewed by the Khronos members and approved for public release on December 8, 2008.

OpenCL 1.0 is scheduled to be introduced in Mac OS X v10.6 ('Snow Leopard'). According to an Apple press release:

Snow Leopard further extends support for modern hardware with Open Computing Language (OpenCL), which lets any application tap into the vast gigaflops of GPU computing power previously available only to graphics applications. OpenCL is based on the C programming language and has been proposed as an open standard.

AMD has decided to support OpenCL (and DirectX 11) instead of the now deprecated Close to Metal in its Stream framework.

RapidMind announced their adoption of OpenCL underneath their development platform, in order to support GPUs from multiple vendors with one interface. NVIDIA announced on December 9, 2008 to add full support for the OpenCL 1.0 specification to its GPU Computing Toolkit.

The OpenCL specification is under active development at Khronos - which open to any interested company to join.

The interesting thing about OpenCL for me is it's interoperability with OpenGL. Both APIs may handle the the same type of workloads and share the textures, Buffer Objects and Renderbuffers. OpenCL objects are created from OpenGL objects, for example Vertex and image data generated with OpenCL may the rendered with OpenGL, on the other hand, images rendered with OpenGL may be postprocessed with OpenCL kernels.

[ebook] Lessentiel de linformatique et de la ProgrammationSunday, December 14, 2008 4:16 AM

Ce livre est le premier en son genre dans la literature informatique francophone. Il rassemble toutes les notions essentielles connaitre sur linformatique et la programmation.

Cet ouvrage est directement issu denseignements dispenses depuis plusieurs annees par lauteur un public detudiants de premier cycle universitaire, et detudiants en formation complementaire informatique. La presentation privilegie laspect didactique fonde sur le couplage approche th?orique-

approche pratique en mettant systematiquement laccent sur les programmes implementant les mecanismes etudies.

Telecharge ici :

[ebook] Programmation systme en C sous Linux, Signaux, processus, threads, IPC et socketsSunday, December 14, 2008 4:20 AM

Tirer le meilleur parti de l'environnement Linux

La possibilit de consulter les sources du systme, de la bibliothque glibc et de la plupart des applications qui tournent sur cet environnement reprsente une richesse inestimable aussi bien pour les passionns qui dsirent intervenir sur le noyau, que pour les dveloppeurs curieux de comprendre comment fonctionnent les programmes qu'ils utilisent quotidiennement.

Nombreuses sont les entreprises qui ont compris aujourd'hui tout le parti qu'elles pouvaient tirer de cette ouverture des sources, gage de fiabilit et de prennit, sans parler de l'extraordinaire niveau de comptences disponible au sein d'une communaut de programmeurs aguerris au contact du code des meilleurs dveloppeurs OpenSource.

Un ouvrage conu pour les programmeurs Linux et Unix les plus exigeants. Sans quivalent en langue franaise, l'ouvrage de Christophe Blaess constitue une rfrence complte de la programmation systme sous Linux, y compris dans les aspects les plus avancs de la gestion des processus, des threads ou de la mmoire. Les programmeurs travaillant sous d'autres environnements Unix apprcieront tout particulirement l'attachement de l'auteur au respect des standards (C Ansi, glibc, Posix...), garant d'une bonne portabilit des applications. La deuxime dition de ce livre a t entirement actualise en fonction du noyau Linux 2.6 et des nombreuses volutions de la bibliothque C.

qui s'adresse cet ouvrage ?

* Aux programmeurs et dveloppeurs intresss par les aspects systme de la programmation sous Linux et Unix. * Aux administrateurs systme en charge de la gestion d'un parc Linux et/ou Unix. * Aux tudiants en informatique (1e et 2e cycle universitaire, coles d'ingnieurs, etc.).

Lien direct:

Industrial PhD atau Conventional PhD ?Thursday, December 04, 2008 6:07 AMBanyak pertanyaan sebagai berikut, lulusan PhD bisa nggak sih berkarir di dunia profesional dan bukannya akademia?

Jawabannya BISA. Tapi sebaiknya anda mengikuti industrial PhD dan bukannya conventional PhD.

Pada conventional PhD, anda akan menghabiskan waktu 3-5 tahun melakukan riset di lab universitas dan memang dipersiapkan untuk menjadi seorang akademisi yang handal dan diharapkan dapat mempublikasikan beberapa paper ilmiah internasional.

Pada industrial PhD, anda melakukan riset di industri berdasar project-project komersial yang sedang dikerjakan disana dibawah bimbingan engineer senior di industri dan professor di universitas, anda diharapkan menjadi seorang engineer yang mengetahui metodologi riset dan pengembangan produk secara mendalam.

Saya saat ini mengambil PhD di Perancis sambil bekerja sebagai R&D engineer di industri. Luluspun nanti saya berminat untuk tetap meneruskan karir di industri dan bukan di akademia.

Tidak enaknya industrial PhD adalah semua riset dan pekerjaan anda, termasuk paten adalah milik perusahaan dan tidak boleh dipublikasikan sampai batas waktu tertentu. Jadi anda benar-benar miskin

publikasi. Kemudian karena terlalu sibuknya anda di industri, sering kali harus menyediakan waktu khusus untuk memikirkan riset dan menulis thesis. Juga karena benar-benar harus applicable di industri dengan berbagai deadline proyek yang mepet, biasanya anda harus mengorbankan kualitas thesis doktoral anda. Kualitas thesis doktoral konvensional di Universitas jelas lebih baik karena mereka sehari-hari nongkrong di lab riset dan membaca jurnal ilmiah, sementara industrial PhD student seharihari nongkrong di pabrik. Membaca jurnal ilmiah hanya di WC saja pada malam hari kalau sempat. Perusahaan hanya memperbolehkan industrial PhD student untuk konsultasi dan riset ke Universitas 3-4 hari perbulan (walaupun biasanya kami, eh saya menggunakan waktu ini untuk bermalas-malasan).

Enaknya adalah sebagai engineer yang mengerjakan riset, anda memiliki pengalaman kerja di industri sekaligus pengalaman riset di Universitas. Gajinya juga sama dengan engineer biasa, jadi jauh diatas rate PhD student di Universitas, sehabis lulus PhD, posisi anda juga akan diatas engineer-engineer lain, misal menjadi project manager.

Kesibukan anda sangat banyak mulai dari ketemu dan meyakinkan klien, meeting, presentasi, mengatur budget, mengatur engineer junior, project management, programming, instalasi alat DITAMBAH riset dan menulis thesis. Di Eropa, terutama di Perancis, Denmark dan Jerman, ada skema khusus yang dinamakan Industrial PhD, yaitu mengerjakan topik PhD yang diaplikasikan di industri.

Di Perancis namanya Cifre (Les Conventions Industrielles de Formation par la REcherche) yaitu skema yang memungkinkan engineer melakukan riset doktoral di Universitas sambil menerapkannya di industry dan mendapatkan gelar PhD.

Saya bukan satu-satunya engineer yang mengambil PhD di perusahaan saya, ada beberapa orang. Di divisi saya saja, pemegang gelar PhD ada sekitar 50%, di divisi lain juga ada.

Di Jerman dan Perancis banyak sekali pemegang gelar PhD yang memegang posisi di managerial ataupun engineering so tidak ada masalah PhD overqualified di Eropa. Namun biasanya memang riset PhD mereka menunjang pekerjaan dan karir mereka.

Untuk bidang bisnis, anda bisa mengambil Doctor of Business Administration.Download buku buku automasi, kontrol dan informatika industri (Bahasa Perancis)Monday, November 17, 2008 8:48

AMSilakan di download di link ini.Tutorial Video Labview (bahasa Indonesia)Sunday, February 08, 2009 4:53 AMSaya sedang menulis buku Labview untuk instrumentasi dan automasi industry, tapi ditengahtengah saya berhenti, karena ternyata menulis (dan belajar) Labview lewat buku sama sekali tidak menyenangkan. Kenapa ? karena Labview adalah Graphical Programming Language.

Lebih enak kalau diajarkan lewat video, so saya mencoba membuat tutorial video Labview, check this out :

1.Pengenalan Labview

2.Hello World dalam Labview

3.Membuat perhitungan rata-rata

4. Memplot grafik Tutorial 4

Kalau video ini terlalu kecil, anda bisa melihat ukuran yang lebih besar di Blog Multiply saya. Atau download disini.Media files video-play.mp4 (VLC media file (.mp4), 0 bytes) video-play.mp4 (VLC media file (.mp4), 0 bytes) video-play.mp4 (VLC media file (.mp4), 0 bytes)Superioritas Pendidikan PerancisTuesday, December 02, 2008 12:56 AMPekerja Perancis adalah pekerja yang santai. Di kantor mereka tidak terlihat bekerja dengan tegang seperti orang Asia. Mereka bekerja hanya 35 jam seminggu. Bangsa Perancis juga senang sekali melakukan mogok masal dan banyak sekali liburan dan cuti di Perancis. Tapi, kenapa Perancis bisa menjadi salah satu negara industri paling produktif di dunia ?

Juga negara pengekspor ke-lima terbesar di dunia ?

Menurut saya jawabannya adalah dalam bekerja mereka sangat produktif, efisien dan kreatif (pengalaman saya pribadi, HANYA DI PERUSAHAAN SWASTA, di Government dan civil servant mereka sangat lamban dan malas). Rekan-rekan Perancis saya biasanya memiliki dasar yang sangat kuat di matematika, fisika dan logika/filosofi, juga computer programming.

Mengapa mereka bisa produktif dan jago di bidang eksakta ?

Jawabannya adalah karena sistem pendidikan Perancis yang memang superior.

Di Perancis, anak-anak memulai sekolah sangat awal, biasanya pada usia 2-3 tahun. Sekolah wajib sampai usia 16 tahun (sekolah di Perancis nyaris gratis dari SD hingga universitas). Namun, sekolah di Perancis amatlah berat. Anak-anak Perancis menghabiskan waktu di sekolah lebih banyak daripada anak-anak Eropa lain. Guru-guru di Perancis sangat otoriter dan tidak segan-segan untuk mempermalukan anak-anak yang bodoh dan malas belajar di depan kelas. Sistem pendidikan Perancis menekankan pada penghukuman pada anak yang malas belajar dan bukan pengembangan kepribadian (makanya orang Perancis kayak gitu..). Setiap saat, dari sekolah dasar sampai Universitas, guru dan profesor menyebutkan nilai dan ranking setiap anak keras-keras. Ranking setiap siswa ditulis besar-besar di ijasah dari SD hingga Universitas. Sistem ujian Perancis ditekankan pada soal-soal konseptual berupa essai dan juga oral exam tanpa pilihan ganda.

Penulis melihat sendiri soal-soal matematika dan fisika di buku teks SMU Perancis sangat sulit karena menekankan pemahaman konseptual, bukan sekedar ketelitian dan ketrampilan menghitung. Contoh, di SMU Indonesia kita disuruh untuk mengalikan matrix 4 x 4 sampai 6 x 6 ! (suatu pekerjaan yang hanya membutuhkan ketelitian dan ketrampilan menghitung) di SMU Perancis mereka disuruh membuat suatu algoritma yang paling efisien untuk mengalikan matrix n x n.

Penilaian di Perancis sangat sulit, siswa mendapat skor 0 (terendah) - 20 (tertinggi). Mendapat skor diatas 14 sangat sulit. Siswa-siswa yang mendapat nilai 9-11 (ekuivalen dengan C) di Perancis bisa dengan mudah mendapat nilai A di Amerika Serikat atau UK. Batas nilai adalah 9 (50 persen).

Jika rata-rata dibawah 50 % maka otomatis siswa akan drop out/tinggal kelas (dan professor Perancis tega-tega saja melakukan itu, ingat bahwa mereka orang Perancis, mempersulit hidup orang lain adalah salah satu tujuan hidup mereka).

Pendidikan matematika dan ilmu alam di Perancis sangat berat. Siswa diajarkan konsep dasar matematika, logika dan filosofi secara mendalam dan sedini mungkin. Jika siswa tidak pandai dalam matematika, dipastikan dia tidak akan bisa bertahan dalam sistem pendidikan Perancis dan kemungkinan tidak akan lulus "Baccalauereat".

Ujian akhir SMU atau "Baccalaurat" or "Bac" adalah sangat penting karena memberikan mereka akses ke universitas tanpa seleksi lanjutan. Bac adalah ujian yang sangat berat tanpa pilihan berganda, hanya essai dan ujian Oral. Waktu ujian adalah dua hingga empat hari. 30% dari siswa yang menempuh Bac gagal.

Untuk memberikan gambaran sukarnya pendidikan di Perancis, berikut contoh soal latihan ujian untuk Bac matematika :

Ini adalah ujian bagi anak SMU yang mau masuk sekolah persiapan masuk Grande Ecole :

Matematika :

Fisika :

Anda-anda yang bangga bisa lulus UMPTN dan tembus ke ITB dan UI silakan coba mengerjakan soal diatas, (oh saya dengar suara anda minta pilihan ganda seperti di UMPTN, sayangnya NGGAK ADA PILIHAN GANDA BOS!! )

Sistem pendidikan Perancis membedakan University dan "Grand Ecoles". Grand Ecole adalah Sekolahsekolah tinggi terspesialisasi yang sangat bergengsi. Antara lain Ecole Polytechnique, Ecole Normale Suprieure, Ecole Nationale d'Administration, Hautes Etudes Commerciales (HEC), Ecole des Mines, Ecole Centrale, Institut d'Etudes Politiques dsb

Grande Ecole sangat sangat kompetitif, kurikulumnya sangat berat dan lulusnya juga sangat sulit. Lulusannya dipastikan menjadi manajer dan pemimpin pemerintahan di Perancis(mungkin seperti masuk Universitas negeri di Indonesia seperti UI, ITB, IPB, UGM,ITS,Unpad dengan Sipenmaru/UMPTN pada zaman dahulu).

Untuk masuk Grande Ecole, siswa-siswa terbaik Perancis mempersiapkan diri di Sekolah persiapan, dimana untuk masuk sekolah persiapan pun mereka harus melewati ujian yang sangat berat. Di sekolah persiapan, mereka mempersiapkan diri dengan mempelajari ilmu-ilmu dasar(matematika, fisika, ekonomi, filosofi, dsb) selama dua hingga tiga tahun. Sekolah persiapan sangat berat, dimana mereka secara konstan mendapatkan pekerjaan rumah yang sangat banyak dan ujian-ujian tiap minggu.

Setelah siap, mereka mengikuti ujian grand ecole yang sangat sulit dan kurang dari 10% bisa diterima di Grand Ecole sesuai ranking mereka.

Di Grand Ecole, mereka belajar keras dari jam 8 pagi hingga jam 8 malam selama 2-3 tahun, dengan banyak pekerjaan rumah dan ujian-ujian. Mereka lulus dengan gelar Diplome d'Ingenieur (setaraf dengan master atau Bac+5 yang artinya 5-7 tahun setelah lulus SMU seperti halnya Jerman yang pendidikannya model diplom juga).

Universitas di Perancis juga sebenarnya tidak kalah beratnya dari Grand Ecole dimana siswa-siswa diberi 8-9 mata kuliah dalam satu semester dengan banyak sekali tugas dan ujian-ujian namun karena Universitas di Perancis menerima mahasiswa-mahasiswa yang tidak terseleksi dengan baik seperti di Grand Ecole, tingkat Drop Out di Universitas sangat tinggi.

Riset di Universitas Perancis sangat advanced di ilmu-ilmu dasar seperti Matematika, Kimia, Ekonomi dan Fisika juga ilmu terapan seperti applied physics dan engineering, terutama teknik Elektro dan Informatika.

Negara yang dikenal sebagai kiblat mode ini adalah salah satu negara teratas dalam meraih penghargaan scientific bergengsi. 9 dari 44 Fields Medal diraih oleh Perancis. 2 dari 8 Abel prize diraih oleh Perancis.

Bangsa Perancis juga peringkat 4 dalam jumlah peraih Nobel : 1.USA 2.UK 309 114

3.Jerman 101 4.Perancis 57 6.Swedia 28 7.Swiss 25 8.Russia 22 9.Italy 20 10.Austria 19 11.Belanda 18 12.Kanada 17 13.Jepang 16

Dalam 5 besar jumlah publikasi ilmiah, Perancis peringkat 4.

1. Amerika (799) 2. UK (465) 3. Jerman (408) 4. Perancis (376) 5. Jepang (372)

Sistem pendidikan universitas di Perancis menggunakan LMD (License,Maitrise ,Doctorat) yang ekuivalen dengan Bachelor (3 tahun), master (2 tahun) dan doktor (3-5 tahun).

Untuk meraih posisi white collar, pemuda-pemudi Perancis wajib untuk menyelesaikan study 5 tahun setelah SMU (dimana di negara lain seperti US dan Indonesia setaraf dengan Master).

Mereka yang hanya menyelesaikan pendidikan 3 atau 4 tahun setelah SMU (istilahnya Bac+3atau Bac+4) hanya dapat meraih posisi blue collar atau teknisi.

Jadi menyandang gelar master di Perancis adalah hal yang sangat biasa karena hampir setiap pegawai white collar memiliki pendidikan 5 tahun setelah SMU (Bac+5) setaraf master.

Lagipula biaya pendidikan master/diploma Ingenieur di Perancis sangat murah hingga hampir setiap warganegara Perancis yang paling miskin-pun bisa sekolah sampai master. Sebagai gambaran biaya Master untuk setahun kira-kira 300 euro (4 jutaan rupiah).

Gaji antara posisi white collar dan blue collar sangat berbeda, hanya karena perbedaan setahun masa study (4 tahun vs 5 tahun).

Diploma d'Ingenieur dari Ecole d'Ingenieur biasanya dianggap lebih bergengsi dari master dari Universitas.

Tingginya taraf pendidikan dan beratnya sekolah di Perancis memberi kontribusi dalam sikap bangsa Perancis yang rata-rata kritis, ilmiah, suka berdebat, sok tahu, suka mempersulit orang lain, agak sombong dan meremehkan bangsa lain.Berkunjung ke pameran Virtual Reality terbesar di EropaWednesday, October 01, 2008 3:10 AMDalam suatu kesempatan, saya beruntung mendapat tugas kantor untuk hadir di acara tahunan yang sangat terkenal bagi yang berkecimpung di dunia computer graphics, computer vision dan computer games yaitu Laval Virtual 2008

Perancis adalah salah satu negara yang sangat maju dalam bidang computer graphics, computer vision, Virtual Reality dan Augmented Reality. Tiap tahun di negara ini diselenggarakan eksibisi dalam bidang Virtual Reality dan Augmented reality yang tempatnya di Laval, Perancis.

Peserta dalam eksibisi ini datang dari berbagai negara di dunia, mulai dari US sampai Jepang. Eksibisi yang ditampilkan adalah produk-produk terbaru dan hasil riset mutakhir dari berbagai lembaga riset dan Universitas di dunia dalam bidang Virtual Reality dan Augmented reality.

Selain itu, dalam eksibisi ini, turut dipresentasikan juga berbagai paper ilmiah yang membahas penemuan/algoritma terbaru.

Ini adalah kota Laval yang indah, dengan sungai yang membelah kota.

Bis ini ditempeli dengan advertisement Laval Virtual.

Ini adalah gedung tempat eksibisi diselenggarakan, terlihat bendera negara-negara yang mengirimkan delegasinya, kapan ya Indonesia ?

Simulator mobil yang isinya adalah jalan-jalan di Paris, data aktual dari google map. Kita bisa merasakan bagaimana menyetir di Paris.

Simulator sepeda ini baik sekali untuk kesehatan, anda bermain game sebagai seorang pebalap sepeda sekaligus berolahraga.

Sistem virtual reality untuk dokter gigi.

Table Top technology ini sudah dikembangkan oleh Microsoft, tapi Perancis juga sudah bisa bikin dengan harga jauh lebih murah. Sebuah perusahaan Spin Off yang dimulai dari riset di Universitas Bordeaux (Immersion SAS )bisa membuat system augmented reality advanced dengan harga murah.

Sistem Virtual reality untuk desain produk

CAVE system untuk immersive Virtual Reality

Antycip, perusahaan ini mengkhususkan diri dalam membuat VR untuk kendaraan apa saja di environment apa saja.

Media files video-play.mp4 (VLC media file (.mp4), 0 bytes) video-play.mp4 (VLC media file (.mp4), 0 bytes) video-play.mp4 (VLC media file (.mp4), 0 bytes) video-play.mp4 (VLC media file (.mp4), 0 bytes)Mengenai hidup di Perancis dan orang Perancis yang birokratisSaturday, November 08, 2008 10:44 AMBosen ngomongin Machine Vision terus, sekarang saya akan mencoba berbagi hal lainnya yaitu mengenai Perancis.

Setelah belajar dan bekerja di Perancis selama beberapa lama,saya akhirnya menyadari bahwa negara ini (dan orang-orangnya) banyak sekali yang menyebalkan.

Civil Servant Perancis itu pemalas dan birokratis. In fact istilah 'bureaucracy' itu asalnya dari Perancis (bureau itu artinya meja atau kantor). Disini semua urusan, hingga yang paling sederhana (misal beli abonemen tiket) harus melalu birokrasi yang panjang dan berbelit-belit. Di UK dan Belanda misalnya, beli tiket Abonemen tinggal datang ke loket beli dan selesai. Disini anda harus menyediakan copy attestation de logement(surat tempat tinggal), attestation de travail(surat pernyataan bekerja), copy identitas, dsb dsb.

Demikian juga untuk social security misalnya, di UK ketika anda terdaftar sebagai student/worker, secara OTOMATIS anda akan mendapatkan social security number (istilahnya National Health System di UK). Di Perancis anda harus mendaftar ke LMDE (student) atau CPAM (worker dan umum) dan prosesnya sangat panjang. Pertama anda harus mengisi formulir tebal, kemudian anda menyediakan berbagai macam dokumen penunjang, seperti medical result, ID, Releve Identite Bancaire, Titre De Sejour, slip gaji dari perusahaan dan berbagai macam dokumen lain baik copy maupun original.

Jika anda orang asing, dan mau bekerja di Perancis, proses-proses untuk mendapatkan work authorization itu akan sangat menyita waktu dan membuat kepala anda pecah. Untungnya saya terbantu karena perusahaan saya menyewa agen untuk mengurus masalah ini. Dengan bantuan agen aja sudah membuat kepala anda pecah, apalagi tanpa agen.

Jika anda mau menyewa residence, baik di Unversitas maupun di general residence, prosesnya juga tidak mudah. Untuk mendapatkan residence di Universitas, anda harus mengisi setumpuk dokumen, juga yang paling penting mendapatkan le Garant, atau penjamin (orang Perancis) yang mengisi setumpuk dokumen Acte De Solidarite menjamin bahwa anda membayar sewa. Mendapatkan residence di kota besar seperti Paris apalagi adalah hal yang hampir impossible bagi orang asing. Ada baiknya anda minta bantuan agen properti (Agence Immobiliere).

Sebenernya birokrasi tidak masalah jika saja para Civil Servant di Perancis itu rajin dan mau membantu, sayangnya kelakuan umum para Civil Servant di Perancis itu umumnya masa bodoh dan malas.

Kata-kata yang paling sering mereka ucapkan adalah "ce n'est pas possible" atau "non" Anda harus siap berdebat (dengan bahasa Perancis) dengan mereka jika ingin urusan selesai. Tetapi anda harus tetap memasang wajah ramah dan jangan lupa mengucapkan Merci Beaucoup walaupun sebenernya anda pingin mengetok kepala batu mereka dengan Roti pentung keras ala Perancis. Ingat jika anda terlihat jengkel, mereka justru akan semakin mempersulit hidup anda. Mindset orang Perancis adalah, dia baru akan membantu anda setelah anda kelihatan putus asa dan benar-benar berharap ke dia.

Pernah suatu ketika saya menyerahkan suatu dokumen ke ibu-ibu civil servant jutek ala Perancis dan dia cuman bilang "Ce n'est pas valide!". Beberapa minggu kemudian saya serahkan dokumen yang sama pada orang yang sama dan si bodoh ini menerima dokumen saya (rupanya dia lupa bahwa itu dokumen yang sama yang pernah dia tolak). So kesimpulannya suasana hati para Civil Servant ini mempengaruhi kesuksesan permohonan anda.

Jika anda orang asing, urusan akan berlipat-lipat kesulitannya, pertama karena kendala bahasa, kedua karena anda orang asing!

Bangsa Perancis adalah bangsa yang chauvinist, hal ini diperparah dengan fakta bahwa imigran-imigran dari negara Francophone (Afrika dan Arab) benar-benar membebani Ekonomi Perancis karena memang mereka kurang produktif, sementara sistem security social di Perancis harus menanggung mereka. Akibatnya bangsa Perancis kurang welcome dengan kehadiran bangsa lain. Saya merasakan bahwa urusan-urusan birokrasi jauh lebih sulit kalau saja tidak dibantu oleh teman atau atasan saya yang orang Perancis, bukan hanya masalah bahasa, tapi juga sepertinya masalah anda orang asing atau bukan.

Walaupun birokrasi Perancis ini merupakan keluhan umum bukan saja orang asing tapi orang Perancis sendiri, tapi tetap saja orang asing lebih sulit. Dalam satu kasus bahkan birokrasi Perancis ini pernah menyebabkan kematian! seperti dilansir oleh koran Guardian berikut :

"One of the most unforgivable aspects of France's obsession with paperwork, however, came to light in the fire that killed seven last night. Twelve of the 22 families who lived in a building that was, by common acknowledgement, a death trap, were rehoused a few months ago.

The remaining 10, who were in the building when it went up in flames, were not - because they did not have the correct papers to justify their residence in France."

Selain birokrasi,pengalaman saya bekerja di Perusahaan Perancis adalah orang Perancis itu suka sekali berdebat dan berargumentasi, walaupun nyata-nyata bahwa kita lebih expert dari dia.

Mereka baru diam setelah kita menunjukkan bukti scientific, tentu saja hal ini menyebabkan pekerjaan tertunda karena waktu habis hanya untuk berdebat.

Untungnya walaupun pemalas, tidak bisa berbahasa Inggris dan mikirnya birokratis dan complicated, bangsa Perancis dikaruniai Tuhan kemampuan matematika, kreativitas dan kemampuan berinovasi yang tiada duanya. Kemampuan matematika dan kreativitas bangsa Perancis diakui dari kemampuan mereka menciptakan teori matematika seperti yang dibuat oleh Fourier, Fibonacci, Fermat, Laplace, Poincere, Descartes....

Juga keindahan dan kompleksitas bangunan-bangunannya dan kemampuan mereka membuat karya engineering yang complicated seperti pesawat tempur Mirage, Rafale, pesawat Supersonic Concorde dan kereta supercepat TGV (Train Grande Vitesse).

Riset-riset Perancis di bidang teknologi juga cukup advanced dan bisa bersaing dengan negara-negara maju lain seperti US, UK, Jerman dan Jepang.

Dalam pendidikan postgraduate misalnya, Bangsa Perancis memiliki inovasi tersendiri yaitu Industrial PhD atau disebut konvensi CIFRE (Les Conventions Industrielles de Formation par la REcherche) yaitu skema yang memungkinkan research engineer melakukan riset doktoral di Universitas sambil menerapkannya di industry dan mendapatkan gelar PhD.

Skema CIFRE inilah yang menyebabkan saya memilih tinggal dan bekerja di Perancis dibandingkan negara lain. Di Perancis kita bisa bekerja di Industry, sekaligus melakukan riset PhD di Universitas. So sambil menyelam minum air.

Selain itu, tidak ada yang istimewa di Perancis. Oh ya sebenarnya ada satu yang istimewa disini, yaitu cewek-ceweknya yang memang bisa dibilang 99% cantik. But these stuck up bitches cannot speak English and they adore Salvatore Ferragamo, Etienne Aigner, Paul Smith and Chloe more than God plus they are unfaithful! ....so these goddesses are not a good deal..

Ok itu dulu, bientt...

3D laser scanningFriday, September 26, 2008 9:54 AM1. Principle of 3D laser scanning

Sometimes we need to analyze a real world object to gather the data of its shape, appearance (color, texture), or dimensional measurement. In order to do that we need a 3D scanner. With 3D Scanner we can gather the data. The data then can be used to reconstruct digital 3D model useful for many different applications. 3D reconstruction used extensively in the production of movie and game, as well as industrial design, quality control, forensic, reverse engineering and prototyping, computer vision and documentation of cultural or heritage artifacts.

Now the principle of 3D scanning will be explained. The device called 3D scanner will be used to create a point cloud of geometric samples on the surface of the object. These points then will be used to extrapolate the object shape (this is termed 3D reconstruction), the point can also be consisted of the color information, in this case the color on the surface of the object can be determined as well.

3D scanner collects information about surface. 3D scanners keep and collect the distance information about surfaces within its field of view. The image gathered by 3D scanner describes the distance to a surface at each point in the picture. If a spherical coordinate system is defined in which the scanner is the origin and the vector out from the front of the scanner is =0 and =0, then each point in the picture is associated with a and .

Together with distance, which corresponds to the r component, these spherical coordinates fully describe the three dimensional position of each point in the picture, in a local coordinate system relative to the scanner. In many cases, single scan from one angle will not generate a complete model of the object. We need to take multiple scans on multiple scans from different angles to gather information about all sides of the object. These scans then transformed into some reference system and a process termed image registration will be applied to obtain a complete model [wikipedia].

A scanner will emit laser and detect its reflection in order to probe an object. There are few types of laser scanner, two famous laser scanner type are time of flight laser scanner and triangulation laser scanner.

The first type of 3D laser scanner is the time-of-flight 3D laser scanner. This type of active 3D scanner utilizing laser light to probe the object. The principle behind this laser scanner type (also known as laser range finder) is using laser to emit a pulse of light and calculating the distance between the scanner and the surface of the object by measuring the time of the round-trip-time of a pulse of light. Since the speed of light c is known, the roundtrip time determines the travel distance of the light, which is twice the distance between the scanner and the surface. If t is the round-trip time, then distance is equal to ct/2.

The accuracy of a time-of-flight 3D laser scanner depends on how precisely we can measure the time: 3.3 picosecond approximately is the time taken for light to travel 1 millimeter. The laser range finder only detects the distance of one point in one direction (the direction of its current view). Therefore, the scanner scans its entire field of view one point at a time by changing the direction of range finders to scan different points. The direction can be changed by either rotating the range finder itself or using rotated mirror systems. The rotated mirror methods are faster and more accurate because mirrors are lighter. Generally time-of-flight 3D laser scanners can measure the distance of 10.000-100.000 points per second. This type of laser scanner is more suitable to scan a far object, like buildings, rock formations etc produce a 3D model. [Wikipedia]. One of application of this scanner is Lidar (light detection and ranging) scanner, the example of reconstructed object using this type of laser scanner is shown below :

The second type of laser scanner is triangulation laser scanner, it is also a active scanner that uses laser light to probe the environment. These laser scanners shines a laser on the object and take advantage of a camera to look for the location of the laser dots emitted. Depending on how far away the laser strikes a surface, the laser dot appears at different places in the cameras field of view as shown below :

This technique is called triangulation because the laser dot, the camera and the laser emitter form a triangle. We get three informations : 1. The length of one side of the triangle, the distance between the camera and the laser emitter. 2. The angle of the laser emitter corner. 3. The angle of the camera corner (determined by looking at the location of the laser dot in the cameras field of view).

With three information described above, we can entirely establish the shape and size of the triangle and gives the location of the laser dot corner of the triangle. The triangulation process can be described as follows. A laser stripe (or line) approximately 2 inches long is projected from the laser head onto the surface to be digitized.

The CCD cameras,at a known distance from the laser, then capture the light from the laser beam as it reflects on the part. Through trigonometry, the XYZ co-ordinates of the stripe can then be calculated.

Depending on software settings and the sensor used, up to 650 individual data points can be gathered from a single laser line. The object that was scanned will now be represented by these points, commonly referred to as a 'point cloud', numbering from a few thousand points up to possibly a million or more.

The number of points scanned on a part will depend on the size and amount of detail the part has. The more detail, the higher the number of points necessary to describe the part. [Steinbichler].

In recent development of this type of laser scanner a laser stripe, instead of a single laser dot, is scrutinized across the object to speed up the acquisition process.

Both types of scanner have its own advantage and drawbacks. They used on different purpose and situations. The advantage if time-of-flight laser scanner is that it is has a capability to scan a very long distance, sometimes in order of kilometers. This scanner is suitable for scanning large structure like building or geographic characteristic, the drawback of time of flight laser scanner is their accuracy. This is because of the high speed of light, making the round-trip time is difficult to calculate in the order of millimeters. With time of flight scanners accuracy is

decreased when the laser hits the edge of an object because the information that is sent back to the scanner is from two different locations for one laser pulse. The coordinate relative to the scanners position for a point that has hit the edge of an object will be calculated based on an average and therefore will put the point in the wrong place.

On the other hand, the advantage of triangulation laser scanner is its accuracy. They can only scan in limited range (order of meters) but their accuracy is in the order of tens of micrometers.

That is to conclude that triangulation laser is more suitable to reconstruct a small 3D object. When using a high resolution scan on an object the chances of the beam hitting an edge are increased and the resulting data will show noise just behind the edges of the object.

Scanners with a smaller beam width will help to solve this problem but will be limited by range as the beam width will increase over distance. Software can also help by determining that the first object to be hit by the laser beam should cancel out the second. Laser scanning shortens the digitizing process by collecting the data at a much faster pace than conventional measurement techniques. Scanning with the laser eliminates the issues relating to cosine error, deflection, mechanical probe offsets, and probe size and/or shape.

2. Optimization of 3D laser scanning for reflective surface

When the data from 3D laser scanner are reconstructed, the large data sets usually have to be processed. Hence, it is often necessary to minimize the number of points while minimizing the loss of information simultaneously. Moreover, the generated point cloud usually contains a considerable number of errors. The errors come from the measurement system and the scanned objects surface. Outliers and other incorrect points are an important factor when discussing precision measurement.

Therefore, they have to be first detected and removed or corrected from the point cloud in order to get a clean model. Hence the data measuring can be done more precisely.

Based on this fact, optimization of the laser scanning system can be realized if the data quality of each individual point in the data set is improved . This can be accomplished by considering the specific settings of the scanning system, particularly, the parameters of the laser and the camera. Optimizing their positions based on the results of the point cloud analysis results in better point cloud quality in a successive scan.

There are many sources for incorrect scan data. Based on many numerous example scans, most of the outlier and other erroneous points are caused by reflections. In these cases, the high energy laser beam is reflected from mirroring surfaces such as metallic or glass. Consequently, there are too much light hits the sensor of the camera and blooming effects occur. In other cases, a direct reflection may miss the camera. In addition, a part of the object may lie in the path from the projected laser line to the camera causing a shadowing effect. All these effects are responsible for gaps and holes. At sharp edges of some objects, partial reflections appear. In addition, rough surfaces cause multiple reflections and, therefore, indefinite point correlations.

Other problems are caused by possible range differences originating from systematic range errors resulting from different reflectivity of the surfaces elements. Since the scanner systems are typically used in industrial environments, some atmospheric effects like dust and dirt possibly affect the quality of the image obtained by the camera. Furthermore, aliasing effects in the 2D image processing lead to high frequent noise in the generated 3D data.

Therefore, the resulting 3D point data is noisy and partially erroneous. However, a lot of these errors can be minimized by an optimal alignment of the projection system and the object surface so that as few as possible reflections can appear. In order to arrange the setup properly, the quality of the generated point cloud has to be analyzed and evaluated.

The steps to get optimized 3D reconstruction by improving point cloud quality are :

1. Optimize the projection and viewing conditions. This way, the quality of the point cloud has to be quantified with respect to the position of laser and camera. Improving the recording conditions will result in less erroneous 3D points.

The proposed techniques for improving the recording condition are based on the systems parameters in 2D (e. g., contrast and line thickness) and in 3D (e. g., camera and laser positions, focus area, etc.) to estimate the quality of each single point [Teusch 2004].

2. After the point clouds is quantified, now we have to correcting a single measurements of a point. The goal is to minimize the number of points and clean the point clouds from noise. The algorithm to do it is by analyzing the points using B-Spline approximations. The point clouds are approximated by a sorted set of B-spline curves for iterative smoothing and closing gaps [Teusch 2004]. The edge information is derived from these curves and then reconstructed by using NURBS curves with respect to quality and curvature of each single point on it. NURBS or Non-Uniform Rational B-Splines, is a mathematical representations of 3-D geometry that can accurately describe any shape from a simple 2D line [Fisher 2002].

3. Now the triangulation algorithm can be conducted as usual. The figure below show the example result of this method:

The comparison of Pixel and Vector Based Image ProcessingMonday, May 12, 2008 5:55 AMThere are few methods of Surface Inspection using pixel based method, namely : 1. Traditional Object Recognition: this methods is identifies object by generalizing object's image pattern. The first step is extraction the features of the object and then train the system according to the features by using classifier algorithm, such as Neural Network or SVM. This method will face different challenges, such as : illumination variance and distribution, object surface characteristics, orientation and occlusion

2. Blob/Particle Analysis : This methods will extract any object in the surface by separate it from the background then group it accordingly to form a blob. The geometry of the blobs is then used for surface detection. This is very fast and practical method for simple surface inspection. The disadvantage of this method is that separation of the object from the background is not an easy task

due to noise as a result of change of color, scratch, marking etc.

3. Template Matching with Normalized Grey Scale correlation : In this method the template is stored and then matched with the object inspected with some correlation method.

The advantage of this method is that it is much more accurate and more robust than the previous two methods. The added advantages are that it is relatively easy to train an object and that the object does not need to be separated from the background. The disadvantages of such a method are that it cannot handle much variation in rotation and size and is highly affected by non-uniform shading. In the application of inprocess inspection in industry, changes in rotation and size as well as non-uniform shading is the standard rather than the exception.

Now in contrast, the vector based image processing will be described and compared. In the previous three methods described above, the image processing are applied on the basis of pixel by pixel, hence pixel based image processing.

This method is slow and challenged by problems in different illumination, pose and occlusions.

Vector based image processing is totally different that it converts all the pixel into geometric features by means of synthetics or mathematical model.The geometric feature can be line segments, arcs, angles and open or closed geometric shapes. By using geometric features, the image analysis is not affected by color changes or non-linear changes in size such as those found with components due to manufacturing variations. This method is also robust against variance in shading an non-linear lighting.Intel OpenCV, alternatif Opensource Machine VisionFriday, May 09, 2008 6:38 AMKalau anda atau perusahaan anda tidak cukup punya dana untuk membeli Software NI Development Module atau Cognex VisionPro yang harganya berkisar dari 500020.000 USD, anda bisa mempertimbangkan OpenCV dari Intel sebagai alternatif solusi. Library open source ini bisa di-download dari

www.intel.com/technology/computing/opencv/

atau

http://sourceforge.net/projects/opencvlibrary

OpenCV adalah library Open Source untuk Computer Vision untuk C/C++, OpenCV didesain untuk aplikasi real-time, memiliki fungsi-fungsi akuisisi yang baik untuk image/video. OpenCV juga menyediakan interface ke Integrated Performance Primitives (IPP) Intel sehingga jika anda bisa mengoptimasi aplikasi Vision anda jika menggunakan prosesor Intel.

Feature yang dimiliki OpenCV antara lain :

* Manipulation data citra (alokasi, copying, setting, konversi). * Citra dan video I/O (file dan kamera based input, image/video file output). * Manipulasi Matriks dan Vektor beserta rutin-rutin aljabar linear (products, solvers, eigenvalues, SVD). * Data struktur dinamis (lists, queues, sets, trees, graphs). * Pemroses Citra fundamental (filtering, edge detection, corner detection, sampling and interpolation, color conversion, morphological operations, histograms, image pyramids). * Analisis struktur(connected components, contour processing, distance transform, various moments, template matching, Hough transform, polygonal approximation, line fitting, ellipse fitting, Delaunay triangulation). * Kalibrasi kamera (calibration patterns, estimasi fundamental matrix, estimasi homography, stereo correspondence). * Analisis gerakan (optical flow, segmentation, tracking). * Pengenalan obyek (eigen-methods, HMM). * Graphical User Interface (display image/video, penanganan keyboard dan mouse handling, scrollbars). * Pelabelan citra (line, conic, polygon, text drawing)

OpenCV terdiri dari 3 library, yaitu CV : untuk algoritma Image processing dan Vision

Highgui :untuk GUI, Image dan Video I/O CXCORE : Untuk struktur data, support XML dan fungsi-fungsu grafis.

Selain itu OpenCV juga dilengkapi dengan Machine Learning library yang memiliki algoritma berikut :

* Naive Bayes classifier * k-nearest neighbor algorithm * Support Vector Machine * Decision Trees * Boosting * Random forest * Expectation Maximization * Neural Networks

Library ini bisa di-compile dengan Visual C++ 6.0, Visual C++.Net 2003/2005/2008 baik Standard, Professional maupun express edition.

Sepengalaman saya, OpenCV memang tidak semudah dan se-robust NI Vision Development Module atau Cognex Visionpro, tapi dalam beberapa kasus justru lebih fleksibel dan extendable. Hanya saja memang anda harus benar-benar jago coding untuk dapat menggunakan OpenCV. Karena Library ini

sangat ringkih dan rentan terhadap memory leak. So management memory anda harus benar-benar baik.

Lain kali saya akan sajikan tutorial OpenCV mulai dari instalasi sampai pembuatan aplikasi Computer Vision sederhana.NI Vision Development SuiteThursday, May 08, 2008 6:40 AMNational Instruments Vision Development Module (www.ni.com/vision/vdm.htm) adalah tools yang sangat luar biasa untuk pengembangan aplikasi Machine Vision. Ini adalah sebuah development module yang sangat lengkap dengan berbagai library yang bisa di-porting ke VB.Net, Labview dan CVI/Labwindows dan C/C++, modul ini juga memiliki prototyping tool yang disebut Vision Assistant, dengan tool ini, kita dapat dengan mudah membuat prototype program machine vision dan mengganti-ganti image processing algorithm atau filter yang digunakan. Kalau kita mendevelop aplikasi computer vision sederhana menggunakan Matlab dengan Image Processing toolbox atau OpenCV, akan memakan waktu berjam-jam, dengan Vision Assistant hanya memakan waktu kurang dari satu jam.

Program ini mengakuisisi data, baik live image dari Frame board maupun static image, kemudian kita konversi ke 8 bit image atau binary. Dari situ kita bisa melakukan manipulasi image dengan menggantiganti filter untuk memperhalus image, merubah kontras, brighness, mendeteksi edge, segmentasi, transformasi ke domain frekuensi dan lain-lain . Selanjutnya setelah feature dari image kita dapatkan, kita bisa melakukan measurement, pattern classification/object detection dan blob/particle analysis.

Setelah puas dengan prototype program yang kita buat, kita bisa memporting prototype program ke Visual Basic, Labview, atau Labwindows/CVI untuk dimanipulasi lebih jauh atau digabung dengan library lain.

Sangat praktis.CVI/Labwindows : Alternative bagi pembenci LabviewThursday, May 08, 2008 6:49 AMBagi anda-anda yang berkecimpung di Control Systems/Instrumentation, pasti kenal dengan program yang satu ini, ya Labview dari National Instruments. Di Perancis sini, hampir semua Industri memakai Labview sebagai bahasa utama pengembangan sistem instrumentasi dan kontrol di industri. Di tingkat universitas dan ecole (institut/sekolah tinggi), setiap mahasiswa Teknik Elektro dan Ilmu Komputer (Informatique) di Perancis diwajibkan untuk mempelajari Labview sebagai bagian dari matakuliah pemrograman, Sistem Kontrol dan Instrumentasi. FYI uniknya di Perancis, mahasiswa Ilmu Komputer atau seringnya disebut Industrielle Informatique disini SELALU mendapatkan mata kuliah Control Systems dan Instrumentation. Sesuatu yang tidak saya temui di UK dan Indonesia. Hal ini disebabkan oleh banyaknya industri manufaktur di Perancis sehingga demand untuk engineer yang menguasai Sistem Kontrol dan Automasi sangat tinggi.

Labview menggunakan konsep Graphics Language sebagai landasan pemrogramannya. So semua operasi logika, iterasi dan matematika direpresentasikan dengan lambang dan flowchart. Labview memang ideal untuk scientist dan engineer yang kurang kuat background programmingnya tapi harus membuat aplikasi measurement dan insrumentasi dengan cepat.

Ok anyway, bagi saya, meskipun sangat tepat untuk data acquisition and measurement, orang Perancis kebablasan menggunakan Labview sebagai bahasa pemrograman general untuk urusan APA SAJA. Bahkan teman saya disuruh menggunakan Labview untuk memodelkan persamaan matematik (dimana Matlab, Mathematica atau Scilab lebih tepat untuk itu).

Labview memaksa kita untuk menggunakan prinsip dataflow, dimana fleksibilitas menjadi taruhannya.

Untuk program-program sederhana seperti akuisisi data dari instrumen, mengukur, dan menampilkannya, graphical programming language ini sangat cepat dan praktis. Tapi untuk menulis program yang cukup kompleks (misal aplikasi Object Detector and Recognition) dibutuhkan fleksibilitas yang sangat tinggi.

Sebagai orang pure Computer Science yang berlatar belakang text based programming dan telah mempelajari Theory of Programming Language dan Compiler Design, saya sangat membenci Labview dengan alasan berikut :

1. Tidak bisa memberi komentar 2. Tidak bisa memberi nama variabel (WTF ??) 3. Nonlinear dan alurnya susah diikuti, ini bikin program atau main game Maze??? 4. Untuk memodifikasi satu perintah (dimana dalam bahasa pemrograman text hanya merubah satu baris) harus merubah keseluruhan struktur program. 5. Nonlinearity membuat sangat sulit untuk di-debug. 6. Nonlinearity membuat timing menjadi hal yang sangat sulit. 7. Penanganan Array dan iterasi yang rumit. 9. Sulit untuk menerapkan konsep OOP.

10. Pendukung Labview bilang operasi Parallel lebih mudah divisualisasikan dengan Labview, BULLSHIT, saya membuat parallel program dengan Celoxica Handel-C, tidak ada masalah.

Pertama kali menggunakan Labview untuk aplikasi numerical simulation and modeling (karena perusahaan tidak memiliki Matlab dan bos taunya hanya Labview), saya banyak terbantu dengan memakai C-Script untuk formula programming. Tapi lama-lama setelah aplikasi jadi kompleks, ternyata gabungan Labview dengan C-Script membuat program jadi rumit dan berat. Akhirnya, setelah berkutat dengan kejengkelan, VOILA saya menemukan solusinya, Paolo, seorang PhD EE asal Brazil yang juga membenci Labview memberitahu pada saya bahwa Labwindows/CVI bisa menggantikan Labview dan kebetulan perusahaan MEMILIKI LISENSI Labwindows/CVI!

Labwindows/CVI adalah ANSI-C Compiler buatan National Instruments yang diklaim pembuatnya dapat menggunakan semua library dan modul akusisi data dari National Instrument dan compatible dengan Labview. So kita bisa mengerjakan aplikasi instrumentasi dan kontrol yang sama dengan Labview tanpa kepusingan-kepusingan bahasa pemrograman grafis.

Akhirnya semua program Labview saya convert ke Labwindows/CVI dan saya bisa meneruskan pekerjaan saya dengan bahasa pemrograman tercinta, ANSI-C !!

Beberapa hari setelah bermain dengan Labwindows/CVI, saya menyadari bahwa development tool ini lebih friendly daripada Visual C++.Net dan tentu saja memiliki library instrumentasi yang sangat lengkap. So Labwindows/CVI adalah tools terbaik untuk aplikasi instrumentasi, kontrol dan measurement di Industry bagi para software engineer atau hardcore coder.

Keys on Machine Vision SelectionWednesday, May 07, 2008 12:29 PMModern Production and manufacturing process now rely on the use of machine vision technology for test, measurement and

inspection task. Nowadays there are many machine vision vendors offering products with different features and applications. This paper will highlight some of the key attributes we should look for in a machine vision supplier, and why taking the time to carefully assess a suppliers capability and choosing the right partner will save the time and money in the long run. There are many factors to be considered when choosing a machine vision technology from specific vendors. The factors are : The Experience of the company. Hardware Features. The parameter considered are :Raw Image quality : Resolutions, Contrast/Sharpness, SNR, can be parameterized by MTF/SFR.Speed.Ability to manipulate image in subpixel level. 2. Software features. OS supported.Performance.Reliability.Hardware supported.The modularity of the SDK (ex. COM, Activex).The flexibility of the SDK to be customized. Compatibility with other products, for example lighting systems, mechanical systems, control systems. After Sales Service and support. Parameters considered :Inventory reserve for emergency order fulfillment Long-term product availability for a technology migration path Advanced replacements for immediate failure replacement Priority technical support Flexible product training- on-site or at vendors training center Customized hardware and software solutions Vision system application engineering consulting On-line logistical information for order tracking and account management In-depth online knowledge base and training toolsPengantar Embedded Systems dan Realtime Systems dengan Embedded Linux dan eCosFriday, August 10, 2007 3:08 PMApakah embedded system itu ? Embedded system adalah kombinasi dari hardware dan software yang disisipkan (embedded) dalam suatu perangkat tertentu yang bertujuan melakukan suatu fungsi/tugas khusus. Contoh dari embedded systems ini dalam kehidupan sehari-hari adalah microwave, kalkulator elektronic, game watch, Antilock Brake Systems dan masih banyak lagi. Hampir semua aspek kehidupan kita tidak dapat dipisahkan dari embedded systems. Coba anda lihat sekeliling kamar anda, pastinya anda tidak akan sulit menemukan suatu benda yang mengandung embedded systems di dalamnya. Coba sebutkan, di kamar saya saja sekarang ada Mobile Phone, MP3 Player dan MIDI Keyboard. Embedded systems banyak dikaitkan dengan Real-Time Systems (sistem waktu nyata). Kebanyakan Embedded system memang memiliki sistem operasi berbasis real-time systems, kenapa ? karena kita tidak ingin ada jeda waktu eksekusi dalam sistem embedded systems. Embedded system juga banyak dikaitkan dengan Instrumentasi. Karena untuk membuat instrument, kita menghubungkan (antarmuka/interface) antara prosesor dengan dunia luar melalui sensor. Dalam blog ini penulis akan mengajak pembaca untuk membangun sistem embedded system dengan sistem operasi yang sudah terkenal yaitu Linux, khususnya embedded Linux. Pembaca sudah seharusnya menguasai bahasa pemrograman C, dasar-dasar sistem digital dan Organisasi dan Arsitektur sistem komputer. Untuk board experimen, penulis menyarankan untuk menggunakan Microcontroller kit Arcom Viper-Lite dengan processor Arm PXA255 XScale. Microcontroller kit ini dapat dibeli lewat www.arcom.com dengan harga sekitar 360 euro saja. Belajar microcontroller memang butuh modal, penulis sengaja tidak menyarankan Pic Microcontroller atau 8051 karena keterbatasan feature.

Menurut penulis, Microcontroller Viper-Lite ini paling lengkap dan memiliki feature sebagai berikut: RAM: 64 MB of SDRAMROM: 16 MB of flash and 1 MB boot ROMThree RS232-compatible serial ports (with external DB9 connectors)10/100baseTx Ethernet portUSB v1.1 client portCompactFlash slotFour programmable timer/countersSixteen-channel DMA controllerWatchdog timerReal-time clockEight buffered digital inputsEight buffered digital outputsRedBoot debug monitor program resident in boot ROMEmbedded Linux (based on kernel version 2.6) resident in flash Dengan demikian, kita bisa belajar banyak hal, mulai dari port access hingga ke networking. Prosesor dan memori Sekarang kita akan mempelajari mengenai dasar-dasar Prosesor: Ada dua jenis perangkat keras yang membentuk Prosesor : memory dan periferal. Memory untuk penyimpanan/temu kembali data dan kode. Sementara periferal adalah perangkat keras yang mengkoordinasikan interaksi dengan dunia luar atau melakukan suatu fungsi hardware tertentu. Contoh periferal pada embedded system adalah port serial dan timer. Keluarga prosesor berbasis Intel 80x86 memiliki dua sistem pengalamatan yang memungkinkan komunikasi dengan memori dan periferal. Sistem pengalamatan pertama diperuntukkan bagi perangkat memory, sementara sistem pengalamatan kedua diperuntukkan bagi periferal terutama I/O. Pemetaan memory Semua prosesor menyimpan data dan program di memory. Memory bisa terletak di dalam chip yang sama dengan prosesor atau diluar chip. Memory terletak pada memory space dan prosesor berkomunikasi dengan memory dengan menggunakan dua jalur yaitu address bus dan data bus. Address bus untuk menyimpan alamat dan data bus untuk menyimpan data. Selain itu ada jalur lain, yaitu control bus yang dipergunakan untuk membaca , menulis dan mengaktifkan ke berbagai perangkat didalam ruang lingkup pengalamatan memory. Sinyal untuk control bus termasuk : read, write dan chip-select (chip-enable). Saat kita akan menulis suatu program pada suatu board, sebaiknya kita baca dulu spesifikasi board tersebut, sehingga kita bisa tahun nama dan address range dari tiap perangkat memori dan periferal yang terletak pada ruang memory. Kita buat tabelnya. Tabel ini kita sebut peta memory (memory map). Tabel tersebut diorganisasikan sedemikian rupa sehingga alamat terkecil terletak paling bawah dan alamat tertinggi terletak di atas. Setiap kali kita menambahkan suatu perangkat ke peta memory, tempatkan pada lokasi yang benar dan beri label pada alamat awal dan akhir dalam hexadecimal. Sebagai contoh bila kita lihat diagram pada Arcom board dibawah ini maka kita lihat bahwa ada tiga perangkat yang terhubung pada address dan data bus, perangkat tersebut adalah RAM, ROM dan SMSC Ethernet controller. Peta memory dari diagram diatas kira-kira sebagai berikut (gambar hak cipta Michael Barr): Setelah kita membuat peta memory, kita buat header pada bahasa C sebagai berikut : /********************************************************************** * * Peta memory * * Base Address Ukuran Deskripsi * -------------- ----- ---------------------------------- * 0x00000000 64M SDRAM * 0x08000300 N/A Ethernet controller * 0x50000000 16M Flash * **********************************************************************/ #define

SDRAM_BASE (0x00000000) // definisi SDRAM #define ETHERNET_BASE (0x08000300) // definisi Ethernet #define FLASH_BASE (0x50000000) // Flash Setelah kita mengetahui nama dan alamat memori dan peripheral yang terhubung dengan prosesor, maka kita bisa membuat mereka berkomunikasi antara satu dengan lainnya (prosesor dengan peripheral). Ada dua metode komunikasi yaitu polling dan interrupt. Keduanya berbasis pada konsep ini, prosesor akan tahu alamat dan range periferal, prosesor akan memberikan tugas (berupa data) pada alamat tersebut, dan prosesor akan menunggu periferal menyelesaikan tugasnya. Contoh, ketika prosesor menugaskan timer menghitung dari 1000 ke 0. Pada detik dimana kalkulasi dimulai, prosesor hanya akan tertarik pada satu hal, apakah timer selesai menghitung atau tidak. Pada metode polling, prosesor akan menanyakan terus menerus pada peripheral (misal timer) apakah suatu tugas selesai dikerjakan atau tidak. Untuk mengimplementasikan polling, maka kita akan menciptakan iterasi yang membaca status register pada peripheral. Sebagai contoh : do { /* Hitung dari 1000 ke 0 */ ... /* Poll untuk melihat apakah perhitungan selesai. */ status = Nilai_Sudah_Nol( ); } while (status == NO); Metode komunikasi kedua adalah interrupt,interrupt adalah sinyal elektrik asinkronus dari peripheral ke prosesor. Pada interrupt, prosesor memberikan tugas pada peripheral seperti sebelumnnya, hanya saja, sekarang peripheral yang akan memberikan sinyal pada prosesor apakah tugas sudah selesai atau belum. So perbedaannya dengan polling adalah prosesor tidak terus menerus menanyakan status dari peripheral tapi peripheral yang akan memberitahukan statusnya sekarang (menginterupsi prosesor). Dengan metode interrupt, sementara menunggu peripheral menyelesaikan tugasnya, prosesor dapat melakukan instruksi-instruksi lain. Jika peripheral memberikan sinyal interupsi pada prosesor , maka prosesor akan menyelesaikan instruksi yang sedang dikerjakannya sekarang, kemudian menyimpan semua state pada instruksi yang sedang dikerjakannya saat ini, kemudian mengekskusi suatu rutin yang dinamakan interrupt service routine (ISR) atau interrupt handler, anda sebagai programmer embedded system yang akan membuat ISR ini. Saat ISR selesai, maka prosesor kembali ke state sebelum interupsi. Kelebihan interrupt adalah interrupt lebih menghemat resource dibandingkan polling, tapi kekurangannya adalah interrupt memiliki jeda waktu (overhead) yang lebih lama dibanding polling. Dalam prakteknya, polling dan interrupt sama-sama sering dipakai, polling untuk periferal yang membutuhan kecepatan dan interrupt untuk efisiensi prosesor. Mengenal databook/datasheet prosesor Bagi anda-anda yang belum terbiasa dengan embedded system programming, anda harus mulai mengenal makhluk satu ini, databook atau datasheet. Pada databook semua data penting mengenai periferal dan prosesor akan diberikan. Tiap prosesor akan berisi data yang berbeda sesuai arsitektur dari register dan instruction set. Semua yang ingin kita ketahui pada prosesor dapat kita temui pada databook.

You might also like