how to create a mat file

1 回表示 (過去 30 日間)
Elysi Cochin
Elysi Cochin 2012 年 11 月 30 日
編集済み: Walter Roberson 2016 年 4 月 5 日
can we enter images, characters and numbers in one matfile??... if yes can u please show how to create a matfile for the below data
1 image1.jpg, 1.23, 5.26, fruit
2 image2.jpg, 4.56, 7.25, vegetable
3 image3.jpg, 1.34, 6.77, fruit
4 image4.jpg, 1.96, 6.88, fruit
5 image5.jpg, 7.23, 2.33, vegetable
and so on...
image1.jpg... are the names of the images... next two column values are features extracted... and the last column is the text what that image is....
after creating this matfile when i select image2.jpg using imread i wanted it to get displayed that "it is a fruit"....
please do reply....
  1 件のコメント
Sara Hafeez
Sara Hafeez 2012 年 11 月 30 日
save and then load.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2012 年 11 月 30 日
When the user selects an image file, you need to do feature extraction on that image file in the same way as it was done on the sample images, and then you need to match the features to those stored to find the closest match.
The questions then become (1) how much weight to give to the distance between the test features and the ideal features; and (2) how far away from the ideal features should be allowed before the program says "I don't know".
Unless, that is, the intention is to be able to input images of fruits or vegetables that the program was not given specific information about, and the program is required to estimate whether "fruit" or "vegetable" is more likely ?

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 11 月 30 日
編集済み: Azzi Abdelmalek 2012 年 11 月 30 日
Im1=imread('image1.jpg');
Im2=imread('image1.jpg');
save filename Im1 Im2
%to call your images
load filename
imshow(Im1)
imshow(Im2)
  4 件のコメント
Elysi Cochin
Elysi Cochin 2012 年 11 月 30 日
sir then how to get the text "fruit" or "vegetable" when after selecting an image using imread... please reply sir...
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 11 月 30 日
Suppose you want image1
text{1} % for image1
text{2} % for image2
Elys maybe you should read some basis matlab programming

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by