IPCC Preliminary SLIC Analysis
VScode Debug Run¶
{
"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
}
]
}
Debug Process¶
- main
- LoadPPM 把数据读入imag
- 读类型、像素图片长宽 2599 3898
- 读最大像素 255(应该是指rgb颜色,比如red只有256种,也就是8位二进制)
- 读长宽的像素的rgb到imag返回,imag是2599*3898大小的unsigned int二维数组,每位存24位数2进制数。
- 创建lables来存储分类结果, m_spcount 200, m_compactness 10
- 计时运行 slic.PerformSLICO_ForGivenK(img, width, height, labels, numlabels, m_spcount, m_compactness);//for a given number K of superpixels
- 结果与check.ppm对比