Video Object Tracking and Replacement for Post TV Production LYU0303 Final Year Project Spring 2004
Outline Brief project overview and targets achieved New components added to the proposed system Working principles of individual parts Future work Q & A
Overview Post-TV production processes and changes the content of a video clip Difficult for computers to process video in a global view Step-by-step programming enables the computer to “think” more thoroughly
Overview We have introduced the following parts in the last semester: Bitmap I/O RGB HSV converter Edge detector Edge equation finder Translation detector Texture mapper New parts have been added in order to increase the functionality of the system
Additional Basic Components The following parts have been added Graphical User Interface (GUI) Corner point finder Video file reader and writer Video player processor (frame-based) Improved texture mapper The following part has been modified Bitmap I/O Edge finder Texture mapper Removed Equation processor
Graphical User Interface Although UI is not a main project part, a good GUI can significantly decrease the time needed for processing and program maintenance Since C++ language is being used, the Microsoft Foundation Classes are adopted to develop the user interface Provide most of the basic functions needed for information input and output
Graphical User Interface
Corner Point Finder As we know that processing dots are much faster than processing lines, we may wish to try to find the corner points directly before finding the edge equations Stick some brightly coloured labels at the corners of the rectangular surface Can apply on cylindrical objects as well to indicated the curve control points A simple K-Means method is used to group the points together.
Corner Point Finder
Video File I/O As we are talking about video processing, it is inevitable to handle video reading and writing DirectShow interfaces are being used in the project Able to process any type of AVI video as long as the Window Media Player can play them
Video Player We need to choose a video renderer that is suitable for our application To reserve the function of real-time processing and video texture in the future, the Video Mixing Renderer 9 (VMR9) is used Allows the rendering of more than one video or bitmap on the screen at the same time
Video Processor Video are sequence of bitmap frames We capture each video frame and process them in the same way as processing the bitmaps After a video frame is being processed, we add them to an AVI file Default video compressor is DivX Mpeg4 encoder (FourCC code “divx”)
Video Renderer Video System Structure
Texture Mapper A graphics design technique used to wrap a surface of a 3-D object with a texture map The 3-D object acquires a surface texture similar to the texture map. Colors, brightness values or altitudes
Texture Mapper Mapping function (u,v) (r,c) Texture coordinates Image coordinates
line by line process each pixel on every line Scan-line conversion Scanline y k Scanline y k+1 scanning order for every line
Cylindrical mapping Mapping cylinders 3 parts: Surface detection Orientation determination Scan-line mapping
Surface detection Hough algorithm to detect 2 straight edges
Surface detection Scanning from top to bottom in an orthogonal way To detect the points shown These are points where color transition occurs
Surface detection Model the curve surfaces by ellipses X 2 / a 2 + y 2 / b 2 = 1
Orientation determination Add markers at the edge Each indicates a specific portion of the texture map
Scan-line mapping Line by line From left to right Problem: need consideration of depth
Scan-line mapping Solution: Radius and center of the can could be detected. To find the inclined angle. The larger it is, the more texture map is assigned to that pixel. 1 pixel
Scan-line mapping 1 pixel Texture scanning is not line by line 2nd1st3rd
Cylindrical mapping
Shadow mapping Mapping of surface brightness Retain the brightness of the original surface Method: Compute the average brightness of the image surface Scale down the texture brightness by (avg_bright/256) Replace the V value of the mapped surface
Shadow mapping
Limitations Camera distortion Lines are not parallel
Future Work Keep the audio data in output file Enable input to be any video capturing device Further increase the accuracy of recognition Allow user to choose an output format Video texture replacement (e.g. replace one surface of the sample cube with another video clip) 3D object mapping
Q & A