SIP(Scilab Image Processing Toolbox) +Scilab
Introduction
This is the report of Pallan Madhavan for the GSOC 2012 on the project "Scilab Image Processing Toolbox (SIP) "
Deliverables
Implementation of all the necessary interface functions from the C library of leptonica into SIP, and making it available to Scilab with the help of SIP.
Interface function
1) Conversion of 2 dimensional double Scilab matrix to PIX of Leptonica.
- Function available - sci_2D_double_matrix_to_pix
2) Conversion of 3 dimensional hypermatrix to PIX of Leptonica.
- Function available - sci_3D_double_hypermat_to_pix
3) Conversion of index and map matrix to PIX of Leptonica.
- Function available - sci_index_map_to_pix
4) Conversion of 2 dimensional gray double matrix to PIX of Leptonica.
- Function available - sci_2D_gray_double_matrix_to_pix
5) Conversion of PIX of Leptonica to Scilab 2 dimensional double matrix to
- Function available - pix_binary_image_to_double_array
6) Conversion of PIX of Leptonica to Scilab 2 dimensional gray double matrix to
- Function available - pix_gray_image_to_double_array
7) Conversion of PIX of Leptonica to Scilab 3 dimensional hypermatrix
- Function available - pix_truecolor_image_to_double_hypermat
8) Conversion of PIX of Leptonica to Scilab index and map double matrix
- Function available - pix_index_map_to_sci_dbl
C interface Functions available in Scilab through Siptoolbox
Implemented the two main function deskew and dewarp of document image analysis which are best available in leptonica C library for Document image analysis is now available in Scilab with the help of Siptoolbox.
Deskew function
Deskew helps to deskew a document using the Postl's variance of line sums (or of differential line sums).This method is recommended for both speed and accuracy,and is thus available in leptonica library.
Dewarp function
Dewarp function helps us to dewarp a camera image based on text lines.It includes a series of process.Some of the main processes include background normalization and binarization of the given image.
Documentation
There are two help pages (.xml files )available for deskew and dewarp respectively under the help folder. These two help pages thoroughly document both the functions by giving example and format to use the function depending on the various type of image. There are also necessary link to the original source content and references pages.
Micro blogging through AA and Screencast
Daily reports submission through AA, and necessary screencast were made available showing the working of :
- The C interface functions deskew and dewarp .
- Detection of leptonica in SIP .
- Working of interface functions for leptonica .
- Test macros for deskew and dewarp.
( AA is a social system for coordinating distributed teamwork where each participant stays logged for at least 2 hours a day, publicly microblogging their development activities related to assigned tickets (self-assigned or team-assigned). At the end of each daily session, a video log is recorded and uploaded to a public video channel, the text log is also published on the Web and is peer-validated for quality. The AA system and its underlying software engineering methodology enables self-funding for distributed collectives of developers working on FLOSS projects.)
Test macros for deskew and dewarp
Test macros unlike test_deskew.sci and test_dewarp.sci are now available in SIP . The macros helps in testing deskew and dewarp for 3 different types of images,unlike Indexed image,truecolor image and grayscale image.It also gives the necessary scilab matrices for showing the result
* test_deskew.sci - for deskew function . * test_dewarp.sci - for dewarp function .
Now, This can also be generalised for adding as many leptonica functions as available in C library of leptonica in Scilab depending on the need, with the help of SIP. All the above deliverables are available to the best of my knowledge.
Timeline
- Till May 21: Run Leptonica and SIP, and getting more familiar with them,getting a more concise idea of how to implement the added functionality from the Google FLOSS project Leptonica.
- Week 1: Submitting reports using ‘AA (client)’. Make a small contribution to Leptonica .
- Week 2 to 4: Study and write the necessary C infrastructure to interface Leptonica image Structures with Scilab matrices. Submit report to mentor, every week.
- Week 5 to 7: Start with interfacing a Leptonica functionality with Scilab and document it.Before the mid-term Evaluation,Submit report to mentor and submit the completed patch covering work till now.
- Week 8 to 10: Prioritizing functions that can be only be found in Leptonica and then interfacing with Scilab. submitting report to the mentor using AA.
- Week 11 and 12:.A Final check of all the functions of Leptonica to be interfaced with Scilab and check for the deprecated functions if found. and submit report to the mentor.
- Week 13 and 14: Thoroughly document the library interfaced to scilab.Prepare a final report for the mentor and patch covering all the work done during the SoC.
Reports
- * Report-1
https://scilab.gitlab.io/legacy_wiki/Contributor-Pallan-Madhavan-GSOC2012/report-2012-06-03
- * Report-2
https://scilab.gitlab.io/legacy_wiki/Contributor-Pallan-Madhavan-GSOC2012/report-2012-06-18
- * Report-3
https://scilab.gitlab.io/legacy_wiki/Contributor-Pallan-Madhavan-GSOC2012/report-2012-07-04
- * Report-4
https://scilab.gitlab.io/legacy_wiki/Contributor-Pallan-Madhavan-GSOC2012/report-2012-07-18
- * Report-5
https://scilab.gitlab.io/legacy_wiki/Contributor-Pallan-Madhavan-GSOC2012/report-2012-07-30
- * Report-6
https://scilab.gitlab.io/legacy_wiki/Contributor-Pallan-Madhavan-GSOC2012/report-2012-08-19
Final Report
http://www.google-melange.com/gsoc/project/google/gsoc2012/mady902/41001
== (Archive Link)== https://www.google-melange.com/archive/gsoc/2012/orgs/scilab/projects/mady902.html