当前位置:网站首页>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
边栏推荐
- 超级重磅!Apache Hudi多模索引对查询优化高达30倍
- [SQL] MySQL query statement execution sequence analysis
- Redis(三十二)-用Redis做分布式锁
- Analysis report on market demand and investment strategy of China's re guarantee industry 2022-2028
- [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
- 实验10 Bezier曲线生成-实验提高-交互式生成B样条曲线
- Leetcodesql: count the number of students in each major
- In 2021, the global spice and seasoning revenue is about 18720million US dollars, and it is expected to reach 25960million US dollars in 2028
- io.seata.common.exception.FrameworkException: can not connect to services-server.
- 国内如何下载ProxyStrike
猜你喜欢
On how to make digital transformation after the loan of large policy banks- Yixinhuachen
被八股文害惨了。。。
no available service ‘null‘ found, please make sure registry config correct
In 2021, the global revenue of chlorinated polyvinyl chloride (CPVC) was about $1809.9 million, and it is expected to reach $3691.5 million in 2028
no available service ‘null‘ found, please make sure registry config correct
【5GC】三种SSC(Session and Service Continuity)模式介绍
【0008】无序列表
Kali LAN ARP Spoofing and monitoring other hosts' Internet access records in the LAN
国内如何下载ProxyStrike
leetcodeSQL:602. Friend application II: who has the most friends
随机推荐
leetcode:5259. Calculate the total tax payable [simple simulation + see which range]
The solution of BiliBili video list name too long and incomplete display
What is a network proxy
Attack and defense world (WEB) -- supersqli
【历史上的今天】6 月 12 日:美国进入数字化电视时代;Mozilla 的最初开发者出生;3Com 和美国机器人公司合并
uniapp使用阿里图标
leetcode:5259. 计算应缴税款总额【简单模拟 + 看看在哪个区间】
leetcode:6096. 咒语和药水的成功对数【排序 + 二分】
收获满满的下午
Market development planning and investment prospect analysis report of Chinese government investment and financing platform 2022-2027
leetcode:5270. Minimum path cost in Grid [simple level DP]
Istio 1.14 release
【图像去噪】基于正则化实现图像去噪附matlab代码
Cookie & Session & kaptcha验证码
Leetcode 1049. 最后一块石头的重量 II
Tarfile decompress nested tar
YOLOX网络结构详解
MySQL数据库实验一 数据定义
Research Report on the overall scale, major manufacturers, major regions, products and application segmentation of swimming fins in the global market in 2022
A fruitful afternoon