add grid

From DavinciWiki
Jump to: navigation, search

Description

Adds a grid of specified dimensions to a picture

Arguments and Return Values

Inputs: a byte picture

Outputs: a byte picture with a grid

Usage

Syntax: add_grid(data, dx, dy, line_color [, xo = INT] [, yo = INT] [, thick = INT])

 'data'         is the input picture
 'dx'           is the delta x for the vertical grid lines
 'dy'           is the delta y for the horizontal grid lines
 'line_color'   is the line color 'white,black,quarterwhite,quarterblack,halfwhite,halfblack'
 'xo'           is the x offset before the first vertical grid lines
 'yo'           is the y offset before the first horizontal grid lines
 'thick'        is the line_weight

Examples

dv> a
4480x1600x3 array of byte, bip format [21,504,000 bytes]
dv> b=add_grid2(a,640,640,"halfwhite",yo=320,thick=1)
4480x1600x3 array of byte, bip format [21,504,000 bytes]
dv> display(b)
Writing /tmp/dv_32752/4H2q1r: 4480x1600x3 PNG file.

Images

Before and After images

grid before.png grid after.png

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 02-01-2008
Modified On: 02-01-2008

Personal tools