Medical Images. Digtial Image Processing, Spring

Similar documents
Thresholding for Image Segmentation

Obamicon. Histogram Equalization 3/29/2012. Thresholding for Image Segmentation

Creative Image Processing - Cat made of glyphs

Image Manipulation: Filters and Convolutions

IMAGE PROCESSING: POINT PROCESSES

Basic Digital Dark Room

CSE 564: Scientific Visualization

EMGU CV. Prof. Gordon Stein Spring Lawrence Technological University Computer Science Robofest

Digital Image Processing

Artitude. Sheffield Softworks. Copyright 2014 Sheffield Softworks

Color Transformations

Computing for Engineers in Python

MATLAB 6.5 Image Processing Toolbox Tutorial

IDENTIFICATION OF FISSION GAS VOIDS. Ryan Collette

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

More image filtering , , Computational Photography Fall 2017, Lecture 4

Image processing for gesture recognition: from theory to practice. Michela Goffredo University Roma TRE

Transparency and blending modes

Image Enhancement using Histogram Equalization and Spatial Filtering

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

Tablet overrides: overrides current settings for opacity and size based on pen pressure.

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

Liquid Camera PROJECT REPORT STUDY WEEK FASCINATING INFORMATICS. N. Ionescu, L. Kauflin & F. Rickenbach

Filters. Motivating Example. Tracking a fly, oh my! Moving Weighted Average Filter. General Picture

The Unique Role of Lucis Differential Hysteresis Processing (DHP) in Digital Image Enhancement

BCC Light Matte Filter

Version 6. User Manual OBJECT

ImageJ: Introduction to Image Analysis 3 May 2012 Jacqui Ross

Photoshop Blending Modes

Filtering in the spatial domain (Spatial Filtering)

Keyword: Morphological operation, template matching, license plate localization, character recognition.

Adobe Photoshop. Levels

Course Syllabus. Course Title. Who should attend? Course Description. Photoshop ( Level 2 (

Carmen Alonso Montes 23rd-27th November 2015

PHOTOSHOP & ILLUSTRATOR BOOTCAMP

Using Adobe Photoshop

Counting Sugar Crystals using Image Processing Techniques

Midterm is on Thursday!

Image Enhancement in the Spatial Domain Low and High Pass Filtering

EPFL BIOP Image Processing Practicals R. Guiet, O. Burri

Activity Graphics: Image Processing

BCC Make Alpha Key Filter

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

IMAGE PROCESSING PRACTICALS

An Evaluation of Automatic License Plate Recognition Vikas Kotagyale, Prof.S.D.Joshi

Mahdi Amiri. March Sharif University of Technology

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

Image Processing : Introduction

1.Discuss the frequency domain techniques of image enhancement in detail.

Image Processing by Bilateral Filtering Method

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

Flair for After Effects v1.1 manual

Tinderbox 1 for Adobe After Effects

Learning Photo Retouching techniques the simple way

L2. Image processing in MATLAB

Image Pro Ultra. Tel:

>>> from numpy import random as r >>> I = r.rand(256,256);

Images and Filters. EE/CSE 576 Linda Shapiro

CS 445 HW#2 Solutions

Texture Editor. Introduction

NON UNIFORM BACKGROUND REMOVAL FOR PARTICLE ANALYSIS BASED ON MORPHOLOGICAL STRUCTURING ELEMENT:

CT336/CT404 Graphics & Image Processing. Section 9. Morphological Techniques

Digital Image Processing 3/e

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

What is an image? Bernd Girod: EE368 Digital Image Processing Pixel Operations no. 1. A digital image can be written as a matrix

Essential Skills - 3 Key Blend Modes. Ken Fisher

ME 6406 MACHINE VISION. Georgia Institute of Technology

Image Enhancement in spatial domain. Digital Image Processing GW Chapter 3 from Section (pag 110) Part 2: Filtering in spatial domain

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

MAV-ID card processing using camera images

Checkerboard Tracker for Camera Calibration. Andrew DeKelaita EE368

New Spatial Filters for Image Enhancement and Noise Removal

Image Processing and Computer Graphics

TIRF, geometric operators

A quick note: We hope that you will find something from the Tips and Tricks that will add a little pizazz to your yearbook pages!

Today s lecture is about alpha compositing the process of using the transparency value, alpha, to combine two images together.

International Journal of Innovative Research in Engineering Science and Technology APRIL 2018 ISSN X

All Creative Suite Design documents are saved in the same way. Click the Save or Save As (if saving for the first time) command on the File menu to

Extreme Makeovers: Photoshop Retouching Techniques

CSE 564: Visualization. Image Operations. Motivation. Provide the user (scientist, t doctor, ) with some means to: Global operations:

An Introduction to Photoshop 6. Photoshop. retouching applications. images, Lightweight version: Photoshop Elements

Digital image processing. Árpád BARSI BME Dept. Photogrammetry and Geoinformatics

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

>>> from numpy import random as r >>> I = r.rand(256,256);

Vision Review: Image Processing. Course web page:

Machine Vision: Image Representation

VLSI Implementation of Image Processing Algorithms on FPGA

Image Processing for feature extraction

Study and Analysis of various preprocessing approaches to enhance Offline Handwritten Gujarati Numerals for feature extraction

Detection and Verification of Missing Components in SMD using AOI Techniques

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

Scrabble Board Automatic Detector for Third Party Applications

INDIAN VEHICLE LICENSE PLATE EXTRACTION AND SEGMENTATION

Digital Image Processing

Photoshop 01. Introduction to Computer Graphics UIC / AA/ AD / AD 205 / F05/ Sauter.../documents/photoshop_01.pdf

Capturing and Editing Digital Images *

GENERALIZATION: RANK ORDER FILTERS

Computer Vision. Howie Choset Introduction to Robotics

Transcription:

Review Images an array of colors Color RGBA Loading, modifying, updating pixels pixels[] as a 2D array Animating with arrays of images + transformations PImage class, fields and methods get() method and crumble tint() function color and alpha filtering Creative image processing Pointillism Video Library Recording animated sketches as movie files

Medical Images Digtial Image Processing, Spring 2006 2

Image Processing in Manufacturing Digtial Image Processing, Spring 2006 3

What can you do with Image Processing? Inspect, Measure, and Count using Photos and Video http://www.youtube.com/watch?v=ksttnwvhpgi Image Processing Software http://www.youtube.com/watch?v=1wjp9mgnwsm

Thresholding for Image Segmentation Pixels below a cutoff value are set to black Pixels above a cutoff value are set to white

Image Enhancement - Color and intensity adjustment - Histogram equalization Kun Huang, Ohio State / Digital Image Processing using Matlab, By R.C.Gonzalez, R.E.Woods, and S.L.Eddins

Implementing a Color Histogram in Processing // Histogram // Arrays to hold histogram values int[] aa = new int[256]; int[] ra = new int[256]; int[] ga = new int[256]; int[] ba = new int[256]; PImage img; void setup() { size(516, 516); img = loadimage("kodim02.png"); img.loadpixels(); // Sum up all pixel values for (int i=0; i<img.pixels.length; i++) { float r = red(img.pixels[i]); float g = green(img.pixels[i]); float b = blue(img.pixels[i]); // Increment histogram item amounts ra[ int(r) ]++; ga[ int(g) ]++; ba[ int(b) ]++; aa[ int((r+g+b)/3.0) ]++; // Find max value float max = 0.0; for (int i=0; i<256; i++) { if (ra[i] > max) max = ra[i]; if (ga[i] > max) max = ga[i]; if (ba[i] > max) max = ba[i]; if (aa[i] > max) max = aa[i]; // Draw scaled histogram background(255); nofill(); // Borders stroke(0); rect(0, 0, 256, 256); stroke(255,0,0); rect(257, 0, 256, 256); stroke(0,255,0); rect(0, 257, 256, 256); stroke(0,0,255); rect(257, 257, 256, 256); // Lines float h; for (int i=0; i<256; i++) { // all stroke(0); h = map(aa[i], 0, max, 0, 255); line(i, 255, i, 255-h); // red stroke(255,0,0); h = map(ra[i], 0, max, 0, 255); line(257+i, 255, 257+i, 255-h); // green stroke(0,255,0); h = map(ga[i], 0, max, 0, 255); line(i+1, 514, i+1, 514-h); // blue stroke(0,0,255); h = map(ba[i], 0, max, 0, 255); line(257+i, 514, 257+i, 514-h);

histogram.pde

Feature Extraction - Region detection morphology manipulation - Dilate and Erode - Open - Erode Dilate - Small objects are removed - Close - Dilate Erode - Holes are closed - Skeleton and perimeter Kun Huang, Ohio State / Digital Image Processing using Matlab, By R.C.Gonzalez, R.E.Woods, and S.L.Eddins

Erode + Dilate to Despeckle erodedilate.pde Erode Dilate

Spatial Filtering Input Image Output Image A B C D E F G H I w 1 w 2 w 3 w 4 w 5 w 6 E' w 7 w 8 w 7 Spatial Kernel Filter E' = w 1 A+w 2 B+w 3 C+w 4 D+w 5 E+w 6 F+w 7 G+w 8 H+w 7 I

Image Enhancement - Denoise - Averaging 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 - Median filter 20 5 43 78 3 22 115 189 200 43 Kun Huang, Ohio State / Digital Image Processing using Matlab, By R.C.Gonzalez, R.E.Woods, and S.L.Eddins

// Spatial Filtering PImage img; PImage filt; int w = 100; int msize = 3; // Sharpen float[][] matrix = {{ -1., -1., -1., { -1., 9., -1., { -1., -1., -1.; // Laplacian Edge Detection //float[][] matrix = {{ 0., 1., 0., // { 1., -4., 1., // { 0., 1., 0. ; // Average //float[][] matrix = {{ 1./9., 1./9., 1./9., // { 1./9., 1./9., 1./9., // { 1./9., 1./9., 1./9.; // Gaussian Blur //float[][] matrix = {{ 1./16., 2./16., 1./16., // { 2./16., 4./16., 2./16., // { 1./16., 2./16., 1./16. ; void setup() { //img = loadimage("bmc3.jpg"); img = loadimage("moon.jpg"); size( img.width, img.height ); filt = createimage(w, w, RGB); void draw() { // Draw the image on the background image(img,0,0); // Get current filter rectangle location int xstart = constrain(mousex-w/2,0,img.width); int ystart = constrain(mousey-w/2,0,img.height); // Filter rectangle loadpixels(); filt.loadpixels(); for (int i=0; i<w; i++ ) { for (int j=0; j<w; j++) { int x = xstart + i; int y = ystart + j; color c = spatialfilter(x, y, matrix, msize, img); int loc = i+j*w; filt.pixels[loc] = c; filt.updatepixels(); updatepixels(); // Add rectangle around convolved region stroke(0); nofill(); image(filt, xstart, ystart); rect(xstart, ystart, w, w); // Perform spatial filtering on one pixel location color spatialfilter(int x, int y, float[][] matrix, int msize, PImage img) { float rtotal = 0.0; float gtotal = 0.0; float btotal = 0.0; int offset = msize/2; // Loop through filter matrix for (int i=0; i<msize; i++) { for (int j=0; j<msize; j++) { // What pixel are we testing int xloc = x+i-offset; int yloc = y+j-offset; int loc = xloc + img.width*yloc; // Make sure we haven't walked off // the edge of the pixel array loc = constrain(loc,0,img.pixels.length-1); // Calculate the filter rtotal += (red(img.pixels[loc]) * matrix[i][j]); gtotal += (green(img.pixels[loc]) * matrix[i][j]); btotal += (blue(img.pixels[loc]) * matrix[i][j]); // Make sure RGB is within range rtotal = constrain(rtotal,0,255); gtotal = constrain(gtotal,0,255); btotal = constrain(btotal,0,255); // return resulting color return color(rtotal, gtotal, btotal);

Sharpen Edge Detection Gaussian Blur spatial.pde

Image Processing in Processing tint() modulate individual color components blend() combine the pixels of two images in a given manner filter() apply an image processing algorithm to an image

blend() img = loadimage("colony.jpg"); mask = loadimage("mask.png"); image(img, 0, 0); blend(mask, 0, 0, mask.width, mask.height, 0, 0, img.width, img.height, SUBTRACT); Draw an image and then blend with another image BLEND linear interpolation of colours: C = A*factor + B ADD additive blending with white clip: C = min(a*factor + B, 255) SUBTRACT subtractive blending with black clip: C = max(b - A*factor, 0) DARKEST only the darkest colour succeeds: C = min(a*factor, B) LIGHTEST only the lightest colour succeeds: C = max(a*factor, B) DIFFERENCE subtract colors from underlying image. EXCLUSION similar to DIFFERENCE, but less extreme. MULTIPLY Multiply the colors, result will always be darker. SCREEN Opposite multiply, uses inverse values of the colors. OVERLAY A mix of MULTIPLY and SCREEN. Multiplies dark values, and screens light values. HARD_LIGHT SCREEN when greater than 50% gray, MULTIPLY when lower. SOFT_LIGHT Mix of DARKEST and LIGHTEST. Works like OVERLAY, but not as harsh. DODGE Lightens light tones and increases contrast, ignores darks. BURN Darker areas are applied, increasing contrast, ignores lights.

filter() PImage b; b = loadimage("myimage.jpg"); image(b, 0, 0); filter(threshold, 0.5); Draw an image and then apply a filter THRESHOLD converts the image to black and white pixels depending if they are above or below the threshold defined by the level parameter. The level must be between 0.0 (black) and 1.0 (white). If no level is specified, 0.5 is used. GRAY INVERT POSTERIZE BLUR OPAQUE ERODE DILATE converts any colors in the image to grayscale equivalents sets each pixel to its inverse value limits each channel of the image to the number of colors specified as the level parameter executes a Gaussian blur with the level parameter specifying the extent of the blurring. If no level parameter is used, the blur is equivalent to Gaussian blur of radius 1. sets the alpha channel to entirely opaque. reduces the light areas with the amount defined by the level parameter. increases the light areas with the amount defined by the level parameter.

// Threshold PImage img; void setup() { img = loadimage("kodim01.png"); size(img.width, img.height); image(img, 0, 0); void draw() { void drawimg(float thresh) { image(img, 0, 0); filter(threshold, thresh); void mousedragged() { float thresh = map(mousey, 0, height, 0.0, 1.0); println(thresh); drawimg(thresh); threshold.pde

// Posterize PImage img; void setup() { img = loadimage("andy-warhol2.jpg"); size(img.width, img.height); image(img, 0, 0); void draw() { void drawimg(float val { image(img, 0, 0); filter(posterize, val); void mousedragged() { float val = int(map(mousey, 0, height, 2, 10)); val = constrain(val, 2, 10); println(val); drawimg(val); posterize.pde

Image Processing Applications Manual Colony Counter http://www.youtube.com/watch?v=7b-9wf6penq Automated Colony counter http://www.youtube.com/watch?v=qtjmqqrhhag

Measuring Confluency in Cell Culture Biology Refers to the coverage of a dish or flask by the cells 100% confluency = completely covered Image Processing Method 1. Mask off unimportant parts of image 2. Threshold image 3. Count pixels of certain color

Blend: Subtract Original Mask Subtracted

Filter: Theshold Subtracted Threshold

Count Fraction of Pixels to Quantitate // Colony Confluency PImage img; PImage mask; void setup() { img = loadimage("colony.jpg"); mask = loadimage("mask.png"); size(img.width, img.height); void draw() { image(img, 0, 0); blend(mask, 0, 0, mask.width, mask.height, 0, 0, img.width, img.height, SUBTRACT); filter(threshold, 0.6); 5.3 % Confluency void mousepressed() { loadpixels(); int count = 0; for (int i=0; i<pixels.length; i++) if (red(pixels[i]) == 255) count++; println(count/42969.0); confluency.pde

IC 50 determination 5 M 1.67 M 0.56 M 0.185 M 0.062 M DMSO

Vision Guided Robotics Colony Picking Camera Robot Arm

Image Processing - = Compute the presence of objects or particles

Image Processing

Image Processing

Image Processing

Image Processing

Predator algorithm for object tracking with learning http://www.youtube.com/watch?v=1ghnxhcqgsm Video Processing, with Processing http://www.niklasroy.com/project/88/my-little-piece-of-privacy/ http://www.youtube.com/watch?v=rkhbujvykic