How to fix error:Error using imread>get_full_filename (line 570) File "i,m" does not exist?

14 ビュー (過去 30 日間)
yasmin ismail
yasmin ismail 2023 年 10 月 11 日
コメント済み: yasmin ismail 2023 年 10 月 20 日
I used pixel label from image labeler App.There is a menu 'Export Labels > To File' in the Image Labeler App and it generates a new folder called <PixelLabelData> containing PNG label files. Then I opened the file which created called PixelLabeData and I found the labeled image is totally black(label_1.png) I apllied the followig code to display it :
figure;
[i, m] = imread('Label_1.png');
imshow(i,m)
Then, I applied jaccrad index:
A = logical(imread('7001-236.png'));
BW_groundTruth =logical(imread('i,m'));
similarity = jaccard(squeeze(A(:,:,1)), BW_groundTruth)
I got the following error:
Error using imread>get_full_filename (line 570)
File "i,m" does not exist.
Error in imread (line 377)
fullname = get_full_filename(filename);
Error in Untitled_ask (line 8)
BW_groundTruth =logical(imread('i,m'));
  12 件のコメント
Mathieu NOE
Mathieu NOE 2023 年 10 月 20 日
tx but I don't have the Image Processing Tbx , so I probably will never use the native jaccard function . is there a Fex alternative ? I haven't seen one for the time being
yasmin ismail
yasmin ismail 2023 年 10 月 20 日
@Mathieu NOE there is another method to measure similarity like (ssim) ,but the common is jaccrad(IoU) index

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

回答 (1 件)

Torsten
Torsten 2023 年 10 月 11 日
移動済み: Torsten 2023 年 10 月 11 日
BW_groundTruth =logical(i);
instead of
BW_groundTruth =logical(imread('i,m'));
  2 件のコメント
yasmin ismail
yasmin ismail 2023 年 10 月 11 日
@Torsten the result is strange=.09 it seems the function read again the black image (Label_1.png),
if you use imshow(i,m) (I have atached it with name i.png) you will see the labled pixel wich very similar to image 7001-236.png, that mean it should give higher similarity. How to fix it?
Walter Roberson
Walter Roberson 2023 年 10 月 11 日
imshow(i,m) is a request to display the content of the variable i using m as a scaling range if m is a vector of length 2, or using m as a colormap. Unless, that is, i is a character vector or string scalar in which case i holds the name of a file to read and display.

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

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by