Matlab图像采集与处理精品资料.doc
《Matlab图像采集与处理精品资料.doc》由会员分享,可在线阅读,更多相关《Matlab图像采集与处理精品资料.doc(54页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Image Acquisition and Processing by MatlabCONTENTSI、 Basic Image Acquisition ProcedureII、 图像采集工具箱重要图解III、 Image Types and Converting 图像类型及其转换IV、 Displaying and Exploring Images 图像显示V、 Spatial Transformations 图像的几何运算VI、 Image Registration 图像的对齐VII、 Designing and Implementing 2-D Linear Filters for Im
2、age Data 二维滤波器VIII、 Transforms 图像的变换IX、 Morphological Operations 形态学运算X、 Analyzing and Enhancing Images 图像分析和增强XI、 ROI-Based Processing 图像分区域处理XII、 Image Deblurring 图像复原XIII、 Color 色彩空间XIV、 Neighborhood and Block Operations 邻域运算Function Reference一、 Basic Image Acquisition ProcedureStep 1硬件安装Step 2获取
3、信息 imaqhwinfo InstalledAdaptors: coreco winvideo MATLABVersion: 7.9 (R2009b) ToolboxName: Image Acquisition Toolbox ToolboxVersion: 3.4 (R2009b) imaqhwinfo(winvideo) AdaptorDllName: C:.toolboximaqimaqadaptorswin32mwwinvideoimaq.dll AdaptorDllVersion: 3.4 (R2009b) AdaptorName: winvideo DeviceIDs: 1De
4、viceInfo: 1x1 struct imaqhwinfo(winvideo,1) DefaultFormat: RGB24_320x240 DeviceFileSupported: 0 DeviceName: USB PC Camera DeviceID: 1 ObjectConstructor: videoinput(winvideo, 1)SupportedFormats: 1x6 cell dev_info.SupportedFormatsRGB24_160x120 RGB24_176x144 RGB24_320x240RGB24_352x288 RGB24_640x480 RGB
5、24_800x600 dev_info.SupportedFormats(6)RGB24_800x600Step 3创建video input对象 vid = videoinput(winvideo,1,RGB24_800x600)Summary of Video Input Object Using USB PC Camera . Acquisition Source(s): input1 is available. Acquisition Parameters: Trigger Parameters: 1 immediate trigger(s) on START. Status: .St
6、ep 4(optional)预览视频流 preview(vid) closepreview(vid)Step 5(optional)配置对象属性 get(vid) General Settings: DeviceID = , DiskLogger = , DiskLoggerFrameCount = 0 EventLog = 1x0 struct, FrameGrabInterval = 1, FramesAcquired = 0 FramesAvailable = 0, FramesPerTrigger = 10, Logging = off LoggingMode = memory, Na
7、me = RGB24_800x600-winvideo-1 NumberOfBands = 3, Previewing = off, ROIPosition = 0 0 800 600 Running = off, Tag = , Timeout = 10, Type = videoinput, UserData = VideoFormat = RGB24_800x600, VideoResolution = 800 600 Color Space Settings: BayerSensorAlignment = grbg, ReturnedColorSpace = rgb Callback
8、Function Settings: ErrorFcn = imaqcallback, FramesAcquiredFcn = FramesAcquiredFcnCount = 0, StartFcn = , StopFcn = , TimerFcn = TimerPeriod = 1, TriggerFcn = Trigger Settings: InitialTriggerTime = , TriggerCondition = none, TriggerFrameDelay = 0 TriggerRepeat = 0, TriggersExecuted = 0, TriggerSource
9、 = none TriggerType = immediate Acquisition Sources: SelectedSourceName = input1, Source = 1x1 videosource get(getselectedsource(vid) General Settings: Parent = 1x1 videoinput, Selected = on, SourceName = input1, Tag = Type = videosource Device Specific Properties: BacklightCompensation = on, Bright
10、ness = 20, ColorEnable = on, Contrast = 20 Exposure = 1, FrameRate = 30.0000, Gamma = 4, Hue = 18Saturation = 50, Sharpness = 3 set(vid,TriggerRepeat,Inf); vid.FrameGrabInterval = 5; vid_src = getselectedsource(vid); set(vid_src,Tag,motion detection setup);Step 6获取图像数据 start(vid) data=getdata(vid,6)
11、; stop(vid)Step 7清理 delete(vid) clear close(gcf)二、 图像采集工具箱重要图解1. The Image Acquisition Toolbox Software Components2. Relationship of Video Input Objects and Video Source Objects3. Transitions from Running to Stopped States4. Logging State Transitions5. Overview of Data Logging6. Immediate Trigger7.
12、Manual Trigger8. Hardware Trigger9. Specifying the Amount of Data to Log10. Impact of FrameGrabInterval on Data Logging11. Frames Available After Initial Trigger Execution12. Contents of Memory Buffer Before and After Removing Frames13. Specifying a Delay Before Data Logging Begins14. Executing Mult
13、iple Triggers15. Using wait to Block the MATLAB Command Line16. Delete a triggers worth of image data (The frames acquired before and after the call to flushdata)17. Logging Data to a Disk File18. Overview of Image Acquisition19. getdata Blocks Until Frames Become Available20. Frames Returned by pee
14、kdata21. Format of an Individual Frame22. InitialTriggerTime Records First Trigger Execution三、 Image Types and Converting 图像类型及其转换ditherDithering(抖动)是Gif压缩中一项十分有用的技术。由于GIF 和PNG只有256种颜色,因此,在表现一些含有丰富色彩信息的照片图像或含有平缓过度色的图像时,就会出现梯田状的条形色块,这时,我们就需要用到Dithering(抖动)功能,Dithering可以模仿一些在调色板无法找到的颜色,从而使得整个图像颜色与颜色之间
15、的过渡更为自然,不过,Dithering同样会使图像Size变大,因此,我们更多的将这项技术应用于区域压缩。demosaicConvert Bayer pattern encoded image (与相机RAW格式相关) to truecolor (RGB) image.类型转换gray2ind,grayslice,im2bw,ind2gray,ind2rgb,mat2gray,rgb2gray,rgb2indImage class 转换im2uint8, im2uint16, im2int16, im2single, or im2doubleimapprox索引图像转换可能使用,Approx
16、imate indexed image using one with fewer colorsImage Arithmetic Saturation Rules Values that exceed the range of the integer type are saturated to that range如300255,-450 Fractional values are roundedDICOMDICOM(Digitalimaging and Communications in Medicine)即数字影像和通信标准,规范医学影像及其相关信息的交换。由美国发射学会和美国国家电器制造商
17、协会NEMA(National Electronical Manufacturers Association)制定。 从文件格式上看,用于保存医学数据的DICOM包容的信息量大(除图像信息外,还有很多附加信息,比如患者病例档案等),格式复杂。 DICOM的压缩算法种类很多,也可以保存动画图像 DICOM的图像基本都是与医学相关的(MRI,CT等),医学图像的特点是分辨率低,特征不清晰等等。对这类图像做分割和特征提取难度较大。Mayo Analyze 7.5A file format, developed by the Mayo Clinic, for storing MRI(Magnetic
18、Resonance Imaging核磁共振成像) data,包含两个文件.hdr和.img。Interfile为了使核医学图像和信息能在不同系统上共享,传递以前将各系统的文件转换成统一的Interfile文件格式。转换后的图像和文件,就可以在不同厂商的计算机上进行图像传递。High Dynamic Range ImagesDynamic range refers to the range of brightness levels, using 32-bit floating-point values to store each color channel. hdrread,makehdr,to
19、nemap(HDR-RGB),hdrwrite四、 Displaying and Exploring Images 图像显示1. Displaying Images Using the imshow Function Image Displayed in a Figure Window by imshow imshow(moon.tif); I = getimage; % assigns the image data from the figure window currently active Specifying the Initial Image Magnification imshow
20、(I, InitialMagnification, 150) Image Displayed With and Without a Border imshow(I,Border,tight) % tight|loose Displaying Each Image in a Separate Figure figure Displaying Multiple Images in the Same Figure subplot(m,n,p) subplot(1,2,1), imshow(I1)2. Using imtool to Explore Images Opening the Image T
21、ool imtool(moon.tif); Specifying the Initial Image Magnification Specifying the Colormap Importing Image Data from the Workspace Exporting Image Data to the Workspace Saving the Image Data Displayed in the Image Tool Closing the Image Tool imtool close all3. Exploring Very Large Images Create reduce
22、d resolution data set (R-Set) from image file rsetfile = rsetwrite(File_Name) rsetfile = rsetwrite(File_Name, output_filename)File_Name is a TIFF or NITF image file4. Viewing Image Sequences 查看图像序列 Viewing Image Sequences in the Movie Player load mristack % implay(mristack) Viewing Image Sequences a
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Matlab图像采集与处理 精品资料 Matlab 图像 采集 处理 精品 资料
限制150内