IDL-简单的练习题

1. 定义显示一个如图的图像

arr = make_array(300,300,value=0)
 arr[0:99,0:99]=150
 arr[0:99,100:199]=75
 arr[100:199,0:99]=175
 arr[100:199,100:199]=100
 arr[100:199,200:299]=25
 arr[200:299,0:99]=200
 arr[200:299,100:199]=125
 arr[200:299,200:299]=50
 
 idx1 = where(arr eq 150)
 idx2 = where(arr eq 75)
 idx3 = where(arr eq 0)
 idx4 = where(arr eq 175)
 idx5 = where(arr eq 100)
 idx6 = where(arr eq 25)
 idx7 = where(arr eq 200)
 idx8 = where(arr eq 125)
 idx9 = where(arr eq 50)
 
 arr[idx1] = 150;
 arr[idx2] = 75;
 arr[idx3] = 0;
 arr[idx4] = 175;
 arr[idx5] = 100;
 arr[idx6] = 25;
 arr[idx7] = 200;
 arr[idx8] = 125;
 arr[idx9] = 50;

2. 旋转和缩放处理


                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值