MATLAB: Moving the image (move function)

Source: Internet
Author: User

Image movement involves the move function, which is implemented as follows:

Close all;                  % close all current graphics windows, empty workspace variable, clear workspace all variables clear all;clc;i=imread (' lenna.bmp '); % input image a=50;b=50;% set translation coordinates j1=move (i,a,b);% Move original image a=-50;b=50;% set translation coordinates j2=move (i,a,b);% Move original image a=50;b=-50;% set translation coordinates j3=move (I, b);% move original image a=-50;b=-50;% set translation coordinate J4=move (i,a,b);% Move original image set (0, ' defaultfigureposition ', [100,100,1000,500]);% Modify the default settings for the location of the graphic image set (0, ' Defaultfigurecolor ', [1 1 1])% modify the setting of the background color of the graphic Figure,subplot (1,2,1), Imshow (J1), Axis on;% After drawing the Moving Image subplot (1,2,2), Imshow (J2), Axis on;% draw the Moving Image Figure,subplot (1,2,1), Imshow (J3), Axis on;% draw the Moving Image subplot (1,2,2) , Imshow (J4), Axis on;% draw the post-move image

As follows:

MATLAB: Moving the image (move function)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.