Is this a bug or not about filter2D? (Bug #2596)


Added by wuling Chang over 12 years ago. Updated about 12 years ago.


Status:Cancelled Start date:2012-12-04
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:imgproc, video
Target version:-
Affected version:2.4.3 Operating System:
Difficulty: HW Platform:
Pull request:

Description

Hi all:
The code is here. I try some kernels to check filter2D.But some kernels i get right result,somethings are not.
So I am confused that the code is wrong,or there are some bugs in filter2D.
The code is here:
float m[] = {-1.0, -1.0, -1.0,
-1.0, 10.0, -1.0,
-1.0, -1.0, -1.0 };
cv::Mat kernel=cv::Mat(3,3,CV_32F,m);
//cv::normalize(kernel,kernel,1.0,0,NORM_L1);
filter2D(src, dst,-1,kernel);
kernel.release();

The attchement file is error result.
below list is the same to get error result.

float m[] = {-1, -1, -1, -1, -1,
-1, -1, -1, -1, -1,
-1, -1, 30, -1, -1,
-1, -1, -1, -1, -1,
-1, -1, -1, -1, -1};
cv::Mat kernel=cv::Mat(5,5,CV_32F,m);


error_result.bmp - Error result (97.6 kB) wuling Chang, 2012-12-04 03:38 pm

bacteria.BMP (32.3 kB) wuling Chang, 2012-12-04 03:39 pm

correct_bacteria.bmp (32.3 kB) wuling Chang, 2012-12-05 11:04 am


Associated revisions

Revision cd02a700
Added by Andrey Pavlenko almost 11 years ago

Merge pull request #2596 from ilya-lavrenov:tapi_setto

History

Updated by wuling Chang over 12 years ago

Sorry, the original picture is here

Updated by Anna Kogan over 12 years ago

Hello Wuling,

If you are unsure whether is is a problem or not, please try first to ask your question on answers.opencv.org. Community may suggest you a solution.
And could you please explain why this result is wrong?

Updated by Anna Kogan over 12 years ago

  • Category set to imgproc, video

Updated by wuling Chang over 12 years ago

Dear anna,
Thank your responsing, I use imagj & ni vision to check the result.
If i use list code:

float m[] = {-1.0, -1.0, -1.0,
-1.0, 10.0, -1.0,
-1.0, -1.0, -1.0 };
cv::Mat kernel=cv::Mat(3,3,CV_32F,m);
filter2D(src, dst,-1,kernel);
kernel.release();
This attachement file should be correct resut pic.

Updated by Vadim Pisarevsky about 12 years ago

closed, since the bug can not be reproduced

  • Affected version set to 2.4.3
  • Status changed from Open to Cancelled

Also available in: Atom PDF