#pragma strict var str:String; //接收外部复制贴图 var imageTexture:Texture; private var imageWidth:int; private var imageHeight:int; private var screenWidth:int; private var screenHeight:int; function Start () { //得到屏幕宽高 screenWidth=Screen.width; screenHeigh
在label中添加pixmap来显示图片时,当图片过大时图片显示不全. 1.这时可以使用pixmap的scared()方法,来设置图片缩放. QPixmap QPixmap.scaled (self, int w, int h, Qt.AspectRatioMode aspectMode = Qt.IgnoreAspectRatio, Qt.TransformationMode mode = Qt.FastTransformation) Scales the pixmap to the give
1. 准备自己的图片数据 选用部分的Caltech数据库作为训练和测试样本.Caltech是加州理工学院的图像数据库,包含Caltech101和Caltech256两个数据集.该数据集是由Fei-FeiLi, Marco Andreetto, Marc 'Aurelio Ranzato在2003年9月收集而成的.Caltech101包含101种类别的物体,每种类别大约40到800个图像,大部分的类别有大约50个图像.Caltech256包含256种类别的物体,大约30607张图像.图像如下图所示