-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from geoyee/develop
Develop
- Loading branch information
Showing
50 changed files
with
1,857 additions
and
1,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 下载和使用 | ||
|
||
## 直接使用 | ||
|
||
提供x64版本的Windows exe[下载](https://github.com/geoyee/LabCD/releases/download/0.3/LabCD-0.3-x64-setup.exe),下载后按照流程安装后即可。打包过程由[Inno Setup](https://jrsoftware.org/)提供。 | ||
|
||
## 构建使用 | ||
|
||
1. 克隆项目到本地: | ||
|
||
```shell | ||
git clone https://github.com/geoyee/LabCD | ||
``` | ||
|
||
2. 根据系统下载[Qt 6.4.0](https://www.qt.io/download-qt-installer?hsCtaTracking=99d9dd4f-5681-48d2-b096-470725510d34%7C074ddad0-fdef-4e53-8aa8-5e8a876d6ab4)版本并安装。Windows用户如需要使用Visual Studio需要下载VS扩展:Qt Visual Studio Tools。 | ||
|
||
3. 下载所需的依赖包。目前需要的第三方包有`OpenCV 4.5.5`,`JsonCpp 1.9.5`,`GDAL 3.5.3`和`Eigen 3.4.0`。 | ||
|
||
1. `OpenCV 4.5.5`可从官方github仓库进行[下载](https://github.com/opencv/opencv/releases/tag/4.5.5)并使用cmake进行编译。 | ||
2. `JsonCpp 1.9.5`可从官方github仓库进行[下载](https://github.com/open-source-parsers/jsoncpp/releases/tag/1.9.5)并使用cmake进行编译。 | ||
3. `GDAL 3.5.3`可从官方github仓库进行[下载](https://github.com/OSGeo/gdal/releases/tag/v3.5.3)并使用cmake进行编译。 | ||
4. `Eigen 3.4.0`可从官方gitlab仓库直接进行[下载](https://gitlab.com/libeigen/eigen/-/tree/3.4.0)。 | ||
|
||
准备好之后需要在`labcd`的文件夹下新建`depends`文件夹,其中包括`include`和`lib`文件夹。将Opencv、JsonCpp和GDAL编译完成对应的include和lib文件放入,将Eigen源代码直接放到`depends`下。完成后的`depends`文件夹结构如下: | ||
|
||
``` | ||
depends | ||
├-- include | ||
| ├-- gdal | ||
| ├-- json | ||
| └-- opencv2 | ||
├-- lib | ||
| ├-- gdal_i.lib | ||
| ├-- jsoncpp_static.lib | ||
| ├-- jsoncpp_staticd.lib | ||
| ├-- opencv_world455.lib | ||
| └-- opencv_world455d.lib | ||
└-- Eigen | ||
``` | ||
|
||
4. 完成后可使用Visual Studio打开对应的`sln`文件构建或其他平台使用Qt Creator打开`pro`文件,建立qmake后构建,即可使用。 | ||
5. CMakeLists由[qmake2cmake](https://www.qt.io/blog/introducing-qmake2cmake)生成,如第三方依赖的路径发生变化,无论是Visual Studio还是Qt Creator或是Cmake都需要对依赖的路径进行调整。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Download and Usage | ||
|
||
## Direct Use | ||
|
||
The x64 version of Windows exe is available for direct use, which can be downloaded [here](https://github.com/geoyee/LabCD/releases/download/0.3/LabCD-0.3-x64-setup.exe). After downloading, follow the process to install. The packaging process is provided by [Inno Setup](https://jrsoftware.org/). | ||
|
||
## Building and Use | ||
|
||
1. Clone the project to your local machine: | ||
|
||
```shell | ||
git clone https://github.com/geoyee/LabCD | ||
``` | ||
|
||
1. Download and install [Qt 6.4.0](https://www.qt.io/download-qt-installer?hsCtaTracking=99d9dd4f-5681-48d2-b096-470725510d34|074ddad0-fdef-4e53-8aa8-5e8a876d6ab4) version according to your system. Windows users who want to use Visual Studio need to download the VS extension: Qt Visual Studio Tools. | ||
|
||
2. Download the required dependencies. Currently, the required third-party packages are `OpenCV 4.5.5`, `JsonCpp 1.9.5`, `GDAL 3.5.3`, and `Eigen 3.4.0`. | ||
|
||
1. `OpenCV 4.5.5` can be downloaded from the official GitHub repository [here](https://github.com/opencv/opencv/releases/tag/4.5.5) and compiled using cmake. | ||
2. `JsonCpp 1.9.5` can be downloaded from the official GitHub repository [here](https://github.com/open-source-parsers/jsoncpp/releases/tag/1.9.5) and compiled using cmake. | ||
3. `GDAL 3.5.3` can be downloaded from the official GitHub repository [here](https://github.com/OSGeo/gdal/releases/tag/v3.5.3) and compiled using cmake. | ||
4. `Eigen 3.4.0` can be downloaded directly from the official gitlab repository [here](https://gitlab.com/libeigen/eigen/-/tree/3.4.0). | ||
|
||
After preparing, you need to create a `depends` folder under the `labcd` folder, which includes `include` and `lib` folders. Put the completed include and lib files corresponding to Opencv, JsonCpp, and GDAL into the `depends` folder, and put the Eigen source code directly into `depends`. The `depends` folder structure after completion is as follows: | ||
|
||
``` | ||
luaCopy codedepends | ||
├-- include | ||
| ├-- gdal | ||
| ├-- json | ||
| └-- opencv2 | ||
├-- lib | ||
| ├-- gdal_i.lib | ||
| ├-- jsoncpp_static.lib | ||
| ├-- jsoncpp_staticd.lib | ||
| ├-- opencv_world455.lib | ||
| └-- opencv_world455d.lib | ||
└-- Eigen | ||
``` | ||
|
||
3. After completion, you can use Visual Studio to open the corresponding `sln` file for building or use Qt Creator to open the `pro` file, establish qmake and build, then you can use it. | ||
|
||
4. The CMakeLists is generated by [qmake2cmake](https://www.qt.io/blog/introducing-qmake2cmake). If the paths of third-party dependencies change, whether it is Visual Studio, Qt Creator, or CMake, you need to adjust the paths of the dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 快捷键列表 | ||
|
||
| 操作 | 快捷键 | | ||
| -------------- | ------------------- | | ||
| 画布移动 | 按住鼠标中键移动 | | ||
| 画布缩放 | Ctrl + 鼠标滚轮滚动 | | ||
| 画点 | 鼠标左键 | | ||
| 结束画点 | 鼠标右键 | | ||
| 打开文件夹 | Ctrl + O | | ||
| 切分大图 | Ctrl + B | | ||
| 合并大图 | Ctrl + M | | ||
| 打开快捷键帮助 | Ctrl + H | | ||
| 保存 | Ctrl + S | | ||
| 切换上一张 | S | | ||
| 切换下一张 | F | | ||
| 图像全屏 | Ctrl + F | | ||
| 删除多边形 | Backspace | | ||
| 删除所有多边形 | Delete | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Keyboard shortcut list | ||
|
||
| Operation | Shortcut | | ||
| ------------------------ | --------------------------------- | | ||
| Move canvas | Hold middle mouse button and move | | ||
| Zoom canvas | Ctrl + Scroll mouse wheel | | ||
| Draw point | Left mouse button | | ||
| End point drawing | Right mouse button | | ||
| Open folder | Ctrl + O | | ||
| Split image | Ctrl + B | | ||
| Merge image | Ctrl + M | | ||
| Open shortcut help | Ctrl + H | | ||
| Save | Ctrl + S | | ||
| Switch to previous image | S | | ||
| Switch to next image | F | | ||
| Image fullscreen | Ctrl + F | | ||
| Delete polygon | Backspace | | ||
| Delete all polygons | Delete | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 使用教程 | ||
|
||
在使用前,需要对文件的组织形式进行了解。当未标注时,文件可只有`A`和`B`两个文件夹,其中保存的两时期影像的文件名相同。文件组织如下: | ||
|
||
``` | ||
testimgs | ||
├-- A # 用于存放时段一的图像 | ||
| └-- 01.jpg # 时段一图像 | ||
├-- B # 用于存放时段二的图像 | ||
| └-- 01.jpg # 时段二图像 | ||
├-- GT # 自动生成,用于存放标注结果 | ||
| ├-- 01_pseudo.png # 伪彩色图 | ||
| ├-- 01.bmp # 单波段标注图 | ||
| └-- 01.json # 自定义格式标注,用于恢复多边形 | ||
└-- label.json # 自动生成,用于自动标签导入 | ||
``` | ||
|
||
## 切分/合并大图 | ||
|
||
在“文件”中使用“切分大图”,需要选择大图路径和切分大小,可将一张大的遥感图像切分为多张小图。其中小图的命名中带有该图在大图像左上角的坐标,因此如果需要使用“合并大图”操作将该文件夹内的小图合并,则不能修改图像的名字。 | ||
|
||
## 清理空白标签 | ||
|
||
在“文件”中使用“清理空白标签”,需要选择符合文件组织的文件夹。该操作会遍历`GT`中的标签,将没有内容的标签对应的两时期影像、json文件等一并删除。 | ||
|
||
## 从标签建立标注 | ||
|
||
在“文件”中使用“从标签建立标注”,需要选择一个仅存放图像掩模的文件夹,该操作会为文件夹中的掩膜生成对应的json文件,使LabCD打开时绘制多边形以用于进行调整。 | ||
|
||
## 变化检测标注 | ||
|
||
核心功能,该功能使用时,在“文件”中使用“打开文件夹”,选择符合文件组织的文件夹,即可进行标注。 | ||
|
||
1. 标注时需要先在“标签列表”中“添加标签”,设置对应的颜色和文字内容。 | ||
2. 可以通过上/下翻页或直接双击“数据列表”中的文件名,切换到需要标注的文件。 | ||
3. 点击一个标签,再在图像中进行标注,鼠标左边新建点,右键完成当前多边形标注。 | ||
4. 完成后切换图像或点击保存都会保存结果,结果包括一个掩膜文件、一个多边形的json文件和一个伪彩色文件。 | ||
|
||
*最好每次绘制完一个多边形都在画布上点一下鼠标右键,若突然点击左键无效,可以切换一下标签,重新点击。* | ||
|
||
其余功能包括: | ||
|
||
- 设置十字丝的颜色。 | ||
- 加载一个小图像,该图像为两时期影像计算的变化强度图像。 | ||
- 增加第一次加载多光谱数据计算最佳波段组合,后续加载计算所得的波段。 | ||
- 删除指定多边形和清空多边形。 | ||
- 双击”点“可以删除该点,双击”线“可以在该线处新建一个点。 |
Oops, something went wrong.