IMAGE PROCESSING FOR CINEMA K14348_FM.indd 1 12/20/13 11:42 AM Chapman & Hall/CRC Mathematical and Computational Imaging Sciences Series Editors Chandrajit Bajaj Guillermo Sapiro Center for Computational Visualization Department of Electrical The University of Texas at Austin and Computer Engineering Duke University Aims and Scope This series aims to capture new developments and summarize what is known over the whole spectrum of mathematical and computational imaging sciences. It seeks to encourage the integration of mathematical, statistical and computational methods in image acquisition and processing by publishing a broad range of textbooks, reference works and handbooks. The titles included in the series are meant to appeal to students, researchers and professionals in the mathematical, statistical and computational sciences, application areas, as well as interdisciplinary researchers involved in the field. The inclusion of concrete examples and applications, and programming code and examples, is highly encouraged. Published Titles Image Processing for Cinema by Marcelo Bertalmío Statistical and Computational Methods in Brain Image Analysis by Moo K. Chung Rough Fuzzy Image Analysis: Foundations and Methodologies by Sankar K. Pal and James F. Peters Theoretical Foundations of Digital Imaging Using MATLAB® by Leonid P. Yaroslavsky Proposals for the series should be submitted to the series editors above or directly to: CRC Press, Taylor & Francis Group 3 Park Square, Milton Park, Abingdon, OX14 4RN, UK K14348_FM.indd 2 12/20/13 11:42 AM Chapman & Hall/CRC Mathematical and Computational Imaging Sciences IMAGE PROCESSING FOR CINEMA MARCELO BERTALMÍO Universitat Pompeu Fabra Barcelona, Spain K14348_FM.indd 3 12/20/13 11:42 AM CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2014 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Version Date: 20131118 International Standard Book Number-13: 978-1-4398-9928-1 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information stor- age or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copy- right.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that pro- vides licenses and registration for a variety of users. For organizations that have been granted a pho- tocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com Para Lucas y Vera, y Guillermo y Gregory, y pap´a y Serrana. Siempre presente, Vicent. v TThhiiss ppaaggee iinntteennttiioonnaallllyy lleefftt bbllaannkk Acknowledgments Theoriginalillustrationsinthisbookarebykillerfriendsandknock-outartists Javier Baliosian, Federico Lecumberry and Jorge Visca. They also helped me with the book cover, along with Rafael Grompone. The rest of the figures are reproduced with the permission of their authors, to whom I’m very grateful. Aheartfelt“Thankyou”toalltheresearchersI’vehadthepleasureofcol- laborating with over the years: Gregory Randall, Guillermo Sapiro, Coloma Ballester, Stan Osher, Li Tien Cheng, Andrea Bertozzi, Alicia Fern´andez, Shantanu Rane, Luminita Vese, Joan Verdera, Oliver Sander, Pere Fort, Daniel S´anchez-Crespo, Kedar Patwardhan, Juan Cardelino, Gloria Haro, EdoardoProvenzi,AlessandroRizzi,A´lvaroPardo,LuisGarrido,Adri´anMar- ques, Aur´elie Bugeau, Sira Ferradans, Rodrigo Palma-Amestoy, Jack Cowan, Stacey Levine, Thomas Batard, Javier Vazquez-Corral, David Kane, Syed Waqas Zamir and Praveen Cyriac. Specialthanksto:SunilNair,SarahGelson,MicheleDimontandeveryone at Taylor & Francis, and Aurelio Ruiz. Very special thanks to Jay Cassidy, Pierre Jasmin and Stan Osher. Finally, I want to acknowledge the support of the European Research Council through the Starting Grant ref. 306337, of ICREA through their ICREA Acad`emia Award, and of the Spanish government through the grants TIN2012-38112 and TIN2011-1594-E. Always present: Andr´es Sol´e and Vicent Caselles. vii TThhiiss ppaaggee iinntteennttiioonnaallllyy lleefftt bbllaannkk Preface This book is intended primarily for advanced undergraduate and graduate students in applied mathematics, image processing, computer science and re- lated fields, as well as for researchers from academia and professionals from the movie industry. It can be used as a textbook for a graduate course, for an advancedundergraduatecourse,orforsummerschool.Myintentionhasbeen that it can serve as a self-contained handbook and a detailed overview of the relevant image processing techniques that are used in practice in cinema. It coversawiderangeoftopicsshowinghowimageprocessinghasbecomeubiq- uitous in movie-making, from shooting to exhibition. It does not deal with visual effects or computer-generated images, but rather with all the ways in whichimageprocessingalgorithmsareusedtoenhance,restore,adaptorcon- vert moving images, their purpose being to make the images look as good as possible while exploiting all the capabilities of cameras, projectors and dis- plays. Imageprocessingisbydefinitionanapplieddiscipline,butveryfewofthe image processing algorithms intended for application in the cinema industry are ever actually used. There probably are many reasons for this, but in my viewthemostimportantonesarethatwe,theresearchers,areoftennotaware of the impossibly high quality standards of cinema, and also we don’t have a clear picture of what the needs of the industry are, what problems they’d really like to solve versus what we think they’d like to solve. Movieprofessionals,ontheotherhand,areverymuchawareofwhattheir needs are, they are very eager to learn and try new techniques that may help themandtheywanttounderstandwhatisittheyareapplying.Butveryoften thetechnical orscientificinformationtheywantisspreadovermanytexts,or buried under many layers of math or unrelated exposition. Surprisingly,then,thisisthefirstcomprehensivebookonimageprocessing for cinema, and I’ve written it because I sincerely think that having all this information together can be beneficial both for researchers and for movie industry professionals. Currentdigitalcinemacamerasmatchorevensurpassfilmcamerasincolor capabilities, dynamic range and resolution, and several of the largest camera makershaveceasedproductionoffilmcameras.Ontheexhibitionside,filmis forecastedtobegonefromAmericanmovietheatersby2015.Andwhilemany mainstream and blockbuster movies are still being shot on film, they are all digitizedforpostproduction.Forallthesereasonsthisbookequates“cinema” ix