java - Issues with Image Convolution -


i implementing own image convolution method in java, supposed general can run kernals through it. works , able output things, output wrong. right side of image appears on left hand side, , image seems triplicate throughout varying intensities. occurs regardless of kernal running (i have tried 9x9 , standard 3x3) , similar things occur. have played , changed work still behaving incorrectly.

for (int = 0; < (image.getwidth()-mask.length); i++)     {     (int j = 0; j < (image.getheight()-mask.length); j++)     {         int sum = 0;          (int w = 0; w < mask.length; w++)          {             (int z = 0; z < mask.length; z++)              {                sum += arr[w + i][z + j] * mask[w][z];                }         }             if(sum < 170)        {             convarray[i][j] = 0;        }         else        {             convarray[i][j] = 255;        } 


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -