We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want to pull object out of the background that mean I want to change background of the image. My image is glass of water with a green background. Could you please tell me how to write code to solve this problem. Thank you.
Answers
Generally, PImage objects are stamped in canvas using image().
So if your PImage has a full transparent background color, you'll see the 1 determined by canvas's background() instead.
Now, if your PImage has its own background color, you're gonna need to write a code snippet
to identify and change it to another value! >:)
Take a look at pixels[] reference! \m/
I just start use Processing last week . I don't know about this program work much. Could you please give example of code to me. :D
I have more question about this problem. How do I write equation to solve this problem of transparent or semi-transparent matting.
This section is about "Questions about Code". It's supposed that you supply a buggy code for us to find out what's wrong! =:)
I am sorry I wrote wrong section :-S
Take a look at this tutorial which will help you get started.
http://processing.org/tutorials/pixels/
Thank you for you help. Could you tell me how do write equation to solve this problem of transparent or semi-transparent matting.
Well, here's my attempt. Be aware that it's not been tested and it's just a snippet.
It means it's supposed to be used by a more complete program written by you. Good luck! :-bd
Thank you very much. I will try to do all my best :D