Hello, I did study the chapter 8 last week, and I resolved the 5 exercises, anyway the weekends Im trying to finish 100% of the exercises for each chapter for practicing.
I made the code for exercises 11 and 12 too, and it is working (I mean, my code do what they asw to do) but it took very long time to run.
I added the setExecutionLimit and the program finish and show the image as it should. But I keep thinking I made a wrong solution because is very long time.
I finally used 4 nested loops.
The first 2 loops(for) is to run along every pixel into the image. Im not starting in pixel 0,0, instead, Im starting in pixel1,1
the next 2 loop (for) Im runing through every pixel around (to get the average value)
Im not sure if this is the reason cause it take so long for finish. and if there are other way.
I thought I can try to make the average getting the values in each pixel without the last 2 nested loops, but it seems like silly to repeat 9 times the same code for get the red, green and blue values and make the average like that.
Im not sure what code can I paste here, or if someone could give me an idea to do it in a diferent way to make it faster.
Thank you very much!!!