How to have MATLAB provide picture output from a typed sentence
1 回表示 (過去 30 日間)
古いコメントを表示
Hello all,
I would like to create a program which will provide me with pictures based on a sentence/word/phrase that I type in before running the code. If I have a data set of sign language/hand gesture images, how can I create a code to display pictures to interpret the words/letters that I type into the code?
Thank you.
1 件のコメント
Rik
2022 年 6 月 13 日
If you are fine with a 'dumb' system, you could create a lookup table that matches phrases and loads the corresponding image.
回答 (2 件)
Pratheek
2023 年 9 月 22 日
編集済み: Pratheek
2023 年 9 月 22 日
Hello Denise,
I understand you want to create a program in MATLAB that displays pictures based on a sentence/word/phrase you type in, using a dataset of sign language/hand gesture images, you can follow these steps:
- Load the dataset: Write code to load the dataset into your MATLAB program. This involves reading the images and their corresponding labels or filenames. You can use functions like imread to read the images and store them in an appropriate data structure, such as a cell array or structure array.
- Input the word/phrase: Use the input function to prompt the user to enter the word/phrase they want to interpret. Store the input in a variable.
- Find the corresponding image(s): Search your dataset for images that match the input word/phrase. You can iterate through the dataset and compare the labels or filenames with the input. Store the matching images in a separate data structure, such as a cell array or structure array.
- Display the image(s): Use the imshow function to display the image(s) that correspond to the input word/phrase. You can loop through the matching images and display them one by one using a loop. Alternatively, you can randomly select an image from the matching set to display.
Hope this will help you!
0 件のコメント
Image Analyst
2023 年 9 月 22 日
Use a dictionary to find the image file name corresponding to the word. For example the word "speak" might correspond to the "speak.png" image file. Then use imread to read that image, and imshow to display it.
help dictionary
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!