在HDevelop中
dev_open_window (0, 0, 300, 300, 'black', WindowHandle)
gen_region_points (Region1, [100,100,100,100,100,100], [100,101,102,103,104,105])
*获取点区域
*参数1:输出区域
*参数2:点的y坐标
*参数3:点的x坐标
dev_display(Region1)
在Qt Creator中
HObject ho_Image, ho_Image1, ho_Region, ho_RegionComplement;
HTuple hv_Width, hv_Height, hv_WindowHandle;
HTuple hv_WindowHandle1;
ReadImage(&ho_Image, "D:/bb/tu/4.jpg");
Rgb1ToGray(ho_Image, &ho_Image1);
//将RGB图像转换为灰度图像
Threshold(ho_Image1, &ho_Region, 80, 90);
Complement(ho_Region, &ho_RegionComplement);
//区域的补集--获取参数1之外的区域
GetImageSize(ho_Image1, &hv_Width, &hv_Height);
SetWindowAttr("background_color","black");
OpenWindow(10,100,hv_Width,hv_Height,0,"visible","",&hv_WindowHandle);
HDevWindowStack::Push(hv_WindowHandle);
if (HDevWindowStack::IsOpen())
DispObj(ho_Region, HDevWindowStack::GetActive());
SetWindowAttr("background_color","black");
OpenWindow(10,100,hv_Width,hv_Height,0,"visible","",&hv_WindowHandle1);
HDevWindowStack::Push(hv_WindowHandle1);
if (HDevWindowStack::IsOpen())
DispObj(ho_RegionComplement, HDevWindowStack::GetActive());