数字图像处理之几何变换

、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
imresize
 IMRESIZE Resize image.
    IMRESIZE resizes an image of any type using the specified
    interpolation method. Supported interpolation methods
    include:

         'nearest'  (default) nearest neighbor interpolation
 
         'bilinear' bilinear interpolation
 
         'bicubic'  bicubic interpolation

缩小

A=imread('lena.jpg');  
subplot(1,2,1);imshow(A);title('原图像'); 

B=imresize(A,0.1,'nearest');
subplot(1,2,2);imshow(B);title('zoom');


放大
A=imread('lena.jpg');  
subplot(1,2,1);imshow(A);title('原图像'); 

B=imresize(A,10,'nearest');
subplot(1,2,2);imshow(B);title('zoom');





、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
halcon几何变换
read_image (Lena, 'C:/Program Files/MVTec/HALCON-10.0/images/barcode/25industrial/25industrial07.PNG')

*     read_image (Lena, 'F:/image/lena.jpg')  
    get_image_size (Lena, Width, Height)  
*     dev_close_window ()  
*     dev_open_window (0, 0, Width/2, Height/2, 'black', WindowHandle)  
*     set_display_font (WindowHandle, 14, 'mono', 'true', 'false')  
*     dev_display (Lena)  
*     disp_continue_message (WindowHandle, 'black', 'true')  
*     stop ()  



access_channel(Lena, Image, 1)

* read_image(Image,'monkey')
zoom_image_size (Image, ZooImage, Width/8, Width/8, 'nearest_neighbor')

rotate_image(ZooImage, ImageRotate, -90, 'constant')

write_image (ImageRotate, 'png', 0, 'C:/Program Files/MVTec/HALCON-10.0/images/barcode/25industrial/25industrial08.PNG')




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值