Routines



GetGrayPix routine


Get the graylevel of one certain pixel in an image object in the memory.

required external library: image

int GetGrayPix( GrayImage img, unsigned int x, unsigned int y, unsigned char graylevel );


Parameters

img [in] GrayImage variable that embed the image in memory
x [in] column of pixel whose colour is about to changed
y [in] line of pixel whose colour is about to changed
graylevel [out] level of gray attribute of the pixel; value 0 is associated with black and value 255 with white colour

Return values

If the pixel line and column direct to outside the image boundary, the graylevel output parameter is not set according to the graylevel of specified pixel and the routine's return value is 0. Otherwise is 1.

Example code

loadlib base;
loadlib image;


GrayImage i;
main()
{
unsigned char c;
...
LoadGrayImage(i,"anger.bmp");
GetGrayPix(i,10,10,c);
printf("The level of gray of specified pixel is ",c);
}


Requirements

  • external dynamic link library: image.dll on the server


  • If interested in this project, please fell free to contact the personnel of our group. The project leader is dr.drs. L.J.M. Rothkrantz