difference between "imread" and "load" an image
9 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm a new user to matlab image processing toolbox. I also work on Wavelet toolbox and I noticed that: in the image toolbox "imread" is used more often and in wavelet toolbox "load" is used rather than "imread".
so I would like to know the difference between the both commands and when to use each.
thank you in advance.
0 个评论
采纳的回答
David Young
2011-9-1
Images can be saved as files on disk in a variety of formats. The formats are often known by their filename extensions, such as .jpg.
Many of these formats can be read and written by a variety of programs, and are not specific to MATLAB. These include .jpg, .bmp, .tiff, .dicom and many other file types. To read such files you use imread (and to write them you use imwrite). The documentation tells you what file formats imread can deal with.
One format is specific to MATLAB: this is the .mat format. This can be used to save any kind of data, including arrays that represent images. To read .mat files you use load (and to write them you use save).
For further information, you will find the table in "Supported File Formats" helpful.
If you simply have a file you need to read, your choice of load or imread is simple: it just depends on the given file's format. However, if you want to create image files and read them later, it's more complex. In this case you need to choose a format, and this will depend on whether you want the image to be readable by other programs, whether you want to compress the image, what other information you want to store with the image, and maybe other factors.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!