On Tue, Mar 29, 2011 at 1:15 PM, sourav de <souravde1...@gmail.com> wrote:

>
>
> On Tue, Mar 29, 2011 at 4:11 AM, Mukund Sivaraman <m...@banu.com> wrote:
>
>> Hi Sourav
>>
>> On Tue, Mar 29, 2011 at 12:36:04AM +0530, sourav de wrote:
>> > Hi,
>> >
>> >    I am a 2nd year student of the department of Computer Science and
>> > Engineering at Indian Institute of Technology, Kharagpur ,and  I am
>> > interested in the plugin for cartoonization of an image in GIMP.
>>
>> I gather you want to modify the cartoon plug-in in GIMP?
>>
>> The plug-in porting task that you have mentioned in the subject is to
>> directly port GIMP plug-ins to GEGL ops.  No modification of
>> functionality is necessary.  It is described here:
>>
>>
>> http://gimp-wiki.who.ee/index.php?title=Hacking:GSoC_2011/Ideas#Porting_GIMP_plugins_to_GEGL_operations
>>
>> It is not a task of porting only 1 plug-in, but about 6-10 plug-ins per
>> student.  1 plug-in is a very easy task and will not be sufficiently
>> long for a full summer's work.
>>
>> To apply for this task, please present the items mentioned on the
>> linked wiki page.
>>
>> ----
>>
>> However, if you wish to modify the cartoon plug-in, that sounds
>> interesting too.  It can be a different task.  Can you describe what is
>> lacking in the current approach in the GIMP plug-in?  What is the
>> algorithm that you plan to use ?  You say you are doing a project on
>> algorithmic art..  have you published anything on the methods you wish
>> to use in this cartoon plug-in?  Are you using any other published
>> works?
>>
>> Note that we _may_ accomodate more tasks if they are of a high quality
>> and we are satisfied with how the student presents it.
>>
>>                Mukund
>>
>
> Thank you sir, for your comments, I'll come up with the presentation of
> those plug-ins mentioned in the wiki page and algorithm for the
> cartoonization plug-in soon.
>     And for the project on algorithmic art, I took this project in my
> current semester, I'll have to take the course Computer Graphics in my next
> semester to complete the project. So far I haven't yet publish any paper.
>
>
> --
> Sourav De
> 2nd Year Student
> Department of Computer Science and Engineering
> IIT KHARAGPUR
>
>
   I wrote the code review for gaussian blur as it given here

   http://git.gnome.org/browse/gegl/tree/operations/common/gaussian-blur.c


   But I'm not familiar with writing code review and algorithmic
description. Here goes my code review.


<---code review starts here>

Gaussian blur operation code review:

1. function-1 : static void iir_young_find_constants (gfloat  sigma,gdouble
*B,gdouble *b)

a. the variable sigma is to avoid unexpected ringing at tile boundaries of
an image.
b. there exists a variable q, whose value must be remained in between 0 -
1.5, and according to the value of sigma there are two procedures to
calculate the value of q.
c. lastly it sets the value of the variables b[0] to b[3] and B, and then
returns.

2. function-2 : static inline void iir_young_blur_1D (gfloat  * buf,gint
offset,gint delta_offset,gdouble B,gdouble *b,gfloat  * w,gint w_len)

a. this function blurrifies an image one dimensionally.
b. wlen is the length of the 1d array w passed.
c. here an image would be blurrified in two steps, applying forward and
backward filter for each pixel, a local variable wcount counts the number of
pixels each time.
d. the filter would be applied to the image according to the passed array w.


3. function-3 : static void iir_young_hor_blur (GeglBuffer *src,const
GeglRectangle *src_rect,GeglBuffer *dst,const GeglRectangle
*dst_rect,gdouble  B,gdouble *b)

a. this function blurrifies an image horizontally.
b. first it creates an one dimensional array buf whose length is
height*width*4, where height and width is height and width of the source
image rectangle.
c. then it creates another one dimensional array w with the length of the
width of the source image.
d. after then it fills the values of buf array according to the source image
in RaGaBaA format.
e. then it applies the iir_young_blur_1D function to the newly generated
ractangles.
f. lastly it stores the change in a destination array and returns.

4. function-4 : static void iir_young_ver_blur (GeglBuffer *src,const
GeglRectangle *src_rect,GeglBuffer *dst,const GeglRectangle
*dst_rect,gdouble  B, gdouble *b)

a. this function blurrifies an image vertically.
b. first it creates an one dimensional array buf whose length is
height*width*4, where height and width is height and width of the source
image rectangle.
c. then it creates another one dimensional array w with the length of the
height of the source image.
d. after then it fills the values of buf array according to the source image
in RaGaBaA format.
e. then it applies the iir_young_blur_1D function to the newly generated
ractangles.
f. lastly it stores the change in a destination array and returns.

5. function-5 : static gint fir_calc_convolve_matrix_length (gdouble sigma)

a. depending upon the value of sigma it returns an integer which partially
determines the width and height of the convolution matrix for image
transformation.

6. function-6 : static gint fir_gen_convolve_matrix (gdouble sigma,gdouble
**cmatrix_p)

a. first it sets the value of matrix-length by calling
fir_calc_convolve_matrix_length function with sigma passed as a variable.
b. then it creates the convolution matrix.
c. finally it completes the whole convolution matrix by certain calculation,
copies it to the cmatrix_p, and returns matrix_length.

7. function-7 : static inline float fir_get_mean_component_1D (gfloat  *
buf,gint offset,gint delta_offset,gdouble * cmatrix,gint matrix_length)

a. it returns the mean of the 1d array buf created previously,

8. function-8 : static void fir_hor_blur (GeglBuffer *src,const
GeglRectangle *src_rect,GeglBuffer *dst,const GeglRectangle *dst_rect,
gdouble *cmatrix,gint matrix_length,gint  xoff)

a. this function also blurrifies an image horizontally, by creating a
buffered array,but it blurrifies with a rectangle of given width and height,
and offsets between source and destination array according to the value of
xoff and radius.

9. function-9 : static void fir_ver_blur (GeglBuffer *src,const
GeglRectangle *src_rect,GeglBuffer *dst,const GeglRectangle *dst_rect,
gdouble  *cmatrix,gint matrix_length,gint off)

a. this function also blurrifies an image verically, by creating a buffered
array,but it blurrifies with a rectangle of given width and height, and
offsets between source and destination array according to the value of yoff
and radius.


<code review ends here--->

Can anyone please help me with writing code review of a given code, by
telling me whether it's a proper way to write code review or not?


-- 
Sourav De
2nd Year Student
Department of Computer Science and Engineering
IIT KHARAGPUR
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to