Command Manual (SET)

SET

| HOME | BACK |

Purpose           

To set environment control variables.  Command "set" requires at least 2 parameters, and the first parameter is system variables, which control various kinds of environment setting in Noobeed.

Please note that command set DOES NOT allow having an expression for one of its parameter.  For example, to set a new value of the null data,

->set null -99

This will result in an error message, since the interpreter looks at the word "-99" as two tokens, a computer science jargon, one is for the "-" and the other one is for the number "99".  Since there are more than one tokens, it will be interpreted as an expression.

To cope with the problem, the user can assign a value -99 to a variable, and set it by using this varable, as follows.

->x = -99

->set null x

The following is a list of available system variables.  Click on each individual to see more details.

SET ALIGN to set alignment of printing output string
SET ANGLE to set angle unit
SET BLKSIZE to set block size in image processing
SET COLORMAP to set color map looking table 
SET DISTTOL to set tolerance value for distance
SET FORMAT to set format for printing out numerical values
SET FOUT to set filename for general output to a file
SET INTP_MODE to set interpolation mode
SET MAX_NO_ITERATE to set maximum number of iteration
SET_MAX_NO_PLINE to set maximum number of poly-lines in a vector
SET NA to set value of not applicable
SET NULL to set null data value
SET PATH to set path name for the working directory
SET PATHFUN to set path name for the function program directory
SET PATHPRG to set path name for the program directory
SET PENCOLOR to set pen color
SET PRECISION to set precision for printing out numerical values 
SET RANDMAX to set possible random maximum number
SET WIDTH to set width for printing out numerical values
SET PENWIDTH to set the width of the pen
SET MHT_HLINE to set the parameters ranges for finding horizontal lines using Modified Hough Transform technique
SET MHT_VLINE to set the parameters ranges for finding vertical lines using Modified Hough Transform technique
SET MHT_LINE to set the parameters ranges for finding straight lines using Modified Hough Transform technique

| HOME | BACK |


SET ALIGN

| HOME | BACK |

Purpose           

To set alignment of printing output string.

This command sets a system string variable that controls the alignment of the printing output string.  The initial default value is "L", left justify.

This alignment setting is only valid when the printing field width, set by command "set width", is larger than the length of the printing string.  Then the alignment of the output string can be left, center, or right justify.

To see the current setting, just type "set align" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET ANGLE {String}para1

para1   = alignment, must be "L", or "C", or "R"

          (L = left   C = center     R = right)

Example:

Example 1 Example 2
set align "r"

 

mode1 = "r"

set align mode1

See also

set width, print, fprint

| HOME | BACK |


SET ANGLE

| HOME | BACK |

Purpose           

To set angle unit.  

This command sets a system string variable that controls the unit of angle in trigonometric computation.  The initial default value is "deg".

To see the current setting, just type "set angle" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET ANGLE {String}para1

para1   = angle unit, must be "DEG", or "RAD", or "GRA"

Example:

Example 1 Example 2
set angle "rad"

 

mode1 = "deg"

set angle mode1

See also

global function : deg, dms, sin, cos, tan, asin, acos, atan

| HOME | BACK |


SET BLKSIZE

| HOME | BACK |

Purpose           

To set block size in image processing.  Very few function in Noobeed use sub-image processing technique to avoid too much consuming of memory.  Examples are edge detection and image stretching.  However, sub-image processing technique is activated only the calling object is virtually loaded. 

This command sets a system integer variable that controls the block size of sub-image used in some image processing functions.  The initial default value is 64.

To see the current setting, just type "set blksize" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET BLKSIZE {int}para1

para1   = block size

Example:

Example 1 Example 2
set blksize 128

 

n = 64

set blksize n

See also

 

| HOME | BACK |


SET COLORMAP

| HOME | BACK |

Purpose           

To set color map looking table. 

This command sets a system variable of type Matrix_uch, size n x 3, that control the amount of red, green and blue, for each color index.  The number of available colors for each color map matrix is n-1, where n is no of rows.  The row number, starting from 0 to n-1, is indeed the color index. 

It is used to convert gray scale image to Image_rgb object, a color image, by using the class function "RGB" of an Image object.  Each gray scale number is thought of a row index of the color map matrix, at where the amount of red, green and blue are read out and assigned to it.

Noobeed provides a set of built-in color maps that can be used right away.  Rather than input a parameter of type Matrix_uch, the user simply in put a string constant, or a string variable, followed by a number, that specifies the number of colors wanted.  Available color map are listed below.

"RGB" full color circle shade
"HOT" shade from yellow to magenta
"WARM" shade from yellow to cyan
"COOL" shade from cyan to magenta
"GRAY" gray shade
"RED" red shade
"YELLOW" yellow shade
"GREEN" green shade
"CYAN" cyan shade
"BLUE" blue shade
"MAGENTA" magenta shade

 

 

The initial default value is that of "RGB" with 64 colors.  To get the current color map matrix, use the global function "getcolormap".

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET COLORMAP {Matrix_uch}para1

para1   = color map matrix, must have 3 columns

OR

SET COLORMAP {String}para1 {int}para2

para1   = color map name

para2   = no of colors wanted

Example:

Example 1 Example 2
A = [255 0 0; 0 255 0; 0 0 255]

set colormap A

n = 64

set colormap "RGB" n

See also

getcolormap (global function )

| HOME | BACK |


SET DISTTOL

| HOME | BACK |

Purpose           

To set value of the default distance tolerance .

This command sets a system double variable that stores a value used as a default distance tolerance value.

Points that are closer than the distance tolerance value will be regarded as the same point.  This value is used extensively in COGO functions, for example, when computing an intersection point of two 3D lines, if the calculated intersection point is far from the two lines less than the distance tolerance, the intersection point exists, otherwise no intersection.

The initial default value is 0.0001.

To see the current setting, just type "set disttol" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET NA {double}para1

para1   = value of na data

Example:

Example 1 Example 2
set disttol 0.1

 

n = 0.1

set disttol n

See also

 

| HOME | BACK |


SET FORMAT

| HOME | BACK |

Purpose           

To set format for printing out of numerical values.

This command sets a system string variable that controls the format of printing in commands "print" and "fprint".

There are two options available, namely fixed format and scientific format.  A variable with a value of ten, would be printed out in the fixed format as 10.00000, and in the scientific format as 5.00000e+000.  The number of digits after decimal point is controlled by command "set precision".  The initial default value is "fix".

To see the current setting, just type "set format" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET FORMAT {String} para1

para1   = format name, must be "FIX", or "SCI"

Example:

Example 1 Example 2
set format "sci"

 

mode1 = "fix"

set format mode1

See also

set precision, set width

| HOME | BACK |


SET FOUT

| HOME | BACK |

Purpose           

To set the filename for output out data into a file.  This file is to store data created by commands "fprint" and "flist".

This command sets a system string variable that controls the name of the report file for output data into a file.  The initial default value is "RPT.txt".

If the given filename has no extension in it, Noobeed will add an extension of ".txt" to.  If the path name is not include in the given filename, Noobeed will add the current working directory, set by command "set path", to it

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET FOUT para1

para1   = report output file name

Example:

Example 1 Example 2

set fout "my_output.txt"

fname = "c:\temp\my_output.txt"

set fout fname

See also

flist, fprint

| HOME | BACK |


SET INTP_MODE

| HOME | BACK |

Purpose           

To set interpolation mode.  

This command sets a system string variable that control the interpolation mode in Image arithmetic operations, e.g. + - * / etc.  Images have spatial information, which must be taken into account in a processing involving more than 2 images.  This is due to that the center of pixels in one image might not be exactly coincides to those of the second image, hence resample is needed.  The initial default value is "nearest".

To see the current setting, just type "set intp_mode" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET INTP_MODE {String}para1

para1   = angle unit, must be "NEAREST", or "BILINEAR", or "BICUBIC"

Example:

Example 1 Example 2
set angle "bilinear"

 

mode1 = "bicubic"

set intp_mode mode1

See also

 

| HOME | BACK |


SET IMAX_NO_ITERATE

| HOME | BACK |

Purpose           

To set maximum number of iteration.  

This command sets a system integer variable that controls the maximum number of iteration in functions that require an iteration processing, for example exterior orientation, 3D conformal transformation, etc.

The initial setting of the maximum number of iteration when a program starts is set to 20, which is mostly large enough to get a solution converted.  In general most computation convert within 5 iterations.  However, depending on how wel the program can estimate approximate values of parameters, in some situations, for example doing exterior orientation of SPOT image, might need a larger number. 

To see the current setting, just type "set max_no_iterate" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET MAX_NO_ITERATE {int}para1

para1   = a required maximum number of iteration

Example:

Example 1 Example 2
set max_no_iterate 30

 

n = 30

set max_no_iterate n

See also

 

| HOME | BACK |


SET IMAX_NO_PLINE

| HOME | BACK |

Purpose           

To set maximum number of poly-lines in a vector.  

This command sets a system integer variable that controls the maximum number of poly-lines in a vector, namely VecRCpline, VecXYpline, Vec3Dpline.  This value is also used in function "edgecanny", edge detection by Canny operator, in that it is the maximum number of edges in the output edge image.

The initial setting of the maximum number of iteration when a program starts is set to 100000, which is mostly large enough for most projects.

To see the current setting, just type "set max_no_pline" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET MAX_NO_PLINE {int}para1

para1   = a required maximum number of poly-lines

Example:

Example 1 Example 2
set max_no_pline 300000

 

n = 300000

set max_no_pline n

See also

 

| HOME | BACK |


SET MHT_HLINE     SET MHT_VLINE     SET MHT_LINE

| HOME | BACK |

Purpose           

To set the parameters ranges for finding horizontal lines using Modified Hough Transform technique.

This command set six system double variables that control the parameters ranges of theta and Lo for finding horizontal lines, vertical lines and general straight lines using Modified Hough Transform technique.

Theta and Lo are the two parameters of Line Equation as follows.

                        X cos(theta) +  Y sin(theta)    =    Lo

where theta is the angle measured counter-clockwise from the x-axis to the perpendicular line, which is drawn from the origin to the line, and Lo is the length of the perpendicular line.

Given X and Y of a point, and by varying the angle theta, Modified Hough Transform technique calculates Lo and put a vote in an accumulator array at the specific cell whose theta and Lo values are equal to the values use in calculation.  MHT_HLINE is for finding horizontal lines, MHT_VLINE is for finding vertical lines and MHT_LINE is for finding general straight lines. 

The range of theta angle and the range of Lo value along with the stepping value of theta angle and Lo are specified by the six parameters in the set command.

MHT_HLINE's and MHT_VLINE's parameters are used in the functions "calibxpyp" of class Photo object. MHT_LINE's parameters are used in the function "findline" of class Photo.  Therefore please set these parameters before calling these functions. 

To see the current setting, just type "set pmht_hline" or "mht_vline" or "mht_line" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET MHT_HLINE {double}para1 {double}para2 {double}para3 {double}para4 {double}para5 {double}para6

SET MHT_VLINE {double}para1 {double}para2 {double}para3 {double}para4 {double}para5 {double}para6

SET MHT_LINE  {double}para1 {double}para2 {double}para3 {double}para4 {double}para5 {double}para6

para1   = starting value of theta

para2   = ending value of theta

para3   = stepping value of theta

para4   = starting value of Lo

para5   = ending value of Lo

para6   = stepping value of Lo

Example:

Example 1 Example 2
set MHT_HLINE 20.0 30.0 1.0 0 200.0 1.0

 

theta_1 = -20

set MHT_VLINE theta_1 20 1 200 1

See also

-

| HOME | BACK |


SET NA

| HOME | BACK |

Purpose           

To set value of the default "not applicable".

This command sets a system double variable that stores a value used as default value when doing something unsuccessfully.  For example in function "matching", when the correlation is less than a given value, there will be no match found, and the result of that particular pixel will be the value of this system variable.  Another example is in COGO, function "distintdist", intersection by 2 distances, if an intersection does not exist, the function will return a point, whose x and y coordinate are the value of this system variable.

The initial default value is -999.

To see the current setting, just type "set na" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET NA {double}para1

para1   = value of na data

Example:

Example 1 Example 2
set na 99

 

n = -9999

set na n

See also

 

| HOME | BACK |


SET NULL

| HOME | BACK |

Purpose           

To set value of the default null data.

This command sets a system double variable that stores a value used as default value of null data in Matrix, Image and Photo objects.  The initial default value is 0.

To see the current setting, just type "set null" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET NULL {double}para1

para1   = value of null data

Example:

Example 1 Example 2
set null 99

 

n = -9999

set null n

See also

 

| HOME | BACK |


SET PATH

| HOME | BACK |

Purpose           

To set path name of the working directory.  This is a default path that will be used when a user does not include a path name in a specified filename.

This command sets a system string variable that stores the path name for reading and writing data in files.  If a file name, provided by the user, is found no path information in it, Noobeed will insert this string in front of it.

To see the current setting, just type "set path" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET PATH {String}para1

para1   = path name, including drive name, if any

Example:

Example 1 Example 2
set path "c:\temp"

 

path1 = "\temp\"

set path path1

See also

set pathprg, set pathfun

| HOME | BACK |


SET PATHFUN

| HOME | BACK |

Purpose           

To set path name for the user-defined function program directory.  This is the one and only one path that Noobeed will search for the function program, if an external function is called.

This command sets a system string variable that stores the path name for loading function files.

To see the current setting, just type "set pathfun" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET PATHFUN {String}para1

para1   = path name, including drive name, if any

Example:

Example 1 Example 2
set pathfun "c:\function"

 

path1 = "\fun\"

set path path1

See also

set pathprg, set path

| HOME | BACK |


SET PATHPRG

| HOME | BACK |

Purpose           

To set path name for the program directory.  This is the one and only one path that Noobeed will search for the program, when using the command "load".

This command sets a system string variable that stores the path name for loading program files.

To see the current setting, just type "set pathprg" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET PATHPRG {String}para1

para1   = path name, including drive name, if any

Example:

Example 1 Example 2
set pathfun "c:\prg"

 

path1 = "\program\"

set path path1

See also

set pathfun, set path

| HOME | BACK |


SET PENCOLOR

| HOME | BACK |

Purpose           

To set pen color.  

This command set three system integer variables that control the the amount of red, green and blue color of the system pen.  The pen color is used when drawing lines, circles, ellipses, etc. in Matrix, Image, Photo objects.  The valid range of values is between 0 and 255.  The initial default value is r = 255, g = 255 and b = 255.

To see the current setting, just type "set pencolor" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET PENCOLOR {int}para1 {int}para2 {int}para3

para1   = amount of red color

para2   = amount of green color

para3   = amount of blue color

Example:

Example 1 Example 2
set pencolor 0 0 255

 

 

 

r = 0

g = 0

b = 255

set pencolor r g b

See also

set colormap

| HOME | BACK |


SET PRECISION

| HOME | BACK |

Purpose           

To set precision of output format.

This command sets a system integer variable that controls the number of digits after decimal point in commands "print" and "fprint".  The initial default value is 5.

To see the current setting, just type "set precision" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET PRECISION {int} para1

para1   = no of digits after decimal point

Example:

Example 1 Example 2
set precision 15"sci"

 

n = 3

set precision n

See also

set format, set width

| HOME | BACK |


SET RANDMAX

| HOME | BACK |

Purpose           

To set the maximum possible value of global function "rand", random number generator function.

This command sets a system double variable that controls the maximum possible value of the function "rand".  The initial default value is 1.

To see the current setting, just type "set randmax" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET RANDMAX {double} para1

para1   = maximum value of random numbers, must be > 0

Example:

Example 1 Example 2
set randmax 450

 

n = 7.50

set randmax n

See also

 rand (global function)

| HOME | BACK |


SET WIDTH

| HOME | BACK |

Purpose           

To set width of output format.

This command sets a system integer variable that controls the number of spaces in commands "print" and "fprint".  The initial default value is 5.

To see the current setting, just type "set width" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET WIDTH {int} para1

para1   = width value

Example:

Example 1 Example 2
set width 15

 

n = 20

set width n

See also

 set precision, set format

| HOME | BACK |


SET PENWIDTH

| HOME | BACK |

Purpose           

To set the width of pen.

This command sets a system integer variable that controls the width of the pen in "pixel" unit.  The width can be either 1 or 3 or 5 or 7 pixel(s).  The initial default value is 1 pixel.

To see the current setting, just type "set penwidth" without a parameter.

Where

Mode Yes/No
at the interactive prompt Yes
inside a program Yes

Usage

SET PENWIDTH {int} para1

para1   = width value

Example:

Example 1 Example 2
set penwidth 5

 

n = 5

set penwidth n

See also

 set pencolor

| HOME | BACK |