imfinfo doesnt work in R2022b, it's bugged
조회 수: 32(최근 30일)
Hello! I am using imfinfo to matlab version R2022b and i get this error:
Failed to create file modification time character vector.
The same function works perfectly in version R2019a.
How can i fix it in version R2022b?
My command is:
x = imfinfo('my_file.tif');
Thanks in Advance
Steven Lord 2022년 11월 22일
Since you said imfinfo works for other files but not this one, I'm wondering if the file has somehow been corrupted or if it was written in a non-standard way that imfinfo was lenient enough to allow in the past but is strict enough now (through bug fixes or updates) that it no longer accepts the non-standard file.
First let's check to see if this problem is specific to the .tif file processing code. MATLAB includes one .tif file as part of one of the demos, example.tif. Let's see if imfinfo works on that file. What do you see when you run these lines of code?
name = fullfile(matlabroot, 'toolbox', 'matlab', 'demos', 'example.tif');
S = imfinfo(name);
If that works, then let's see if some other software recognizes this file. What operating system are you using? If you're using Windows, right-click on your my_file.tif in File Explorer and select Properties. In the Properties window for your file, select the Details tab and scroll down to the end of the list, the section with the heading File. What do you see for the "Date created" and "Date modified" entries?
If you see the correct or reasonable data in the Windows properties for the file, let's try one more step. Call imfinfo on your file and let it error. Then run this command and show us what it displays. This will let us see the stack of the error and check whether you've overloaded (or downloaded an overload for) a function upon which imfinfo depends that's preventing it from operating correctly.
ex = MException.last;
result = struct2table(ex.stack)