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