EARLY DETECTION OF POTENTIAL FOREST FIRES USING ... [PDF]

May 2, 2003 - Hasil dari kajian ini dibandingkan dengan data kebakaran hutan dari Jabatan Bomba dan. Penyelamat, Malaysi

6 downloads 19 Views 3MB Size

Recommend Stories


Software fires detection and extinction for forest
Seek knowledge from cradle to the grave. Prophet Muhammad (Peace be upon him)

Forest fires
Raise your words, not voice. It is rain that grows flowers, not thunder. Rumi

Forest-Fires Monitoring System Using Wireless Technology
Don't watch the clock, do what it does. Keep Going. Sam Levenson

Indonesia Forest Fires
Kindness, like a boomerang, always returns. Unknown

Assessment of Central Siberia Forest Ecosystems Sustainability to Forest Fires
Happiness doesn't result from what we get, but from what we give. Ben Carson

Early detection of schizophrenia
Come let us be friends for once. Let us make life easy on us. Let us be loved ones and lovers. The earth

Early Detection of Atherosclerosis
Life is not meant to be easy, my child; but take courage: it can be delightful. George Bernard Shaw

Early fires foreshadow long season
You can never cross the ocean unless you have the courage to lose sight of the shore. Andrè Gide

Detection of Ventricular Fibrillation Using Random Forest Classifier
Be like the sun for grace and mercy. Be like the night to cover others' faults. Be like running water

'Bombing' Forest Fires: A Proposed Technology
Every block of stone has a statue inside it and it is the task of the sculptor to discover it. Mich

Idea Transcript


EARLY DETECTION OF POTENTIAL FOREST FIRES USING SATELLITE REMOTE SENSING TECHNIQUES

AIDA HAYATI BINTI MOHD HASSAN

A thesis submitted in fulfillment of the requirements for the award of the degree of Master of Science (Remote Sensing)

Faculty of Geoinformation Science and Engineering

JULY, 2008

iii

I owe huge gratitude to my family for their love and support, without which this thesis would most definitely never have been born. The ever patient and encouraging clan, the big engine that is such a motivation to this little train; Ijan, Ciputt, Bantai, Ina, Mamah, Aleen, Inon, Rina , Nora, Dayah and Vera.

iv

ACKNOWLEDGEMENTS

Look for good in life and you will find it. I want to express my gratitude to God who gave me the strength and guide me all the way to look for the good things in my life. I wish to thank my honoured supervisor, Profesor Dr Mazlan bin Hashim for his guidance, patience, and ideas. All his advice and thoughts will always be helpful to me in the future. I want to give credit to Professor Felix Kogan for spending his time and thoughts for this research. I received a lot of material from his journals and research. My appreciations also go to Encik Hassan Abdul Majid, Encik Wan Hazli Bin Wan Kadir and Encik Abdul Wahid Bin Rasib of the Department of Remote Sensing. Last but not least, my thanks to colleagues in the Radar Laboratory for their strong support and enthusiastism. They are among the people who always look at the sunny side of everything and think only the best.

v

ABSTRACT

In 1997/1998, Malaysia experienced one of the most severe forest fire episodes in history as a consequence of a prolonged dry season following the El- Niňo phenomenon. Since then, uncontrolled fires, atmospheric pollutions and haze remained as a common problem throughout the dry period in this region. The estimated cost of the damage caused by forest fires in Malaysia is about RM816.47 million a year. The loss by forest fire episodes has brought to light the importance of developing better tools for effective forest fire management systems. In this research, three sets of computer programmes were designed for: detecting hot spots; computing the fire risk index and generating spatial analysis for detected fires. Remote sensing and GIS techniques have both been integrated in this work. Eventually, a simple yet robust early warning system for forest fire detection in Malaysia has been devised. Thermal bands of MODIS (Moderate Resolution Imaging Spectroradiometer) were used to extract hot spot information and to generate a fire risk map. Proximity analysis was carried out using an extension in ArcView GIS software. The results from this research were compared with forest fire occurrence information from the Fire and Rescue Department of Malaysia (FRDM) and information of rainfall and temperature from the Malaysian Meteorological Services (MMS). High correlation (R2 = 0.8) was found between temperature derived from MODIS and the temperature obtained from the MMS. Forest fire map generated from the study also gave a high accuracy (71%). Normalized Difference Vegetation Index (NDVI) values derived from MODIS were found to be highly correlated (R2 = 0.7 and R2 = 0.85) with rainfall and temperature ",Qt::CaseInsensitive); line.remove("cmd=",Qt::CaseInsensitive); break; } }

QProcess *proc = new QProcess(this); QString program = line; QDir dir = ""; QString str = dir.currentPath(); QStringList arg; arg isOpen() == 2) { QMessageBox::warning(this,"Dialog - Error Opening cmd.exe", "Please set the correct path to cmd by modifying config.txt file"); } } }

void MainWindow::slot_dlg_convert() { //QProcess *proc = new QProcess(this); //QString program = "cmd.exe"; //QDir dir = ""; //QString str = dir.currentPath();

134 //QStringList arg; //arg start(program); if (proc->state() == 0) { QMessageBox::warning(this,"Dialog

-

Error

Opening

ARCVIEW.exe", "Please set the correct path to ARCVIEW by modifying config.txt file"); } } }

void MainWindow::slot_about() { QMessageBox::information(this,"GIS UTM Program - About", "Version\:\n 1.0\n\nDeveloper\:\nAida Hayati M Hassan ");

}

Coding for NDVI #include #include "Dialog_Ndvi.h"

137

Dialog_Ndvi::Dialog_Ndvi() { }

Dialog_Ndvi::Dialog_Ndvi(int ind) { title = "NDVI File Input Dialog"; list addWidget(label[0],0,0); layout_000->addWidget(label[1],1,0); layout_000->addWidget(label[2],2,0); layout_000->addWidget(lineedit[0],0,1,1,4); layout_000->addWidget(lineedit[1],1,1,1,4); layout_000->addWidget(lineedit[2],2,1,1,4); layout_000->addWidget(btn[0],0,6,1,1); layout_000->addWidget(btn[1],1,6,1,1); layout_000->addWidget(btn[2],2,6,1,1); layout_000->addWidget(btn_cancel,4,4); layout_000->addWidget(btn_ok,4,6);

this->setLayout(layout_000); }

void Dialog_Ndvi::slot_ok() { QString str; QByteArray ba;

str = lineedit[0]->text(); read(str,0); str = lineedit[1]->text();

139 read(str,1);

process();

str = lineedit[2]->text(); write(str);

this->close(); }

void Dialog_Ndvi::slot_browse_000() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[0]->setText(fileName);

QImage temp(fileName); pixel = matrix3d(browse,matrix2d(temp.width(),temp.height())); outp = matrix2d(temp.width(),matrix1d(temp.height())); }

void Dialog_Ndvi::slot_browse_001() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[1]->setText(fileName); }

void Dialog_Ndvi::slot_browse_002() { QString File"),"","*.tif");

fileName

=

QFileDialog::getSaveFileName(this,

tr("Save

140 lineedit[2]->setText(fileName); }

void Dialog_Ndvi::read(QString filename,int inp) { image = new QImage(filename); QRgb rgb; for (int i=0; iwidth()); i++) { for (int j=0; jheight()); j++) { rgb

= image->pixel(i,j);

pixel[inp][i][j] = qGray(rgb); maxh

= j;

} maxw = i; } maxh++; maxw++; }

void Dialog_Ndvi::process() { QString str; for (int i=0;iwidth()); i++) { for (int j=0; jheight()); j++) { outp[i][j]

=

((pixel[1][i][j]-pixel[0][i][j])

(pixel[1][i][j]+pixel[0][i][j])); outp[i][j] = (int) (100 * (outp[i][j]) + 1);

/

141 } } }

void Dialog_Ndvi::write(QString str) { image = new QImage(maxw,maxh,QImage::Format_RGB32); QRgb value; for (int i=0; isave(str,"TIFF",100) ) qWarning("Save Failed!"); else { strout = str; } }

Coding for VCI #include #include "Dialog_Vci.h"

142

Dialog_Vci::Dialog_Vci() { }

Dialog_Vci::Dialog_Vci(int ind) { title = "VCI File Input Dialog"; list addWidget(label[1],1,0); layout_000->addWidget(label[2],2,0); layout_000->addWidget(label[3],3,0); layout_000->addWidget(lineedit[0],0,1,1,4); layout_000->addWidget(lineedit[1],1,1,1,4); layout_000->addWidget(lineedit[2],2,1,1,4); layout_000->addWidget(lineedit[3],3,1,1,4); layout_000->addWidget(btn[0],0,6,1,1); layout_000->addWidget(btn[1],1,6,1,1); layout_000->addWidget(btn[2],2,6,1,1); layout_000->addWidget(btn[3],3,6,1,1); layout_000->addWidget(btn_cancel,4,4); layout_000->addWidget(btn_ok,4,6);

this->setLayout(layout_000); }

144 void Dialog_Vci::slot_ok() { QString str; QByteArray ba;

str = lineedit[0]->text(); read(str,0); str = lineedit[1]->text(); read(str,1); str = lineedit[2]->text(); read(str,2);

process();

str = lineedit[3]->text(); write(str);

this->close(); }

void Dialog_Vci::slot_browse_000() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[0]->setText(fileName);

QImage temp(fileName); pixel = matrix3d(browse,matrix2d(temp.width(),temp.height())); outp = matrix2d(temp.width(),matrix1d(temp.height())); }

void Dialog_Vci::slot_browse_001()

145 { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[1]->setText(fileName); }

void Dialog_Vci::slot_browse_002() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[2]->setText(fileName); }

void Dialog_Vci::slot_browse_003() { QString

fileName

=

QFileDialog::getSaveFileName(this,

File"),"","*.tif"); lineedit[3]->setText(fileName); }

void Dialog_Vci::read(QString filename,int inp) { image = new QImage(filename); QRgb rgb; for (int i=0; iwidth()); i++) { for (int j=0; jheight()); j++) { rgb

= image->pixel(i,j);

pixel[inp][i][j] = qGray(rgb); maxh } maxw = i;

= j;

tr("Save

146 } maxh++; maxw++; }

void Dialog_Vci::process() { for (int i=0;iwidth()); i++) { for (int j=0; jheight()); j++) { if ((pixel[2][i][j]-pixel[1][i][j]) ==0) { outp[i][j] = 0; } else { outp[i][j] = ( (pixel[0][i][j]-pixel[1][i][j]) / (pixel[2][i][j]pixel[1][i][j]) ); outp[i][j] = (int) (100 * (outp[i][j])); } } } }

void Dialog_Vci::write(QString str) { image = new QImage(maxw,maxh,QImage::Format_RGB32); QRgb value; for (int i=0; isave(str,"TIFF",100) ) qWarning("Save Failed!"); else { strout = str; } }

Coding For TCI #include #include "Dialog_Tci.h"

Dialog_Tci::Dialog_Tci() { }

Dialog_Tci::Dialog_Tci(int ind) { title = "TCI File Input Dialog"; list addWidget(label[1],1,0); layout_000->addWidget(label[2],2,0); layout_000->addWidget(label[3],3,0); layout_000->addWidget(lineedit[0],0,1,1,4); layout_000->addWidget(lineedit[1],1,1,1,4); layout_000->addWidget(lineedit[2],2,1,1,4); layout_000->addWidget(lineedit[3],3,1,1,4); layout_000->addWidget(btn[0],0,6,1,1); layout_000->addWidget(btn[1],1,6,1,1); layout_000->addWidget(btn[2],2,6,1,1); layout_000->addWidget(btn[3],3,6,1,1); layout_000->addWidget(btn_cancel,4,4); layout_000->addWidget(btn_ok,4,6);

this->setLayout(layout_000); }

void Dialog_Tci::slot_ok() { QString str; QByteArray ba;

str = lineedit[0]->text(); read(str,0); str = lineedit[1]->text(); read(str,1); str = lineedit[2]->text(); read(str,2);

process();

150

str = lineedit[3]->text(); write(str);

this->close(); }

void Dialog_Tci::slot_browse_000() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[0]->setText(fileName);

QImage temp(fileName); pixel = matrix3d(browse,matrix2d(temp.width(),temp.height())); outp = matrix2d(temp.width(),matrix1d(temp.height())); delete &temp; }

void Dialog_Tci::slot_browse_001() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[1]->setText(fileName); }

void Dialog_Tci::slot_browse_002() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[2]->setText(fileName); }

void Dialog_Tci::slot_browse_003()

151 { QString

fileName

=

QFileDialog::getSaveFileName(this,

File"),"","*.tif"); lineedit[3]->setText(fileName); }

void Dialog_Tci::read(QString filename,int inp) { image = new QImage(filename); QRgb rgb; for (int i=0; iwidth()); i++) { for (int j=0; jheight()); j++) { rgb

= image->pixel(i,j);

pixel[inp][i][j] = qGray(rgb); maxh

= j;

} maxw = i; } maxh++; maxw++; }

void Dialog_Tci::process() { for (int i=0;iwidth()); i++) { for (int j=0; jheight()); j++) { if ((pixel[2][i][j]-pixel[1][i][j]) ==0)

tr("Save

152 { outp[i][j] = 0; } else { outp[i][j] = ( (pixel[0][i][j]-pixel[1][i][j]) / (pixel[2][i][j]pixel[1][i][j]) ); outp[i][j] = (int) (100 * (outp[i][j])); } } } }

void Dialog_Tci::write(QString str) { image = new QImage(maxw,maxh,QImage::Format_RGB32); QRgb value; for (int i=0; isave(str,"TIFF",100) ) qWarning("Save Failed!"); else { strout = str;

153 } }

Coding for VH #include #include "Dialog_Vh.h" Dialog_Vh::Dialog_Vh() { } Dialog_Vh::Dialog_Vh(int ind) { title = "VH File Input Dialog"; list addWidget(label[0],0,0); layout_000->addWidget(label[1],1,0); layout_000->addWidget(label[2],2,0); layout_000->addWidget(lineedit[0],0,1,1,4); layout_000->addWidget(lineedit[1],1,1,1,4); layout_000->addWidget(lineedit[2],2,1,1,4); layout_000->addWidget(btn[0],0,6,1,1); layout_000->addWidget(btn[1],1,6,1,1); layout_000->addWidget(btn[2],2,6,1,1); layout_000->addWidget(btn_cancel,4,4); layout_000->addWidget(btn_ok,4,6); this->setLayout(layout_000); } void Dialog_Vh::slot_ok() { QString str; QByteArray ba; str = lineedit[0]->text(); read(str,0); str = lineedit[1]->text(); read(str,1); process(); str = lineedit[2]->text(); write(str); this->close(); }

void Dialog_Vh::slot_browse_000() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[0]->setText(fileName); QImage temp(fileName); pixel = matrix3d(browse,matrix2d(temp.width(),temp.height())); outp = matrix2d(temp.width(),matrix1d(temp.height())); }

155 void Dialog_Vh::slot_browse_001() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),""); lineedit[1]->setText(fileName); } void Dialog_Vh::slot_browse_002() { QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),"","*.tif"); lineedit[2]->setText(fileName); } void Dialog_Vh::read(QString filename,int inp) { image = new QImage(filename); QRgb rgb; for (int i=0; iwidth()); i++) { for (int j=0; jheight()); j++) { rgb pixel[inp][i][j] = qGray(rgb); maxh = j; } maxw = i; } maxh++; maxw++; }

= image->pixel(i,j);

void Dialog_Vh::process() { QString str; for (int i=0;iwidth()); i++) { for (int j=0; jheight()); j++) { outp[i][j] = (pixel[1][i][j] + pixel[0][i][j]) / 2; //outp[i][j] = (int) (100 * (outp[i][j]) + 1); } } } void Dialog_Vh::write(QString str) {

156 image = new QImage(maxw,maxh,QImage::Format_RGB32); QRgb value; for (int i=0; isave(str,"TIFF",100) ) qWarning("Save Failed!"); else { strout = str; } }

Coding for Fire Risk Map #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include

157 #include #include #include #include #include

#include "WindowCalc.h" #include "Dialog.h"

WindowCalc::WindowCalc(QWidget *parent) : QMainWindow(parent) { this->showMaximized(); frame = new QFrame(); frame->setFrameStyle(QFrame::Panel);

this->setWindowTitle("Calculation Window"); //this->setGeometry(50,50,800,600);

statusBar = new QStatusBar(this); this->setStatusBar(statusBar); statusBar->showMessage("None currently processed.");

menuBar = new QMenuBar(); menu_Text_File = new QMenu("File"); menu_Text_Edit = new QMenu("Edit");

act_Open = new QAction("Open File",menu_Text_File); act_Open->setShortcut(QKeySequence("Ctrl+O")); connect(act_Open,SIGNAL(triggered()),this,SLOT(slot_open()));

act_Exit = new QAction("Exit",menu_Text_File);

158 act_Exit->setShortcut(QKeySequence("Ctrl+E")); connect(act_Exit,SIGNAL(triggered()),this,SLOT(close()));

act_SetFire = new QAction("Set Fire Input",menu_Text_Edit); connect(act_SetFire,SIGNAL(triggered()),this,SLOT(slot_setFire()));

act_FileInfo = new QAction("File Information",menu_Text_Edit); connect(act_FileInfo,SIGNAL(triggered()),this,SLOT(slot_fileInfo())); act_FileInfo->setEnabled(false);

act_clearImage = new QAction("Close File",menu_Text_Edit); act_clearImage->setShortcut(QKeySequence("Ctrl+p")); connect(act_clearImage,SIGNAL(triggered()),this,SLOT(slot_clearImage()));

menu_Text_File->addAction(act_Open); menu_Text_File->addAction(act_clearImage); menu_Text_File->addAction(act_Exit); menu_Text_Edit->addAction(act_SetFire); menu_Text_Edit->addAction(act_FileInfo);

menuBar->addMenu(menu_Text_File); menuBar->addMenu(menu_Text_Edit); this->setMenuBar(menuBar);

btn_ndvi = new QPushButton("NDVI"); QObject::connect(btn_ndvi,SIGNAL(clicked()),this,SLOT(slot_ndvi()));

btn_vci = new QPushButton("VCI"); QObject::connect(btn_vci,SIGNAL(clicked()),this,SLOT(slot_vci()));

btn_tgi = new QPushButton("TCI");

159 QObject::connect(btn_tgi,SIGNAL(clicked()),this,SLOT(slot_tci()));

btn_vh = new QPushButton("VH"); QObject::connect(btn_vh,SIGNAL(clicked()),this,SLOT(slot_vh()));

btn_fire = new QPushButton("Fire Risk Map"); QObject::connect(btn_fire,SIGNAL(clicked()),this,SLOT(slot_fire()));

label = new QLabel(); label->resize(600,600); label->setFrameStyle(QFrame::Box); label->setScaledContents(true);

layout_000 = new QGridLayout();

layout_000->setSizeConstraint(QLayout::SetMaximumSize);

groupBox1 = new QGroupBox("Main Function"); groupBox2 = new QGroupBox("Image Display - No Image Loaded");

layout_001 = new QVBoxLayout(); layout_002 = new QVBoxLayout();

const QRect rect(0,0,100,600); layout_001->setGeometry(rect);

layout_001->addWidget(btn_ndvi); layout_001->addWidget(btn_vci); layout_001->addWidget(btn_tgi); layout_001->addWidget(btn_vh); layout_001->addWidget(btn_fire);

160 layout_002->addWidget(label); groupBox1->setLayout(layout_001); groupBox2->setLayout(layout_002); layout_000->addWidget(groupBox1,0,0); layout_000->addWidget(groupBox2,0,1,2,4); frame->setLayout(layout_000); this->setCentralWidget(frame);

// by default, setFire is 3 input (3-1=2) setFire = 2; }

void WindowCalc::slot_ndvi() { dialog_ndvi = new Dialog_Ndvi(3); dialog_ndvi->exec(); QString str = dialog_ndvi->strout; if (! str.isEmpty()) { str_img = str; act_FileInfo->setEnabled(true); image = new QImage(str); label->setPixmap(QPixmap::fromImage(*image)); str = "Image Display - Loaded: " + str; groupBox2->setTitle(str); } }

void WindowCalc::slot_vci() { dialog_vci = new Dialog_Vci(4);

161 dialog_vci->exec(); QString str = dialog_vci->strout; if (! str.isEmpty()) { str_img = str; act_FileInfo->setEnabled(true); image = new QImage(str); label->setPixmap(QPixmap::fromImage(*image)); str = "Image Display - Loaded: " + str; groupBox2->setTitle(str); } }

void WindowCalc::slot_tci() { dialog_tci = new Dialog_Tci(4); dialog_tci->exec(); QString str = dialog_tci->strout; if (! str.isEmpty()) { str_img = str; act_FileInfo->setEnabled(true); image = new QImage(str); label->setPixmap(QPixmap::fromImage(*image)); str = "Image Display - Loaded: " + str; groupBox2->setTitle(str); } }

void WindowCalc::slot_vh() {

162 dialog_vh = new Dialog_Vh(3); dialog_vh->exec(); QString str = dialog_vh->strout; if (! str.isEmpty()) { str_img = str; act_FileInfo->setEnabled(true); image = new QImage(str); label->setPixmap(QPixmap::fromImage(*image)); str = "Image Display - Loaded: " + str; groupBox2->setTitle(str); } }

void WindowCalc::slot_fire() { dialog_fire = new Dialog_Fire(setFire); dialog_fire->exec(); QString str = dialog_fire->strout; if (! str.isEmpty()) { str_img = str; act_FileInfo->setEnabled(true); image = new QImage(str); label->setPixmap(QPixmap::fromImage(*image)); str = "Image Display - Loaded: " + str; groupBox2->setTitle(str); } }

void WindowCalc::slot_setFire()

163 { dlg_queryFire = new Dlg_QueryFire(setFire); dlg_queryFire->exec(); setFire = dlg_queryFire->num; }

void WindowCalc::slot_clearImage() { label->clear(); image = NULL; str_img = ""; act_FileInfo->setEnabled(false); groupBox2->setTitle("Image Display - No Image Loaded"); }

void WindowCalc::slot_open() { QString str = QFileDialog::getOpenFileName(this, tr("Open File"),"","Images (*.tif *.tiff)"); image = new QImage(str); str_img = str; label->setPixmap(QPixmap::fromImage(*image)); str = "Image Display - Loaded: " + str; groupBox2->setTitle(str); act_FileInfo->setEnabled(true); }

void WindowCalc::slot_fileInfo() { QString str; QString temp;

164 if (! str_img.isEmpty()) { QFileInfo file(str_img); temp = file.fileName(); str = str + "File Name: " + temp + "\n"; temp = file.absolutePath(); str = str + "File Path: " + temp + "\n"; str = str + "Image Depth Size: " + temp.setNum(image->depth()) + "\n"; str = str + "Image Width: " + temp.setNum(image->width()) + "\n"; str = str + "Image Size: " + temp.setNum(image->height()) + "\n"; if (image->isGrayscale()) temp = "yes"; else temp = "no";

str = str + "Is GrayScale: " + temp + "\n"; QMessageBox::information(this,"File Information",str); } }

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.