数字图像基础,论坛,算法库matlab,opencv,halcon

来源:互联网 发布:mysql except关键词 编辑:程序博客网 时间:2024/06/04 18:56
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
顺便复习一下直角坐标系和极坐标系
http://zh.wikipedia.org/wiki/%E6%9E%81%E5%9D%90%E6%A0%87%E7%B3%BB

http://zh.wikipedia.org/wiki/%E7%9B%B4%E8%A7%92%E5%9D%90%E6%A0%87%E7%B3%BB
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、

matlab6.5
设置搜索路径

file/setpath
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
2d画图
x=-pi:pi/20:pi;%左边界-pi,步长pi/20,右边界piy=sin(x)/x;plot(x,y);%画图grid on;%显示网格

google绘图
y=sin(x)/x
http://www.google.com.hk/#hl=zh-CN&newwindow=1&safe=strict&site=&source=hp&q=y%3Dsin%28x%29%2Fx&oq=y%3Dsin%28x%29%2Fx&aq=f&aqi=&aql=&gs_l=hp.3...3354l9468l0l9765l10l10l0l0l0l0l0l0ll0l0.frgbld.&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=3c699164da2f212&biw=1366&bih=586

y=ln(x) 自然对数函数
http://www.google.com.hk/search?client=safari&rls=en&q=y=ln(x)&ie=UTF-8&oe=UTF-8

y=log(x) 常用对数函数
http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&client=safari&rls=en&q=y%3Dlog%28x%29&oq=y%3Dlog%28x%29&aq=f&aqi=&aql=&gs_l=serp.3...6477l10669l0l10869l14l11l0l0l0l0l0l0ll0l0.frgbld.

y=exp(x) 即y=e^x
http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&client=safari&rls=en&biw=1366&bih=651&q=y%3Dexp+%28x%29&oq=y%3Dexp+%28x%29&aq=f&aqi=&aql=&gs_l=serp.3...1460l3262l0l3710l8l7l0l0l0l0l0l0ll0l0.frgbld.

y=7^x 指数函数
http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&client=safari&rls=en&biw=1366&bih=651&q=y%3D7%5Ex&oq=y%3D7%5Ex&aq=f&aqi=&aql=&gs_l=serp.3...11309l14855l0l15334l6l6l0l0l0l0l720l720l6-1l1l0.frgbld.

y=x^7 幂函数
http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&client=safari&rls=en&biw=1366&bih=651&q=y%3Dx%5E7&oq=y%3Dx%5E7&aq=f&aqi=&aql=&gs_l=serp.3...150730l151940l0l152188l6l5l0l0l0l0l0l0ll0l0.frgbld.


y=1/(2*pi)^(1/2)*exp((-1)*x^2/2) //正态分布
http://www.google.com.hk/#hl=zh-CN&newwindow=1&safe=strict&q=y%3D1%2F%282*pi%29^%281%2F2%29*exp%28%28-1%29*x^2%2F2%29&oq=y%3D1%2F%282*pi%29^%281%2F2%29*exp%28%28-1%29*x^2%2F2%29&aq=f&aqi=&aql=&gs_l=serp.12...25379l225127l12l246622l34l34l0l0l0l0l369l369l3-1l1l0.frgbld.&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=3c699164da2f212&biw=1366&bih=586
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
3d曲线画图,使用plot3
>> help plot3 PLOT3  Plot lines and points in 3-D space.    PLOT3() is a three-dimensional analogue of PLOT().      PLOT3(x,y,z), where x, y and z are three vectors of the same length,    plots a line in 3-space through the points whose coordinates are the    elements of x, y and z.      PLOT3(X,Y,Z), where X, Y and Z are three matrices of the same size,    plots several lines obtained from the columns of X, Y and Z.      Various line types, plot symbols and colors may be obtained with    PLOT3(X,Y,Z,s) where s is a 1, 2 or 3 character string made from    the characters listed under the PLOT command.      PLOT3(x1,y1,z1,s1,x2,y2,z2,s2,x3,y3,z3,s3,...) combines the plots    defined by the (x,y,z,s) fourtuples, where the x's, y's and z's are    vectors or matrices and the s's are strings.      Example: A helix:          t = 0:pi/50:10*pi;        plot3(sin(t),cos(t),t);      PLOT3 returns a column vector of handles to LINE objects, one    handle per line. The X,Y,Z triples, or X,Y,Z,S quads, can be     followed by parameter/value pairs to specify additional     properties of the lines.     See also PLOT, LINE, AXIS, VIEW, MESH, SURF.

        t = 0:pi/50:10*pi;%定义t区间        plot3(sin(t),cos(t),t);%画图,x=sin(t),y=cos(t)




[x,y]=meshgrid(-4:0.2:4,-4:0.2:4);%定义x,y区间,x,y是自变量z=exp(-0.5*(x.^2+y.^2));%定义z函数关系,exp即e^( )plot3(x,y,z);%画图xlabel('x');ylabel('y');zlabel('z');title('3d graph');

、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
3d网格画图
[x,y]=meshgrid(-4:0.2:4,-4:0.2:4);%定义x,y区间z=exp(-0.5*(x.^2+y.^2));%定义z函数关系mesh(x,y,z);%画图xlabel('x');ylabel('y');zlabel('z');title('3d graph');


三维表面绘图,将mesh换成surf


三维等高线绘图,将mesh换成contour



http://www.math.uri.edu/~bkaskosz/flashmo/graph3d/
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
矩阵
>> A=[1,2,3;4,5,6;7,8,9]//矩阵定义,3行3列A =     1     2     3     4     5     6     7     8     9>> B=[2:1:10]//也可这样定义B =     2     3     4     5     6     7     8     9    10>> eye(2)//2阶单位矩阵ans =     1     0     0     1>> zeros(2)//2阶0矩阵ans =     0     0     0     0>> magic(2)//2阶幻方阵ans =     1     3     4     2>> size(A)//取得矩阵的维数ans =     3     3>> A(:,3)//输出矩阵第3列ans =     3     6     9>> A//输出矩阵A =     1     2     3     4     5     6     7     8     9>> A(3,:)//输出矩阵第3行ans =     7     8     9


、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
>> help imread IMREAD Read image from graphics file.    A = IMREAD(FILENAME,FMT) reads the image in FILENAME into    A. If the file contains a grayscale intensity image, A is    a two-dimensional array.  If the file contains a truecolor    (RGB) image, A is a three-dimensional (M-by-N-by-3) array.    FILENAME is a string that specifies the name of the    graphics file, and FMT is a string that specifies the    format of the file.  The file must be in the current    directory or in a directory on the MATLAB path.  If IMREAD    cannot find a file named FILENAME, it looks for a file    named FILENAME.FMT.....    JPEG  Any baseline JPEG image; JPEG images with some          commonly used extensions     TIFF  Any baseline TIFF image, including 1-bit, 8-bit, and          24-bit uncompressed images; 1-bit, 8-bit, and 24-bit          images with packbits compression; 1-bit images with          CCITT compression; also, 16-bit grayscale, 16-bit          indexed, and 48-bit RGB images     GIF   Any 1-bit to 8-bit GIF image     BMP   1-bit, 4-bit, 8-bit, 16-bit, 24-bit, and 32-bit uncompressed          images; 4-bit and 8-bit run-length encoded (RLE) images     PNG   Any PNG image, including 1-bit, 2-bit, 4-bit, 8-bit,          and 16-bit grayscale images; 8-bit and 16-bit          indexed images; 24-bit and 48-bit RGB images     HDF   8-bit raster image datasets, with or without an          associated colormap; 24-bit raster image datasets     PCX   1-bit, 8-bit, and 24-bit images     XWD   1-bit and 8-bit ZPixmaps; XYBitmaps; 1-bit XYPixmaps     ICO   1-bit, 4-bit, and 8-bit uncompressed images     CUR   1-bit, 4-bit, and 8-bit uncompressed images     RAS   Any RAS image, including 1-bit bitmap, 8-bit indexed,          24-bit truecolor and 32-bit truecolor with alpha.     PBM   Any 1-bit PBM image.  Raw (binary) or ASCII (plain) encoded.     PGM   Any standard PGM image.  ASCII (plain) encoded with          arbitrary color depth.  Raw (binary) encoded with up          to 16 bits per gray value.     PPM   Any standard PPM image.  ASCII (plain) encoded with          arbitrary color depth. Raw (binary) encoded with up          to 16 bits per color component.

>> help imwrite IMWRITE Write image to graphics file.    IMWRITE(A,FILENAME,FMT) writes the image A to FILENAME.    FILENAME is a string that specifies the name of the output    file, and FMT is a string the specifies the format of the    file.  A can be either a grayscale image (M-by-N) or a    truecolor image (M-by-N-by-3).
比如,可以如下进行格式转换
A=imread('lena.jpg');  imwrite(A,'A.bmp');

查看img信息
>> imfinfo('a.bmp')ans =               Filename: 'a.bmp'           FileModDate: '03-Apr-2012 15:11:10'              FileSize: 786486                Format: 'bmp'         FormatVersion: 'Version 3 (Microsoft Windows 3.x)'                 Width: 512                Height: 512              BitDepth: 24             ColorType: 'truecolor'       FormatSignature: 'BM'    NumColormapEntries: 0              Colormap: []               RedMask: []             GreenMask: []              BlueMask: []       ImageDataOffset: 54      BitmapHeaderSize: 40             NumPlanes: 1       CompressionType: 'none'            BitmapSize: 786432        HorzResolution: 0        VertResolution: 0         NumColorsUsed: 0    NumImportantColors: 0





、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
opencv
http://sourceforge.net/projects/opencvlibrary/
http://www.opencv.org.cn/
http://groups.yahoo.com/group/OpenCV/

、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、

halcon
http://www.mvtec.com/halcon/download/
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、

论坛
http://cvchina.net
原创粉丝点击