TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
Computer vision techniques for interactive art
1. Computer Vision Techniques forInteractive ArtUsing Processing and Max/Jitter Interactive Art Doctoral Program http://www.artes.ucp.pt/si/doutoramento/index.html 28-05-2011 Jorge Cardoso 1
2. Topics Techniques Framedifferencing(for motiondetection) Color detection(whereintheimage, does a given color appear – can beused for trackingobjects) Brightnessdetection(whatisthepositionofthebrightestpixels) Background subtraction(for objectsegmentation) Blobextraction(applied to theprevioustechniques to extractshapeparametersandvectorizingsilhuettes) Movementestimation (whatdirection are theobjectsmoving) Face detection(isthere a face intheimage? where?) 28-05-2011 Jorge Cardoso 2
3.
4. Computer Vision for Interaction Use a computer and camera to extract information about what people are doing and use that as an implicit or explicit form of interaction “Computer vision is the science and technology of machines that see. As a scientific discipline, computer vision is concerned with the theory for building artificial systems that obtain information from images” – Computer vision. (2009, April 24). In Wikipedia, The Free Encyclopedia. Retrieved 11:53, May 9, 2009, from http://en.wikipedia.org/w/index.php?title=Computer_vision&oldid=285848177 28-05-2011 Jorge Cardoso 4
5. 28-05-2011 Jorge Cardoso 5 Image Computer vision are processes applied to sequences of images An image is just a sequence of number (usually arranged in a matrix form) Eachnumberrepresents a colour 50 44 23 31 38 52 75 52 29 09 15 08 38 98 53 52 08 07 12 15 24 30 51 52 10 31 14 38 32 36 53 67 14 33 38 45 53 70 69 40 36 44 58 63 47 53 35 26 68 76 74 76 55 47 38 35 69 68 63 74 50 42 35 32
6. Image Each pixel (i.e., number in the matrix) isusuallystoredin RGB or ARGB formatso It can be decomposed: 28-05-2011 Jorge Cardoso 6 or
7. Frame Differencing If we subtract two consecutive video frames, threshold and binarize it, we get a rough view of the movement in the video Procedure: Go through the current frame image, pixel by pixel Calculate the distance between the color of the current frame’s pixel and the previous frame’s pixel If distance is smaller than a given threshold, assume no movement (black), otherwise assume movement (white) 28-05-2011 Jorge Cardoso 7
8. Frame Differencing Color difference Q: How do wecalculatethe “distance”betweentwocolors? A: Simpleversion: euclideandistance. Take a color as a pointin 3D space (RGB -> XYZ) Calculatethedistancebetweenthetwopoints Subtracteachcomponent (dR = R1-R2, dG = G1-G2, dB = B1-B2) Dist = Sqrt(dR*dR + dG*dG + dB*dB) A1: Slightly (perceptively) betterversion: weighteachcomponentdifferently: Dist = Sqrt(2*dR*dR + 4*dG*dG + 3*dB*dB) 28-05-2011 Jorge Cardoso 8
11. Color detection Isolate color regions in an image Procedure: Go through the image, pixel by pixel Calculate the distance between the color of the current pixel and the reference color If distance is smaller than a given threshold, keep the pixel 28-05-2011 Jorge Cardoso 11
12. Color Detection Color Difference For a betterapproachthan RGB distance,use HSB Give more weight to theHue Dist = Sqrt(3*dH*dH + dS*dS + 2*dB*dB) 28-05-2011 Jorge Cardoso 12
15. Brightenessdetection 15 Slightvariationon color detectionwhenwe’reonlyinterestedintrackingbrightpixels For example, to track a light Procedure: Same as color detectionbutextractthebrightnessofeach pixel andkeeponlythehighest Jorge Cardoso 28-05-2011
31. Background subtraction Q: How do we “subtract” two images? A: Pixel by pixel Q: How do we “subtract” two pixels? A: Channel by channel (color component by color component, usually R, G and B) 28-05-2011 Jorge Cardoso 21
32. Background subtraction Pixel subtraction alone doesn’t work very well due to noise or shadows in the image The resulting subtraction must be thresholded to eliminate noise 28-05-2011 Jorge Cardoso 22
33. Background subtraction After subtracting and thresholding, we can binarize the image to get a mask 28-05-2011 Jorge Cardoso 23
36. Blob extraction All the previous techniques result in possibly many white areas distributed in the image 28-05-2011 Jorge Cardoso 26 http://en.wikipedia.org/wiki/Connected_Component_Labeling
37. Blob extraction Blob extraction (blob detection, connected component labeling) identifies those regions and and allows the extractions of some features area, perimeter, orientation, bounding box, Silhouette 28-05-2011 Jorge Cardoso 27
38. Blob extraction Procedure: See http://en.wikipedia.org/wiki/Connected_Component_Labeling 28-05-2011 Jorge Cardoso 28
53. Face detection Notrecognition! Needs a configuration file thatdetermines what to detect (front faces, side faces, body, etc) Returnsthepositionandsizeofdetected faces 28-05-2011 Jorge Cardoso 36