数字图像基础,论坛,算法库matlab,opencv,halcon
生活随笔
收集整理的這篇文章主要介紹了
数字图像基础,论坛,算法库matlab,opencv,halcon
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
順便復習一下直角坐標系和極坐標系
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,右邊界pi y=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 plot3PLOT3 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 theelements 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 withPLOT3(X,Y,Z,s) where s is a 1, 2 or 3 character string made fromthe characters listed under the PLOT command.PLOT3(x1,y1,z1,s1,x2,y2,z2,s2,x3,y3,z3,s3,...) combines the plotsdefined by the (x,y,z,s) fourtuples, where the x's, y's and z's arevectors 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, onehandle 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 34 5 67 8 9>> B=[2:1:10]//也可這樣定義B =2 3 4 5 6 7 8 9 10>> eye(2)//2階單位矩陣ans =1 00 1>> zeros(2)//2階0矩陣ans =0 00 0>> magic(2)//2階幻方陣ans =1 34 2>> size(A)//取得矩陣的維數ans =3 3>> A(:,3)//輸出矩陣第3列ans =369>> A//輸出矩陣A =1 2 34 5 67 8 9>> A(3,:)//輸出矩陣第3行ans =7 8 9
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
>> help imreadIMREAD Read image from graphics file.A = IMREAD(FILENAME,FMT) reads the image in FILENAME intoA. If the file contains a grayscale intensity image, A isa 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 thegraphics file, and FMT is a string that specifies theformat of the file. The file must be in the currentdirectory or in a directory on the MATLAB path. If IMREADcannot find a file named FILENAME, it looks for a filenamed FILENAME.FMT. ....JPEG? Any baseline JPEG image; JPEG images with somecommonly used extensionsTIFF? Any baseline TIFF image, including 1-bit, 8-bit, and24-bit uncompressed images; 1-bit, 8-bit, and 24-bitimages with packbits compression; 1-bit images withCCITT compression; also, 16-bit grayscale, 16-bitindexed, and 48-bit RGB imagesGIF?? Any 1-bit to 8-bit GIF imageBMP?? 1-bit, 4-bit, 8-bit, 16-bit, 24-bit, and 32-bit uncompressedimages; 4-bit and 8-bit run-length encoded (RLE) imagesPNG?? Any PNG image, including 1-bit, 2-bit, 4-bit, 8-bit,and 16-bit grayscale images; 8-bit and 16-bitindexed images; 24-bit and 48-bit RGB imagesHDF?? 8-bit raster image datasets, with or without anassociated colormap; 24-bit raster image datasetsPCX?? 1-bit, 8-bit, and 24-bit imagesXWD?? 1-bit and 8-bit ZPixmaps; XYBitmaps; 1-bit XYPixmapsICO?? 1-bit, 4-bit, and 8-bit uncompressed imagesCUR?? 1-bit, 4-bit, and 8-bit uncompressed imagesRAS?? 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 witharbitrary color depth.? Raw (binary) encoded with upto 16 bits per gray value.PPM?? Any standard PPM image.? ASCII (plain) encoded witharbitrary color depth. Raw (binary) encoded with upto 16 bits per color component.
>> help imwriteIMWRITE 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 outputfile, and FMT is a string the specifies the format of thefile. A can be either a grayscale image (M-by-N) or atruecolor 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: 786486Format: 'bmp'FormatVersion: 'Version 3 (Microsoft Windows 3.x)'Width: 512Height: 512BitDepth: 24ColorType: 'truecolor'FormatSignature: 'BM'NumColormapEntries: 0Colormap: []RedMask: []GreenMask: []BlueMask: []ImageDataOffset: 54BitmapHeaderSize: 40NumPlanes: 1CompressionType: 'none'BitmapSize: 786432HorzResolution: 0VertResolution: 0NumColorsUsed: 0NumImportantColors: 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
順便復習一下直角坐標系和極坐標系
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,右邊界pi y=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 plot3PLOT3 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 theelements 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 withPLOT3(X,Y,Z,s) where s is a 1, 2 or 3 character string made fromthe characters listed under the PLOT command.PLOT3(x1,y1,z1,s1,x2,y2,z2,s2,x3,y3,z3,s3,...) combines the plotsdefined by the (x,y,z,s) fourtuples, where the x's, y's and z's arevectors 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, onehandle 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 34 5 67 8 9>> B=[2:1:10]//也可這樣定義B =2 3 4 5 6 7 8 9 10>> eye(2)//2階單位矩陣ans =1 00 1>> zeros(2)//2階0矩陣ans =0 00 0>> magic(2)//2階幻方陣ans =1 34 2>> size(A)//取得矩陣的維數ans =3 3>> A(:,3)//輸出矩陣第3列ans =369>> A//輸出矩陣A =1 2 34 5 67 8 9>> A(3,:)//輸出矩陣第3行ans =7 8 9
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
>> help imreadIMREAD Read image from graphics file.A = IMREAD(FILENAME,FMT) reads the image in FILENAME intoA. If the file contains a grayscale intensity image, A isa 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 thegraphics file, and FMT is a string that specifies theformat of the file. The file must be in the currentdirectory or in a directory on the MATLAB path. If IMREADcannot find a file named FILENAME, it looks for a filenamed FILENAME.FMT. ....JPEG? Any baseline JPEG image; JPEG images with somecommonly used extensionsTIFF? Any baseline TIFF image, including 1-bit, 8-bit, and24-bit uncompressed images; 1-bit, 8-bit, and 24-bitimages with packbits compression; 1-bit images withCCITT compression; also, 16-bit grayscale, 16-bitindexed, and 48-bit RGB imagesGIF?? Any 1-bit to 8-bit GIF imageBMP?? 1-bit, 4-bit, 8-bit, 16-bit, 24-bit, and 32-bit uncompressedimages; 4-bit and 8-bit run-length encoded (RLE) imagesPNG?? Any PNG image, including 1-bit, 2-bit, 4-bit, 8-bit,and 16-bit grayscale images; 8-bit and 16-bitindexed images; 24-bit and 48-bit RGB imagesHDF?? 8-bit raster image datasets, with or without anassociated colormap; 24-bit raster image datasetsPCX?? 1-bit, 8-bit, and 24-bit imagesXWD?? 1-bit and 8-bit ZPixmaps; XYBitmaps; 1-bit XYPixmapsICO?? 1-bit, 4-bit, and 8-bit uncompressed imagesCUR?? 1-bit, 4-bit, and 8-bit uncompressed imagesRAS?? 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 witharbitrary color depth.? Raw (binary) encoded with upto 16 bits per gray value.PPM?? Any standard PPM image.? ASCII (plain) encoded witharbitrary color depth. Raw (binary) encoded with upto 16 bits per color component.
>> help imwriteIMWRITE 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 outputfile, and FMT is a string the specifies the format of thefile. A can be either a grayscale image (M-by-N) or atruecolor 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: 786486Format: 'bmp'FormatVersion: 'Version 3 (Microsoft Windows 3.x)'Width: 512Height: 512BitDepth: 24ColorType: 'truecolor'FormatSignature: 'BM'NumColormapEntries: 0Colormap: []RedMask: []GreenMask: []BlueMask: []ImageDataOffset: 54BitmapHeaderSize: 40NumPlanes: 1CompressionType: 'none'BitmapSize: 786432HorzResolution: 0VertResolution: 0NumColorsUsed: 0NumImportantColors: 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
轉載于:https://www.cnblogs.com/-song/archive/2012/03/24/3331887.html
總結
以上是生活随笔為你收集整理的数字图像基础,论坛,算法库matlab,opencv,halcon的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数字图像基础,分辨率
- 下一篇: matlab人脸追踪,求大神帮助我这个菜