• halconzoom_image_size将图像缩放到给定大小


    在HDevelop中

    read_image(Image1,'D:/bb/tu/ma.jpg')
    get_image_size (Image1, Width, Height)
    zoom_image_size(Image1,ZooImage, 200, 100, 'bilinear')
    *功能:将图像缩放到给定大小
    *参数1:原图像
    *参数2:缩放后保存的图像
    *参数3:图像的宽度,默认值:512
    *      建议值:128256512
    *      典型值范围:2≤ 宽度≤ 512
    *      最小增量:1
    *      建议增量:10
    *      
    *参数4:图像的高度,  默认值:512    建议值:128256512
    *      典型值范围:2≤ 身高≤ 512
    *      最小增量:1   建议增量:10
    *参数5:插值类型
    *      默认值:'constant'
    *      值列表: 'bicubic', 'bilinear', 'constant', 'nearest_neighbor', 'weighted'
    
    get_image_size (ZooImage, Width1, Height1)

    在QtCreator中

        HObject  ho_Image1, ho_ZooImage;
        HTuple  hv_Width, hv_Height, hv_Width1, hv_Height1;
        ReadImage(&ho_Image1, "D:/bb/tu/ma.jpg");
        GetImageSize(ho_Image1, &hv_Width, &hv_Height);
        ZoomImageSize(ho_Image1, &ho_ZooImage, 200, 100, "bilinear");
          //功能:将图像缩放到给定大小
          //参数1:原图像
          //参数2:缩放后保存的图像
          //参数3:图像的宽度,默认值:512
          //     建议值:128、256、512
          //     典型值范围:2≤ 宽度≤ 512
          //     最小增量:1
          //     建议增量:10
          //
          //参数4:图像的高度,  默认值:512    建议值:128、256、512
          //     典型值范围:2≤ 身高≤ 512
          //     最小增量:1   建议增量:10
          //参数5:插值类型
          //     默认值:'constant'
          //     值列表: 'bicubic', 'bilinear', 'constant', 'nearest_neighbor', 'weighted'
    
          GetImageSize(ho_ZooImage, &hv_Width1, &hv_Height1);
    
          int Width=hv_Width.I();
          int Width1=hv_Width1.I();
          int Height=hv_Height.I();
          int Height1=hv_Height1.I();
    
          qDebug()<<"Width="<<Width;
          qDebug()<<"Height="<<Height;
          qDebug()<<"Width1="<<Width1;
          qDebug()<<"Height1="<<Height1;

  • 相关阅读:
    Linux查看内容命令[持续添加]
    android4.0 x86下载编译简介
    android4.0 x86 裁剪与定制
    Android4.0 x86源码结构,生成目录结构
    android4.0 x86编译生成文件系统镜像system.img结构简介
    [翻译]Mootools 1.2新特性(一):元素存储(Element Storage)
    ASP.NET MVC Preview 3 STEP BY STEP 文章管理实例(一)
    Microsoft Speech API SDK
    PB串口编程资料MSCOMM32参数基本介绍
    Microsoft Speech API Overview(SAPI 5.4)
  • 原文地址:https://www.cnblogs.com/liming19680104/p/15877907.html
Copyright © 2020-2023  润新知