How to read a picture or a file into matlab

1. I use the 2015 version of the editor. If the version is different, it will not affect these basic operations. First, choose where you want to create the file. You can click the triangle in the purple source, and the selection will be saved. the address of.

2. After selecting a good place, for example, if I want to create a script in the job directory, select New -> Script

 3. At this time, you come to a new interface. At this time, you press ctrl+s on the keyboard to save, and the following interface will pop up. You can change the name of your script, and then click Save.

 Fourth, place the picture you want to read in matlab where your script is located. The location of your script can be viewed through the interface, which is the location marked by my red box.

5. Now I have dragged in a photo that I am about to operate. The location of the picture corresponds to the address above.

 

6. Now I can write a script in the script function to read my picture. filename

The latter is the name of the image, enclosed in single quotes, and our image can be read through the imshow() function. 

If this article has been read more than 10,000 times, the knowledge about matlab will be continuously updated.

Disclaimer: The articles are all original, please indicate the source for reprinting.

おすすめ

転載: blog.csdn.net/BaoITcore/article/details/123379174