# GSoC 2019 - Improving Processing (Python)

**URL:** <https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644>\
**Category:** Summer of Code\
**Created:** [March 26, 2019, 2:18pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644 "2019-03-26T14:18:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sushanti](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sushanti/32/4275_2.png) [@Sushanti](https://discourse.processing.org/u/Sushanti)\
**Post date:** [March 26, 2019, 2:18pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/1 "2019-03-26T14:18:15Z")

</div>

Hello!

I’m Sushanti from Vellore Institute of Technology, India.

I’m currently looking to begin my GSoC journey. I would be more than interested in working with Processing for Python specifically working on Image Processing libraries, creating and improvising codes for flocking, particle systems, object motion, etc.

I would like to go ahead and propose a project for the same and work under a mentor for GSoC. Could somebody kindly guide me through the process? I would also love to get in touch with others working along these lines and have a chat.

---

<div class="post-metadata">

**Author:** ![abhikpal](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@abhikpal](https://discourse.processing.org/u/abhikpal)\
**Post date:** [March 27, 2019, 10:34am UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/2 "2019-03-27T10:34:30Z")

</div>

I’m assuming you’re referring to the native Python port of Processing  
[https://github.com/p5py/p5](https://github.com/p5py/p5).

> would be more than interested in working with Processing for Python  
> specifically working on Image Processing libraries, creating and  
> improvising codes for flocking, particle systems, object motion,  
> etc.

Is there something specific you have in mind? For the last summer of  
code we added image support to p5py (see release notes:  
[https://p5.readthedocs.io/en/latest/releasenotes/0.5.0.html](https://p5.readthedocs.io/en/latest/releasenotes/0.5.0.html)). What  
extensions to Image support do you have in mind?

In general, we’ve listed the issues that need work (and will be  
priority for) in this GSOC. Take a look at them here:  
[https://github.com/processing/processing/wiki/Project-List#-native-python-and-processing-priority](https://github.com/processing/processing/wiki/Project-List#-native-python-and-processing-priority)

Would be happy to answer more questions!

---

<div class="post-metadata">

**Author:** ![Sushanti](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sushanti/32/4275_2.png) [@Sushanti](https://discourse.processing.org/u/Sushanti)\
**Post date:** [March 27, 2019, 4:34pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/3 "2019-03-27T16:34:50Z")

</div>

Hello Abhik!

Having worked with Image processing (specifically OpenCV) extensively, I would like to work on improving the Image Shape class. I would also like to work on adding additional features to the existing libraries.  
Like last year’s GSoC consisted of making circles when pressed with a mouse, I would like to develop something which bridges the gap between OpenCV and Processing and find a middle ground.

An idea that I think would work is including Contours, Edge detection, etc.

@abhikpal any suggestions about this and how I can go about preparing a proposal and more so where to focus on?

---

<div class="post-metadata">

**Author:** ![abhinavsagar](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@abhinavsagar](https://discourse.processing.org/u/abhinavsagar)\
**Post date:** [March 28, 2019, 7:00pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/4 "2019-03-28T19:00:57Z")

</div>

@Sushanti I think that’s a great idea. Currently I am also working on similar areas and using the same for my gsoc proposal as well. Let me know if we could collaborate on this.

---

<div class="post-metadata">

**Author:** ![abhikpal](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@abhikpal](https://discourse.processing.org/u/abhikpal)\
**Post date:** [March 29, 2019, 8:51am UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/5 "2019-03-29T08:51:24Z")

</div>

> Having worked with Image processing (specifically OpenCV)  
> extensively, I would like to work on improving the Image Shape  
> class. I would also like to work on adding additional features to  
> the existing libraries.

Unless I’m missing something, I don’t see how OpenCV relates to the  
existing Image and Shape classes. In its current form, the Image class  
is just used to render external images and the Shape class just helps  
drawing and manipulating 2D shapes.

> An idea that I think would work is including Contours, Edge  
> detection, etc.
> 
> @abhikpal any suggestions about this and how I can go about  
> preparing a proposal and more so where to focus on?

p5py doesn’t have any video support at the moment. If you’re  
interested in working with OpenCV focusing on adding video support  
first might be a feasible summer goal (this is also listed in the  
Project List).

I would also recommend writing a prototype first to gauge the  
difficulty of the project. It will also give us an idea of what needs  
to change internally.

---

<div class="post-metadata">

**Author:** ![Sushanti](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sushanti/32/4275_2.png) [@Sushanti](https://discourse.processing.org/u/Sushanti)\
**Post date:** [March 29, 2019, 7:00pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/6 "2019-03-29T19:00:42Z")

</div>

Hello Sir!  
Thank you for the reply. I was a little confused about what exactly the beginContour() and endContour() does. Now that I have read about their official documentation, I have a fair idea about contour and shape classes.

I had an idea in terms of SVG - when pressed and pulled - to enhance the image and then turn the process into an animation. I also think we can incorporate functions like translate(), rotate() and scale() into this. It feels like this idea can go forward Sir.  
Example : Say there’s an image, the user can drag the image from the original size. We can take each frame of this and turn it into an animation and let the user manually input the rotate or translate function. We can have a small video of anyone’s face zooming in and zooming out while rotating and translating.

Any thoughts about this idea Sir? @abhikpal

---

<div class="post-metadata">

**Author:** ![Sushanti](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sushanti/32/4275_2.png) [@Sushanti](https://discourse.processing.org/u/Sushanti)\
**Post date:** [March 29, 2019, 7:03pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/7 "2019-03-29T19:03:02Z")

</div>

Sure! Would love to get in touch and discuss ideas.

---

<div class="post-metadata">

**Author:** ![abhikpal](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@abhikpal](https://discourse.processing.org/u/abhikpal)\
**Post date:** [March 30, 2019, 10:54pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/8 "2019-03-30T22:54:10Z")

</div>

> I had an idea in terms of SVG - when pressed and pulled - to enhance  
> the image and then turn the process into an animation. I also think we  
> can incorporate functions like translate(), rotate() and scale() into  
> this. It feels like this idea can go forward Sir.

Are you thinking about something like this  
[https://processing.org/examples/animatedsprite.html](https://processing.org/examples/animatedsprite.html)? In combination  
with the other things you already mentioned (contours, adding SVG  
support, etc), I would also consider addressing one more related point  
(say, improving font support, for instance).

This could make for an interesting proposal.

---

<div class="post-metadata">

**Author:** ![Sushanti](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sushanti/32/4275_2.png) [@Sushanti](https://discourse.processing.org/u/Sushanti)\
**Post date:** [April 1, 2019, 7:21pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/9 "2019-04-01T19:21:49Z")

</div>

Hello Sir!  
Thank you for this.  
I went through all the examples listen on [https://processing.org/examples/animatedsprite.html](https://processing.org/examples/animatedsprite.html) and I found some of them to be really interesting under Drawing, Interaction, Animation and Image Processing. I see that last year’s GSoC project was inspired from the ‘Pattern’ code.

I would like to form a proposal to make something new along the lines of Drawing/Image Processing and implement all of this for p5py. For eg: using the mouse to adjust the size of the image while incorporating translate or rotate and turning this into an animation in the end, plus improving the font support as suggested by you.  
Does this align with the priorities set for this year’s GSoC Sir? I would also appreciate some tips about how I can work on my proposal for this Sir.

On a parallel note, have Image processing examples present in Java(brightness, edge detection, blur,etc) been implemented for Python? If yes, are there any further improvements needed for the same?

---

<div class="post-metadata">

**Author:** ![Sushanti](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sushanti/32/4275_2.png) [@Sushanti](https://discourse.processing.org/u/Sushanti)\
**Post date:** [April 5, 2019, 4:47am UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/10 "2019-04-05T04:47:53Z")

</div>

@abhikpal

Hello Sir!  
I’m in the process of making my proposal. Does the following align with this year’s priority list?

GSoC 2019 Deliverables:

- Improvisation of Image classes namely beginContour(), endContour() to bring the Python mode on par with Java.
- Addition of codes to p5py:

1. User interactive animation: The user gets to upload an image, drag it out, add concepts like translate(), rotate() and this entire process will be turned into an animation.
2. Ripple simulation: The user can press anywhere on the screen and the it creates ripples from that point continuously in decrementing intensity. The color of the ripple will be different every time the user presses it.

- Building on the font support from last year

---

<div class="post-metadata">

**Author:** ![abhikpal](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@abhikpal](https://discourse.processing.org/u/abhikpal)\
**Post date:** [April 5, 2019, 12:43pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/11 "2019-04-05T12:43:04Z")

</div>

> [@Sushanti](#):
>
> - Improvisation of Image classes namely beginContour(), endContour() to bring the Python mode on par with Java.
> - Addition of codes to p5py:
> 
> 1. User interactive animation: The user gets to upload an image, drag it out, add concepts like translate(), rotate() and this entire process will be turned into an animation.
> 2. Ripple simulation: The user can press anywhere on the screen and the it creates ripples from that point continuously in decrementing intensity. The color of the ripple will be different every time the user presses it.
> 
> - Building on the font support from last year

Font support and improvements to the Shape class seem reasonable. The  
additional points you mention are closer to p5py examples than core  
features of the library. I would recommend tacking some additional  
point from the main project list.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [April 5, 2019, 3:00pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/12 "2019-04-05T15:00:27Z")

</div>

I agree with @abhikpal that contour and font support (plus perhaps some others) seem like a good idea. An image animator and ripple simulator do _not_ seem like good ideas for a GSOC proposal – focus on core library features (which would be used by many different kinds of software, not on demos. You could also make simple demos as part of documenting features, but the demos should not be the main focus of your application – the main goal is to enable programmers, not to give people fun apps.

* * *

One minor note for your application: you should write “improve” / “improving” image classes. “Improvise” / “Improvising” / “Improvisation” is to create something in the moment with no pre-arranged plan, as in “improv comedy” or jazz music improvisation.

- [https://en.wikipedia.org/wiki/Improvisation](https://en.wikipedia.org/wiki/Improvisation)

Instead you want to make things better, to improve things, to make an improvement:

- [https://www.merriam-webster.com/dictionary/improve](https://www.merriam-webster.com/dictionary/improve)
- [https://en.wikipedia.org/wiki/Improvement](https://en.wikipedia.org/wiki/Improvement)

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [April 5, 2019, 3:13pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/13 "2019-04-05T15:13:10Z")

</div>

> [@abhikpal](#):
>
> User interactive animation

If you are interested in supporting this with extra features at the library level, I would also suggest going through the examples lists of the Processing API – including as implemented in Java or JavaScript – and spend a few minutes trying as many of them out as possible, to get a better sense of all the things that Processing already does.

- [Examples / Processing.org](https://processing.org/examples/)
- [examples | p5.js](https://p5js.org/examples/)

After that, take another look at the p5py priority list – a key goal for p5py is to close the gap with what p5 / p5.js can already do.

---

<div class="post-metadata">

**Author:** ![Sushanti](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sushanti/32/4275_2.png) [@Sushanti](https://discourse.processing.org/u/Sushanti)\
**Post date:** [April 5, 2019, 6:09pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/14 "2019-04-05T18:09:47Z")

</div>

@jeremydouglass @abhikpal

While working on building font support and improvements to the Shape class, I would really like to work on adding extra features to the animation part.

I will be trying out a few codes from the provided links and experiment a little. I will revert back with something more meaningful. Thankyou for all the feedback.

---

<div class="post-metadata">

**Author:** ![Sushanti](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sushanti/32/4275_2.png) [@Sushanti](https://discourse.processing.org/u/Sushanti)\
**Post date:** [April 8, 2019, 10:54pm UTC](https://discourse.processing.org/t/gsoc-2019-improving-processing-python/9644/15 "2019-04-08T22:54:24Z")

</div>

@abhikpal @jeremydouglass @Manindra

I’m sorry for the late response Sir. I know it’s late but it’d be great if you guys could suggest any changes or give any kind of feedback about the proposal.

> **[Gsoc](https://docs.google.com/document/d/1_wulawWR1TSYUuPgKMlNyu_VkPtoBM5O_7btdumRlbI/edit?usp=sharing)**
>
> Google Summer of Code Proposal Objective: Improving and adding support to p5.py Time period: May 6 - Sep 3 Summer 2019 Abstract: I plan to work on adding support to the p5 Python version and bring it on par with the Java version. This...
