How to load standard image Lena?

조회 수: 380 (최근 30일)
SL
SL 2016년 10월 16일
댓글: DGM 2024년 3월 23일
I tried the following unsuccessfully but also the names `lenna512.bmp`, `lena512.png`, `lenna512.png`, `lena.png`, `lenna.png`, `lenna.bmp`
I=imread('lena512.bmp');
I know there are third-party images for the source but I would like to use the standard Matlab Lena.
Matalb: 2016b OS: Debian 8.5 64 bit Linux kernel: 4.6 backports Hardware: Asus Zenbook UX303UA

답변 (2개)

Image Analyst
Image Analyst 2016년 10월 16일
편집: Image Analyst 2016년 10월 16일
The image was originally scanned by Alexander Sawchuk at the University of Southern California. I had the pleasure of meeting him at USC once! You can find the "original" on his web page by drilling down into links on this page: http://www.cs.cmu.edu/~chuck/lennapg/
  댓글 수: 2
SL
SL 2016년 10월 16일
편집: SL 2016년 10월 16일
Do you propose that Matlab has no rights to include the image directly in their software? It would be so great that the standard image was built in to avoid any wrong versions of the image. - - Can you propose any standard method about how to put the image to your matlab path? Etc to access by lena.png.
Image Analyst
Image Analyst 2016년 10월 16일
Who knows what the standard image is. It's been floating around for 40+ years and people might have changed it. I think the original one I gave you the link for is the best. Anyone using something different from that one would have to defend why they're using a modified image rather than the original. You're safest using the original.
Playboy still asserts ownership of the image as far as I know. However, use of the image is reportedly "overlooked" and by implication permitted by Playboy in scientific and education contexts, as web searches will reveal.

댓글을 달려면 로그인하십시오.


Harikrishnan
Harikrishnan 2023년 1월 31일
I=imread('lena512.bmp');
Error using imread>get_full_filename
File "lena512.bmp" does not exist.

Error in imread (line 372)
fullname = get_full_filename(filename);
figure,
imshow(I);
  댓글 수: 3
Image Analyst
Image Analyst 2023년 1월 31일
rgbImage = imread('Lena512.bmp');
imshow(rgbImage);
It works, however if you do it from the Answers edit box, the capitalization of the filename must match exactly.
DGM
DGM 2024년 3월 23일
To be clear, it doesn't matter where you do it from, MATLAB does not come with any Lena demo images. You have to go get one somewhere. There are lots of them. Whatever file you provide must be referenced using the correct spelling and capitalization, since filenames are case sensitive.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Sequences and Batch Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by