Home > World Of ICT > Security System: OpenCV with early alarm system using Visual C++ 2010

Security System: OpenCV with early alarm system using Visual C++ 2010


Idenya adalah untuk membuat program security yang bisa mendeteksi pergerakan object di screen, apabila ada sesuatu yang melewati area tertentu maka alarm akan berbunyi, cuplikan program untuk memunculkan suara alarm adalah sebagai berikut;

#include <Windows.h>
#include <mmsystem.h>

int suara() {
 PlaySound(TEXT("alarm.wav"), NULL, SND_ALIAS | SND_APPLICATION);
 return 1;
}

Pastikan anda menambahkan item  winmm.lib pada projectProperties->linker->input->additional dependencies

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: