FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Simulation, Artificial Life
(Moderator: REAS)
   iterative convolution
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: iterative convolution  (Read 2494 times)
mrb

WWW
iterative convolution
« on: May 26th, 2003, 6:42am »

so i've been silently hanging around these boards for a long time and finally had a chance to put something together (school ended!...for the summer).  i ported a c++ app i wrote to processing, used some available UI widgets (thnx reas and arielm), and got it working at a decent speed...on my machine.  could yall check out the applet and code and give any suggestions? much thanx and great work along the way.  
  
 mrb  
  
 the original app can be found at:  
 http://149.31.1.65/~mrb/avsysfinal/  
  
 and the applet at:  
 http://149.31.1.65/~mrb/java/snoop/
 
zach
Guest
Email
Re: iterative convolution
« Reply #1 on: May 26th, 2003, 2:02pm »

looks great.  glad to see it getting a life outside of class!  can't wait to see it with 55.
 
Several ideas on speed improvement, some may or may not be of value here:
 
1) possible to get kernel weights to powers of 2?  then you could use a bitshift to divide.  
2) retrieve pixel values once (pixels[index-256]) as opposed to 3 times for each channel.
3) your kernels look like ints.  your pixel times  kernels look like ints.  why floats?
4) store each of the kernels as seperate arrays and use a System arraycopy.
5) is this call  
color(routput[j][i], goutput[j][i], boutput[j][i]);
as fast as ganging them up yourself into an int?
6) your image processes into array is a 2d.  can it be one d linked to (index).  A two d array is doing more work for a retrieve then a one d.  
7) type your temporary variables out of the image processing loop. (float r_ne)
 
- zach
 
REAS


WWW
Re: iterative convolution
« Reply #2 on: May 26th, 2003, 4:39pm »

Zach,
 
These are great technical comments. I wish you were around the board more often...
 
+ Casey
 
Pages: 1 

« Previous topic | Next topic »