Image acquisition and basic operations in matlab
来源:互联网 发布:windows无法访问xp 编辑:程序博客网 时间:2024/05/17 23:55
tiff:一种图片格式
cmyk:印刷色彩模式
bitmap=bmp:位图
help imread:查看imread的帮助
将一张图片分割的代码:
clc; clear all; close all;
I = imread('cameraman.tif');
[h, w] = size(I);
num = 3; % 块数
ch = h/num; cw = w/num;
t1 = (0:num-1)*ch + 1; t2 = (1:num)*ch;
t3 = (0:num-1)*cw + 1; t4 = (1:num)*cw;
figure;
for i = 1 : num
for j = 1 : num
str1 = sprintf('temp%d = I(t1(i):t2(i), t3(j):t4(j))', (i-1)*num+j);
eval(str1);
subplot(num, num, (i-1)*num+j);
str2 = sprintf('temp%d', (i-1)*num+j);
imshow(eval(str2), 'border', 'tight');
pause(0.1);
end
end
size的用法:
size():获取矩阵的行数和列数
(1)s=size(A),
当只有一个输出参数时,返回一个行向量,该行向量的第一个元素时矩阵的行数,第二个元素是矩阵的列数。
(2)[r,c]=size(A),
当有两个输出参数时,size函数将矩阵的行数返回到第一个输出变量r,将矩阵的列数返回到第二个输出变量c。
(3)size(A,n)如果在size函数的输入参数中再添加一项n,并用1或2为n赋值,则 size将返回矩阵的行数或列数。其中r=size(A,1)该语句返回的时矩阵A的行数, c=size(A,2) 该语句返回的时矩阵A的列数。
- Image acquisition and basic operations in matlab
- basic operations in sql
- GSL Matrix and Vector Basic Operations Examples
- [matlab]install Image Acquisition Toolbox Adaptors 利用matlab获取摄像头图像
- Support of basic operations on Sets in Dynamics AX
- user quota and lvm operations in linux
- Matlab环境下使用USB2.0摄像头编程image acquisition tools(读书笔记)
- How can I plot an image (.jpg) in MATLAB in both 2-D and 3-D?
- Matlab: image dilation and Erosion
- Some Basic Concepts in Image Steganography
- Basic Query Operations
- VIM basic operations
- R dataframe basic operations
- basic file operations
- Intrinsity Acquisition: Winners and Losers
- Fast Pixel Operations in .NET (With and Without unsafe)
- display image without margin in matlab
- Windows Image Acquisition (WIA) 的用法
- 近段时间学习html和CSS的一些细碎总结
- HDU-1728-逃离迷宫
- Codeforces 476C Dreamoon and Sums (水
- Java解析注解
- 【线段树】HDU1542 线段树求面积周长
- Image acquisition and basic operations in matlab
- SQLServer2012 (非)聚集索引存储探究
- USACO Section 1.3 Wormholes
- UVA-10720 Graph Construction(Havel-Hakimi定理)
- android – 多屏幕适配相关
- Hibernate 学习记录
- 黑马程序员————Ip、Udp、Tcp
- hdu 1799 (循环多少次?)(排列组合公式)
- linux vi命令详解