- Hlong width,height;
- HObject ho_image;
- ReadImage(&ho_image, path.c_str());
- ConvertImageType(ho_image, &ho_image, "real"); //转化为float的数据
- HImage hImg(ho_image);
- HString ho_type;
- void *ptr_img = hImg.GetImagePointer1(&ho_type, &width, &height); //获取float的指针
- HTuple hv_pointer;
- unsigned char *ptr;
- GetImagePointer1(himage,&hv_pointer,&htype,&width,&height);
- ptr=(unsigned char *)hv_pointer[0].L();
- HTuple hv_ptrRed,hv_ptrGreen,hv_ptrBlue;
- GetImagePointer3(himage,&hv_ptrRed,&hv_ptrGreen,&hv_ptrBlue,&htype,&width,&height);
- uchar *ptrRed=(uchar*)hv_ptrRed[0].L();
- uchar *ptrGreen=(uchar*)hv_ptrGreen[0].L();
- uchar *ptrBlue=(uchar*)hv_ptrBlue[0].L();
复制代码
|