YOLOP Your Octothorpean Language for Optical Processing Team - - PowerPoint PPT Presentation

yolop
SMART_READER_LITE
LIVE PREVIEW

YOLOP Your Octothorpean Language for Optical Processing Team - - PowerPoint PPT Presentation

YOLOP Your Octothorpean Language for Optical Processing Team Members Sasha McIntosh Jonathan Liu Lisa Li Introduction Image manipulation language C-like syntax Simplifies common image processing tasks such as... importing


slide-1
SLIDE 1

YOLOP

Your Octothorpean Language for Optical Processing

slide-2
SLIDE 2

Team Members Sasha McIntosh Jonathan Liu Lisa Li

slide-3
SLIDE 3

Introduction

❖ Image manipulation language

➢ C-like syntax

❖ Simplifies common image processing tasks such as...

➢ importing & exporting images ➢ cropping images ➢ creating & applying filters

slide-4
SLIDE 4

Short Tutorial

Keywords

  • return
  • break
  • continue
  • function
  • __print
  • read_in
  • write_out
  • get
  • set
  • setc
  • getc
  • while
  • for
  • if
  • else
  • image
  • pixel
  • int
  • string
slide-5
SLIDE 5

Short Tutorial

Types

  • integer
  • string
  • pixel
  • image
slide-6
SLIDE 6

Short Tutorial

Math Operators

  • expr + expr
  • expr - expr
  • expr * expr
  • expr / expr

Relational & Equality Operators

  • expr < expr
  • expr <= expr
  • expr > expr
  • expr >= expr
  • expr == expr
  • expr ~= expr
slide-7
SLIDE 7

Short Tutorial

Logical Operators

  • expr && expr
  • expr || expr
  • ~ expr

Assignment

  • lvalue = expr
slide-8
SLIDE 8

Short Tutorial

Variable Declaration

  • int x; x = 6;
  • string y; y = “why”;
  • pixel z; z = [255, 255, 255, 100];
  • image g; g =[200, 300];

Function Declaration

  • function int add(int x, int y) { return x + y; }
slide-9
SLIDE 9

Short Tutorial

Conditional Statement Ex. if (expression) { if (expression) { statement; } } else { statement; }

slide-10
SLIDE 10

Short Tutorial

Iteration Statement Ex. for (expression; expression; expression) { statement; } Ex. while ( expression ) { statement; }

slide-11
SLIDE 11

Short Tutorial

Built-In Functions

  • __print( str );
  • img = read_in( filename, ext );
  • write_out( img, filename, ext );
  • px = get( img, x, y );
  • set( img, x, y, px );
  • i = getc( px, “color” )
  • setc( px, “color”, i )
  • dimensions( img, “width” );
slide-12
SLIDE 12

Architecture

slide-13
SLIDE 13

Sample Program

function void main () { img cat; cat = read_in( "cat1", "jpg" ); int w; w = dimensions( cat, "width" ); int h; h = dimensions( cat, "height" ); pixel p; p = [255,255,255,100]; int i; int j; for (i=0; i<w; i++) { for (j=0; j<h; j++) { set( cat, i, j, p ); } } write_out( cat, "blackout", "jpg"); }

slide-14
SLIDE 14

Sample Program

function void main () { img cat; cat = read_in( "cat2", "jpg" ); int w; w = dimensions( cat, "width" ); int h; h = dimensions( cat, "height" ); pixel px; int val; int i; int j; for (i=0; i<w; i++) { for (j=0; j<h; j++) { px = get(cat, i, j); val = getc( p, "b" ); val = val + 50; if ( val > 255 ) { val = 255; } set( px, "b", val ); } } write_out(cat, "cool_cat", "jpg"); }

slide-15
SLIDE 15

Potential Programs

  • Cropping
  • Defining a set of photo filters
  • Enhance photos
  • Combining images, make collages
slide-16
SLIDE 16

Lessons Learned

Set Firm Deadlines In the same vein as “Start Early” make and set hard deadlines. We aimed to meet once a week and had deadlines but as the semester went

  • n, homework and exams and other things took

up more time. We ended putting things off and missing goal dates which made finals week crunch time.

slide-17
SLIDE 17

Lessons Learned

Thoroughly Plan Your Language This one is somewhat difficult to accomplish. Though we thought we had thought through our language well, when it came to development we ended up spending a lot of time going back and modifying/revising previously written code. We wasted a lot of time doing this.

slide-18
SLIDE 18

Demo