惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
L
LangChain Blog
C
Check Point Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
Recent Announcements
Recent Announcements
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
U
Unit 42
The Cloudflare Blog
月光博客
月光博客
有赞技术团队
有赞技术团队
G
Google Developers Blog
Vercel News
Vercel News

又见苍岚

COLMAP PatchMatch Stereo 算法详解 事件驱动的状态机框架:从理论到工程实践 Git 在国内网络环境下无法 Push 的排查与修复 —— 配置 Clash 代理 分段五次多项式插值原理详解 路径插值方法深度对比研究 Claude Code 使用指南 OpenClaw 记忆管理与技能创建指南 CBS(Conflict-Based Search)算法详解 A* 算法及其变种详解 OpenClaw 配置多 Agents Windows Powershell 无法加载文件,因为在此系统上禁止运行脚本问题的解决方案 MaxClaw 安装流程 大模型 AI 名词介绍 AList 网盘聚合工具简介 Protobuf 简介与测试 Claude Code 简介以及 GLM 4.7 模型接入 Github 歌词下载工具 163MusicLyrics Python __getattr__ 懒加载 Python TypedDict 机器人仿真平台 Gazebo 安装记录 机器人仿真平台 Gazebo 简介 多机器人路径规划问题(Multi-Agent Path Finding, MAPF)简介 Python exifread 读取修改过的 jpeg 信息错误问题修复 3D 坐标系变换的理解 3D 旋转矩阵基本概念 MongoDB Compass 介绍 Python 环境管理工具 uv Flutter 开发指南 Snipaste 安装下载与黑屏问题解决方案 全局路径规划算法记录
C++ 调用 Halcon 时大尺寸操作无效问题的解决方案
Yiwei Zhang · 2022-12-08 · via 又见苍岚

C++ 调用 Halcon 时偶现大尺寸的算子操作无效问题,本文记录解决方案。

问题复现

  • 在 C++ 调用 Halcon 程序中,创建如下尺寸矩形
1
2
3
4
5
6
7
8
9
10
11
12
HObject Rectangle;
GenRectangle1(&Rectangle, 234, 31, 1534, 424)

HTuple test;
RegionFeatures(ho_roi, "width", &test);
cout << test[0].D() <<endl;
RegionFeatures(ho_roi, "area", &test);
cout << test[0].D() << endl;
RegionFeatures(ho_roi, "row1", &test);
cout << test[0].D() << endl;
RegionFeatures(ho_roi, "height", &test);
cout << test[0].D() << endl;

  • 正常运行时输出的都是正常的数据,出现问题时输出全为 0

问题原因

  • 原因不明 ……
  • 感觉的原因是由于某些操作尺寸较大,Halcon 默认画布装不下导致的 bug

解决方案

  • 在代码中显示定义较大的画布大小,例如加入如下代码:
1
2
HalconCpp::SetSystem("width", 8000);
HalconCpp::SetSystem("height", 8000);
  • 问题解决。

文章链接:
https://www.zywvvd.com/notes/coding/halcon/halcon-cpp-bug/halcon-cpp-bug1/