

在HDevelop中
dev_close_window ()
read_image (Image, 'D:/bb/tu/1.jpg')
rgb1_to_gray (Image, GrayImage)
roberts (GrayImage, ImageRoberts, 'gradient_sum')
*计算边缘
*参数1:输入图像
*参数2:输出图像
*参数3:过滤器类型
* 'gradient_sum' 默认
* 'gradient_max'
* 'roberts_max'
get_image_size (GrayImage, Width, Height)
dev_open_window(10,10,Width, Height,'black',WindowHandle)
dev_display(ImageRoberts)

在QtCreator中
HObject ho_Image, ho_GrayImage, ho_ImageRoberts;
HTuple hv_Width, hv_Height, hv_WindowHandle;
if (HDevWindowStack::IsOpen())
CloseWindow(HDevWindowStack::Pop());
ReadImage(&ho_Image, "D:/bb/tu/1.jpg");
Rgb1ToGray(ho_Image, &ho_GrayImage);
Roberts(ho_GrayImage, &ho_ImageRoberts, "gradient_sum");
//计算边缘
//参数1:输入图像
//参数2:输出图像
//参数3:过滤器类型
// 'gradient_sum' 默认
// 'gradient_max'
// 'roberts_max'
GetImageSize(ho_GrayImage, &hv_Width, &hv_Height);
SetWindowAttr("background_color","black");
OpenWindow(10,10,hv_Width,hv_Height,0,"visible","",&hv_WindowHandle);
HDevWindowStack::Push(hv_WindowHandle);
if (HDevWindowStack::IsOpen())
DispObj(ho_ImageRoberts, HDevWindowStack::GetActive());

