imshow() displays a white image for a grey image
Matlab expects images of type double to be in the 0..1 range and images that are uint8 in the 0..255 range. You can convert the range yourself (but change values in the process), do an explicit cast (and potentially loose precision) or instruct Matlab to use the minimum and maximum value found in the image matrix as the white and black value to scale to when visualising.
See the following example with an uint8 image present in Matlab:
im = imread('moon.tif');
figure; imshow(im);
figure; imshow(double(im));
figure; imshow(double(im), []);
figure; imshow(im2double(im));
use imshow(uint8(image)); on the image before displaying it.
imshow() displays a white image for a grey image的更多相关文章
- MATLAB中imshow()和image()
MATLAB中imshow()和image(): IMSHOW Display image in Handle Graphics figure. IMSHOW(I) displays the gray ...
- imshow(A,[])和imshow(A)的区别
imshow的用法: IMSHOW Display image. IMSHOW(I,N) displays the intensity image I with N discrete levels o ...
- OpenCV学习笔记——imread、imwrite以及imshow
1.imread Loads an image from a file. 从文件中读取图像. C++: Mat imread(const string& filename, int flags ...
- Ubuntu14 搭载vim环境查看源码
首先是下载完整的vim74,然后编译安装.遗憾的是当编译时,没有开启图形界面. 在安装新版本的Vim之前,你需要卸载原来安装的老版本Vim,依次在终端下执行下列命令: sudo apt-get rem ...
- 【转】手把手教你把Vim改装成一个IDE编程环境(图文)
手把手教你把Vim改装成一个IDE编程环境(图文) By: 吴垠 Date: 2007-09-07 Version: 0.5 Email: lazy.fox.wu#gmail.com Homepage ...
- javascript实现的图数据结构的广度优先 搜索(Breadth-First Search,BFS)和深度优先搜索(Depth-First Search,DFS)
最后一例,搞得快.三天之内走了一次.. 下一步,面象对像的javascript编程. function Dictionary(){ var items = {}; this.has = functio ...
- vim配置及插件安装管理(超级详细)
1 写在前面 Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Linux牛人, 黑客之类的也都不用IDE. 但是对我等从Windows平台转移过来的Coder来说, 一个好用 ...
- vim配置及插件安装管理(超级详细)[转]
1 写在前面 Linux下编程一直被诟病的一点是: 没有一个好用的IDE, 但是听说Linux牛人, 黑客之类的也都不用IDE. 但是对我等从Windows平台转移过来的Coder来说, 一个好用 ...
- vim 高级使用技巧
前言:逃离windows有很长时间了,特别是当今android盛行的时代,我们没有理由不选择ubuntu作为编译开发android之首选.其实操作系统只是我们使用的一个工具, windows也好lin ...
随机推荐
- BlackBerry 9900刷机
1.安装BlackBerry Desktop Software: 2.安装ROM,双击9900Asia_PBr7.1.0_rel2807_PL5.1.0.692_A7.1.0.1033_China_M ...
- 手机升级到iOS10,用Xcode7.3进行真机调试方法
今天发布的正式版的iOS10,手机果断升级了,结果发现Xcode7.3不能真机调试了,原因是Xcode7.3里面没有iOS10的sdk,下面这个压缩包你可以下载下来放在你的Xcode7.3里面,当然了 ...
- pthreads 2.0.10 test
CentOS 6.3 cd /root mkdir pthreads //get php-5.6 and install zts version wget cn2.php.net/get/php-5. ...
- jstl_fmt
<fmt:formatDate value="${isoDate}" type="both"/>2004-5-31 23:59:59<fmt: ...
- MySQL5.5绿色版1067
mysql的绿色安装版,按照很多文章进行配置,会出现 配置文件里面添加了 [client] default-character-set=utf8 [mysqld] default-character- ...
- vue.js2.0的独立构建和运行时构建
转自:https://jingsam.github.io/2016/10/23/standalone-vs-runtime-only-build-in-vuejs2.html?utm_source=t ...
- com.android.internal.os.ZygoteInit$MethodAndArgsCaller 解决
好久没写博客了,带着点小愧疚来,添上几个字: 这是今天遇到的一个bug,之前也遇到过,为了后面方便,就记下. bug提示:com.android.internal.os.ZygoteInit$Meth ...
- CONTAINING_RECORD的实现
// 9.25.cpp : 定义控制台应用程序的入口点.///*----------------------------CONTAINING_RECODER的实现------------------- ...
- 输出MYSQL所有SQL语句
在my.cnf中的mysqld段增加如下参数,然后重启MYSQL: log-output = FILE general_log = 1 general_log_file = "D:/Visu ...
- Python的平凡之路(21)
上节内容回顾:1.请求周期url> 路由 > 函数或类 > 返回字符串或者模板语言?Form表单提交: 提交 -> url > 函数或类中的方法 - ... ...