Fwd: problem

7 views
Skip to first unread message

Farshad Khunjush

unread,
May 26, 2010, 5:39:35 AM5/26/10
to MCP88
Dear all,

The following is the problem with the base code and it seems it can be fixed by the Ms. Jamshidi's suggestion.
If you have any concern, please let me know.

Regards,
F. Khunjush.

---------- Forwarded message ----------
From: Zahra Jamshidi <zahra.j...@gmail.com>
Date: Wed, May 19, 2010 at 8:56 PM
Subject: Re: problem
To: Farshad Khunjush <fkhu...@gmail.com>
Cc: amir fallahi <afall...@gmail.com>


Dear All,
Yesterday I have noticed this problem, please give kernel size to the conv function and change it as follow:
int **conv(int **input, int **kernel, int input_x, int input_y, int kernel_x, int kernel_y){
.........
for(j = 0 ; j < input_y; j++){
     if(m - i < 0 || m - i > kernel_x || n - j < 0 || n - j > kernel_y)

      temp = 0;
     else
      temp  = kernel[m-i][n-j];
     output[m][n] += input[i][j] * temp;
    }
 .....
}

I think this will solve the problem. Any Idea?

Best,


On Wed, May 19, 2010 at 9:49 PM, Farshad Khunjush <fkhu...@gmail.com> wrote:
Dear Mr. Fallahi,

Thanks for your email. Please arrange with Ms. Jamshidi to fix the problem.

Regards,
F. Khunjush.

On Wed, May 19, 2010 at 8:38 AM, amir fallahi <afall...@gmail.com> wrote:
Hi dear Dr khunjush
i checked simple file for assignment 4 and that has a broblem
in this point
 
for(j = 0 ; j < input_y; j++){
     if(m - i < 0 || n - j < 0)
      temp = 0;
     else
      temp  = kernel[m-i][n-j];
     output[m][n] += input[i][j] * temp;
    }
if kernel be 7*7 and input and outbut be for example 128*128 then index for kernel (m-i) or (n-j) is out of array and its not checked
 
best regard




--
Z. Jamshidi
M.S. Student
Computer Engineering Dept.
Shiraz University

Reply all
Reply to author
Forward
0 new messages