精华内容
下载资源
问答
  • I have segmented results in a folder. Those need to be read in a for loop and processed further in the loop. I tried reading as below:for i=1:10file_name=dir(strcat('C:\Users\adminp\Desktop\dinosaurs\...

    I have segmented results in a folder. Those need to be read in a for loop and processed further in the loop. I tried reading as below:

    for i=1:10

    file_name=dir(strcat('C:\Users\adminp\Desktop\dinosaurs\'));

    im=imread(strcat('C:\Users\adminp\Desktop\dinosaurs\',file_name(i).name));

    %processing of read image

    end

    An error was thrown :??? Error using ==> imread at 370

    Can't open file "C:\Users\adminp\Desktop\dinosaurs\." for reading;

    you may not have read permission.

    Please suggest where I have gone wrong.

    解决方案

    I guess your problem is that:

    file_name(1).name = . % Stands for current directory

    file_name(2).name = .. % Stands for parent directory

    file_name(3).name = your_file_name.jpg

    Now, do:

    images = dir('*JPG')

    for i=1:numel(images)

    file_name=dir(strcat('C:\Users\adminp\Desktop\dinosaurs\'));

    im=imread(strcat('C:\Users\adminp\Desktop\dinosaurs\',images(i).name));

    %processing of read image

    end

    展开全文
  • 显示2行3列为例:subplot(2,3,1);imshow(“1.jpg”);title('first img','fontname','Times New Roman','Color','k','FontSize',12);hold on;subplot(2,3,2);imshow(“2.jpg”);title('secondimg','fontname','...

    以显示2行3列为例:

    subplot(2,3,1);imshow(“1.jpg”);

    title('first img','fontname','Times New Roman','Color','k','FontSize',12);

    hold on;

    subplot(2,3,2);imshow(“2.jpg”);

    title('second img','fontname','Times New Roman','Color','k','FontSize',12);

    hold on;

    subplot(2,3,3);imshow(“3.jpg”);

    title('third img','fontname','Times New Roman','Color','k','FontSize',12);

    hold on;

    subplot(2,3,4);imshow(“4.jpg”);

    title('fourth img','fontname','Times New Roman','Color','k','FontSize',12);

    hold on;

    subplot(2,3,5);imshow(“5.jpg”);

    title('fifth img','fontname','Times New Roman','Color','k','FontSize',12);

    hold on;

    subplot(2,3,6);imshow(“6.jpg”);

    title('sixth img','fontname','Times New Roman','Color','k','FontSize',12);

    hold on;

    展开全文
  • If the only way is to average them after load all the frames into matlab, how should I average over 1000 frames? Thanks. 解决方案 try the following: a=zeros(512); for i=1:1000 a=a+frame(i); end a=a/...

    I am trying to get the average image from 1000 frames.

    Each image is 512 by 512 pixel size.The file I got from the experiments is a tiff unit 16 data.

    the tiff file contains 1000 frames of the same spot.

    I was thinking writing a m file where I read out 1000 frames from the tiff file then average them but it seems will eat up the memory very fast.

    What is the better way to get the average image of these 1000 frames. If the only way is to average them after load all the frames into matlab, how should I average over 1000 frames?

    Thanks.

    解决方案

    try the following:

    a=zeros(512);

    for i=1:1000

    a=a+frame(i);

    end

    a=a/1000;

    a is the average of the frames.

    展开全文
  • Let's say my image is img=zeros(100,100,3), my outputs are several ellipse which i get using a created function [ret]=draw_ellipse(x,y,a,b,angle,color,img), I can display one ellipse using imshow(ret)...

    Let's say my image is img=zeros(100,100,3), my outputs are several ellipse which i get using a created function [ret]=draw_ellipse(x,y,a,b,angle,color,img), I can display one ellipse using imshow(ret).For the moment, I'm trying to show serval ellipse in the image. But i don't know how to code it. will ‘for loop’ work or I need to hold them?

    解决方案

    If this is related to what you were doing in your previous question, then what you need to do is to pass the result of one iteration as input to the next.

    So assuming that the function [ret]=draw_ellipse(x,y,a,b,angle,color,img) you mentioned takes as input an image img and returns the same image with an ellipse drawn on it, you could do this:

    %# ellipses parameters

    %#x = {..}; y = {..};

    %#a = {..}; b = {..};

    %#angle = {..}; color = {..};

    img = zeros(200,100,'uint8'); %# image to start with

    for i=1:10

    img = draw_ellipse(x{i},y{i}, a{i},b{i}, angle{i}, color{i}, img);

    end

    imshow(img)

    展开全文
  • MATLAB GUI显示图片的方法

    万次阅读 多人点赞 2018-11-20 10:54:22
     在MATLAB的命令行中显示图片或者数据,十分简单,仅通过imshow,plot或者imagesc等函数即可。  而在MATLAB GUI中显示图片,通常需要借助Axes控件来实现。相比而言,一些操作。 GUI中显示图片  创建一个空白的...
  • 姓名:边颖超学号:19021210974利用MATLAB读取一张灰度和彩色图像,查看其对应的元素矩阵,将灰度图像与彩色图像显示出来,并获取该图像的高度、宽度等信息,最后将该图像另存为一幅图像。利用imread函数读入灰度...
  • matlab subplot同时显示多幅图像

    万次阅读 2017-10-23 10:52:27
    subplot是MATLAB中的函数。  使用方法:subplot(m,n,p)或者subplot(m n p)。  subplot是将个图画到一个平面上的工具。其中,m表示是排成m行,n表示排成n列,也就是整个figure...在matlab的命令窗口中...
  • matlab在一个figure中显示多幅图像

    万次阅读 2018-09-28 11:20:14
    显示2行3列为例: subplot(2,3,1);imshow(“1.jpg”); title('first img','fontname','Times New Roman','Color','k','FontSize',12); hold on;   subplot(2,3,2);imshow(“2.jpg”); title('second img',...
  • MATLAB科研绘图-同一个图像显示多个函数
  • matlab 显示柱形

    千次阅读 2018-05-02 16:47:23
    matlab 环境下显示柱形,用于比较次试验的结果,其中字体倾斜部分参考了别人的代码。地址:http://blog.csdn.net/susu_love/article/details/53257043[plain] view plain copyclc; clear all; filename...
  • Matlab张图片显示在一个窗口上

    千次阅读 2017-02-09 17:21:55
    load('mnist_uint8.mat');...for i= 1:20 %获取20张图像保存本地 img=reshape(test_x(i,:),[28 28])'; imwrite(img,strcat('D:\3rdlibrary\DeepLearnToolbox-master\data\',num2str(i),'.bmp'));%保存 e
  • close all; clc; ...% 当读取的图片程序文件夹的子文件夹中是需调用此命令 m = 24; % 10个图片文件 P = []; for k = 1:m  P = imread('image.pgm']);  subplot(4,6,k);  imshow(P);
  • %ex2_7.m I=imread('pout.tif');...%不同窗口显示 figure;%创建一个新的窗口 imshow(I); figure; imshow(I,[]); %相同窗口显示 figure; subplot(1,2,1); imshow(I); subplot(1,2,2); imshow(I,[]);
  • 循环矩阵形式对于循环矩阵来说,最amazing的性质如下:对于输入图像来说,其实际是二维的,但公式中对于输入 的定义往往是一个一维列向量。应理解为将图像逐元素由二维拉为一维,得到循环矩阵的第一行,之后再进行...
  • COMSOL Multiphysics 提供了和MATLAB联合仿真的接口 livelink for MATLAB,利用该接口可以实现参数,步骤的批量仿真优化。1COMSOL建立或导入几何模型,设置材料属性,设置好物理场和物理场,选择合适的网格...
  • 为本人原创代码,用matlab实现张图片同时三维空间中显示,有例程,代码可直接运行。
  • Matlab图里面的列legend显示

    千次阅读 2019-07-24 17:40:13
    Matlab图里面的列legend显示 写文章的时候发现里面的数据项太,使用单行的legend会遮住部分数据,legend字调小了又看不太清,就用了下legend这个property。 在Matlab 2018里面的help文档里面搜下Legend ...
  • 该例子来源于matlab官网 This is an example of how to display ...有关同一图像窗口显示多幅图片的例子。 Read about the image function in the MATLAB documentation. 请阅读matlab参考文档中中
  • 具体过程是:文件夹中读取任意副图片,一个坐标轴上显示 因为读取图片的数量不确定,设置个坐标轴不可行,所以想知道怎么能一个坐标轴显示。 初学者懵逼,求大佬解答。
  • matlab个m文件的图形同一个小窗口上显示的前提是坐标系相同,下面就做简单的介绍: 1、新建一个huatu1.m文件,三角函数为例,程序如下: x=0:1:360; y=sind(x); plot(x,y); 2、新建一个huatu2.m文件,...
  • Matlab GUI axes显示多幅图像

    千次阅读 2012-06-12 15:23:00
    显示图像的控件为axes 假设x1、x2为通过imread读入的图像 第一种方法 ...这两条语句就可以界面Tag分别为axes1和axes2的界面中显示出这两幅图像 第二种方法 axes(handles.axes1); %#ok im...
  • 本示例说明如何通过更改显示图像的...使用固有坐标系显示图像,并ax中返回图像的属性。打开轴以显示坐标系。 figure ax = imshow(I); title('Image Displayed with Intrinsic Coordinates') axis on检查x和y...
  • 在Matlab中同时显示多幅图像的例子

    万次阅读 2010-04-06 10:56:00
    % Demo for display 4 images in one figure window ;% by SimonYUMing , Apr. , 5,2010% Read two images from the current directory ,for example dowel01.jpg and% dowl02.jpg which all are color images;...
  • 一元二次方程 % 求解 ax2+bx+c=0 2次方程有两个个解 syms a b c x; [x] = solve(a*x^2+b*x+c==0,x,'Real',false) syms x [x] = solve(x^2+x+1==0,x,'Real',false) %false 求复数解 true 求实数解 ...
  • 1、matlab中如何一个显示多个图像,例如同时显示2*2个图像,则需使用subplot(m,n,p)命令,其中m和n表示m行n列,p表示第几个图像例:一个上显示函数 y = exp(-0.5*x)*sin(20*x)y = exp(-1.2*x)*sin(20*x)y...
  •  在matlab中,我们常使用imshow,我们会发现显示的是一个白色的图像。这是因为imshow()显示图像时对double型是认为0~1范围内,即大于1时都是显示为白色,而imshow显示uint8型时是0~255范围。而经过运算的范围0-...
  • 因为本学期需要c#的课程设计,然后我就网上自学习了一些这方面的知识,比如c#调用matlab函数的例子,网上也比较。但是基本都是零零碎碎的。我也是网上零零碎碎找的,所以我算是整理了一下。整个文章都是自己...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 519
精华内容 207
关键字:

matlab在显示多图

matlab 订阅