Here is what the code looks like in MATLAB:

AA = cell( size(trimcoorddir,1), 1 );

figpathdir2 = dir( strrep( figpath2, '\', filesep ) );
fignames2 = {figpathdir2.name};

for i = 1:length(trimcoorddir);

    if all( strcmp( fignames2, trimcoord{i}.filename ) == 0 );
        A = imread( strrep( [figpath, '\', trimcoord{i}.filename], '\', 
filesep ) );
        AA{i} = rgb2gray( A );
        AA{i} = 255 - medfilt2( AA{i}, [25 25] ) + AA{i};  %Time Consuming!
        AA{i} = imadjust( AA{i}, [0.96 1], [0 1], 1.0 );
        
        imwrite( AA{i}, strrep( [figpath2, '\', trimcoord{i}.filename], 
'\', filesep ) );
    else
        AA{i} = imread( strrep( [figpath2, '\', trimcoord{i}.filename], 
'\', filesep ) ); 
    end

end


On Wednesday, September 7, 2016 at 7:24:14 PM UTC-7, Uwe Fechner wrote:
>
> Could you post code, that reproduces the problem? 
>
> On Thursday, September 8, 2016 at 1:28:00 AM UTC+2, Drew Mahedy wrote:
>>
>> I'm just wondering if there is a way to load several RGB .jpg images into 
>> a 4-D array like can be done in MATLAB using cell array. I have the Images 
>> package installed but concatenating 2 images in the 3rd or 4th dimension 
>> says that 'only two-dimensional images are supported in assert2d' when I 
>> try.
>>
>

Reply via email to