Image_rgb

| HOME | BACK |

Overview

Image_rgb contains 3 Matrix_uch objects, along with some additional spatial information.  The three matrix_uch objects are for three colors, namely red, gree, and blue.  Its main purpose is to make possible a color image able to be placed in a 2 dimensional space.  Map projection information is also added to handle various types of Geographic information data.

An image_rgb object has a full access to all class functions of matrix_uch, as well as its own class functions. 

Member data

Name Data type Meaning
id int ID of an image
R Matrix_uch a matrix_uch object
G Matrix_uch a matrix_uch object
B Matrix_uch a matrix_uch object
lower_left Pt2D coordinate of lower left corner of an image
upper_right Pt2D coordinate of upper right corner of an image
projection Projection map projection of an image

 

Operator

See details in operator section.

 

Construction function

{Image_rgb} ret  =  IMAGE_RGB([{int} argm1, {int} argm2, {double} argm3, {double} argm4, {double} argm5, {double} argm6, {Projection} argm7])

argm1 = no of row                      (default = 0)

argm2 = no of column                   (default = 0)

argm3 = x coordinate (lower left)      (default = 0)

argm4 = y coordinate (lower left)      (default = 0)

argm5 = x coordinate (upper right)     (default = 0)

argm6 = y coordinate (upper right)     (default = 0)

argm7 = map projection                 (default = default of Projection())

Example:

->Img = Image_rgb() an empty image

->Img = Image_rgb(100,200)

 

 

an image with 100 rows and 200 columns,

lewer left = (0,0) upper right = (200,100)

Projection = default value of function Projection()

 

Lfunction

object.ID()          =  {int} left-value

object.LOWER_LEFT()  =  {Pt2D} left-value

object.UPPER_RIGHT(){Pt2D} left-value

object.R()           =  {Matrix_uch} left-value

object.G()           =  {Matrix_uch} left-value

object.B()           =  {Matrix_uch} left-value

object.PROJ()        =  {Projection} left-value

object.FLAG_NULL()   =  {bool} left-value

object.NULLDATA()    =  {double} left-value

Remark:  The left function "FLAG_NULL" and "NULLDATA" will set values to the flag_null and nulldata of the R G B Matrix members of the calling Image_rgb object.

 

Example:

->Img.lower_left() = Pt2D(10,200) set lower left point coordinate
->Img.upper_right() = Pt2D(100.536 ,2000.500) set upper right point coordinate
->P = Projection()

->P.setUTM(47)

->Img.projection() = P

set a particular map projection
->A = [ 1 2 3; 4 5 6; 7 8 9]

->Img.R() = A 

 

change content of matrix to matrix "A"

If size of A is conflict to other member matrices, e.g. G or B, an error message is reported. 

Class function

 A-D  E-H  I-L M-P Q-S T-Z
ANAGLYPH FILLPOLY ID MAKELEFT R UPPER_LEFT
B FLAG_NULL IS_COVER MAKERIGHT RGB UPPER_RIGHT
BLANK G LOAD MOSAIC RC2XY VECRC2XY
COL2X HSV LOADBMP NCOL REPROJ VECRCPLINE2XY
COVERAGE HSV2RGB LOADTIF NROW REPROJ2IMG VECXY2RC
DRWCIRCLE   LOWER_LEFT NULLDATA RECTIFY VECXYPLINE2RC
DRWELLIPSE   LOWER_RIGHT OVERLAY RECTIFY2IMG VIDRC2XY
DRWLINE     PROJ RES_X VIDXY2RC
DRWPLINE       RES_Y VLOAD
DRWPOINT       RGB2B WINDOW
DRWRECTANG       RGB2G X2COL
DRWSQUARE       RGB2R XY2RC
DRWTEXT       ROW2Y Y2ROW
DRWVECCIRCLE       SETB  
DRWVECPLINE       SETG  
DRWVECTEXT       SETR  
        SAVE  
        SAVEBMP  
        SAVETIF  
        SETSYMB  
        SIZE  
        SKIP  
        STRETCH  
        STRETCHFIX  
        STRETCHSAT  
        STRETCHSAT  

 


| HOME | BACK |