Документація Semi-Automatic Classification Plugin

Вступ

Розроблений Luca Congedo, Semi-Automatic Classification Plugin (SCP) безкоштовний модуль з відкритим вихідним кодом для QGIS для проведення напівавтоматичної класифікації (також відомої як керована класифікація) даних дистанційного зондування. Він забезпечує декількома інструментами для завантаження безкоштовних космічних ознімків, передоброблення, післяоброблення, та растрових розрахунків (будь ласка дивіться Що я можу робити з SCP?).

Загальна мета SCP - забезпечити набором взаємопов’язаних інструментів оброблення растрів для автоматизації робочого процесу та спрощення класифікації земельних покривів, щоб її могли виконувати не лише фахівці в галузі дистанційного зондування. Перша версія SCP була розроблена Luca Congedo у 2012 для «ACC Dar Project» з метою створення доступного інструмента автоматизованої класифікації земельних покривів; наступні версії SCP було розроблено на знак особистої відданості галузі дистанційного зондування та філософії відкритого вихідного коду. SCP версії 6 (кодова назва: Greenbelt) розроблено в рамках роботи Luca Congedo над PhD (кандидатською дисертацією) за напрямком Landscape and Environment в Sapienza University of Rome.

Посібник користувача містить інформацію щодо Встановлення модуля SCP та Інтерфейс SCP, а також детальну характеристику всіх функціональних можливостей. Крім того, Короткий вступ до дистанційного зондування висвітлює основні концепції та визначення, необхідні для застосування SCP.

Для вивчення основних функцій SCP доступні Базові навчальні матеріали.

Ласкаво запрошуємо посприяти SCP (див. Як долучитись та сприяти SCP) та приєднатись до групи Facebook . Також будь ласка ознйомтесть з Часті питання.

Щоб отримати більше інформації та навчальних матеріалів, завітайте до офіційного сайту.


Посилання:

Congedo Luca (2016). Semi-Automatic Classification Plugin Documentation. DOI: http://dx.doi.org/10.13140/RG.2.2.29474.02242/1


Ліцензія:

Якщо не зазначено інше, то зміст цієї роботи поширюється на умовах ліцензії Creative Commons Із зазначенням авторства - Поширення на тих самих умовах 4.0 Міжнародна.

Semi-Automatic Classification Plugin - вільне програмне забезпечення: ви можете поширювати та/або змінювати його на умовах версії 3 Стандартної громадської ліцензії GNU, опублікованої Фондом вільного програмного забезпечення. Semi-Automatic Classification Plugin поширюється з надією, що він буде корисним, але БЕЗ ЖОДНИХ ГАРАНТІЙ; навіть без обв'язкової гарантії ПРИДАТНОСТІ ДЛЯ ПРОДАЖУ або ВІДПОВІДНОСТІ ПЕВНІЙ ВИЗНАЧЕНІЙ МЕТІ. Для більш докладної  інформації дивіться Стандартну громадську ліцензію GNU, копію якої ви повинні були отримати разом з Semi-Automatic Classification Plugin. В іншому випадку дивіться http://www.gnu.org/licenses/.


Перекладачі:

Українська: Дар’я Свідзінська


Встановлення модуля

The Semi-Automatic Classification Plugin requires the installation of GDAL, OGR, NumPy, SciPy and Matplotlib (already bundled with QGIS).
This chapter describes the installation of the Semi-Automatic Classification Plugin for the supported Operating Systems.

Встановлення у Windows 32 біт

Завантаження та встановлення QGIS

  • Завантажте найновішу версію QGIS 32 біт звідси ;
  • Виконайте встановлення QGIS з правами адміністратора, приймаючи стандартні налаштування.

Тепер QGIS встановлено.

_images/QGIS.jpg

Встановлення Semi-Automatic Classification Plugin

  • Запустіть QGIS;
  • З головного меню виберіть Plugins > Manage and Install Plugins;
_images/install.jpg _images/plugins.jpg
  • SCP повинен бути активований автоматично; тим не менше, переконайтесь, що в меню Installed активовано Semi-Automatic Classification Plugin (для завершення встановлення SCP може знадобитись перезапуск QGIS);
_images/plugins_installed.jpg

Налаштування модуля

Тепер, коли Semi-Automatic Classification Plugin встановлено, до QGIS додано відповідні панелі. Також, меню SCP доступне з панелі меню QGIS. Панель, що плаває, та панель інструментів можна переміщувати відповідно до ваших потреб, як це показано на рисунку.

_images/SemiAutomaticClassificationPlugin.jpg

Встановлення у Windows 64 біт

Завантаження та встановлення QGIS

  • Завантажте найновішу версію QGIS 64 біт звідси ;
  • Виконайте встановлення QGIS з правами адміністратора, приймаючи стандартні налаштування.

Тепер QGIS встановлено.

_images/QGIS.jpg

Встановлення Semi-Automatic Classification Plugin

  • Запустіть QGIS;
  • З головного меню виберіть Plugins > Manage and Install Plugins;
_images/install.jpg _images/plugins.jpg
  • SCP повинен бути активований автоматично; тим не менше, переконайтесь, що в меню Installed активовано Semi-Automatic Classification Plugin (для завершення встановлення SCP може знадобитись перезапуск QGIS);
_images/plugins_installed.jpg

Налаштування модуля

Тепер, коли Semi-Automatic Classification Plugin встановлено, до QGIS додано відповідні панелі. Також, меню SCP доступне з панелі меню QGIS. Панель, що плаває, та панель інструментів можна переміщувати відповідно до ваших потреб, як це показано на рисунку.

_images/SemiAutomaticClassificationPlugin.jpg

Для зменшення часу обробки рекомендується налаштувати доступну RAM. З Меню SCP виберіть settings_tool Settings > Processing .

_images/settings_processing.jpg

У Settings, встановіть значення Available RAM (MB) вдвічі менше за системну RAM. Наприклад, якщо ваша система має 2 Гб RAM, то встановіть значення 1024 Мб.

_images/settings_processing_tab.jpg

Встановлення в Ubuntu Linux

Завантаження та встановлення QGIS

  • Відкрийте термінал та надрукуйте:

    sudo apt-get update
    
  • Натисніть Enter та надрукуйте пароль користувача;

  • Надрукуйте в терміналі:

    sudo apt-get install qgis python3-matplotlib python3-scipy
    
  • Натисніть Enter та зачекайте поки програмне забезпечення буде завантажене та встановлене.

Тепер QGIS встановлено.

_images/QGIS_u.jpg

Встановлення Semi-Automatic Classification Plugin

  • Запустіть QGIS;
  • З головного меню виберіть Plugins > Manage and Install Plugins;
_images/install_u.jpg _images/plugins.jpg
  • SCP повинен бути активований автоматично; тим не менше, переконайтесь, що в меню Installed активовано Semi-Automatic Classification Plugin (для завершення встановлення SCP може знадобитись перезапуск QGIS);
_images/plugins_installed.jpg

Налаштування модуля

Тепер, коли Semi-Automatic Classification Plugin встановлено, до QGIS додано відповідні панелі. Також, меню SCP доступне з панелі меню QGIS. Панель, що плаває, та панель інструментів можна переміщувати відповідно до ваших потреб, як це показано на рисунку.

_images/SemiAutomaticClassificationPlugin.jpg

Для зменшення часу обробки рекомендується налаштувати доступну RAM. З Меню SCP виберіть settings_tool Settings > Processing .

_images/settings_processing.jpg

У Settings, встановіть значення Available RAM (MB) вдвічі менше за системну RAM. Наприклад, якщо ваша система має 2 Гб RAM, то встановіть значення 1024 Мб.

_images/settings_processing_tab.jpg

Встановлення в Debian Linux

Завантаження та встановлення QGIS

  • Відкрийте термінал та надрукуйте:

    sudo apt-get update
    
  • Натисніть Enter та надрукуйте пароль користувача;

  • Надрукуйте в терміналі:

    sudo apt-get install qgis python3-matplotlib python3-scipy
    
  • Натисніть Enter та зачекайте поки програмне забезпечення буде завантажене та встановлене.

Тепер QGIS встановлено.

_images/QGIS_d.jpg

Встановлення Semi-Automatic Classification Plugin

  • Запустіть QGIS;
  • З головного меню виберіть Plugins > Manage and Install Plugins;
_images/install_d.jpg _images/plugins.jpg
  • SCP повинен бути активований автоматично; тим не менше, переконайтесь, що в меню Installed активовано Semi-Automatic Classification Plugin (для завершення встановлення SCP може знадобитись перезапуск QGIS);
_images/plugins_installed.jpg

Налаштування модуля

Тепер, коли Semi-Automatic Classification Plugin встановлено, до QGIS додано відповідні панелі. Також, меню SCP доступне з панелі меню QGIS. Панель, що плаває, та панель інструментів можна переміщувати відповідно до ваших потреб, як це показано на рисунку.

_images/SemiAutomaticClassificationPlugin.jpg

Для зменшення часу обробки рекомендується налаштувати доступну RAM. З Меню SCP виберіть settings_tool Settings > Processing .

_images/settings_processing.jpg

У Settings, встановіть значення Available RAM (MB) вдвічі менше за системну RAM. Наприклад, якщо ваша система має 2 Гб RAM, то встановіть значення 1024 Мб.

_images/settings_processing_tab.jpg

Встановлення в ОС Mac

Завантаження та встановлення QGIS

  • Download and install the latest version of QGIS and GDAL from here .

Тепер QGIS встановлено.

_images/QGIS_u.jpg

Встановлення Semi-Automatic Classification Plugin

  • Запустіть QGIS;
  • З головного меню виберіть Plugins > Manage and Install Plugins;
_images/install_u.jpg _images/plugins.jpg
  • SCP повинен бути активований автоматично; тим не менше, переконайтесь, що в меню Installed активовано Semi-Automatic Classification Plugin (для завершення встановлення SCP може знадобитись перезапуск QGIS);
_images/plugins_installed.jpg

In case of missing dependencies, you could get error messages such as the following example with matplotlib:

_images/error_message_mac.jpg

To install matplotlib type in a terminal:

sudo pip3 install matplotlib

and repeat this step for other missing dependencies.

Налаштування модуля

Тепер, коли Semi-Automatic Classification Plugin встановлено, до QGIS додано відповідні панелі. Також, меню SCP доступне з панелі меню QGIS. Панель, що плаває, та панель інструментів можна переміщувати відповідно до ваших потреб, як це показано на рисунку.

_images/SemiAutomaticClassificationPlugin.jpg

Для зменшення часу обробки рекомендується налаштувати доступну RAM. З Меню SCP виберіть settings_tool Settings > Processing .

_images/settings_processing.jpg

У Settings, встановіть значення Available RAM (MB) вдвічі менше за системну RAM. Наприклад, якщо ваша система має 2 Гб RAM, то встановіть значення 1024 Мб.

_images/settings_processing_tab.jpg

Інтерфейс SCP

Інтерфейс SCP складається з декількох частин, які докладно описано нижче.

Меню SCP

_images/SCP_menu.jpg

Меню SCP

Меню SCP забезпечує доступ до основних функцій Main Interface Window, Графік спектральних сигнатур та Графік розсіву.

Панель SCP

Панель SCP забезпечує створення ROI (від англ. Regions Of Interest - області інтересу), спектральних сигнатур та класифікацію Band set. Входові навчальні дані, створені з SCP, зберігають полігони ROI та спектральні сигнатури, що використовуються для класифікації земельних покривів (див. Tutorial 1: Your First Land Cover Classification).

ROI це полігони, що використовуються для визначення спектральних характеристик класів земельного покриву. Спектральні сигнатури класів розраховуються за ROI або можуть бути імпортовані з інших джерел (див. Import signatures). Варто зазначити, що класифікація завжди ґрунтується на спектральних сигнатурах.

SCP забезпечує створення тимчасових полігонів ROI з використанням алгоритму нарощування області або ручного окреслювання за допомогою інструментів Робоча панель. Тимчасові полігони ROI можуть бути збережені до Входові навчальні дані разом з спектральними сигнатурами ROI.

Входові навчальні дані складаються з векторної частини (тобто шейпфайлу) та незалежної частини спектральних сигнатур. Атрибутивна таблиця векторної частини містить чотири поля, як в таблиці нижче.

Поля входових навчальних даних
Характеристика Ім’я поля Тип поля
Унікальний ідентифікатор макрокласу MC_ID ціле
Характеристика макрокласу MC_info текст
Унікальний ідентифікатор класу C_ID ціле
Характеристика класу C_info текст

В SCP класи земельного покриву (та ROI) визначаються системою Класів (ID класу) та Макрокласів (ID макрокласу) (див. Класи та макрокласи), які використовуються в процесі класифікації; кожний ID макрокласу співвідноситься з Характеристика макрокласу (тобто ім’я макрокласу) та кожний ID класу співвідноситься з Характеристика класу (тобто ім’я класу), але тільки ID макрокласу та ID класу використовуються в процесі класифікації.

Використання ID макрокласу або ID класу для проведення класифікації визначається вибором Використовувати MC ID або C ID на вкладці Алгоритм. Варто зазначити, що при використанні ID макрокласу всі спектральні сигнатури оцінюються поокремо та кожен піксель відноситься до відповідного MC ID (тобто комбінування сигнатур перед класифікацією відсутнє).

Класифікація може бути проведена як для всього зображення ( Алгоритм ) так і для його частини зі створенням Попередній перегляд результатів класифікації.

Панель SCP містить наступні вкладки:

Ліва сторона Панелі SCP містить кнопки доступу до основних функцій SCP.

Домашня

_images/SCP_home.jpg

Домашня

Вкладка Домашня містить кнопки доступу до основних функцій SCP:

Новини SCP

Ця секція відображає новини про SCP та пов’язані сервіси. Новини завантажуються під час запуску (необхідне Інтернет-з’єднання). Ця можливість може бути увімкнена або вимкнена в налаштуваннях Dock.

Вона також містить наступні кнопки:

  • Посібник користувача: відкрити посилання на посібник користувача;
  • Поставити питання: відкрити посилання на онлайн-довідку;
  • Підтримати SCP: відкрити посилання на підтримку SCP ;

Входові навчальні дані

_images/roi_signature_list.jpg

Входові навчальні дані

Цей інструмент забезпечує створення файлу входових навчальних даних (.scp ), необхідного для збереження ROI та спектральних сигнатур. Файл входових навчальних даних створюється у відповідності з характеристиками активного набору каналів, визначеного у ref:band_set_tab. Новий файл входових навчальних даних повинен бути створений для кожного набору каналів, за винятком тих випадків, коли набори каналів мають ідентичні спектральні характеристики та системи координат.

  • open_file: відкрити входовий навчальний файл; ROI та спектральні сигнатури завантажуються до Перелік сигнатур ROI; векторна частина входових навчальних даних завантажується до QGIS;
  • new_file: створити пустий входовий навчальний файл (.scp); векторна частина входових навчальних даних завантажується до QGIS; під час збереження входових навчальних даних також створюється резервний файл (файл .scp.backup в тому самому каталозі, що і файл .scp);
  • Входові навчальні дані input_text project_save: відображає шлях до входового навчального файлу;

Входові навчальні дані відображаються у QGIS як векторний файл. ROI та спектральні сигнатури відображаються у Перелік сигнатур ROI. Макрокласии визначаються на Макрокласи.

Перелік сигнатур ROI

Вкладка Перелік сигнатур ROI відображає полігони ROI та спектральні сигнатури, що містяться у файлі входових навчальних даних. Якщо елемент - це полігон ROI, двічі клацніть на ньому, щоб наблизитись до цієї ROI на карті. Елементи в таблиці можуть бути виділені клацанням лівою кнопкою мишки.

Зміни в Переліку сигнатур ROI застосовуються до файлу Входові навчальні дані лише під час збереження проекту QGIS. В цій таблиці ROI можуть бути відредаговані, видалені або об’єднані.

ROI та спектральні сигнатури можуть бути імпортовані з інших джерел (див. Import signatures) та експортовані (див. Export signatures).

ЗАСТЕРЕЖЕННЯ: З метою уникнення втрати даних, не редагуйте вектор Входові навчальні дані інструментами QGIS. Застосовуйте лише інструменти SCP для управління Входовими навчальними даними.
  • input_table Перелі сигнатур ROI:
    • S: перемикач вибору; тільки спектральні, що сигнатури позначені в цьому переліку, будуть використані в процесі класифікації;
    • Type: тип елемента:
      • R = тільки полігон ROI;
      • S = тільки спектральна сигнатура;
      • B = обидві, ROI та спектральна сигнатура;
    • MC ID: унікальний ідентифікатор макрокласу ROI [ціле]; редагується одинарним клацанням; MC Info відображається у Макрокласи; якщо ID спектральної сигнатури дорівнює 0, тоді пікселі, що належать до неї, позначаються як некласифіковані;
    • C ID: унікальний ідентифікатор класу ROI [ціле]; редагується одинарним клацанням;
    • C Info: характеристика класу ROI [текст]; редагується одинарним клацанням;
    • Колір: колір C ID; двічі клацніть для вибору кольору класу, який буде застосований при відображенні класифікації; якщо ID спектральної сигнатури дорівнює 0, тоді пікселі, що належать до цієї сигнаури позначаються як некласифіковані;
  • merge_sign: об’єднати виділені спектральні сигнатури або ROI з отриманням нової сигнатури, що розраховується як середнє значень сигнатури для кожного каналу (з виключенням матриці коваріації);
  • calculate_signature: розрахувати спектральні сигнатури виділених ROI з використанням активного набору каналів на Band set;
  • delete_signature: видалити виділені ROI та сигнатури;
  • sign_plot: відобразити спектральну сигнатуру ROI на Графік спектральних сигнатур; спектральні сигнатури розраховуються на основі Band set;
  • scatter_plot : відкрити Графік розсіву;
  • import_spectral_library: відкрити вкладку Import signatures;
  • export_spectral_library: відкрити вкладку Export signatures;

ROI Signature list це доповнення до Робоча панель, що дозволяє зберігати ROI до Входові навчальні дані з визначенням класів та макрокласів. Band set повинна бути визначена до створення ROI та полігони ROI мають знаходитись всередині території охоплення Band set.

  • MC ID input_number project_save: унікальний ідентифікатор макрокласу ROI [ціле]; відповідна MC Info буде завантажена, якщо вона вже визначена у Макрокласи;
  • MC Info input_text project_save: характеристика макрокласу ROI [текст]; стиль та характеристика макрокласів визначаються у Макрокласи;
  • C ID input_number project_save: унікальний ідентифікато класу ROI [ціле];
  • C Info input_text project_save: характеристика класу ROI [текст];
  • undo_save_roi: видалити останню збережену ROI з Входові навчальні дані;
  • checkbox Autosave project_save: якщо параметр увімкнено, то ROI Signature list автоматично зберігається до Входові навчальні дані кожного разу, коли зберігається ROI;
  • checkbox Calculate sig. project_save: якщо параметр увімкнено, то під час збереження ROI буде розраховано її спектральну сигнатуру (на основі значень пікселів Band set, що охоплюються полігоном ROI) та збережено до Входові навчальні дані (час розрахунку залежить від кількості каналів active band set у Band set);
  • save_roi: зберегти тимчасову ROI до Входові навчальні дані, застосовуючи визначені класи та макрокласи; ROI унаочнюється в Перелік сигнатур ROI;
Макрокласи
_images/macroclasses_style.jpg

Макрокласи

Macroclasses забезпечують визначення Назв та кольорів макрокласів (використовуються для відображення результатів Попередній перегляд результатів класифікації та Алгоритм). Відповідно до Алгоритм, класифікації, що виконуються на підставі C ID, мають кольори, визначені для класів в Перелік сигнатур ROI; класифікації, що виконуються на підставі MC ID, мають кольори, визначені у classification_style.

MC ID автоматично додаються до цієї таблиці, коли нова ROI зберігається до Перелік сигнатур ROI (якщо MC ID вже не додано до переліку). Налаштування зберігаються в Входові навчальні дані.

  • input_table Макрокласи project_save:
    • MC ID: унікальний ідентифікатор макрокласу [ціле]; редагується одинарним клацанням;
    • MC Info: характеристика макрокласу [текст]; редагується одинарним клацанням;
    • Колір: колір MC ID; двічі клацніть, щоб вибрати колір для макрокласу, яки буде використовуватись для відображення результатів класифікації;
  • add: додати новий рядок до таблиці;
  • remove: видалити виділені рядки з таблиці;
Параметри ROI
_images/roi_options.jpg

Параметри ROI

Параметри ROI зручні для відображення значень пікселів або покращення створення ROI.

  • checkbox Відобразити input_list project_save: якщо вказівник створення ROI активовано (див. Робоча панель), то для даного пікселя на карті відображається значення вибраного вегетаційного індекса; з спадного списку доступні такі вегетаціні індекси:
    • NDVI (Normalized Difference Vegetation Index - нормалізований різницевий вегетаційний індекс); NDVI потребує ближнього інфрачервоного та червоного каналів;
    • EVI (Enhanced Vegetation Index - вдосконалений вегетаційний індекс); EVI потребує синій, ближній інфрачервоний та червоний канали, перераховані в значення відбивальності; довжина хвиль повинна бути визначена на Band set;
    • Нетиповий; застосувати нетиповий вираз, визначений наступним рядком;
    • input_text project_save: визначити нетиповий вираз; вираз ґрунтується на Band set; канали визначаються як bandset#b + номер каналу (тобто, bandset#b1 для першого каналу з Band set); наприклад, NDVI для зображення Landsat буде представлений як ( bandset#b4 - bandset#b3 ) / ( bandset#b4 + bandset#b3 );
  • checkbox Rapid ROI b. input_number project_save: якщо параметр увімкнено, то тимчасова ROI створюється з застосуванням алгоритму нарощування області з використанням тільки одного каналу Band set (тобто нарощування області відбувається швидше); канал визначається номером в Band set; якщо параметр вимкнено, то ROI є результатом перетину між ROI, розрахованими для кожного каналу (тобто нарощування області відбувається повільніше, але ROI спектрально однорідні за кожним каналом);
  • radiobutton Auto-refresh ROI: автоматично розраховувати нову тимчасову ROI під час зміни Region growing parameters на Робоча панель;
  • radiobutton Auto-plot: автоматично розрахувати спектральну сигнатуру тимчасової ROI та відобразити її на Графік спектральних сигнатур (MC Info цієї спектральної сигнатури позначається tempo_ROI);

Класифікація

_images/classification_alg.jpg

Classification

Ця вкладка забезпечує класифікацію active band set визначеного у Band set.

Класифікація відбувається з використанням active band set та спектральних сигнатур, увімкнених у Перелік сигнатур ROI. На цій вкладці визначаються декілька параметрів класифікації, які також впливають на процес класифікації під час Попередній перегляд результатів класифікації.

Зокрема, доступні наступні параметри:

  • Застосувати checkbox MC ID checkbox C ID registry_save: якщо MC ID увімкнено, то класифікація відбувається на підставі унікальних ідентифікаторів макрокласів (код сигнатури MC ID); якщо увімкнено C ID, то класифікація відбувається на підставі унікальних ідентифікаторів класів (код сигнатури C ID);
  • weight_tool : відкрити Algorithm band weight для визначення вагових коефіцієнтів каналів;
Алгоритм

Цей інструмент забезпечує вибір алгоритму класифікації та необов’язкове визначення порогових величин.

  • input_list project_save: доступні Алгоритми класифікації:

  • Threshold input_number optional: дозволяє визначати порогову величину класифікації (застосовується до всіх спектральних сигнатур); якщо Threshold дорівнює 0, то порогові величини Signature threshold оцінюються; зокрема:
    • для Мінімальної відстані пікселі не класифікуються, якщо відстань більша за значення порогової величини;
    • для Максимальної імовірності пікселі не класифікуються, якщо імовірність менша за значення порогової величини (максимально 100);
    • для Картографування спектрального кута пікселі не класифікуються. якщо спектральний кут більший за значення порогової величини (максимально 90).
  • threshold_tool: відкрити Signature threshold для визначення порогових величин сигнатур;

Класифікація сигнатур земельного покриву

Класифікація сигнатур земного покриву це класифікація, яка може бути використана в якості альтернативи або у поєднанні з Алгоритм (див. LCS threshold). Пікселі, що належать до двох або більше класів (або макрокласів) класифікуються як Class overlap з значеннями растра = -1000.

  • Use checkbox LCS checkbox Algorithm checkbox only overlap: якщо параметр LCS увімкнено , то застосовується Land Cover Signature Classification; якщо параметр Алгоритм увімкнено, то вибраний Алгоритм застосовується до некласифікованих пікселів Класифікація сигнатур земельного покриву; якщо увімкнено тільки перекриття, вибраний Алгоритм застосовується лише до пікселів з класів, що перекриваються за Класифікація сигнатур земельного покриву; некласифіковані пікселі Класифікація сигнатур земельного покриву залишаються некласифікованими;
  • threshold_tool: відкрити LCS threshold;
Результат класифікації

Classification output забезпечує класифікацію Band set відповідно до параметрів визначених у Алгоритм.

Додатково, в якості стилю класифікації може бути відкритий та використаний завчасно збережений стиль класифікації (файл QGIS .qml) .

Растр класифікації це файл .tif (файл стилю QGIS .qml зберігається разом з результатом класифікації); додатково можуть бути розраховані і інші результати. Після завершення розрахунків, результат завантажуються до QGIS.

  • Відкрити qml open_file project_save: вибрати файл .qml, скасовуючи кольори, визначені для C ID або MC ID;
  • reset: повернутись до стандартного стилю (тобто використовувати кольори, визначені для C ID або MC ID);
  • checkbox Застосувати маску optional: якщо увмікнено, то для маскування результатів класифікації може бути використаний шейп-файл (тобто, територія поза межами шейп-файлу не класифікується);
  • reset: повторно встановити шейп-файл маски;
  • checkbox Створити вектор optional: якщо увімкнено, то додатково до растру класифікації зберігається шейп-файл класифікації до того ж каталогу і під тією самою назвою, що і Результат класифікації; перетворення у вектор може бути реалізоване і пізніше (див. Classification to vector);
  • checkbox Звіт за результатами класифікації optional: якщо увімкнено, то розраховується звіт за результатами класифікації земельного покриву та зберігається як файл .csv в той самий каталог та під тією самою назвою (з приставкою _report), які визначено як Результат класифікації; звіт також може бути розрахований пізніше (див. Classification report);
  • checkbox Зберегти файли алгоритму optional registry_save: якщо увімкнено, то додатково до растра класифікації зберігається Растр алгоритму в той самий каталог, що і Результат класифікації; в якості входових даних використовується растр для кожної спектральної сигнатури (з приставкою _sig_MC ID_C ID) та створюється загальний растр алгоритму (з приставкою _alg_raster);
  • run: визначити каталог вихідних результатів та розпочати класифікацію зображення;

Робоча панель

_images/toolbar.jpg

Робоча панель

Working toolbar забезпечує створення temporary ROIs та classification previews.

Ці функції докладно описано в наступних параграфах.

Контроль знімка

  • plugin: показати Main Interface Window;
  • zoom_to_Image: збільшити мапу до охоплення active band set у Band set;
  • radiobutton RGB= input_list project_save: використовуйте цю кнопку, щоб показати/приховати active band set у Band set на мапі; з переліку виберіть Кольоровий композит, яка застосовується до Band set; нові кольорові комбінації можуть бути визначені, якщо надрукувати номери каналів, розділені - або ; або , (наприклад, RGB = 4-3-2 або RGB = 4;3;2 або RGB = 4,3,2);
  • cumulative_stretch: відобразити входовий знімок, розтягуючи мінімальне та максимальне значення відповідно до накопиченої наявності (cumulative count) поточного охоплення мапи;
  • std_dev_stretch: відобразити входовий знімок, розтягуючи мінімальне та максимальне значення відповідно до стандартного відхилення (standard deviation) поточного охоплення мапи;

http://www.youtube.com/watch?v=9jA_Rh8YfKQ

Тимчасові ROI

Тимчасова ROI це відображений на мапі тимчасовий полігон, який може бути збережений як постійний до Входові навчальні дані. Тимчасова ROI може бути окреслена вручну або з застосуванням Алгоритм нарощування області (тобто зображення сегментується навколо насінного пікселя з включенням спектрально однорідних пікселів).

  • zoom_to_ROI: збільшити мапу до охоплення тимчасової ROI;
  • radiobutton ROI: використовуйте цю кнопку, щоб показати/сховати тимчасові ROI та Входові навчальні дані на мапі;
  • manual_ROI: активуйте вказівник, щоб створити тимчасову ROI окреслюванням полігону на мапі; клацанням лівою кнопкою мишки на мапі визначте вузли ROI та клацанням правою кнопкою мишки визначте останній вузол, що замкне полігон; натисніть на клавіатурі кнопку CTRL, щоб додати багаточастинний полігон; натисніть на клавіатурі кнопки CTRL + Z, щоб видалити останній багаточастинний полігон;
  • roi_single: активуйте вказівник, щоб створити тимчасову ROI з використанням алгоритму нарощування області; клацніть лівою кнопкою мишки на мапі, щоб створити ROI; клацніть правою кнопкою мишки на мапі, щоб відобразити спектральну сигнатуру пікселя active band set на Графік спектральних сигнатур; натисніть на клавіатурі кнопку CTRL та клацніть лівою кнопкою мишки, щоб додати багаточастинний полігон (нові частини не створюються, якщо наявне перекриття з іншими частинами); натисніть кнопки клавіатури CTRL + Z, щоб видалити останній багаточастинний полігон; натисніть на клавіатурі кнопку CTRL та клацніть правою кнопкою мишки, щоб відобразити на графіку спектральні сигнатури одного і того ж пікселя для всіх band sets;
  • roi_redo: створити тимчасову ROI з використанням алгоритму нарощування області в тому самому пікселі-насінині, що і попередню; це може бути зручно після зміни параметрів нарощування області;
Параметри нарощування області: наступні параметри необхідні для створення ROI з застосуванням алгоритму нарощування області на Band set:
  • Dist input_number project_save: встановити інтервал, який визначає максимальну спектральну відстань між пікселем-насіниною та пікселями, що його оточують (у радіометричних одиницях);
  • Min input_number project_save: встановити мінімальну площу ROI (в пікселях); це налаштування заміщає Радіус дапазону, доки не досягнуто мінмальний розмір ROI; якщо Швидка ROI за каналом активовано, тоді ROI матиме розмір не менший за Min розмір ROI; якщо Швидка ROI за каналом не активовано, тоді ROI може мати розмір менший за Min розмір ROI;
  • Max input_number project_save: встановити максимальну ширину ROI в пікселях (тобто довжину сторони квадрата з центром в пікселі-насінині, до якого вписана ROI);

http://www.youtube.com/watch?v=CQqNtlOU6mI

Попередній перегляд результатів класифікації

Попередній перегляд класифікації забезпечує відображення тимчасової класифікації (тобто попередній перегляд результатів класифікації). Попередній перегляд класифікації зручний для перевірки алгоритму на невеликому фрагменті Band set перш ніж проводити класифікацію всього знімка, яка може зайняти тривалий час (див. Результат класифікації).

Попередній перегляд класифікації виконується відповідно до параметрів, визначених у Алгоритм.

Додатково до растру класифікації, може бути відображений Растр алгоритму, який зручний для оцінки відстані між пікселем, віднесеним до класу X, та відповідною спектральною сигнатурою X. На Попередній перегляд класифікації чорні пікселі знаходяться на значних відстанях від відповідних спектральних сигнатур (можливо нові ROI або спектральні сигнатури повинні бути зібрані для цих ділянок), а білі пікселі ближчі до відповідної спектральної сигнатури (відповідно, спектральна сигнатура коректно характеризує ці пікселі).

Після створення нового попереднього перегляду, старі попередні перегляди в панелі легенди QGIS Layers переміщуються до групи Class_temp_group (ім’я групи може бути змінене у Temporary group name) та видаляються після закриття сесії QGIS.

ПОПЕРЕДЖЕННЯ: Попередні перегляди результатів класифікації автоматично видаляються з диска, коли сесія QGIS закривається; при повторному відкритті збереженого проекту повідомлення QGIS може попростити вказати шлях до зниклих шарів (це повідомлення може бути проігнороване) .

Main Interface Window

The Main Interface Window is composed of several tabs described in detail in the following paragraphs. Tabs can be selected through the menu at the left side.

Band set

_images/band_set_tab.jpg

bandset_tool Band set

Image input in SCP is named band set. This tab allows for the definition of one or more band sets used as input for classification and other tools.

Band sets are identified by numbers. The active band set (i.e. the tab selected in Band set definition with bold green name) is used as input for the tools in Панель SCP and Робоча панель. Other SCP tools allow for the selection of band set numbers.

The Band set definition is saved with the QGIS project.

Multiband image list

This section allows for the selection of a multiband raster. If selected, raster bands are listed in the active band set.

  • input_list : select the input image from a list of multispectral images loaded in QGIS;
  • open_file: open one or more raster files that are added to the active band set and loaded in QGIS;
  • reload: refresh layer list;
Single band list

List of single band rasters already loaded in QGIS. It is possible to select one or more bands to be added to the active band set.

  • reload: refresh list of raster bands loaded in QGIS;
  • select_all: select all raster bands;
  • plus: add selected rasters to the active band set.
Band set definition

Definition of bands composing the band sets . The active band set is the tab selected with bold green name. It is possible to add new band sets clicking the following button:

  • add_bandset: add a new empty band set;

Click the close_bandset in the tab to remove the corresponding band set. Band sets can be reordered dragging the tabs.

The Center wavelength of bands should be defined in order to use several functions of SCP. If the Center wavelength of bands is not defined, the band number is used and some SCP tools will be disabled.

It is possible to define a multiplicative rescaling factor and additive rescaling factor for each band (for instance using the values in Landsat metadata), which are used on the fly (i.e. pixel value = original pixel value * multiplicative rescaling factor + additive rescaling factor) during the processing.

Every band set is defined with the following table:

  • input_table Band set #: table containing the following fields;
    • Band name project_save: name of the band; name cannot be edited;
    • Center wavelength project_save: center of the wavelength of the band;
    • Multiplicative Factor project_save: multiplicative rescaling factor;
    • Additive Factor project_save: additive rescaling factor;
    • Wavelength unit project_save: wavelength unit;
    • Image name project_save: image name for multiband rasters;
  • move_up: move highlighted bands upward;
  • move_down: move highlighted bands downward;
  • order_by_name : sort automatically bands by name, giving priority to the ending numbers of name;
  • remove: remove highlighted bands from the active band set;
  • reset: clear all bands from active band set;
  • Quick wavelength settings input_list optional: rapid definition of band center wavelength for the following satellite sensors:
    • ASTER;
    • GeoEye-1;
    • Landsat 8 OLI;
    • Landsat 7 ETM+;
    • Landsat 5 TM;
    • Landsat 4 TM;
    • Landsat 1, 2, and 3 MSS;
    • MODIS;
    • Pleiades;
    • QuickBird;
    • RapidEye;
    • Sentinel-2;
    • Sentinel-3;
    • SPOT 4;
    • SPOT 5;
    • SPOT 6;
    • WorldView-2 and WorldView-3;
  • Wavelength unit input_list project_save: select the wavelength unit among:
    • Band number: no unit, only band number;
    • \(\mu m\): micrometres;
    • nm: nanometres;
  • import: import a previously saved active band set from file;
  • export: export the active band set to a file;

http://www.youtube.com/watch?v=1PclAtPjyZE

Band set tools

It is possible to perform several processes directly on active band set.

  • checkbox Create virtual raster of band set: if checked, create a virtual raster of bands;
  • checkbox Create raster of band set (stack bands): if checked, stack all the bands and create a unique .tif raster;
  • checkbox Build band overviews: if checked, build raster overviews (i.e. pyramids) for improving display performance; overview files are created in the same directory as bands;
  • checkbox Band calc expression: if checked, calculate the Expression entered in Band calc; it is recommended the use of Band set variables in the expression (e.g. bandset#b1 );
  • RUN run: choose the output destination and start the process;

Basic tools

The tab tools Basic tools includes several tools for manipulating input data.

RGB list
_images/RGB_list_tab.jpg

rgb_tool RGB list

This tab allows for managing the RGB Кольоровий композит used in the list RGB= of the Контроль знімка.

RGB list
  • input_table RGB list: table containing the following fields;
    • RGB: RGB combination; this field can be manually edited;
  • move_up: move highlighted RGB combination upward;
  • move_down: move highlighted RGB combination downward;
  • order_by_name : automatically sort RGB combinations by name;
  • add: add a row to the table;
  • remove: remove highlighted rows from the table;
  • reset: clear all RGB combinations from RGB list;
  • export: export the RGB list to a file (i.e. .csv);
  • import: import a previously saved RGB list from file (i.e. .csv);
Automatic RGB
  • Band combinations enter: add the combinations of all bands (i.e. permutation) to the RGB list (e.g. 1-2-3, 1-2-4, …, 3-2-1);
Algorithm band weight
_images/Algorithm_band_weight.jpg

weight_tool Algorithm band weight

This tab allows for the definition of band weights that are useful for improving the spectral separability of materials at certain wavelengths (bands). During the classification process, band values and spectral signature values are multiplied by the corresponding band weights, thus modifying the spectral distances. A tab is displayed for every Band set.

Band weight
  • input_table Band weight: table containing the following fields;
    • Band number : number of the band in the Band set;
    • Band name : name of the band;
    • Weight : weight of the band; this value can be edited;
Automatic weight
  • reset: reset all band weights to 1;
  • Set weight input_number enter: set the defined value as weight for all the highlighted bands in the table;
Multiple ROI Creation
_images/multiple_ROIs.jpg

roi_multiple Multiple ROI Creation

This tab allows for the automatic creation of ROIs, useful for the rapid classification of multi-temporal images, or for accuracy assessment. Given a list of point coordinates and ROI options, this tool performs the region growing of ROIs. Created ROIs are automatically saved to the Входові навчальні дані. The active band set in Band set is used for calculations.

Create random points
  • Number of points input_number: set a number of points that will be created when Create points enter is clicked;
  • checkbox inside grid input_number: if checked, the band set area is divided in cells where the size thereof is defined in the combobox (image unit, usually meters); points defined in Number of random points are created randomly within each cell;
  • checkbox min distance input_number: if checked, random points have a minimum distance defined in the combobox (image unit, usually meters); setting a minimum distance can result in fewer points than the number defined in Number of points;
  • Create points enter: create random points inside the band set area;
  • checkbox stratified for the values input_text of the first band of the band set min distance input_number: if checked, create random points inside the values defined in the expression calculated for the first band of the defined band set; the expression must include the variable raster ; multiple expressions can be entered separated by semicolon ( ; ) but the total number of stratified points is the same as the defined Number of points;
Point coordinates and ROI definition
  • input_table Point coordinates and ROI definition: table containing the following fields;
    • X : point X coordinate (float);
    • Y : point Y coordinate (float);
    • MC ID: ROI Macroclass ID (int);
    • MC Info: ROI Macroclass information (text);
    • C ID: ROI Class ID (int);
    • C Info: ROI Class information (text);
    • Min : the minimum area of a ROI (in pixel unit);
    • Max : the maximum width of a ROI (in pixel unit);
    • Dist : the interval which defines the maximum spectral distance between the seed pixel and the surrounding pixels (in radiometry unit);
    • Rapid ROI band : if a band number is defined, ROI is created only using the selected band, similarly to Rapid ROI band in Перелік сигнатур ROI ;
  • add: add a new row to the table; all the table fields must be filled for the ROI creation;
  • remove: delete the highlighted rows from the table;
  • import: import a point list from text file or a point shapefile to the table; in case of text file, every line must contain values separated by tabs of X, Y, MC ID, MC Info, Class ID, C Info, Min, Max, Dist, and optionally the Rapid ROI band; in case of shapefile, only point coordinates are imported;
  • export: export the point list to text file;
Run
Import signatures

The tab import_spectral_library Import signatures allows for importing spectral signatures from various sources.

Import library file
_images/import_library_file.jpg

Import library file

This tool allows for importing spectral signatures from various sources: a previously saved Входові навчальні дані (.scp file); a USGS Spectral Library (.asc file); a previously exported CSV file. In case of USGS Spectral Library, the library is automatically sampled according to the image band wavelengths defined in the Band set, and added to the Перелік сигнатур ROI;

Import shapefile
_images/import_shapefile.jpg

Import shapefile

This tool allows for importing a shapefile, selecting the corresponding fields of the Входові навчальні дані.

  • Select a shapefile open_file: open a shapefile;
  • MC ID field input_list: select the shapefile field corresponding to MC ID;
  • MC Info field input_list: select the shapefile field corresponding to MC Info;
  • C ID field input_list: select the shapefile field corresponding to C ID;
  • C Info field input_list: select the shapefile field corresponding to C Info;
  • checkbox Calculate sig.: if checked, the spectral signature is calculated while the ROI is saved to Входові навчальні дані;
  • Import shapefile enter: import all the shapefile polygons as ROIs in the Входові навчальні дані;
Download USGS Spectral Library
_images/USGS_spec_library.jpg

Download USGS Spectral Library

The tab Download USGS Spectral Library allows for the download of the USGS spectral library (Clark, R.N., Swayze, G.A., Wise, R., Livo, E., Hoefen, T., Kokaly, R., Sutley, S.J., 2007, USGS digital spectral library splib06a: U.S. Geological Survey, Digital Data Series 231).

The libraries are grouped in chapters including Minerals, Mixtures, Coatings, Volatiles, Man-Made, Plants, Vegetation Communities, Mixtures with Vegetation, and Microorganisms. An internet connection is required.

  • Select a chapter input_list: select one of the library chapters; after the selection, chapter libraries are shown in Select a library;

  • Select a library input_list: select one of the libraries; the library description is displayed in the frame Library description;

  • Import spectral library enter: download the library and add the sampled spectral signature to the Перелік сигнатур ROI using the parameters defined for class and macroclass; the library is automatically sampled according to the image band wavelengths defined in the active band set in Band set, and added to the Перелік сигнатур ROI;

    Tip: Spectral libraries downloaded from the USGS Spectral Library can be used with Minimum Distance or Spectral Angle Mapping algorithms, but not Maximum Likelihood because this algorithm needs the covariance matrix that is not included in the spectral libraries.

Export signatures
_images/export_signatures_tab.jpg

export_spectral_library Export signatures

This tool allows for exporting the signatures highlighted in the Перелік сигнатур ROI.

  • Export as SCP file new_file: create a new .scp file and export highlighted ROIs and spectral signatures as SCP file (* .scp);
  • Export as shapefile new_file: export highlighted ROIs (spectral signature data excluded) as a new shapefile (* .shp);
  • Export as CSV file open_dir: open a directory, and export highlighted spectral signatures as individual CSV files (* .csv) separated by semicolon ( ; );
Signature threshold
_images/Signature_threshold.jpg

threshold_tool Signature threshold

This tab allows for the definition of a classification threshold for each spectral signature. All the signatures contained in the Входові навчальні дані are listed. Thresholds defined in this tool are applied to classification only if Threshold value in Алгоритм is 0.

This is useful for improving the classification results, especially when spectral signatures are similar. Thresholds of signatures are saved in the Входові навчальні дані.

If threshold is 0 then no threshold is applied and all the image pixels are classified. Depending on the selected Алгоритм the threshold value is evaluated differently:

  • for Minimum Distance, pixels are unclassified if distance is greater than threshold value;
  • for Maximum Likelihood, pixels are unclassified if probability is less than threshold value (max 100);
  • for Spectral Angle Mapping, pixels are unclassified if spectral angle distance is greater than threshold value (max 90).
Signature threshold
  • input_table Signature threshold: table containing the following fields;
    • MC ID: signature Macroclass ID;
    • MC Info: signature Macroclass Information;
    • C ID: signature Class ID;
    • C Info: signature Class Information;
    • MD Threshold: Minimum Distance threshold; this value can be edited;
    • ML Threshold: Maximum Likelihood threshold; this value can be edited;
    • SAM Threshold: Spectral Angle Mapping threshold; this value can be edited;
  • reset: reset all signatures thresholds to 0 (i.e. no threshold used);
Automatic thresholds
  • Set threshold input_number enter: set the defined value as threshold for all the highlighted signatures in the table;
  • Set threshold = σ * input_number enter: for all the highlighted signatures, set an automatic threshold calculated as the distance (or angle) between mean signature and (mean signature + (σ * v)), where σ is the standard deviation and v is the defined value; currently works for Minimum Distance and Spectral Angle Mapping;
LCS threshold
_images/LCS_threshold.jpg

LCS_threshold LCS threshold

This tab allows for setting the signature thresholds used by Класифікація сигнатур земного покриву. All the signatures contained in the Входові навчальні дані are listed; also, signature thresholds are saved in the Входові навчальні дані.

Overlapping signatures (belonging to different classes or macroclasses) are highlighted in orange in the table LC Signature threshold; the overlapping check is performed considering MC ID or C ID according to the setting Use checkbox MC ID checkbox C ID in Алгоритм. Overlapping signatures sharing the same ID are not highlighted.

LC Signature threshold
  • input_table LC Signature threshold: table containing the following fields;
    • MC ID: signature Macroclass ID;
    • MC Info: signature Macroclass Information;
    • C ID: signature Class ID;
    • C Info: signature Class Information;
    • Color [overlap MC_ID-C_ID]: signature color; also, the combination MC ID-C ID is displayed in case of overlap with other signatures (see Класифікація сигнатур земного покриву);
    • Min B X: minimum value of band X; this value can be edited;
    • Max B X: maximum value of band X; this value can be edited;
  • sign_plot: show the ROI spectral signature in the Графік спектральних сигнатур; spectral signature is calculated from the Band set;
Automatic thresholds

Set thresholds automatically for highlighted signatures in the table LC Signature threshold; if no signature is highlighted, then the threshold is applied to all the signatures.

  • Min Max enter: set the threshold based on the minimum and maximum of each band;
  • σ * input_number enter: set an automatic threshold calculated as (band value + (σ * v)), where σ is the standard deviation of each band and v is the defined value;
  • From ROI LCS_threshold_ROI_tool: set the threshold using the temporary ROI pixel values, according to the following checkboxes:
    • checkbox +: if checked, signature threshold is extended to include pixel signature;
    • checkbox : if checked, signature threshold is reduced to exclude pixel signature;
  • From pixel LCS_threshold_set_tool: set the threshold by clicking on a pixel, according to the following checkboxes:
    • checkbox +: if checked, signature threshold is extended to include pixel signature;
    • checkbox : if checked, signature threshold is reduced to exclude pixel signature;

Download products

The tab download Download products includes the tools for searching and downloading free remote sensing images. Also, automatic conversion to reflectance of downloaded bands is available.

An internet connection is required and free registration could be required depending on the download service.

This tool allows for searching and downloading:

For Landsat, ASTER, and MODIS the search is performed through the CMR Search API developed by NASA. Landsat images are freely available through the services: EarthExplorer , Google Earth Engine , and the Amazon Web Services (AWS) (only for Landsat 8). The ASTER L1T and MODIS products are retrieved from the online Data Pool, courtesy of the NASA Land Processes Distributed Active Archive Center (LP DAAC), USGS/Earth Resources Observation and Science (EROS) Center, Sioux Falls, South Dakota, https://lpdaac.usgs.gov/data_access/data_pool.

For Sentinel-2 and Sentinel-3 the search is performed through the Copernicus Open Access Hub (using the Data Hub API ); images are mainly downloaded from the Amazon S3 AWS if available.

This tool attempts to download images first from Amazon Web Services and Google Earth Engine ; only if images are not available, the download is performed through the services that require to login.

Login data
_images/login_data.jpg

login_data Login data

Login https://ers.cr.usgs.gov

For Landsat images USGS EROS credentials (https://ers.cr.usgs.gov) are required for downloads from EarthExplorer . Login using your USGS EROS credentials or register for free at https://ers.cr.usgs.gov/register .

  • User input_text registry_save: enter the user name;
  • Password input_text registry_save: enter the password;
  • checkbox remember: remember user name and password in QGIS;
Login https://urs.earthdata.nasa.gov

For ASTER and MODIS images EOSDIS Earthdata credentials (https://urs.earthdata.nasa.gov ) are required for download. Login using your EOSDIS Earthdata credentials or register for free at https://urs.earthdata.nasa.gov/users/new . Before downloading ASTER and MODIS images, you must approve LP DAAC Data Pool clicking the following link https://urs.earthdata.nasa.gov/approve_app?client_id=ijpRZvb9qeKCK5ctsn75Tg

  • User input_text registry_save: enter the user name;
  • Password input_text registry_save: enter the password;
  • checkbox remember: remember user name and password in QGIS;
Login Sentinels

In order to access to Sentinel data a free registration is required at https://scihub.copernicus.eu/userguide/1SelfRegistration (other services may require different registrations). After the registration, enter the user name and password for accessing data.

Download options
_images/download_options.jpg

download_options_tab Download options

This tab allows for the selection of single bands for Landsat, Sentinel-2, and Sentinel-3 images. Depending on the download service, single band download could be unavailable.

  • checkbox Band X: select bands for download;
  • checkbox Ancillary data: if checked, the metadata files are selected for download;
  • select_all: select or deselect all bands;

Preprocessing

The tab preprocessing Preprocessing provides several tools for data manipulation which are useful before the actual classification process.

Landsat
_images/landsat_tab.jpg

landsat_tool Landsat

This tab allows for the conversion of Landsat 1, 2, and 3 MSS and Landsat 4, 5, 7, and 8 images from DN (i.e. Digital Numbers) to the physical measure of Top Of Atmosphere reflectance (TOA), or the application of a simple atmospheric correction using the DOS1 method (Dark Object Subtraction 1), which is an image-based technique (for more information about the Landsat conversion to TOA and DOS1 correction, see Перерахунок знімка у значення відбивальності). Pan-sharpening is also available; for more information read Панхроматичне об’єднання.

Once the input is selected, available bands are listed in the metadata table.

WARNING: For the best spectral precision you should download the Landsat Level-2 Data Products (Surface Reflectance) from https://earthexplorer.usgs.gov .
Landsat conversion to TOA reflectance and brightness temperature
  • Directory containing Landsat bands open_dir: open a directory containing Landsat bands; names of Landsat bands must end with the corresponding number; if the metadata file is included in this directory then Metadata are automatically filled;
  • Select MTL file open_file optional: if the metadata file is not included in the Directory containing Landsat bands, select the path of the metadata file in order to fill the Metadata automatically;
  • checkbox Brightness temperature in Celsius: if checked, convert brightness temperature to Celsius (if a Landsat thermal band is listed in Metadata); if unchecked temperature is in Kelvin;
  • checkbox Apply DOS1 atmospheric correction: if checked, the Корекція DOS1 is applied to all the bands (thermal bands excluded);
  • checkbox only to blue and green bands: if checked (with Apply DOS1 atmospheric correction also checked), the Корекція DOS1 is applied only to blue and green bands;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Perform pan-sharpening: if checked, a Brovey Transform is applied for the Панхроматичне об’єднання of Landsat bands;
  • checkbox Create Band set and use Band set tools: if checked, the Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;
Metadata

All the bands found in the Directory containing Landsat bands are listed in the table Metadata. If the Landsat metadata file (a .txt or .met file with the suffix MTL) is provided, then Metadata are automatically filled. For information about Metadata fields read this page and this one .

  • Satellite input_text: satellite name (e.g. Landsat8);
  • Date input_text: date acquired (e.g. 2013-04-15);
  • Sun elevation input_number: Sun elevation in degrees;
  • Earth sun distance input_number: Earth Sun distance in astronomical units (automatically calculated if Date is filled;
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
    • RADIANCE_MULT: multiplicative rescaling factor;
    • RADIANCE_ADD: additive rescaling factor;
    • REFLECTANCE_MULT: multiplicative rescaling factor;
    • REFLECTANCE_ADD: additive rescaling factor;
    • RADIANCE_MAXIMUM: radiance maximum;
    • REFLECTANCE_MAXIMUM: reflectance maximum;
    • K1_CONSTANT: thermal conversion constant;
    • K2_CONSTANT: thermal conversion constant;
    • LMAX: spectral radiance that is scaled to QCALMAX;
    • LMIN: spectral radiance that is scaled to QCALMIN;
    • QCALMAX: minimum quantized calibrated pixel value;
    • QCALMIN: maximum quantized calibrated pixel value;
Run
  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;
Sentinel-2
_images/sentinel2_tab.jpg

sentinel2_tool Sentinel-2

This tab allows for the conversion of Sentinel-2 images Level-1C to the physical measure of Top Of Atmosphere reflectance (TOA), or the application of a simple atmospheric correction using the DOS1 method (Dark Object Subtraction 1), which is an image-based technique (for more information about conversion to TOA and DOS1 correction, see Перерахунок знімка у значення відбивальності). This tool can also convert Sentinel-2 images Level-2A from DN to reflectance values.

Once the input is selected, available bands are listed in the metadata table. Bands with 20m spatial resolution are resampled to 10m resolution without changing the original pixel value (i.e. one 20m pixel is divided in four 10m pixels with the same value).

WARNING: For the best spectral precision you should download the Sentinel-2 Level-2A Products (Surface Reflectance) or use the official SNAP tool for atmospheric correction (see http://step.esa.int).
Sentinel-2 conversion
  • Directory containing Sentinel-2 bands open_dir: open a directory containing Sentinel-2 bands; names of Sentinel-2 bands must end with the corresponding number; if the metadata file is included in this directory then Metadata are automatically filled;
  • Select metadata file open_file optional: select the metadata file which is a .xml file whose name contains MTD_MSIL1C);
  • checkbox Apply DOS1 atmospheric correction: if checked, the Корекція DOS1 is applied to all the bands;
  • checkbox only to blue and green bands: if checked (with Apply DOS1 atmospheric correction also checked), the Корекція DOS1 is applied only to blue and green bands;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Create Band set and use Band set tools: if checked, the active Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;
  • checkbox Add bands in a new Band set: if checked, bands are added to a new empty Band set;
Metadata

All the bands found in the Directory containing Sentinel-2 bands are listed in the table Metadata. If the Sentinel-2 metadata file (a .xml file whose name contains MTD_MSIL1C) is provided, then Metadata are automatically filled. For information about Metadata fields read this informative page .

  • Satellite input_text: satellite name (e.g. Sentinel-2A);
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
    • Quantification value: value for conversion to TOA reflectance;
    • Solar irradiance: solar irradiance of band;
Run
  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;
Sentinel-3
_images/sentinel3_tab.jpg

sentinel3_tool Sentinel-3

This tab allows for the conversion of Sentinel-3 images (OL_1_EFR) to the physical measure of Top Of Atmosphere reflectance (TOA), or the application of a simple atmospheric correction using the DOS1 method (Dark Object Subtraction 1), which is an image-based technique (for more information about conversion to TOA and DOS1 correction, see Перерахунок знімка у значення відбивальності). The following ancillary data are required for conversion: instrument_data.nc , geo_coordinates.nc , tie_geometries.nc .

Once the input is selected, available bands are listed in the metadata table.

WARNING: Sentinel-3 bands are reprojected to WGS 84 coordinate system using a sample of pixels from the file geo_coordinates.nc . For the best precision you should use the official SNAP tool (see http://step.esa.int).
Sentinel-3 conversion
  • Directory containing Sentinel-3 bands open_dir: open a directory containing Sentinel-3 bands; names of Sentinel-2 bands must end with the corresponding number; ancillary data required for conversion must be in the same directory;
  • checkbox Apply DOS1 atmospheric correction: if checked, the Корекція DOS1 is applied to all the bands;
  • checkbox only to blue and green bands: if checked (with Apply DOS1 atmospheric correction also checked), the Корекція DOS1 is applied only to blue and green bands;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Create Band set and use Band set tools: if checked, the Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;
Metadata

All the bands found in the Directory containing Sentinel-3 bands are listed in the table Metadata.

  • Satellite input_text: satellite name (e.g. Sentinel-3A);
  • Product input_text: product name (e.g. OLCI);
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
Run
  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;
ASTER
_images/aster_tab.jpg

aster_tool ASTER

This tab allows for the conversion of ASTER L1T images to the physical measure of Top Of Atmosphere reflectance (TOA), or the application of a simple atmospheric correction using the DOS1 method (Dark Object Subtraction 1), which is an image-based technique (for more information about conversion to TOA and DOS1 correction, see Перерахунок знімка у значення відбивальності).

Once the input is selected, available bands are listed in the metadata table.

ASTER conversion
  • Select file ASTER L1T open_file: select an ASTER image (file .hdf);
  • checkbox Apply DOS1 atmospheric correction: if checked, the Корекція DOS1 is applied to all the bands;
  • checkbox only to green band: if checked (with Apply DOS1 atmospheric correction also checked), the Корекція DOS1 is applied only to green band;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Create Band set and use Band set tools: if checked, the Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;
Metadata

All the bands found in the Select file ASTER L1T are listed in the table Metadata. For information about Metadata fields visit the ASTER page .

  • Date input_text: date acquired (e.g. 20130415);
  • Sun elevation input_number: Sun elevation in degrees;
  • Earth sun distance input_number: Earth Sun distance in astronomical units (automatically calculated if Date is filled;
  • UTM zone input_text: UTM zone code of the image;
  • UPPERLEFTM input_text: coordinates of the upper left corner of the image;
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
    • UnitConversionCoeff: value for radiance conversion;
    • PixelSize: solar irradiance of band;
Run
  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;
MODIS
_images/modis_tab.jpg

modis_tool MODIS

This tab allows for the conversion of MODIS images to .tif format, and the reprojection to WGS 84.

Once the input is selected, available bands are listed in the metadata table.

MODIS conversion
  • Select file MODIS open_file: select a MODIS image (file .hdf);
  • checkbox Reproject to WGS 84: if checked, reproject bands to WGS 84, required for use in SCP;
  • checkbox Use NoData value (image has black border) input_number: if checked, pixels having NoData value are not counted during conversion and the DOS1 calculation of DNmin; it is useful when image has a black border (usually pixel value = 0);
  • checkbox Create Band set and use Band set tools: if checked, the Band set is created after the conversion; also, the Band set is processed according to the tools checked in the Band set;
Metadata

All the bands found in the Select file MODIS are listed in the table Metadata. For information about Metadata fields visit the MODIS page .

  • ID input_text: ID of the image;
  • remove: remove highlighted bands from the table Metadata;
  • input_table Metadata: table containing the following fields;
    • Band: band name;
    • UnitConversionCoeff: value for conversion;
Run
  • RUN run: select an output directory and start the conversion process; only bands listed in the table Metadata are converted; converted bands are saved in the output directory with the prefix RT_ and automatically loaded in QGIS;
Vector to raster
_images/vector_to_raster_tab.jpg

vector_to_raster_tool Vector to raster

This tab allows for the conversion of a vector to raster format.

  • Select the vector input_list: select a vector already loaded in QGIS;
  • reload: refresh layer list;
  • checkbox Use the value field of the vector input_list: if checked, the selected field is used as attribute for the conversion; pixels of the output raster have the same values as the vector attribute;
  • checkbox Use constant value input_number: if checked, the polygons are converted to raster using the selected constant value;
  • Select the type of conversion input_list: select the type of conversion between Center of pixels and All pixels touched:
    • Center of pixels: during the conversion, vector is compared to the reference raster; output raster pixels are attributed to a polygon if pixel center is within that polygon;
    • All pixels touched: during the conversion, vector is compared to the reference raster; output raster pixels are attributed to a polygon if pixel touches that polygon;
  • Select the reference raster input_list: select a reference raster; pixels of the output raster have the same size and alignment as the reference raster;
  • reload: refresh layer list;
Run
  • RUN run: choose the output destination and start the conversion to raster;
Clip multiple rasters
_images/clip_multiple_rasters.jpg

clip_tool Clip multiple rasters

This tab allows for cutting several image bands at once, using a rectangle defined with point coordinates or a boundary defined with a vector.

Raster list
  • reload: refresh layer list;
  • select_all: select all the rasters;
Clip coordinates

Set the Upper Left (UL) and Lower Right (LR) point coordinates of the rectangle used for clipping; it is possible to enter the coordinates manually. Alternatively use a vector.

  • UL X input_number: set the UL X coordinate;
  • UL Y input_number: set the UL Y coordinate;
  • LR X input_number: set the LR X coordinate;
  • LR Y input_number: set the LR Y coordinate;
  • radiobutton Show: show or hide the clip area drawn in the map;
  • pointer: define a clip area by drawing a rectangle in the map; left click to set the UL point and right click to set the LR point; the area is displayed in the map;
  • checkbox Use vector for clipping input_list: if checked, use the selected vector (already loaded in QGIS) for clipping; UL and LR coordinates are ignored;
  • checkbox Use vector field for output name input_list: if checked, a vector field is selected for clipping while iterating through each vector polygon and the corresponding field value is added to the output name;
  • checkbox Use temporary ROI for clipping: if checked, use a temporary ROI (see Перелік сигнатур ROI) for clipping; UL and LR coordinates are ignored;
  • reload: refresh layer list;
  • checkbox NoData value input_number: if checked, set the value for NoData pixels (e.g. pixels outside the clipped area);
  • Output name prefix input_text: set the prefix for output file names (default is clip);
Run
  • RUN run: choose an output destination and clip selected rasters; only rasters selected in the Raster list are clipped and automatically loaded in QGIS;
Split raster bands
_images/split_raster_tab.jpg

split_raster Split raster bands

Split a multiband raster to single bands.

Raster input
  • Select a multiband raster input_list: select a multiband raster already loaded in QGIS;
  • reload: refresh layer list;
  • Output name prefix input_text: set the prefix for output file names (default is split);
Run
  • RUN run: choose the output destination and split selected raster; output bands are automatically loaded in QGIS;
Stack raster bands
_images/stack_raster_tab.jpg

stack_raster Stack raster bands

Stack raster bands into a single file.

Raster list
  • reload: refresh layer list;
  • select_all: select all the rasters;
Run
  • RUN run: choose the output destination and stack selected rasters; output is automatically loaded in QGIS;
Mosaic band sets
_images/mosaic_bandsets_tab.jpg

mosaic_tool Mosaic band sets

This tool allows for the mosaic of band sets, merging the corresponding bands of two or more band sets defined in the Band set. An output band is created for every corresponding set of bands in the band sets.

NoData values of one band set are replaced by the values of the other band sets.

Mosaic of band sets
  • Band set list input_text: list if band sets defined in the Band set; in case of overlapping images, the pixel values of the first band set in the list are assigned.
  • checkbox Use NoData value input_number: if checked, set the value of NoData pixels, ignored during the calculation;
  • Output name prefix input_text: set the prefix for output file names (default is mosaic);
Run
  • RUN run: select an output directory and start the mosaic process;
Cloud masking
_images/cloud_masking_tab.jpg

cloud_masking_tool Cloud masking

This tool allows for cloud masking, based on the values of a raster mask, creating an output masked band for each band of the Band set. NoData is set in all the bands of the Band set for pixels corresponding to clouds.

Mask of band set
  • Select input band set input_number: select the input Band set to be masked;
  • Select the classification input_list: select a classification raster (already loaded in QGIS) which contains a cloud class;
  • reload: refresh layer list;
  • Mask class values input_text: set the class values to be masked; class values must be separated by , and - can be used to define a range of values (e.g. 1, 3-5, 8 will select classes 1, 3, 4, 5, 8); if the text is red then the expression contains errors;
  • checkbox Use buffer of pixel size input_number: if checked, a buffer is created for masked area, corresponding to the defined number of pixels; this can be useful to dilate masked area in case the mask doesn’t cover the thinner border of clouds;
  • NoData value: set the value of NoData pixels, corresponding to clouds;
  • Output name prefix input_text: set the prefix for output file names (default is mask);
Run
  • RUN run: select an output directory and start the mask process;

Band processing

The tab band_processing Band processing provides several functions that can be applied to the Band set.

Band combination
_images/band_combination_tab.jpg

band_combination Band combination

This tab allows for the combination of bands loaded in a Band set. This tool is intended for combining classifications in order to get a raster where each value corresponds to a combination of class values. A combination raster is produced as output and the area of each combination is reported in an text file.

Combination of band values
  • Select input band set (of classifications) input_number: select the input Band set;
Run
  • RUN run: choose the output destination and start the calculation; also, the details about the combinations are displayed in the tab Output and saved in a .txt file in the output directory;
PCA
_images/pca_tab.jpg

pca_tool PCA

This tab allows for the PCA (Аналіз головних компонент) of bands loaded in the Band set.

Principal Component Analysis of Band set
  • Select input band set input_number: select the input Band set;
  • checkbox Number of components input_number: if checked, set the number of calculated components; if unchecked, all the components are calculated;
  • checkbox Use NoData value input_number: if checked, set the value of NoData pixels, ignored during the calculation;
Run
  • RUN run: select an output directory and start the calculation process; principal components are calculated and saved as raster files; also, the details about the PCA are displayed in the tab Output and saved in a .txt file in the output directory;
Clustering
_images/clustering_tab.jpg

clustering Clustering

This tab allows for the Clustering of a Band set. In particular, K-means and ISODATA methods are available.

Clustering of band set
  • Select input band set input_number: select the input Band set;
  • Method radiobutton K-means radiobutton ISODATA: select the clustering method K-means or ISODATA;
  • checkbox Distance threshold input_number: if checked, for K-means: iteration is terminated if distance is lower than threshold; for ISODATA: signatures are merged if distance is greater than threshold;
  • Number of classes input_number: number of desired output classes;
  • Max number of iterations input_number: maximum number of iterations if Distance threshold is not reached;
  • ISODATA max standard deviation input_number: maximum standard deviation considered for splitting a class, for ISODATA algorithm only;
  • ISODATA minimum class size in pixels input_number: desired minimum class size in pixels, for ISODATA algorithm only;
  • checkbox Use NoData value input_number: if checked, set the value of NoData pixels, ignored during the calculation;
Seed signatures
Run
  • RUN run: choose the output destination and start the calculation;
Spectral distance
_images/spectral_distance_tab.jpg

spectral_distance Spectral distance

This tab allows for calculating the spectral distance between every corresponding pixel of two band sets. The output is a raster containing the spectral distance of each pixel. Optionally, a threshold can be defined for creating a binary raster of values below and above the threshold.

Spectral distance of band sets
Run
  • RUN run: choose the output destination and start the calculation;

Postprocessing

The tab post_process Postprocessing provides several functions that can be applied to the classification output.

Accuracy
_images/accuracy_tab.jpg

accuracy_tool Accuracy

This tab allows for the validation of a classification (read Оцінка точності ). Classification is compared to a reference raster or reference vector (which is automatically converted to raster). If a vector is selected as reference, it is possible to choose a field describing class values.

Several statistics are calculated such as overall accuracy, user’s accuracy, producer’s accuracy, and Kappa hat. In particular, these statistics are calculated according to the area based error matrix where each element represents the estimated area proportion of each class. This allows for estimating the unbiased user’s accuracy and producer’s accuracy, the unbiased area of classes according to reference data, and the standard error of area estimates.

The output is an error raster that is a .tif file showing the errors in the map, where pixel values represent the categories of comparison (i.e. combinations identified by the ErrorMatrixCode in the error matrix) between the classification and reference. Also, a text file containing the error matrix (i.e. a .csv file separated by tab) is created with the same name defined for the .tif file.

Input
  • Select the classification to assess input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Select the reference vector or raster input_list: select a raster or a vector (already loaded in QGIS), used as reference layer (ground truth) for the accuracy assessment;
  • reload: refresh layer list;
  • Vector field input_list: if a vector is selected as reference, select a vector field containing numeric class values;
Run
  • RUN run: choose the output destination and start the calculation; the error matrix is displayed in the tab Output and the error raster is loaded in QGIS;
Land cover change
_images/land_cover_change_tab.jpg

land_cover_change Land cover change

The tab Land cover change allows for the comparison between two classifications in order to assess land cover changes. Output is a land cover change raster (i.e. a file .tif showing the changes in the map, where each pixel represents a category of comparison (i.e. combinations) between the two classifications, which is the ChangeCode in the land cover change statistics) and a text file containing the land cover change statistics (i.e. a file .csv separated by tab, with the same name defined for the .tif file).

Input
  • Select the reference classification input_list: select a reference classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Select the new classification input_list: select a new classification raster (already loaded in QGIS), to be compared with the reference classification;
  • reload: refresh layer list;
  • checkbox Report unchanged pixels: if checked, report also unchanged pixels (having the same value in both classifications);
Run
  • RUN run: choose the output destination and start the calculation; the land cover change statistics are displayed in the tab Output (and saved in a text file) and the land cover change raster is loaded in QGIS;
Classification report
_images/classification_report_tab.jpg

report_tool Classification report

This tab allows for the calculation of class statistics such as number of pixels, percentage and area (area unit is defined from the image itself).

Input
  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • checkbox Use NoData value input_number: if checked, NoData value will be excluded from the report;
Run
  • RUN run: choose the output destination and start the calculation; the report is saved in a text file and displayed in the tab Output;
Cross classification
_images/cross_classification_tab.jpg

cross_classification Cross classification

This tab allows for the calculation of a cross classification raster and matrix. Classification is compared to a reference raster or reference vector (which is automatically converted to raster). This is useful for calculating the area for every combination between reference classes and classification values. If a vector is selected as reference, it is possible to choose a field describing class values.

The output is a cross raster that is a .tif file where pixel values represent the categories of comparison (i.e. combinations identified by the CrossMatrixCode) between the classification and reference. Also, a text file containing the cross matrix (i.e. a .csv file separated by tab) is created with the same name defined for the .tif file.

Input
  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • checkbox Use NoData value input_number: if checked, NoData value will be excluded from the calculation;
  • Select the reference vector or raster input_list: select a raster or a vector (already loaded in QGIS), used as reference layer;
  • reload: refresh layer list;
  • Vector field input_list: if a vector is selected as reference, select a vector field containing numeric class values;
Run
  • RUN run: choose the output destination and start the calculation; the cross matrix is displayed in the tab Output and the cross raster is loaded in QGIS;
Class signature
_images/class_signature_tab.jpg

class_signature Class signature

This tab allows for the calculation of the mean spectral signature of each class in a classification using a Band set.

  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Select input band set input_number: select the input Band set for spectral signature calculation;
  • checkbox Save resulting signatures to Signature list: if checked, save the resulting spectral signatures to Перелік сигнатур ROI;
Run
  • RUN run: choose the output destination and start the conversion;
Classification to vector
_images/classification_vector_tab.jpg

class_to_vector_tool Classification to vector

This tab allows for the conversion of a classification raster to vector shapefile.

  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
Symbology
  • checkbox Use code from Signature list input_list: if checked, color and class information are defined from Перелік сигнатур ROI:
    • MC ID: use the ID of macroclasses;
    • C ID: use the ID of classes;
Run
  • RUN run: choose the output destination and start the conversion;
Reclassification
_images/reclassification_tab.jpg

reclassification_tool Reclassification

This tab allows for the reclassification (i.e. assigning a new class code to raster pixels). In particular, it eases the conversion from C ID to MC ID values.

  • Select the classification input_list: select a classification raster (already loaded in QGIS);
  • reload: refresh layer list;
Values
  • checkbox calculate C ID to MC ID values: if checked, the reclassification table is filled according to the Перелік сигнатур ROI when Calculate unique values enter is clicked;
  • Calculate unique values enter: calculate unique values in the classification and fill the reclassification table;
  • input_table Values: table containing the following fields;
    • Old value: set the expression defining old values to be reclassified; Old value can be a value or an expressions defined using the variable name raster (custom names can be defined in Variable name for expressions ), following Python operators (e.g. raster > 3 select all pixels having value > 3 ; raster > 5 | raster < 2 select all pixels having value > 5 or < 2 ; raster >= 2 & raster <= 5 select all pixel values between 2 and 5);
    • New value: set the new value for the old values defined in Old value;
  • add: add a row to the table;
  • remove: remove highlighted rows from the table;
Symbology
  • checkbox Use code from Signature list input_list: if checked, color and class information are defined from Перелік сигнатур ROI:
    • MC ID: use the ID of macroclasses;
    • C ID: use the ID of classes;
Run
  • RUN run: choose the output destination and start the calculation; reclassified raster is loaded in QGIS;
Edit raster
_images/edit_raster_tab.jpg

edit_raster Edit raster

This tab allows for the direct editing of pixel values in a raster. Only pixels beneath ROI polygons or vector polygons are edited.

Attention: the input raster is directly edited; it is recommended to create a backup copy of the input raster before using this tool in order to prevent data loss.

This tool can rapidly edit large rasters, especially when editing polygons are small, because pixel values are edited directly. In addition, the Панель редагування SCP is available for easing the raster editing using multiple values.

  • Select the input raster input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;
Edit raster values
  • radiobutton Edit values using ROI polygons: if checked, raster is edited using temporary ROI polygons in the map;
  • radiobutton Edit values using a vector input_list: if checked, raster is edited using all the polygons of selected vector;
  • reload: refresh layer list;
Edit options
  • checkbox Use the value field of the vector input_list: if checked, raster is edited using the selected vector (in Edit values using a vector) and the polygon values of selected vector field;
  • checkbox Use constant value input_number: if checked, raster is edited using the selected constant value;
  • checkbox Use expression input_text: if checked, raster is edited according to the entered expression; the expression must contain one or more where; accepted variable are raster representing the input raster value and vector representing the vector value if selected; the following example expression where(raster == 1, 2, raster) is already entered, which sets 2 where raster equals 1, and leaves unchanged the values where raster is not equal to 1;
Run
  • undo_edit_raster: undo the last raster edit (available only when using ROI polygons);
  • RUN run: edit the raster;
Classification sieve
_images/classification_sieve_tab.jpg

classification_sieve Classification sieve

This tab allows for the replacement of isolated pixel values with the value of the largest neighbour patch (based on GDAL Sieve ). It is useful for removing small patches from a classification.

  • Select the classification input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Size threshold input_number: size of the patch to be replaced (in pixel unit); all patches smaller the the selected number of pixels will be replaced by the value of the largest neighbour patch;
  • Pixel connection input_list: select the type of pixel connection:
    • 4: in a 3x3 window, diagonal pixels are not considered connected;
    • 8: in a 3x3 window, diagonal pixels are considered connected;
Run
  • RUN run: choose the output destination and start the calculation;
Classification erosion
_images/classification_erosion_tab.jpg

classification_erosion Classification erosion

This tab allows for removing the border of a class patch (erosion), defining the class values to be eroded and the number of pixels from the border. It is useful for classification refinement.

  • Select the classification input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Class values input_text: set the class values to be eroded; class values must be separated by , and - can be used to define a range of values (e.g. 1, 3-5, 8 will select classes 1, 3, 4, 5, 8); if the text is red then the expression contains errors;
  • Size in pixels input_number: number of pixels to be eroded from the border;
  • Pixel connection input_list: select the type of pixel connection:
    • 4: in a 3x3 window, diagonal pixels are not considered connected;
    • 8: in a 3x3 window, diagonal pixels are considered connected;
Run
  • RUN run: choose the output destination and start the calculation;
Classification dilation
_images/classification_dilation_tab.jpg

classification_dilation Classification dilation

This tab allows for dilating the border of a class patch, defining the class values to be dilated and the number of pixels from the border. It is useful for classification refinement.

  • Select the classification input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;
  • Class values input_text: set the class values to be dilated; class values must be separated by , and - can be used to define a range of values (e.g. 1, 3-5, 8 will select classes 1, 3, 4, 5, 8); if the text is red then the expression contains errors;
  • Size in pixels input_number: number of pixels to be dilated from the border;
  • Pixel connection input_list: select the type of pixel connection:
    • 4: in a 3x3 window, diagonal pixels are not considered connected;
    • 8: in a 3x3 window, diagonal pixels are considered connected;
Run
  • RUN run: choose the output destination and start the calculation;

Band calc

_images/band_calc_tab.jpg

bandcalc_tool Band calc

The Band calc allows for the raster calculation for bands (i.e. calculation of pixel values) using NumPy functions . Raster bands must be already loaded in QGIS. Input rasters must be in the same projection.

In addition, it is possible to calculate a raster using decision rules.

Band list
  • input_table Band list: table containing a list of single band rasters (already loaded in QGIS);
    • Variable: variable name defined automatically for every band (e.g. raster1, raster2);
    • Band name: band name (i.e. the layer name in QGIS);
  • reload: refresh image list;
Expression

Enter a mathematical expression for raster bands. In particular, NumPy functions can be used with the prefix np. (e.g. np.log10(raster1) ). For a list of NumPy functions see the NumPy page .

The expression can work with both Variable and Band name (between double quotes). Also, bands in the Band set can be referenced directly; for example bandset#b1 refers to band 1 of the Band set. Double click on any item in the Band list for adding its name to the expression. In addition, the following variables related to Band set the are available:

  • «#BLUE#»: the band with the center wavelength closest to 0.475 \(\mu m\);
  • «#GREEN#»: the band with the center wavelength closest to 0.56 \(\mu m\);
  • «#RED#»: the band with the center wavelength closest to 0.65 \(\mu m\);
  • «#NIR#»: the band with the center wavelength closest to 0.85 \(\mu m\);

Variables for output name are available:

  • #BANDSET#: the name of the first band in the Band set;
  • #DATE#: the current date and time (e.g. 20161110_113846527764);

If text in the Expression is green, then the syntax is correct; if text is red, then the syntax is incorrect and it is not possible to execute the calculation.

It is possible to enter multiple expressions separated by newlines such as the following example:

"raster1" + "raster2"

"raster3" - "raster4"

The above example calculates two new rasters in the output directory with the suffix _1 (e.g. calc_raster_1 ) for the first expression and _2 (e.g. calc_raster_2 ) for the second expression. Also, it is possible to define the output name using the symbol @ followed by the name, such as the following example:

"raster1" + "raster2" @ calc_1

"raster3" - "raster4" @ calc_2

The following buttons are available:

  • +: plus;
  • -: minus;
  • *: product;
  • /: ratio;
  • ^: power;
  • V: square-root;
  • (: open parenthesis;
  • ): close parenthesis;
  • >: greater then;
  • <: less then;
  • ln: natural logarithm;
  • π: pi;
  • ==: equal;
  • !=: not equal;
  • sin: sine;
  • asin: inverse sine;
  • cos: cosine;
  • acos: inverse cosine;
  • tan: tangent;
  • atan: inverse tangent;
  • where: conditional expression according to the syntax where( condition , value if true, value if false) (e.g. where("raster1" == 1, 2, "raster1"));
  • exp: natural exponential;
  • nodata: NoData value of raster (e.g. nodata("raster1")); it can be used as value in the expression (e.g. where("raster1" == nodata("raster1"), 0, "raster1"));
Index calculation

Index calculation allows for entering a spectral index expression (see Спектральні індекси).

  • Index calculation input_list: list of spectral indices:
    • NDVI: if selected, the NDVI calculation is entered in the Expression ( (( "#NIR#" - "#RED#") / ( "#NIR#" + "#RED#") @ NDVI) );
    • EVI: if selected, the EVI calculation is entered in the Expression ( 2.5 * ( "#NIR#" - "#RED#" ) / ( "#NIR#" + 6 * "#RED#" - 7.5 * "#BLUE#" + 1) @ EVI );
  • open_file: open a text file (.txt) containing custom expressions to be listed in Index calculation; the text file must contain an expression for each line; each line must be in the form expression_name; expression (separated by ;) where the expression_name is the expression name that is displayed in the Index calculation; if you open an empty text file, the default values are restored; following an example of text content:

    NDVI; ( "#NIR#" - "#RED#" ) / ( "#NIR#" + "#RED#" ) @NDVI
    EVI; 2.5 * ( "#NIR#" - "#RED#" ) / ( "#NIR#" + 6 * "#RED#" - 7.5 * "#BLUE#" + 1) @EVI
    SR; ( "#NIR#" / "#RED#" ) @SR
    
Decision rules
_images/band_calc_decision_rules.jpg

Decision rules allows for the calculation of an output raster based on rules. Rules are conditional statements based on other rasters; if the Rule is true, the corresponding Value is assigned to the output pixel.

Rules are verified from the first to the last row in the table; if the first Rule is false, the next Rule is verified for that pixel, until the last rule. If multiple rules are true for a certain pixel, the value of the first Rule is assigned to that pixel. The NoData value is assigned to those pixels where no Rule is true.

  • input_table Decision rules: table containing the following fields;
    • Value: the value assigned to pixels if the Rule is true;
    • Rule: the rule to be verified (e.g. "raster1" > 0); multiple conditional statements can be entered separated by ; (e.g. "raster1" > 0; "raster2" < 1 which means to set the Value where raster1 > 0 and raster2 < 1);
  • move_up: move highlighted rule up;
  • move_down: move highlighted rule down;
  • add: add a new row to the table;
  • remove: delete the highlighted rows from the table;
  • reset: clear the table;
  • export: export the rules to a text file that can be imported later;
  • import: import rules from a text file;
Output raster

The output raster is a .tif file, with the same spatial resolution and projection of input rasters; if input rasters have different spatial resolutions, then the highest resolution (i.e. minimum pixel size) is used for output raster.

  • checkbox Use NoData value input_number: if checked, set the value of NoData pixels in output raster;
  • Extent: if the following options are unchecked, the output raster extent will include the extents of all input rasters;
    • checkbox Intersection: if checked, the extent of output raster equals the intersection of input raster extents (i.e. minimum extent);
    • checkbox Same as input_list: if checked, the extent of output raster equals the extent of «Map extent» (the extent of the map currently displayed) or a selected layer;
  • radiobutton Align: if checked, and checkbox Same as is checked selecting a raster, the calculation is performed using the same extent and pixel alignment of selected raster;
  • RUN run: if Expression is active and text is green, choose the output destination and start the calculation based on Expression; if Decision rules is active and text is green, choose the output destination and start the calculation based on Decision rules;

Batch

_images/batch_tab.jpg

batch_tool Batch

This tab allows for the automatic execution (batch) of several SCP functions using a scripting interface.

Batch

Enter a batch expression; each function must be in a new line. Functions have the following structure:

function name; function options

Each function has options, identified by a name, with the following structure:

option name: option argument

Options must be separated by the character ; . Each function option represents an option in the corresponding interface of SCP; option arguments of type text must be between the character ' ; in case of checkboxes, the value 1 represents checked, while the value 0 represents unchecked. A new line beginning with # can be used for commenting.

According to the function, some of the options are mandatory while other options can be omitted from the expression. Option names that contain path require the full path to a file. Some options require multiple arguments such as lists; lists must be separated by , .

If the expression contains errors, the text is red. An expression check label is displayed with a brief description of the error.

  • reset: clear the expression;
  • export: export the batch expression to a file;
  • import: import a previously saved batch expression from file;
A table Functions is displayed at the right side; double click to insert a function in the expression; the following functions are available with the corresponding options:
  • Accuracy: calculate accuracy (accuracy;classification_file_path : '';reference_file_path : '';shapefile_field_name : '';output_raster_path : '');
  • ASTER: ASTER conversion (aster_conversion;input_raster_path : '';celsius_temperature : 0;apply_dos1 : 0;use_nodata : 1;nodata_value : 0;create_bandset : 1;output_dir : '');
  • Band calc: band calculation (band_calc;expression : '';output_raster_path : '';extent_same_as_raster_name : '';extent_intersection : 1;set_nodata : 0;nodata_value : 0);
  • Band combination: band combination (band_combination;band_set : 1;output_raster_path : '');
  • Class signature: class signature (class_signature;input_raster_path : '';band_set : 1;save_signatures : 1;output_text_path : '');
  • Результат класифікації: perform classification (classification;use_macroclass : 0;algorithm_name  : 'Minimum Distance';use_lcs : 0;use_lcs_algorithm : 0;use_lcs_only_overlap : 0;apply_mask : 0;mask_file_path : '';vector_output : 0;classification_report : 0;save_algorithm_files : 0;output_classification_path : '');
  • Classification dilation: dilation of a classification (classification_dilation;input_raster_path : '';class_values : '';size_in_pixels : 1;pixel_connection : 4;output_raster_path : '');
  • Classification erosion: erosion of a classification (classification_erosion;input_raster_path : '';class_values : '';size_in_pixels : 1;pixel_connection : 4;output_raster_path : '');
  • Classification report: report of a classification (classification_report;input_raster_path : '';use_nodata : 0;nodata_value : 0;output_report_path : '');
  • Classification sieve: classification sieve(classification_sieve;input_raster_path : '';size_threshold : 2;pixel_connection : 4;output_raster_path : '');
  • Classification to vector: convert classification to vector (classification_to_vector;input_raster_path : '';use_signature_list_code : 1;code_field : 'C_ID';output_vector_path : '');
  • Clip multiple rasters: clip multiple rasters (clip_multiple_rasters;input_raster_path : '';output_dir : '';use_shapefile : 0;shapefile_path : '';ul_x : '';ul_y : '';lr_x : '';lr_y : '';nodata_value : 0;output_name_prefix : 'clip');
  • Cloud masking: cloud masking (cloud_masking;band_set : 1;input_raster_path : '';class_values : '';use_buffer : 1;size_in_pixels : 1;nodata_value : 0;output_name_prefix : 'mask';output_dir : '');
  • Clustering: clustering (clustering;band_set : 1;clustering_method : 1;use_distance_threshold : 1;threshold_value : 0.0001;number_of_classes : 10;max_iterations : 10;isodata_max_std_dev : 0.0001;isodata_min_class_size : 10;use_nodata : 0;nodata_value : 0;seed_signatures : 1;distance_algorithm : 1;save_signatures : 0;output_raster_path : '');
  • Cross classification: cross classification (cross_classification;classification_file_path : '';use_nodata : 0;nodata_value : 0;reference_file_path : '';shapefile_field_name : '';output_raster_path : '');
  • Edit raster: edit raster values using a shapefile); (edit_raster_using_shapefile;input_raster_path : '';input_vector_path : '';vector_field_name : '';constant_value : 0;expression :  'where(raster == 1, 2, raster)');
  • Land cover change: calculate land cover change (land_cover_change;reference_raster_path : '';new_raster_path : '';output_raster_path : '');
  • Landsat: Landsat conversion (landsat_conversion;input_dir : '';mtl_file_path : '';celsius_temperature : 0;apply_dos1 : 0;use_nodata : 1;nodata_value : 0;pansharpening : 0;create_bandset : 1;output_dir : '');
  • MODIS: MODIS conversion (modis_conversion;input_raster_path : '';reproject_wgs84 : 1;use_nodata : 1;nodata_value : -999;create_bandset : 1;output_dir : '');
  • PCA: Principal Component Analysis (pca;use_number_of_components : 0, number_of_components : 2;use_nodata : 1;nodata_value : 0;output_dir : '');
  • Reclassification: raster reclassification (reclassification;input_raster_path : '';value_list : 'oldVal-newVal;oldVal-newVal';use_signature_list_code : 1;code_field : 'MC_ID';output_raster_path : '');
  • Sentinel-2: Sentinel-2 conversion (sentinel2_conversion;input_dir : '';mtd_safl1c_file_path : '';apply_dos1 : 0;use_nodata : 1;nodata_value : 0;create_bandset : 1;output_dir : '');
  • Sentinel-3: Sentinel-3 conversion (sentinel3_conversion;input_dir : '';apply_dos1 : 0;dos1_only_blue_green : 1;use_nodata : 1;nodata_value : 0;create_bandset : 1;output_dir : '';band_set : 1);
  • Spectral distance: spectral distance of band sets (spectral_distance;first_band_set : 1;second_band_set : 2;distance_algorithm  : 1;use_distance_threshold : 1;threshold_value : 0.1;output_dir : '');
  • Split raster bands: split raster to single bands (split_raster_bands;input_raster_path : '';output_dir : '';output_name_prefix : 'split');
  • Stack raster bands: stack rasters into a single file (stack_raster_bands;input_raster_path : '';output_raster_path : '');
  • Vector to raster: convert vector to raster (vector_to_raster;vector_file_path : '';use_value_field : 1;vector_field_name : '';constant_value : 1;reference_raster_path : '';type_of_conversion : 'Center of pixels';output_raster_path : '');
In addition, the following functions are available:
  • Add a new band set: add a new empty band set (add_new_bandset;);
  • Add raster to QGIS: add a raster to QGIS (add_raster;input_raster_path : '';input_raster_name : '');
  • Create band set: create a Band set assigning bands (create_bandset;raster_path_list : '';center_wavelength : '';wavelength_unit : 1;multiplicative_factor : '';additive_factor : '');
  • Open training input: open a training input file (open_training_input;training_file_path : '');
  • Remove band set: remove a band set by the number thereof (remove_bandset;band_set : 1);
  • Select band set: select a band set (active band set) by the number thereof (select_bandset;band_set : 1);
  • Set working directory: set a working directory (argument is the path to a directory) (!working_dir!;'');

If a working directory is defined, !working_dir! can be entered in other functions where a path is required (e.g. add_raster;input_raster_path : '!working_dir!/raster1.tif';input_raster_name : 'raster1.tif'); An example of batch expression is:

!working_dir!; '/home/user/Desktop/temp/'
add_raster;input_raster_path : '!working_dir!/raster1.tif';input_raster_name : 'raster1.tif'
band_calc;expression : 'where("raster1.tif" > 1, 1,0)';output_raster_path : '!working_dir!/calc1.tif';set_nodata : 1;nodata_value : 0
band_calc;expression : '"raster1.tif" * "calc1.tif"';output_raster_path : '!working_dir!/calc2.tif';extent_intersection : 0
Run
  • RUN run: if text in the batch expression is green, start the batch processes;

Settings

The tab settings_tool Settings allows for the customization of SCP.

Processing
_images/settings_processing_tab.jpg

Processing

Classification process
  • checkbox Play sound when finished registry_save: if checked, play a sound when the classification process is completed;
  • checkbox Use virtual rasters for temp files registry_save: if checked, create virtual rasters for certain temporary files, instead of creating real rasters; it is useful for reducing disk space usage during calculations;
  • checkbox Raster compression registry_save: if checked, a lossless compression (DEFLATE or PACKBITS) is applied to raster outputs in order to save disk space; it is recommended to check this option, however compressed files are sometimes larger than files without compression;
SMTP process notification
  • SMTP server input_text registry_save: the SMTP server to login for sending a notification email when all the SCP processes are finished (a notification is sent also in case of error, but not in case of crash);
  • user input_text registry_save: the SMTP server user;
  • password input_text registry_save: the SMTP server password;
  • Send email of completed process to input_text registry_save: a list of addresses (separated by comma) to send the notification email to;
RAM
  • Available RAM (MB) input_number registry_save: set the available RAM (in MB) that is used during the processes in order to improve the SCP performance; this value should be half of the system RAM (e.g. 1024MB if system has 2GB of RAM); in case of errors, set a value lower than 512MB;

http://www.youtube.com/watch?v=KDI3ud9L6UY

Temporary directory
  • open_dir registry_save: select a new temporary directory where temporary files are saved during processing; the path to the current temporary directory is displayed; default is a system temporary directory;
  • reset: reset to default temporary directory;
Interface

Customization of the interface.

_images/settings_interface_tab.jpg

Interface

Field names of training input

Set the names of fields in the Входові навчальні дані . Changing field names should usually be avoided.

  • MC ID field input_text registry_save: name of the Macroclass ID field (default is MC_ID);
  • MC Info field input_text registry_save: name of the Macroclass Information field (default is MC_info);
  • C ID field input_text registry_save: name of the Class ID field (default is C_ID);
  • C Info field input_text registry_save: name of the Class Information field (default is C_info);
  • reset: reset field names to default;
ROI style

Change ROI color and transparency for a better visualization of temporary ROIs on the map.

  • ROI color registry_save: button for changing ROI color;
  • Transparency input_slider registry_save: change ROI transparency;
  • reset: reset ROI color and transparency to default;
Variable name for expressions

Set the variable name used in expressions of the Reclassification and Edit raster .

  • Variable name input_text registry_save: set variable name (default is raster);
  • reset: reset variable name to default;
Temporary group name

Set the temporary group name in QGIS Layers used for temporary layers .

  • Group name input_text registry_save: set group name (default is Class_temp_group);
  • reset: reset group name to default;
Dock
  • checkbox Download news on startup: if checked, news about the SCP and related services are downloaded on startup and displayed in Dock;
Debug
_images/settings_debug_tab.jpg

Debug

Debugging utilities for the creation of a Log file (i.e. recording of SCP activities for reporting issues) and testing SCP dependencies.

http://www.youtube.com/watch?v=So04gNzDC9Y

If you found a plugin error, please read Як я можу повідомити про помилку? .

Log file
  • checkbox Records events in a log file registry_save: if checked, start recording events in a Log file;
  • export: export the Log file (i.e. a .txt file);
  • reset: clear the content of Log file;
Test
  • Test dependencies enter: test SCP dependencies (GDAL, GDAL subprocess, NumPy, SciPy, Matplotlib, Internet connection); results are displayed in a window;

Графік спектральних сигнатур

Вікно Графік спектральних сигнатур включає декілька функцій для відображення значень спектральних сигнатур як функцій довжини хвилі (визначеної у Band set). Сигнатури можуть додаватись до Графік спектральних сигнатур через Панель SCP.

Вікно Графік спектральних сигнатур включає також деякі функції корисні для визначення діапазонів значень, що використовуються Класифікація сигнатур земного покриву (див. LCS threshold).

Сигнатури, що перетинаються (за належності до різних класів або макрокласів), виділено помаранчевим в таблиці Відобразити Перелік сигнатур; перевірка перетину відбувається на підставі MC ID або C ID відповідно до налаштування Застосувати checkbox MC ID checkbox C ID в Алгоритм. Сигнатури, що перетинаються та мають ідентичний ID, не виділяються.

_images/spectral_signature.jpg

Графік спектральних сигнатур

Відобразити Перелік сигнатур

  • input_table Перелік сигнатур:
    • S: поле перемикача; якщо параметр увімкнено, то спектральна сигнатура відображається на графіку;
    • MC ID: унікальний ідентифікатор макрокласу сигнатури;
    • MC Info: характеристика макрокласу сигнатури;
    • C ID: унікальний ідентифікатор класу сигнатури;
    • C Info: характеристика класу сигнатури;
    • Колір [перетин MC_ID-C_ID]: колір сигнатури; додатково відображається комбінація MC ID-C ID у випадку перетину з іншими сигнатурами (див. Класифікація сигнатур земного покриву);
    • Мін B X: мінімальне значення каналу X; це значення редагується;
    • Макс B X: максимальне значення каналу X; це значення редагується;
  • remove: видалити виділені сигнатури з переліку;
  • save_plot: додати виділені спектральні сигнатури до Перелік сигнатур ROI;
  • calculate_spectral_distances: розрахувати спектральні відстані спектральних сигнатур, що відображаються на графіку; відстані повідомляються у вкладці Спектральні відстані;
Автоматичні порогові величини

Автоматично призначити порогові величини для сигнатур, виділених в таблиці Відобразити Перелік сигнатур; якщо жодна сигнатура не виділена, то порогова величина застосовується до всіх сигнатур.

  • Мін Макс enter: встановити порогову величину на підставі мінімуму та максимуму кожного каналу;
  • σ * input_number enter: автоматично встановити порогову величину, розраховану як (значення каналу + (σ * v)), де σ стандартне відхилення кожного каналу, а v визначене значення;
  • undo_lcs_threshold: відмінити останні автоматичні порогові величини;
  • На підставі ROI LCS_threshold_ROI_tool: встановити порогову величину на підставі значеннь пікселів тимчасової ROI відповідно до наступних перемикачів:
    • checkbox +: якщо увімкнено, то порогова величина сигнатури збільшується для включення сигнатури пікселя;
    • checkbox : якщо увімкнено, то порогова величина сигнатури зменшується для виключення сигнатури пікселя;
  • На підставі пікселя LCS_threshold_set_tool: встановити порогову величину клацанням на пікселі, відповідно до наступних перемикачів:
    • checkbox +: якщо увімкнено, то порогова величина сигнатури збільшується для включення сигнатури пікселя;
    • checkbox : якщо увімкнено, то порогова величина сигнатури зменшується для виключення сигнатури пікселя;
Графік

Клацніть ліву кнопку мишки та затисніть на полі бачення графіка, щоб посунути його. Використовуйте коліщатко мишки для зменшення та збільшення поля бачення графіка. Клацніть праву кнопку мишки та затисніть на полі бачення графіка, щоб збільшити до певного фрагмента графіка. Легенду всередині графіка можна переміщати за допомогою мишки.

Команди графіка:

  • fit_plot: автоматично допасувати графік до даних;
  • save_plot_image: зберегти рисунок графіка у файл (доступні формати .jpg, .png, та .pdf);
  • sign_edit_range: активувати курсор для інтерактивної зміни на графіку даіпазону значень віділених сигнатур; клацніть на графіку, щоб встановити мінміальне та максимальне значення каналу (також для декількох сигнатур одночасно); курсор деактивується, коли виходить за межі поля бачення графіка;
  • checkbox Відобразити діапазон значень: якщо параметр увімкнено, то для кожної сигнатури відображається діапазон значень (напівпрозорою областю);
  • checkbox Лінії каналів: якщо параметр увімкнено, то для кожного каналу відображається вертикальна лінія (центральна довжина хвилі);
  • checkbox Сітка: якщо параметр увімкнено, то відображається сітка;
  • Максимум символів input_number: визначити максимальну довжину тексту в легенді;
  • x y: відображати координати x y курсора мишки всередині поля бачення графіка;


_images/example_plot.jpg

Спектральна сигнатура: Приклад графіка спектральних сигнатур

Характеристика сигнатур
_images/spectral_signature_details.jpg

Спектральна сигнатура: Характеристика сигнатур

Відображає характеристику спектральних сигнатур (наприклад, Довжину хвилі, Значення та Стандартне відхилення). У випадку розрахунку сигнатур на основі ROI відображається також розмір ROI (кількість пікселів).

_images/example_details.jpg

Спектральна сигнатура: Приклад характеристики сигнатур

Спектральні відстані
_images/spectral_signature_distances.jpg

Спектральна сигнатура: Спектральні відстані

Відображає спектральні відстані сигнатур (див. Відобразити Перелік сигнатур), які є корисними для оцінки відокремності ROI (див. Спектральна відстань).

Розраховуються наступні спектральні відстані:

Якщо сигнатури дуже подібні, то значення відображаються червоним.

_images/example_distance.jpg

Спектральна сигнатура: Приклад спектральних відстаней

Графік розсіву

Вікно Графік розсіву відображає значення пікселів растрів двох каналів як точки у 2-вимірному просторі. Графіки розсіву корисні для оцінювання відокремності ROI між двома каналами.

_images/scatter_plot.jpg

Графік розсіву

Ці функції докладно описано в наступних параграфах.

Перелік розсіву

  • input_table Перелік розсіву:
    • S: поле перемикача; якщо параметр увімкнено, то спектральна сигнатура відображається на графіку;
    • MC ID: унікальний ідентифікатор макрокласу сигнатури;
    • MC Info: характеристика макрокласу сигнатури;
    • C ID: унікальний ідентифікатор класу сигнатури;
    • C Info: характеристика класу сигнатури;
    • Колір: поле кольору; двічі клацніть для вибору кольору на графіка;
  • Канал X input_number: канал X графіка;

  • Канал Y input_number: канал Y графіка;

  • checkbox Точність input_list: використовувати для розрахунків нетипову точність (точність повинна встановлюватись відповідно до значень пікселів):
    • 4 = \(10^{-4}\)
    • 3 = \(10^{-3}\)
    • 2 = \(10^{-2}\)
    • 1 = \(10^{-1}\)
    • 0 = 1
    • -1 = 10
    • -2 = \(10^{2}\)
    • -3 = \(10^{3}\)
  • Розрахувати enter: розрахувати графік розсіву для ROI увімкнених в переліку;

  • remove: видалити виділені сигнатури з переліку;

  • scatter_raster_temp_ROI: додати тимчасовий графік розсіву до переліку (як MC Info = tempScatter) та розпочати розрахунок графіка для останньої тимчасової ROI (див. Робоча панель);

  • scatter_raster_display: додати тимчасовий графік розсіву до переліку (як MC Info = tempScatter) та розпочати розрахунок графіка для пікселів охоплення поточного відображення;

  • scatter_raster_image: додати тимчасовий графік розсіву до переліку (як MC Info = tempScatter) та розпочати розрахунок графіка для всього знімка;

    ЗАСТЕРЕЖЕННЯ: Використання занадто високого значення точності може призвести до уповільнення або невдалої спроби розрахунку.

Растр розсіву

Цей інструмент забезпечує окреслювання полігонів відбору всередині графіка розсіву; ці полігони використовуються для створення Растр розсіву, який явлє собою тимчасовий растр значення якого класифіковано відповідно до перетину графіків розсіву та окреслених полігонів.

Пікселі active band set класифікуються відповідно до каналів графіка розсіву, якщо значення пікселів знаходяться в діапазоні перетину між графіками розсіву та полігонами відбору (полігони не повинні перетинатись). Значення, що призначаються пікселям Scatter raster, це порядковий номер полігона відбору; колір растра також відповідає полігону відбору.

Після створення нового Растр розсіву, старі растри в панелі шарів QGIS переміщуються до групи Class_temp_group (стандартне ім’я групи може бути змінене у Temporary group name) та видаляються після закриття сесії QGIS.

  • scatter_edit_polygon: активувати курсор для інтерактивного окреслювання полігона на графіку; ліве клацання на графіку визначає вузли, а праве клацання - останній вузол, що замикає полігон;
  • color: вибрати колір полігона (який також використовується для Растр розсіву);
  • scatter_reset_polygon: видалити з графіка всі вибрані полігони;
  • scatter_show_raster: розрахувати Растр розсіву та відобразити його на карті;
  • save_plot: розрахувати спектральну сигнатуру Scatter raster (з урахуванням всіх класифікованих пікселів) з використанням active band set та зберегти її до Перелік сигнатур ROI;
  • Охоплення input_list: охоплення Ратр розсіву; доступні варіанти:
    • Таке саме як відображення: охоплення таке саме, які і відображення карти;
    • Таке саме як знімок: охоплення таке саме, як і у всього знімка;
Графік

Клацніть ліву кнопку мишки та затисніть на полі бачення графіка, щоб посунути його. Використовуйте коліщатко мишки для зменшення та збільшення поля бачення графіка. Клацніть праву кнопку мишки та затисніть на полі бачення графіка, щоб збільшити до певного фрагмента графіка.

  • Карта кольорів input_list enter: виберіть карту кольорів, яка повинна застосовуватись до виділених в переліку графіків розсіву після натискання enter; якщо жоден графік розсіву не виділений, то кольорова карта застосовується до всіх графіків розсіву;
  • fit_plot: автоматично допасувати графік до даних;
  • save_plot_image: зберегти рисунок графіка у файл (доступні формати .jpg, .png, та .pdf);
  • x y: відображати координати x y курсора мишки всередині поля бачення графіка;


_images/example_scatter_plot.jpg

Приклад графіка розсіву

Панель редагування SCP

_images/scp_edit_toolbar.jpg

Інструменти SCP

Панель редагування SCP забезпечує безпосереднє редагування значень пікселів входового растра, визначеного у Edit raster з застосуванням полігонів ROI. Редагуються лише ті пікселі, що розташовані під полігонами ROI.

  • edit_raster: відкрити інструмент Панель редагування SCP для вибору входового растра;
  • input_number enter: редагувати растр з застосуванням сталого значення;
  • input_number enter: редагувати растр з застосуванням сталого значення;
  • input_number enter: редагувати растр з застосуванням сталого значення;
  • undo_edit_raster: відмінити останню правку растра (доступно лише у випадку використання полігонів ROI);


_images/SemiAutomaticClassificationPlugin.jpg

Функції, описані нижче, використовують наступні умовні позначення:

input_date = Введення дати

input_text = Ведення тексту

input_list = Вибір елемента з переліку

input_number = Введення числа

optional = Необов’язковий параметр

project_save = Налаштування зберігається в активному проекті QGIS

registry_save = Налаштування зберігається в реєстрі QGIS

input_slider = Повзунок

input_table = Таблиця

Короткий вступ до дистанційного зондування

Основні поняття

В цьому розділі наведено основні поняття щодо ГІС та дистанційного зондування. Інші корисні джерела дивіться у Безкоштовні та корисні ресурси про дистанційне зондування та ГІС.

Поняття ГІС

Існує декілька визначень ГІС (Географічних інформаційних систем), які не є просто програмним забезпеченням. В загальному розумінні ГІС це системи, які забезпечують використання географічної інформації (даних з просторовими координатами). У вужчому розумінні ГІС забезпечують перегляд, запити, розрахунки та аналіз просторових даних, які здебільшого розрізняються як векторна та растрова структури даних. Вектор складається з об’єктів, які можуть бути точками, лініями або полігонами та кожний об’єкт може мати одне або декілька атрибутивних значень; растр це регулярна сітка (або знімок), кожна комірка якої має атрибутивне значення (Fisher and Unwin, 2005). Багато ГІС-застосунків використовують растрові знімки, отримані шляхом дистанційного зондування.

Поняття дистанційного зондування

В загальному розумінні дистанційне зондування це «наука та технологія за допомогою яких характеристики об’єктів інтересу можуть ідентифікуватись, вимірюватись та аналізуватись за відсутності безпосереднього контакту» (JARS, 1993).

У вужчому розумінні дистанційне зондування це вимірювання енергії, що випромінюється від земної поверхні. Якщо джерелом енергії, що вимірються, є Сонце, то це пасивне дистанційне зондування і результатом такого вимиріювання може бути цифровий знімок (Richards and Jia, 2006). Якщо енергія, що вимірюється, випромінюється не Сонцем, а платформою сенсора, такою як радарні сесори, що працюють у мікрохвильовому діапазоні, то це активне дистанційне зондування (Richards and Jia, 2006).

Електромагнітний спектр це «система, що класифікує за довжиною хвилі всю енергію (від короткохвильової космічної до довгохвильової радіо), що гармонічно рухається з постійною швидкістю світла» (NASA, 2013). Пасивні сенсори вимірюють енергію з оптичних областей електромагнітного спектра: видимої, ближньої інфрачервоної (ІЧ), короткохвильової ІЧ та теплової ІЧ (див. Рисунок Електромагнітний спектр).

_images/Electromagnetic-Spectrum.png

Електромагнітний спектр

за Victor Blacus (SVG версія File:Electromagnetic-Spectrum.png)

[CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0)]

за посередництвом Wikimedia Commons

http://commons.wikimedia.org/wiki/File%3AElectromagnetic-Spectrum.svg


Взаємодія між сонячною енергією та матеріалами залежить від довжини хвилі; сонячна енергія проходить від Сонця до Землі, а потім до сенсора. Вздовж цього шляха сонячна енергія (NASA, 2013):

  • Проникла - енергія проходить через з зміною у швидкості відповідно до індексу заломлювання для двох середовищ, про які йде мова.
  • Поглинена - енергія передається об’єкту через електронні або молекулярні реакції.
  • Відбита - енергія повертається незміненою з кутом відбивання, що дорівнює куту надходження. Відбивальна здатність це відношення відбитої енергії до тієї, що надійшла до тіла. Довжина хвилі відбитої (а не поглиненої) енергії визначає колір об’єкта.
  • Розсіяна - напрямок поширювання енергії змінюється випадково. Розсіювання Рейлі та Мі - два найбільш важливі типи розсіювання в атмосфері.
  • Випромінена - в дійсності, енергія спочатку поглинається, а потім випромінюється знову, зазвичай на довших довжинах хвиль. Об’єкт розігрівається.

Сенсори

Сенсори можуть знаходитись на борті літака або супутника, вимірюючи електромагнітну радіацію у деяких визначених діапазонах (які зазвичай називаються каналами). В результаті, вимірювання квантуються та перетворюються на цифрове зображення, кожен елемент якого (тобто піксель) має дискретне значення в одиницях цифрових чисел (Digital Number - DN) (NASA, 2013). Результуючі зображення мають різні характеристики (вирізняльні здатності) залежно від сенсора. Виділяють декілька типів вирізняльної здатності:

  • Просторова вирізняльна здатність, зазвичай відповідає роміру пікселя, «це вирізняльна здатність інструмента, необхідна для виокремлення об’єктів, що залежить від розміру детектора, фокусної відстані та висоти сенсора» (NASA, 2013); просторову родільну здатність також називають геометричною роздільною здатністю або IFOV;
  • Спектральна вирізняльна здатність це кількість та положення електромагнітних спектрів (що визначаються двома довжинами хвиль) спектральних каналів (NASA, 2013) багатоспектральних сенсорів, кожному каналу відповідає зображення;
  • Радіометрична вирізняльна здатність, зазвичай вимірюється у бітах (двійкових цифрах), це діапазон можливих значень яскравості, який для знімка відповідає максимальному діапазону DN; наприклад, знімок з вирізняльною здатністю 8 біт має 256 рівнів яскравості (Richards and Jia, 2006);
  • Для супутникових сенсорів, є також часова вирізняльна здатність, яка відповідає часу, необхідному для повторного перегляду тієї самої ділянки Землі (NASA, 2013).

Енергетична світність та відбивальна здатність

Сенсори вимірюють енергетичну світність, яка відповідає яскравості у заданому напрямку до сенсора; також доцільно вирізняти відбивальну здатність як відношення відбитої до загальної енергії.

Спектральна сигнатура

Спектральна сигнатура це відбивальна здатність як функція довжини хвилі (див. Рис. Криві спектральної відбивальної здатності для чотирьох різних цілей); кожен матеріал має унікальну сигнатуру, яка завдяки цьому може використовуватись для класифікації матеріалів (NASA, 2013).

_images/Spectral_Reflectance_NASA.jpg

Криві спектральної відбивальної здатності для чотирьох різних цілей

(за NASA, 2013)

Земельний покрив

Земельний покрив це матеріал на земній поверхні такий як ґрунт, рослинність, вода, асфальт тощо (Fisher and Unwin, 2005). Кількість та вид класів земельного покриву, що можуть бути ідентифіковані на знімку, можуть істотно різнитися залежно від вирізняльної здатності сенсора, .

Multispectral satellites

There are several satellites with different characteristics that acquire multispectral images of earth surface. The following satellites are particularly useful for land cover monitoring because images are provided for free and can be downloaded directly from SCP; data have been acquired for the past few decades and the archive is continously growing with recent images.

Landsat Satellites

Landsat це серія багатоспектральних супутників, розроблених NASA (Національним управлінням з аеронавтики і дослідження космічного простору США), з початку 1970-х.

Знімки Landsat широко вживані у дослідженнях довкілля. Вирізняльні здатності сенсорів Landsat 4 та Landsat 5 наведені в таблиці нижче (за http://landsat.usgs.gov/band_designations_landsat_satellites.php); часова вирізняльна здатність Landsat становить 16 днів (NASA, 2013).

Канали Landsat 4 та Landsat 5
Канали Landsat 4, Landsat 5 Довжина хвилі [мікрометри] Вирізняльна здатність [метри]
Канал 1 - Синій 0.45 - 0.52 30
Канал 2 - Зелений 0.52 - 0.60 30
Канал 3 - Червоний 0.63 - 0.69 30
Канал 4 - Ближній інфрачервоний (NIR) 0.76 - 0.90 30
Канал 5 - SWIR 1.55 - 1.75 30
Канал 6 - Тепловий інфрачервоний 10.40 - 12.50 120 (передискретизована до 30)
Канал 7 - SWIR 2.08 - 2.35 30

Вирізняльні здатності сенсора Landsat 7 наведено в таблиці нижче (за http://landsat.usgs.gov/band_designations_landsat_satellites.php); часова вирізняльна здатність Landsat становить 16 днів (NASA, 2013).

Канали Landsat 7
Landsat 7 Bands Довжина хвилі [мікрометри] Вирізняльна здатність [метри]
Канал 1 - Синій 0.45 - 0.52 30
Канал 2 - Зелений 0.52 - 0.60 30
Канал 3 - Червоний 0.63 - 0.69 30
Канал 4 - Ближній інфрачервоний (NIR) 0.77 - 0.90 30
Канал 5 - SWIR 1.57 - 1.75 30
Канал 6 - Тепловий інфрачервоний 10.40 - 12.50 60 (передискретизована до 30)
Канал 7 - SWIR 2.09 - 2.35 30
Канал 8 - Панхроматичний 0.52 - 0.90 15

Вирізняльні здатності сенсора Landsat 8 наведено в таблиці нижче (за http://landsat.usgs.gov/band_designations_landsat_satellites.php); часова вирізняльна здатність Landsat становить 16 днів (NASA, 2013).

Канали Landsat 8
Landsat 8 Bands Довжина хвилі [мікрометри] Вирізняльна здатність [метри]
Канал 1 - Узбережний аерозоль 0.43 - 0.45 30
Канал 2 - Синій 0.45 - 0.51 30
Канал 3 - Зелений 0.53 - 0.59 30
Канал 4 - Червоний 0.64 - 0.67 30
Канал 5 - Ближній інфрачервоний (NIR) 0.85 - 0.88 30
Канал 6 - SWIR 1 1.57 - 1.65 30
Канал 7 - SWIR 2 2.11 - 2.29 30
Канал 8 - Панхроматичний 0.50 - 0.68 15
Канал 9 - Пір’їсті хмари 1.36 - 1.38 30
Канал 10 - Тепловий інфрачервоний (TIRS) 1 10.60 - 11.19 100 (передискретизована до 30)
Канал 11 - Тепловий інфрачервоний (TIRS) 2 11.50 - 12.51 100 (передискретизована до 30)

Великий архів знімків безкоштовно доступний від Геологічної служби США . Для більш докладної інформації щодо безкоштовного завантаження знімків Landsat читайте .

Знімки ідентифікуються траєкторіями та рядками WRS (Глобальна система місцерозташування для Landsat Worldwide Reference System for Landsat ).

Супутник Sentinel-2

Sentinel-2 це багатоспектральний супутник, розроблений Европейським космічним агентством (European Space Agency - ESA) в рамках програми мніторингу земель Copernicus . Sentinel-2 має 13 спектральних каналів з просторовою вирізняльною здатністю 10 м, 20 м та 60 м залежно від каналу, як наведено у таблиці нижче (ESA, 2015).

Канали Sentinel-2
Канали Sentinel-2 Цетральна довжина хвилі [мікрометри] Вирізняльна здатність [метри]
Канал 1 - Узбережний аерозоль 0.443 60
Канал 2 - Синій 0.490 10
Канал 3 - Зелений 0.560 10
Канал 4 - Червоний 0.665 10
Канал 5 - Червоний край рослинності 0.705 20
Канал 6 - Червоний край рослинності 0.740 20
Канал 7 - Червоний край рослинності 0.783 20
Канал 8 - NIR 0.842 10
Канал 8А - Червоний край рослинності 0.865 20
Канал 9 - Водяна пара 0.945 60
Канал 10 - SWIR - Пір’їсті хмари 1.375 60
Канал 11 - SWIR 1.610 20
Канал 12 - SWIR 2.190 20

Sentinel-2 images are freely available from the ESA website https://scihub.copernicus.eu.

Sentinel-3 Satellite

Sentinel-3 is a satellite developed by the European Space Agency (ESA) in the frame of Copernicus land monitoring services. It carries several instruments, in particular the Ocean and Land Colour Instrument (OLCI) is a push-broom imaging spectrometer acquiring 21 bands in the range 0.4-1.02 μm with a swath width of 1,270km and 300m spatial resolution (ESA, 2013). The revisit time is about 2 days.

Sentinel-3 Bands
Sentinel-3 Bands Цетральна довжина хвилі [мікрометри]
Oa1 0.400
Oa2 0.4125
Oa3 0.4425
Oa4 0.490
Oa5 0.510
Oa6 0.560
Oa7 0.620
Oa8 0.665
Oa9 0.67375
Oa10 0.68125
Oa11 0.70875
Oa12 0.75375
Oa13 0.76125
Oa14 0.764375
Oa15 0.7675
Oa16 0.77875
Oa17 0.865
Oa18 0.885
Oa19 0.900
Oa20 0.940
Oa21 1.020

Супутник ASTER

Супутник ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer - Покращений космічний радіометр теплового випромінювання та відбивання) був запущений у 1999 за співробітництва між Міністерством міжнародної торігівлі та індустрії Японії (Japanese Ministry of International Trade and Industry - MITI) та NASA. ASTER має 14 каналів вирізняльна здатність яких змінюється відповідно до довжини хвилі: 15 м у видимому та ближньому інфрачервоному, 30 м у короткохвильовому інфрачервоному та 90 м у тепловому інфрачервоному (USGS, 2015). Канали ASTER охарактеризовано в таблиці нижче (через вихід з ладу сенсора дані SWIR, отримані після 1 квітня 2008 недоступні ). Додатковий канал 3B (ближній інфрачервоний оберненого назад огляду) забезпечує стерео покриття.

Канали ASTER
Канали ASTER Довжина хвилі [мікрометри] Вирізняльна здатність [метри]
Канал 1 - Зелений 0.52 - 0.60 15
Канал 2 - Червоний 0.63 - 0.69 15
Канал 3N - Ближній інфрачервоний (NIR) 0.78 - 0.86 15
Канал 4 - SWIR 1 1.60 - 1.70 30
Канал 5 - SWIR 2 2.145 - 2.185 30
Канал 6 - SWIR 3 2.185 - 2.225 30
Канал 7 - SWIR 4 2.235 - 2.285 30
Канал 8 - SWIR 5 2.295 - 2.365 30
Канал 9 - SWIR 6 2.360 - 2.430 30
Канал 10 - TIR 1 8.125 - 8.475 90
Канал 11 - TIR 2 8.475 - 8.825 90
Канал 12 - TIR 3 8.925 - 9.275 90
Канал 13 - TIR 4 10.25 - 10.95 90
Канал 14 - TIR 5 10.95 - 11.65 90

Продукти MODIS

The MODIS (Moderate Resolution Imaging Spectroradiometer) is an instrument operating on the Terra and Aqua satellites launched by NASA in 1999 and 2002 respectively. Its temporal resolutions allows for viewing the entire Earth surface every one to two days, with a swath width of 2,330km. Its sensors measure 36 spectral bands at three spatial resolutions: 250m, 500m, and 1,000m (see https://lpdaac.usgs.gov/dataset_discovery/modis).

Доступні декілька продуктів, таких як відбивальність поверхні та вегетаційні індекси. В цьому посібнику ми розглядаємо канали відбивальності поверхні доступні з просторовою вирізняльною здатністю 250 м та 500 м (Vermote, Roger, & Ray, 2015).

Канали MODIS
Канали MODIS Довжина хвилі [мікрометри] Вирізняльна здатність [метри]
Канал 1 - Червоний 0.62 - 0.67 250 - 500
Канал 2 - Ближній інфрачервоний (NIR) 0.841 - 0.876 250 - 500
Канал 3 - Синій 0.459 - 0.479 500
Канал 4 - Зелений 0.545 - 0.565 500
Канал 5 - SWIR 1 1.230 - 1.250 500
Канал 6 - SWIR 2 1.628 - 1.652 500
Канал 7 - SWIR 3 2.105 - 2.155 500

Наступні продукти (Версія 6, див. https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table) доступні для завантаження (Vermote, Roger, & Ray, 2015):

  • MOD09GQ: щоденна відбивальність з просторовою вирізняльною здатністю 250 м за Terra MODIS;
  • MYD09GQ: щоденна відбивальність з просторовою вирізняльною здатністю 250 м за Aqua MODIS;
  • MOD09GA: щоденна відбивальність з просторовою вирізняльною здатністю 500 м за Terra MODIS;
  • MYD09GA: щоденна відбивальність з просторовою вирізняльною здатністю 500 м за Aqua MODIS;
  • MOD09Q1: відбивальність з просторовою вирізняльною здатністю 250 м, як композит MOD09GQ (кожний піксель містить найкраще можливе спостереження за 8-денний період);
  • MYD09Q1: відбивальність з просторовою вирізняльною здатністю 250 м, як композит MYD09GQ (кожний піксель містить найкраще можливе спостереження за 8-денний період);
  • MOD09A1: відбивальність з просторовою вирізняльною здатністю 250 м, як композит MOD09GA (кожний піксель містить найкраще можливе спостереження за 8-денний період);
  • MYD09A1: відбивальність з просторовою вирізняльною здатністю 250 м, як композит MYD09GA (кожний піксель містить найкраще можливе спостереження за 8-денний період);

Класифікація земельного покриву

This chapter provides basic definitions about land cover classifications.

Контрольована класифікація

Напівавтоматична класифікація (також контрольована класифікація) це техніка обробки зображень, яка дозволяє визначити матеріали на знімку відповідно до їх спектральних сигнатур. Існує декілька видів алгоритмів класифікації, але головна мета це створення тематичної карти земельного покриву.

Обробка зобоажень та просторовий ГІС-аналіз потребують спеціалізованого програмного забезпечення такого як Semi-Automatic Classification Plugin для QGIS.

_images/multispectral_classification.jpg

Багатоспектральне зображення оброблене для створення класифікації земельного покриву

(Знімок Landsat надано USGS)

Кольоровий композит

Зазвичай створюється комбінація трьох індивідуальних монохромних зображень, в якій кожному призначається певний колір; така комбінація називається кольоровий композит та корисна для візуальної інтерпретації (NASA, 2013). Кольрові композити можуть бути описані наступним виразом:

«R G B = Br Bg Bb»

де:

  • R відповідає Червоному;
  • G відповідає Зеленому;
  • B відповідає Синьому;
  • Br це номер каналу, що асоціюється з червоним кольором;
  • Bg це номер каналу, що асоціюється з зеленим кольором;
  • Bb це номер каналу, що асоціюється з синім кольором.

Наступний рисунок Кольоровий композит знімка Landsat 8 демонструє кольоровий композит «R G B = 4 3 2» знімка Landsat 8 (для Landsat 7 аналогічний кольровий композит це R G B = 3 2 1; для Sentinel-2 це R G B = 4 3 2) та кольоровий композит «R G B = 5 4 3» (для Landsat 7 аналогічний кольоровий композит це R G B = 4 3 2; для Sentinel-2 це R G B = 8 4 3). Композит «R G B = 5 4 3» корисний для інтерпретації зображень тому що пікселі з рослинністю виглядають червоними (здорова рослинність відбиває значну частину надхідного світла в ближній іфрачервоній зоні, що проявляється у вищих значеннях відбивальності для каналу 5, а відтак і вищих значеннях для пов’язаного червоного кольору).

_images/color_composite.jpg

Кольоровий композит знімка Landsat 8

Дані доступні з Геологічної служби США

Навчальні області

Зазвичай, контрольована класифікація потребує, щоб користувач визначив одну або декілька областей інтересу (Regions of Interest - ROI або навчальних областей) для кожного класу земельного покриву, що визначається на знімку. ROI це полігони окреслені навколо однорідних ділянок зображення, що накладаються на пікселі, які належать до одного класу земельного покриву.

Алгоритм нарощування області

Алгоритм нарощування області дозволяє вибрати пікселі подібні до насінини з урахуванням спектральної подібності (тобто спектральної відстані) прилеглих пікселів. В SCP алгоритм нарощування області доступний для створення навчальних областей. Параметр відстань пов’язаний з подібністю значень пікселів (чим нижче значення, тим більш подібні вибрані пікселі) до насінини (вибраної клацанням на пікселі). Додатковий параметр це максимальна ширина, яка є довжиною сторони квадрата з центром в пікселі-насінині, до якого вписана навчальна область (якби всі пікселі мали одні і ті самі значення, то навчальна область також була б квадратною). Мінімальний розмір використовується в якості обмеження (поокремо для кожного каналу) при виборі пікселів, що є більш подібними до насінини, доки їх кількість не досягне принаймні мінімального розміру.

На рисунку Приклад нарощування області центральний пісель використовується в якості насінини (a) для нарощування області одного каналу (b) з параметром спектральної відстані = 0.1; подібні пікселі вибираються для створення навчальної області (c та d).

_images/region_growing.jpg

Приклад нарощування області

Класи та макрокласи

Класи земельного покриву ідентифікуються за довільними кодами ID (тобто унікальними ідентифікаторами). SCP дозволяє призначати ID макрокласу (тобто MC ID) та ID класу (тобто C ID), які є кодами-ідентифікаторами класів земельного покриву. Макроклас це група ROI, що мають різні ID класу, які є зручними за необхідності класифікувати матеріали, що характеризуються різними спектральними сигнатурами, але належать до одного класу земельного покриву. Наприклад, можна віділити траву (ID класу = 1 та ID макрокласу = 1 ) та дерева (ID класу = 2 та ID макрокласу = 1 ) як клас рослинності (ID макрокласу = 1 ). Як показано в таблиці нижче, декілька ID класів можуть бути віднесені до одного і того самого ID макрокласу, але один і той самий ID класу не може бути віднесений до багатьох ID макрокласів.

Приклад макрокласів
Назва макрокласу ID макрокласу Назва класу ID класу
Рослинність 1 Трава 1
Рослинність 1 Дерева 2
Забудова 2 Будівлі 3
Забудова 2 Дороги 4

Відтак, як показано на рис. Приклад макрокласу, класи є підмножинами макрокласу.

_images/macroclass_example.jpg

Приклад макрокласу

Якщо цілі дослідження не вимагають використання макрокласу, тоді один і той самий ID макрокласу може бути призначений всім ROI (наприклад, ID макрокласу = 1) та значення макрокласу не братимуться до уваги в процесі класифікації.

Алгоритми класифікації

Спектральні сигнатури (спектральні характеристики) визначених класів земельного покриву розраховуються з урахуванням значень пікселів кожної ROI, що має той самий ID класу (або ID макрокласу). Відтак, алгоритм класифікації класифікує все зображення шляхом співставлення спектральних характеристик кожного пікселя з спектральними характеристиками визначених класів земельного покриву. SCP здатний реалізовувати наступні алгоритми класифікації.

Мінімальної відстані

Алгоритм мінімальної відстані розраховує Евклідову відстань \(d(x, y)\) між спектральними сигнатурами пікселів зображення та навчальними спектральними сигнатурами за наступною формулою:

\[d(x, y) = \sqrt{ \sum_{i=1}^{n} (x_i - y_i)^2}\]

де:

  • \(x\) = вектор спектральної сигнатури пікселя зображення;
  • \(y\) = вектор спектральної сигнатури навчальної області;
  • \(n\) = кількість каналів знімка.

Відтак, відстань розраховується для кожного пікселя на знімку з присвоєнням класу найближчої спектральної сигнатури відповідно до наступної дискримінантної функції (з змінами за Richards and Jia, 2006):

\[x \in C_k \iff d(x, y_k) < d(x, y_j) \forall k \neq j\]

де:

  • \(C_k\) = клас земельного покриву \(k\);
  • \(y_k\) = спектральна сигнатура класу \(k\);
  • \(y_j\) = спектральна сигнатура класу \(j\).

Є можливість визначення порогової величини \(T_i\) з метою виключення з класифікації пікселів, що знаходяться нижче цього значення:

\[ \begin{align}\begin{aligned}x \in C_k \iff d(x, y_k) < d(x, y_j) \forall k \neq j\\and\\d(x, y_k) < T_i\end{aligned}\end{align} \]
Максимальної вірогідності

Алгоритм максимальної вірогідності розраховує розподіл імовірностей для класів за Беєсовою теоремою, оцінюючи належність пікселя до класу земельного покриву. Зокрема, передбачається, що розподіл імовірностей для класів характеризується формою багатовимірних нормальних моделей (Richards & Jia, 2006). Для того, щоб застосовувати цей алгоритм, для кожної навчальної області необхідна кількість пікселів достатня для розрахунку матриці коваріації. Дискримінантна функція, наведена Richards and Jia (2006), розраховується для кожного пікселя як:

\[g_k(x) = \ln p(C_k) - \frac{1}{2} \ln | \Sigma_{k} | - \frac{1}{2} (x - y_k)^t \Sigma_{k}^{-1} (x - y_k)\]

де:

  • \(C_k\) = клас земельного покриву \(k\);
  • \(x\) = вектор спектральної сигнатури пікселя зображення;
  • \(p(C_k)\) = імовірність, що вірний клас це \(C_k\);
  • \(| \Sigma_{k} |\) = визначник матриці коваріації даних в класі \(C_k\);
  • \(\Sigma_{k}^{-1}\) = обернена матриця коваріації;
  • \(y_k\) = вектор спектральної сигнатури класу \(k\).

Таким чином:

\[x \in C_k \iff g_k(x) > g_j(x) \forall k \neq j\]
_images/maximum_likelihood.jpg

Приклад максимальної вірогідності

Також є можливість визначення порогової величини дискрмінантної функції з метою виключення з класифікації пікселів, що знаходяться нижче цього значення. З урахуванням порогової величини \(T_i\) умова класифікації набуває вигляду:

\[ \begin{align}\begin{aligned}x \in C_k \iff g_k(x) > g_j(x) \forall k \neq j\\and\\g_k(x) > T_i\end{aligned}\end{align} \]

Класифікація за алгоритмом максимальної вірогідності є однією з найбільш поширених контрольованих класифікацій, однак процес класифікації може бути повільнішим порівняно з Мінімальної відстані.

Картографування спектрального кута

Алгоритм картографування спектрального кута розраховує спектральний кут між спектральними сигнатурами пікселів зображення та навчальними спектральними сигнатурами. Спектральний кут \(\theta\) визначається як (Kruse et al., 1993):

\[\theta(x, y) = \cos^{-1} \left( \frac{ \sum_{i=1}^{n} x_i y_i } { \left( \sum_{i=1}^{n} x_i^2 \right)^\frac{1}{2} * \left( \sum_{i=1}^{n} y_i^2 \right)^\frac{1}{2} } \right)\]

Де:

  • \(x\) = вектор спектральної сигнатури пікселя зображення;
  • \(y\) = вектор спектральної сигнатури навчальної області;
  • \(n\) = кількість каналів знімка.

Відтак піксель належить до класу, що має найменший кут, тобто:

\[x \in C_k \iff \theta(x, y_k) < \theta(x, y_j) \forall k \neq j\]

де:

  • \(C_k\) = клас земельного покриву \(k\);
  • \(y_k\) = спектральна сигнатура класу \(k\);
  • \(y_j\) = спектральна сигнатура класу \(j\).
_images/spectral_angle_mapping.jpg

Приклад картографування спектрального кута

З метою виключення з класифікації пікселів нижче цього значення можливо призначити порогову величину \(T_i\):

\[ \begin{align}\begin{aligned}x \in C_k \iff \theta(x, y_k) < \theta(x, y_j) \forall k \neq j\\and\\\theta(x, y_k) < T_i\end{aligned}\end{align} \]

Алгоритм картографування спектрального кута широко застосовується, особливо з гіперспектральними даними.

Класифікація паралелепіпеда

Класифікація паралелепіпеда це алгоритм, який враховує діапазон значень для кожного каналу, формуючи багатовимірний паралелепіпед, що визначає клас земельного покриву. Піксель відноситься до класу, якщо його значення знаходяться всередині паралелепіпеда. Одним з основних обмежень є те, що пікселі, сигнатури яких знаходяться в областях перекриття двох або більше паралелепіпедів, не можуть бути класифіковані (Richards and Jia, 2006).

Класифікація сигнатур земного покриву

У SCP доступна Класифікація сигнатур земельного покриву (див. Класифікація сигнатур земельного покриву). Ця класифікація дозволяє визначати спектральні порогові величини для кожної сигнатури входових навчальних даних (мінімальне та максимальне значення для кожного каналу). Порогові величини для кожної сигнатури входових навчальних даних визначають область, що належить до певного класу земельного покриву.

Спектральні сигнатури пікселів зображення порівнюються з спектральними навчальними сигнатурами; піксель належить до класу X, якщо його спектральна сигнатура повністю міститься в спектральній області, що визначається класом X. У випадку, якщо пікселі потрапляють до області перекриття або поза межі будь-якої спектральної області, є можливість застосувати додаткові алгоритми класифікації (наприклад, Мінімальної відстані, Максимальної вірогідності, Картографування спектрального кута) з урахуванням спектральних характеристик первинних входових сигнатур.

Рисунок нижче схематично ілюструє Класифікація сигнатур земельного покриву для простого випадку двох спектральних каналів \(x\) та \(y\). Визначені користувачем спектральні області означують три класи (\(g_a\), \(g_b\) та \(g_c\)). Точка \(p_1\) належить до класу \(g_a\), а точка \(p_2\) - до класу \(g_b\). Однак точка \(p_3\) потрапляє всередину спектральних областей обох класів \(g_b\) та \(g_c\) (області, що перекриваються); в такому випадку тока \(p_3\) залишиться некласифікованою або буде класифікована за додатковим алгоритмом класифікації. Точка \(p_4\) знаходиться поза межами будь-якої спектральної області, тому вона залишиться некласифікованою або буде класифікована за додатковим алгоритмом класифікації. За умови, що точка \(p_4\) належить до класу \(g_c\), спектральна область може бути розширена, щоб включити точку \(p_4\) .

_images/land_cover_signature_classification.jpg

Класифікація сигнатур земельного покриву

Це є подібним до Класифікація паралелепіпеда, за виключенням того, що спектральні області визначаються користувачем і їх верхній та нижній ліміти можуть бути призначені незалежно. Спектральні області можна уявити як набір спектральних сигнатури всіх пікселів, що належать до одного класу.

На рисунку Графік спектральних діапазонів показано спектральні діапазони трьох класів (\(g_a\), \(g_b\) та \(g_c\)); кольорові лінії всередині діапазонів (тобто напівпрозорої області) представляють спектральні сигнатури пікселів, що визначають верхній та нижній ліміти відповідних діапазонів. Піксель \(p_1\) (крапкова лінія) належить до класу \(g_b\) тому що його спектральна сигнатура знаходиться повністю всередині діапазону класу \(g_b\) (у верхньому ліміті); піксель \(p_2\) (пунктирна лінія) не класифікований, тому що його спектральна сигнатура не входить повністю до жодного діапазону; піксель \(p_3\) (крапкова лінія) належить до класу \(g_a\).

_images/land_cover_signature_classification_plot.jpg

Графік спектральних діапазонів

Варто зазначити, що ці спектральні порогові величини можуть бути застосовані до будь-якої сигнатури, безвідносно її спектральних характеристик; ця функція може бут дуже корисною для відокремлення подібних спектральних сигнатур, що відрізняються лише в одному каналі, з визначенням порогових величин, які включають або виключають конкретні сигнатури. Фактично, класи відокремлюються коректно якщо їх спектральні області не перекриваються принаймні в одному каналі. Звичайно, навіть за наявності перекриття спектральних областей є можливість, що жоден піксель не потрапить до області перекриття і не буде невірно класифікований; верхній (або нижній) ліміт області не передбачає існування на зображенні будь-якої спектральної сигнатури, що має максимальне (або мінімальне) значення діапазону за всіма каналами (наприклад піксель math:p_1 рисунка Графік спектральних діапазонів не міг би існувати).

Однією з головних переваг Класифікації сигнатур земельних покривів є можливість вибору пікселів та включення їх сигнатур до спектрального діапазону; відтак, класифікація повинна бути безпосереднім представленням класу, що очікується для кожної спектральної сигнатури. Це дуже доречно для класифікації єдиного класу земельного покриву (визначеного за специфічними спектральними пороговими величинами) та залишає некласифікованою іншу частину зображення, яка не представляє інтересу для цілей класифікації.

Растр алгоритму

Растр алгоритму представляє «відстань» (відповідно до визначення алгоритму класифікації) пікселя зображення до певної спектральної сигнатури.

Здебільшого растр алгоритму створюється для кожної спектральної сигнатури, використаної в якості навчальних входових даних. Значення кожного пікселя це результат розрахунків алгоритму для конкретної спектральної сигнатури. Відтак, піксель належить до класу X якщо значення растра алгоритму, що відповідає класу X є найнижчим у випадку Мінімальної відстані або Картографування спектрального кута (або найвищим у випадку Максимальної вірогідності).

Залежно від класифікації може бути зроблена комбінація растрів алгоритму, щоб створити растр найменших «відстаней» (тобто пікселі мають значення растра алгоритму, що співвідноситься з класом до якого вони належать за класифікацією). Таким чином, цей растр може бути корисним для визначення пікселів, що потребують додаткового збору подібних спектральних сигнатур (див. Попередній перегляд результатів класифікації).

Спектральна відстань

Для того, щоб оцінити, чи подібні класи настільки, що це може призвести до помилок класифікації, доцільно оцінювати спектральну відстань (або відокремність) між навчальними сигнатурами та пікселями. В SCP реалізовано наступні алгоритми для оцінки подібності спектральних сигнатур.

Відстань Джефріса-Мацусіти

Відстань Джефріса-Мацусіти розраховує відокремність двох розподілів імовірностей. Це може бути особливо змістовно для оцінювання результатів класифікацій Максимальної вірогідності.

Відстань Джефріса-Мацусіти \(J_{xy}\) розраховується як (Richards and Jia, 2006):

\[J_{xy} = 2 \left( 1 - e^{-B} \right)\]

де:

\[B = \frac{1}{8} (x - y)^t \left( \frac{\Sigma_{x} + \Sigma_{y}}{2} \right)^{-1} (x - y) + \frac{1}{2} \ln \left( \frac{ | \frac{ \Sigma_{x} + \Sigma_{y}}{2} | }{ | \Sigma_{x} |^{\frac{1}{2}} | \Sigma_{y} |^{\frac{1}{2}} } \right)\]

де:

  • \(x\) = вектор першої спектральної сигнатури;
  • \(y\) = вектор другої спектральної сигнатури;
  • \(\Sigma_{x}\) = матриця коваріації вибірки \(x\);
  • \(\Sigma_{y}\) = матриця коваріації вибірки \(y\);

Відстань Джефріса-Мацусіти асимптотна до 2, коли сигнатури абсолютно різні, і наближається до 0, коли сигнатури ідентичні.

Спектральний кут

Спектральний кут найбільш придатний для оцінки алгоритму Картографування спектрального кута. Спектральний кут :theta визначається як (Kruse et al., 1993):

\[\theta(x, y) = \cos^{-1} \left( \frac{ \sum_{i=1}^{n} x_i y_i } { \left( \sum_{i=1}^{n} x_i^2 \right)^\frac{1}{2} * \left( \sum_{i=1}^{n} y_i^2 \right)^\frac{1}{2} } \right)\]

Де:

  • \(x\) = вектор спектральної сигнатури пікселя зображення;
  • \(y\) = вектор спектральної сигнатури навчальної області;
  • \(n\) = кількість каналів знімка.

Спектральний кут іде від 0, коли сигнатури ідентичні, до 90, коли сигнатури абсолютно різні.

Евклідова відстань

Евклідова відстань особливо корисна для оцінювання результатів класифікацій Мінімальної відстані. Фактично відстань визначається як:

\[d(x, y) = \sqrt{ \sum_{i=1}^{n} (x_i - y_i)^2}\]

де:

  • \(x\) = вектор першої спектральної сигнатури;
  • \(y\) = вектор другої спектральної сигнатури;
  • \(n\) = кількість каналів знімка.

Евклідова відстань дорівнює 0 якщо сигнатури ідентичні і зростає із зростанням спектральної відстані між сигнатурами.

Подібність Брея-Кертіса

Подібність Брея-Кертіса це статистика, що використовується для оцінювання спорідненості між двома вибірками (читайте). Вона корисна загалом для оцінки подібності спектральних сигнатур, подібність Брея-Кертіса \(S(x, y)\) розраховується як:

\[S(x, y) = 100 - \left( \frac{\sum_{i=1}^{n} | (x_i - y_i) |}{\sum_{i=1}^{n} x_i + \sum_{i=1}^{n} y_i} \right) * 100\]

де:

  • \(x\) = вектор першої спектральної сигнатури;
  • \(y\) = вектор другої спектральної сигнатури;
  • \(n\) = кількість каналів знімка.

Подібність Брея-Кертіса розраховується у відсотках і змінюється від 0, коли сигнатури абсолютно різні, до 100, коли спектральні сигнатури ідентичні.

Результат класифікації

Результатом процесу класифікації є растр (дивіться приклад класифікації Landsat на рисунку Класифікація Landsat), де значення пікселів співвідносяться з унікальними ідентифікаторами класів і кожний колір представляє клас земельного покриву.

_images/Landsat_classification.jpg

Класифікація Landsat

Дані доступні з Геологічної служби США

Певна кількість помилок може таплятись в класифікації земельного покриву (тобто пікселі віднесені до помилкового класу земельного покриву) через спектральну подібність класів або невірне визначення класу під час збору ROI.

Оцінка точності

Після процесу класифікації доцільно оцінити точність класифікації земельного покриву з метою ідентифікації та вимірювання похибок карти. Зазвичай оцінка точності виконується з розрахунком матриці похибок, яка є таблицею, що порівнює інформацію карти з контрольними даними (тобто з даними підсупутникових спостережень) для певної кількості пробних ділянок (Congalton and Green, 2009)..

Наступна таблиця схематично зображує матрицю похибок, де k це число класів, що ідентифікуються в класифікації земельного покриву, а n це загальна кількість зібраних елементів вибірки. Елементи основної діагоналі (aii) це кількість вірно ідентифікованих елементів, а інші елементи являють собою похибку класифікації.

Схема матриці похибок
  Підсупутникове спостереження 1 Підсупутникове спостереження 2 Підсупутникове спостереження k Сума
Клас 1 \(a_{11}\) \(a_{12}\) \(a_{1k}\) \(a_{1+}\)
Клас 2 \(a_{21}\) \(a_{22}\) \(a_{2k}\) \(a_{2+}\)
Клас k \(a_{k1}\) \(a_{k2}\) \(a_{kk}\) \(a_{k+}\)
Сума \(a_{+1}\) \(a_{+2}\) \(a_{+k}\) \(n\)

Відтак, можливо розрахувати загальну точність як відношення кількості елементів, що класифіковані вірно (сума основної діагоналі), до загальної кількості елементів вибірки n (Congalton and Green, 2009).

The overall accuracy (also expressed in percentage) is defined as:

\[O = \sum_{i=1}^{k} a_{ii} / n\]

Ther user’s accuracy for each class is defined as the ratio (also expressed in percentage) between correct samples and the row total:

\[U_i = a_{ii} / a_{i+}\]

The commission error \(CE_i = 1 - U_i\) corresponds to pixels classified as class \(i\) that actually belong to a different class.

The producer’s accuracy for each class is calculated as the ratio (also expressed in percentage) between correct samples and the column total:

\[P_i = a_{ii} / a_{+i}\]

The omission error \(OE_i = 1 - P_i\) corresponds to pixels actually belonging to class \(i\) that were classified erroneously as a different class.

User’s accuracy is It is recommended to calculate the area based error matrix (Olofsson, et al., 2014) where each element represents the estimated area proportion of each class. This allows for estimating the unbiased user’s accuracy and producer’s accuracy, the unbiased area of classes according to reference data, and the standard error of area estimates.

Для отримання подальшої інформації вільно доступна наступна документація: Landsat 7 Science Data User’s Handbook, Remote Sensing Note або Wikipedia.

Image processing

Remote sensing images can be processed in various ways in order to obtain classification, indices, or other derived information that can be useful for land cover characterization.

Аналіз головних компонент

Аналіз головних компонент (Principal Component Analysis - PCA) це метод зменшення вимірності змінних (каналів) до головних компонент (JARS, 1993).

Трансформація головних компонент надає новий набір каналів (головних компонент), які мають наступні характеристики: головні компоненти не корелюють; кожна наступна компонента має дисперсію меншу, ніж попередня компонента. Відтак, це ефективний метод виокремлення інформації та ущільнювання даних (Ready and Wintz, 1973).

У випадку знімка з N спектральними каналами головні компоненти отримуються розрахунком матриці (Ready and Wintz, 1973; Richards and Jia, 2006):

\[Y = D^t X\]

де:

  • \(Y\) = вектор головних компонент
  • \(D\) = матриця власних векторів матриці коваріації \(C_x\) в просторі X
  • \(t\) позначає транспонування вектора

А \(X\) розраховується як:

\[X = P - M\]
  • \(P\) = вектор спектральних значень, що відповідають кожному пікселю
  • \(M\) = вектор середніх значень, що відповідають кожному каналу

Відтак, середнє \(X\), що відповідає кожному каналу становить 0. \(D\) формується власними векторами (матриці коваріації \(C_x\)), впорядкованими як власні числа від максимуму до мініму, для отримання максимальної дисперсії у першій компоненті. Таким чином, головні компоненти не корелюють та кожна наступна компонента має дисперсію меншу, ніж попередня (Ready and Wintz, 1973).

Зазвичай перші дві компоненти містять понад 90% дисперсії. Наприклад, перша головна компонента може бути відображена у Кольоровий композит для підкреслення класів Земельний покрив або використана в якості входових даних для Контрольована класифікація.

Панхроматичне об’єднання

Панхроматичне об’єднання або пан-шарпенинг це поєднання спектральної інформації багатоспектральних каналів (MS), які мають нижчу вирізняльну здатність (для каналів Landsat просторова вирізняльна здатність становить 30 м), з просторовою вирізняльною здатністю панхроматичного каналу (PAN), яка для Landsat 7 та 8 становить 15 м. Результатом є багатоспектральне зображення з просторовою вирізняльною здатністю панхроматичного каналу (тобто 15 м). В SCP застосовується перетворення Бровея, де перетворені значення кожного багатоспектрального каналу розраховуються як (Johnson, Tateishi and Hoan, 2012):

\[MSpan = MS * PAN / I\]

де \(I\) це Інтенсивність, яка є функцією багатоспектральних каналів.

Відповідно до декількох тестів, проведених з застосуванням SCP, для I визначено наступні вагові коефіцієнти. Для Landsat 8, Інтенсивність розраховується як:

\[I = (0.42 * Blue + 0.98 * Green + 0.6 * Red ) / 2\]

Для Landsat 7, Інтенсивність розраховується як:

\[I = (0.42 * Blue + 0.98 * Green + 0.6 * Red + NIR) / 3\]
_images/pan_sharpening_comparison.jpg

Приклад знімка Landsat 8, який був підданим панхроматичному об’єднанню. Ліворуч первинні багатоспектральні канали (30 м); праворуч панхроматично об’єднані (15 м)

Дані доступні з Геологічної служби США

Спектральні індекси

Спектральні індекси це математичні дії між спектральними каналами спрямовані на отримання інформації про рослинний покрив (JARS, 1993). Один з найбільш популярних індексів це вегетаційний індекс нормалізованої різниці (англ. Normalized Difference Vegetation Index - NDVI), що визначається як (JARS, 1993):

\[NDVI = ( NIR - Red ) / ( NIR + Red )\]

Значення NDVI варіюють від -1 до 1. Густа та здорова рослинність демонструє вищі значення, а ділянки без рослинного покриву характеризуються низькими значеннями NDVI.

Інший індекс це підсилений вегетаційний індекс (англ. Enhanced Vegetation Index - EVI), який намагається враховувати атмосферні ефекти, такі як енергетична світність, відбита від атмосфери, розраховуючи різницю між синім та червоним каналами (Didan,et al., 2015). EVI визначається як:

\[EVI = G ( NIR - Red ) / ( NIR + C_1 Red - C_2 Blue + L)\]

де: \(G\) масштабний коефіцієнт, \(C_1\) та \(C_2\) коефіцієнти атмосферних ефектів та \(L\) фактор для урахування диференційного NIR та червоного випромінного передавання через рослинний полог. Типові значення коефіцієнтів становлять: \(G = 2.5\), \(L = 1\), \(C_1 = 6\), \(C_2 = 7.5\) (Didan,et al., 2015).

Clustering

Clustering is the grouping of pixels based on spectral similarity (e.g. Евклідова відстань or Спектральний кут) calculated for a multispectral image (Richards and Jia, 2006).

Clustering can be used for unsupervised classification or for the automatic selection of spectral signatures. It is worth noticing that, while Контрольована класифікація produces a classification whith the classes identified during the trainining process, the classes produced by clustering (i.e. clusters) have no definition and consequently the user must assign a land cover label to each class.

The main advantage of clustering resides in automation. Of course, clusters do not necessarily represent a particular land cover type and additional processing could be required for producing an accurate classification.

There are several types of clustering, mainly based on iterative methods; the following are the algorithms provided in SCP.

K-means

The K-means method is based on the calculation of the average spectral signature of clusters (Wikipedia, 2017; JARS, 1993).

At first, the user defines the number of clusters expected in the image, which correspond to as many spectral signatures (i.e. seeds). Starting spectral signatures can be selected in various ways (e.g. randomly, provided by the user, calculated automatically from image values).

During the first iteration clusters are produced calculating the pixel spectral distance with initial spectral signatures. The algorithms Евклідова відстань or Спектральний кут can be used for distance calculation. Pixels are assigned according to the most similar spectral signature, therefore producing clusters.

Then, the average spectral signature is calculated for each cluster of pixels, resulting in the spectral signatures that will be used in the following iteration.

This process continues iteratively producing clusters and mean spectral signatures, until one of the following condition is verified:

  • the spectral distance between the spectral signatures produced in this iteration with the corresponding ones produced in the previous iteration is lower than a certain threshold;
  • the maximum number of iterations is reached.

After the last iteration, a raster of clusters is produced using the spectral signatures derived from the last iteration.

ISODATA

The ISODATA (Iterative Self-Organizing Data Analysis Technique) method is similar to K-means but with the additional steps of merging clusters having similar spectral signatures and splitting clusters having too high varability (i.e. standard deviation) of spectral signatures (Ball & Hall, 1965). Following, the SCP implementation of ISODATA is described.

At first, the user defines the number of clusters expected in the image, which correspond to as many spectral signatures (i.e. seeds). Starting spectral signatures can be selected in various ways (e.g. randomly, provided by the user, calculated automatically from image values). Initial parameteres provided by user are:

  • \(C\) = number of desired clusters
  • \(N_{min}\) = minimum number of pixels for a cluster
  • \(\sigma_{t}\) = maximum standard deviation threshold for splitting
  • \(D_{t}\) = distance threshold for merging

During the first iteration clusters are produced calculating the Евклідова відстань of pixels with initial spectral signatures. Pixels are assigned according to the most similar spectral signature, therefore producing clusters.

Therefore, the following parameters are calculated:

  • \(N_{i}\) = number of pixels of cluster \(i\)
  • \(S_{i}\) = average spectral signature of cluster \(i\)
  • \(AVERAGEDIST_{i}\) = average distance of cluster \(i\) with the seed spectral signature
  • \(AVERAGEDISTANCE\) = overall average distance of all clusters
  • \(\sigma_{ij}\) = standard deviation of cluster \(i\) in band \(j\)
  • \(\sigma max_{i}\) = maximum standard deviation of cluster \(i\) (i.e. \(max( \sigma_{ij} )\))
  • \(k_{i}\) = band where \(\sigma max_{i}\) occurred
  • \(Sk_{i}\) = value of \(S_{i}\) at band \(k_{i}\)
  • \(P\) = number of clusters

Then, for each cluster \(i\), if \(N_{i}\) < \(N_{min}\) , then the cluster \(i\) is discarded.

If \(P\) <= \(C\) then try to split clusters. For each cluster \(i\):

  • If \(\sigma max_{i}\) > \(\sigma_{t}\) :

    • If ((\(AVERAGEDIST_{i}\) > \(AVERAGEDISTANCE\)) AND (\(N_{i}\) > (2 * \(N_{min}\) + 2) )) OR (\(C\) > 2 * \(P\)):

      • create a new spectral signature \(S_{p + 1}\) = \(S_{i}\)
      • in \(S_{i}\) set the value \(Sk_{i}\) = \(Sk_{i}\) + \(\sigma max_{i}\)
      • in \(S_{p + 1}\) set the value \(Sk_{p + 1}\) = \(Sk_{i}\) - \(\sigma max_{i}\)
      • \(P\) = \(P\) + 1
      • start a new iteration

If \(P\) > (2 * \(C\)) then try to merge clusters.

  • For each combination \(xy\) of spectrals signatures calculate \(D_{xy}\) = Евклідова відстань of spectral signatures \(S_{x}\) and \(S_{y}\) .

  • If the minimum \(D_{xy}\) is greater than \(D_{t}\):

    • S_{i} = (\(N_{i}\) * S_{i} + \(N_{j}\) * S_{j})/(\(N_{i}\) + \(N_{j}\))
    • discard S_{j}
    • \(P\) = \(P\) - 1
    • start a new iteration

After the last iteration, a raster of clusters is produced using the spectral signatures derived from the last iteration. The number of clusters can vary according to the processes of splitting and merging.


Перерахунок знімка у значення відбивальності

В цьому розділі наведено інформацію щодо способу перерахунку у значення відбивальності, реалізованому у SCP.

Енергетична світність на апертурі сенсора

Енергетична світність це “потік енергії (переважно випромінної або надхідної) на одиницю просторового кута поверхні, що залишає одиницю площі поверхні в заданому напрямку”, “Енергетична світність вимірюється сенсором та певною мірою залежить від відбивальності” (NASA, 2011, p. 47).

Знімки, такі як Landsat або Sentinel-2, складаються з декількох каналів та файлу метаданих, який містить інформацію необхідну для перерахунку у значення відбивальності.

Знімки Landsat постачаються у попередньо змасштабованих значеннях енергетичної світності. Для знімків Landsat спектральна густина енергетичної світності на апертурі сенсора (\(L_{\lambda}\), яка вимірюється у [Вт/(м кв. * стерадіан * \(\mu m\))]), визначається за (https://landsat.usgs.gov/Landsat8_Using_Product.php):

\[L_{\lambda} = M_{L} * Q_{cal} + A_{L}\]

де:

  • \(M_{L}\) = залежний від каналу множильний коефіцієнт перемасштабовування з метаданих Landsat (RADIANCE_MULT_BAND_x, де x це номер каналу)
  • \(A_{L}\) = залежний від каналу адитивний коефіцієнт перемасштабовування з метаданих Landsat (RADIANCE_ADD_BAND_x, де x це номер каналу)
  • \(Q_{cal}\) = дискретизовані та калібровані значення пікселів стандартного продукту (DN)

Знімки Sentinel-2 (Level-1C) постачаються вже попередньо змасштабованими у Відбивальність на поверхні атмосфери (ТОА) (ESA, 2015).

Відбивальність на поверхні атмосфери (ТОА)

Знімки у значеннях енергетичної світності можуть бути перераховані у відбивальність на поверхні атмосфери (ТОА) (комбіновану відбивальність земної поверхні та атмосфери) з метою зменшення мінливості між сценами шляхом нормування значень енергетичної освітленості сонцевим проміннямю. Відбивальність ТОА (\(\rho_{p}\)), яка є безрозмірним відношенням відбитої до загальної потужності енергії (NASA, 2011), розраховується як:

\[\rho_{p} = (\pi * L_{\lambda} * d^{2} )/ (ESUN_{\lambda} * cos\theta_{s})\]

де:

  • \(L_{\lambda}\) = спектральна густина енергетичної світності на апертурі сенсора (енергетична світність на супутнику)
  • \(d\) = відстань між Землею та Сонцем в астрономічних одиницях (постачається з файлом метаданих Landsat 8, також можно скористатись файлом Еxcel, доступним з http://landsathandbook.gsfc.nasa.gov/excel_docs/d.xls)
  • \(ESUN_{\lambda}\) = середня екзоатмосферна енергетична освітленість сонцевим промінням
  • \(\theta_{s}\) = сонцевий зенітний кут в градусах, який дорівнює \(\theta_{s}\) = 90° - \(\theta_{e}\), де \(\theta_{e}\) це висота Сонця

Варто зауважити, що дані Landsat 8 постачаються з залежними від каналу коефіцієнтами перемасштабовування, які дозволяють здійснювати безпосереднє перерахування з DN до відбивальності TOA.

Знімки Sentinel-2 постачаються у вже змасштабованих значеннях відбивальності TOA, які можуть бути перераховані до відбивальності TOA за допомогою простого перерахунку з застосуванням значення квантифікації, наведеного в метаданих (див. https://sentinel.esa.int/documents/247904/349490/S2_MSI_Product_Specification.pdf).

Sentinel-3 images are already provided in scaled TOA radiance. Conversion to reflectance is performed applying the coefficients scale_factor and add_offset provided in the metadata of each band. The ancillary raster tie_geometries.nc provides the value of sun zenith angle and the ancillary raster instrument_data provides information about the solar flux for each band, which are used for the conversion to reflectance with the correction for sun angle. In addition, the georeferencing of the bands is performed using the ancillary raster geo_coordinates.nc which provides coordinates of every pixel.

Відбивальність поверхні

Для вимірювання відбивальності на земній поверхні повинен бути врахований вплив атмосфери (тобто збурення відбивальності, яке залежить від довжини хвилі).

Відповідно до Moran et al. (1992), відбивальність земної поверхні (\(\rho\)) це:

\[\rho = [\pi * (L_{\lambda} - L_{p}) * d^{2}]/ [T_{v} * ( (ESUN_{\lambda} * cos\theta_{s} * T_{z} ) + E_{down} )]\]

де:

  • \(L_{p}\) енергетична світність, відбита від атмосфери
  • \(T_{v}\) пропускальна здатність атмосфери в напрямку огляду
  • \(T_{z}\) пропускальна здатність атмосфери в напрямку освітлення
  • \(E_{down}\) низхідна енергетична освітленість розсіяним промінням

Таким чином, для розрахунку \(\rho\) необхідно провести декілька атмосферних вимірювань (з метою отримання поправок на підставі абсолютних фізичних величин). В якості альтернативи можна скористатись відносними техніками на основі знімка, які не передбачають проведення позалабораторних вимірювань під час отримання знімка. Варто зазначити, що для даних Landsat 8 доступні Surface Reflectance High Level Data Products (для більш докладної інформації читайте http://landsat.usgs.gov/CDR_LSR.php).

Корекція DOS1

Віднімання темного об’єкта (англ. Dark Object Subtraction - DOS) це група відносних методів атмосферної корекції. Chavez (1996) пояснює “основою є припущення, що деякі пікселі зображення повністю затінені і їх енергетична світність, що отримується сенсором, представлена атмосферним розсіюванням (енергетична світність, вдібита від атмосфери). Це припущення поєднується з фактом, що лише незначна кількість об’єктів на поверхні Землі є абсолютно чорними, отже припущення мінімальної відбивальності на рівні 1% краще за 0%”. Варто зауважити, що точність відносних технік корекції загалом нижча за точність абсолютних, що ґрунтуються на реальних фізичних величинах. Тим не менше, вони можуть бути корисними за відсутності доступних атмосферних вимірювань, оскільки можуть покращити оцінку відбивальності земної поверхні. Енергетична світність, відбита від атмосфери за (Sobrino, et al., 2004):

\[L_{p} = L_{min} - L_{DO1\%}\]

де:

  • \(L_{min}\) = «енергетична світність, що співвідноситься з дискретним значенням, для якого сума всіх пікселів з меншими або рівними значеннями становить 0.01% від загальної кількості пікселів всього зображення” (Sobrino, et al., 2004, p. 437), отже отримана на підставі цього дискретного значення енергетична світність (\(DN_{min}\))
  • \(L_{DO1\%}\) = енергетична світність темного об’єкта, що за припущенням має значення відбивальності 0.01

Зокрема для знімків Landsat:

\[L_{min} = M_{L} * DN_{min} + A_{L}\]

Знімки Sentinel-2 перераховуються у значення енергетичної світності до проведення розрахунків DOS1.

Енергетична світність темного об’єкта за (Sobrino, et al., 2004):

\[L_{DO1\%} = 0.01 * [(ESUN_{\lambda} * cos\theta_{s} * T_{z} ) + E_{down}] * T_{v} / (\pi * d^{2})\]

Таким чином, енергетична світність, відбита від атмосфери, становить:

\[L_{p} = M_{L} * DN_{min} + A_{L} - 0.01* [(ESUN_{\lambda} * cos\theta_{s} * T_{z} ) + E_{down}] * T_{v} / (\pi * d^{2})\]

Існує декілька технік DOS (зокрема DOS1, DOS2, DOS3, DOS4), що ґрунтуються на різних припущеннях щодо \(T_{v}\), \(T_{z}\) та \(E_{down}\) . Найпростішим методом є DOS1, який виходить з наступних припущень (Moran et al., 1992):

  • \(T_{v}\) = 1
  • \(T_{z}\) = 1
  • \(E_{down}\) = 0

Таким чином, енергетична світність, відбита від атмосфери, становить:

\[L_{p} = M_{L} * DN_{min} + A_{L} - 0.01 * ESUN_{\lambda} * cos\theta_{s} / (\pi * d^{2})\]

Результуюча відбивальність земної поверхні визначається за:

\[\rho = [\pi * (L_{\lambda} - L_{p}) * d^{2}]/ (ESUN_{\lambda} * cos\theta_{s})\]

В наступній таблиці наведено значення ESUN [W /(m2 * \(\mu m\))] для сенсорів Landsat.

Значення ESUN для каналів Landsat
Канал Landsat 1 MSS* Landsat 2 MSS* Landsat 3 MSS* Landsat 4 TM* Landsat 5 TM* Landsat 7 ETM+**
1       1983 1983 1970
2       1795 1796 1842
3       1539 1536 1547
4 1823 1829 1839 1028 1031 1044
5 1559 1539 1555 219.8 220 225.7
6 1276 1268 1291      
7 880.1 886.6 887.9 83.49 83.44 82.06
8           1369

* за Chander, Markham, & Helder (2009)

** за http://landsathandbook.gsfc.nasa.gov/data_prod/prog_sect11_3.html


Для Landsat 8, \(ESUN\) може бути розрахована як (за http://grass.osgeo.org/grass65/manuals/i.landsat.toar.html):

\[ESUN = (\pi * d^{2}) * RADIANCE\_MAXIMUM / REFLECTANCE\_MAXIMUM\]

де значення RADIANCE_MAXIMUM та REFLECTANCE_MAXIMUM наведені в метаданих знімка.

Значення ESUN [W /(m2 * \(\mu m\))] для сенсора Sentinel-2 (наведені в метаданих знімка) містяться в наступній таблиці.

Значення ESUN для каналів Sentinel-2
Канал Sentinel-2
1 1913.57
2 1941.63
3 1822.61
4 1512.79
5 1425.56
6 1288.32
7 1163.19
8 1036.39
8A 955.19
9 813.04
10 367.15
11 245.59
12 85.25

Значення ESUN [W /(m2 * \(\mu m\))] для сенсора ASTER наведено в наступній таблиці (за Finn, et al., 2012).

Значення ESUN для каналів ASTER
Канал ASTER
1 1848
2 1549
3 1114
4 225.4
5 86.63
6 81.85
7 74.85
8 66.49
9 59.85


Приклад порівняння відбивальності TOA, DOS1 скоригованої відбивальності та Landsat Surface Reflectance High Level Data Products (підсупутникове спостереження) наведено на Рисунку Спектральні сигнатури пікселя забудови.

_images/reflectance_graph.jpg

Спектральні сигнатури пікселя забудови

Порівняння відбивальності TOA, DOS1 скоригованої відбивальності та Landsat Surface Reflectance High Level Data Products


Перерахунок у температуру

В цьому розділі наведено основну інформацію щодо способу перерахунку у яскравісну температуру на супутнику, реалізованому у SCP та оцінки температури земної поверхні.

Перерахунок у яскравісну температуру на супутнику

Для термальних каналів перерахунок DN в яскравісну температуру на супутнику відбувається за виразом (за https://landsat.usgs.gov/Landsat8_Using_Product.php):

\[T_{B} = K_{2} / ln[(K_{1} / L_{\lambda}) + 1]\]

де:

  • \(K_{1}\) = залежна від каналу стала термального перерахунку (Вт/м кв. * стерадіан * \(\mu m\))
  • \(K_{2}\) = залежна від каналу стала термального перерахунку (Кельвін)

та \(L_{\lambda}\) спектральна густина енергетичної світності на апертурі сенсора, що вимірюється у Вт/(м кв. * стерадіан * \(\mu m\)).

Сталі \(K_{1}\) та \(K_{2}\) для сенсорів Landsat наведено в наступній таблиці.

Сталі термального перерахунку для Landsat
Стала Landsat 4* Landsat 5* Landsat 7**
\(K_{1}\) 671.62 607.76 666.09
\(K_{2}\) 1284.30 1260.56 1282.71

* за Chander & Markham (2003)

** за NASA (2011)


Для Landsat 8 значення \(K_{1}\) та \(K_{2}\) наводяться в файлі метаданих знімка.


\(K_{1}\) та \(K_{2}\) розраховуються як (Jimenez-Munoz & Sobrino, 2010):

\[K_{1} = c_{1} / \lambda^{5}\]
\[K_{2} = c_{2} / \lambda\]

де (Mohr, Newell, & Taylor, 2015):

  • \(c_{1}\) = перша стала випромінювання = \(1.191 * 10^{-16} W m^{2} sr^{-1}\)
  • \(c_{2}\) = друга стала випромінювання = \(1.4388 * 10^{-2} m K\)

Таким чином, для каналів ASTER \(K_{1}\) та \(K_{2}\) наведено в наступній таблиці.

Сталі термального перерахунку для ASTER
Стала Канал 10 Канал 11 Канал 12 Канал 13 Канал 14
\(K_{1}\) \(3.024 * 10^{3}\) \(2.460 * 10^{3}\) \(1.909 * 10^{3}\) \(8.900 * 10^{2}\) \(6.464 * 10^{2}\)
\(K_{2}\) \(1.733 * 10^{3}\) \(1.663 * 10^{3}\) \(1.581 * 10^{3}\) \(1.357 * 10^{3}\) \(1.273 * 10^{3}\)

Оцінювання температури земної поверхні

Декілька досліджень описують оцінювання температури земної поверхні. Температура земної поверхні може бути розрахована на основі яскравісної температури на супутнику \(T_{B}\) як (Weng, et al. 2004):

\[T = T_{B} / [ 1 + (\lambda * T_{B} / c_{2}) * ln(e) ]\]

де:

  • \(\lambda\) = довжина хвилі випроміненої енергетичної світності
  • \(c_{2} = h * c / s = 1.4388 * 10^{-2}\) м K
  • \(h\) = стала Планка = \(6.626 * 10^{-34}\) Дж с
  • \(s\) = стала Больцмана = \(1.38 * 10^{-23}\) Дж/K
  • \(c\) = швидкість світла = \(2.998 * 10^{8}\) м/с

Значення \(\lambda\) для термальних каналів супутників Landsat та ASTER можуть бути розраховані з таблиць в Landsat Satellites та Супутник ASTER.

Декілька досліджень використовували NDVI для оцінювання випромінності земної поверхні (Sobrino, et al., 2004); інші дослідження застосовували класифікацію земельного покриву для визначення випромінності земної поверхні для кожного класу (Weng, et al. 2004). Наприклад, значення випромінності (\(e\)) різних класів земельного покриву наведено в наступній таблиці (за Mallick, et al. 2012).

Значення випромінності
Тип земної поверхні Випромінність e
Ґрунт 0.928
Трава 0.982
Асфальт 0.942
Бетон 0.937


Перелік посилань

  • Ball, G. H. & Hall, D. J., 1965. ISODATA. A novel method of data analysis and pattern classification. Menlo Park: Stanford Research Institute.
  • Chander, G. & Markham, B., 2003. Revised Landsat-5 TM radiometric calibration procedures and postcalibration dynamic ranges Geoscience and Remote Sensing, IEEE Transactions on, 41, 2674 - 2677
  • Chavez, P. S., 1996. Image-Based Atmospheric Corrections - Revisited and Improved Photogrammetric Engineering and Remote Sensing, [Falls Church, Va.] American Society of Photogrammetry, 62, 1025-1036
  • Congalton, R. and Green, K., 2009. Assessing the Accuracy of Remotely Sensed Data: Principles and Practices. Boca Raton, FL: CRC Press
  • Didan, K.; Barreto Munoz, A.; Solano, R. & Huete, A., 2015. MODIS Vegetation Index User’s Guide. Collection 6, NASA
  • ESA, 2015. Sentinel-2 User Handbook. Available at https://sentinels.copernicus.eu/documents/247904/685211/Sentinel-2_User_Handbook
  • ESA, 2013. Sentinel-3 User Handbook. Available at https://sentinels.copernicus.eu/documents/247904/685236/Sentinel-3_User_Handbook
  • Finn, M.P., Reed, M.D, and Yamamoto, K.H., 2012. A Straight Forward Guide for Processing Radiance and Reflectance for EO-1 ALI, Landsat 5 TM, Landsat 7 ETM+, and ASTER. Unpublished Report from USGS/Center of Excellence for Geospatial Information Science, 8 p, http://cegis.usgs.gov/soil_moisture/pdf/A%20Straight%20Forward%20guide%20for%20Processing%20Radiance%20and%20Reflectance_V_24Jul12.pdf
  • Fisher, P. F. and Unwin, D. J., eds., 2005. Representing GIS. Chichester, England: John Wiley & Sons
  • JARS, 1993. Remote Sensing Note. Japan Association on Remote Sensing. Режим доступу: http://www.jars1974.net/pdf/rsnote_e.html
  • Jimenez-Munoz, J. C. & Sobrino, J. A., 2010. A Single-Channel Algorithm for Land-Surface Temperature Retrieval From ASTER Data IEEE Geoscience and Remote Sensing Letters, 7, 176-179
  • Johnson, B. A., Tateishi, R. and Hoan, N. T., 2012. Satellite Image Pansharpening Using a Hybrid Approach for Object-Based Image Analysis ISPRS International Journal of Geo-Information, 1, 228. Режим доступу: http://www.mdpi.com/2220-9964/1/3/228)
  • Kruse, F. A., et al., 1993. The Spectral Image Processing System (SIPS) - Interactive Visualization and Analysis of Imaging spectrometer. Data Remote Sensing of Environment
  • Mallick, J.; Singh, C. K.; Shashtri, S.; Rahman, A. & Mukherjee, S., 2012. Land surface emissivity retrieval based on moisture index from LANDSAT TM satellite data over heterogeneous surfaces of Delhi city International Journal of Applied Earth Observation and Geoinformation, 19, 348 - 358
  • Mohr, P. J.; Newell, D. B. & Taylor, B. N., 2015. CODATA Recommended Values of the Fundamental Physical Constants: 2014 National Institute of Standards and Technology, Committee on Data for Science and Technology
  • Moran, M.; Jackson, R.; Slater, P. & Teillet, P., 1992. Evaluation of simplified procedures for retrieval of land surface reflectance factors from satellite sensor output Remote Sensing of Environment, 41, 169-184
  • NASA, 2011. Landsat 7 Science Data Users Handbook Landsat Project Science Office at NASA’s Goddard Space Flight Center in Greenbelt, 186 http://landsathandbook.gsfc.nasa.gov/pdfs/Landsat7_Handbook.pdf
  • NASA, 2013. Landsat 7 Science Data User’s Handbook. Режим доступу: http://landsathandbook.gsfc.nasa.gov
  • Olofsson, P.; Foody, G. M.; Herold, M.; Stehman, S. V.; Woodcock, C. E. & Wulder, M. A., 2014. Good practices for estimating area and assessing accuracy of land change. Remote Sensing of Environment, 148, 42 – 57
  • Ready, P. and Wintz, P., 1973. Information Extraction, SNR Improvement, and Data Compression in Multispectral Imagery. IEEE Transactions on Communications, 21, 1123-1131
  • Richards, J. A. and Jia, X., 2006. Remote Sensing Digital Image Analysis: An Introduction. Berlin, Germany: Springer
  • Sobrino, J.; Jiménez-Muñoz, J. C. & Paolini, L., 2004. Land surface temperature retrieval from LANDSAT TM 5 Remote Sensing of Environment, Elsevier, 90, 434-440
  • USGS, 2015. Advanced Spaceborne Thermal Emission and Reflection Radiometer (ASTER) Level 1 Precision Terrain Corrected Registered At-Sensor Radiance Product (AST_L1T). AST_L1T Product User’s Guide. USGS EROS Data Center.
  • Vermote, E. F.; Roger, J. C. & Ray, J. P., 2015. MODIS Surface Reflectance User’s Guide. Collection 6, NASA
  • Weng, Q.; Lu, D. & Schubring, J., 2004. Estimation of land surface temperature–vegetation abundance relationship for urban heat island studies. Remote Sensing of Environment, Elsevier Science Inc., Box 882 New York NY 10159 USA, 89, 467-483
  • Wikipedia, 2017. k-means clustering. Available at https://en.wikipedia.org/wiki/K-means_clustering

Базові навчальні матеріали

The following are very basic tutorials for land cover classification using the Semi-Automatic Classification Plugin (SCP). It is assumed that you have a basic knowledge of QGIS (you can find a guide to QGIS interface at this page).

Tutorial 1

The following is a basic tutorial about the land cover classification using the Semi-Automatic Classification Plugin (SCP). It is assumed that you have a basic knowledge of QGIS.

Tutorial 1: Your First Land Cover Classification

This is a basic tutorial about the use of SCP for the classification of a multispectral image. It is recommended to read the Короткий вступ до дистанційного зондування before this tutorial.

The purpose of the classification is to identify the following land cover classes:

  1. Water;
  2. Built-up;
  3. Vegetation;
  4. Bare soil.

The study area of this tutorial is Greenbelt (Maryland, USA) which is the site of NASA’s Goddard Space Flight Center (the institution that will lead the development of the future Landsat 9 flight segment).

Following the video of this tutorial.

http://www.youtube.com/watch?v=fUZgYxgDjsk

Download the Data

We are going to download a Landsat Satellites image (data available from the U.S. Geological Survey) and use the following bands:

  1. Blue;

  2. Green;

  3. Red;

  4. Near-Infrared;

  5. Short Wavelength Infrared 1;

  6. Short Wavelength Infrared 2.

    TIP : In case you have a slow connection you can download an image subset from this archive (about 5 MB, data available from the U.S. Geological Survey), unzip the downloaded file, and skip to Convert Data to Surface Reflectance.

Start QGIS and the SCP. Open the tab Download products clicking the button download in the Домашня, or in the Меню SCP,

We are searching a specific image acquired on 16 April 2017 because it is cloud free. In Search parameters enter the point coordinates:

  • UL: -77 / 39

  • LR: -76.9 / 38.9

    TIP : In general it is possible to define the area coordinates clicking the button pointer , then left click in the map for the UL point and right click in the map for the LR point.

Select L8 OLI/TIRS from the Products input_list and set:

  • Date from: 2017-04-16
  • to: 2017-04-16
_images/tutorial_1_1_01.jpg

Search products

Now click the button Find search_images and after a few seconds the image will be listed in the Product list. Click the item in the table to display a preview that is useful for assessing the quality of the image and the cloud cover.

_images/tutorial_1_1_02.jpg

Search result

Now click the button image_preview to load the preview in the map.

_images/tutorial_1_1_03.jpg

Image preview

We can also select the bands to be downloaded according to our purpose. In particular, select the tab Download options and check only the Landsat bands (that will be used in this tutorial): 2, 3, 4, 5, 6, 7, and the ancillary data.

_images/tutorial_1_1_04.jpg

Download options

For the purpose of this tutorial, uncheck the option checkbox Preprocess images (you should usually leave this checked) because we are going to preprocess the image in Convert Data to Surface Reflectance. To start the image download, click the button RUN run and select a directory where bands are saved. The download could last a few minutes according to your internet connection speed. The download progress is displayed in a bar.

TIP : The option checkbox Only if preview in Layers allows for downloading only images in the result table which are loaded as previews in the map. If this option is unchecked, all the products in the list are downloaded.

After the download, all the bands are automatically loaded in the map.

_images/tutorial_1_1_05.jpg

Download of Landsat bands

Clip the Data

For for limiting the study area (and reducing the processing time) we can clip the image.

First, we need to define a Band set containing the bands to be clipped. Open the tab Band set clicking the button bandset_tool in the Меню SCP or the Панель SCP.

Click the button reload to refresh the layer list, and select the bands: 2, 3, 4, 5, 6, and 7; then click plus to add selected rasters to the Band set 1.

_images/tutorial_1_clip_1.jpg

Band set for clipping

In Preprocessing open the tab Clip multiple rasters. We are going to clip the Band set 1 which contains Landsat bands.

Click the button pointer and select an area such as the following image (left click in the map for the UL point and right click in the map for the LR point), or enter the following values:

  • UL: 330015 / 4324995
  • LR: 349995 / 4309995
_images/tutorial_1_clip_2.jpg

Clip area

Click the button RUN run and select a directory where clipped bands are saved. New files will be created with the file name prefix defined in Output name prefix. When the process is completed, clipped rasters are loaded and displayed.

_images/tutorial_1_clip_3.jpg

Clipped bands

Convert Data to Surface Reflectance

Conversion to reflectance (see Енергетична світність та відбивальна здатність) can be performed automatically. The metadata file (a .txt file whose name contains MTL) downloaded with the images contains the required information for the conversion. Read Перерахунок знімка у значення відбивальності for information about the Відбивальність на поверхні атмосфери (ТОА) and Відбивальність поверхні.

In order to convert bands to reflectance, open the Preprocessing clicking the button preprocessing in the Меню SCP or the Панель SCP, and select the tab Landsat.

Click the button Directory containing Landsat bands open_dir and select the directory of clipped Landsat bands. The list of bands is automatically loaded in the table Metadata.

Click the button Select MTL file open_file and select the metadata file LC08_L1TP_015033_20170416_20170501_01_T1_MTL.txt from the directory of downloaded Landsat images. Metadata information is added to the table Metadata.

In order to calculate Відбивальність поверхні we are going to apply the Корекція DOS1; therefore, enable the option checkbox Apply DOS1 atmospheric correction.

TIP : In general, it is recommended to perform the DOS1 atmospheric correction for the entire image (before clipping the image) in order to improve the calculation of parameters based on the image.

For the purpose of this tutorial, uncheck the option checkbox Create Band set and use Band set tools because we are going to define this in the following step Define the Band set and create the Training Input File.

In order to start the conversion process, click the button RUN run and select the directory where converted bands are saved.

_images/tutorial_1_conversion_1.jpg

Landsat 8 conversion to reflectance

After a few minutes, converted bands are loaded and displayed (file name beginning with RT_). If checkbox Play sound when finished is checked in Classification process settings, a sound is played when the process is finished.

We can remove all the bands loaded in QGIS layers except the ones whose name begin with RT_.

_images/tutorial_1_conversion_2.jpg

Converted Landsat 8 bands

Define the Band set and create the Training Input File

Now we need to define the Band set which is the input image for SCP. Open the tab Band set clicking the button bandset_tool in the Меню SCP or the Панель SCP.

In Band set definition click the button reset to clear all the bands from active band set created during the previous steps.

Click the button reload to refresh the layer list, and select all the converted bands; then click plus to add selected rasters to the Band set.

In the table Band set definition order the band names in ascending order (click order_by_name to sort bands by name automatically). Finally, select Landsat 8 OLI from the list Quick wavelength settings, in order to set automatically the Center wavelength of each band and the Wavelength unit (required for spectral signature calculation).

_images/tutorial_1_band_set_1.jpg

Definition of a band set

We can display a Кольоровий композит of bands: Near-Infrared, Red, and Green: in the Робоча панель, click the list RGB= and select the item 4-3-2 (corresponding to the band numbers in Band set). You can see that image colors in the map change according to the selected bands, and vegetation is highlighted in red (if the item 3-2-1 was selected, natural colors would be displayed).

TIP : If a Band set is defined, a temporary virtual raster (named Virtual Band Set 1) is created automatically, which allows for the display of Кольоровий композит. In order to speed up the visualization, you can show only the virtual raster and hide all the layers in the QGIS Layers.
_images/tutorial_1_band_set_2.jpg

Color composite RGB=4-3-2

Now we need to create the Входові навчальні дані in order to collect Навчальні області (ROIs) and calculate the Спектральна сигнатура thereof (which are used in classification).

In the Панель SCP select the tab Входові навчальні дані and click the button new_file to create the Training input (define a name such as training.scp). The path of the file is displayed and a vector is added to QGIS layers with the same name as the Training input (in order to prevent data loss, you should not edit this layer using QGIS functions).

_images/tutorial_1_training_input_1.jpg

Definition of Training input in SCP

Create the ROIs

We are going to create ROIs defining the Класи та макрокласи. Each ROI is identified by a Class ID (i.e. C ID), and each ROI is assigned to a land cover class through a Macroclass ID (i.e. MC ID).

Macroclasses are composed of several materials having different spectral signatures; in order to achieve good classification results we should separate spectral signatures of different materials, even if belonging to the same macroclass. Thus, we are going to create several ROIs for each macroclass (setting the same MC ID, but assigning a different C ID to every ROI).

We are going to used the Macroclass IDs defined in the following table.

Macroclasses
Macroclass name Macroclass ID
Water 1
Built-up 2
Vegetation 3
Bare soil (low vegetation) 4

ROIs can be created by manually drawing a polygon or with an automatic region growing algorithm.

Zoom in the map over the dark area in the upper right corner of the image which is a water body. In order to create manually a ROI inside the dark area, click the button manual_ROI in the Робоча панель. Left click on the map to define the ROI vertices and right click to define the last vertex closing the polygon. An orange semi-transparent polygon is displayed over the image, which is a temporary polygon (i.e. it is not saved in the Training input).

TIP : You can draw temporary polygons (the previous one will be overridden) until the shape covers the intended area.
_images/tutorial_1_rois_1.jpg

A temporary ROI created manually

If the shape of the temporary polygon is good we can save it to the Training input.

Open the Входові навчальні дані to define the Класи та макрокласи . In the Перелік сигнатур ROI set MC ID = 1 and MC Info = Water; also set C ID = 1 and C Info = Lake. Now click save_roi to save the ROI in the Training input.

After a few seconds, the ROI is listed in the Перелік сигнатур ROI and the spectral signature is calculated (because checkbox Signature was checked).

_images/tutorial_1_rois_2.jpg

The ROI saved in the Training input

As you can see, the C ID in Перелік сигнатур ROI is automatically increased by 1. Saved ROI is displayed as a dark polygon in the map and the temporary ROI is removed. Also, in the Перелік сигнатур ROI you can notice that the Type is B, meaning that the ROI spectral signature was calculated and saved in the Training input.

You can also see in the tab Макрокласи that the first macroclass has been added to the table Macroclasses .

_images/tutorial_1_rois_3.jpg

Macroclasses

Now we are going to create a second ROI for the built-up class using the automatic region growing algorithm. Zoom in the lower region of the image. In Робоча панель set the Dist value to 0.08 . Click the button roi_single in the Робоча панель and click over the purple area of the map. After a while the orange semi-transparent polygon is displayed over the image.

TIP : Dist value should be set according to the range of pixel values; in general, increasing this value creates larger ROIs.
_images/tutorial_1_rois_5.jpg

A temporary ROI created with the automatic region growing algorithm

In the Перелік сигнатур ROI set MC ID = 2 and MC Info = Built-up ; also set C ID = 2 (it should be already set) and C Info = Buildings.

_images/tutorial_1_rois_6.jpg

The ROI saved in the Training input

Again, the C ID in Перелік сигнатур ROI is automatically increased by 1.

After clicking the button roi_single in the Робоча панель you should notice that the cursor in the map displays a value changing over the image. This is the NDVI value of the pixel beneath the cursor (NDVI is displayed because the function checkbox Display is checked in Входові навчальні дані). The NDVI value can be useful for identifying spectrally pure pixels, in fact vegetation has higher NDVI values than soil.

For instance, move the mouse over a vegetation area and left click to create a ROI when you see a local maximum value. This way, the created ROI and the spectral signature thereof will be particularly representative of healthy vegetation.

_images/tutorial_1_rois_7.jpg

NDVI value of vegetation pixel displayed in the map. Color composite RGB = 4-3-2

Create a ROI for the class Vegetation (red pixels in color composite RGB=4-3-2) and a ROI for the class Bare soil (low vegetation) (green pixels in color composite RGB=4-3-2) following the same steps described previously. The following images show a few examples of these classes identified in the map.

_images/tutorial_1_3_7.jpg

Vegetation. Color composite RGB = 4-3-2

_images/tutorial_1_3_8.jpg

Bare soil (low vegetation). Color composite RGB = 4-3-2

Assess the Spectral Signatures

Spectral signatures are used by Алгоритми класифікації for labelling image pixels. Different materials may have similar spectral signatures (especially considering multispectral images) such as built-up and soil. If spectral signatures used for classification are too similar, pixels could be misclassified because the algorithm is unable to discriminate correctly those signatures. Thus, it is useful to assess the Спектральна відстань of signatures to find similar spectral signatures that must be removed. Of course the concept of distance vary according to the algorithm used for classification.

One can simply assess spectral signature similarity by displaying a signature plot. In order to display the signature plot, in the Перелік сигнатур ROI highlight two or more spectral signatures (with click in the table), then click the button sign_plot. The Графік спектральних сигнатур is displayed in a new window. Move and zoom inside the Графік to see if signatures are similar (i.e. very close). Double click the color in the Відобразити Перелік сигнатур to change the line color in the plot.

We can see in the following figure a signature plot of different materials.

_images/tutorial_1_sig_1.jpg

Spectral plot

In the plot we can see the line of each signature (with the color defined in the Перелік сигнатур ROI), and the spectral range (minimum and maximum) of each band (i.e. the semi-transparent area colored like the signature line). The larger is the semi-transparent area of a signature, the higher is the standard deviation, and therefore the heterogeneity of pixels that composed that signature. Spectral similarity between spectral signatures is highlighted in orange in the Відобразити Перелік сигнатур.

Additionally, we can calculate the spectral distances of signatures (for more information see Спектральна відстань). Highlight two or more spectral signatures with click in the table Відобразити Перелік сигнатур, then click the button calculate_spectral_distances; distances will be calculated for each pair of signatures. Now open the tab Спектральні відстані; we can notice that similarity between signatures vary according to considered algorithm.

_images/tutorial_1_sig_2.jpg

Spectral distances

For instance, two signatures can be very similar for Картографування спектрального кута (very low Спектральний кут), but quite distant for the Максимальної вірогідності (Відстань Джефріса-Мацусіти value near 2). The similarity of signatures is affected by the similarity of materials (in relation to the number of spectral bands available); also, the way we create ROIs influences the signatures.

Spectral signature values, standard deviation and other details such as the number of ROI pixels are displayed in the Характеристика сигнатур.

_images/tutorial_1_sig_3.jpg

Spectral signature values

We need to create several ROIs (i.e. spectral signatures) for each macroclass (repeating the steps in Create the ROIs), assigning a unique C ID to each spectral signature, and assess the spectral distance thereof in order to avoid the overlap of spectral signatures belonging to different macroclasses.

In the list RGB= of the Робоча панель type 3-4-6 (you can also use the tool RGB list). Using this color composite, urban areas are purple and vegetation is green. You can notice that this color composite RGB = 3-4-6 highlights roads more than natural color (RGB = 3-2-1).

_images/tutorial_1_rois_4.jpg

Color composite RGB = 3-4-6

The following examples display a few RGB color composites of Landsat images.

TIP : Change frequently the Кольоровий композит in order to clearly identify the materials at the ground; use the mouse wheel on the list RGB= of the Робоча панель for changing the color composite rapidly; also use the buttons cumulative_stretch and std_dev_stretch for better displaying the Input image (i.e. image stretching).
_images/tutorial_1_3_9.jpg

Built-up ROI: large buildings

_images/tutorial_1_3_10.jpg

Built-up ROI: road

_images/tutorial_1_3_11.jpg

Built-up ROI: buildings, narrow roads

_images/tutorial_1_3_13.jpg

Vegetation ROI: deciduous trees

_images/tutorial_1_3_12.jpg

Vegetation ROI: riparian vegetation

It is worth mentioning that you can show or hide the temporary ROI clicking the button radiobutton ROI in Робоча панель.

TIP : Install the plugin QuickMapServices in QGIS, and add a map (e.g. OpenStreetMap) in order to facilitate the identification of ROIs using high resolution data.
Create a Classification Preview

The classification process is based on collected ROIs (and spectral signatures thereof). It is useful to create a Попередній перегляд результатів класифікації in order to assess the results (influenced by spectral signatures) before the final classification. In case the results are not good, we can collect more ROIs to better classify land cover.

Before running a classification (or a preview), set the color of land cover classes that will be displayed in the classification raster. In the Перелік сигнатур ROI, double click the color (in the column Color) of each ROI to choose a representative color of each class.

_images/tutorial_1_preview_1.jpg

Definition of class colors

Also, we need to set the color for macroclasses in table Макрокласи.

_images/tutorial_1_preview_2.jpg

Definition of macroclass colors

Now we need to select the classification algorithm. In this tutorial we are going to use the Максимальної вірогідності.

Open the Класифікація to set the use of classes or macroclasses. Check Use checkbox C ID and in Алгоритм select the Maximum Likelihood.

_images/tutorial_1_preview_3.jpg

Setting the algorithm and using C ID

In Попередній перегляд результатів класифікації set Size = 300; click the button preview and then left click a point of the image in the map. The classification process should be rapid, and the result is a classified square centered in clicked point.

_images/tutorial_1_preview_4.jpg

Classification preview displayed over the image using C ID

Previews are temporary rasters (deleted after QGIS is closed) placed in a group named Class_temp_group in the QGIS panel Layers. Now in Класифікація check Use checkbox MC ID and click the button preview_redo in Попередній перегляд результатів класифікації.

_images/tutorial_1_preview_5.jpg

Classification preview displayed over the image using MC ID

We can see that now there are only 4 colors representing the macroclasses.

TIP : When loading a previously saved QGIS project, a message could ask to handle missing layers, which are temporary layers that SCP creates during each session and are deleted afterwards; you can click Cancel and ignore these layers; also, you can delete these temporary layers clicking the button remove_temp in Робоча панель.

In general, it is good to perform a classification preview every time a ROI (or a spectral signature) is added to the Перелік сигнатур ROI. Therefore, the phases Create the ROIs and Create a Classification Preview should be iterative and concurrent processes.

Create the Classification Output

Assuming that the results of classification previews were good (i.e. pixels are assigned to the correct class defined in the Перелік сигнатур ROI), we can perform the actual land cover classification of the whole image.

In Класифікація check Use checkbox MC ID. In the Результат класифікації click the button run and define the path of the classification output, which is a raster file (.tif). If checkbox Play sound when finished is checked in Classification process settings, a sound is played when the process is finished.

_images/tutorial_1_class_1.jpg

Result of the land cover classification

Well done! You have just performed your first land cover classification.

However, you can see that there are several classification errors, because the number of ROIs (spectral signatures) is insufficient.

_images/tutorial_1_class_2.jpg

Example of error: Water bodies classified as Built-up

_images/tutorial_1_class_3.jpg

Example of error: Built-up classified as vegetation

We can improve the classification using some of the tools that will be described in other tutorials.

Tutorial 2

The following is a tutorial about the functions of the Semi-Automatic Classification Plugin (SCP). It is assumed that you have a basic knowledge of QGIS.

Tutorial 2: Cloud Masking, Image Mosaic, and Land Cover Change Location

This tutorial is about the use of SCP for the assessment of land cover change of a multispectral image. It is recommended to complete the Tutorial 1: Your First Land Cover Classification before this tutorial.

The purpose of this tutorial is to locate land cover change over one year (between 2017 and 2018), using free Sentinel-2 images.

_images/workflow_lcc.jpg

Workflow

Following the video of this tutorial.

http://www.youtube.com/watch?v=xm9s97GPs0Y

Download the Data

We are going to download a Супутник Sentinel-2 image (Copernicus land monitoring services) and use the bands illustrated in the following table.

Sentinel-2 Bands Central Wavelength [micrometers] Resolution [meters]
Band 2 - Blue 0.490 10
Band 3 - Green 0.560 10
Band 4 - Red 0.665 10
Band 5 - Vegetation Red Edge 0.705 20
Band 6 - Vegetation Red Edge 0.740 20
Band 7 - Vegetation Red Edge 0.783 20
Band 8 - NIR 0.842 10
Band 8A - Vegetation Red Edge 0.865 20
Band 11 - SWIR 1.610 20
Band 12 - SWIR 2.190 20

Start QGIS and the SCP . Open the tab Download products clicking the button download in the Домашня, or in the Меню SCP. In the tab Download products click the button osm_add to display the OpenStreetMap tiles (© OpenStreetMap contributors) in the QGIS map, licensed as CC BY-SA (Tile Usage Policy ).

In general it is possible to define the area coordinates clicking the button pointer , then left click in the map for the UL point and right click in the map for the LR point. In this tutorial the study area is Rome (Italy), therefore click in the map to define the search area, or alternatively, enter these point coordinates in Search parameters:

  • UL: 12.4 / 41.9
  • LR: 12.5 / 41.8

The purpose of this tutorial is to map the land cover change between 2017 and 2018, therefore we need to download at least two images. Because of cloud cover, we are going to download an additional image for 2016, which will be used to replace pixels covered by clouds in the first image. We are searching for three images (tile 33TTG) acquired on:

  • 01 January 2017
  • 10 February 2017
  • 10 February 2018

Therefore, we need to perform three searches. Select Sentinel-2 from the Products input_list and set:

  • Date from: 2017-01-01
  • to: 2017-01-01

In this case, enter L1C_T33TTG in Filter to filter the results only for the tile 33TTG.

_images/tutorial_2_1_02.jpg

Search products

Now click the button Find search_images and after a few seconds the image will be listed in the Product list. Click the item in the table to display a preview that is useful for assessing the quality of the image and the cloud cover.

_images/tutorial_2_1_03.jpg

Search result

Repeat the date definition and the search also for the 2017-02-10 image. You can notice that there are a few clouds over the area, therefore we are going to mosaic this image with the one acquired on 2017-01-01.

_images/tutorial_2_1_04.jpg

Search result of second image

Finally, repeat the search for the 2018-02-10 image.

_images/tutorial_2_1_05.jpg

Search results

We can also select the bands to be downloaded according to our purpose. In particular, select the tab Download options and check only the Sentinel-2 bands that will be used in this tutorial and the ancillary data.

_images/tutorial_2_1_06.jpg

Download options

For the purpose of this tutorial, uncheck the option checkbox Only if preview in Layers because we want to download and preprocess all the images listed in the table.

Before starting the download we need to set the preprocessing options in the tab Sentinel-2 for preforming the Корекція DOS1. Check the options checkbox Apply DOS1 atmospheric correction and checkbox Add bands in a new Band set to automatically create a Band set for each image.

_images/tutorial_2_1_07.jpg

Preprocessing options

To start the image download, in the tab Download products click the button RUN run and select a directory where bands are saved (a new directory will be created for each image). The download could last a few minutes according to your internet connection speed. The download progress is displayed in a bar.

After the download, all the bands of all the Sentinel-2 images (© Copernicus Sentinel data 2018) are automatically loaded in the map. We can also display the RGB color composite of the Band sets clicking the list RGB= in the Робоча панель, and selecting the item 3-2-1.

_images/tutorial_2_1_08.jpg

Download of Sentinel-2 bands

Create the cloud cover mask

Before the land cover change assessment, we need to remove cloud cover pixels in the image acquired on 2017-02-10. Of course we could perform the same process for all the other images.

In QGIS, load the file MSK_CLOUDS_B00.gml that should be inside the directory L1C_T33TTG_A008556_20170210T100132_2017-02-10 . This vector file represents most of the cloud cover in the image. In QGIS Layers Panel, left click the vector MSK_CLOUDS_B00 MaskFeature and select Export > Save Feature as to save this gml file to shapefile (e.g. clouds.shp).

We can convert this vector file to raster using the tab Vector to raster.

Click the button reload to refresh the layer list, and select the vector clouds. Check the checkbox Use constant value to set the raster value 1 for clouds. Also, in Select the reference raster select the name of a band. This will create a raster with the same size and aligned to the Sentinel-2 image. Finally click the button RUN run to create the mask.

_images/tutorial_2_2_1.jpg

Vector to raster mask

We could also improve the mask by manually editing the pixel of the raster using the tool Edit raster or creating a semi-automatic classification of clouds.

Mask clouds in the Sentinel-2 image

We are going to mask all the pixels covered by clouds in all the bands composing the Band set of the image acquired on 2017-02-10.

In the tab Cloud masking, set the number of the 2017-02-10 Band set in Select input band set. In Select the classification we select the mask created at the previous step. Enter 1 in Mask class values. Finally, uncheck checkbox Use buffer of pixel size to speed up the masking process.

Now click the button RUN run to select the output directory and start the masking process.

_images/tutorial_2_3_1.jpg

Mask clouds

Mosaic the Sentinel-2 images

We are going to mosaic the 2017 images in order to create a cloud free image to be used for land cover change.

We use the image acquired on 2017-01-01 to fill the gaps in the 2017-02-10 image. In the tab Band set, add a new Band set with the button add_bandset and add the masked bands.

_images/tutorial_2_4_1.jpg

New Band set

Now we can mosaic the 2017 images.

In the tab Mosaic of band sets, in the Band set list enter the number of the 2017-02-10 masked Band set, followed by comma, followed by the number of the 2017-01-01 Band set. Now click the button RUN run to select the output directory and start the masking process.

_images/tutorial_2_4_2.jpg

Mosaic Band sets

We could have used more than 2 Band sets. The process automatically mosaic the corresponding bands of the input Band sets filling the NoData gaps of the first Band set with the pixels of the following Band sets. The mosaic bands are automatically added to the map.

_images/tutorial_2_4_3.jpg

Mosaic of 2017 images

Land cover change

We are going to automatically locate the land cover change between the image mosaic of 2017 and the 2018 image.

SCP includes a tool that allows for calculating the spectral distance between every corresponding pixel of two Band sets, and creating a raster of changes through a spectral distance threshold.

In the tab Band set, add a new Band set with the button add_bandset and add the mosaic bands.

_images/tutorial_2_5_1.jpg

New Band set

In the tab Spectral distance, set the number of the 2017 mosaic Band set in Select first input band set, and set the number of the 2018 Band set in Select second input band set. In Distance algorithm check the radiobutton Spectral Angle Mapping. Check the checkbox Distance threshold and set the value 10 that is the threshold used for creating the raster of changes.

Now click the button RUN run to select the output directory and start the masking process.

_images/tutorial_2_5_2.jpg

Spectral distance

After a while, the spectral distance raster and the raster of changes are added to the map

_images/tutorial_2_5_3.jpg

Raster of changes

This is an automatic method for locating land cover changes. We can see that most land cover changes are due to crop variations.

For instance, this method could be useful to assess vegetation burnt area or forest logging. We could set a different threshold value for increasing or reducing the number of pixels identified as changes.

Of course, in order to identify the type of land cover change we should identify the land cover classes of the images through photo-interpretation or with semi-automatic classification.

Advanced Tutorials

The following are advanced tutorials using the Semi-Automatic Classification Plugin (SCP). It is assumed that you have already performed the Базові навчальні матеріали.

Tutorial 3

The following is a tutorial about the functions of the Semi-Automatic Classification Plugin (SCP). It is assumed that you have a basic knowledge of QGIS.

Tutorial 3: Accuracy Assessment of a Land Cover Classification

Accuracy assessment is a fundamental step after land cover classification in order to evaluate errors, globally and for each class, and finally evaluate the reliability of the map.

This post is a tutorial about accuracy assessment of a land cover classification using the Semi-Automatic Classification Plugin (SCP) for QGIS. We are going to use the function of SCP to create ROIs using stratified random points (a new function of SCP 6.4.0), which will be photo-interpreted and used as reference for the accuracy assessment. The SCP tool Accuracy will take care of the rest, providing the error matrix and the accuracy estimates.

The following is the video tutorial, and the following text illustrates the phases in detail.

http://www.youtube.com/watch?v=H1cL0yhIygg

Accuracy assessment is performed comparing a sample of points (ground truth) to the classification. There are several ways to choose the sample size and the allocation thereof (sample scheme). The sample should be designed in order to achieve low standard errors of accuracy estimates, and usually this is achieved by random selection of samples.

Sample design depends on several variables such as the proportions of land cover classes and the standard errors that we expect for the overall land cover classification and single classes. In order to reduce standard errors of class specific estimates, it is recommended to stratify the sample. For further details about how to determine the sample size and the stratification, please refer to «Olofsson, et al., 2014. Good practices for estimating area and assessing accuracy of land change. Remote Sensing of Environment, 148, 42 – 57».

Sample Design

This tutorial assumes that you have already performed the classification of a Landsat image following the instructions of this previous Tutorial 1: Your First Land Cover Classification. You can download the classification raster from this archive .

The land cover classes are described in the following table.

Classes
Macroclass name Class ID
Water 1
Built-up 2
Vegetation 3
Bare soil (low vegetation) 4

Basically, the main requirement is to provide an adequate number of samples for each class, even if the class area proportion (\(W_i\)) is low. The number of samples (\(N\)) should be calculated as (Olofsson, et al., 2014):

\[N = ( \sum_{i=1}^{c} (W_i - S_i) / S_o)^2\]

where:

  • \(W_i\) = mapped area proportion of class i;
  • \(S_i\) = standard deviation of stratum i;
  • \(S_o\) = expected standard deviation of overall accuracy;
  • \(c\) = total number of classes;

This requires some conjectures about overall accuracy and user’s accuracy of each class. We should base these conjectures on previous studies. One can hypothesize that user’s accuracy is lower and standard deviations \(S_i\) is higher for classes having low area proportion, but of course these values should be carefully evaluated.

To get \(W_i\) start QGIS and load the classification raster.

Open the Меню SCP and click the tab report_tool Classification report under the submenu tools Postprocessing . This tool allows for estimating class area and class percentage.

Click the button reload to refresh the layer list, and select the classification raster in Select the classification input_list ; next click RUN run to start the calculation; the output report is saved in a text file and displayed in the tab Output.

_images/tutorial_3_0_01.jpg

Classification report

The report table contains the percentage of each class, which we divide by 100 to get the required \(W_i\). In this tutorial we assume \(S_o = 0.01\) and conjecture the \(S_i\) values reported in the following table (of course, these assumptions are specific of this classification, other assumptions should be made for other classifications).

Conjectured standard deviations
Land Cover Class Area \(m^2\) \(W_i\) \(S_i\) \(W_i * S_i\)
1 976,500 0.0033 0.4 0.0013
2 111,267,000 0.3713 0.3 0.1114
3 187,018,200 0.6240 0.2 0.1248
4 438,300 0.0015 0.5 0.0007
Total       0.2382

Therefore, \(N = (0.2382 / 0.01)^2 = 567\) is the number of samples that we should distribute among classes.

To stratify the sample we should conjecture user’s accuracy and standard deviations of strata (Olofsson, et al., 2014).

A rough approximation is considering the mean value between equal distribution (\(N_i = N / c\)) and weighted distribution (\(N_i = N * W_i\)), which is \(N_i = (N / c + N * W_i) / 2\) as illustrated in the following table.

Sample stratification
Land Cover Class Weighted Equal Mean
1 2 142 72
2 210 142 176
3 354 142 248
4 1 142 71
Total     567
Sample Collection and Photo-Intepretation

This phase involves the creation of (randomly selected) single pixel Навчальні області (ROIs), and the attribution of a land cover class based on photo-interpretation of each ROI.

First, we need to define a Band set containing the classification raster that is an input required by the other tools we are going to use.

Open the tab Band set clicking the button bandset_tool in the Меню SCP or the Панель SCP. Click the button reload to refresh the layer list, and select the classification raster; then click plus to add selected raster to the Band set 1.

_images/tutorial_3_1_00.jpg

Band set definition

We need to create the Входові навчальні дані in order to collect ROIs that will be the actual samples.

In the Панель SCP select the tab Входові навчальні дані and click the button new_file to create the Training input (define a name such as sample.scp). The path of the file is displayed and a vector is added to QGIS layers with the same name as the Training input (in order to prevent data loss, you should not edit this layer using QGIS functions).

_images/tutorial_3_1_01.jpg

Training input

Now we are going to create the stratified random sample using the SCP tool Multiple ROI creation. This tool allows for the random creation of point coordinates according to the sample scheme previously defined.

TIP : In case you have already collected samples you can import (using the button import) a shapefile or a csv file containing the coordinates and the classification codes.

This tool works in two steps:

  1. randomly select point coordinates defining ROI parameters;
  2. actually create ROI polygons based on point coordinates;

During the first step, in addition to point coordinates, other fields are automatically filled in the table from the parameters set in the Робоча панель, such as the minimum and maximum ROI size. In this tutorial we use single pixel ROIs, although cluster sampling (several pixels per ROI) is also used for accuracy assessment. To avoid manually editing these fields after the random point creation, in Тимчасові ROI we need to set the parameters Min = 1 and Max = 1. Created random samples will have the size of 1 pixel.

Now, open the Меню SCP and click the tab roi_multiple Multiple ROI Creation under the submenu tools Basic tools .

_images/tutorial_3_1_02.jpg

Multiple ROI creation

To reduce the photo-intepretation time (considering the illustrative purpose of this tutorial and that the classification is a subset of a Landsat image), we are going to divide the number of samples by 10 according to the following table (of course, in real cases we must use all the samples as designed).

Number of stratified samples
Land Cover Class Samples
1 7
2 18
3 25
4 7
Total 57

In Number of points enter 7 that is the number of samples designed for class 1. In the tab roi_multiple Multiple ROI Creation check the option checkbox stratified for the values and enter the first expression raster == 1 (notice the double «=»). This expression means that we are going to randomly select points that fall over pixels having value 1 of the classification (that is the first band of the Band set 1).

Therefore click Create points enter to start the random creation. After a while point coordinates will be added to the table Point coordinates and ROI definition.

_images/tutorial_3_1_03.jpg

Samples for class 1

Now we repeat the above steps for class 2. In Number of points enter 18 and in stratified for the values enter raster == 2. Click Create points enter and the samples will be added to the table.

Repeat the same steps for class 3 (25 points and raster == 3) and for class 4 (57 points and raster == 4). Now that we have all the required samples we can create the ROIs (the single pixel polygons that will be photo-interpreted).

Uncheck the option checkbox Calculate sig. because we don’t need the spectral signature of ROIs and click RUN run. After a while the ROIs will be added to the the Training input.

_images/tutorial_3_1_04.jpg

Samples added to the training input

The type R means that, of course, spectral signatures were not calculated. All the created ROIs have the same MC ID (i.e. macroclass ID) and C ID (i.e. class ID); now we can assign the correct class (MC ID) to each ROI with photo-interpretation using images with resolution higher than the classification, or other services such as OpenStreetMap).

In the Перелік сигнатур ROI, double click on the first ROI in order to zoom to the ROI; after photo-interpreting the class we can assing the correct MC ID and C ID with a click on the corresponding field in the ROI list.

_images/tutorial_3_1_05.jpg

A sample over a road photo-interpreted using a Copernicus Sentinel-2 image

Of course we need to perform the photo-interpretation of all the samples, assigning the correct code. The photo-interpretation should be performed without considerding the classification raster. It is worth highlighting that spatial resolution (i.e. 30m) implies mixed pixels (i.e. pixels made of multiple materials at ground); therefore, during the photo-interpretation we must consider the most prevalent land cover in the ROI area.

Calculation of Accuracy Statistics

After the photo-interpretation of all the samples, we can perform the accuracy assessment by comparing the ROIs to the classification. If you have skipped the previous step, you can download the photo-interpreted sample from here .

The process will produce an an error raster (a .tif file showing the errors in the map, where pixel values represent the combinations between the classification and reference identified by the ErrorMatrixCode in the error matrix) and a text file (i.e. a .csv file separated by tab) containing the error matrix and the accuracy statistics.

Open the Меню SCP and click the tab accuracy_tool Accuracy under the submenu post_process Postprocessing .

In Select the classification to assess input_list select the classification (click the button reload if the raster isn’t in the list).

In Select the reference vector or raster input_list select the sample vector that is the Входові навчальні дані, and in Vector field input_list select MC_ID that is the vector field containing the class values.

Now we can click RUN run to start the raster processing.

_images/tutorial_3_2_01.jpg

The tool Accuracy

After the calculation the accuracy statistics are displayed in the output interface and the error raster is loaded in QGIS.

_images/tutorial_3_2_02.jpg

Output

Several statistics are calculated such as overall accuracy, user’s accuracy, producer’s accuracy, and Kappa hat. In particular, these statistics are calculated according to the area based error matrix (Olofsson, et al., 2014) where each element represents the estimated area proportion of each class. This allows for estimating the unbiased user’s accuracy and producer’s accuracy, the unbiased area of classes according to reference data, and the standard error of area estimates and the confidence intervals. Of course the standard errors are influenced by the low number of samples that we have collected in this tutorial.

Area based error matrix
  Reference
1 2 3 4
Classified 1 0.0023 0 0.0009 0
2 0 0.3094 0.0619 0
3 0 0.0998 0.5242 0
4 0 0 0.0004 0.0010
  Total 0.0023 0.4092 0.5874 0.0010

The overall accuracy is 83.7% that is a good result (above 80%). However, this classification was produced for the first basic tutorial, therefore the classification could be improved. Also, note that we used a number of samples lower than designed sample.

The user’s and producer’s accuracy are provided for each class.

Producer’s and user’s accuracy
  1 2 3 4
Producer’s accuracy 100.0 75.6 89.2 100.0
User’s accuracy 71.4 83.3 84.0 71.4

We can see that classes 1 and 4 (bare soil and water respectively) have low user’s accuracy, while class 2 (built-up) has low producer’s accuracy. We also get the unbiased area estimates (in \(m^2\)) and the confidence intervals.

Unbiased area estimates
  1 2 3 4
Area 697,500 122,645,412 176,044,017 313,071
95% Confidence interval Area 352,984 33,778,661 33,780,877 158,436

These estimates are quite different from the ones directly derived from the classification raster (in the classification report), but are based on reference data. For instance, the class 2 (built-up) has an estimated area of 122,645,412 \(m^2\), while it resulted 111,267,000 \(m^2\) from the classification raster. Also, the confidence intervals provide information about the uncertainty of these estimates.

Tutorial 4

The following is a tutorial about the functions of the Semi-Automatic Classification Plugin (SCP). It is assumed that you have a basic knowledge of QGIS.

Tutorial 4: Postprocessing tools for assessing land cover change

This tutorial aims to analyze land cover change using SCP Postprocessing tools. Basically, we are going to assess land cover change from two raster classifications, and relate the changes to a land use vector file. An overview of several postprocessing tools is also provided.

The following is the video tutorial, and the following text illustrates the phases in detail.

http://www.youtube.com/watch?v=0IUosyr4pRw

The tools can be applied to any land cover classification, but we are going to use Copernicus data, which are freely available (as established by the EU Regulation No 1159/2013 of 12 July 2013) and cover the European countries. Of course, this tutorial is designed for demonstration purposes and it is not endorsed by the European Union. The original Copernicus data (produced with funding by the European Union) are downloaded from https://land.copernicus.eu/ and remain the sole property of the European Union.

Following, a brief description of the data we are going to use.

The Copernicus High Resolution Layers are raster classifications with 20m spatial resolution. Several land cover classes are available, but in this tutorial we are going to use the Imperviousness Density for 2012 and 2015. These data classify the degree of imperviousness (0-100% of impermeable cover of soil), which is the artificially sealed area. The Imperviousness Density was produced using automatic derivation based on calibrated Normalized Difference Vegetation Index. You can find the detailed product specifications here.

The Copernicus Corine Land Cover is a land use/land cover vector produced by standard methodology of photo-interpretation of satellite images. The vector is classified in 44 classes divided in 3 hierarchical levels with minimum mapping unit of 25 hectares. In this tutorial we are considering only the first level of Corine Land Cover 2012, divided in these classes:

  1. artificial surfaces
  2. agricultural areas
  3. forests and semi-natural areas
  4. wetlands
  5. water bodies
Refine the classifications with direct editing

You can download the data for this tutorial from this archive , or use your own data (two classification rasters and a land use vector).

For this tutorial, the original Copernicus data were modified by clipping the rasters to a small area over Florence (Italy).

Start QGIS and load the two rasters IMD_2012.tif and IMD_2015.tif that are Copernicus Imperviousness Density for 2012 and 2015 respectively. As you can see, the rasters have values from 0 to 100, representing the degree of imperviousness.

It is useful to refine the classification by photo-interpretation, especially for data produced by semi-automatic processing.

We can use high resolution images or other services such as OpenStreetMap. For example you can follow this tutorial Download the Data to download satellite images, or you can download a subset of a Landsat 8 image, already converted to reflectance, from this link (about 27 MB, data available from the U.S. Geological Survey), unzip the downloaded file, and load the bands in QGIS.

First, we need to define a Band set containing a classification raster (this is required for drawing ROIs).

Open the tab Band set clicking the button bandset_tool in the Меню SCP or the Панель SCP. Click the button reload to refresh the layer list, and select the IMD_2012 raster (just this raster is sufficient); then click plus to add selected raster to the Band set 1.

_images/tutorial_4_0_00.jpg

Band set definition

Optionally, we can create a band set for the satellite image to display a color composite; open the tab Band set and select all the Landsat bands in the list; click add_bandset to add a new band set, then click plus to add selected rasters to the Band set 2.

_images/tutorial_4_0_01.jpg

Band set of the Landsat image

In QGIS zoom to an area where we want to correct the classification. In this case we are going to manually remove a few pixels pretending they are classification errors.

We need to manually create a ROI, but first check that the Band set 1 is active. Now click the button manual_ROI in the Робоча панель. Left click on the map to define the ROI vertices and right click to define the last vertex closing the polygon. An orange semi-transparent polygon is displayed over the image, which is a temporary polygon (in this case we don’t need to define the Training input).

_images/tutorial_4_0_02.jpg

Manual ROI polygon

Now open the tool edit_raster Edit raster opening the Меню SCP and the submenu tools Postprocessing . Select the Input raster, for instance IMD_2012. According to the legend of Imperviousness Density, in checkbox Use constant value enter 100 (we want to correct impervious pixels; in case we would like to correct not impervious pixels we would enter the value 0). The other options are fine. Therefore, click RUN run to edit the raster.

Attention: the input raster is directly edited; it is recommended to create a backup copy of the input raster before using this tool in order to prevent data loss.
_images/tutorial_4_0_03.jpg

The raster modified

Of course we could repeat these steps to edit any area of the raster.

TIP : Sometimes changes are not immediately visibile because the raster is not refreshed; try to zoom out and zoom in to refresh the view.
Classification report

It could be interesting to know the area of each land cover class. In order to get the area statistics, open the Меню SCP and click the tab report_tool Classification report under the submenu tools Postprocessing .

Click the button reload to refresh the layer list, and select the IMD_2012 raster in Select the classification input_list ; next click RUN run to start the calculation; the output report is saved in a text file and displayed in the tab Output.

_images/tutorial_4_1_01.jpg

Report tool

We can repeat the same steps for the IMD_2015 raster. Over the 86% of the area is not impervious.

_images/tutorial_4_1_02.jpg

The classification report

Reclassification

Before calculating land cover change it is convenient to reclassify the imperviousness degree into two classes: built-up and not built-up. A possible threshold for the distinction between built-up and not built-up is 30% (for further information read this document ). We can reclassify the raster using the SCP tool, obtaining the simple classification 1 = built-up and 0 = not built-up.

Open the tool reclassification_tool Reclassification. In Select the classification select the raster IMD_2012. Click the button add twice to add two rows to the table. We need to enter the expressions illustrated in the following table.

Reclassification table
Old value New value
raster < 30 0
raster >= 30 1

Uncheck the options checkbox Use code from Signature list and click RUN run to start the reclassification. A new raster will be created (e.g. BU_2012).

_images/tutorial_4_2_01.jpg

Reclassification tool

Now select the IMD_2015 (the reclassification table is the same as before) and click RUN run to reclassify the 2015 raster (e.g. BU_2015). Now the two reclassified rasters are loaded in the map and we can assing an appropriate symbology.

_images/tutorial_4_2_02.jpg

Reclassified rasters

Remove isolated pixels

We are going to compute the land cover change, but first we may want to remove isolated pixels in order to improve the analysis. In fact, single pixels may not represent real changes between the two classifications, because of geometrical shifts or isolated classification errors. Of course, this step is not always required, and it should be avoided if the purpose of the analysis is to find also the smallest changes.

We are going to use classification sieve for removing single pixels. Open the tool classification_sieve Classification sieve.

In Size threshold leave 2; all patches smaller the the selected number of pixels (i.e. single pixels) will be replaced by the value of the largest neighbour patch. Of course we could increase this value if we want to remove larger patches.

In Select the classification select the raster BU_2012. The option 4 in Pixel connection determines how pixels are considered connected, that is in a 3x3 window diagonal pixels are not considered connected. If we select the option 8 also diagonal pixels are considered connected.

_images/tutorial_4_3_01.jpg

Tool classification sieve

Now click RUN run to create the new raster BU_2012_sieve.

Of course, we should repeat these steps also for raster BU_2015 to create the new raster BU_2015_sieve.

_images/tutorial_4_3_02.jpg

The rasters after removing isolated pixels

Assess land cover change

Now we can use the tool to assess land cover change between the two classifications 2012 and 2015. Open the tool land_cover_change Land cover change.

This tool is quite straightforward. Click the button reload to refresh the layer list. In Select the reference classification select the BU_2012_sieve raster, that is the first classification. In Select the new classification select the BU_2015_sieve raster, that is the latest classification.

Uncheck the option checkbox Report unchanged pixels, because we want to report only the pixels where the classification changed between 2012 and 2015. Now click RUN run to create the new land cover change raster (e.g. change). Also, a text file is created (i.e. a file .csv separated by tab) containing the land cover change statistics.

_images/tutorial_4_4_01.jpg

Land cover change tool

The values of the land cover change raster represent a combination between reference and new classification, as described in the text file. In this case, only the value 1 is present that is the condition where BU_2012_sieve = 0 and BU_2015_sieve = 1.

_images/tutorial_4_4_02.jpg

Land cover change raster

From the report we ca read that 520 pixels changed from 0 to 1, while no pixel changed from 1 to 0 between years 2012 and 2015.

_images/tutorial_4_4_03.jpg

Land cover change report

Analyze the context of land cover changes

Now, it could be interesting to compare land cover change to other data such as land use, in order to analyze the context of new built-up areas. We are going to cross the land cover changes to the vector of Corine Land Cover; this way we can differentiate the new built-up areas according to Corine Land Cover classification system.

The original Corine Land Cover data were modified by clipping to a small area over Florence (Italy) and adding a field Class_1 filled with the first level of classification.

Load in QGIS the Copernicus Corine Land Cover shapefile CLC_2012.shp previously downloaded. You can see the symbology of the first level Corine Land Cover classes that are:

  1. artificial surfaces
  2. agricultural areas
  3. forests and semi-natural areas
  4. wetlands
  5. water bodies
_images/tutorial_4_5_01.jpg

A subset of Corine Land Cover

Open the tool cross_classification Cross classification. Click the button reload to refresh the layer list. In Select the classification select the change raster, that is our land cover change. Check checkbox Use NoData value and set the value 0, in order to exclude unchanged pixels (having value 0 in the change raster) from the analysis.

In Select the reference vector or raster select the vector CLC_2012 and in Vector field select the field Class_1, containing the code of first level classes.

_images/tutorial_4_5_02.jpg

Cross classification tool

Now click RUN run to create a new raster of comparison (e.g. change_CLC). The output will report the area of each combination between change code and CLC_2012 code.

From the cross matrix we can evaluate the area in \(m^2\) of built-up changes occurrend in the 5 classes of Corine Land Cover classification.

Cross matrix
  CLC_2012
1 2 3 4 5
Change 1 157600 48400 2000 0 0

The tool Cross classification can be very useful also for other analyses that involve the comparison with other data, such as population or flood risk, but this could be the subject of other tutorials.

Assess the spectral signature of changes

An optional step could be the assessment of the spectral signature of changes. We can download satellite images (see Tutorial 1: Your First Land Cover Classification for the details) and calculate spectral signatures for monitoring the changes through time.

We are going to use the Landsat 8 image downloaded at the beginning of this tutorial for calculating the spectral signature of changes. First, we need to create a Training input to store the spectral signatures calculated from the classes. In the Панель SCP select the tab Входові навчальні дані and click the button new_file to create the Training input (define a name such as signatures.scp). The path of the file is displayed and a vector is added to QGIS layers with the same name as the Training input (in order to prevent data loss, you should not edit this layer using QGIS functions).

Now open the tool class_signature Class signature opening the Меню SCP and the submenu tools Postprocessing . In Select the classification select the raster change_CLC, thus we can distinguish the spectral signatures of changes. In Select input band set enter the number of the band set containing the Landsat 8 bands (i.e. 2). Now click RUN run to start the calculation.

_images/tutorial_4_6_01.jpg

The tool for extracting spectral signatures from classes

After a while the spectral signatures are loaded in the Training input.

If the changes involved vegetation, we could calculate spectral signatures for images acquired in different seasons and assess the phenological variations of vegetation through spectral signatures. Also, these spectral signatures could be used as training input for further land cover classifications.

In order to display the signature plot, in the Перелік сигнатур ROI highlight two or more spectral signatures (with click in the table), then click the button sign_plot. The Графік спектральних сигнатур is displayed in a new window.

_images/tutorial_4_6_02.jpg

The calculated spectral signatures

Export the changes to vector format

This is an optional step that may be useful for further analyses and integration with other data. We are going to convert the change raster to vector.

Open the tool class_to_vector_tool Classification to vector. In Select the classification select the change_CLC raster and uncheck the checkbox Use code from Signature list. Now click RUN run to create a new vector (e.g. change_vector).

_images/tutorial_4_7_01.jpg

Raster to vector tool

In the attribute table of this change_vector you can see the field C_ID that represents the code of the change raster as described in Assess land cover change. Of course we could delete the polygons with code 0 (unchanged area), displaying only changes with code 1.

_images/tutorial_4_7_02.jpg

The vector of changes over the Landsat image

Semi-Automatic ОС

До оновлення.

The Semi-Automatic OS is a lightweight virtual machine for the land cover classification of remote sensing images. It includes the Semi-Automatic Classification Plugin (SCP) for QGIS, already configured along with all the required dependencies.

_images/Semi-Automatic_OS.jpg

робочий стіл Semi-Automatic ОС

The Semi-Automatic OS is based on Debian , and it is designed to require very little hardware resources. It uses LXQT as main desktop environment. This virtual machine can be useful for testing the Semi-Automatic Classification Plugin, or when the installation of the required programs in the host system is problematic.
The Semi-Automatic OS is available as 64 bit virtual machine that can be run in the open source VirtualBox, or any other virtualization program. The following is a guide for the installation of the Semi-Automatic OS in the open source program of virtualization VirtualBox.

Встановлення у VirtualBox

  1. Завантажте прогамне забезпечення з відкритим вихідним кодом VirtualBox (виберіть версію відповідно до вашої ОС) та встановіть його; по завершенні встановлення перезапустіть систему;

  2. Download the Semi-Automatic OS virtual machine from here ;

  3. Extract the virtual machine content in a directory; the file is compressed in 7z format (if needed, download the open source extraction software from http://www.7-zip.org/);

  4. Запустіть VirtualBox та створить нову віртуальну машину Debian;

    1. Натисніть кнопку New;

    2. Надрукуйте ім’я віртуальної машини (наприклад, Semi-Automatic OS); виберіть Linux та Debian (32 або 64 біт) як Type та Version відповідно; натисніть Next;

      _images/v1.jpg
    3. Встановіть об’єм пам’яті; чим більше - тим краще, але цей параметр не повинен перевищувати половину RAM головної комп’ютерної системи (наприклад, якщо RAM головної системи становить 1 Гб, надрукуйте 512 Мб); натисніть Next;

      _images/v2.jpg
    4. В параметрах Hard drive виберіть Use an existing virtual hard drive file та вкажіть завантажений файл SemiAutomaticOS.vmdk; клацніть Create;

      _images/v3.jpg
  5. Запустіть Semi-Automatic ОС клацнувши кнопку Start;

  6. Рекомендовано встановити у віртуальній машині virtualbox-guest-utils з Menu > Preferences > Synaptic Package Manager; це покращить інтеграцію Semi-Automatic ОС з головною комп’ютерною системою за такими параметрами як зміна розміру системного вікна або сумісне використання каталогів.


The Semi-Automatic OS includes a sample dataset of a Landsat image (available from the U.S. Geological Survey) that is the input for the first basic tutorial of the user manual.

_images/SemiAutomaticOS2.jpg


Semi-Automatic ОС - вільне програмне забезпечення: ви можете поширювати та/або змінювати її на умовах версії 3 Універсальної громадської ліцензії GNU, опублікованої Фондом вільного програмного забезпечення. Напівавтоматична ОС поширюється з надією, що вона буде корисною, але БЕЗ ЖОДНИХ ГАРАНТІЙ; навіть без обв'язкової гарантії ПРИДАТНОСТІ ДЛЯ ПРОДАЖУ або ВІДПОВІДНОСТІ ПЕВНІЙ ВИЗНАЧЕНІЙ МЕТІ. Для більш докладної  інформації дивіться Універсальну громадську ліцензію GNU http://www.gnu.org/licenses/.

Часті питання

If you have comments or questions please join the Facebook group .

Before asking, please check the official site From GIS to Remote Sensing and the following Frequently Asked Questions.

Встановлення модуля

Як встановити модуль вручну?

SCP може бути встановлений вручну (це може бути корисно, коли відсутнє Інтернет-з’єднання або необхідне встановлення на багатьох комп’ютерах) наступним чином:

  1. завантажте zip-архів SCP з https://github.com/semiautomaticgit/SemiAutomaticClassificationPlugin/archive/master.zip ;
  2. розпакуйте вміст архіву (декілька файлів таких як COPYING.txt та каталогів таких як ui) у новий каталог з назвою SemiAutomaticClassificationPlugin (без -master);
  3. open the QGIS plugins directory (in Windows usually C:\Users\username\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins, in Linux and Mac usually /home/username/.local/share/QGIS/QGIS3/profiles/default/python/plugins) and delete the folder SemiAutomaticClassificationPlugin if present;
  4. скопіюйте каталог SemiAutomaticClassificationPlugin до каталогу модулів QGIS;
  5. модуль встановлено; запустіть QGIS, відкрийте Plugin Manager та переконайтесь, що Semi-Automatic Classification Plugin увімкнено.

Як встановити модуль з офіційного репозиторія SCP?

SCP можливо встановити , використовуючи офіційний репозиторій. Цей репозиторій забезпечує встановлення самої останньої версії SCP (master), подекуди ще до того, як вона з’явиться в репозиторії QGIS. Це може знадобитись, коли ви потребуєте виправлення помилки або нової функції, яка ще недоступна у версії, наявній в офіційному репозиторії QGIS. Крім того, версія master з репозиторію SCP може бути встановлена одночасно з версією, доступною з офіційного репозиторію QGIS.

Для того, щоб встановити модуль з репозиторію SCP, виконайте наступні кроки:

  • Run QGIS;
  • З головного меню виберіть Plugins` > Manage and Install Plugins;
_images/install_u.jpg
  • Клацніть Settings та натисніть кнопку Add;
_images/qgis_repos_settings.jpg
  • В Repository details введіть:

Назва:

SCP

URL:

https://semiautomaticgit.github.io/SemiAutomaticClassificationPlugin/repository.xml

та клацніть OK;

_images/qgis_repos_add.jpg
  • Після оновлення репозиторію елемент Semi-Automatic Classification Plugin - master повинен бути у переліку з іншими модулями;
_images/qgis_repos_list.jpg
  • З меню All виберіть Semi-Automatic Classification Plugin - master та натисніть кнопку Install plugin; найбільш остання версія SCP повинна бути автоматично активована (ігноруйте помилки, для завершення встановлення SCP може знадобитись перезапуск QGIS); можливо вимкнути інший SCP, встановлений з репозиторію QGIS;
_images/qgis_repos_installed.jpg

Передоброблення

Які канали зображення потрібно використовувати для напівавтоматичної класифікації?

Загалом, бажано уникати термальних інфрачервоних каналів. Якщо ви використовуєте Landsat 4, 5 або 7, то вам слід обирати канали : 1, 2, 3, 4, 5, 7, уникаючи каналу 6, який є термальним інфрачервоним; для Landsat 8 ви повинні обирати канали: 2, 3, 4, 5, 6, 7. Каналу 1 Landsat 8 зазвичай уникають, тому що він дуже подібний до синього каналу і переважно використовується для вивчення аерозолів зони узбережжя. Термальний інфрачервоний канал Landsat виключається з класифікації, тому що його значення переважно пов’язані з температурою об’єктів.

Для зображень Sentinel-2 можна використовувати канали: 2, 3, 4, 5, 6, 7, 8, 8A, 11, 12.

Які канали Landsat можуть бути перераховані SCP у відбивальність?

All Landsat 1,2, and 3 MSS and Landsat 4, 5, 7, and 8 images downloaded from http://earthexplorer.usgs.gov/ and processed with the Level 1 Product Generation System (LPGS) can be converted to reflectance automatically by the SCP; products generated by the LPGS have a MTL file included that is required for the conversion.

Чи можу я застосувати перерахунок до зображень Sentinel-2, завантажених з Інтернет?

Так, ви можете також перерахувати зображення, завантажені з мережі (таке перерахування рекомендоване). Ви повинні перемістити всі канали (файли .jp2) та, за наявності, файл .xml назва якого містить MDT_SAFL1C до єдиного каталогу. Потім виберіть цей каталог з Sentinel-2 conversion. Зображення будуть перераховані у відбивальність.

Як перераховуються зображення Sentinel-2, які мають різну розрізненність?

Під час перерахунку у відбивальність, пікселі каналів з розрізненністю 20 м розбиваються на 4 пікселі розрізненністю 10 м, які мають ті ж самі значення, що і оригінальний піксель розрізненністю 20 м. Мета такого перетворення це перерахунок для всіх каналів без зміни оригінальних значень.

Чи можу я застосувати перерахунок даних Landsat та корекцію DOS до обрізаних каналів?

Так, ви можете провести відтинання знімків до того, як перераховувати у відбивальність, а потім скопіювати файл MTL (який міститься в оригінальному наборі даних Landsat) до каталогу з обрізаними каналами. Якщо ви бажаєте застосувати корекцію DOS (яка є відносною технікою, що ґрунтується на знімку), то потрібно спочатку перерахувати оригінальні дані каналів Landsat (для всього зображення), а після цього провести відтинання виходових результатів перерахунку (тобто каналів, перерахованих у відбивальність).

Чи можу я застосовувати корекцію DOS до каналів з чорною межею (тобто зі значеннями NoData)?

Якщо ви бажаєте застосувати корекцію DOS до всього каналу, що містить значення NoData (чорна межа з значеннями = 0), то потрібно увімкнути перемикач Застосувати значення NoData та призначити значення 0. Це пояснюється тим, що DOS є відносною технікою, що ґрунтується на зображенні, і значення NoData повинні бути виключені з розрахунку.

Як прибрати з зображення хмарний покрив?

Корекція DOS1 не прибирає хмарність з зображення. Однак, знімки Landsat 8 включають канал 9, який ідентифікує хмари (див. цей сайт NASA). Ви можете застосувати цей канал для створення маски.

Для інших супутників Landsat хмари можуть бути масковані за допомогою підходу, описаного в цій статті.

Also, see the following video-tutorial.

Чому після панхроматичного об’єднання (пан-шарпенингу) зображень Landsat 8 канали NIR все одно мають розрізненність 30 м?

Landsat 8 panchromatic band doesn’t acquire in the Near Infrared (NIR) region (see Landsat Satellites). Therefore, the pan-sharpening process can’t improve the resolution of NIR and SWIR bands (see Панхроматичне об’єднання), which appear to have 30m resolution. However, all pan-sharpened rasters have 15m resolution to allow raster calculation.

Оброблення

Я отримую помилки класифікації. Як я можу покращити точність?

Деякі матеріали мають подібні спектральні сигнатури (наприклад, відкритий ґрунт та забудова або ліс та інші типи щільної низькорослої рослинності), які можуть призводити до помилок класифікації, якщо ROI та їх спектральні сигнатури отримані некоректно. Для покращення результатів ви можете спробувати зібрати більше ROI на таких ділянках, щоб навчити алгоритм розпізнавати ці дуже подібні класи. Також відображайте спектральні сигнатури таких територій на Графік спектральних сигнатур, щоб оцінити їх подібність. Ви можете використати Signature threshold для цих сигнатур, щоб зменшити їх мінливість (лише пікселі дуже подібні до входових сигнатур будуть класифіковані). Класифікація сигнатур земного покриву також корисний для класифікації деяких матеріалів, які спектрально подібні до інших.

Чи можливо використовувати одні і ті самі навчальні входові дані для декількох зображень?

Так, це можливо, якщо всі зображення мають однакову кількість каналів. Однак, якщо зображення отримані у різні місяці, зміни земельного покриву (особливо, стан рослинності) впливатимуть на спектральні сигнатури (тобто один і той самий піксель матиме різні спектральні сигнатури у різні періоди). Атмосферні ефекти також можуть по різному впливати на зображення. Це може знизити точність класифікації. Тому доцільно завжди збирати ROI та спектральні сигнатури для кожного зображення.

Чи можу я використовувати SCP для обробки зображень, отриманих дронами, або аерофотознімків?

Так, ви можете працювати з ними, якщо вони мають не менше 4 каналів. Якщо кількість каналів менша, то напівавтоматичні алгоритми не здатні вірно класифікувати земельний покрив. Існують також альтернативні методи класифікації, такі наприклад як об’єктно-орієнтована класифікація, не реалізована у SCP.

Чому при визначенні температури поверхні використовується лише канал 10 Landsat 8?

Було розроблено декілька методів для оцінювання температури земної поверхні. Метод оцінювання температури, описаний в навчальному практикумі, потребує лише одного каналу. Більше того, USGS рекомендує користувачам утримуватись від урахування даних каналу 11 Landsat 8 при кількісному аналізі даних теплового інфрачервоного сенсора (див. Зміни в даних теплового інфрачервоного сенсора (TIRS) від USGS).

Застереження

Застереження [12]: Дана сигнатура буде виключена при використанні алгоритму Максимальної вірогідності. Чому?

ROI занадто маленька (або занадто однорідна) для алгоритму Максимальної вірогідності, тому що ця ROI має сингулярну (вироджену) матрицю коваріації. Ви повинні створити більшу ROI або не використовувати алгоритм Максимальної вірогідності для класифікації.

Помилки

Як я можу повідомити про помилку?

Якщо ви виявили помилку Semi-Automatic Classification Plugin, будь ласка виконайте ці кроки, щоб зібрати необхідну інформацію (файл журналу):

  1. закрийте QGIS, якщо вона відкрита;
  2. open QGIS, open the Plugin tab Debug and check the checkbox checkbox Records events in a log file ;
_images/settings_debug_tab.jpg

Налагодження

  1. click the button Test dependencies enter in the tab Debug ;
  2. завантажте дані до QGIS (або відкрийте проект QGIS, що був збережений раніше) та повторіть всі кроки, що призводять до помилки в роботі модуля;
  3. якщо з’являється повідомлення про помилку (як на наступному рисунку), скопіюйте весь вміст повідомлення до текстового файлу;
_images/python_error.jpg

Повідомлення про помилку

  1. open the tab Debug and uncheck the checkbox checkbox Records events in a log file, then click the button export and save the log file (which is a text file containing information about the Plugin processes);
  2. відкрийте log-файл та скопіюйте весь його вміст;
  3. join the Facebook group , create a new post and copy the error message and the log file (or attach them).

Проблеми зі створенням віртуального растра. Чому?

Автоматичне створення віртуального растра після перерахунку даних Landsat у відбивальність для проведення класифікації не вимагається. Помилки можуть траплятись якщо вихідний шлях призначення містить спеціальні символи (такі як літера зі знаком наголосу) або пробіли; спробуйте перейменувати каталоги (наприклад, перейменувати з new directory у new_directory). Якщо ви все одно отримуєте ту ж саму помилку, то можете створити віртуальний растр вручну.

Помилка „Модуль пошкоджено. Python повідомив: ascii“. Чому?

It could be related to a wrong installation. Please, uninstall QGIS and install it again with administrative rights. Then run QGIS and try to install the plugin following the Встановлення модуля guide.

Також це може бути пов’язано з іменем користувача, що містить спеціальні символи. Будь ласка спробуйте нове встановлення, створивши нового користувача з іменем без спеціальних символів (наприклад, user).

Помилка [50] „Помилка Internet“. Неможливо завантажити зображення Sentinel-2. Чому?

The error message usually includes some information about the issue. First, check the user name and password. If the account registration was recent, it could take a few days to complete the process for allowing the download from SCP.

Також, можуть бути переривання в роботі сервісу. Для зображень Sentinel-2 будь ласка перевірте цей веб-сайт https://scihub.copernicus.eu/news/ на предмет повідомлень щодо стану сервісу.

Якщо ви все одно отримуєте ту ж саму помилку, будь ласка виконайте наступні кроки Як я можу повідомити про помилку?.

Помилка встановлення модуля, можливо відсутні залежності. Чому?

The plugin requires the installation of GDAL, NumPy, SciPy and Matplotlib, which should be installed along with QGIS. If the plugin installation fails, and you get a message about possible missing dependencies, you should try to install or update QGIS and the required dependencies. Notice that in order to avoid this error, python dependencies should not be installed through Anaconda.

Різне

Що я можу робити з SCP?

SCP дозволяє проводити класифікацію земельного покриву зображень дистанційного зондування за допомогою Контрольована класифікація. Ви можете створити растр земельного покриву, використавши один з Алгоритми класифікації, доступних у SCP. Ці алгоритми потребують спектральних сигнатур або ROI в якості входових даних (для визначень будь ласка див. Короткий вступ до дистанційного зондування), які визначають класи земельного покриву, що будуть зідентифіковані за зображенням.

_images/multispectral_classification.jpg

Багатоспектральне зображення оброблене для створення класифікації земельного покриву

(Знімок Landsat надано USGS)

SCP може працювати з багатоспектральними зображеннями, отриманими супутниками, літаками або дронами. Також SCP забезпечує безпосередній пошук та завантаження безкоштовних зображень (див. Download products). З SCP ви не можете використовувати ортофото з менш ніж 4 каналами, дані SAR та LIDAR.

Входове зображення у SCP називається Band set, який використовується як входові дані для класифікації. SCP надає декілька інструментів для Preprocessing завантажених зображень, таких як перерахунок у відбивальність та маніпулювання каналами.

Результати класифікації можуть бути оцінені за допомогою інструментів Accuracy та Classification report. Також растрами можна маніпулювати з використанням інструментів Postprocessing таких як Classification to vector, Reclassification, Edit raster directly, Classification sieve, Classification erosion та Classification dilation.

Графік спектральних сигнатур та Графік розсіву забезпечують аналіз спектральних сигнатур та ROI. Крім того, декілька Basic tools доступні для спрощення створення ROI та редагування спектральних сигнатур.

Перерахунок растрів з використанням математичних виразів та формул спектральних індексів доступний завдяки безпосередній інтеграції інструмента Band calc з каналами Band set. Також вихідний растр може бути розрахований на підставі Decision rules.

Інструмент Batch забезпечує автоматичне виконання декількох функцій SCP з використанням скриптового інтерфейсу.

See the Базові навчальні матеріали for more information and examples.

Як долучитись та сприяти SCP

Ви можете зробити внесок до SCP через виправлення та додавання функціональних можливостей (див. Де знаходиться вихідний код SCP?) або переклад посібника користувача (див. Як я можу перекласти цей посібник на іншу мову?).

Also, you can donate to this project at the following link https://fromgistors.blogspot.com/p/donations.html .

Other tutorials about SCP, also in languages other than English

There are several tutorials about SCP on the internet. Following an incomplete list of these resources (please note that these resources could use older versions of SCP):

Як я можу перекласти цей посібник на іншу мову?

Цей посібник користувача легко перекласти на іншу мову, тому що він написаний мовою розмітки reStructuredText (з використанням Sphinx). Тому ваш внесок є принциповим для перекладу посібника вашою мовою. Наступна інструкція ілюструє основні кроки з перекладу, які можуть бути здійснені:

  • з використанням онлайн-сервісу Transifex;
  • з використанням gettext .po файлів.

Before translating, please read this document from the QGIS translation guide, which helps you understand the reStructuredText.

Метод 1. Переклад з використанням безкоштовного онлайн-сервісу Transifex

Це мабуть найпростіший спосіб перекладу посібника користувача з використанням онлайн-сервісу.

  1. Приєднайтесь до проекту Semi-automatic Classification Manual

    Go to the page https://www.transifex.com/semi-automatic-classification/semi-automatic-classification-plugin-manual and click the button Help translate. You can sign in using your Google or Facebook account, or with a free registration.

  2. Select your language

    Select your language and click the button Join team. If your language is not listed, click the button Request language.

  3. Переклад

    There are several files to be translated, which refer to the sections of the SCP documentation. To translate the SCP interface you should select the file semiautomaticclassificationplugin.ts .

Метод 2. Переклад з використанням gettext .po файлів

Для того, щоб використовувати цей метод, ви повинні бути знайомі з GitHub. Цей метод перекладу дозволяє здійснювати переклад PO файлів локально.

  1. Завантажте файли перекладу

    Перейдіть до проекту GitHub https://github.com/semiautomaticgit/SemiAutomaticClassificationManual_v4/tree/master/locale та завантажте .po файли вашої мови (ви можете додати свою мову, якщо її немає в переліку) або ви можете форкнути репозиторій. Кожний .po файл це текстовий файл, що відповідає певному розділу посібника користувача.

  2. Відредагуйте файли перекладу

    Тепер ви можете редагувати .po файли. Ці файли зручно редагувати з використанням наступних програм: наприклад Poedit для Windows та Mac OS X або Gtranslator для Linux або OmegaT (на основі Java) для Windows, Linux та Mac OS X. Ці редактори забезпечують простий переклад для кожного речення посібника користувача.

Де знаходиться вихідний код SCP?

Ви можете знайти вихідний код SPC за наступним посиланням https://github.com/semiautomaticgit/SemiAutomaticClassificationPlugin

How to install QGIS using OSGeo4W?

To install QGIS, first download the OSGeo4W installer x86 or OSGeo4W installer x64 according to your operating system.

Then start the installer and select Advanced Install.

_images/1.jpg

Check Install from Internet and click Next.

_images/2.jpg

Select the installation directory and click Next.

_images/3.jpg

Select the local package directory and click Next.

_images/4.jpg

Select Direct connection (or select an internet connection option) and click Next.

_images/5.jpg

Select the first download site and click Next.

_images/6.jpg

In the package list select qgis-dev (in category Desktop) until QGIS3 is released.

_images/7.jpg

In the package list select python3-matplotlib (in category Libs).

_images/8.jpg

In the package list select python3-numpy (in category Libs).

_images/9.jpg

In the package list select python3-scipy (in category Libs) and click Next.

_images/10.jpg

Click Next to install also other dependencies.

_images/11.jpg

After the download, QGIS should be installed with all the required dependencies for SCP.