由买买提看人间百态

topics

全部话题 - 话题: imagesc
1 (共1页)
g**k
发帖数: 236
1
【 以下文字转载自 EE 讨论区 】
发信人: gonk (gonk), 信区: EE
标 题: GUI里打开.fig文件用imagesc显示图像
发信站: BBS 未名空间站 (Fri Dec 12 12:17:19 2008)
不知道发哪个版,这里各方面的人多,就发这里啦。我之前没接触过Matlab里的GUI,最
近要处理图像,老板推荐用GUI这样用起来方便。可我一点都不懂,基本的tutorial看
了还是找不到解决我问题的头绪。我的问题是这样的,
不用GUI的话,我有一组数据A,用imagesc(xx,yy,A,[t1 t2])生成图像。要得到满意的
结果我得手动变不同的t1 t2值来找。。。
如果我把图像存成a.fig,如何在GUI里打开已经存在的a.fig文件?这个我试了半天都是
出错。哪位高手帮忙点拨一下?:( 还有我最后用两个slider变换t1,t2,问题是怎么在
GUI里运用imagesc?是handel.fig.imagesc还是什么?最近看这方面的东西绕晕了。~~~
><~~~
问的问题比较初级。希望好心的高手们赐教!谢谢啦~~~
a******7
发帖数: 11
2
来自主题: Computation版 - matlab imagesc colorscale, ask for help
问下:
想用imagesc把matrix 画出来,但是imagesc的colorscale range > 0,
用 imagesc(matrix, [-1.0,1.0]),画的正负值一个颜色,怎么办?
应该是个菜问题,但就是不会
谢指教!
g**k
发帖数: 236
3
不知道发哪个版,这里各方面的人多,就发这里啦。我之前没接触过Matlab里的GUI,最
近要处理图像,老板推荐用GUI这样用起来方便。可我一点都不懂,基本的tutorial看
了还是找不到解决我问题的头绪。我的问题是这样的,
不用GUI的话,我有一组数据A,用imagesc(xx,yy,A,[t1 t2])生成图像。要得到满意的
结果我得手动变不同的t1 t2值来找。。。
如果我把图像存成a.fig,如何在GUI里打开已经存在的a.fig文件?这个我试了半天都是
出错。哪位高手帮忙点拨一下?:( 还有我最后用两个slider变换t1,t2,问题是怎么在
GUI里运用imagesc?是handel.fig.imagesc还是什么?最近看这方面的东西绕晕了。~~~
><~~~
问的问题比较初级。希望好心的高手们赐教!谢谢啦~~~
d*******2
发帖数: 340
4
用如下代码,画出的图几乎占据整个屏幕,但是图的下面仍然空出相当于菜单高度的空
间。请问怎么能把下面的一点空间去掉呢?
先谢了!
newgprime=zeros(100);
fh = figure(); % Figure clockface named "scotts clock"
imagesc(newgprime);
axis off
set(fh,'position',[1 1 1440 900]);
set(fh,'MenuBar','none');
set(gca,'position',[0 0 1 1])
c*u
发帖数: 916
5
图像一般不存成.fig的。image object直接上级是Axes.你可以把那个Axes里面用
得上的object和property,比如CData, XLim, YLim etc 存下来就可以了.
Fig的上级是Root,一般Guide生成的GUI就是一个Fig,你在Fig里面读取另外一个
Fig,那么就不再在那个原Fig里面了.多Fig的GUI不适合初学者编程。
所以你要做得很简单,比如你的GUI里面有一个Axes1
axes(handles.axes1)
handles.hImage = imagesc(...);
。。。
function handles.slider_1_Callback(hObject, eventdata, handles)
t1 = get(hObject, 'Value');
CLim = get(handles.axes1, 'CLim')
set(handles.axes1, 'CLim', [t1, CLim(2)]);
end
function handles.slider_2_Callback(hObject, eventdata, han
k*******5
发帖数: 387
6
就是在一个figure中显示多个图像,图像布满整个窗口,图像间只有几pixel的间隔,
我现在只能用imshow把图像显示出来,但imagesc不行,即使程序中我用imagesc,
但是实际显示的结果还是按imshow显示的,而如果我不自己设定figure的位置,高度,
宽度,直接用默认值则用subplot可以显示出imagesc后的结果,这个怎么回事那?请大
牛指点指点,十分感谢!
t******q
发帖数: 117
7
来自主题: _Graphics版 - [转载] Matlab question
try these image display function.
maybe the imagesc works.
good luck.
Image display
colorbar Display colorbar (MATLAB Toolbox)
getimage Get image data from axes
image Create and display image object (MATLAB Toolbox)
imagesc Scale data and display as image (MATLAB Toolbox)
immovie Make movie from multiframe image
imshow Display image
montage Display multiple image frames as rectangular montage
movie Play recorded movie frames
subimage Display multiple images in single figure
truesize Ad
k*****r
发帖数: 21039
8
[img, map]=imread("test.bmp");
figure(1);imagesc(img);colormap(map);axis image; axis off;
print('-depsc2', "test.eps");
close(1);
x**h
发帖数: 173
9
来自主题: Faculty版 - How to make 3d plots in Matlab?
I have some image data of a mouse brain. The data consist of 256 slices and
each slice is a 256*256 grid. I can use imagesc to plot one slice at a time.
Could anyone tell me how to plot all slices simultaneously in the 3d space?
Any input will be appreciated.
b*******t
发帖数: 33714
10
imagesc(log(abs(fftshift(fft2(fftshift(image))))))
compares spatial frequency components in the two images.
真要比的话找张lens chart来拍照
x*******n
发帖数: 185
11
来自主题: Programming版 - 请教 一个matlab画图的问题
use interp2 to interpolate
and then use imagesc(x,y,mat)
d*****l
发帖数: 8441
12
1. 先用uicontrol(...)定义一个button元件,并为该button定义一个事件处理函数。
2. 再在该事件处理函数中用
[fname,pname] = uigetfile('*.*','Enter data file');
d*****l
发帖数: 8441
13
同样,用鼠标点取某个像素点的值,似乎也可以定义事件函数来做。需要坐标点转换。
d*****l
发帖数: 8441
14
另外,如果你需要update图像的话,可能需要双缓存,否则太慢。
m******t
发帖数: 164
15
来自主题: Computation版 - 如何在Matlab中在image上叠加contours?
谢谢如此详细的解释。
可是,琢磨半天,仍不得要领:如何改z值?
我要做的是:
1) imagesc(x,y,my 2D image array);
然后有一个同样大小的2D的数值array对应于上面的image。
我用如下操作:
2)hold on;
contour(x,y,my 2D value array);
然后得到的figure只显示contours,image被覆盖了。用plot browser
可以看到两个objects。关掉任何一个可以看到另一个。可是就是不能同时
显示。
怎么办?

代表
j**u
发帖数: 6059
16
来自主题: Computation版 - 怎么用matlab画出这张图
imagesc?
j**u
发帖数: 6059
17
来自主题: Computation版 - 问个matlab问题,50伪币酬谢
有一个二位矩阵,用imagesc和colormap(jet)可以显示一个彩色的图像IM1,如果选择c
olormap(gray)就生成黑白图像IM2。现在想只在一个选的区域里面(ROI)里面保留IM1
,其他的区域里面都是IM2,请问如果在matlab里面做到?
j**u
发帖数: 6059
18
来自主题: Computation版 - 问个matlab问题,50伪币酬谢
I agree you can't have two colormaps in one plot. I have one idea that
generate a pseudo-gray image to show gray-scale image. I only know how to
highlight a ROI with a solid co
lor. For example,
ROI is a logic matrix consisting 0's and 1's
im_r = im.*ROI.*3 ; % 3 can be any number much larger than 1
im_rgb = cat(3, im_r, im, im) ;
imagesc(im_rgb) % this will show a pseudo-gray scale image with ROI highligh
ted with red color
Now my question is how to pot ROI just like using a colormap(jet), not
j**u
发帖数: 6059
19
来自主题: Computation版 - 问个matlab问题,50伪币酬谢
My question can be expressed in another way. When imagesc(im) is used, a 3D
rgb matrix may be generated to plot a color image. How to get this 3D matrix
? I was thinking of setting up a color mapping table to generate it by mysel
f, but it is tedious. Is there any easier way?

highligh
sol
a******7
发帖数: 11
20
来自主题: Computation版 - matlab imagesc colorscale, ask for help
刚求证了,the expression below is correct.
do not bother any more.
thanks
j**u
发帖数: 6059
21
来自主题: Computation版 - matlab画点问题
imagesc
d*******2
发帖数: 340
22
一个255灰度的黑白bmp文件,用
a=imread('file.bmp');
subplot(2,2,1)
imagesc(a)
print -deps2 file.eps
为什么产生的eps文件和bmp文件看起来大不一样? 哪位前辈知道?先谢了!
d*******2
发帖数: 340
23
来自主题: Computation版 - 请教一个关于图形position的问题
a=rand(1000,2000);
b=figure(1);
imagesc(a)
set(b,'position',[1 1 1080 900]);
逐渐增大最后一行position中的图形高度值(900),如1000,1200,1400,1600 ... 按理
图形的左下角应该不动,图形向上拉伸,但实际情况是图形的左下角向上移动,当图形
高度值增大到1900,图形消失在屏幕的上方。请问这是怎么回事?先谢了!
x**h
发帖数: 173
24
来自主题: Computation版 - How to make 3d plots in Matlab?
I have some image data of a mouse brain. The data consist of 256 slices and
each slice is a 256*256 grid. I can use imagesc to plot one slice at a time.
Could anyone tell me how to plot all slices simultaneously in the 3d space?
Any input will be appreciated.
j**u
发帖数: 6059
25
【 以下文字转载自 Computation 讨论区 】
发信人: jzxu (自然), 信区: Computation
标 题: 问个matlab问题,50伪币酬谢
发信站: BBS 未名空间站 (Fri Mar 14 22:53:28 2008), 转信
有一个二位矩阵,用imagesc和colormap(jet)可以显示一个彩色的图像IM1,如果选择c
olormap(gray)就生成黑白图像IM2。现在想只在一个选的区域里面(ROI)里面保留IM1
,其他的区域里面都是IM2,请问如果在matlab里面做到?
j**u
发帖数: 6059
26
I have one idea that generates a pseudo-gray image to a show gray-scale
image.
I only know how to highlight a ROI with a solid color. For example,
ROI is a logic matrix consisting 0's and 1's
im_r = im.*ROI.*3 ; % 3 can be any number much larger than 1
im_rgb = cat(3, im_r, im, im) ;
imagesc(im_rgb) % this will show a pseudo-gray scale image with ROI highligh
ted with red color
Now my question is how to pot ROI just like using a colormap(jet), not a sol
id color shown above.
j**u
发帖数: 6059
27
My question can be expressed in another way. When imagesc(im) is used, a 3D
rgb matrix may be generated to plot a color image. How to get this 3D matrix
? I was thinking of setting up a color mapping table to generate it by mysel
f, but it is tedious. Is there any easier way?

highligh
sol
g**k
发帖数: 236
28
谢谢回答!我Matlab只会用几个简单的东西,你说的这几个命令我好好琢磨一下。
1 (共1页)