# Weekly Report (19th-30th July)

Contents

## 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.

## Task List

### 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 f54cc0f7349d5b5d9ebc70134a61f5fdf75ad1c5 5feadb112ab9761fdcb66c2d557d25e5b7e65ee3 7554dc5a00da3a39cca70c9e6755e6dd9a5f279d 2255225d73aa2227135796ddd27931b49fd2811b e6e60e6e1231ca1f6522a24008449d67ca291ddf 3befe639999f5990db9c17c913e8fd83b5c330dd 35469d67e41ee5446c9b14d32bf440571db873ce e21040111d36a7f489e8ee7c09f2997bd4a49804 ac62cbe7aa045e739e01f2b84e9e179972f17004 9078a4caf1ad1dfcc901be66315913a8de3b78f7 f14056f957ba8236b03f757d0558d68d2418e5a