220 likes | 298 Views
Chapter 10 Image Processing. Yingcai Xiao. Outline. Motivation DWA: a real world example Algorithms Code examples. Motivation: Visualization vs. Computer Vision. Visualization: information to image Computer Vision (CV): image to information Inverse of the process. Visualization:
E N D
Chapter 10 Image Processing • Yingcai Xiao
Outline • Motivation • DWA: a real world example • Algorithms • Code examples
Motivation: Visualization vs. Computer Vision • Visualization: information to image • Computer Vision (CV): image to information • Inverse of the process Visualization: Information/Data -> Graphics Objects -> Images Visualization Rendering Computer Vision: Images->Graphics Objects ->Information/Data Image Processing Pattern Recognition
Motivation: Applications • Augmented Virtual Reality • Google Glass, Glass by Will Powell • KinectFussion • Medical Imaging • tumor detection, wound assessment • Monitoring • traffic, surveillance, defects detection • Automation • robotics, factory, driving • Google autonomous car
Applications: DWA • Digital Wound Assessment • Can be done locally or remotely • Can be 2D or 3D
DWA: Web-based Image Processing Multi-tier Web Application: Client (phone app) Web Server Application Server Database Server
Architecture of a Four-Tier Application DBMS / Database Server Application Server WEB S E R V E R WEB C L I E N T Supporting Software App User Interface User Interface Application Logic Database Engine Database Database API Architecture of a Four-Tier Application
Architecture of Remote DWA DBMS / Database Server SANA (sana.mit.edu) WEB APP S E R V E R MOCA Phone APP Supporting Software Mobile Dispatch Server User Interface DWA Image Processing Database Engine Database OpenMRS Architecture of Remote DWA Four-Tier Application
DWA: Data Representation • 2D array of colors • Image header: info describe the image (dimensions, …) • Compressed or not • VTK image data (nxnx1) • Java image readers
DWA: Image Processing • Preprocessing • Segmentation • Image Analysis • Healing Projection
DWA: Image Preprocessing • Calibration • Ruler processing • Outlier remover
DWA: Segmentation • Grey Scale • Gradient • Edge formation
Segmentation: Grey Scale Conversion /// grey scale as the length of the RGB color vector Public GrayScaleImage convertToGrayScale( ColorImage colorimage, int width, int height) { …. for(int i = 0; i < total; ++i) { newimage[i] = Math.sqrt((image[i * 3] * image[i * 3] + image[i * 3 + 1] * image[i * 3 + 1] + image[i * 3 + 2] * image[i * 3 + 2] ); } return new GrayScaleImage(width, height, newimage); }
Segmentation: Grey Scale Conversion /// grey scale as I in the IYQ model Public GrayScaleImage convertToGrayScaleYIQ( ColorImage colorimage, int width, int height) { …. for(int i = 0; i < total; ++i) { newimage[i] = 0.299 * image[i * 3] + 0.587 * image[i * 3 + 1] + 0.114 * image[i * 3 + 2]; } return new GrayScaleImage(width, height, newimage); }
Segmentation: Gradient Computation /// Compute the gradient of grey scale, public void computeXDifImage(GrayScaleImage image){ …. for(int i = 0; i < total-1; ++i) { newimage[i] = Math.abs(image[I + 1] - image[i]);; } return new GrayScaleImage(width, height, newimage); }
Segmentation: Edge Formation Create an array list for each edge. ArrayList<Integer> edge = new ArrayList<Integer>() for(int i = 0; i < total; ++i) { if(image[i] > threshold) addEdgePixel(i); // …… } edges = new ArrayList<ArrayList<Integer> >(); edged.add(edge);
Segmentation: Edge Formation • Geometric Descriptors: • List of edge pixels. • List of line segments. • Thining.
DWA: Image Analysis • Size • Color • Shape • Depth (3D)
Image Analysis: Size • Registration • Calibration • Measurement count pixels by • region growing
DWA: Healing Projection • Fit into existing healing trajectories. • Numerical results of predication.
Image Processing Tools:ITK by Kitware: http://www.itk.org/OpenCV: http://opencv.willowgarage.com/