Image_rgb Class Function Manual |
Purpose
To make an anaglyph image. The calling Image is to be the left image and the Image in the argument is to be the right image. Unlike the function "anaglyph" of the class matrix, where there is no spatial information in the object, function "anaglyph" of class "Image" does not requires an amount of shift, it simple overlays one image on top of the other, according to their spatial information. Hence, the two images must be in the same map projection.
Class
Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln
Usage
{Image_rgb} ret = object.ANAGLYPH({Image_RGB} argm1)
argm1 = the right image
Example:
->Img_color = A.anaglyph(B) -> |
See also (class function)
makeleft, makeright
B
Purpose
To return a matrix of the blue color of the image.
Class
Image_rgb
Usage
{Matrix_uch} ret = object.B()
Example:
->blue = Img.B() -> |
See also (class function)
R, G, RGB
Purpose
To create a blank image. Spatial information is also copied to the created blank image.
Class
Image_rgb
Usage
{Image_uch} ret = object.BLANK([{uchar} argm1])
argm1 = initial value of the blank image
(default threshold value = 0)
See an example in function "BLANK" of class Image
Purpose
To convert a column number to an x coordinate. Please note that the arguments of the function are of type double, which allows a sub-pixel column number to be converted to an accurate x coordinate.
Class
Image_rgb
Usage
{double} ret = object.COL2X({double} argm1)
argm1 = column number
See an example in function "COL2X" of class Image
Purpose
To report the width and height of the image.
Class
Image_rgb
Usage
{Pt2D} ret = object.COVERAGE()
See an example in function "COVERAGE" of class Image
Purpose
To draw a circle in an Image.
Class
Image_rgb
Usage
{void} object.DRWCIRCLE({double} argm1, {double} argm2, {double} argm3)
argm1 = x coordinate of the center of the circle being drawn
argm2 = y coordinate of the center of the circle being drawn
argm3 = radius of the circle (in x y coordinate system unit)
See an example in function "DRWCIRCLE" of class Image
Purpose
To draw an ellipse in an Image.
Class
Image_rgb
Usage
{void} object.DRWELLIPSE({double} argm1, {double} argm2, {double} argm3, {double} argm4)
argm1 = x coordinate of the center of the ellipse being drawn
argm2 = y coordinate of the center of the ellipse being drawn
argm3 = semi-major axis of the ellipse (in x y coordinate system unit)
argm4 = semi-minor axis of the ellipse (in x y coordinate system unit)
See an example in function "DRWELLIPSE" of class Image
Purpose
To draw an line in an Image.
Class
Image_rgb
Usage
{void} object.DRWLINE({double} argm1, {double} argm2, {double} argm3, {double} argm4)
argm1 = x coordinate of the first point
argm2 = y coordinate of the first point
argm3 = x coordinate of the second point
argm4 = y coordinate of the second point
See an example in function "DRWLINE" of class Image
Purpose
To draw a poly-line in an Image.
Class
Image_rgb
Usage
{void} object.DRWPLINE({VecPt2D} argm1)
argm1 = list of x y coordinates of a poly-line, stored in a VecPt2D object
See an example in function "DRWPLINE" of class Image
Purpose
To draw a point in an Image.
Class
Image_rgb
Usage
{void} object.DRWPOINT({double} argm1, {double} argm2)
argm1 = x coordinate of the point
argm2 = y coordinate of the point
See an example in function "DRWPOINT" of class Image
Purpose
To draw a rectangle in an Image.
Class
Image_rgb
Usage
{void} object.DRWRECTANG({double} argm1, {double} argm2, {double} argm3, {double} argm4)
argm1 = x coordinate of the center point of the rectangle
argm2 = y coordinate of the center point of the rectangle
argm3 = width of the rectangle (in x y coordinate system unit)
argm4 = height of the rectangle (in x y coordinate system unit)
See an example in function "DRWRECTANG" of class Image
Purpose
To draw a square in an Image.
Class
Image_rgb
Usage
{void} object.DRWSQUARE({double} argm1, {double} argm2, {double} argm3)
argm1 = x coordinate of the center point of the square
argm2 = y coordinate of the center point of the square
argm3 = size of the square (in x y coordinate system unit)
See an example in function "DRWSQUARE" of class Image
DRWTEXT
Purpose
To draw a text on an Image_RGB. Characyers unknown to Noobeed will be drawn as "?".
Class
Image_rgb
Usage
{void} object.DRWTEXT({int} argm1,{int} argm2,{String} argm3,{double} argm4)
argm1 = x coordinate of upper left corner of the text block
argm2 = y coordinate of upper left corner of the text block
argm3 = a text string (at the moment only numbers are supported)
argm4 = height of the text (in image rectangular coordinate system unit, optimum is about 7-12 pixels when convert to matrix index unit)
Example:
->A.drwtext(10,20,"1256",10) -> |
DRWVECCIRCLE
Purpose
To draw a list of circles in an Image.
Class
Matrix_uch
Usage
{void} object.DRWVECCIRCLE({VecPt2D} argm1, {int} argm2)
argm1 = list x y coordinates of centers of circles
argm2 = radius of the circles (in x y coordinate system unit)
Example:
->Img.drwveccircle(vec_center,3) -> |
See also (class function)
drwcircle, drwellipse, drwpline, drwrectang, drwsquare, drwvecpline
Purpose
To draw a list of poly-lines in an Image.
Class
Image_rgb
Usage
{void} object.DRWVECPLINE({VecXYpline} argm1)
argm1 = vector of poly-lines, stored in a VecXYpline object.
See an example in function "DRWVECPLINE" of class Image
DRWVECTEXT
Purpose
To draw a list of text string in an Image. Characyers unknown to Noobeed will be drawn as "?".
Class
Matrix_uch
Usage
{void} object.DRWVECTEXT({VecPt2D} argm1, {VecStr} argm2, {double} argm3)
argm1 = list x y coordinates of text position
argm2 = list of text stored in a VecStr object.
argm3 = height of text (in x y coordinate system unit)
Example:
->Img.drwvectext(vec_point, vec_text, 3) -> |
See also (class function)
drwcircle, drwellipse, drwpline, drwrectang, drwsquare, drwvecpline
FILLPOLY
Purpose
To fill a closed polygon, defined by a poly-line, in an Image. The fill value is taken from the current value of the red color, set by command "set pencolor".
Class
Image_rgb
Usage
{void} object.FILLPOLY({VecPt2D} argm1)
argm1 = list of x y coordinates of a polygon, stored in a VecPt2D object.
See an example in function "FILLPOLY" of class Image
Purpose
To report the current value of flag_null. Flag_null is a member data of a Matrix, which is a also a data member of Image. It indicates whether the null data in the matrix are taken into account in computation such as mean, min, max etc. When an Image is initiated, its flag_null value is zero (off).
Class
Image_rgb
Usage
{bool} ret = object.FLAG_NULL()
See an example in function "FLAG_NULL" of class Image
Purpose
To return a matrix of the green color of the image.
Class
Image_rgb
Usage
{Matrix_uch} ret = object.G()
Example:
->blue = Img.G() -> |
See also (class function)
R, B, RGB
Purpose
To transform to HSV (Hue Saturation Value) matrix, a Matrix_flt, consisting of 3 matrices concatenated to together. The size of the returning matrix is, therefore, 3m * n, where m is no of rows and n is no of columns.
The matrix at the top, of size equal to the original image, is a Hue matrix. A hue matrix has values from 0 to 360 degrees, which represent for all variety of colors. At the point where hue value is 0, the represented color is red. At the point where hue value is 120, the represented color is green. At the point where hue value is 240, the represented color is blue.
The middle matrix is a matrix containing values representing for saturation. They are information about how saturate a the color is. The range of saturation is from 0 to 1.
The bottom matrix is a matrix containing values representing for Value. These are information about the brightness of each color. The range of Value is from 0 to 1.
Class
Image_rgb
Usage
{Matrix_flt} ret = object.HSV()
Example:
->Mat_hsv = Img.HSV() -> |
See also (class function)
hsv2rgb (global function)
HSV2RGB
Purpose
To make a color image, RGB, from Hue (color), Saturation (amount of color) and Value (brightness) Images. The result is the calling Image_rgb object.
Usage
{void} ret = object.HSV2RGB({Matrix_flt} argm1, {Matrix_flt} argm2, {Matrix_flt} argm3)
argm1 = Matrix_flt contains Hue information
argm2 = Matrix_flt contains Saturation information
argm3 = Matrix_flt contains Value information
Example:
->Img_new = Image_rgb()
->Image_new.HSV2RGB(M_hue,
M_sat, M_val) -> |
See also
HSV
ID
Purpose
To report an ID of an Image.
Class
Image_rgb
Usage
{int} ret = object.ID()
See an example in function "ID" of class Image
Purpose
To initialize a Matrix object, to have a specified size and an initial value.
Class
Image_rgb
Usage
{void} object.INIT({int} argm1, {int} argm2, [{double} argm3,{double} argm4,{double} argm5,{double} argm6,{Projection} argm7])
argm1 = no of rows
argm2 = no of columns
argm3 = x coordinate of lower left corner (default = 0)
argm4 = y coordinate of lower left corner (default = 0)
argm5 = x coordinate of upper right corner (default = no of columns)
argm6 = y coordinate of upper right corner (default = no of rows)
argm7 = map projection (default = default map projection of class "Projection")
See an example in function "INIT" of class Image
Purpose
To convert to an Image_int object.
Class
Image_rgb
Usage
{Image_int} ret = object.INT()
See an example in function "INT" of class Image
INTERSECT
Purpose
To create a blank image from an intersection of two images. The two images must be in the same map projection.
Class
Image_rgb
Usage
{Pt2D} ret = object.INTERSECT({Image_rgb} argm1)
argm1 = The intersecting image
See an example in function "OVERLAY" of class Image
IS_COVER
Purpose
To determine whether a point is covered by an image.
Class
Image_rgb
Usage
{bool} ret = object.IS_COVER({double} argm1, {double} argm2)
argm1 = x coordinate of a point being determined
argm2 = y coordinate of a point being determined
Example:
->b1 = img.is_cover(667256.001, 458986.356)
-> |
See also (class function)
LOAD
Purpose
To load an Image object saved as Noobeed format. There are 2 files needed. One is for the documentation, and it is an ASCII file. The other is a binary file containing data of the matrix.
If file name extension is omitted, the function will add default extension to the file. The default extension of the documentation file is ".txt" and that of the data file is ".raw".
Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".
The detail structure of the documentation file is described in function "save".
Class
Image_rgb
Usage
{void} object.LOAD({String} argm1, [{String} argm2])
argm1 = file name for the documentation file (default extension is ".txt")
argm2 = file name for the data file
(default file name is same file name as argm1 with an extension ".raw")
See an example in function "LOAD" of class Image
Purpose
To load data from a bitmap (BMP) file and stored in an Image object.
If file name extension is omitted, the function will add default extensions to the files. The default extension of a bitmap file is ".bmp".
Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".
This function requires that the data is of 24-bit and with no compression. If the data is of type 8 bit, gray scale, then the R, G, B matrices will have the same value.
Class
Image_rgb
Usage
{void} object.LOADBMP({String} argm1)
argm1 = file name for the bitmap file (default extension is ".bmp")
See an example in function "LOADBMP" of class Image
Purpose
To load data from a Tag Image File (TIF) file and stored in an Image object.
If file name extension is omitted, the function will add default extensions to the files. The default extension of a bitmap file is ".tif".
Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".
This function requires that the data is of 24-bit color image and with no compression. If the data is of type 8 bit, gray scale, then the R, G, B matrices will have the same value.
Class
Image_rgb
Usage
{void} object.LOADTIF({String} argm1)
argm1 = file name for the TIF file (default extension is ".tif")
See an example in function "LOADTIF" of class Image
Purpose
To report x y coordinate of the lower left corner of the image.
Class
Image_rgb
Usage
{Pt2D} ret = object.LOWER_LEFT()
See an example in function "LOWER_LEFT" of class Image
Purpose
To report x y coordinate of the lower right corner of the image.
Class
Image_rgb
Usage
{Pt2D} ret = object.LOWER_RIGHT()
See an example in function "LOWER_RIGHT" of class Image
Purpose
To make a left stereo-mate of an image. Every pixel in the original image, the calling image, is shift to the right hand side, on the same row with an amount proportional to its elevation difference to a based elevation, specified by the user. Pixels in the new image where no value was assigned will be filled up by the nearest neighbor method.
The left stereo-mate, and the right stereo-mate generated by function "makeright", are supposed to use for 3D stereoscopic viewing. They can be printed out as a hardcopies and be viewed under a stereoscope, or can be used in function "anaglyph" to generate an anaglyph image.
Class
Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln
Usage
{Image_RGB} ret = object.MAKELEFT({Image_flt} argm1, [{double} argm2, {double} argm3])
argm1 = DEM image
argm2 = height difference interval for an amount of 1 pixel shift
(default = (Elev max - Elev min) / 4 percents of no of columns)
argm3 = based elevayion
(default = minimum elevation in the DEM)
Example:
->Img_left = Img.makeleft(DEM) -> |
See also (class function)
makeright, anaglyph
Purpose
To make a right stereo-mate of an image. Every pixel in the original image, the calling image, is shift to the left hand side, on the same row with an amount proportional to its elevation difference to a based elevation, specified by the user. Pixels in the new image where no value was assigned will be filled up by the nearest neighbor method.
The right stereo-mate, and the left stereo-mate generated by function "makeleft", are supposed to use for 3D stereoscopic viewing. They can be printed out as a hardcopies and be viewed under a stereoscope, or can be used in function "anaglyph" to generate an anaglyph image.
Class
Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln
Usage
{Image_RGB} ret = object.MAKERIGHT({Image_flt} argm1, [{double} argm2, {double} argm3])
argm1 = DEM image
argm2 = height difference interval for an amount of 1 pixel shift
(default = (Elev max - Elev min) / 4 percents of no of columns)
argm3 = based elevayion
(default = minimum elevation in the DEM)
Example:
->Img_left = Img.makeright(DEM) -> |
See also (class function)
makeleft, anaglyph
MOSAIC
Purpose
To create a mosaic consisting of several RGB images overlaid on top of each other. All images must be in the same map projection, and are stored in files as Noobeed format, i.e. each image has one documentation file and one data file. The last argument in the function indicates whether feathering is performed. If not, all images are simply spatially overlaid on top of each other.
Class
Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln
Usage
{void} object.MOSAIC({double} argm1, {VecStr} argm2, [{int} argm3])
argm1 = resolution of the mosaic image
argm2 = vector of strings, containing all image file names
argm3 = an option flag (0 = no feathering; 1 = do feathering)
(default = 0)
Example:
->Img_big = Image_RGB() ->Img_big.mosaic(20, vec_img_name, 1) -> |
See also (class function)
feather, overlay
NCOL
Purpose
To report the number of columns of an Image.
Class
Image_rgb
Usage
{int} ret = object.NCOL()
See an example in function "NCOL" of class Image
Purpose
To report the number of rows of an Image.
Class
Image_rgb
Usage
{int} ret = object.NROW()
See an example in function "NROW" of class Image
Purpose
To report the current value of null data of an Image.
Class
Image_rgb
Usage
{double} ret = object.NULLDATA()
See an example in function "NULLDATA" of class Image
OVERLAY
Purpose
To reassign new values of the original image, the calling image, according to values of an overlay image.
The result image will have the same size as the original one, however, its pixel values will get updated to a new value, from the second image, if they also spatially lie within the area coverage of the second image.
Class
Image_rgb
Usage
{Image_rgb} ret = object.OVERLAY({Image_rgb} argm1, {String} argm2)
argm1 = The overlaying image
argm2 = interpolation method, must be "nearest" or "bilinear", or "bicubic".
(default = "nearest")
See an example in function "OVERLAY" of class Image
PROJ
Purpose
To report the current map projection of the image.
Class
Image_rgb
Usage
{Projection} ret = object.PROJ()
See an example in function "PROJ" of class Image
Purpose
To return a matrix of the red color of the image.
Class
Image_rgb
Usage
{Matrix_uch} ret = object.R()
Example:
->blue = Img.R() -> |
See also (class function)
B, G
RGB
Purpose
To return a matrix of the average values of the red, green and blue colors of the image.
Class
Image_rgb
Usage
{Matrix_uch} ret = object.RGB()
Example:
->blue = Img.RGB() -> |
See also (class function)
B, G, RGB
RC2XY
Purpose
To convert from a row and column number to an x y coordinate. Please note that the arguments of the function are of type double, which allows a sub-pixel row and column number to be converted to an accurate x y coordinate.
Class
Image_rgb
Usage
{Pt2D} ret = object.RC2XY({double} argm1, {double} argm2)
argm1 = row number
argm2 = column number
See an example in function "RC2XY" of class Image
REPROJ
Purpose
To re-project an image into another map projection system.
The process is done by first converting the desired map projection coordinates to geographic coordinates, latitudes and longitudes, then transform to the original map projection coordinates. Then using one of available interpolation method, nearest neighbor, bilinear, and bicubic, determine the gray level values from the original image, the calling image, and put them in the new image.
This function can also be used to re-project an image from one ellipsoid datum to another datum, because the definition of class "Projection" also include the definition of the ellipsoid. Simply put a desired ellipsoid in the target map projection, the function will automatically take into account the datum difference, if the new ellipsoid is found different from the original ellipsoid.
The boundary of the result re-projected image is determined automatically, using the specified resolution given by the user. If an image is to be re-projected onto a pre-defined blank image, the function "reproj2img" must be used instead. In this case the user has a full control over the area coverage of the final result image.
Class
Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln
Usage
{Image_rgb} ret = object.REPROJ({double} argm1, {Projection} argm2, [{String} argm3])
argm1 = required resolution of the result image (in ground unit)
argm2 = target map projection
argm3 = resample method, must be "nearest" or "bilinear" or "bicubic"
(default = "nearest")
Example:
->Proj_2 = Projection() ->Proj_2.setUTM(47) ->Img_new = Img.reproj(20, Proj_2, "bicubic") -> |
See also (class function)
reproj2img
Purpose
To re-project an image into another map projection system. The result image will have the same size, same resolution, and same map projection as a template image specified in one of the function arguments.
The function is similar to function "reproj", except that it will create a new image, by using information from the image in the first argument, to store the rectified image.
This function can be used to fully control the size and resolution of the output rectified image. Hence the target result image can be generated before hand according to a certain specification, for example resolution, coordinates of lower left and upper right corner. Then it will be input as one of the argument in the function. The result rectified image will have exactly the same geometry as the pre-defined image.
All other detail explanation are same as that of function "reproj" and can be seen in function "reproj".
Class
Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln
Usage
{Image_rgb} ret = object.REPROJ2IMG({Image_uch} argm1, [{String} argm2])
argm1 = template image for the new re-projected image
argm2 = resample method, must be "nearest" or "bilinear" or "bicubic"
(default = "nearest")
Example:
->Img_new = Img.reproj2img(Img_new, "bicubic") -> |
See also (class function)
reproj
RECTIFY
Purpose
To rectify an image, sometimes called geo-coding, or geo-reference.
The transformation are determined by two given sets of control points, one is the xy-image rectangular coordinate system, the other in ground control coordinate system. If measurement are in row and column numbers, they must be converted to xy-coordinates using function "rc2xy" or "vecrc2xy", vidrc2xy". See details in section understanding coordinate system.
Control points in the two lists do not necessarily appear in the same order. Also the number of points may not be the same. The function will take only those points which have the same ID as control points.
Each x y coordinates can have a different weight, given by a standard deviation. In general both coordinate systems are treated as observations, provided that all coordinates have standard deviations. In case of when standard deviation is omitted, one coordinate system is kept as constant, for a sake of simplicity.
Transformation mathematic models available are conformal (4 parameters), affine (6 parameters), projective (8 parameters), and 2nd degree polynomial (10 parameters). This results in a different minimum number of control points, i.e. 2 points for conformal, 3 points for affine, 4 points for projective, and 5 points for 2nd order polynomial transformation.
Available resample types, interpolation methods, are nearest neighbor, bilinear, and bicubic interpolation.
This function does not check the accuracy of the transformation parameters, it simply calculates the transformation and uses them right away to resample the image. Therefore, it is recommended to check the quality of the transformation by performing a transformation using function in class "VecIdPt2D" and request a result report on a file. Once the measurement data are verified to have a good result, then image rectification can be proceeded.
The boundary of the result rectified image is determined automatically, using the specified resolution given by the user. If an image is to be rectified onto a pre-defined blank image, the function "rectify2img" must be used instead. In this case the user has a full control over the area coverage of the final result image.
There is a report file, named "RPT_rect.txt", generated by this function stored in the current working directory. This is to help user investigate the quality of transformation. The user is supposed to be responsible of deleting it.
Class
Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln
Usage
{Image_rgb} ret = object.RECTIFY({double} argm1, {VecIdPt2D} argm2, {VecIdPt2D} argm3, {String} argm4, [{String} argm5])
argm1 = required resolution of the result image (in ground unit)
argm2 = list of ID x y image rectangular coordinates of control point
argm3 = list of ID x y ground coordinates of control points
argm4 = transformation model, must be "conformal" or "affine" or "poly2nd" or "pjtive"
argm5 = resample method, must be "nearest" or "bilinear" or "bicubic"
(default = "nearest")
Example:
->Img_new = Img.rectify(20, vec_xy_img, vec_xy_gcp, "affine", "bicubic") -> |
See also (class function)
rectify2img
Purpose
To rectify an RGB image. The result image will have the same size and resolution as the template image specified in one of the function arguments.
The function is similar to function "rectify", except that it will create a new image, by using information from the image in the first argument, to store the rectified image.
This function can be used to fully control the size and resolution of the output rectified image. Hence the target result image can be generated before hand according to a certain specification, for example resolution, coordinates of lower left and upper right corner. Then it will be input as one of the argument in the function. The result rectified image will have exactly the same geometry as the pre-defined image.
There is a report file, named "RPT_rect.txt", generated by this function stored in the current working directory. This is to help user investigate the quality of transformation. The user is supposed to be responsible of deleting it.
All other detail explanations are same as that of function "rectify" and can be seen in function "rectify".
Class
Image, Image_flt, Image_int, Image_sht, Image_uch, Image_bln
Usage
{Image_rgb} ret = object.RECTIFY2IMG({Image_uch} argm1, {VecIdPt2D} argm2, {VecIdPt2D} argm3, {String} argm4, [{String} argm5])
argm1 = template image for the result rectified image
argm2 = list of ID x y image rectangular coordinates of control point
argm3 = list of ID x y ground coordinates of control points
argm4 = transformation model, must be "conformal" or "affine" or "poly2nd" or "pjtive"
argm5 = resample method, must be "nearest" or "bilinear" or "bicubic"
(default = "nearest")
Example:
->Img_new = Img.rectify2img(Img_new, vec_xy_img, vec_xy_gcp, "affine", "bicubic") -> |
See also (class function)
rectify
RES_X
Purpose
To report the resolution in x axis. This is the width of the image, in x y coordinate system unit, divided by no of columns.
Class
Image_rgb
Usage
{double} ret = object.RES_X()
See an example in function "RES_X" of class Image
Purpose
To report the resolution in y axis. This is the height of the image, in x y coordinate system unit, divided by no of rows.
Class
Image_rgb
Usage
{double} ret = object.RES_Y()
See an example in function "RES_Y" of class Image
Purpose
To convert to an Image_uch object, by keeping the blue color information.
Class
Image_rgb
Usage
{Image_uch} ret = object.RGB2B()
Example:
->Img_gray = Img.rgb2b() -> |
See also (class function)
rgb2r, rgb2g
Purpose
To convert to an Image_uch object, by keeping the green color information.
Class
Image_rgb
Usage
{Image_uch} ret = object.RGB2G()
Example:
->Img_gray = Img.rgb2g() -> |
See also (class function)
rgb2r, rgb2b
Purpose
To convert to an Image_uch object, by keeping the red color information.
Class
Image_rgb
Usage
{Image_uch} ret = object.RGB2R()
Example:
->Img_gray = Img.rgb2r() -> |
See also (class function)
rgb2b, rgb2g
Purpose
To convert from a row number to a y coordinate. Please note that the arguments of the function are of type double, which allows a sub-pixel row number to be converted to an accurate y coordinate.
Class
Image_rgb
Usage
{double} ret = object.RC2XY({double} argm1)
argm1 = row number
See an example in function "ROW2Y" of class Image
Purpose
To save as Noobeed format. The function creates two files, one for documentation and another for data.
The documentation file will have an extension ".txt". It is actually an ASCII file and must have exactly 15 lines (not including comment lines) , as follows.
|
The data file is in fact a generic binary file. However since there are 3 matrices to stored, which are red, green and blue matrix, they will be stacked together, by first writing all data for the red matrix, followed by the green matrix, and finally the blue matrix.
if a file name extension is not given, the function assumes an extension of ".txt" for documentation file and ".raw" for data file.
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Image_rgb
Usage
{void} object.SAVE({String} argm1, [{String} argm2])
argm1 = documentation file name
argm2 = data file name (default = same name as argm1 with extension ".raw")
See an example in function "SAVE" of class Image
Purpose
To save as bitmap (BMP) format. The image will be first converted to an 8-bit data, and the output file will have an 8-bit gray scale format. Losing of accuracy of data is unavoidable, if the original value range of data is beyond 8 bit, 0 to 255.
if a file name extension is not given, the function assumes an extension of ".bmp".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Image_rgb
Usage
{void} object.SAVEBMP({String} argm1)
argm1 = output file name
See an example in function "SAVEBMP" of class Image
Purpose
To save as Tag Image File (TIF) format. The Image will be first converted to an 8-bit data, and the output file will have an 8-bit gray scale format. Losing of accuracy of data is unavoidable, if the original value range of data is beyond 8 bit, 0 to 255.
if a file name extension is not given, the function assumes an extension of ".tif".
if a path name is not include in the specified file name, the function will search in the current data path, set by command "set path".
Class
Image_rgb
Usage
{void} object.SAVETIF({String} argm1)
argm1 = output file name
See an example in function "SAVETIF" of class Image
Purpose
To set the Matrix B, the blue color, of the Image_RGB, at particular coodinates, defined by a VecIndx object as the first argument, with a particular value specified by the second argument. This function is similar to the "SET" function of the class function of Matrix.
Class
Image_rgb
Usage
{void} object.SETB({VecIndx} argm1, {uchar} argm2)
argm1 = List of row column index, stored in a VecIndx object
argm2 = value to be set
See an example in function "SET" of class Matrix
Purpose
To set the Matrix G, the green color, of the Image_RGB, at particular coodinates, defined by a VecIndx object as the first argument, with a particular value specified by the second argument. This function is similar to the "SET" function of the class function of Matrix.
Class
Image_rgb
Usage
{void} object.SETG({VecIndx} argm1, {uchar} argm2)
argm1 = List of row column index, stored in a VecIndx object
argm2 = value to be set
See an example in function "SET" of class Matrix
Purpose
To set the Matrix R, the red color, of the Image_RGB, at particular coodinates, defined by a VecIndx object as the first argument, with a particular value specified by the second argument. This function is similar to the "SET" function of the class function of Matrix.
Class
Image_rgb
Usage
{void} object.SETR({VecIndx} argm1, {uchar} argm2)
argm1 = List of row column index, stored in a VecIndx object
argm2 = value to be set
See an example in function "SET" of class Matrix
SETSYMB
Purpose
To set a symbol at a particular coordinate in an Image. A symbol is realized by using a matrix, which is one of arguments given by the user.
Class
Image_rgb
Usage
{void} object.SETSYMB({double} argm1, {double} argm2, {Matrix_uch} argm3)
argm1 = x coordinate at which the center of the symbol is placed
argm2 = y coordinate at which the center of the symbol is placed
argm3 = matrix being used as a symbol to place on the calling matrix
See an example in function "SETSYMB" of class Image
Purpose
To report the size of an Image, no of rows and columns.
Class
Image_rgb
Usage
{Indx} ret = object.SIZE()
See an example in function "SIZE" of class Image
Purpose
To decrease the size of an Image by skipping a certain number of rows and columns.
Class
Image_rgb
Usage
{Image_uch} ret = object.SKIP({int} argm1)
argm1 = no of rows and columns being skipped
See an example in function "SKIP" of class Image
Purpose
To perform a general linear stretching.
Class
Image_rgb
Usage
{Image_rgb} ret = object.STRETCH([{double} argm1, {double} argm2])
argm1 = start value of the stretching range (default = 0)
argm2 = end value of the stretching range (default = 255)
See an example in function "STRETCH" of class Image
Purpose
To perform a stretching using histogram equalization.
Class
Matrix_uch
Usage
{Image_rgb} ret = object.STRETCHEQ([{double} argm1, {double} argm2])
argm1 = start value of the stretching range (default = 0)
argm2 = end value of the stretching range (default = 255)
Example:
->Img_new = Img.stretcheq() -> |
See also (class function)
stretchfix, stretchsat, stretch
Purpose
To perform a linear stretching with fix interval. In other words, the stretching will be done within a specific range.
Values that are less than the specified range will be assigned the new value as the minimum value of the stretching range. Values that are larger than the specified range will be assigned the new value as the maximum value of the stretching range.
Class
Image_rgb
Usage
{Image_rgb} ret = object.STRETCH({double} argm1, {double} argm2, [{double} argm3, {double} argm4])
argm1 = start value of the original range being stretched
argm2 = end value of the original range being stretched
argm3 = start value of the stretching range (default = 0)
argm4 = end value of the stretching range (default = 255)
See an example in function "STRETCHFIX" of class Image
Purpose
To perform a linear stretching with saturation.
The user gives an amount of percent, a so-called percent of saturation, say 5 percents. Then the function calculate 2 fixed values. One is the value that 5 percents of the data will have values less than it. The second one is the value that 5 percents of the data will have values larger than it. These two fixed values will be used to perform a linear stretching with fixed interval.
Class
Image_rgb
Usage
{Image_rgb} ret = object.STRETCHSAT({double} argm1, [{double} argm2, {double} argm3])
argm1 = percent of saturation
argm2 = start value of the stretching range (default = 0)
argm3 = end value of the stretching range (default = 255)
See an example in function "STRETCHSAT" of class Image
Purpose
To report x y coordinate of the upper left corner of the image.
Class
Image_rgb
Usage
{Pt2D} ret = object.UPPER_LEFT()
See an example in function "UPPER_LEFT" of class Image
Purpose
To report x y coordinate of the upper right corner of the image.
Class
Image_rgb
Usage
{Pt2D} ret = object.UPPER_RIGHT()
See an example in function "UPPER_RIGHT" of class Image
Purpose
To convert from a vector of row and column numbers to a vector of x y coordinates.
Class
Image_rgb
Usage
{VecPt2D} ret = object.VECRC2XY({VecPt2D} argm1)
argm1 = list of row and column numbers
See an example in function "VECRC2XY" of class Image
Purpose
To convert poly-lines represented by row and column numbers, VecRCpline objects, to poly-lines represented by x y coordinates, VecXYpline objects.
Class
Image_rgb
Usage
{VecXYpline} ret = object.VECRCPLINE2XY({VecRCpline} argm1)
argm1 = list of poly-lines in row and column numbers
See an example in function "VECRCPLINE2XY" of class Image
Purpose
To convert from a vector of x y coordinates to a vector of row and column numbers.
Class
Image_rgb
Usage
{VecIndx} ret = object.VECXY2RC({VecPt2D} argm1)
argm1 = list of x y coordinates
See an example in function "VECXY2RC" of class Image
Purpose
To convert poly-lines represented by x y coordinates, VecXYpline objects, to poly-lines represented by row and column numbers, VecRCpline objects.
Class
Image_rgb
Usage
{VecRCpline} ret = object.VECXYPLINE2RC({VecXYpline} argm1)
argm1 = list of poly-lines in x y coordinates
See an example in function "VECXYPLINE2RC" of class Image
Purpose
To convert from a vector of IdIndx objects, ID with row and column numbers, to a vector of IDPt2D, ID with x y coordinates.
Class
Image_rgb
Usage
{VecIdPt2D} ret = object.VIDRC2XY({VecIdPt2D} argm1)
argm1 = list of ID, row, and column numbers
See an example in function "VIDRC2XY" of class Image
Purpose
To convert from a vector of IDPt2D, ID with x y coordinates, to a vector of IdIndx objects, ID with row and column numbers.
Class
Image_rgb
Usage
{VecIdIndx} ret = object.VIDXY2RC({VecIdPt2D} argm1)
argm1 = list of ID, x and y coordinates
See an example in function "VIDXY2RC" of class Image
Purpose
To virtually load an Image object, saved as Noobeed format. The document file is read but not the data file. Unlike the VLOAD function of class Matrix and Image, where the file is opened to get ready for reading, the VLOAD fnction of Image_rgb object does not open the data file. The user has no access to the content in the data file.
Please note that only a limited set of functions is available for a virtually loaded matrix.
Class
Image_rgb
Usage
{void} object.VLOAD({String} argm1, [{String} argm2])
argm1 = file name for the documentation file (default extension is ".txt")
argm2 = file name for the data file
(default file name is same file name as argm1 with an extension ".raw")
See an example in function "VLOAD" of class Image
Purpose
To cut a window out of an Image. This function does not perform resample, therefore the result window image is the nearest possible to the required cutting window. If an exact window of image is wanted, the user can prepare a desired blank image and use function "overlay" to get the result.
Class
Image_rgb
Usage
{Image_rgb} ret = object.WINDOW({double} argm1, {double} argm2, {double} argm3, {double} argm4)
argm1 = x coordinate of the lower left corner of the window
argm2 = y coordinate of the lower left corner of the window
argm3 = x coordinate of the upper right corner of the window
argm4 = y coordinate of the upper right corner of the window
See an example in function "WINDOW" of class Image
Purpose
To convert from an x coordinate to a column number.
Class
Image_rgb
Usage
{int} ret = object.X2COL({double} argm1)
argm1 = x coordinate
See an example in function "X2COL" of class Image
Purpose
To convert from an x y coordinate to row and column index number.
Class
Image_rgb
Usage
{Index} ret = object.XY2RC({double} argm1, {double} argm2)
argm1 = x coordinate
argm2 = y coordinate
See an example in function "XY2RC" of class Image
Purpose
To convert from a y coordinate to a row number.
Class
Image_rgb
Usage
{int} ret = object.Y2ROW({double} argm1)
argm1 = y coordinate
See an example in function "Y2ROW" of class Image