halcon-get_image_size获取图像尺寸

在HDevelop中

read_image (Image, 'D:/bb/tu/ma.jpg')
get_image_size (Image, Width, Height)
*获取图像尺寸
       

 

在QtCreator中 

    this->resize(500,300);
    HObject  ho_Image;
    ReadImage(&ho_Image, "D:/bb/tu/ma.jpg");

    HTuple  hv_Width, hv_Height;


    ReadImage(&ho_Image, "D:/bb/tu/ma.jpg");
    GetImageSize(ho_Image, &hv_Width, &hv_Height);//获取图像的宽和高

    int Width=hv_Width.I();
    int Height=hv_Height.I();

    qDebug()<<"Width="<<Width<<";    "<<"Height="<<Height;

 

 

 

 

 

posted @ 2022-02-03 18:56  天子骄龙  阅读(1558)  评论(0)    收藏  举报