How can I request the filename of a colour image file from the user in Matlab code???

2 次查看(过去 30 天)
How to use matlab code to request the user to add a color image to my current and then load it as a data?? please help

采纳的回答

Tobias
Tobias 2013-4-2
function imageInput(imagename)
image = load(imagename)
After this, you can do whatever you want to do with the image. Remember that you have to name your function file the same name as your function.
  3 个评论
WEI JI LIN
WEI JI LIN 2013-4-2
on the other hand ,I have to add a color image wherever it located to become as my current data? What the code in Function file?? Thank you
Tobias
Tobias 2013-4-2
I have only tried the said procedure a few times, as I am quite the novice when it comes to Matlab. However, I would pressume the image have to be located in your current matlab directory (same goes for your function and the file in which you use said function. Your data processing should be done in a separate document different from your function.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by