 [Contents] [TitleIndex] [WordIndex]

# Weekly Report (19th-30th July)

## Introduction

This is the report of Pallan Madhavan for the GSOC 2012 on the project "Scilab Image Processing Toolbox (SIP) " for the period 19th-30th July 2012.

### Converting Scilab matrices to Pix

#### sci_2D_double_matrix_to_pix function

The above function is used to convert Scilab 2 Dimensional double matrix to PIX of leptonica, with the help of this function we can get the Index value by IndexImgByColInPix and do the necessary operations on the PIX available in leptonica.This function is generally used for binary images and indexed images.Here,we have used pixSetPixel function which is used to set pixel value.

#### sci_3D_double_hypermat_to_pix

The above function is used for conversion of Scilab 3 Dimensional hypermatrix to PIX of leptonica,with this interfacing function we can convert scilab 3 Dimensional hypermatrix to PIX of leptonica.This is generally used for true color images.The RGB values are set again using pixSetRGBPixel and PIX is formed,on which one can do necessary operation.

#### sci_index_map_to_pix

This function converts index matrix and map matrix to PIX of leptonica,the above function is used to create pix by setting RGB values corresponding to the index value of the colormap.Thus one can now convert indexed image into pix using 2D indexed double matrix and colormap to PIX and thus perform leptonica functions on it.

### Converting Pix to Scilab matrices

#### pix_binary_image_to_double_array

This function converts pix binary image to scilab 2D double matrix,making it more easier for scilab to perform other operation available in siptoolbox.As every operation done is in scilab matrices.Time taken by every operation is minimal.

#### pix_truecolor_image_to_double_hypermat

This function converts pix true color image to 3D double hypermatrix ,the above function is used to create 3D double hypermatrix by getting RGB values from every pixel with the help of pixGetRGBPixel function available in leptoncia. Thus we get 3D double hypermatrix from it.

#### pix_index_map_to_sci_dbl

This function converts pix containing indexed matrix and colormap into scilab double matrices. We thus use pixGetColormap,which is used to get colormap of an image from PIX.Also pixcmapGetCount is used to count the index of an image and pixGetPixel used to get index of an image.

### Things learnt

Interfacing function helped me understanding the nature of image.This also included testing of various functions in leptonica.Understanding how the pixel values are to be stored in the matrix took a lot of planning and testing time.

### Commits

```03c5d05e47e4960bac1c49c41d2786a97ff0f3ca
003d188955d0b2df890bdf70d26ae5bb8bf763af