Image 在matlab程序中是否有imread命令的替代方法来减少延迟?

Image 在matlab程序中是否有imread命令的替代方法来减少延迟?,image,matlab,image-processing,dot-product,Image,Matlab,Image Processing,Dot Product,我在路径G:\newdatabase\中有2900个图像,读取图像花费的时间太长。对于dot product,它也花费了太多时间 问题: 1.imread命令是否有其他方法可以提高性能 2.对于dot命令,是否有提高性能的替代方案 我尝试过的源代码: srcFiles = dir('G:\newdatabase\*.jpg'); % the folder in which ur images exists for b = 1 : length(srcFiles) f

我在路径G:\newdatabase\中有2900个图像,读取图像花费的时间太长。对于dot product,它也花费了太多时间

问题:

1.imread命令是否有其他方法可以提高性能

2.对于dot命令,是否有提高性能的替代方案

我尝试过的源代码:

  srcFiles = dir('G:\newdatabase\*.jpg');  % the folder in which ur images exists
    for b = 1 : length(srcFiles)
        filename = strcat('G:\newdatabase\',srcFiles(b).name);
        Imgdata = imread(filename);
我尝试过的源代码:

for i = 1:aa
    pare = dot(NormImage,u(:,i));
    p = [p; pare];
end

对于2-
pare=sum(bsxfun(@times,normage,u))”
。对于1-不要认为有任何替代imread的方法,但是可以将它们脱机保存为单个mat文件,以便在运行代码之前存储所有这些图像文件,然后在运行代码时仅加载单个mat文件?要更快地读取图像,需要多线程。使用parfor/parallel computing工具箱或使用线程在Java中实现它。如果您经常需要这样做,那么将
imread
的结果存储在mat文件中并使用这些文件可能会有所帮助-这些文件通常加载得更快。