当前位置:网站首页>VC hacon joint programming genimage3extern writeimage
VC hacon joint programming genimage3extern writeimage
2022-06-12 19:06:00 【weixin_ thirty-nine million nine hundred and twenty-six thousan】
// In the previous article, I described the joint programming diagram reading , See vc halcon Joint programming configuration ReadImage demo_weixin_39926429 The blog of -CSDN Blog
// This article describes Generate and save pictures To hard disk .
void NewImage(HObject* pHobj)
{
unsigned char* image_red;
unsigned char* image_green;
unsigned char* image_blue;
int r, c;
image_red = (unsigned char*)malloc(640 * 480);
image_green =( unsigned char*) malloc(640 * 480);
image_blue = (unsigned char*)malloc(640 * 480);
for (r = 0; r < 480; r++)
for (c = 0; c < 640; c++)
{
image_red[r * 640 + c] = c % 255;
image_green[r * 640 + c] = (c + 64) % 255;
image_blue[r * 640 + c] = (c + 128) % 255;
}
//halcon Function to generate a picture
GenImage3Extern(pHobj, "byte", 640, 480, (Hlong)image_red, \
(Hlong)image_green, (Hlong)image_blue, (Hlong)free);
}
main()
{ HObject Image;
NewImage(&Image);
WriteImage(Image, "bmp", 0, "d:\\test1000.bmp");// Save pictures to hard disk
}
// After the saved picture is opened, it is as follows
边栏推荐
- PHP converts total seconds to hours, minutes and seconds
- vc hacon 联合编程 GenImage3Extern WriteImage
- Rhca memoirs -- Introduction to cl280
- tarfile解压嵌套tar
- Attack and defense world (WEB) -- supersqli
- [today in history] June 12: the United States entered the era of digital television; Mozilla's original developer was born; 3com merges with American Robotics
- leetcode:6095. 强密码检验器 II【简单模拟 + 不符合直接False】
- leetcode:6095. Strong password verifier II [simple simulation + direct false]
- kali局域网ARP欺骗(arpspoof)并监听(mitmproxy)局域内其它主机上网记录
- The solution of BiliBili video list name too long and incomplete display
猜你喜欢
随机推荐
美团获得小样本学习榜单FewCLUE第一!Prompt Learning+自训练实战
[0008] unordered list
Liunx deploy Seata (Nacos version)
Report on market demand trends and future strategic planning recommendations of the global and Chinese smart financial solutions industry 2022-2028
吃饭咯 干锅肥肠 + 掌中宝!
YOLOX网络结构详解
WinCC7.5 SP1调整画面尺寸以适应显示分辨率的方法
What are the third-party software testing organizations in Shanghai that share knowledge about software validation testing?
Vue - Advanced Vue router routing (2) (replace attribute, programming route navigation, caching route components, and exclusive hooks for routes)
leetcode:6097. Match [set record + query one by one with the same length] after replacing characters
SCI Writing - Results
Cookie & Session & kaptcha验证码
Embedded development: 6 necessary skills for firmware engineers
六石认知学:大脑的显速与潜速
Shell 编程正则表达式及元字符
What is a network proxy
Global and Chinese smart government industry market research and investment risk outlook report 2022-2028
Experiment 10 Bezier curve generation - experiment improvement - interactive generation of B-spline curve
数据库全量SQL分析与审计系统性能优化之旅
Leetcode 474. One and zero