IPCC Preliminary SLIC Analysis

VScode Debug Run

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "/home/shaojiemike/github/IPCC/SLIC/SLIC",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
1
g++ -g -std=c++11 SLIC.cpp -o SLIC #把调试信息加到可执行文件中,如果没有-g,你将看不见程序的函数名、变量名,所代替的全是运行时的内存地址。

Debug Process

  1. main
  2. LoadPPM 把数据读入imag
    1. 读类型、像素图片长宽 2599 3898
    2. 读最大像素 255(应该是指rgb颜色,比如red只有256种,也就是8位二进制)
    3. 读长宽的像素的rgb到imag返回,imag是2599*3898大小的unsigned int二维数组,每位存24位数2进制数。
  3. 创建lables来存储分类结果, m_spcount 200, m_compactness 10
  4. 计时运行 slic.PerformSLICO_ForGivenK(img, width, height, labels, numlabels, m_spcount, m_compactness);//for a given number K of superpixels
  5. 结果与check.ppm对比

skills: watch arrays

1
2
*(int(*)[100])labels
*labels@10000

SourceTrail Analysis

Vtune Analysis

需要进一步的研究学习

遇到的问题

参考文献

Author

Shaojie Tan

Posted on

2021-07-10

Updated on

2025-01-30

Licensed under