Compare commits
2 Commits
e26f4e56ee
...
90c4da3249
Author | SHA1 | Date | |
---|---|---|---|
![]() |
90c4da3249 | ||
![]() |
e82574190e |
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
result/
|
||||
.idea/
|
||||
.vscode/
|
BIN
0_roi_image.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
1_roi_image.png
Before Width: | Height: | Size: 983 KiB After Width: | Height: | Size: 1.1 MiB |
BIN
2_roi_image.png
Before Width: | Height: | Size: 783 KiB After Width: | Height: | Size: 2.9 MiB |
BIN
3_roi_image.png
Normal file
After Width: | Height: | Size: 2.6 MiB |
BIN
4_roi_image.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
5_roi_image.png
Normal file
After Width: | Height: | Size: 983 KiB |
BIN
6_roi_image.png
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
7_roi_image.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
@ -38,11 +38,11 @@ cloud_need_points_size = 600000
|
||||
save_cload = true
|
||||
|
||||
[sys]
|
||||
fake = false
|
||||
fake = true
|
||||
camera_cap_fake = true
|
||||
lidar_cap_fake = true
|
||||
npu_fake = true
|
||||
conners_detect_fake = false
|
||||
fake_image_fpath = ./result/test_1/ep_100000_count_600000/output.jpg
|
||||
fake_lidar_fpath = ./result/test_1/ep_100000_count_600000/output.ply
|
||||
conners_detect_fake = true
|
||||
fake_image_fpath = ./result/hy_1/output.jpg
|
||||
fake_lidar_fpath = ./result/hy_1/output.ply
|
||||
|
||||
|
@ -182,6 +182,7 @@ def init_image_framework_sdk():
|
||||
# 加载C++库
|
||||
current_file_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
image_framework_sdk = CDLL(os.path.join(current_file_dir, f'./image_framework.dll'))
|
||||
print(f"[image_framework_sdk] ====== [{image_framework_sdk}]")
|
||||
print("Load Image framework sdk success")
|
||||
except Exception as e:
|
||||
print(f"Load Image framework sdk failed: {str(e)}")
|
||||
@ -236,7 +237,7 @@ if __name__ == '__main__':
|
||||
raise RuntimeError(f"设置回调函数始设置失败, 错误码: {ret}")
|
||||
|
||||
|
||||
dataPath = "./result/hy_1" # 数据路径
|
||||
dataPath = "./result" # 数据路径
|
||||
data_img_path = None # 检测的图片路径
|
||||
data_detect_res_save_path = None # 检测结果的保存路径
|
||||
# 遍历目录
|
||||
|
@ -48,8 +48,14 @@ for index, row in df.iloc[2:30].iterrows():
|
||||
center_y = row[col('L')]
|
||||
width = row[col('D')]
|
||||
height = row[col('E')]
|
||||
# 左上角
|
||||
x = center_x - width / 2
|
||||
y = center_y - height / 2
|
||||
# 左上角
|
||||
y = center_y + height / 2
|
||||
# 左下角
|
||||
x_left_bottom = center_x - width / 2
|
||||
# 左下角
|
||||
y_left_bottom = center_y - height / 2
|
||||
|
||||
|
||||
# [{
|
||||
@ -76,14 +82,8 @@ for index, row in df.iloc[2:30].iterrows():
|
||||
# 画出中心点
|
||||
ax.scatter(center_x, center_y, color='red', marker='o', s=10)
|
||||
|
||||
# 更新边界
|
||||
x_min = min(x_min, x)
|
||||
x_max = max(x_max, x + row[col('D')])
|
||||
y_min = min(y_min, y)
|
||||
y_max = max(y_max, y + row[col('E')])
|
||||
|
||||
# 绘制矩形
|
||||
rect = Rectangle((x, y), row[col('D')], row[col('E')], linewidth=1, edgecolor='r', facecolor='none')
|
||||
rect = Rectangle((x_left_bottom, y_left_bottom),width, height, linewidth=1, edgecolor='r', facecolor='none')
|
||||
ax.add_patch(rect)
|
||||
|
||||
# 在矩形中心绘制编号(A列)
|
||||
@ -95,14 +95,14 @@ for index, row in df.iloc[2:30].iterrows():
|
||||
|
||||
# 在矩形上边绘制宽度(D列)
|
||||
ax.text(
|
||||
x + row[col('D')] / 2, y + row[col('E')], str(row[col('D')]),
|
||||
x + row[col('D')] / 2, y_left_bottom + row[col('E')], str(row[col('D')]),
|
||||
ha='center', va='bottom',
|
||||
fontsize=6, color='green' # 宽度字体大小为10,颜色为绿色
|
||||
)
|
||||
|
||||
# 在矩形右边绘制高度(E列)
|
||||
ax.text(
|
||||
x + row[col('D')], y + row[col('E')] / 2, str(row[col('E')]),
|
||||
x + width, y_left_bottom + height / 2, height,
|
||||
ha='left', va='center',
|
||||
fontsize=6, color='red' # 高度字体大小为10,颜色为红色
|
||||
)
|
||||
|
BIN
image_framework_33.dll
Normal file
BIN
result/hy_1/output.jpg
Normal file
After Width: | Height: | Size: 11 MiB |
BIN
result/hy_1/output.ply
Normal file
BIN
result/hy_1/result.jpg
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
result/hy_1/result2.jpg
Normal file
After Width: | Height: | Size: 142 KiB |
64
result/hy_1/roi_conners.txt
Normal file
@ -0,0 +1,64 @@
|
||||
6911
|
||||
3175
|
||||
7935
|
||||
3175
|
||||
7935
|
||||
4142
|
||||
6911
|
||||
4142
|
||||
5578
|
||||
3808
|
||||
6623
|
||||
3808
|
||||
6623
|
||||
4761
|
||||
5578
|
||||
4761
|
||||
2677
|
||||
5089
|
||||
5214
|
||||
5089
|
||||
5214
|
||||
6179
|
||||
2677
|
||||
6179
|
||||
2613
|
||||
2198
|
||||
4142
|
||||
2198
|
||||
4142
|
||||
3607
|
||||
2613
|
||||
3607
|
||||
73
|
||||
1746
|
||||
1314
|
||||
1746
|
||||
1314
|
||||
2799
|
||||
73
|
||||
2799
|
||||
52
|
||||
3066
|
||||
1092
|
||||
3066
|
||||
1092
|
||||
3997
|
||||
52
|
||||
3997
|
||||
4815
|
||||
1805
|
||||
5951
|
||||
1805
|
||||
5951
|
||||
2849
|
||||
4815
|
||||
2849
|
||||
6774
|
||||
1829
|
||||
7896
|
||||
1829
|
||||
7896
|
||||
2869
|
||||
6774
|
||||
2869
|
@ -1,24 +1,64 @@
|
||||
1131
|
||||
2007
|
||||
5900
|
||||
2007
|
||||
5900
|
||||
5376
|
||||
1131
|
||||
5376
|
||||
2004
|
||||
2958
|
||||
3142
|
||||
2958
|
||||
3142
|
||||
3948
|
||||
2004
|
||||
3948
|
||||
3887
|
||||
2919
|
||||
4839
|
||||
2919
|
||||
4839
|
||||
3902
|
||||
3887
|
||||
3902
|
||||
6911
|
||||
3175
|
||||
7935
|
||||
3175
|
||||
7935
|
||||
4142
|
||||
6911
|
||||
4142
|
||||
5578
|
||||
3808
|
||||
6623
|
||||
3808
|
||||
6623
|
||||
4761
|
||||
5578
|
||||
4761
|
||||
2677
|
||||
5089
|
||||
5214
|
||||
5089
|
||||
5214
|
||||
6179
|
||||
2677
|
||||
6179
|
||||
2613
|
||||
2198
|
||||
4142
|
||||
2198
|
||||
4142
|
||||
3607
|
||||
2613
|
||||
3607
|
||||
73
|
||||
1746
|
||||
1314
|
||||
1746
|
||||
1314
|
||||
2799
|
||||
73
|
||||
2799
|
||||
52
|
||||
3066
|
||||
1092
|
||||
3066
|
||||
1092
|
||||
3997
|
||||
52
|
||||
3997
|
||||
4815
|
||||
1805
|
||||
5951
|
||||
1805
|
||||
5951
|
||||
2849
|
||||
4815
|
||||
2849
|
||||
6774
|
||||
1829
|
||||
7896
|
||||
1829
|
||||
7896
|
||||
2869
|
||||
6774
|
||||
2869
|
||||
|