Ask Your Question
0

How to make the right kernel and use sepFilter2D to solve "vessels enhacement" problem

asked 2017-06-30 22:18:21 -0600

updated 2017-06-30 22:19:43 -0600

Hello,guys these day ,I am doing sth about "vessels enhacement". for example ,an image like this

image description

if use the pipeline of " bilate->clahe->frangi" or something like,can get fine result,but the speed is a big problem,a frame of 640*480 need 200ms-300ms about,which is too slow.

I have found some paper about faster algorithm,in 《Low-Cost Hand Vein Pattern Recognition 》(Marion Distler etc),it gives the result can convert to the result,which enhance the vessels

image description

and even

image description

the result is not bad,and the kernel algorithm -- DBVPE is from another paper 《A Direction-Based Vascular Pattern Extraction Algorithm for Hand Vascular Pattern Verification 》( Sang Kyun Im etc), in section 3,it gave the convolution method

image description

where z(c), M, N, and w(i) are the center pixels of the filter mask, the abscissa vector size of the mask, the ordinate vector size of the mask, and the filter coefficient of the proposed emphasizing filter, respectively. S(x,y) is one of {–1, 1} and K(x,y) is any integer number.

image description

image description

and get the result( a to f)

image description

to get the same result ,i make some coding

//make a kernel
Mat k11 = Mat(1,11,CV_64FC1,Scalar(0));
Mat k17 = Mat(1,17,CV_64FC1,Scalar(0));
k11.at<double>(0,0) = -1.0/(11*17);
k11.at<double>(0,1) = -1.0/(11*17);
k11.at<double>(0,2) = 2.0/(11*17);
k11.at<double>(0,3) = 4.0/(11*17);
k11.at<double>(0,4) = 16.0/(11*17);
k11.at<double>(0,5) = 32.0/(11*17);
k11.at<double>(0,6) = 16.0/(11*17);
k11.at<double>(0,7) = 4.0/(11*17);
k11.at<double>(0,8) = 2.0/(11*17);
k11.at<double>(0,9) = -1.0/(11*17);
k11.at<double>(0,10)= -1.0/(11*17);

k17.at<double>(0, 0) = -1.0/(11*17);
k17.at<double>(0, 1) = -1.0/(11*17);
k17.at<double>(0, 2) = -1.0/(11*17);
k17.at<double>(0, 3) = -1.0/(11*17);
k17.at<double>(0, 4) = -1.0/(11*17);
k17.at<double>(0, 5) = 2.0/(11*17);
k17.at<double>(0, 6) = 8.0/(11*17);
k17.at<double>(0, 7) = 16.0/(11*17);
k17.at<double>(0, 8) = 32.0/(11*17);
k17.at<double>(0, 9) = 16.0/(11*17);
k17.at<double>(0,10) = 8.0/(11*17);
k17.at<double>(0,11) = 3.0/(11*17);
k17.at<double>(0,12) = -1.0/(11*17);
k17.at<double>(0,13) = -1.0/(11*17);
k17.at<double>(0,14) = -1.0/(11*17);
k17.at<double>(0,15) = -1.0/(11*17);
k17.at<double>(0,16) = -1.0/(11*17);

// sepFilter2D sepFilter2D(tmp,tmp,CV_8UC1,k11.t(),k17)

but the result is too bad

image description

my result

image description

paper result

image description

what's wrong with my code?Or did i do sth wrong when make the kernel or use sepFilter2D ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2017-07-01 02:54:31 -0600

LBerger gravatar image

I am not sure to understand what are original image and your result. I have changed parameters in sepfilter :

sepFilter2D(tmp,tmp,CV_32F,k11.t(),k17);
Mat xxx;
normalize(tmp,xxx,255,0,NORM_MINMAX,CV_8U);
imshow("ee",xxx);

and result is :

image description

edit flag offensive delete link more

Comments

that's look fine,but did't solve my problem.I will report what i get later.

jsxyhelu gravatar imagejsxyhelu ( 2017-07-03 19:50:28 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-06-30 22:18:21 -0600

Seen: 916 times

Last updated: Jul 01 '17