PhotogramPresented by:Ohan Oda, Neesha Subramaniam,Richard J Ng, Seikwon KimOverview of the presentationOverview of languageTutorials and examplesArchitectural designSummary and Lessons learntOverviewWhat is Photogram?Who uses Photogram?Why use Photogram?IntroductionOverviewMotivationPhotoshop has limited capabilityEasy to write lines of codes than using complicated interface of Photoshop for complicated image processing tasks–Example: PhotomontageSome of the tasks are time consuming using PhotoshopOverviewFeaturesEasy-to-use: Java-like-syntaxPortablePowerfulExpandableTutorialHow to use PhotogramCompiler: PGCompilerHow to compile a .pg program– C:\java PGCompiler PGSampleProgram.pg– C:\javac PGSampleProgram.javaHow to run a .pg program– C:\java PGSampleProgramExamplesCollageImporting functions and globals from other .pg files.ExamplesImage ProcessingExamplesUsed the library functions for drawing lines and circle in the output image.Optical FlowExamplesPhotoMontageNo. of images in database: 2500Algorithm: First match the average RGB of the image patch with the image in the database, then use cross-correlation to choose the best image.Architectural designArchitectural designLexer– Produces a token streamParser– Creates ASTWalker– Calls Semantic Analyzer for Semantic Error AnalysisFront-endArchitectural designPG Library- Library of Built-in Objects and FunctionsSemantic Analyzer–Builds Symbol Table, Scopes, etc.Code Generator–Converts the PG code into Java CodeBack-endPhase I– GrammarPhase II– Grammar – Majority was Walker and Semantic AnalyzerPhase III– Final SampleTestingTestingGrammar Testing– Consists of one long file– As development, test grows larger– Test whether it parses wellTestingPhase II (Semantic)– Consists of small test files– Assume knowing nothing– Most of possible programmingTestingPhase III (Final Checking)– Check whether an actual program runs– Sample codesLessons LearnedKeeping in touch with group members is very essential for successful completion of the project.Don’t ignore professor’s advice regarding CVS.Use JBuilder for developing your Java code. Write small test programs for each stage.ReferencesZhou, Tiantian, Feng, Hanhua, Ra, Yong Man, Lee, Chang Woo. “Mx: A programming language for scientific computation.”http://www1.cs.columbia.edu/~sedwards/classes/2003/w4115/Mx.final.pdf, May 2003. Ritchie, Dennis M. C Reference Manual. Bell Telephone Laboratories,
View Full Document