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;

 

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM