필터 지우기
필터 지우기

Load Images In MatLab HANGMAN game??

조회 수: 1 (최근 30일)
Reni Llupa
Reni Llupa 2018년 2월 14일
답변: Arun Mathamkode 2018년 2월 22일
I have a game a group and I created. The current program uses a preloaded image of 'peppers' with the imdemos function. I want to use a .png (linked below) image instead of that. For example if you run the program the image will not be peppers it will be the Drexel image (og-drexel-logo.png). I will link the code and the picture I need to replace. Thanks in advance.

답변 (1개)

Arun Mathamkode
Arun Mathamkode 2018년 2월 22일
You can use the imread function to read the image and assign it to the myflower variable directly.
myflower=imread('og-drexel-logo.png');
Please make sure that the Drexel logo image is available in the current folder. You can remove the code from line 42 to 46 and add the above line of code instead.

카테고리

Help CenterFile Exchange에서 Strategy & Logic에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by