Is it possible to pass an image as an input to a function in Matlab?

9 ビュー (過去 30 日間)
Febin Benjamin
Febin Benjamin 2013 年 7 月 13 日
編集済み: Stephen23 2015 年 3 月 5 日
Actually m writing a module which will accept the image and the filter matrix as an input and show the filtered image as output. So is it possible to write a code based on this logic or should I change my logical perception?

採用された回答

Dishant Arora
Dishant Arora 2013 年 7 月 13 日
An image is nothing but a matrix, so you can pass it like any other variable.
I=imread('YourImage');
yourFunction(I)
  2 件のコメント
madiha
madiha 2015 年 3 月 5 日
Can we call a function with multiple images at once? if so. how?
Stephen23
Stephen23 2015 年 3 月 5 日
編集済み: Stephen23 2015 年 3 月 5 日
Write your function to have multiple inputs:
I = imread('YourImage');
J = imread('AnotherImage');
yourFunction(I,J)
And read the documentation:

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by