Understanding of Matlab (image processing)

2 visualizaciones (últimos 30 días)
Adela
Adela el 20 de Sept. de 2012
Hi. Currently i am doing a proj of image processing. i was told to create a funtion-m file with the function,arguements to display any image etc. but i do not know what are the input and output arguments i should put to display my image? I have tried studying/viewing from lots of videos to understand it but almost all explanation in arguments uses 'points'. I should plot my image first to do the function part? I am really confused, i hope any of you can give a simple explanation for me[ using codes etc ] to let me understand better. [ new to matlab ] thank you very much.

Respuesta aceptada

Sabarinathan Vadivelu
Sabarinathan Vadivelu el 20 de Sept. de 2012
There is an advantage in MATLAB that when a function is created, it can be used as a command in another file. say for example,
%Type this in one file
A=imread('input.jpg'); % Reads input Image
B = imagedisplay(A); % Call the function image display
% Here A, input argument, B output argument
figure, imshow(B);
-------------------------------------------------
%Type this in other file
function [output_img] = imagedisplay(input_img)
output_img = rgb2gray(input_img);
--------------------------------------------------
This function returns an image called ' output_img' and that is displayed in the main program.
  16 comentarios
Adela
Adela el 21 de Sept. de 2012
so i'll have to plot my image?
Image Analyst
Image Analyst el 21 de Sept. de 2012
Are you playing with me? Don't you recall that you asked " where do i call to display the image"? Scroll up if you don't. So why do you ask " so i'll have to plot my image?"
And I never said "plot" your image, I said display it with imshow(). But I don't care one way or another what you do with your images - if you display them or not. That's your decision.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by