Open In App

Automatically Maximize a Image in MATLAB

Last Updated : 14 Nov, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

MATLAB is a high-performance language that is used for matrix manipulation, performing technical computations, graph plottings, etc. It stands for Matrix Laboratory. With the help of this software, we can maximize automatically an image to have better details of the picture. It is done by running a figure command which sets the normalized units and also sets the border of the image to the bottom left and top right of the screen.

Syntax:

figure(‘units’,’normalized’,

‘outerposition’,[0 0 1 1]), 

imshow(‘image_name.png’)

Example 1:

Matlab




% MATLAB code for automatically maximize a image 
% showing original image
imshow("image1.png"), title("Original");
  
% Maximizing the image
figure('units','normalized','outerposition',
[0 0 1 1]), imshow('image1.png'), title('Maximized Image');


Output:

Original Image:

 

Maximized Image:

 

Explanation:

  1. units normalized -> Normalized units are a type of unit used in graph plotting. 
  2. outer position -> defining boundaries of the image.
  3. [0 0 1 1] -> boundaries start from the bottom left (0 0) and go to the top right(1 1).
  4. imshow -> shows the image.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads